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:
David Elliott
2008-02-19 00:25:05 +00:00
parent c842c9c98b
commit 136e8c5ca0
3 changed files with 25 additions and 19 deletions

View File

@@ -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