diff options
author | Andrey Borzenkov <bor@users.sourceforge.net> | 2001-03-07 11:40:48 +0000 |
---|---|---|
committer | Andrey Borzenkov <bor@users.sourceforge.net> | 2001-03-07 11:40:48 +0000 |
commit | 8c978c4006683e8e3549116b2960c660ff04c225 (patch) | |
tree | 2ac8f23089afcff838e47be1495ffcf32e92a090 | |
parent | 0156de0b0ed00eacc3db963ea039482851fae144 (diff) | |
download | zsh-8c978c4006683e8e3549116b2960c660ff04c225.tar.gz zsh-8c978c4006683e8e3549116b2960c660ff04c225.tar.xz zsh-8c978c4006683e8e3549116b2960c660ff04c225.zip |
unposted: support build with GCC on ReliantUNIX
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | aczsh.m4 | 36 | ||||
-rw-r--r-- | configure.in | 34 |
3 files changed, 51 insertions, 25 deletions
diff --git a/ChangeLog b/ChangeLog index d45647d35..72808221d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2001-03-07 Andrej Borsenkow <bor@zsh.org> + + * unposted: configure.in, aczsh.m4: support building with + GCC on ReliantUNIX; use AC_TRY_COMMAND for better diagnostic + + 2001-03-06 Oliver Kiddle <opk@zsh.org> * unposted: Completion/User/.distfiles, Completion/User/_webbrowser: diff --git a/aczsh.m4 b/aczsh.m4 index 83738311d..45334b6dc 100644 --- a/aczsh.m4 +++ b/aczsh.m4 @@ -164,10 +164,10 @@ void *zsh_getaddr1() }; ' > conftest1.c sed 's/zsh_getaddr1/zsh_getaddr2/' < conftest1.c > conftest2.c -if $CC -c $CFLAGS $CPPFLAGS $DLCFLAGS conftest1.c 1>&5 2>&5 && -$DLLD -o conftest1.$DL_EXT $LDFLAGS $DLLDFLAGS conftest1.o $LIBS 1>&5 2>&5 && -$CC -c $CFLAGS $CPPFLAGS $DLCFLAGS conftest2.c 1>&5 2>&5 && -$DLLD -o conftest2.$DL_EXT $LDFLAGS $DLLDFLAGS conftest2.o $LIBS 1>&5 2>&5; then +if AC_TRY_COMMAND($CC -c $CFLAGS $CPPFLAGS $DLCFLAGS conftest1.c 1>&AC_FD_CC) && +AC_TRY_COMMAND($DLLD -o conftest1.$DL_EXT $LDFLAGS $DLLDFLAGS conftest1.o $LIBS 1>&AC_FD_CC) && +AC_TRY_COMMAND($CC -c $CFLAGS $CPPFLAGS $DLCFLAGS conftest2.c 1>&AC_FD_CC) && +AC_TRY_COMMAND($DLLD -o conftest2.$DL_EXT $LDFLAGS $DLLDFLAGS conftest2.o $LIBS 1>&AC_FD_CC); then AC_TRY_RUN([ #ifdef HPUXDYNAMIC #include <dl.h> @@ -245,10 +245,10 @@ else fi echo 'int fred () { return 42; }' > conftest1.c echo 'int fred () { return 69; }' > conftest2.c -if $CC -c $CFLAGS $CPPFLAGS $DLCFLAGS conftest1.c 1>&5 2>&5 && -$DLLD -o conftest1.$DL_EXT $LDFLAGS $DLLDFLAGS conftest1.o $LIBS 1>&5 2>&5 && -$CC -c $CFLAGS $CPPFLAGS $DLCFLAGS conftest2.c 1>&5 2>&5 && -$DLLD -o conftest2.$DL_EXT $LDFLAGS $DLLDFLAGS conftest2.o $LIBS 1>&5 2>&5; then +if AC_TRY_COMMAND($CC -c $CFLAGS $CPPFLAGS $DLCFLAGS conftest1.c 1>&AC_FD_CC) && +AC_TRY_COMMAND($DLLD -o conftest1.$DL_EXT $LDFLAGS $DLLDFLAGS conftest1.o $LIBS 1>&AC_FD_CC) && +AC_TRY_COMMAND($CC -c $CFLAGS $CPPFLAGS $DLCFLAGS conftest2.c 1>&AC_FD_CC) && +AC_TRY_COMMAND($DLLD -o conftest2.$DL_EXT $LDFLAGS $DLLDFLAGS conftest2.o $LIBS 1>&AC_FD_CC); then AC_TRY_RUN([ #ifdef HPUXDYNAMIC #include <dl.h> @@ -320,10 +320,10 @@ else fi echo 'int fred () { return 42; }' > conftest1.c echo 'extern int fred(); int barney () { return fred() + 27; }' > conftest2.c -if $CC -c $CFLAGS $CPPFLAGS $DLCFLAGS conftest1.c 1>&5 2>&5 && -$DLLD -o conftest1.$DL_EXT $LDFLAGS $DLLDFLAGS conftest1.o $LIBS 1>&5 2>&5 && -$CC -c $CFLAGS $CPPFLAGS $DLCFLAGS conftest2.c 1>&5 2>&5 && -$DLLD -o conftest2.$DL_EXT $LDFLAGS $DLLDFLAGS conftest2.o $LIBS 1>&5 2>&5; then +if AC_TRY_COMMAND($CC -c $CFLAGS $CPPFLAGS $DLCFLAGS conftest1.c 1>&AC_FD_CC) && +AC_TRY_COMMAND($DLLD -o conftest1.$DL_EXT $LDFLAGS $DLLDFLAGS conftest1.o $LIBS 1>&AC_FD_CC) && +AC_TRY_COMMAND($CC -c $CFLAGS $CPPFLAGS $DLCFLAGS conftest2.c 1>&AC_FD_CC) && +AC_TRY_COMMAND($DLLD -o conftest2.$DL_EXT $LDFLAGS $DLLDFLAGS conftest2.o $LIBS 1>&AC_FD_CC); then AC_TRY_RUN([ #ifdef HPUXDYNAMIC #include <dl.h> @@ -390,8 +390,8 @@ else us= fi echo 'extern int fred(); int barney () { return fred() + 27; }' > conftest1.c -if $CC -c $CFLAGS $CPPFLAGS $DLCFLAGS conftest1.c 1>&5 2>&5 && -$DLLD -o conftest1.$DL_EXT $LDFLAGS $DLLDFLAGS conftest1.o $LIBS 1>&5 2>&5; then +if AC_TRY_COMMAND($CC -c $CFLAGS $CPPFLAGS $DLCFLAGS conftest1.c 1>&AC_FD_CC) && +AC_TRY_COMMAND($DLLD -o conftest1.$DL_EXT $LDFLAGS $DLLDFLAGS conftest1.o $LIBS 1>&AC_FD_CC); then save_ldflags=$LDFLAGS LDFLAGS="$LDFLAGS $EXTRA_LDFLAGS" AC_TRY_RUN([ @@ -463,8 +463,8 @@ elif us= fi echo 'extern int fred(); int barney() { return fred() + 27; }' > conftest1.c - $CC -c $CFLAGS $CPPFLAGS $DLCFLAGS conftest1.c 1>&5 2>&5 && - $DLLD -o conftest1.$DL_EXT $LDFLAGS $DLLDFLAGS conftest1.o $LIBS 1>&5 2>&5; then + AC_TRY_COMMAND($CC -c $CFLAGS $CPPFLAGS $DLCFLAGS conftest1.c 1>&AC_FD_CC) && + AC_TRY_COMMAND($DLLD -o conftest1.$DL_EXT $LDFLAGS $DLLDFLAGS conftest1.o $LIBS 1>&AC_FD_CC); then save_ldflags=$LDFLAGS LDFLAGS="$LDFLAGS $EXTRA_LDFLAGS -s" AC_TRY_RUN([ @@ -532,8 +532,8 @@ else us= fi echo 'int fred () { return 42; }' > conftest1.c -if $CC -c $CFLAGS $CPPFLAGS $DLCFLAGS conftest1.c 1>&5 2>&5 && -$DLLD -o conftest1.$DL_EXT $LDFLAGS $DLLDFLAGS -s conftest1.o $LIBS 1>&5 2>&5; then +if AC_TRY_COMMAND($CC -c $CFLAGS $CPPFLAGS $DLCFLAGS conftest1.c 1>&AC_FD_CC) && +AC_TRY_COMMAND($DLLD -o conftest1.$DL_EXT $LDFLAGS $DLLDFLAGS -s conftest1.o $LIBS 1>&AC_FD_CC); then AC_TRY_RUN([ #ifdef HPUXDYNAMIC #include <dl.h> diff --git a/configure.in b/configure.in index c31190af1..722cd24f7 100644 --- a/configure.in +++ b/configure.in @@ -277,7 +277,14 @@ AC_PROG_CC dnl Check for large file support. dnl This needs to be done early to get the stuff into the flags. if test $lfs != no; then -zsh_LARGE_FILE_SUPPORT +dnl Gross hack for ReliantUNIX - GCC does not understand getconf options +dnl For now just disable LFS in this case +dnl Any takers? + if test "$host" = mips-sni-sysv4 -a -n "$GCC"; then + : + else + zsh_LARGE_FILE_SUPPORT + fi fi dnl if the user hasn't specified CFLAGS, then @@ -1505,8 +1512,17 @@ char *argv[]; zsh_cv_sys_elf=yes)]) DL_EXT="${DL_EXT=so}" if test $zsh_cv_sys_elf = yes; then - DLLD="${DLLD=$CC}" - DLLDARG="${LDARG}" + case "$host" in + mips-sni-sysv4*) + # Forcibly set ld to native compiler to avoid obscure GCC problems + DLLD="${DLLD=/usr/ccs/bin/cc}" + DLLDARG="${LDARG}" + ;; + * ) + DLLD="${DLLD=$CC}" + DLLDARG="${LDARG}" + ;; + esac else DLLD="${DLLD=ld}" DLLDARG="" @@ -1538,9 +1554,13 @@ char *argv[]; # unfortunately, we have different compilers # that need different flags # - sni_cc_version=`$CC -V 2>&1 | head -1` + if test -n "$GCC"; then + sni_cc_version=GCC + else + sni_cc_version=`$CC -V 2>&1 | head -1` + fi case "$sni_cc_version" in - *CDS* ) + *CDS*|GCC ) EXTRA_LDFLAGS="${EXTRA_LDFLAGS=-Wl,-Blargedynsym}" ;; * ) @@ -1554,8 +1574,8 @@ char *argv[]; [echo failed >conftestval && cat >conftest.c <<EOM fred () { } EOM - $CC -c $CFLAGS $CPPFLAGS $DLCFLAGS conftest.c 1>&5 2>&5 && - $DLLD -o conftest.$DL_EXT $LDFLAGS $DLLDFLAGS conftest.o 1>&5 2>&5 && + AC_TRY_COMMAND($CC -c $CFLAGS $CPPFLAGS $DLCFLAGS conftest.c 1>&AC_FD_CC) && + AC_TRY_COMMAND($DLLD $LDFLAGS $DLLDFLAGS -o conftest.$DL_EXT conftest.o 1>&AC_FD_CC) && AC_TRY_RUN([ #include <stdio.h> #ifdef HPUXDYNAMIC |