+2003-08-01 Peter O'Gorman <peter@pogma.com>
+
+ * libtool.m4 (darwin): Use "-undefined dynamic_lookup" if the
+ user set MACOSX_DEPLOYMENT_TARGET to 10.3 or greater.
+ * libltdl/ltdl.c (dyld): Save the error from the first lookup
+ to report in lt_dlerror(). Otherwise the error is always
+ "Symbol _foo not in /usr/lib/libSystem.dylib".
+ Thanks to Chris Zubrzycki for reporting this.
+
2003-08-01 Robert Boehne <rboehne@gnu.org>
* libltdl/ltdl.h: Tweak the header to support visual studio.
NSSymbol *nssym = 0;
void *unused;
const struct mach_header *mh=NULL;
+ char saveError[256] = "Symbol not found";
if (module == (lt_module)-1)
{
_dyld_lookup_and_bind(symbol,(unsigned long*)&address,&unused);
}
if (!nssym)
{
+ strncpy(saveError, lt_int_dyld_error(LT_DLSTRERROR(SYMBOL_NOT_FOUND)), 255);
+ saveError[255] = 0;
if (!mh) mh=lt_int_dyld_get_mach_header_from_nsmodule(module);
nssym = lt_int_dyld_NSlookupSymbolInLinkedLibs(symbol,mh);
}
if (!nssym)
{
- LT_DLMUTEX_SETERROR (lt_int_dyld_error(LT_DLSTRERROR(SYMBOL_NOT_FOUND)));
+ LT_DLMUTEX_SETERROR (saveError);
return NULL;
}
return NSAddressOfSymbol(nssym);
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
;;
*) # Darwin 1.3 on
- test -z ${LD_TWOLEVEL_NAMESPACE} && _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
+ if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
+ else
+ case ${MACOSX_DEPLOYMENT_TARGET} in
+ 10.[[012]])
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
+ ;;
+ 10.*)
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined dynamic_lookup'
+ ;;
+ esac
+ fi
;;
esac
output_verbose_link_cmd='echo'
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
;;
*) # Darwin 1.3 on
- test -z ${LD_TWOLEVEL_NAMESPACE} && _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
+ if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
+ else
+ case ${MACOSX_DEPLOYMENT_TARGET} in
+ 10.[[012]])
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
+ ;;
+ 10.*)
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined dynamic_lookup'
+ ;;
+ esac
+ fi
;;
esac
lt_int_apple_cc_single_mod=no
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
;;
*) # Darwin 1.3 on
- test -z ${LD_TWOLEVEL_NAMESPACE} && _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
+ if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
+ else
+ case ${MACOSX_DEPLOYMENT_TARGET} in
+ 10.[[012]])
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
+ ;;
+ 10.*)
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined dynamic_lookup'
+ ;;
+ esac
+ fi
;;
esac
lt_int_apple_cc_single_mod=no