mirror of
https://github.com/znc/znc.git
synced 2026-05-18 07:15:54 +02:00
configure: Fix dlopen() detection
The 'appendLib -ldl' is the important part, autoconf doesn't do that automatically if you give it an argument. This bug only triggered with --disable-debug (libssl pulled in libdl). git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1057 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
@@ -3564,6 +3564,12 @@ fi
|
||||
|
||||
if test "$MODULES" = "yes"; then
|
||||
FOUND_DL=no
|
||||
|
||||
# Don't use any libs like -lssl -lcrypto when checking for dlopen(),
|
||||
# because they might change the test results
|
||||
SAVED_LIBS="$LIBS"
|
||||
LIBS=""
|
||||
|
||||
{ echo "$as_me:$LINENO: checking for dlopen" >&5
|
||||
echo $ECHO_N "checking for dlopen... $ECHO_C" >&6; }
|
||||
if test "${ac_cv_func_dlopen+set}" = set; then
|
||||
@@ -3711,10 +3717,12 @@ fi
|
||||
{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
|
||||
echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; }
|
||||
if test $ac_cv_lib_dl_dlopen = yes; then
|
||||
FOUND_DL=yes
|
||||
FOUND_DL=yes ; appendLib -ldl
|
||||
fi
|
||||
|
||||
|
||||
appendLib "$SAVED_LIBS"
|
||||
|
||||
if test $FOUND_DL = "no" ; then
|
||||
{ { echo "$as_me:$LINENO: error: Could not find dlopen. Try --disable-modules" >&5
|
||||
echo "$as_me: error: Could not find dlopen. Try --disable-modules" >&2;}
|
||||
|
||||
+9
-1
@@ -137,8 +137,16 @@ AC_ARG_WITH( [module-data-prefix],
|
||||
|
||||
if test "$MODULES" = "yes"; then
|
||||
FOUND_DL=no
|
||||
|
||||
# Don't use any libs like -lssl -lcrypto when checking for dlopen(),
|
||||
# because they might change the test results
|
||||
SAVED_LIBS="$LIBS"
|
||||
LIBS=""
|
||||
|
||||
AC_CHECK_FUNC(dlopen, FOUND_DL=yes,)
|
||||
AC_CHECK_LIB( dl, dlopen, FOUND_DL=yes,)
|
||||
AC_CHECK_LIB( dl, dlopen, FOUND_DL=yes ; appendLib -ldl,)
|
||||
|
||||
appendLib "$SAVED_LIBS"
|
||||
|
||||
if test $FOUND_DL = "no" ; then
|
||||
AC_ERROR([Could not find dlopen. Try --disable-modules])
|
||||
|
||||
Reference in New Issue
Block a user