first changes towards dynamic loading in Darwin

git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@450 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
vsc 2002-04-23 14:37:56 +00:00
parent 13d72287f1
commit 39d89a2d91
3 changed files with 19 additions and 1 deletions

View File

@ -107,6 +107,15 @@
#define LOAD_SHL 1
#endif
#if defined(__MACH__) && defined(__APPLE__)
#ifdef NO_DYN
#undef NO_DYN
#endif
#ifndef LOAD_DL
#define LOAD_DL 1
#endif
#endif
extern char YapExecutable[];
extern char LoadMsg[];

View File

@ -49,6 +49,7 @@
#undef HAVE_CTYPE_H
#undef HAVE_DIRECT_H
#undef HAVE_DIRENT_H
#undef HAVE_DLFCN_H
#undef HAVE_ERRNO_H
#undef HAVE_FCNTL_H
#undef HAVE_FENV_H

View File

@ -452,6 +452,13 @@ case $target_os in
SHLIB_LD="ld -n32 -shared -rdata_shared"
INSTALL_DLLS=""
;;
*darwin*)
SHLIB_CFLAGS="-fno-common"
SHLIB_SUFFIX=".so"
DO_SECOND_LD=""
SHLIB_LD="cc -bundle -flat_namespace -undefined suppress"
INSTALL_DLLS=""
;;
*netbsd*|*freebsd*)
if echo __ELF__ | ${CC:-cc} -E - | grep -q __ELF__
then
@ -548,7 +555,8 @@ esac
dnl Checks for header files.
AC_HEADER_STDC
AC_HEADER_SYS_WAIT
AC_CHECK_HEADERS(arpa/inet.h ctype.h direct.h dirent.h errno.h fcntl.h)
AC_CHECK_HEADERS(arpa/inet.h ctype.h direct.h dirent.h dlfcn.h)
AC_CHECK_HEADERS(errno.h fcntl.h)
AC_CHECK_HEADERS(fenv.h fpu_control.h ieeefp.h io.h limits.h memory.h)
AC_CHECK_HEADERS(netdb.h netinet/in.h regex.h)
AC_CHECK_HEADERS(siginfo.h signal.h stdarg.h string.h stropts.h)