CC=gcc CXX=g++ CFLAGS=-O2 CXXFLAGS=$$(CFLAGS) AR=ar ARFLAGS=ruv RANLIB=ranlib LDFLAGS= LDFLAGS_CXX=$$(LDFLAGS) LDLIBS=-lm LDLIBS_CXX=$$(LDLIBS) CPPFLAGS= PREFIX=/usr/local LIBDIR=$$(PREFIX)/lib INCLUDEDIR=$$(PREFIX)/include DOCDIR=$$(PREFIX)/doc NTL_GMP_LIP=off NTL_GMP_HACK=off GMP_PREFIX=none GMP_INCDIR= GMP_LIBDIR= WIZARD=on all: sh Check1 '$(WIZARD)' 'WIZARD' sh Check1 '$(NTL_GMP_LIP)' 'NTL_GMP_LIP' sh Check1 '$(NTL_GMP_HACK)' 'NTL_GMP_HACK' echo '###############################################################' echo '#' echo '# First, choose a C and C++ compilers, and set compiler flags.' echo '# This is done by setting the variables CXX, CC, CFLAGS, and' echo '# CXXFLAGS.' echo '#' echo '###############################################################' echo '' echo '' echo 'CC=$(CC)' echo '# A C or C++ compiler, e. g., gcc, cc, xlc.' echo '# There are a few components written in C which may be compiled' echo '# under C++, but C compilers tend to generate slightly better code.' echo '# The C++ and C compilers (if different) must generate' echo '# compatible code.' echo '' echo '' echo 'CXX=$(CXX)' echo '# A C++ compiler, e.g., g++, CC, xlC' echo '' echo '' echo 'CFLAGS=$(CFLAGS)' echo '# Flags for the C compiler' echo '# Some useful flags:' echo '# -O2 -- recommended level of optimization' echo '# -g -- debugging' echo '# -mv8 -- needed with gcc/g++ to get the full instruction set' echo '# of a SparcStation' echo '# -qarch=ppc -- needed with xlc/C to get the full instruction set' echo '# of a PowerPC' echo '' echo '' echo '' echo 'CXXFLAGS=$(CXXFLAGS)' echo '# Flags for the C++ compiler (usually the same as CFLAGS)' echo '# Some useful flags:' echo '# -+ -- needed with xlC to make it treat .c files as C++ files' echo '' echo '# Here are a few more variables for standard utilities.' echo '# The defaults should almost always be OK.' echo '' echo '' echo 'AR=$(AR)' echo '# command to make a library' echo '' echo 'ARFLAGS=$(ARFLAGS)' echo '# arguments for AR' echo '' echo 'RANLIB=$(RANLIB)' echo '# set to echo if you want to disable it completely' echo '' echo 'LDFLAGS=$(LDFLAGS)' echo '# arguments for linker for C++ programs' echo '' echo 'LDFLAGS_CXX=$(LDFLAGS_CXX)' echo '# libraries for linking C programs' echo '' echo 'LDLIBS=$(LDLIBS)' echo '# libraries for linking C++ programs' echo '' echo 'LDLIBS_CXX=$(LDLIBS_CXX)' echo '# libraries for linking C++ programs' echo '' echo 'CPPFLAGS=$(CPPFLAGS)' echo '# arguments for the C preprocessor' echo '' echo 'PREFIX=$(PREFIX)' echo 'LIBDIR=$(LIBDIR)' echo 'INCLUDEDIR=$(INCLUDEDIR)' echo 'DOCDIR=$(DOCDIR)' echo '# where to install NTL' echo '' echo '###############################################################' echo '#' echo '# Second, if you want to use GMP (the GNU Multi-Precision library),' echo '# define the variables GMP_INCDIR, GMP_LIBDIR, GMP_LIB below.' echo '# Otherwise, leave these defined as empty.' echo '# You also will have to set either NTL_GMP_LIP or NTL_GMP_HACK' echo '# in the config.h file.' echo '#' echo '# Using GMP can lead to significant performance gains on some' echo '# platforms. You can obtain GMP from http://www.swox.com/gmp.' echo '# Once you unpack it into a directory, just execute' echo '# ./configure; make' echo '# in that directory.' echo '#' echo '###############################################################' echo '' echo '' sh Select1 '$(GMP_PREFIX)' 'none' 'GMP_INCDIR=$(GMP_INCDIR)' 'GMP_INCDIR=-I$(GMP_PREFIX)/include' echo '# Set to -I if using GMP and GMP' echo '# is not installed in a standard system directory, empty otherwise' echo '' sh Select1 '$(GMP_PREFIX)' 'none' 'GMP_LIBDIR=$(GMP_LIBDIR)' 'GMP_LIBDIR=-L$(GMP_PREFIX)/lib' echo '# Set to -L if using GMP and GMP' echo '# is not installed in a standard system directory, empty otherwise' echo '' sh Select2 '$(NTL_GMP_LIP)' '$(NTL_GMP_HACK)' 'GMP_LIB=-lgmp' 'GMP_LIB=' echo '# Set to -lgmp if using GMP, empty otherwise' echo '' echo '###############################################################' echo '#' echo '# Third, if you do not want to run the wizard that automagically' echo '# sets some performace related flags in config.h, set the flag below.' echo '#' echo '###############################################################' echo '' echo '' echo 'WIZARD=$(WIZARD)' echo '# Set to off if you want to bypass the wizard; otherwise, set to on.'