autoconf: Autoheader Macros
1
1 4.9.3 Autoheader Macros
1 -----------------------
1
1 `autoheader' scans `configure.ac' and figures out which C preprocessor
1 symbols it might define. It knows how to generate templates for
1 symbols defined by `AC_CHECK_HEADERS', `AC_CHECK_FUNCS' etc., but if
1 you `AC_DEFINE' any additional symbol, you must define a template for
1 it. If there are missing templates, `autoheader' fails with an error
1 message.
1
1 The template for a SYMBOL is created by `autoheader' from the
1 DESCRIPTION argument to an `AC_DEFINE'; see ⇒Defining Symbols.
1
1 For special needs, you can use the following macros.
1
1 -- Macro: AH_TEMPLATE (KEY, DESCRIPTION)
1 Tell `autoheader' to generate a template for KEY. This macro
1 generates standard templates just like `AC_DEFINE' when a
1 DESCRIPTION is given.
1
1 For example:
1
1 AH_TEMPLATE([CRAY_STACKSEG_END],
1 [Define to one of _getb67, GETB67, getb67
1 for Cray-2 and Cray-YMP systems. This
1 function is required for alloca.c support
1 on those systems.])
1
1 generates the following template, with the description properly
1 justified.
1
1 /* Define to one of _getb67, GETB67, getb67 for Cray-2 and
1 Cray-YMP systems. This function is required for alloca.c
1 support on those systems. */
1 #undef CRAY_STACKSEG_END
1
1 -- Macro: AH_VERBATIM (KEY, TEMPLATE)
1 Tell `autoheader' to include the TEMPLATE as-is in the header
1 template file. This TEMPLATE is associated with the KEY, which is
1 used to sort all the different templates and guarantee their
1 uniqueness. It should be a symbol that can be defined via
1 `AC_DEFINE'.
1
1 -- Macro: AH_TOP (TEXT)
1 Include TEXT at the top of the header template file.
1
1 -- Macro: AH_BOTTOM (TEXT)
1 Include TEXT at the bottom of the header template file.
1
1 Please note that TEXT gets included "verbatim" to the template file,
1 not to the resulting config header, so it can easily get mangled when
1 the template is processed. There is rarely a need for something other
1 than
1
1 AH_BOTTOM([#include <custom.h>])
1