autoconf

"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 [L1 ]. But it really is ... for the purpose of ...


autoconf acts on configure.in to generate configure.


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

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 [L3 ] is not recommended; it tends to inhibit porting to anything other than fairly conventional UNIX platforms.


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

[L5 ] 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" [L6 ].


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


[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 [L8 ]. This article discussions autoscan, automake, aclocal, autoconf.

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

Dr. Dobbs article on autoconf [L10 ].


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

autosetup is a pure-Tcl replacement for autoconf