summaryrefslogtreecommitdiff
path: root/sim/m4
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2022-11-03 15:21:12 +0700
committerMike Frysinger <vapier@gentoo.org>2022-11-04 07:42:31 +0700
commit051081585e40a3145028cda8e2a16c010a33ebe9 (patch)
treeef84660e5f90d87488111b75ced092cdd45ee52a /sim/m4
parent49ea4303bf1248e422b2858a22e085e25ac34a9d (diff)
downloadbinutils-gdb-051081585e40a3145028cda8e2a16c010a33ebe9.tar.gz
sim: build: change AC_CHECK_LIB to AC_SEARCH_LIBS
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.
Diffstat (limited to 'sim/m4')
-rw-r--r--sim/m4/sim_ac_platform.m410
1 files changed, 5 insertions, 5 deletions
diff --git a/sim/m4/sim_ac_platform.m4 b/sim/m4/sim_ac_platform.m4
index 92fb00a3d79..74ac7fe14d4 100644
--- a/sim/m4/sim_ac_platform.m4
+++ b/sim/m4/sim_ac_platform.m4
@@ -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"