Product SiteDocumentation Site

4.3.2. Configuration Script

The most crucial function of Autotools is the creation of the configure script. This script tests systems for tools, input files, and other features it can use in order to build the project [2]. The configure script generates a Makefile which allows the make tool to build the project based on the system configuration.
To create the configure script, create an input file and feed it to an Autotools utility to create theconfigure script. This input file is typically configure.ac or Makefile.am; the former is usually processed by autoconf, while the latter is fed to automake.
If a Makefile.am input file is available, the automake utility creates a Makefile template (i.e. Makefile. in), which may refer to information collected at configuration time. For example, the Makefile may need to link to a particular library if and only if that library is already installed. When the configure script runs, automake will use the Makefile. in templates to create a Makefile.
If a configure.ac file is available instead, then autoconf will automatically create the configure script based on the macros invoked by configure.ac. To create a preliminary configure.ac, use the autoscan utility and edit the file accordingly.


[2] For information about tests that configure can perform, refer to the following link: