Building
Packages required
- gcc and g++, or other C/C++ compiler with support for C++11
- automake
- autoconfig
- libtool
- doxygen, if you want to build documentation
Packages strongly recommended
- GMP, for very large integer support.
Build Steps
1a. Configure - quick
There is a configuration script in developers/
that
should work for most setups. Simply run
developers/Config_generic.sh
for a release version of the library (debugging information off, and optimizations on). For a development version of the library, run
developers/Config_generic.sh --debug
(pass -h
to the script to get a list of possible switches).
1b. Configure - detailed
If the quick configuration script does not work for your system, or you wish to have more control over the configuration process, instead run the following.
Run the script
./autogen.sh
for the first build,
and whenever the source code has changes
in its file or directory layout.
This should create a ./configure
script.
Then, run
./configure
to setup the build files. This can be used to set various compile options; see Configuration Options below.
2. Run make
make
This builds everything.
The library will be in src/
,
and example applications will be in examples/
.
3. Test
make check
This builds and runs several regression tests.
4. Install
make install
This copies the compiled library into lib/
and include files into include/
.
These locations can be changed in the ./configure
step by specifying an alternate location;
see Configuration Options below.
5. Build documentation (optional)
For end-user documentation, use directory doxygen/
.
For complete documentation, use directory doxygen-devel/
.
Switch to the documentation directory and run make:
cd doxygen
make
This will generate both html and LaTeX documentation.
You can then view the html documentation by opening html/index.html
,
or you can run LaTeX on latex/refman.tex
.
Other make targets
make uninstall
Removes the files installed in lib/
.
make clean
Removes the results of compilation.
Configuration Options
Several environment variables may be set before running configure. Also, configure accepts parameters to alter the library configuration. These are listed below.
To build an optimized version of the library:
./configure CXXFLAGS="-O3"
To build a version of the library with support for Extensible Decision Diagrams (XDDs):
./configure CPPFLAGS="-DUSE_XDDS"
To build a debuggable version of the library:
./configure CPPFLAGS="-DDEVELOPMENT_CODE" CXXFLAGS="-ggdb"
Note that turning on development code may produce a significantly slower library.
To set the location of the gmp library, by hand (only necessary if configure fails to find it):
./configure CPPFLAGS="-I/path/to/gmp/header" LDFLAGS="-L/path/to/gmp/lib"
To disable gmp support in Meddly:
./configure --without-gmp
To change the install locations for the compiled library and include files
(for example, to /path/for/lib
and /path/for/include
):
./configure --prefix=/path/for