MacOSX dl patches by ROberto Chinnini
git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@644 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
parent
a721ad3e27
commit
f7f3da7704
@ -75,7 +75,9 @@
|
|||||||
#ifdef NO_DYN
|
#ifdef NO_DYN
|
||||||
#undef NO_DYN
|
#undef NO_DYN
|
||||||
#endif
|
#endif
|
||||||
|
#if !HAVE_DLOPEN
|
||||||
#define LOAD_DYLD 1
|
#define LOAD_DYLD 1
|
||||||
|
#endif
|
||||||
#endif /* LOAD_DYLD */
|
#endif /* LOAD_DYLD */
|
||||||
|
|
||||||
extern char LoadMsg[];
|
extern char LoadMsg[];
|
||||||
|
72
configure
vendored
72
configure
vendored
@ -855,6 +855,7 @@ Optional Features:
|
|||||||
--enable-use-malloc use malloc to allocate memory
|
--enable-use-malloc use malloc to allocate memory
|
||||||
--enable-condor allow Yap to be used from condor
|
--enable-condor allow Yap to be used from condor
|
||||||
--enable-april compile Yap to support April ILP system
|
--enable-april compile Yap to support April ILP system
|
||||||
|
--enable-dlcompat use dlcompat library for dynamic loading on Mac OS X
|
||||||
|
|
||||||
Optional Packages:
|
Optional Packages:
|
||||||
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
|
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
|
||||||
@ -2172,6 +2173,14 @@ else
|
|||||||
use_april=no
|
use_april=no
|
||||||
fi;
|
fi;
|
||||||
|
|
||||||
|
# Check whether --enable-dlcompat or --disable-dlcompat was given.
|
||||||
|
if test "${enable_dlcompat+set}" = set; then
|
||||||
|
enableval="$enable_dlcompat"
|
||||||
|
use_dlcompat="$enableval"
|
||||||
|
else
|
||||||
|
use_dlcompat=no
|
||||||
|
fi;
|
||||||
|
|
||||||
|
|
||||||
# Check whether --with-gmp or --without-gmp was given.
|
# Check whether --with-gmp or --without-gmp was given.
|
||||||
if test "${with_gmp+set}" = set; then
|
if test "${with_gmp+set}" = set; then
|
||||||
@ -4701,6 +4710,69 @@ fi
|
|||||||
INSTALL_DLLS=""
|
INSTALL_DLLS=""
|
||||||
;;
|
;;
|
||||||
*darwin*)
|
*darwin*)
|
||||||
|
if test ${use_dlcompat} = yes
|
||||||
|
then
|
||||||
|
echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
|
||||||
|
echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
|
||||||
|
if test "${ac_cv_lib_dl_dlopen+set}" = set; then
|
||||||
|
echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||||
|
else
|
||||||
|
ac_check_lib_save_LIBS=$LIBS
|
||||||
|
LIBS="-ldl $LIBS"
|
||||||
|
cat >conftest.$ac_ext <<_ACEOF
|
||||||
|
#line $LINENO "configure"
|
||||||
|
#include "confdefs.h"
|
||||||
|
|
||||||
|
/* Override any gcc2 internal prototype to avoid an error. */
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C"
|
||||||
|
#endif
|
||||||
|
/* We use char because int might match the return type of a gcc2
|
||||||
|
builtin and then its argument prototype would still apply. */
|
||||||
|
char dlopen ();
|
||||||
|
int
|
||||||
|
main ()
|
||||||
|
{
|
||||||
|
dlopen ();
|
||||||
|
;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
_ACEOF
|
||||||
|
rm -f conftest.$ac_objext conftest$ac_exeext
|
||||||
|
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
|
||||||
|
(eval $ac_link) 2>&5
|
||||||
|
ac_status=$?
|
||||||
|
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||||
|
(exit $ac_status); } &&
|
||||||
|
{ ac_try='test -s conftest$ac_exeext'
|
||||||
|
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||||
|
(eval $ac_try) 2>&5
|
||||||
|
ac_status=$?
|
||||||
|
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||||
|
(exit $ac_status); }; }; then
|
||||||
|
ac_cv_lib_dl_dlopen=yes
|
||||||
|
else
|
||||||
|
echo "$as_me: failed program was:" >&5
|
||||||
|
cat conftest.$ac_ext >&5
|
||||||
|
ac_cv_lib_dl_dlopen=no
|
||||||
|
fi
|
||||||
|
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
|
||||||
|
LIBS=$ac_check_lib_save_LIBS
|
||||||
|
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
|
||||||
|
have_dl=yes
|
||||||
|
|
||||||
|
else
|
||||||
|
have_dl=no
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test ${have_dl} = yes
|
||||||
|
then
|
||||||
|
LIBS="$LIBS -ldl"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
SHLIB_CFLAGS="-fno-common"
|
SHLIB_CFLAGS="-fno-common"
|
||||||
SHLIB_SUFFIX=".so"
|
SHLIB_SUFFIX=".so"
|
||||||
DO_SECOND_LD=""
|
DO_SECOND_LD=""
|
||||||
|
15
configure.in
15
configure.in
@ -58,6 +58,10 @@ AC_ARG_ENABLE(condor,
|
|||||||
AC_ARG_ENABLE(april,
|
AC_ARG_ENABLE(april,
|
||||||
[ --enable-april compile Yap to support April ILP system],
|
[ --enable-april compile Yap to support April ILP system],
|
||||||
use_april="$enableval", use_april=no)
|
use_april="$enableval", use_april=no)
|
||||||
|
|
||||||
|
AC_ARG_ENABLE(dlcompat,
|
||||||
|
[ --enable-dlcompat use dlcompat library for dynamic loading on Mac OS X],
|
||||||
|
use_dlcompat="$enableval", use_dlcompat=no)
|
||||||
|
|
||||||
AC_ARG_WITH(gmp,
|
AC_ARG_WITH(gmp,
|
||||||
[ --with-gmp[=DIR] use GNU Multiple Precision in DIR],
|
[ --with-gmp[=DIR] use GNU Multiple Precision in DIR],
|
||||||
@ -515,6 +519,17 @@ dnl Linux has both elf and a.out, in this case we found elf
|
|||||||
INSTALL_DLLS=""
|
INSTALL_DLLS=""
|
||||||
;;
|
;;
|
||||||
*darwin*)
|
*darwin*)
|
||||||
|
if test ${use_dlcompat} = yes
|
||||||
|
then
|
||||||
|
AC_CHECK_LIB(dl,dlopen,
|
||||||
|
have_dl=yes
|
||||||
|
,
|
||||||
|
have_dl=no)
|
||||||
|
if test ${have_dl} = yes
|
||||||
|
then
|
||||||
|
LIBS="$LIBS -ldl"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
SHLIB_CFLAGS="-fno-common"
|
SHLIB_CFLAGS="-fno-common"
|
||||||
SHLIB_SUFFIX=".so"
|
SHLIB_SUFFIX=".so"
|
||||||
DO_SECOND_LD=""
|
DO_SECOND_LD=""
|
||||||
|
Reference in New Issue
Block a user