From 4d1d676dbaf674ed713ae3ecc3afee216d77e00b Mon Sep 17 00:00:00 2001 From: Oliver Kiddle Date: Wed, 10 Oct 2001 16:02:24 +0000 Subject: enable dynamic libraries on MacOS X is the dlcompat library is installed --- zshconfig.ac | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'zshconfig.ac') diff --git a/zshconfig.ac b/zshconfig.ac index a3442e4be..c573359d9 100644 --- a/zshconfig.ac +++ b/zshconfig.ac @@ -1576,7 +1576,7 @@ elif test "$host_os" = cygwin; then MOD_IMPORT_VARIABLE="__attribute__((__dllimport__))" MOD_IMPORT_FUNCTION= elif test "x$dynamic" = xyes; then - AC_CACHE_CHECK(if your system use ELF binaries, + AC_CACHE_CHECK(if your system uses ELF binaries, zsh_cv_sys_elf, [AC_TRY_RUN([/* Test for whether ELF binaries are produced */ #include @@ -1623,6 +1623,10 @@ char *argv[]; esac DLLDARG="${LDARG}" ;; + *darwin*) + DLLD="${DLLD=$CC}" + DLLDARG="" + ;; * ) DLLD="${DLLD=ld}" DLLDARG="" @@ -1630,7 +1634,10 @@ char *argv[]; esac fi if test -n "$GCC"; then - DLCFLAGS="${DLCFLAGS=-fPIC}" + case "$host_os" in + darwin*) DLCFLAGS="${DLCFLAGS=-fno-common}" ;; + *) DLCFLAGS="${DLCFLAGS=-fPIC}" ;; + esac else case "$host_os" in hpux*) DLCFLAGS="${DLCFLAGS=+z}" ;; @@ -1646,6 +1653,7 @@ char *argv[]; netbsd*) DLLDFLAGS="${DLLDFLAGS=${DLLDARG}-x -shared --whole-archive}" ;; aix*) DLLDFLAGS="${DLLDFLAGS=-G -bexpall -lc}" ;; solaris*|sysv4*|esix*) DLLDFLAGS="${DLLDFLAGS=-G}" ;; + darwin*) DLLDFLAGS="${DLLDFLAGS=-bundle -flat_namespace -undefined suppress}" ;; openbsd*) if test $zsh_cv_sys_elf = yes; then DLLDFLAGS="${DLLDFLAGS=-shared -fPIC}" -- cgit 1.4.1