Autotools
By GNU Project
Autotools is a suite of GNU build tools, principally Autoconf, Automake, and Libtool, used to generate portable `configure` scripts and Makefiles for Unix-like software projects. It lets a project's build system automatically detect the…
Definition
Autotools is a suite of GNU build tools, principally Autoconf, Automake, and Libtool, used to generate portable `configure` scripts and Makefiles for Unix-like software projects. It lets a project's build system automatically detect the compilers, libraries, and system quirks of the machine it is being built on, so the same source tree can compile across a wide range of Unix and Unix-like platforms without manual reconfiguration.
Overview
Autotools exists to solve the portability problem that plagued early Unix software: a program that compiled cleanly on one vendor's Unix might fail on another because of differences in available headers, library names, compiler flags, or system calls. Rather than asking developers to hand-write conditional logic for every platform quirk, Autotools generates a self-contained `configure` shell script that probes the target machine at build time and produces a Makefile tailored to what it finds. Mechanically, a developer writes high-level declarations in `configure.ac` (processed by Autoconf) describing what the build needs to check for, such as required headers, library functions, or compiler capabilities, and in `Makefile.am` (processed by Automake) describing what to build. Running `autoreconf` expands these into a portable, dependency-free `configure` script and full `Makefile.in` templates. End users then run the familiar `./configure && make && make install` sequence, during which `configure` runs its checks and emits a working Makefile without needing Autotools installed itself, only a POSIX shell. Autotools sits at the older, more battle-tested end of the build-tool spectrum, contrasted with newer, faster systems like CMake and Meson that use their own build description languages and generate build files more directly rather than shell-script probing. Compared to Bazel, which emphasizes hermetic, reproducible builds and large monorepos, Autotools targets the opposite case: single-tree, POSIX-portable C/C++ projects with modest dependency graphs. In practice, Autotools remains the build system behind a large share of long-running GNU and open-source Unix software, including core utilities and libraries that predate or coexist alongside newer build tools, precisely because its generated `configure` scripts run on virtually any Unix-like system without extra installed dependencies. Maintainers write and update `configure.ac` and `Makefile.am` files, then regenerate the shipped `configure` script as part of releasing a source tarball, so downstream users never need Autotools itself. The tooling has a reputation for a steep learning curve, since Autoconf's macro language (M4) and the layered relationship between Autoconf, Automake, and Libtool are unintuitive to newcomers, and build times and generated script size can be larger than newer alternatives. Many new C and C++ projects today choose CMake or Meson instead for faster configuration and more approachable syntax, while Autotools continues to dominate in legacy codebases and projects prioritizing maximum portability to older or unusual Unix variants. Rewriting a mature Autotools-based project onto a newer build system also carries real risk, since decades of accumulated platform-specific checks in `configure.ac` often encode institutional knowledge about obscure system quirks that is easy to lose in a rushed migration.
Key Features
- Generates portable configure scripts requiring only a POSIX shell
- Autoconf handles feature and dependency detection at configure time
- Automake generates standards-compliant Makefiles from simple templates
- Libtool abstracts platform differences in building shared libraries
- Produced configure scripts run without Autotools installed on target
- Long track record across decades of Unix and GNU software
- Supports cross-compilation through standard configure host/target flags
- Integrates with standard install conventions like DESTDIR and prefix