Next: , Previous: , Up: Obsolete Constructs   [Contents][Index]


18.2 acconfig.h

In order to produce config.h.in, autoheader needs to build or to find templates for each symbol. Modern releases of Autoconf use AH_VERBATIM and AH_TEMPLATE (see Autoheader Macros), but in older releases a file, acconfig.h, contained the list of needed templates. autoheader copied comments and #define and #undef statements from acconfig.h in the current directory, if present. This file used to be mandatory if you AC_DEFINE any additional symbols.

Modern releases of Autoconf also provide AH_TOP and AH_BOTTOM if you need to prepend/append some information to config.h.in. Ancient versions of Autoconf had a similar feature: if ./acconfig.h contains the string ‘@TOP@’, autoheader copies the lines before the line containing ‘@TOP@’ into the top of the file that it generates. Similarly, if ./acconfig.h contains the string ‘@BOTTOM@’, autoheader copies the lines after that line to the end of the file it generates. Either or both of those strings may be omitted. An even older alternate way to produce the same effect in ancient versions of Autoconf is to create the files file.top (typically config.h.top) and/or file.bot in the current directory. If they exist, autoheader copies them to the beginning and end, respectively, of its output.

In former versions of Autoconf, the files used in preparing a software package for distribution were:

configure.ac --.   .------> autoconf* -----> configure
               +---+
[aclocal.m4] --+   `---.
[acsite.m4] ---'       |
                       +--> [autoheader*] -> [config.h.in]
[acconfig.h] ----.     |
                 +-----'
[config.h.top] --+
[config.h.bot] --'

Using only the AH_ macros, configure.ac should be self-contained, and should not depend upon acconfig.h etc.