autoconf: Introduction
1
1 1 Introduction
1 **************
1
1 A physicist, an engineer, and a computer scientist were discussing the
1 nature of God. "Surely a Physicist," said the physicist, "because
1 early in the Creation, God made Light; and you know, Maxwell's
1 equations, the dual nature of electromagnetic waves, the relativistic
1 consequences..." "An Engineer!," said the engineer, "because
1 before making Light, God split the Chaos into Land and Water; it takes a
1 hell of an engineer to handle that big amount of mud, and orderly
1 separation of solids from liquids..." The computer scientist
1 shouted: "And the Chaos, where do you think it was coming from, hmm?"
1
1 --Anonymous
1
1 Autoconf is a tool for producing shell scripts that automatically
1 configure software source code packages to adapt to many kinds of
1 Posix-like systems. The configuration scripts produced by Autoconf are
1 independent of Autoconf when they are run, so their users do not need
1 to have Autoconf.
1
1 The configuration scripts produced by Autoconf require no manual user
1 intervention when run; they do not normally even need an argument
1 specifying the system type. Instead, they individually test for the
1 presence of each feature that the software package they are for might
1 need. (Before each check, they print a one-line message stating what
1 they are checking for, so the user doesn't get too bored while waiting
1 for the script to finish.) As a result, they deal well with systems
1 that are hybrids or customized from the more common Posix variants.
1 There is no need to maintain files that list the features supported by
1 each release of each variant of Posix.
1
1 For each software package that Autoconf is used with, it creates a
1 configuration script from a template file that lists the system features
1 that the package needs or can use. After the shell code to recognize
1 and respond to a system feature has been written, Autoconf allows it to
1 be shared by many software packages that can use (or need) that feature.
1 If it later turns out that the shell code needs adjustment for some
1 reason, it needs to be changed in only one place; all of the
1 configuration scripts can be regenerated automatically to take advantage
1 of the updated code.
1
1 Those who do not understand Autoconf are condemned to reinvent it,
1 poorly. The primary goal of Autoconf is making the _user's_ life
1 easier; making the _maintainer's_ life easier is only a secondary goal.
1 Put another way, the primary goal is not to make the generation of
1 `configure' automatic for package maintainers (although patches along
1 that front are welcome, since package maintainers form the user base of
1 Autoconf); rather, the goal is to make `configure' painless, portable,
1 and predictable for the end user of each "autoconfiscated" package.
1 And to this degree, Autoconf is highly successful at its goal -- most
1 complaints to the Autoconf list are about difficulties in writing
1 Autoconf input, and not in the behavior of the resulting `configure'.
1 Even packages that don't use Autoconf will generally provide a
1 `configure' script, and the most common complaint about these
1 alternative home-grown scripts is that they fail to meet one or more of
11 the GNU Coding Standards (⇒Configuration
(standards)Configuration.) that users have come to expect from
1 Autoconf-generated `configure' scripts.
1
1 The Metaconfig package is similar in purpose to Autoconf, but the
1 scripts it produces require manual user intervention, which is quite
1 inconvenient when configuring large source trees. Unlike Metaconfig
1 scripts, Autoconf scripts can support cross-compiling, if some care is
1 taken in writing them.
1
1 Autoconf does not solve all problems related to making portable
1 software packages--for a more complete solution, it should be used in
1 concert with other GNU build tools like Automake and Libtool. These
1 other tools take on jobs like the creation of a portable, recursive
1 makefile with all of the standard targets, linking of shared libraries,
1 and so on. ⇒The GNU Build System, for more information.
1
1 Autoconf imposes some restrictions on the names of macros used with
1 `#if' in C programs (⇒Preprocessor Symbol Index).
1
1 Autoconf requires GNU M4 version 1.4.6 or later in order to generate
1 the scripts. It uses features that some versions of M4, including GNU
1 M4 1.3, do not have. Autoconf works better with GNU M4 version 1.4.14
1 or later, though this is not required.
1
1 ⇒Autoconf 1, for information about upgrading from version 1.
1 ⇒History, for the story of Autoconf's development. ⇒FAQ,
1 for answers to some common questions about Autoconf.
1
1 See the Autoconf web page (http://www.gnu.org/software/autoconf/)
1 for up-to-date information, details on the mailing lists, pointers to a
1 list of known bugs, etc.
1
1 Mail suggestions to the Autoconf mailing list <autoconf@gnu.org>.
1 Past suggestions are archived
1 (http://lists.gnu.org/archive/html/autoconf/).
1
1 Mail bug reports to the Autoconf Bugs mailing list
1 <bug-autoconf@gnu.org>. Past bug reports are archived
1 (http://lists.gnu.org/archive/html/bug-autoconf/).
1
1 If possible, first check that your bug is not already solved in
1 current development versions, and that it has not been reported yet.
1 Be sure to include all the needed information and a short
1 `configure.ac' that demonstrates the problem.
1
1 Autoconf's development tree is accessible via `git'; see the
1 Autoconf Summary (http://savannah.gnu.org/projects/autoconf/) for
1 details, or view the actual repository
1 (http://git.sv.gnu.org/gitweb/?p=autoconf.git). Anonymous CVS access
1 is also available, see `README' for more details. Patches relative to
1 the current `git' version can be sent for review to the Autoconf
1 Patches mailing list <autoconf-patches@gnu.org>, with discussion on
1 prior patches archived
1 (http://lists.gnu.org/archive/html/autoconf-patches/); and all commits
1 are posted in the read-only Autoconf Commit mailing list
1 <autoconf-commit@gnu.org>, which is also archived
1 (http://lists.gnu.org/archive/html/autoconf-commit/).
1
1 Because of its mission, the Autoconf package itself includes only a
1 set of often-used macros that have already demonstrated their
1 usefulness. Nevertheless, if you wish to share your macros, or find
1 existing ones, see the Autoconf Macro Archive
1 (http://www.gnu.org/software/autoconf-archive/), which is kindly run by
1 Peter Simons <simons@cryp.to>.
1