summaryrefslogtreecommitdiff
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
parenta9d36386d1d7708ca2a3a4815aa68cc9f0925be7 (diff)
downloadzsh-4d1d676dbaf674ed713ae3ecc3afee216d77e00b.tar.gz
zsh-4d1d676dbaf674ed713ae3ecc3afee216d77e00b.zip
enable dynamic libraries on MacOS X is the dlcompat library is installed
-rw-r--r--ChangeLog6
-rw-r--r--Etc/MACHINES6
-rw-r--r--Test/C02cond.ztst1
-rw-r--r--acconfig.h2
-rw-r--r--zshconfig.ac12
5 files changed, 23 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 9523f9b60..fc6b18392 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2001-10-10 Oliver Kiddle <opk@zsh.org>
+
+ * 16xxx: acconfig.h, zshconfig.ac, Etc/MACHINES,
+ Test/C02cond.ztst: allow dynamic loading to work on MacOS X
+ if the dlcompat library is installed.
+
2001-10-10 Clint Adams <clint@zsh.org>
* 16000: Completion/Debian/Command/.distfiles,
diff --git a/Etc/MACHINES b/Etc/MACHINES
index eba4cb77c..3b62f27e3 100644
--- a/Etc/MACHINES
+++ b/Etc/MACHINES
@@ -18,7 +18,11 @@ Machines
--------
Apple: MacOS X/Darwin 1.4
- Should build `out-of-the-box'. Dynamic loading does not work.
+ Should build `out-of-the-box'.
+
+ For dynamic loading to work, you need to use the dlcompat library.
+ It can be downloaded from:
+ http://sourceforge.net/project/showfiles.php?group_id=17203
Red Hat Inc.: Cygwin
Should build `out-of-the-box'. The compilation directory should
diff --git a/Test/C02cond.ztst b/Test/C02cond.ztst
index 83f9b6de3..eafda1b5c 100644
--- a/Test/C02cond.ztst
+++ b/Test/C02cond.ztst
@@ -19,6 +19,7 @@
chgrp $EGID modish
chmod 7710 modish # g+xs,u+s,+t
+ chmod g+s modish # two lines combined work around chmod bugs
touch unmodish
chmod 000 unmodish
diff --git a/acconfig.h b/acconfig.h
index 2276d7d1d..1026f2b7b 100644
--- a/acconfig.h
+++ b/acconfig.h
@@ -259,7 +259,7 @@
/* Define to 1 if multiple modules defining the same symbol are OK */
#undef DYNAMIC_NAME_CLASH_OK
-/* The exension used for dynamically loaded modules */
+/* The extension used for dynamically loaded modules */
#undef DL_EXT
/* Define to 1 if you want to use dynamically loaded modules */
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}"