DJGPP port of autoconf 2.57, release 3
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Introduction
------------

This is the Readme file for the DJGPP port of autoconf 2.57. Please
see the file 'NEWS' for a full list of user-visible changes
from the previous versions. Please see 'changelog.dos' for a list
of bugs fixed in each release of the port.

Tim van Holder writes:
"This release of autoconf should run pretty much out-of-the-box on DJGPP.
What's more, scripts generated by the DJGPP version should work fine
on DJGPP and Unices alike (though Unix-generated ones will still have a
few issues if run on DJGPP).

autoconf now defaults its prefix to /dev/env/DJDIR on DJGPP, so it'll find
the site script in $DJDIR/share automatically.  Some configure scripts may
override this default prefix; in those case, you'll need to explicitly
specify one (--prefix /dev/env/DJDIR)."

To use the autoconf program, you only need to download
the binary distribution, which includes documentation in info format.
You may also wish to download the documentation distribution, to get
the documentation in HTML, PostScript and DVI formats. If you wish
to examine or rebuild the autoconf sources, you need to download
the source distribution.

The autoconf port is available here:

Binaries:
http://www.simtel.net/gnudlpage.php?product=/gnu/djgpp/v2gnu/acnf257b.zip&name=acnf257b.zip

Documentation:
http://www.simtel.net/gnudlpage.php?product=/gnu/djgpp/v2gnu/acnf257d.zip&name=acnf257d.zip

Sources:
http://www.simtel.net/gnudlpage.php?product=/gnu/djgpp/v2gnu/acnf257s.zip&name=acnf257s.zip

Upgrading autoconf
------------------

If you are upgrading autoconf, please make a backup of
your config.site file. This can be found in the 'share' directory
off the DJGPP directory. This has been updated for autoconf 2.57.

Tim van Holder writes:
"If you already have a config.site, make a backup; only merge the two
if you know what you're doing."

Installing the Binary Distribution of autoconf
----------------------------------------------

Unzip the distribution preserving the directory structure (use -d
switch if you do that with PKUNZIP) from the top DJGPP installation
directory.

autoconf will not work, if the following packages have not been installed:

. DJGPP development environment;
. GNU bash;
. GNU m4 1.4 release 2 or later;
. Perl 5.6.1 release 3 or a later release of Perl 5.6.x (*);
. GNU awk;
. GNU sed;
. GNU grep;
. GNU make;
. GNU diffutils;
. GNU fileutils 4.1 release 6 or later;
. GNU sh-utils;
. GNU textutils.

(*) Perl 5.8.x hadn't been ported to DJGPP at the time of writing.

Tim van Holder writes:
"NOTE: autoconf relies on /dev/env/DJDIR working, so all tools it uses (and
all tools used by a package's configure.in or aclocal.m4 MUST BE COMPILED
WITH DJGPP 2.03 OR HIGHER)."

See the section "Rebuilding autoconf using the Source Distribution"
for suggested versions of each of these packages. If you are developing
with DJGPP, it is likely that most of the packages have already
been installed.

To set up and read the info documentation, you will need to install
GNU texinfo. To add autoconf to the info directory page, run:

    install-info --info-file=/dev/env/DJDIR/info/autoconf.info \
        --info-dir=/dev/env/DJDIR/info

(Type this as one line.) Then run 'info autoconf', to read
the autoconf manual.

Installing the Documentation Distribution of autoconf
-----------------------------------------------------

If you want the autoconf documentation in a format other than info format,
then you need the documentation distribution. This contains documentation
in texinfo source, HTML, DVI (TeX) and PostScript. This documentation
will be installed in gnudocs\autocnf2.57.

Rebuilding autoconf using the Source Distribution
-------------------------------------------------

To build the DJGPP port of autoconf from sources, I used the following
packages:

. DJGPP development environment 2.03 (v2/djdev203.zip);
. GNU C compiler 3.2.2 (v2gnu/gcc321b.zip);
. GNU binutils 2.13 (v2gnu/bnu213b.zip);
. GNU make 3.79.2 alpha 1 (but try v2gnu/mak3791b.zip);
. GNU bash 2.04 (v2gnu/bsh204b.zip);
. GNU m4 1.4 (v2gnu/m4-14b.zip);
. GNU sed 3.02.80 (v2gnu/sed3028b.zip);
. GNU awk 3.0.3 (v2gnu/gwk303b.zip);
. GNU diffutils 2.8 (v2gnu/dif28b.zip);
. GNU fileutils 4.1 release 6 (v2gnu/fil41b.zip);
. GNU sh-utils 2.0.11 (v2gnu/shl2011b.zip);
. GNU textutils 2.0 (v2gnu/txt20b.zip);
. GNU grep 2.4 (v2gnu/grep24b.zip);
. GNU texinfo 4.2 (v2gnu/txi42b.zip);
. Perl 5.6.1 release 3 (v2gnu/perl561b.zip).

