]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
sim: support dlopen in -lc
authorMike Frysinger <vapier@gentoo.org>
Thu, 7 Dec 2023 03:28:40 +0000 (20:28 -0700)
committerMike Frysinger <vapier@gentoo.org>
Thu, 7 Dec 2023 03:56:29 +0000 (20:56 -0700)
Stop assuming that dlopen is only available via -ldl.  Newer versions
of glibc have merged it into -lc which broke this configure test.

sim/configure
sim/m4/sim_ac_platform.m4

index a7a914ad2c3b8ee1e9515008b4983bc7b5b06022..79a21e8be642f8d49b62afbf5d6342e0afb6d0d4 100755 (executable)
@@ -12915,7 +12915,7 @@ if test "$ac_res" != no; then :
 
 fi
 
-if test "${ac_cv_lib_dl_dlopen}" = "yes"; then
+if test "${ac_cv_search_dlopen}" = "none required" || test "${ac_cv_lib_dl_dlopen}" = "yes"; then
 
 pkg_failed=no
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdl2" >&5
index 7331ef3a38c5d8cffdf2d9b7e4bec484abe5e1d3..f45321763fa7487f586c4723720d7dbbb1afb3cf 100644 (file)
@@ -151,7 +151,7 @@ AC_SEARCH_LIBS([fabs], [m])
 AC_SEARCH_LIBS([log2], [m])
 
 AC_SEARCH_LIBS([dlopen], [dl])
-if test "${ac_cv_lib_dl_dlopen}" = "yes"; then
+if test "${ac_cv_search_dlopen}" = "none required" || test "${ac_cv_lib_dl_dlopen}" = "yes"; then
   PKG_CHECK_MODULES(SDL, sdl2, [dnl
     SDL_CFLAGS="${SDL_CFLAGS} -DHAVE_SDL=2"
   ], [