The GMP package contains math libraries. These have useful functions for arbitrary precision arithmetic.
If you are building for 32-bit x86, but you have a CPU which is
capable of running 64-bit code and you have specified CFLAGS in the environment, the configure script
will attempt to configure for 64-bits and fail. Avoid this by
invoking the configure command below with
ABI=32 ./configure ...
The default settings of GMP produce libraries optimized for the host processor. Build generic libraries, suitable for package managment by running the following:
cp -v configfsf.guess config.guess cp -v configfsf.sub config.sub
Prepare GMP for compilation:
./configure --prefix=/usr \
--enable-cxx \
--disable-static \
--build=x86_64-pc-linux-gnu \
--docdir=/usr/share/doc/gmp-6.3.0
The meaning of the new configure options:
--enable-cxx
This parameter enables C++ support
--docdir=/usr/share/doc/gmp-6.3.0
This variable specifies the correct place for the documentation.
Compile the package and generate the HTML documentation:
sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool make make html
Install the package and its documentation:
make install make install-html