Go to the first, previous, next, last section, table of contents.


Generic Header Checks

These macros are used to find system header files not covered by the "particular" test macros. If you need to check the contents of a header as well as find out whether it is present, you have to write your own test for it (see section Writing Tests).

Macro: AC_CHECK_HEADER (header-file, @ovar{action-if-found}, @ovar{action-if-not-found}, @ovar{includes})
If the system header file header-file is usable, execute shell commands action-if-found, otherwise execute action-if-not-found. If you just want to define a symbol if the header file is available, consider using AC_CHECK_HEADERS instead.

The meaning of "usable" depends upon the content of includes:

if includes is empty
check whether
header-file
can be preprocessed without error.
if include is set
Check whether
includes
#include <header-file>
can be compiled without error. You may use AC_CHECK_HEADER (and AC_CHECK_HEADERS) to check whether two headers are compatible.

You may pass any kind of dummy content for includes, such as a single space, a comment, to check whether header-file compiles with success.

Macro: AC_CHECK_HEADERS (header-file..., @ovar{action-if-found}, @ovar{action-if-not-found}, @ovar{includes})
For each given system header file header-file in the whitespace-separated argument list that exists, define HAVE_header-file (in all capitals). If action-if-found is given, it is additional shell code to execute when one of the header files is found. You can give it a value of `break' to break out of the loop on the first match. If action-if-not-found is given, it is executed when one of the header files is not found.

Be sure to read the documentation of AC_CHECK_HEADER to understand the influence of includes.


Go to the first, previous, next, last section, table of contents.