The GNU Build System, also known as the Autotools, is a suite of programming tools designed to assist in making source code packages portable to many Unix-like systems.
It can be difficult to make a software program portable: the C compiler differs from system to system; certain library functions are missing on some systems; header files may have different names. One way to handle this is to write conditional code, with code blocks selected by means of preprocessor directives (#ifdef
); but because of the wide variety of build environments this approach quickly becomes unmanageable. Autotools is designed to address this problem more manageably.
Autotools is part of the GNU toolchain and is widely used in many free software and open source packages. Its component tools are free software-licensed under the GNU General Public License with special license exceptions permitting its use with proprietary software.
The GNU Build System makes it possible to build many programs using a two-step process: configure followed by make.
Autotools consists of the GNU utility programs , Automake, and Libtool. Other related tools frequently used alongside it include GNU's make program, GNU gettext, pkg-config, and the GNU Compiler Collection, also called GCC.
generates a configure
script based on the contents of a configure.ac
file which characterizes a particular body of source code. The configure
script, when run, scans the build environment and generates a subordinate config.status
script which, in turn, converts other input files and most commonly Makefile.in
into output files (Makefile
) which are appropriate for that build environment. Finally the make
program uses Makefile
to generate executable programs from source code.