Install NTL on UNIX systems
mainTo install NTL on a UNIX-like system, navigate to the src directory and use the following build pattern. Note that the ./configure script uses a variable=value syntax rather than standard autotools flags.
Build Steps
- Configure the build with desired options.
- Compile the source.
- Install the headers and libraries.
Common Configuration Options
GMP_PREFIX=/path/to/gmp/installation: Specifies the location of the GMP (GNU Multi-Precision) library. The script expectsgmp.hin$(GMP_PREFIX)/includeandlibgmp.{a,so}in$(GMP_PREFIX)/lib. For optimal performance, it is recommended to build GMP from source rather than using a generic system installation.PREFIX=/path/to/ntl/installation: The destination directory for NTL.make installwill place headers in$(PREFIX)/include/NTL, libraries in$(PREFIX)/lib, documentation in$(PREFIX)/doc/NTL, and the pkg-config file in$(PREFIX)/lib/pkgconfig.DEF_PREFIX=/default/installation/path: A shortcut that sets bothGMP_PREFIXandPREFIXto the same value.SHARED=on: Enables building NTL as a shared (dynamic) library in addition to a static library (defaults tooff).
cd src
./configure GMP_PREFIX=/path/to/gmp PREFIX=/path/to/ntl SHARED=on
make
make install