diff --git a/configure.in b/configure.in index b4951573a5e3..664004889131 100644 --- a/configure.in +++ b/configure.in @@ -3408,11 +3408,9 @@ case $target in *-os2*) ;; *) - AC_CHECK_LIB(m, atan) - AC_CHECK_LIB(dl, dlopen, - AC_CHECK_HEADER(dlfcn.h, - LIBS="-ldl $LIBS" - AC_DEFINE(HAVE_LIBDL))) + AC_SEARCH_LIBS(dlopen, dl, + AC_CHECK_HEADER(dlfcn.h, + AC_DEFINE(HAVE_DLOPEN))) ;; esac diff --git a/js/src/configure.in b/js/src/configure.in index 619fd104123b..36b920810244 100644 --- a/js/src/configure.in +++ b/js/src/configure.in @@ -3140,11 +3140,9 @@ case $target in *-os2*) ;; *) - AC_CHECK_LIB(m, atan) - AC_CHECK_LIB(dl, dlopen, - AC_CHECK_HEADER(dlfcn.h, - LIBS="-ldl $LIBS" - AC_DEFINE(HAVE_LIBDL))) + AC_SEARCH_LIBS(dlopen, dl, + AC_CHECK_HEADER(dlfcn.h, + AC_DEFINE(HAVE_DLOPEN))) ;; esac diff --git a/memory/jemalloc/jemalloc.c b/memory/jemalloc/jemalloc.c index c46af272177d..cacebb1b3da0 100644 --- a/memory/jemalloc/jemalloc.c +++ b/memory/jemalloc/jemalloc.c @@ -6348,7 +6348,7 @@ _malloc_postfork(void) */ /******************************************************************************/ -#ifdef HAVE_LIBDL +#ifdef HAVE_DLOPEN # include #endif diff --git a/xpcom/base/nsStackWalk.cpp b/xpcom/base/nsStackWalk.cpp index bac8fc27cabb..391333771d6e 100644 --- a/xpcom/base/nsStackWalk.cpp +++ b/xpcom/base/nsStackWalk.cpp @@ -1137,7 +1137,7 @@ NS_FormatCodeAddressDetails(void *aPC, const nsCodeAddressDetails *aDetails, #define __USE_GNU #endif -#if defined(HAVE_LIBDL) || defined(XP_MACOSX) +#if defined(HAVE_DLOPEN) || defined(XP_MACOSX) #include #endif diff --git a/xpcom/base/nsTraceRefcntImpl.cpp b/xpcom/base/nsTraceRefcntImpl.cpp index 6e4060d8913f..9f8bb2794865 100644 --- a/xpcom/base/nsTraceRefcntImpl.cpp +++ b/xpcom/base/nsTraceRefcntImpl.cpp @@ -69,7 +69,7 @@ #include "mozilla/BlockingResourceBase.h" -#ifdef HAVE_LIBDL +#ifdef HAVE_DLOPEN #include #endif @@ -730,7 +730,7 @@ static void InitTraceLog(void) if (defined) { gLogToLeaky = PR_TRUE; PRFuncPtr p = nsnull, q = nsnull; -#ifdef HAVE_LIBDL +#ifdef HAVE_DLOPEN { PRLibrary *lib = nsnull; p = PR_FindFunctionSymbolAndLibrary("__log_addref", &lib);