Library Files
=============
The following macros check for the presence of certain C, C++ or
Fortran 77 library archive files.
- Macro: AC_CHECK_LIB (LIBRARY, FUNCTION [, ACTION-IF-FOUND [,
ACTION-IF-NOT-FOUND [, OTHER-LIBRARIES]]])
Depending on the current language(Note: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 add `-lLIBRARY' to `LIBS' and
define `HAVE_LIBLIBRARY' (in all capitals).
If linking with LIBRARY results in unresolved symbols, which would
be resolved by linking with additional libraries, give those
libraries as the OTHER-LIBRARIES argument, separated by spaces:
`-lXt -lX11'. Otherwise this macro will fail to detect that
LIBRARY is present, because linking the test program will always
fail with unresolved symbols.
- Macro: AC_HAVE_LIBRARY (LIBRARY, [, ACTION-IF-FOUND [,
ACTION-IF-NOT-FOUND [, OTHER-LIBRARIES]]])
This macro is equivalent to calling `AC_CHECK_LIB' with a FUNCTION
argument of `main'. In addition, LIBRARY can be written as any of
`foo', `-lfoo', or `libfoo.a'. In all of those cases, the
compiler is passed `-lfoo'. However, LIBRARY can not be a shell
variable; it must be a literal name. This macro is considered
obsolete.
- Macro: AC_SEARCH_LIBS (FUNCTION, SEARCH-LIBS [, ACTION-IF-FOUND [,
ACTION-IF-NOT-FOUND [, OTHER-LIBRARIES]]])
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.
If the function is found, run ACTION-IF-FOUND, otherwise run
ACTION-IF-NOT-FOUND.
If linking with LIBRARY results in unresolved symbols, which would
be resolved by linking with additional libraries, give those
libraries as the OTHER-LIBRARIES argument, separated by spaces:
`-lXt -lX11'. Otherwise this macro will fail to detect that
FUNCTION is present, because linking the test program will always
fail with unresolved symbols.
- Macro: AC_SEARCH_LIBS (FUNCTION, SEARCH-LIBS[, ACTION-IF-FOUND [,
ACTION-IF-NOT-FOUND]])
This macro is equivalent to calling `AC_TRY_LINK_FUNC' once for
each library listed in SEARCH-LIBS. Add `-lLIBRARY' to `LIBS' for
the first library found to contain FUNCTION, and execute
ACTION-IF-FOUND. Otherwise execute ACTION-IF-NOT-FOUND.