From 0a20226c6dfb94b1a2148b7afc03e4fa7156e684 Mon Sep 17 00:00:00 2001 From: David Shaw Date: Mon, 27 Oct 2003 12:46:18 +0000 Subject: [PATCH] * configure.ac (DLLIBS): Work properly on platforms where dlopen and friends are in libc instead of libdl. --- ChangeLog | 5 +++++ configure.ac | 13 ++++++++----- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2287ffccd..e9ad32131 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2003-10-27 David Shaw + + * configure.ac (DLLIBS): Work properly on platforms where dlopen + and friends are in libc instead of libdl. + 2003-10-21 Werner Koch * configure.ac (PRINTABLE_OS_NAME): Remove special case for The diff --git a/configure.ac b/configure.ac index f8b434a6a..62f0eba6d 100644 --- a/configure.ac +++ b/configure.ac @@ -518,18 +518,21 @@ else fi if test "$try_dynload" = yes ; then - AC_CHECK_FUNC(dlopen,,AC_CHECK_LIB(dl,dlopen,found_dlopen=yes)) + _dl_save_libs=$LIBS + LIBS="" + AC_SEARCH_LIBS(dlopen,dl,found_dlopen=yes) if test x"$found_dlopen" = "xyes" ; then AC_DEFINE(USE_DYNAMIC_LINKING,1,[define to enable the use of extensions]) AC_DEFINE(HAVE_DL_DLOPEN,1, [Defined when the dlopen function family is available]) - AC_SUBST(DLLIBS,"-ldl") + DLLIBS=$LIBS + else + AC_MSG_WARN([dlopen not found. Disabling extensions.]) fi -else - AC_MSG_CHECKING(for dynamic loading) - AC_MSG_RESULT(has been disabled) + LIBS=$_dl_save_libs fi +AC_SUBST(DLLIBS) dnl Checks for header files. AC_HEADER_STDC