X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=aclocal.m4;h=08f69313c4b5ba08f71b1e5d95db053266a51569;hb=1955f86f16dc9fa86cc3ba8ab390c3ef1cbc3c95;hp=b1d79d0ae683c718b46a75249321def6a353b8d5;hpb=b035961905be6e49b3f26dd33e0dd0224b726b2b;p=ghc-hetmet.git diff --git a/aclocal.m4 b/aclocal.m4 index b1d79d0..08f6931 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -58,7 +58,7 @@ dnl ** check for leading underscores in symbol names AC_DEFUN(AC_UNDERSCORE, [AC_CHECK_LIB(elf, nlist, LIBS="-lelf $LIBS")dnl AC_CACHE_CHECK([leading underscore in symbol names], ac_cv_lead_uscore, -[# +# # Hack!: nlist() under Digital UNIX insist on there being an _, # but symbol table listings show none. What is going on here?!? # @@ -83,8 +83,7 @@ changequote([, ])dnl #endif exit(1); }], ac_cv_lead_uscore=yes, ac_cv_lead_uscore=no, ac_cv_lead_uscore=NO) -fi -]) +fi); LeadingUnderscore=`echo $ac_cv_lead_uscore | sed 'y/yesno/YESNO/'` AC_SUBST(LeadingUnderscore) ]) @@ -103,6 +102,11 @@ changequote([, ])dnl else ac_cv_happy_version=""; fi; +if expr "$ac_cv_happy_version" "<" 1.4 > /dev/null 2>&1; then + echo + echo "Happy version 1.4 or later is required to compile GHC." + exit 1; +fi; ]) HappyVersion=$ac_cv_happy_version; AC_SUBST(HappyVersion) @@ -129,7 +133,7 @@ else fi fi rm -f conftest1 conftest2 -]), +]) ContextDiffCmd=$ac_cv_context_diffs AC_SUBST(ContextDiffCmd) ]) @@ -240,7 +244,7 @@ AC_DEFUN(AC_HAVE_GCC, ac_cv_have_gcc='no' else changequote(, )dnl - cmd_string="`$CC -v 2>&1 | grep 'version ' | sed -e 's/.*version \(egcs-\)\?\([0-9][0-9]*\)\.\([0-9][0-9]*\).*/expr 20 \\\< \2 \\\* 10 + \3/g' `" + 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' `" changequote([, ])dnl if test `eval $cmd_string 2>/dev/null` != "1"; then echo '' @@ -261,26 +265,24 @@ AC_SUBST(HaveGcc) # Substitutes: GNUCPP and RAWCPP (latter is 'GNUCPP -traditional') # AC_DEFUN(AC_PROG_GNUCPP, -[AC_CACHE_CHECK([how to invoke cpp directly], ac_cv_gnu_cpp, -[if echo $CPP | grep gcc >/dev/null 2>&1; then - echo > conftest.c - gcc -v -E conftest.c >/dev/null 2>conftest.out - echo '/(\S+(\/|\\\\)cpp)/ && print "[$]1";' > conftest.pl - # GNUCPP: used in jmake.c (GnuCppCmd) and in mkdependC - # (where we could do with the usual pre-#defines) - ac_cv_gnu_cpp="`eval $PerlCmd -n conftest.pl conftest.out`" - rm -fr conftest* -else - # It is likely that this will go terribly wrong.. - ac_cv_gnu_cpp='cc -E' -fi +[AC_CACHE_CHECK([how to invoke GNU cpp directly], ac_cv_gnu_cpp, +[if test "$HaveGcc" = "YES"; then + echo > conftest.c + gcc -v -E conftest.c >/dev/null 2>conftest.out + echo '/(\S+(\/|\\)cpp)/ && print "[$]1";' > conftest.pl + ac_cv_gnu_cpp="`eval $PerlCmd -n conftest.pl conftest.out | tr '\\\' / `" + rm -fr conftest* + else + # We need to be able to invoke CPP directly, preferably + # with input from stdin (mkdependHS and hscpp depend on + # this at the moment). + # Take a guess at what to use, this probably won't work. + echo Warning: GNU cpp not found, using $CPP + ac_cv_gnu_cpp = $CPP + fi ]) GNUCPP=$ac_cv_gnu_cpp -if test "$GNUCPP" = "cc -E"; then - RAWCPP="$GNUCPP" -else - RAWCPP="$GNUCPP -traditional" -fi +RAWCPP="$GNUCPP -traditional" AC_SUBST(GNUCPP) AC_SUBST(RAWCPP) ])