GNU Info

Info Node: (autoconf.info)Libraries

(autoconf.info)Libraries


Next: Library Functions Prev: Files Up: Existing Tests
Enter node , (file) or (file)node

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 prepend `-lLIBRARY' to `LIBS'
     and define `HAVE_LIBLIBRARY' (in all capitals). This macro is
     intended to support building of `LIBS' in a right-to-left
     (least-dependent to most-dependent) fashion such that library
     dependencies are satisfied as a natural side-effect of consecutive
     tests. Some linkers are very sensitive to library ordering so the
     order in which `LIBS' is generated is important to reliable
     detection of libraries.

     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. `-lXt -lX11'.  Otherwise, this macro will fail to detect that
     LIBRARY is present, because linking the test program will always
     fail with unresolved symbols. The OTHER-LIBRARIES argument should
     be limited to cases where it is desirable to test for one library
     in the presence of another that is not already in `LIBS'.

 - 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.

     Add `-lLIBRARY' to `LIBS' for the first library found to contain
     FUNCTION, and run ACTION-IF-FOUND.  If the function is not found,
     run ACTION-IF-NOT-FOUND.

     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. `-lXt -lX11'.  Otherwise, this macro will fail to detect that
     FUNCTION is present, because linking the test program will always
     fail with unresolved symbols.


automatically generated by info2www version 1.2.2.9