manpagez: man pages & more
info autoconf
Home | html | info | man

File: autoconf.info,  Node: Autoheader Macros,  Prev: autoheader Invocation,  Up: Configuration Headers

4.9.3 Autoheader Macros
-----------------------

‘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 template for a SYMBOL is created by ‘autoheader’ from the
DESCRIPTION argument to an ‘AC_DEFINE’; see *note Defining Symbols::.

   For special needs, you can use the following macros.

 -- Macro: AH_TEMPLATE (KEY, DESCRIPTION)
     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([NULL_DEVICE],
            [Name of the file to open to get
             a null file, or a data sink.])

     generates the following template, with the description properly
     justified.

          /* Name of the file to open to get a null file, or a data sink. */
          #undef NULL_DEVICE

 -- Macro: AH_VERBATIM (KEY, TEMPLATE)
     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 a symbol that can be defined via
     ‘AC_DEFINE’.

 -- Macro: AH_TOP (TEXT)
     Include TEXT at the top of the header template file.

 -- Macro: AH_BOTTOM (TEXT)
     Include TEXT at the bottom of the header template file.

   Please note that TEXT gets included "verbatim" to the template file,
not to the resulting config header, so it can easily get mangled when
the template is processed.  There is rarely a need for something other
than

     AH_BOTTOM([#include ])

© manpagez.com 2000-2024
Individual documents may contain additional copyright information.