Updated 2012-01-10 13:07:50 by RLE

"Autoconf is an extensible package of m4 macros that produce shell scripts to automatically configure software source code packages," according to its official home page [1]. But it really is ... for the purpose of ...

autoconf acts on configure.in to generate configure.

Quote from the Tcl/Tk Engineering Manual [2]:

Use Autoconf

The GNU autoconf program provides a powerful way to configure your code for different systems. With autoconf you write a script called configure.in that describes the porting issues for your software in terms of particular features that are needed and what to do if they aren't present. Before creating a release of your software you run autoconf, which processes configure.in and generates a shell script called configure. You then include configure with your distribution.

When it is time to install the distribution on a particular system, the installer runs the configure script. configure pokes around in the system to find out what features are present, then it modifies the Makefile accordingly. The modifications typically consist of compiling additional files to substitute for missing procedures, or setting compiler flags that can be used for conditional compilation in the code.

Use of libtool [3] is not recommended; it tends to inhibit porting to anything other than fairly conventional UNIX platforms.

This [4] "Compile-Howto" usefully introduces autoconf.

[5] explains "The Autoconf Language". Particularly useful is the explanation of [brackets], which seem to behave very much as {braces} do in Tcl.

drh describes "Using Autoconf With Mktclapp" [6].

"Stop the autoconf insanity! Why we need a new build system." [7]

[Refer to TIP 34?]

Helpful tip: autoconf 2.5 (ick!) has a habit of creating a subdirectory called "autom4te.cache" each time it's run. The purpose of this directory is supposedly to make subsequent autoconf runs go faster; but in practice it mostly seems to just make subsequent autoconf runs do the wrong thing because of stale data.

To make autoconf 2.5 (ick!) stop doing that, create a ".autom4te.cfg" file in your home directory containing the following lines:
 begin-language: "Autoconf"
 args: --no-cache
 end-language: "Autoconf"

Introduction to GNU Build Tools [8]. This article discussions autoscan, automake, aclocal, autoconf.

Autoconf, Automake, and Libtool online book: [9]

Dr. Dobbs article on autoconf [10].

Unrestrained but reasonably-informed comments on auto* tools: [11]

autosetup [12] is a pure-Tcl replacement for autoconf