Node:Autoheader Macros, Previous:autoheader Invocation, Up:Configuration Headers
autoheader
scans configure.ac
and figures out which C
preprocessor symbols it might define. It knows how to generate
templates for symbols defined by AC_CHECK_HEADERS
,
AC_CHECK_FUNCS
etc., but if you AC_DEFINE
any additional
symbol, you must define a template for it. If there are missing
templates, autoheader
fails with an error message.
The simplest way to create a template for a symbol is to supply
the description argument to an AC_DEFINE(symbol)
; see
Defining Symbols. You may also use one of the following macros.
AH_VERBATIM (key, template) | Macro |
Tell autoheader to include the template as-is in the header
template file. This template is associated with the key,
which is used to sort all the different templates and guarantee their
uniqueness. It should be the symbol that can be AC_DEFINE 'd.
For example:
AH_VERBATIM([_GNU_SOURCE], [/* Enable GNU extensions on systems that have them. */ #ifndef _GNU_SOURCE # define _GNU_SOURCE #endif]) |
AH_TEMPLATE (key, description) | Macro |
Tell autoheader to generate a template for key. This macro
generates standard templates just like AC_DEFINE when a
description is given.
For example:
AH_TEMPLATE([CRAY_STACKSEG_END], [Define to one of _getb67, GETB67, getb67 for Cray-2 and Cray-YMP systems. This function is required for alloca.c support on those systems.]) will generate the following template, with the description properly
justified.
/* Define to one of _getb67, GETB67, getb67 for Cray-2 and Cray-YMP systems. This function is required for alloca.c support on those systems. */ #undef CRAY_STACKSEG_END |
AH_TOP (text) | Macro |
Include text at the top of the header template file. |
AH_BOTTOM (text) | Macro |
Include text at the bottom of the header template file. |