# Hack!: nlist() under Digital UNIX insist on there being an _,
# but symbol table listings show none. What is going on here?!?
#
-if test $HostPlatform = "alpha-dec-osf1"; then
- ac_cv_lead_uscore='no'
-else
+changequote(<<, >>)dnl
+<<
+case $HostPlatform in
+alpha-dec-osf*) ac_cv_lead_uscore='no';;
+*) >>
+changequote([, ])dnl
AC_TRY_RUN([#ifdef HAVE_NLIST_H
#include <nlist.h>
changequote(<<, >>)dnl
#endif
exit(1);
}], ac_cv_lead_uscore=yes, ac_cv_lead_uscore=no, ac_cv_lead_uscore=NO)
-fi);
+;;
+esac);
LeadingUnderscore=`echo $ac_cv_lead_uscore | sed 'y/yesno/YESNO/'`
AC_SUBST(LeadingUnderscore)
])
fi;
])
HappyVersion=$ac_cv_happy_version;
+if test x"$HappyCmd" != x && expr "$HappyVersion" \<= "1.3" >/dev/null; then
+ echo " Happy Version 1.3 or later is required to compile GHC."
+ echo " Using the Happy sources in the tree.";
+ HappyCmd=""
+ AC_SUBST(HappyCmd)
+fi;
AC_SUBST(HappyVersion)
])
ac_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]*\).*/expr 20 \\\< \1 \\\* 10 + \2/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 ''
[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
+ echo 'tr/\\/\//; /(\S+\/cpp)/ && print "[$]1";' > conftest.pl
ac_cv_gnu_cpp="`eval $PerlCmd -n conftest.pl conftest.out`"
rm -fr conftest*
else