DJGPP Package of GNU Multi Precision (GMP) Library 4.0
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

If you wish to:

* use GMP in your programs, you only need the binary distribution;

* rebuild the GMP libraries for maximum performance on your computer,
  then you only need the source distribution;

* read the documentation in a format other than info, e.g. PostScript,
  you need the documentation distribution.

Please note that some files are in more than one distribution - they
should be the same in each distribution, so it is same to overwrite
when extracting the archives.

Installing the Binary Distribution
----------------------------------

To use GMP, the following packages are required:

. DJGPP 2.03
. GNU C compiler (gcc) - version 2.95.x or greater suggested
. GNU C++ compiler (g++) - version 3.0 or greater required
. GNU binutils - version 2.11.2 suggested

If you wish to read the documentation, you should also install:

. GNU texinfo 4.0

Unzip the distribution preserving the directory structure - use PKUNZIP's
-d option; use an equivalent option with other unzippers. Unzip into
the top DJGPP installation directory, e.g. c:\djgpp.

An entry needs to be added to the info directory for 'info gmp' to work.
To add the entry, run the following command:

    install-info --info-file=c:/djgpp/info/gmp.info --info-dir=c:/djgpp

Replace c:/djgpp with the actual DJGPP directory path.

The libraries in the binary distribution have been stripped of debugging
information.

Installing the Documentation Distribution
-----------------------------------------

Unzip the distribution preserving the directory structure - use PKUNZIP's
-d option; use an equivalent option with other unzippers. Unzip into
the top DJGPP installation directory, e.g. c:\djgpp.

Building from the Source Distribution
-------------------------------------

GMP was straightforward to build from sources. None of the library
sources required patching. To build GMP, the following packages
were used:

. DJGPP 2.03
. GNU bash 2.04
. GNU C compiler, gcc 3.0.2
. GNU C++ compiler, g++ 3.0.2
. GNU binutils 2.11.2
. GNU make 3.79
. GNU fileutils 4.0
. GNU sh-utils 1.12
. GNU grep 2.4
. GNU sed 3.02
. GNU awk 3.0.3
. GNU m4 1.4
. GNU texinfo 4.0

bash 2.04 is required to build GMP 4.0. The build will fail with
bash 2.03.

In the instructions below, it is assumed that bash is your shell.
If it is not, start bash by running the command 'bash'.

GMP can be built with optimisations for different processors.
The distributed binaries were made for i386 processors by running
'configure' like so:

    ./configure --host=i386-pc-msdosdjgpp [<other configure options>]

You can get a list of available configure options by running:

    ./configure --help

If you do not identify the host system, the configure script will detect
it. If you want maximum performance, this is best; if you want maximum
compatibility, then build for i386 processors.

To configure & build for installation in the DJGPP directory:

    ./configure --prefix=/dev/env/DJDIR [<other configure options>]
    make

This may take some time (tens of minutes). GMP comes with some tests,
which can be used to check that gmp has built correctly. To run
the tests:

    make check

'configure' was run like this for the normal binary release:

    AWK=gawk CXX=gxx ./configure \
        --host=i386-pc-msdosdjgpp --disable-shared --disable-alloca \
        --enable-mpbsd --enable-mpfr --enable-cxx \
        --prefix=/dev/env/DJDIR

The libraries in the binary distribution were stripped of debugging
information. Because some of the source files in the library have
the same name, the library cannot be stripped, because 'strip'
would discard all but one of the object files with the same name
(no path information is stored). So the object files need to be
stripped and the library rebuilt, to remove debugging information.
After the library was built successfully, the following commands
were run:

    find . -name '*.o' | xargs strip -g
    find . -name '*.lo' | xargs touch
    make

NB: This requires GNU findutils to be installed.

Finally
-------

I hope this package is useful. Please contact me about any problems
with the DJGPP package.

Richard Dawe <richdawe@bigfoot.com> 2000-12-01
