GNU Info

Info Node: (autoconf.info)Examining Declarations

(autoconf.info)Examining Declarations


Next: Examining Syntax Prev: Writing Tests Up: Writing Tests
Enter node , (file) or (file)node

Examining Declarations
======================

   The macro `AC_TRY_CPP' is used to check whether particular header
files exist.  You can check for one at a time, or more than one if you
need several header files to all exist for some purpose.

 - Macro: AC_TRY_CPP (INCLUDES, [ACTION-IF-TRUE [, ACTION-IF-FALSE]])
     INCLUDES is C or C++ `#include' statements and declarations, on
     which shell variable, backquote, and backslash substitutions are
     performed.  (Actually, it can be any C program, but other
     statements are probably not useful.)  If the preprocessor produces
     no error messages while processing it, run shell commands
     ACTION-IF-TRUE.  Otherwise run shell commands ACTION-IF-FALSE.

     This macro uses `CPPFLAGS', but not `CFLAGS', because `-g', `-O',
     etc. are not valid options to many C preprocessors.

   Here is how to find out whether a header file contains a particular
declaration, such as a typedef, a structure, a structure member, or a
function.  Use `AC_EGREP_HEADER' instead of running `grep' directly on
the header file; on some systems the symbol might be defined in another
header file that the file you are checking `#include's.

 - Macro: AC_EGREP_HEADER (PATTERN, HEADER-FILE, ACTION-IF-FOUND [,
          ACTION-IF-NOT-FOUND])
     If the output of running the preprocessor on the system header file
     HEADER-FILE matches the `egrep' regular expression PATTERN,
     execute shell commands ACTION-IF-FOUND, otherwise execute
     ACTION-IF-NOT-FOUND.

   To check for C preprocessor symbols, either defined by header files
or predefined by the C preprocessor, use `AC_EGREP_CPP'.  Here is an
example of the latter:

     AC_EGREP_CPP(yes,
     [#ifdef _AIX
       yes
     #endif
     ], is_aix=yes, is_aix=no)

 - Macro: AC_EGREP_CPP (PATTERN, PROGRAM, [ACTION-IF-FOUND [,
          ACTION-IF-NOT-FOUND]])
     PROGRAM is the text of a C or C++ program, on which shell
     variable, backquote, and backslash substitutions are performed.
     If the output of running the preprocessor on PROGRAM matches the
     `egrep' regular expression PATTERN, execute shell commands
     ACTION-IF-FOUND, otherwise execute ACTION-IF-NOT-FOUND.

     This macro calls `AC_PROG_CPP' or `AC_PROG_CXXCPP' (depending on
     which language is current, Note: Language Choice), if it hasn't
     been called already.


automatically generated by info2www version 1.2.2.9