Node:Libraries, Next:Library Functions, Previous:Files, Up:Existing Tests
The following macros check for the presence of certain C, C++ or Fortran 77 library archive files.
AC_CHECK_LIB (library, function, [action-if-found], [action-if-not-found], [other-libraries]) | Macro |
Depending on the current language(see Language Choice), try to
ensure that the C, C++, or Fortran 77 function function is
available by checking whether a test program can be linked with the
library library to get the function. library is the base
name of the library; e.g., to check for -lmp , use mp as
the library argument.
action-if-found is a list of shell commands to run if the link
with the library succeeds; action-if-not-found is a list of shell
commands to run if the link fails. If action-if-found is not
specified, the default action will prepend If linking with library results in unresolved symbols that would
be resolved by linking with additional libraries, give those libraries
as the other-libraries argument, separated by spaces:
e.g. |
AC_SEARCH_LIBS (function, search-libs, [action-if-found], [action-if-not-found], [other-libraries]) | Macro |
Search for a library defining function if it's not already
available. This equates to calling AC_TRY_LINK_FUNC first
with no libraries, then for each library listed in search-libs.
Add If linking with library results in unresolved symbols that would
be resolved by linking with additional libraries, give those libraries
as the other-libraries argument, separated by spaces:
e.g. |