diff options
author | Oliver Kiddle <opk@users.sourceforge.net> | 2001-10-12 10:31:58 +0000 |
---|---|---|
committer | Oliver Kiddle <opk@users.sourceforge.net> | 2001-10-12 10:31:58 +0000 |
commit | 2493d1ef19162ac05ba496e0bb387151f09aa1a4 (patch) | |
tree | 4ae814cbc169476dfb58f1d4845766d6a33c15bd /zshconfig.ac | |
parent | cb49ff752f64203686a87c12ac073ea0bf1938dc (diff) | |
download | zsh-2493d1ef19162ac05ba496e0bb387151f09aa1a4.tar.gz zsh-2493d1ef19162ac05ba496e0bb387151f09aa1a4.tar.xz zsh-2493d1ef19162ac05ba496e0bb387151f09aa1a4.zip |
fix compilation on Darwin/MacOS X (15882, 16018)
Diffstat (limited to 'zshconfig.ac')
-rw-r--r-- | zshconfig.ac | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/zshconfig.ac b/zshconfig.ac index e70099a38..35c24a0e6 100644 --- a/zshconfig.ac +++ b/zshconfig.ac @@ -307,6 +307,7 @@ fi if test -n "$auto_ldflags"; then case "${enable_zsh_debug}$host_os" in yesaix*|yeshpux*|yesnetbsd*|yesopenbsd*) ;; # "ld -g" is not valid on these systems + darwin*) LDFLAGS=-Wl,-x ;; yes*) LDFLAGS=-g ;; *) LDFLAGS=-s ;; esac @@ -1565,7 +1566,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> @@ -1612,6 +1613,10 @@ char *argv[]; esac DLLDARG="${LDARG}" ;; + *darwin*) + DLLD="${DLLD=$CC}" + DLLDARG="" + ;; * ) DLLD="${DLLD=ld}" DLLDARG="" @@ -1619,7 +1624,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}" ;; @@ -1635,6 +1643,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}" |