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


Generic Function Checks

These macros are used to find functions not covered by the particular test macros. If the functions might be in libraries other than the default C library, first call AC_CHECK_LIB for those libraries. If you need to check the behavior of a function 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_FUNC (function, [action-if-found [, action-if-not-found]])
If C function function is available, run shell commands action-if-found, otherwise action-if-not-found. If you just want to define a symbol if the function is available, consider using AC_CHECK_FUNCS instead. This macro checks for functions with C linkage even when AC_LANG_CPLUSPLUS has been called, since C++ is more standardized than C is. (see section Language Choice, for more information about selecting the language for checks.)

Macro: AC_CHECK_FUNCS (function... [, action-if-found [, action-if-not-found]])
For each given function in the whitespace-separated argument list that is available, define HAVE_function (in all capitals). If action-if-found is given, it is additional shell code to execute when one of the functions 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 functions is not found.

Macro: AC_REPLACE_FUNCS (function...)
Like calling AC_CHECK_FUNCS using an action-if-not-found that adds `function.o' to the value of the output variable LIBOBJS. You can declare a function for which your replacement version is used by enclosing the prototype in `#ifndef HAVE_function'. If the system has the function, it probably declares it in a header file you should be including, so you shouldn't redeclare it, lest your declaration conflict.


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