To build MPC, you first have to install GNU MP (version 4.2 or higher) and GNU MPFR (version 2.3.1 or higher) on your computer. You need a C compiler, preferably GCC, but any reasonable compiler should work. And you need a standard Unix ‘make’ program, plus some other standard Unix utility programs.
Here are the steps needed to install the library on Unix systems:
if GMP and MPFR are installed into standard directories, that is, directories that are searched by default by the compiler and the linking tools.
‘./configure --with-gmp=<gmp_install_dir>’
is used to indicate a different location where GMP is installed. Alternatively, you can specify directly GMP include and GMP lib directories with ‘./configure --with-gmp-lib=<gmp_lib_dir> --with-gmp-include=<gmp_include_dir>’.
‘./configure --with-mpfr=<mpfr_install_dir>’
is used to indicate a different location where MPFR is installed. Alternatively, you can specify directly MPFR include and MPFR lib directories with ‘./configure --with-mpf-lib=<mpfr_lib_dir> --with-mpfr-include=<mpfr_include_dir>’.
Another useful parameter is ‘--prefix’, which can be used to specify an alternative installation location instead of /usr/local; see ‘make install’ below.
Use ‘./configure --help’ for an exhaustive list of parameters.
This compiles MPC in the working directory.
This will make sure MPC was built correctly.
If you get error messages, please report them to ‘mpc-discuss@lists.gforge.inria.fr’ (See Reporting Bugs, for information on what to include in useful bug reports).
This will copy the file mpc.h to the directory /usr/local/include, the file libmpc.a to the directory /usr/local/lib, and the file mpc.info to the directory /usr/local/share/info (or if you passed the ‘--prefix’ option to configure, using the prefix directory given as argument to ‘--prefix’ instead of /usr/local). Note: you need write permissions on these directories.
There are some other useful make targets:
Create an info version of the manual, in mpc.info.
Create a PDF version of the manual, in doc/mpc.pdf.
Create a DVI version of the manual, in doc/mpc.dvi.
Create a Postscript version of the manual, in doc/mpc.ps.
Create an HTML version of the manual, in several pages in the directory doc/mpc.html; if you want only one output HTML file, then type ‘makeinfo --html --no-split mpc.texi’ instead.
Delete all object files and archive files, but not the configuration files.
Delete all files not included in the distribution.
Delete all files copied by ‘make install’.
On AIX, if GMP was built with the 64-bit ABI, before building and testing MPC, it might be necessary to set the ‘OBJECT_MODE’ environment variable to 64 by, e.g.,
‘export OBJECT_MODE=64’
This has been tested with the C compiler IBM XL C/C++ Enterprise Edition V8.0 for AIX, version: 08.00.0000.0021, GMP 4.2.4 and MPFR 2.4.1.
Please report any other problems you encounter to ‘mpc-discuss@lists.gforge.inria.fr’. See Reporting Bugs.