Generated by GPT-5-mini| Autoconf | |
|---|---|
| Name | Autoconf |
| Developer | GNU Project; originally by David Mackenzie, maintained by GNU Automake/Free Software Foundation |
| Released | 1991 |
| Programming language | Perl, m4 |
| Operating system | Unix, Linux, macOS, FreeBSD, OpenBSD, NetBSD, Solaris |
| Genre | Build automation tool |
| License | GNU General Public License |
Autoconf is a build configuration tool that generates portable shell scripts to configure software packages for diverse POSIX-compatible systems. It integrates with other GNU build tools to detect system features, generate configure scripts, and standardize package installation across Unix-like platforms. Widely used in free software projects, Autoconf facilitates portability for projects originating from contributors associated with organizations such as the Free Software Foundation, Debian Project, and Red Hat.
Autoconf emerged in the early 1990s amid portability efforts led by developers connected to Richard Stallman and the GNU Project. Initial releases coincided with contemporaneous tools from projects like Berkeley Software Distribution-derived systems and commercial Unix vendors, influencing portability practices adopted by Linux kernel ancillary projects and distributions such as Debian and Red Hat Enterprise Linux. Key contributors include figures from Free Software Foundation initiatives and developers who later worked on related projects in the Open Source Initiative community. The tool evolved alongside standards like POSIX.1, IEEE 1003.1-1990, and later revisions such as POSIX.1-2001, responding to feature discrepancies among Solaris, HP-UX, AIX, and BSD variants.
Autoconf uses m4 macro processing and Perl scripts to transform package-maintainer-authored templates into a single portable shell script, configure. Its design promotes separation of build policy from package source via files such as configure.ac and aclocal.m4, aligning with philosophies advocated by contributors to projects hosted at GNU Savannah and mirrors on SourceForge. Features include test suites for header availability, function presence, and library symbol detection; generated scripts commonly probe libc variants, linker behaviors on glibc versus musl, and platform-specific headers from X.Org implementations. Autoconf's macro language interoperates with macros drawn from distributions like Debian, packaging policies from Linux Standard Base, and macros maintained by individuals affiliated with Red Hat and Canonical.
Typical workflow begins with maintainers editing configure.ac, invoking aclocal to collect macros, then running autoconf to produce configure; integration steps involve automake and libtool from projects connected to GNU Automake and GNU Libtool. Packagers for distributions including Fedora, Ubuntu, Gentoo, Arch Linux and OpenSUSE often adjust generated configure scripts to satisfy policies from release engineering teams at Red Hat or Debian Project. Continuous integration systems used by organizations like Travis CI, GitHub Actions, and Jenkins run configure on matrixes spanning FreeBSD, NetBSD, macOS, and Windows Subsystem for Linux to ensure portability across compilers such as GCC, Clang, and proprietary compilers from Oracle Corporation.
Core files include configure.ac and aclocal.m4, with macro archives maintained in /usr/share/aclocal on many distributions; macro collections are curated by maintainers associated with GNU projects and packagers in ecosystems like Homebrew and MacPorts. Autoconf provides standard macros named AC_INIT, AC_CONFIG_HEADERS, and AC_PROG_CC that encapsulate tests similar to checks documented by standards bodies such as ISO/IEC committees. Third-party macro sets and macro repositories are published by individuals and organizations active within communities centered on Debian Developer and Linux Foundation projects, and are often included in source trees for projects hosted on GitLab or GitHub.
Autoconf targets compatibility across a wide array of systems including Linux, BSD, and proprietary Unix variants like AIX and Solaris. It addresses differences in system libraries (for example, GNU C Library versus vendor libc), linker flags used by ld implementations, and header layouts found in X11 and Wayland stacks. Portability testing often involves build farms maintained by organizations such as OpenBuildService and continuous integration offered by cloud providers like Amazon Web Services and Microsoft Azure to validate builds on architectures including x86-64, ARM, PowerPC, and s390x.
Critics affiliated with projects in the Free Software and Open Source communities argue that Autoconf's reliance on generated shell scripts and the m4 language introduces complexity compared to newer tools championed by communities around CMake, Meson, and Bazel. Port maintainers for distributions like NixOS and Guix note challenges in hermetic builds and reproducibility linked to implicit environment tests, echoing concerns raised by developers at Google and Facebook about large monolithic configure scripts. Documentation and macro hygiene have been subject to debate in mailing lists hosted by GNU Savannah and issue trackers on GitHub where contributors from Canonical and Red Hat frequent.
Autoconf commonly integrates with GNU Automake, GNU Libtool, pkg-config, and toolchains including GCC and Clang. Ecosystem tools and alternatives include CMake, Meson, SCons, Bazel, and QMake used by projects within organizations such as KDE, GNOME, and Apache Software Foundation. Packaging systems interacting with Autoconf-generated scripts include RPM and Debian package tooling maintained by Red Hat and Debian Project contributors; continuous integration and build services like Travis CI, GitHub Actions, and OpenBuildService provide environments to test configured builds. Community resources and tutorials are often published by developers active in Free Software Foundation and hosted on platforms such as GitHub and GitLab.