From: Mike Frysinger Date: Thu, 7 Dec 2023 03:28:40 +0000 (-0700) Subject: sim: support dlopen in -lc X-Git-Tag: binutils-2_42~686 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=708aee5ec64bea2c84449f63f3cdaa6d2b0b5892;p=thirdparty%2Fbinutils-gdb.git sim: support dlopen in -lc Stop assuming that dlopen is only available via -ldl. Newer versions of glibc have merged it into -lc which broke this configure test. --- diff --git a/sim/configure b/sim/configure index a7a914ad2c3..79a21e8be64 100755 --- a/sim/configure +++ b/sim/configure @@ -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 diff --git a/sim/m4/sim_ac_platform.m4 b/sim/m4/sim_ac_platform.m4 index 7331ef3a38c..f45321763fa 100644 --- a/sim/m4/sim_ac_platform.m4 +++ b/sim/m4/sim_ac_platform.m4 @@ -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" ], [