[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
2.1 How to Install
Here are the steps needed to install the library on Unix systems (more details are provided in the ‘INSTALL’ file):
-
To build MPFR, you first have to install GNU MP
(version 4.1 or higher) on your computer.
You need a C compiler, preferably GCC, but any reasonable compiler should
work. And you need the standard Unix ‘make’ command, plus some other
standard Unix utility commands.
Then, in the MPFR build directory, type the following commands.
-
‘./configure’
This will prepare the build and setup the options according to your system. You can give options to specify the install directories (instead of the default ‘/usr/local’), threading support, and so on. See the ‘INSTALL’ file and/or the output of ‘./configure --help’ for more information, in particular if you get error messages.
-
‘make’
This will compile MPFR, and create a library archive file ‘libmpfr.a’. On most platforms, a dynamic library will be produced too.
-
‘make check’
This will make sure MPFR was built correctly. If you get error messages, please report this to ‘mpfr@loria.fr’. (See section Reporting Bugs, for information on what to include in useful bug reports.)
-
‘make install’
This will copy the files ‘mpfr.h’ and ‘mpf2mpfr.h’ to the directory ‘/usr/local/include’, the library files (‘libmpfr.a’ and possibly others) to the directory ‘/usr/local/lib’, the file ‘mpfr.info’ to the directory ‘/usr/local/share/info’, and some other documentation files to the directory ‘/usr/local/share/doc/mpfr’ (or if you passed the ‘--prefix’ option to ‘configure’, using the prefix directory given as argument to ‘--prefix’ instead of ‘/usr/local’).
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |