DJGPP Port of GNU MP Library 3.0.1
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Installing the Binary Package
-----------------------------

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.

Building from Sources
---------------------

gmp (GNU MP) was straightforward to build from sources. None of the library
sources required patching. One of the test programs was patched. A File System
Extension was written to support the test program mpz/tests/io.c's use of
the pipe() function. Please see the file 'diffs' for the patches to:

. mpz/tests/io.c
. mpz/tests/Makefile.in
. mpz/tests/Makefile.am

Under bash, this was applied in the GMP top-level directory using:

    patch -p0 -i djgpp/diffs

The file 'io-djgpp.c' needs to be copied to mpz/tests/. A patch for
'autoheader' from the DJGPP port of autoconf 2.13 is included - apply like so
from bash:

    patch -i autoheader.diff $DJDIR/bin/autoheader

To build GMP, I used the following packages:

. DJGPP 2.03
. GNU bash 2.03
. GNU gcc 2.95.2
. GNU binutils 2.8.1
. GNU sed
. GNU awk
. GNU m4
. GNU texinfo 4.0

To build (from bash):

    ./configure
    make

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

    make check

gmp can provide a library that is compatible with BSD's mp library. To build
this, run configure with the '--enable-mpbsd' option, i.e.

    ./configure --enable-mpbsd

This was used for the binary release.

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

Richard Dawe <richdawe@bigfoot.com> 2000-06-09
