Quick start
===========

./configure --prefix=/usr
make
su
make install

If you have libgmpxx installed in a non-default
directory, or when you have installed multiple
versions of it, then add the appropriate LDFLAGS
and CPPLAGS for it.  For example:

GMPPREFIX=/usr/local/gmp-gcc-3.2/
CC=gcc-3.2 CXX=g++-3.2 LDFLAGS="-L$GMPPREFIX/lib" CPPFLAGS="-I$GMPPREFIX/include" ./configure --prefix=/usr/local/ecc-gcc-3.2/

If you have problems mail me: libecc@alinoe.com
(include as many details as possible).

Building RPMs
=============

The released tar file contains a .spec file.
Therefore you can build an rpm directly from the tar with

rpm -ta libecc-VERSION.tar.gz

Building from CVS
=================

After checking out / updating from CVS, always first run the script ./bootstrap.

Needed tools
============

Check if you have all GNU tools/libraries/packages that libecc depends on:

Primary site:
ftp://ftp.gnu.org/gnu/

List of mirrors:
http://www.gnu.org/order/ftp.html

Packages/versions needed
------------------------

i) An ISO C++ compiler and a POSIX *NIX OS in order for the build system to work.

Packages needed to run the testsuite
------------------------------------

ii) If you want to run the testsuite then you will have to install
dejagnu-1.4.2 or higher, which can be downloaded from ftp.gnu.org/gnu/dejagnu/,
or your local GNU mirror.

You will also need expect-5.32.2 (and tcl/tk 8.3.3?).  At least, expect 5.31.2
is known to hang.  You can get it from http://expect.nist.gov/.

Packages/versions needed as maintainer or when using CVS
--------------------------------------------------------

If you want to generate maintainer files (and you need that when you
get this package via CVS; in that case you also need to configure using
--enable-maintainer-mode) then you also need to have the following tools:

iii)  GNU make
iv)   GNU m4
v)    GNU which	version 2.x
vi)   autoconf	version 2.13 or 2.52 or higher
vii)  automake	version 1.6 or higher
viii) libtool	version 1.4.2 or higher (linux)
      (Other OS probably need the latest CVS version
       because libtool 1.4.x treats everything as C,
       causing the constructors of global objects not
       to be called; see http://www.gnu.org/software/libtool/).

Each of those can be downloaded from your local GNU site.

Moreover, in order to generate the documentation, you need to
have the following installed:

ix)  GNU grep	version 2.4.2 is known to work.
x)   doxygen	version 1.2.17 or higher (http://www.doxygen.org/)
xi)  graphviz	http://www.research.att.com/sw/tools/graphviz/
xii) teTeX	http://www.tug.org/teTeX/ (for generating the formula .png's).


Hackers info
============

-=i=-

You can list the configure options by issuing:

./configure --help

You can read more about the configuration options and what they do
in include/libecc/config.ho.in.

If you want to change Makefile.am files and the like then you'll need to
use --enable-maintainer-mode.  If you enable maintainer-mode then you
will need GNU make, other make won't work (you also need a LOT of other
extra tools installed on your system, only for the brave thus).

-=ii=-

You can specify the compiler that wil be used by setting the environment
variables CC and CXX:

CC="gcc-3.2" CXX="g++-3.2" ./configure

Note that CC is being used for linking, so the versions of these two
need to match or things might not work.

-=iii=-

You can also set the environment variables LDFLAGS and CPPFLAGS.
For example:

LDFLAGS="-L/usr/gnu/lib" CPPFLAGS="-I/usr/gnu/include" ./configure

-=iv=-

You can install libecc in a 'staging' directory by issuing

make DESTDIR=/tmp/staging install

this can come in handy when you want to build an rpm for instance.

-=v=-

The Makefile has the following targets:

make [all-recursive]
make install
make uninstall
make clean
make distclean

If you configured with --enable-maintainer-mode then the following
targets exist as well:

make dist					// Create tar ball
make maintainer-clean				// Erase everything that was generated somehow
make check					// Run test suite
make rpm					// Create rpms
make ChangeLog					// Generate ChangeLog from cvs database
make CC="gcc-3.2" CXX="g++-3.2" reconfig	// Switch compilers keeping the same configuration
make full-check					// Iterate over all configurations and all compiler versions
make syncwww					// Mirror current documentation to homepage

It is not garanteed that these work on another machine than mine however.

-=vi=-

Finally, you can also build libecc in a different directory than the source
tree is in:

tar xzf libecc-VERSION.tar.gz
mkdir libecc-objdir
cd libecc-objdir
../libecc-VERSION/configure --prefix=/usr
make
su
make install

that way your source tree stays completely distclean :)