Firstly, change into the top-level directory of the autoconf sources
(i.e. gnu\autocnf2.57) and configure the package:

    bash djgpp\djconfig.sh

If you want to install autoconf somewhere other than the DJGPP directory,
modify djgpp\djconfig.sh to use configure's '--prefix' option
(use 'bash configure --help' for more information).

Then build the package:

    make

If you are interested in the test suite, please see the section entitled
"Expected test suite results" below. You should probably run
the test suite, before installing.

Once autoconf is built and the tests have passed as expected, install
the package:

    make install

Also copy the new config.site file to your DJGPP directory, after
making a backup. E.g.:

    mv -v $DJDIR/share/config.site $DJDIR/share/config-site.bak
    cp -av $DJDIR/gnu/autocnf2.57/djgpp/config.site $DJDIR/share/config.site

Changes made to the autoconf 2.57 Sources
-----------------------------------------

The file 'gnu\autocnf2.57\djgpp\diffs' contains all the changes made
to the sources, to support DJGPP.

Here are the steps necessary to get from a autoconf 2.57 tarball
(autoconf-2.57.tar.gz) to a patched copy of the sources for DJGPP:

1. Extract the sources using the 'fnchange.lst' file: You will need
   the 'fnchange.lst' from the source distribution of autoconf 2.57
   for DJGPP.

    djtar -x -o gnu/autocnf2.57/djgpp/fnchange.lst -p \
        > /path/to/fnchange.lst

   (Type this as one line.) /path/to is some temporary directory,
   e.g.: /temp.

   Then extract the autoconf tarball using djtar:

    djtar -n /path/to/fnchange.lst -x /path/to/autoconf-2.57.tar.gz

2. Apply the DJGPP patch: You will need the file 'diffs' from
   the source distribution. Change into the autoconf 2.57
   source directory and apply the path:

    patch -Z -p7 -i diffs

3. Copy the 'djgpp' directory from the source distribution
   into the autoconf source directory. You can now build as directed
   in the section 'Rebuilding autoconf using the Source Distribution'
   above.

NB: The source distribution of the DJGPP port comes with all patches
applied and will build "out of the box" with Long Filenames. It may build
with Short Filenames.

Known Issues
------------

* Linking executables in AC_CONFIG_LINKS may not work as expected.
  AC_CONFIG_LINKS uses 'ln -s' to create links for executables.
  There is a problem because 'ln -s foo.exe bar' will create
  an executable called 'bar.exe', not 'bar'.

Tim van Holder writes:
"NOTE: None of the autoconf maintainers use DJGPP, so this version
of autoconf may still contain bugs related to its DJGPP support
that have not yet come out in the dozens of packages I've used it with.
Please send bug reports, so these issues can be resolved
in the next version."

Expected test suite results
---------------------------

Run the test suite like so:

    bash djgpp/runtests.sh

The test suite takes a long time to run. (On my Athlon 850MHz with 640MB
of memory it took around one and a half hours.)

This will produce four output files in the top-level directory
of the autoconf source tree:

* 001-050.log for tests 1-50;
* 051-100.log for tests 51-100;
* 101-150.log for tests 101-150;
* 151-end.log for tests 151-174.

All the tests should pass. See below for some reasons why some tests
might fail.

You can run individual tests from the test suite like so:

    cd tests
    ./testsuite 3-5 12

Finally
-------

Much of the work on this port was done by Tim van Holder, so many thanks
go out to him. Thanks also to Eli Zaretskii for his advice on how
to handle the config.{guess,sub} man pages with regards to short filenames.

Please direct any further discussions about this port
to comp.os.msdos.djgpp newsgroup (or write to its e-mail gateway
djgpp@delorie.com). I try to read the DJGPP newsgroup on a regular basis,
but also please feel free to contact me by e-mail (address below).

Regards,

Richard Dawe <rich@phekda.freeserve.co.uk> 2003-03-27
