[4/5] sim: build: change AC_CHECK_LIB to AC_SEARCH_LIBS
Commit Message
With more C libraries moving functions entirely into the main -lc,
change the AC_CHECK_LIB calls to AC_SEARCH_LIBS so we look in there
first and avoid extra linkage when possible.
---
sim/config.h.in | 12 --
sim/configure | 235 +++++++++++++++++++++++---------------
sim/m4/sim_ac_platform.m4 | 10 +-
3 files changed, 150 insertions(+), 107 deletions(-)
@@ -145,12 +145,12 @@ AC_TYPE_UID_T
LT_INIT
dnl Libraries.
-AC_CHECK_LIB(socket, bind)
-AC_CHECK_LIB(nsl, gethostbyname)
-AC_CHECK_LIB(m, fabs)
-AC_CHECK_LIB(m, log2)
+AC_SEARCH_LIBS([bind], [socket])
+AC_SEARCH_LIBS([gethostbyname], [nsl])
+AC_SEARCH_LIBS([fabs], [m])
+AC_SEARCH_LIBS([log2], [m])
-AC_CHECK_LIB(dl, dlopen)
+AC_SEARCH_LIBS([dlopen], [dl])
if test "${ac_cv_lib_dl_dlopen}" = "yes"; then
PKG_CHECK_MODULES(SDL, sdl2, [dnl
SDL_CFLAGS="${SDL_CFLAGS} -DHAVE_SDL=2"