Add -ldl library if needed for dladdr()
It's possible for the dlopen() check to succeed without -ldl, but the dladdr() check fails without it. This happens with GCC's -fsanitize=address.
This commit is contained in:
7
configure
vendored
7
configure
vendored
@@ -33302,7 +33302,7 @@ if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
|
||||
$as_echo "#define HAVE_DLOPEN 1" >>confdefs.h
|
||||
|
||||
HAVE_DL_FUNCS=1
|
||||
DL_LINK="-ldl $DL_LINK"
|
||||
DL_LINK="-ldl"
|
||||
|
||||
fi
|
||||
|
||||
@@ -33360,7 +33360,10 @@ fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dladdr" >&5
|
||||
$as_echo "$ac_cv_lib_dl_dladdr" >&6; }
|
||||
if test "x$ac_cv_lib_dl_dladdr" = xyes; then :
|
||||
$as_echo "#define HAVE_DLADDR 1" >>confdefs.h
|
||||
|
||||
$as_echo "#define HAVE_DLADDR 1" >>confdefs.h
|
||||
|
||||
DL_LINK="-ldl"
|
||||
|
||||
fi
|
||||
|
||||
|
@@ -5565,7 +5565,7 @@ if test "$TOOLKIT" != "MSW"; then
|
||||
[
|
||||
AC_DEFINE(HAVE_DLOPEN)
|
||||
HAVE_DL_FUNCS=1
|
||||
DL_LINK="-ldl $DL_LINK"
|
||||
DL_LINK="-ldl"
|
||||
])
|
||||
])
|
||||
|
||||
@@ -5574,7 +5574,11 @@ if test "$TOOLKIT" != "MSW"; then
|
||||
AC_CHECK_FUNCS(dladdr,
|
||||
AC_DEFINE(HAVE_DLADDR),
|
||||
[
|
||||
AC_CHECK_LIB(dl, dladdr, AC_DEFINE(HAVE_DLADDR))
|
||||
AC_CHECK_LIB(dl, dladdr,
|
||||
[
|
||||
AC_DEFINE(HAVE_DLADDR)
|
||||
DL_LINK="-ldl"
|
||||
])
|
||||
]
|
||||
)
|
||||
fi
|
||||
|
Reference in New Issue
Block a user