DJGPP Port of GNU MP Library 3.1
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

GNU MP is referred to as 'gmp' in the remainder of this document.

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)
. GNU binutils

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.inf --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, I used the following packages:

. DJGPP 2.03
. GNU bash 2.04 beta 5c (*)
. GNU C compiler, gcc 2.95.2
. GNU binutils 2.9.5.1 beta
. GNU sed
. GNU awk
. GNU m4
. GNU texinfo 4.0

(*) Building gmp should work with bash 2.03. bash 2.04 betas can be
    downloaded from: http://members.xoom.com/snowball3/djgpp/

Unfortunately, building gmp currently requires long filename (LFN) support.
This means it can only be built under Windows '9x or under DOS & Windows NT
with an LFN driver. Please see the DJGPP FAQ for details of these
LFN drivers.

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

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 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

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

    ./configure --host=i386-pc-msdosdjgpp --enable-mpbsd

The libraries in the binary distribution were stripped of debugging
information - please mail me for the procedure.

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

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