From 2493d1ef19162ac05ba496e0bb387151f09aa1a4 Mon Sep 17 00:00:00 2001 From: Oliver Kiddle Date: Fri, 12 Oct 2001 10:31:58 +0000 Subject: fix compilation on Darwin/MacOS X (15882, 16018) --- zshconfig.ac | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'zshconfig.ac') 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 @@ -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}" -- cgit 1.4.1