Go to the first, previous, next, last section, table of contents.


A physicist, an engineer, and a computer scientist were
discussing the nature of God.  Surely a Physicist, said the
physicist, because early in the Creation, God made Light; and you
know, Maxwell's equations, the dual nature of electro-magnetic
waves, the relativist consequences... An Engineer!, said the
engineer, because before making Light, God split the Chaos into
Land and Water; it takes a hell of an engineer to handle that big
amount of mud, and orderly separation of solids from
liquids... The computer scientist shouted: And the Chaos,
where do you think it was coming from, hmm?


Autoconf is a tool for producing shell scripts that automatically configure software source code packages to adapt to many kinds of UNIX-like systems. The configuration scripts produced by Autoconf are independent of Autoconf when they are run, so their users do not need to have Autoconf.

The configuration scripts produced by Autoconf require no manual user intervention when run; they do not normally even need an argument specifying the system type. Instead, they test for the presence of each feature that the software package they are for might need individually. (Before each check, they print a one-line message stating what they are checking for, so the user doesn't get too bored while waiting for the script to finish.) As a result, they deal well with systems that are hybrids or customized from the more common UNIX variants. There is no need to maintain files that list the features supported by each release of each variant of UNIX.

For each software package that Autoconf is used with, it creates a configuration script from a template file that lists the system features that the package needs or can use. After the shell code to recognize and respond to a system feature has been written, Autoconf allows it to be shared by many software packages that can use (or need) that feature. If it later turns out that the shell code needs adjustment for some reason, it needs to be changed in only one place; all of the configuration scripts can be regenerated automatically to take advantage of the updated code.

The Metaconfig package is similar in purpose to Autoconf, but the scripts it produces require manual user intervention, which is quite inconvenient when configuring large source trees. Unlike Metaconfig scripts, Autoconf scripts can support cross-compiling, if some care is taken in writing them.

There are several jobs related to making portable software packages that Autoconf currently does not do. Among these are automatically creating `Makefile' files with all of the standard targets, and supplying replacements for standard library functions and header files on systems that lack them. Work is in progress to add those features in the future.

Autoconf imposes some restrictions on the names of macros used with #ifdef in C programs (see section Preprocessor Symbol Index).

Autoconf requires GNU m4 in order to generate the scripts. It uses features that some UNIX versions of m4 do not have. It also overflows internal limits of some versions of m4, including GNU m4 1.0. You must use version 1.1 or later of GNU m4. Using version 1.3 or later will be much faster than 1.1 or 1.2.

See section Upgrading From Version 1, for information about upgrading from version 1. See section History of Autoconf, for the story of Autoconf's development. See section Questions About Autoconf, for answers to some common questions about Autoconf.

Mail suggestions and bug reports for Autoconf to [email protected]. Please include the Autoconf version number, which you can get by running `autoconf --version'.

Go to the first, previous, next, last section, table of contents.