about summary refs log tree commit diff
path: root/zshconfig.ac
diff options
context:
space:
mode:
authorOliver Kiddle <opk@users.sourceforge.net>2001-10-10 16:02:24 +0000
committerOliver Kiddle <opk@users.sourceforge.net>2001-10-10 16:02:24 +0000
commit4d1d676dbaf674ed713ae3ecc3afee216d77e00b (patch)
treebca901c8ff8d18134874a7aba42d873a229471c4 /zshconfig.ac
parenta9d36386d1d7708ca2a3a4815aa68cc9f0925be7 (diff)
downloadzsh-4d1d676dbaf674ed713ae3ecc3afee216d77e00b.tar.gz
zsh-4d1d676dbaf674ed713ae3ecc3afee216d77e00b.tar.xz
zsh-4d1d676dbaf674ed713ae3ecc3afee216d77e00b.zip
enable dynamic libraries on MacOS X is the dlcompat library is installed
Diffstat (limited to 'zshconfig.ac')
-rw-r--r--zshconfig.ac12
1 files changed, 10 insertions, 2 deletions
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 <fcntl.h>
@@ -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}"