macosx and shared libraries

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@5379 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
master
Jacques Garrigue 2003-01-09 12:01:51 +00:00
parent 71409b5604
commit c86d5f231d
1 changed files with 15 additions and 16 deletions

31
configure vendored
View File

@ -492,25 +492,14 @@ if test $withsharedlibs = "yes"; then
mksharedlibrpath="-rpath "
shared_libraries_supported=true;;
powerpc-apple-darwin*)
if sh ./hasgot $dl_defs -i dlfcn.h; then
mksharedlib="cc -bundle -flat_namespace -undefined suppress -o"
bytecccompopts="$dl_defs $bytecccompopts"
#sharedcccompopts="-fnocommon"
dl_needs_underscore=true
shared_libraries_supported=true;
fi
;;
mksharedlib="cc -bundle -flat_namespace -undefined suppress -o"
bytecccompopts="$dl_defs $bytecccompopts"
#sharedcccompopts="-fnocommon"
dl_needs_underscore=true
shared_libraries_supported=true;;
esac
fi
if $shared_libraries_supported; then
echo "Dynamic loading of shared libraries is supported."
echo "#define SUPPORT_DYNAMIC_LINKING" >> s.h
if $dl_needs_underscore; then
echo '#define DL_NEEDS_UNDERSCORE' >>s.h
fi
fi
# Further machine-specific hacks
case "$host" in
@ -950,6 +939,16 @@ elif sh ./hasgot $dllib dlopen; then
elif sh ./hasgot $dllib -ldl dlopen; then
echo "dlopen() found in -ldl."
dllib="$dllib -ldl"
else
shared_libraries_supported=no
fi
if $shared_libraries_supported; then
echo "Dynamic loading of shared libraries is supported."
echo "#define SUPPORT_DYNAMIC_LINKING" >> s.h
if $dl_needs_underscore; then
echo '#define DL_NEEDS_UNDERSCORE' >>s.h
fi
fi
if sh ./hasgot -i sys/types.h -i sys/mman.h && sh ./hasgot mmap munmap; then