Backport 51895 & 51896 which define HAVE_DLOPEN/HAVE_DLERROR when configure
is run on an OS X system supporting them (everything >= 10.3). git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@51902 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
12
configure
vendored
12
configure
vendored
@@ -41048,9 +41048,7 @@ if test "$TOOLKIT" != "MSW" -a "$USE_OS2" != 1; then
|
||||
HAVE_DL_FUNCS=0
|
||||
HAVE_SHL_FUNCS=0
|
||||
if test "$wxUSE_DYNAMIC_LOADER" = "yes" -o "$wxUSE_DYNLIB_CLASS" = "yes" ; then
|
||||
if test "$USE_DARWIN" = 1; then
|
||||
HAVE_DL_FUNCS=1
|
||||
elif test "$USE_DOS" = 1; then
|
||||
if test "$USE_DOS" = 1; then
|
||||
HAVE_DL_FUNCS=0
|
||||
else
|
||||
|
||||
@@ -41421,7 +41419,7 @@ fi
|
||||
done
|
||||
|
||||
|
||||
if test "$HAVE_DL_FUNCS" = 1; then
|
||||
if test "$HAVE_DL_FUNCS" = 1; then
|
||||
|
||||
for ac_func in dlerror
|
||||
do
|
||||
@@ -41525,7 +41523,7 @@ _ACEOF
|
||||
|
||||
else
|
||||
|
||||
echo "$as_me:$LINENO: checking for dlerror in -ldl" >&5
|
||||
echo "$as_me:$LINENO: checking for dlerror in -ldl" >&5
|
||||
echo $ECHO_N "checking for dlerror in -ldl... $ECHO_C" >&6
|
||||
if test "${ac_cv_lib_dl_dlerror+set}" = set; then
|
||||
echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||
@@ -41600,7 +41598,11 @@ fi
|
||||
fi
|
||||
done
|
||||
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "$USE_DARWIN" = 1; then
|
||||
HAVE_DL_FUNCS=1
|
||||
fi
|
||||
|
||||
if test "$HAVE_DL_FUNCS" = 0; then
|
||||
|
27
configure.in
27
configure.in
@@ -5876,10 +5876,7 @@ if test "$TOOLKIT" != "MSW" -a "$USE_OS2" != 1; then
|
||||
HAVE_DL_FUNCS=0
|
||||
HAVE_SHL_FUNCS=0
|
||||
if test "$wxUSE_DYNAMIC_LOADER" = "yes" -o "$wxUSE_DYNLIB_CLASS" = "yes" ; then
|
||||
if test "$USE_DARWIN" = 1; then
|
||||
dnl dlopen/dlerror is implemented in dynlib.cpp for Darwin/Mac OS X
|
||||
HAVE_DL_FUNCS=1
|
||||
elif test "$USE_DOS" = 1; then
|
||||
if test "$USE_DOS" = 1; then
|
||||
HAVE_DL_FUNCS=0
|
||||
else
|
||||
dnl the test is a bit complicated because we check for dlopen() both with
|
||||
@@ -5913,15 +5910,21 @@ if test "$TOOLKIT" != "MSW" -a "$USE_OS2" != 1; then
|
||||
])
|
||||
])
|
||||
|
||||
dnl check also for dlerror()
|
||||
if test "$HAVE_DL_FUNCS" = 1; then
|
||||
AC_CHECK_FUNCS(dlerror,
|
||||
AC_DEFINE(HAVE_DLERROR),
|
||||
[
|
||||
AC_CHECK_LIB(dl, dlerror, AC_DEFINE(HAVE_DLERROR))
|
||||
]
|
||||
)
|
||||
dnl check also for dlerror()
|
||||
if test "$HAVE_DL_FUNCS" = 1; then
|
||||
AC_CHECK_FUNCS(dlerror,
|
||||
AC_DEFINE(HAVE_DLERROR),
|
||||
[
|
||||
AC_CHECK_LIB(dl, dlerror, AC_DEFINE(HAVE_DLERROR))
|
||||
]
|
||||
)
|
||||
fi
|
||||
fi
|
||||
|
||||
dnl Force HAVE_DL_FUNCS on for Darwin, even if the tests failed (e.g. pre-10.3)
|
||||
if test "$USE_DARWIN" = 1; then
|
||||
dnl dlopen/dlerror is implemented in dynlib.cpp for Darwin/Mac OS X
|
||||
HAVE_DL_FUNCS=1
|
||||
fi
|
||||
|
||||
if test "$HAVE_DL_FUNCS" = 0; then
|
||||
|
@@ -42,14 +42,15 @@ class WXDLLIMPEXP_BASE wxDynamicLibraryDetailsCreator;
|
||||
// native version, even if configure detected presence of DLOPEN.
|
||||
#if defined(__OS2__) || defined(__EMX__) || defined(__WINDOWS__)
|
||||
typedef HMODULE wxDllType;
|
||||
#elif defined(__DARWIN__)
|
||||
// Don't include dlfcn.h on Darwin, we may be using our own replacements.
|
||||
typedef void *wxDllType;
|
||||
#elif defined(HAVE_DLOPEN)
|
||||
#include <dlfcn.h>
|
||||
typedef void *wxDllType;
|
||||
#elif defined(HAVE_SHL_LOAD)
|
||||
#include <dl.h>
|
||||
typedef shl_t wxDllType;
|
||||
#elif defined(__DARWIN__)
|
||||
typedef void *wxDllType;
|
||||
#elif defined(__WXMAC__)
|
||||
#include <CodeFragments.h>
|
||||
typedef CFragConnectionID wxDllType;
|
||||
|
Reference in New Issue
Block a user