From 4fc11f4b2ffccbc5f7e9e1da20174da590c1f444 Mon Sep 17 00:00:00 2001
From: sof <unknown>
Date: Sat, 7 Feb 1998 13:10:58 +0000
Subject: [PATCH] [project @ 1998-02-07 13:10:58 by sof] Further RAWCPP
 tweakage

---
 aclocal.m4 | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/aclocal.m4 b/aclocal.m4
index 0e3d91cd4c47..364526e2785c 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -113,6 +113,12 @@ if expr "$ac_cv_happy_version" "<" 1.4 > /dev/null 2>&1; then
 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)
 ])
 
@@ -273,7 +279,7 @@ AC_DEFUN(AC_PROG_GNUCPP,
 [if test "$HaveGcc" = "YES"; then
 	echo > conftest.c
 	gcc -v -E conftest.c >/dev/null 2>conftest.out
-	echo '/(\S+(\/|\\)cpp)/ && ([$]foo = [$]1) =~ tr/\\/\// && print "[$]foo";' > 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
-- 
GitLab