Page MenuHomeClusterLabs Projects

Use AC_SEARCH_LIBS instead of AC_CHECK_LIB in configure.ac
Closed (Merged)Public

Assigned To
Authored By
kgaillot
Sep 16 2024, 12:36 PM
Tags
  • Restricted Project
  • Restricted Project
  • Restricted Project
Referenced Files
None
Subscribers

Description

From https://www.gnu.org/software/autoconf/manual/autoconf-2.70/html_node/Libraries.html: "AC_CHECK_LIB requires some care in usage, and should be avoided in some common cases. Many standard functions like gethostbyname appear in the standard C library on some hosts, and in special libraries like nsl on other hosts. On some hosts the special libraries contain variant implementations that you may not want to use. These days it is normally better to use AC_SEARCH_LIBS([gethostbyname], [nsl]) instead of AC_CHECK_LIB([nsl], [gethostbyname])."