GNU Info

Info Node: (autoconf.info)Generic Functions

(autoconf.info)Generic Functions


Prev: Particular Functions Up: Library Functions
Enter node , (file) or (file)node

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 (Note:
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.  (Note: 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.


automatically generated by info2www version 1.2.2.9