Installing mathemagix with configure

This section concerns the compilation, installation, or local use of several Mathemagix packages together, from sources.

1.Dependencies

For a minimal build of the Mathemagix interpreter, you will need to ensure that Libtool has been installed on your system with support for building dynamic libraries. In addition, you probably want to install Readline, which is convenient if you want to use the interpreter from a shell.

The other packages of Mathemagix each come with their specific dependencies; see the package list. The two most important dependencies are Gmp and Mpfr, which are required by almost all other packages. Developers also need to install Autotools, cmake, Doxygen, and TeXmacs.

2.Downloading from the svn server

The sources of Mathemagix can be downloaded from the svn server located at http://gforge.inria.fr/projects/mmx/ via the following command:

 svn checkout svn://scm.gforge.inria.fr/svn/mmx

This will create a mmx directory containing all the source files.

3.Installation

Mathemagix packages comply with the standard GNU installation procedure. For a complete description please refer to the documentation of individual packages. In this section we describe how several packages can be configured, compiled and installed with the top level tools available in the mmx directory.

3.1.Configuration

In a text terminal or console, and within the mmx directory, you can type the following command:

./configure

The default list of the packages to be handled is thus printed. The latter list can be customized thanks to the –enable-package options. Dependencies are treated automatically. For instance

./configure --enable-algebramix --enable-mmxlight

will build the package algebramix and the interpreter mmxlight, as well as all dependencies (in this case basix and numerix). Notice that extra packages can be enabled a posteriori, simply by redoing a ./configure; this will not recompile the packages which are already available.

To build Mathemagix on certain architectures you may need to specify additional include and library paths. For example, if external dependencies have been installed via Macports on a MacOS platform then you have to type:

./configure CPPFLAGS=-I/opt/local/include LDFLAGS=-L/opt/local/lib

Default installation path is /usr/local/, but you can customize it with the –prefix option as follows:

./configure --prefix=...

In order to build the html documentation, you have to add the option –enable-doc to the configure script, but it requires that TeXmacs and Doxygen are installed on your platform. Finally the list of all configuration options is obtained using:

./configure --help

3.2.Compilation

Once the configuration stage is finished you can start the compilation and installation by typing:

make install

Please notice that running the make command without the argument install, in order to launch the sole compilation, will fail here, because low level (regarding to the dependency chain) packages must be installed in order to be detected at the right place by higher level packages.

3.3.Development mode

If you do not want to install Mathemagix, then you can use it, either to try or to contribute, via the development mode. First of all, you need to setup the paths needed for the applications to be built and used locally, by typing the following command in the mmx directory:

source set-devel-paths

Then you can proceed to the configuration as explained above with adding the option –enable-devel, and then type:

make

This will allow you for instance to run the tests, the benchmarks, and the interpreter without installation, by typing for instance:

mmx-light

Since Mathemagix consists of several packages, this development mode is convenient for developers. Indeed, otherwise reinstalling a package after a modification may cause dependant packages to be recompiled over and over again. In case you have passed the –enable-doc option you can build the whole html documentation by typing make html.

If the one wants to run make in the specific package only then one can type:

make package-all

The other targets (which behave similarly) are:

check [package-check]

run the test suite of the package(s).

clean [package-clean]

clean the package(s).

confclean [package-confclean]

clean the configuration file of the package(s).

dist [package-dist]

build the distribution archive .tar.gz for each selected package.

distclean [package-distclean]

clean the built files and the Makefile(s).

html [package-html]

build the html documentation of the package(s).

install [package-install]

install the package(s) in the directory specified by the option –prefix=... of configure.

uninstall [package-uninstall]

unsintall the package(s).

4.Global Variables

The following variables should not be modified, unless you really know what you are doing.

Beside global variables a global boot file is located at 'prefix_path'/etc/mathemagix/boot.mmx. It is automatically loaded by mmx-light. At the end, the latter boot file further loads a user boot file located at $MMX_USER_DIR/etc/boot.mmx. Use the shell option –noboot to disable these loadings.

5.Known problems

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License. If you don't have this file, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.