See the Normaliz manual, doc/Normaliz.pdf, Chapter 11, for
installation prerequisites (compiler, build tools, and libraries) and
how to install them using the install scripts in the distribution.

****************** ***
****   PACKAGES   ****
****************** ***

For rational polyhedra:

CoCoALib, http://cocoa.dima.unige.it/cocoalib/, version 0.99601
MPFR,  http://www.mpfr.org/mpfr, version 4.0.1
Flint, http://www.flintlib.org/flint, version 2.5.2
nauty, http://users.cecs.anu.edu.au/~bdm/nauty, version 27rc2

nauty should be configured with --enable-tls.

For algebraic polyhedra additionally:

MPFR and Flint as above
arb, https://github.com/fredrik-johansson/arb/archive/, version 2.16.0
e-antic, http://www.labri.fr/perso/vdelecro/e-antic/, version 0.1.3b


*********************
****   SCRIPTS   ****
*********************

The Normaliz install scripts handle the installation without any user interaction.
They only generate directories and files within the Normaliz directory, unless
the user forces them to do otherwise.

The use of the install scripts is described in the Normaliz manual,
doc/Normaliz.pdf, Section 11.2.

They installation can in addition be controlled by several environment variables:

NMZ_COMPILER: overrides the standard choice of compiler (g++ on Linux, clang++ on Mac)
NMZ_SHARED: if set, only shared libraries will be built; binaries depend on all of them.
NMZ_PREFIX: if set defines the path for make install; 
    by default it is "local" in the Normaliz directory
GMP_INSTALLDIR: sets the path to the GMP files
NMZ_OPT_DIR: sets the directory to which the sources of the optional libraries are downloaded;
  by default it is the subdirectory "nmz_opt_lib" in the Normaliz directory
NMZ_MAC_STATIC: if set a Mac binary is built with dependency on libomp.dylib relative to the binary
NO_OPENMP: if set blocks OpenMP in the compilation of Normaliz (and e-antic)

EXTRA_FLAGS: One can further control the build process of Normaliz by setting options for configure using this
   variable, the contents of which are appended to the call to the configure script; see

   ./configure --help

Have a look at the install scripts.

*****************************
****   TROUBLESHOOTING   ****
*****************************

In order to produce the semistatic binary (Linux and MacOS) install_normaliz.sh must make
the dynamic libraries invisble: after copying them to the subdirectory save_dynamic, 
removes them /local/lib and restores them after the build.

If you should encounter any problems at this point, manual intervention is required.
Since the dynamic libraries have been copied to /local/lib/save_dynamic before
deletion, you can copy them back to /local/lib. If the worst comes to the worst, you
must re-install the optional packages.


********************
**** plain MAKE ****
********************

Under Linux one can still use our old simple plain Makefile.

IT IS MEANT FOR THE DEVELOPMENT OF NORMALIZ and the creation of static binaries under Linux.

It is assumed that the optional libraries are installed in

   local
   
within the Normaliz directory.

1) Go to the source directory

2) Check the configuration in Makefile.configuration, especially the locations of
the optional packages and their versions.

3) Say 

        make -f Makefile.classic

It should work without change of Makefile.classic or Makefile.configuration on many systems
that have a system installation of the needed libraries. 
(We must use the name Makefile.classic since Makefile is occupied by autotools.) 

If everything is successful, then the executable file normaliz is
in the source directory. You may of course want to move them somewhere else.


Makefile.classic accepts optional arguments (also simultaneously):

        make -f Makefile.classic OPENMP=no  # deactivates OpenMP
        make -f Makefile.classic COCOA=no   # deactivates CoCoALib
        make -f Makefile.classic Flint=no   # deactivates Flint
        make -f Makefile.classic EANTIC=no  # deactivates e-antic
        make -f Makefile.classic NMZ_DEVELOP=no  # deactivates development version

You must make sure that everything is compiled with the same set of options!
In doubt use "make -f Makefile.classic clean" beforehand.

Similarly

        make -f Makefile.classic maxsimplex

for the compilation of maxsimplex (in its directory, example for the use of libnormaliz
in the manual).

5) If you want to install Normaliz, Say 

        make -f Makefile.classic install
    
Installs Normaliz in "local".

6) Makefile.classic includes a target "clean". It will remove the compiled files (but not uninstall them) by 

        make -f Makefile.classic clean
