autoconf(1)
Generates a shell script that automatically configures software source code packages.
Synopsis
autoconf [OPTION]... [TEMPLATE-FILE]Description
autoconf is a tool for producing shell scripts that automatically configure software source code packages. It takes a template file (usually configure.ac or configure.in) containing macro calls that describe the software package's features and generates a portable configure shell script.
The generated configure script probes the system to detect available features, compiler capabilities, and installed libraries, then creates a Makefile and config.h header file tailored to the build environment. This eliminates the need to manually edit Makefiles for different platforms.
autoconf is typically used as part of the GNU Autotools suite (autoconf, automake, libtool) to create maintainable, portable build systems.
Common options
| Flag | What it does |
|---|---|
-h, --help | Display help message and exit |
-V, --version | Print autoconf version number and exit |
-v, --verbose | Verbosely report processing steps |
-d, --debug | Don't remove temporary files; show shell trace during execution |
-f, --force | Consider all files obsolete and regenerate configure |
-o FILE, --output=FILE | Write output to FILE instead of configure |
-W CATEGORY, --warnings=CATEGORY | Report warnings for specified category (syntax, cross, deprecated) |
-I DIR | Append DIR to macro search path |
Examples
Generate configure script from configure.ac in current directory; output is written to stdout
autoconfGenerate configure script and save directly to a file named configure
autoconf -o configureForce regeneration of configure script, treating input files as modified even if they haven't changed
autoconf -fAdd /usr/local/share/aclocal to macro search path before standard directories
autoconf -I /usr/local/share/aclocalGenerate configure script with all warnings enabled (syntax, cross, deprecated, etc.)
autoconf -W allProcess configure.ac with verbose output to see each macro being processed
autoconf -v configure.acRun in debug mode to see the generated shell script commands (use for troubleshooting)
autoconf -d 2>&1 | head -20