X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=aclocal.m4;h=797380915353814b4e27c8952d89d358cd3054d8;hb=1a8d01f99c116ea79fa765afc8f8f6129c5b270d;hp=0f164f6eef54a2c6ca0ae700ad1cd11999c90aff;hpb=011ccdc2dc99227a90e8b2f0ffe366cb97897997;p=ghc-hetmet.git diff --git a/aclocal.m4 b/aclocal.m4 index 0f164f6..7973809 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -1,4 +1,4 @@ -dnl $Id: aclocal.m4,v 1.81 2001/07/19 22:08:07 sof Exp $ +dnl $Id: aclocal.m4,v 1.83 2001/09/20 14:08:13 sewardj Exp $ dnl dnl Extra autoconf macros for the Glasgow fptools dnl @@ -280,7 +280,9 @@ AC_SUBST(YaccCmd) dnl *** Checking for ar and its arguments + whether we need ranlib. dnl -dnl ArCmd and RANLIB are AC_SUBST'ed +dnl ArCmd, ArSupportsInput and RANLIB are AC_SUBST'ed +dnl On Digital UNIX, we test for the -Z (compress) and +dnl -input (take list of files from external file) flags. dnl AC_DEFUN(FPTOOLS_PROG_AR_AND_RANLIB, [AC_PATH_PROG(ArCmd,ar) @@ -288,7 +290,10 @@ if test -z "$ArCmd"; then echo "You don't seem to have ar in your PATH...I have no idea how to make a library" exit 1; fi -if $ArCmd clqs conftest.a >/dev/null 2>/dev/null; then +if $ArCmd clqsZ conftest.a >/dev/null 2>/dev/null; then + ArCmd="$ArCmd clqsZ" + NeedRanLib='' +elif $ArCmd clqs conftest.a >/dev/null 2>/dev/null; then ArCmd="$ArCmd clqs" NeedRanLib='' elif $ArCmd cqs conftest.a >/dev/null 2>/dev/null; then @@ -310,6 +315,14 @@ fi rm -rf conftest* test -n "$ArCmd" && test -n "$verbose" && echo " setting ArCmd to $ArCmd" AC_SUBST(ArCmd) +if $ArCmd conftest.a -input /dev/null >/dev/null 2>/dev/null; then + ArSupportsInput='-input' +else + ArSupportsInput='' +fi +rm -rf conftest* +test -n "$ArSupportsInput" && test -n "$verbose" && echo " setting ArSupportsInput to $ArSupportsInput" +AC_SUBST(ArSupportsInput) if test -z "$NeedRanLib"; then RANLIB=':' test -n "$verbose" && echo " setting RANLIB to $RANLIB" @@ -350,14 +363,28 @@ AC_DEFUN(FPTOOLS_HAVE_GCC, fptools_cv_have_gcc='no' else changequote(, )dnl - cmd_string="`$CC -v 2>&1 | grep 'version ' | sed -e 's/.*version [^0-9]*\([0-9][0-9]*\)\.\([0-9][0-9]*\).*/expr 20 \\\< \1 \\\* 10 + \2/g' `" + is_gcc_v1="`$CC -v 2>&1 | grep 'version ' | sed -e 's/.*version [^0-9]*\([0-9][0-9]*\)\.\([0-9][0-9]*\).*/expr 2000 \\\>= \1 \\\* 1000 + \2/g' `" + is_gcc_v3="`$CC -v 2>&1 | grep 'version ' | sed -e 's/.*version [^0-9]*\([0-9][0-9]*\)\.\([0-9][0-9]*\).*/expr 3000 \\\<= \1 \\\* 1000 + \2/g' `" changequote([, ])dnl - if test `eval $cmd_string 2>/dev/null` != "1"; then - echo '' - echo "I'm not sure if your version of gcc will work," - echo "but it's worth a shot, eh?" - fi fptools_cv_have_gcc='yes' + if test `eval $is_gcc_v1 2>/dev/null` = "1"; then + fptools_cv_have_gcc='no' + echo "" + echo "your gcc version appears to be ..." + $CC --version + echo "gcc prior to 2.0 and have never worked with ghc." + echo "we recommend 2.95.3, although versions back to 2.7.2 should be ok." + AC_MSG_ERROR([gcc 1.X has never been supported]) + fi + if test `eval $is_gcc_v3 2>/dev/null` = "1"; then + fptools_cv_have_gcc='no' + echo "" + echo "your gcc version appears to be ..." + $CC --version + echo "gcc versions 3.0 and above are not yet supported." + echo "we recommend 2.95.3, although versions back to 2.7.2 should be ok." + AC_MSG_ERROR([gcc 3.0 and above is not currently supported]) + fi fi ]) HaveGcc=`echo $fptools_cv_have_gcc | sed 'y/yesno/YESNO/'`