To configure GiNaC means to prepare the source distribution for building. It is done via a shell script called configure that is shipped with the sources and was originally generated by GNU Autoconf. Since a configure script generated by GNU Autoconf never prompts, all customization must be done either via command line parameters or environment variables. It accepts a list of parameters, the complete set of which can be listed by calling it with the --help option. The most important ones will be shortly described in what follows:
In addition, you may specify some environment variables. CXX holds the path and the name of the C++ compiler in case you want to override the default in your path. (The configure script searches your path for c++, g++, gcc, CC, cxx and cc++ in that order.) It may be very useful to define some compiler flags with the CXXFLAGS environment variable, like optimization, debugging information and warning levels. If omitted, it defaults to -g -O2.1
The whole process is illustrated in the following two examples. (Substitute setenv VARIABLE value for export VARIABLE=value if the Berkeley C shell is your login shell.)
Here is a simple configuration for a site-wide GiNaC library assuming everything is in default paths:
$ export CXXFLAGS="-Wall -O2" $ ./configure
And here is a configuration for a private static GiNaC library with several components sitting in custom places (site-wide GCC and private CLN). The compiler is persuaded to be picky and full assertions and debugging information are switched on:
$ export CXX=/usr/local/gnu/bin/c++ $ export CPPFLAGS="$(CPPFLAGS) -I$(HOME)/include" $ export CXXFLAGS="$(CXXFLAGS) -DDO_GINAC_ASSERT -ggdb -Wall -pedantic" $ export LDFLAGS="$(LDFLAGS) -L$(HOME)/lib" $ ./configure --disable-shared --prefix=$(HOME)
 The configure script is itself generated from the file configure.ac. It is only distributed in packaged releases of GiNaC. If you got the naked sources, e.g. from git, you must generate configure along with the various Makefile.in by using the autoreconf utility. This will require a fair amount of support from your local toolchain, though.