SYNOPSIS
autoconf
is a package for creating Bourne shell scripts to
configure source code packages using templates and an `m4' macro
package.
HISTORY
Autoconf was written chiefly by David Mackenzie, with input
from many people, starting in 1991.
When this page was started in 1997,
the most recent releases (2.12 and 2.10) were used in hundreds of programs.
Like the Perl-based dist, autoconf
is essentially a library of useful tests that a developer can put
together to ask questions about a system to determine which features it has.
Both are customizable, but dist is not as widely used.
Autoconf is simpler, easier to learn.
I have been using autoconf since June 1994, when Kevin Buettner started
writing a configure script for
vile.
I started a script for my directory editor
ded.
at that time, as well.
Both of these scripts differ philosophically from autoconf's design.
The designer of autoconf decided that there should be two ways to
generate C-style definitions:
- as -D options in a makefile
- as substitions for #undef in a template header file (e.g., config.h).
Autoconf is not design-neutral;
sometimes this makes it awkward.
Kevin chose a third alternative for vile, which we have kept because the
first two options are unpalatable (the first because of tool limitations,
and the second because it imposes unnecessary work on the maintainers, and
maintaining the template is error-prone):
- generate the header file directly from the definitions that are
found during the configure process.
Since then, I've written simple configure scripts for several programs,
as well as more complex scripts for a few
(ncurses,
tin,
lynx,
xterm).
PATCHES
I find these patches useful:
- 971222
simplify the way we generate the config.h file.
This patch adds a parameter to AC_OUTPUT that tells it to use the
definitions that it has built up to directly substitute into the template
header, which can then be as simple as the single line
@DEFS@
The new parameter ("sort" or "cat") tells autoconf how to process
the generated definitions. I prefer to sort the definitions since it eases
comparison of headers for different platforms. Using "cat", will
generate the definitions in the order that the configure script defines them.
- 971222-emx
a patch from
Juan Jose Garcia Ripoll
<worm@arrakis.es>,
originally for autoconf 2.10, for an OS/2 EMX-specific version of autoconf.
- 971230
my own patch, for working around machines with limited environment space.
AC_DIVERT_HELP splits long help messages into smaller pieces, which are emitted
as a series of here-documents rather than attempt to keep their text in an
environment variable. I use this macro to replace logic in autoconf's
AC_ARG_ENABLE and AC_ARG_WITH, so it works without requiring you to change
your configure.in or aclocal.m4 files.
This introduces a minor incompatibility: generating the here-document
directly causes escaped quotes in the help-text to be displayed with
the spurious backslashes. Once you have converted to this macro, you
will probably want to cleanup the help message text.
- autoconf 2.13 20030927
This is the most recent version of the autoconf 2.13 patch.
- autoconf 2.13 20020210 EMX
This is the most recent version of the autoconf 2.13 patch for EMX.
- autoconf 2.52 20030208
This is a resync of the patch (not EMX) against autoconf 2.52 (lightly tested:
autoconf 2.5x introduces a number of incompatibilities with autoconf 2.13).
The patch also includes some fixes for minor bugs which were reported/ignored
on the autoconf mailing list.
Finally, it repairs some of the intentional incompatibilites.
- autoconf 2.57 20030810
Even more lightly tested -- having noticed some new autoconf defects as I
resync'd this patch, but unrelated to the patch.
Occasionally someone asks why I use autoconf 2.13 (actually the question
should be why I maintain configure scripts which are compatible with 2.13).
The autoconf group, rather than focusing on making a reliable product,
is using ongoing development as a basis for experimentation.
With some care, it is possible to construct configure.in files which
are compatible between 2.13 and 2.5x.
However, the standard response to reports of incompatibilities between
the two is to blame 2.13 for "bugs" (ostensibly for quoting issues,
but in fact on any issue without further analysis).
Here is a recap of recent autoconf versions and release dates:
- 2.59 (2003-11-06)
About nine months overdue (to repair 2.57).
Design flaws such as its interdependence with automake are still not addressed.
- 2.58 (2003-11-04)
Administrative blunder.
- 2.57 (2002-12-03)
Back up to beta quality!
Within a few weeks a handful of serious bugs were reported,
making it less useful than 2.52.
- 2.56 (2002-11-15)
Fixes an administrative blunder.
- 2.55
Dead on arrival.
- 2.54 (2002-09-13)
Do not use: it was not tested with other "make" programs than GNU make.
- 2.53 (2002-03-18)
Too many initial bug reports to bother with.
Features incomplete support for OS/2 EMX.
- 2.52 (2001-07-18)
Moderately stable (beta quality).
- 2.51 (2001-07-17)
Dead on arrival.
The changelog around 2.51 does not mention that the
associated config.guess/config.sub had a syntax error
(it wrote extra text to the output).
This was silently fixed in the 2.52 version.
- 2.50 (2001-05-21)
Do not use (alpha quality).
It is compatible with 2.13 only for trivial configure.in's
because the conventions for cached information were changed.
Generally the changelog of autoconf does not reflect the issues (serious
defects and incompatibilities) reported on their mailing list.