René Nyffenegger's collection of things on the web
René Nyffenegger on Oracle - Most wanted - Feedback -

./configure, automake, autoconf and the like

Source code (especially C/C++) must be compiled differently on different platforms. Aggravating is the fact that some (library-) functions are not present on all platform (for example gettimeofday). This poses problems if the same source code is to be compiled on different platforms.
In order to tackle this problem, GNU proposes a two step build mechanism involving configure, autoconf, automake and the like.
Essentially, it boils down to a standard build process for a program like so:
make install
Invoking configure creates a config.status file, which is a shell script. config.status is used to convert into the Makefile. config.status also turnes into config.h
./configure also creates a config.cache file. config.cache should be removed if is significantely changed.
Lastly, ./configure creates a file.
On the installer machine, nothing more than a bourne shell, a c compiler and a make programm are needed.
The programmer additionally needs the autoconf package, the automake package and m4.
configure's behaviour can be changed through its options.


autoscan can be used to create a configure.scan file which can be used as a starting point for a file. is a simple specification of a project's build requirements that will be turned into a fully fledged Makefile.
A typical has the form
Most assigns values to the following variables:
  • bin_PROGRAMMS ??? see below
    This variable defines a list of programs to be installed in the $(prefix)/bin directory.
  • check_PROGRAMS
    Lists the programs that are needed to run make check
    Lists the programs that are run make check Because those programs sometimes need to be built themselves, usually one wants to write
    TESTS = $(check_PROGRAMS)
Additionally, for each program, the following variables must be assigned to:
  • prog_SOURCES
  • prog_LDADD
  • prog_LDFLAGS
For each library, the following variables must be assigned to:
  • lib{library_name}_SOURCES
  • lib{library_name}_LDFLAGS
  • lib{library_name}_DEPENDENCIES

Super targets

    ??? see above
  • bin_SCRIPTS
  • man_MANS
  • noinst_PROGRAMMS


Usually, the Makefile is generated by ./configure from



acconfig.h is the file out of which is generated. (or, see AM_CONFIG_HEADER) is the file out of which config.h is generated.
autoheader can be used to create an initial




Use this file when something went wrong with ./configure.


config.status is a shell script that may be used to recreate the current configuration. That is, all generated files will be regenerated.
Can also be used with recheck

How they interact

On this page is a dot generated graphic that illustrates (or at least: tries to) how the tools interact and which files they produce.


Small example