Massive patch for the first months work adding System FC to GHC #15
[ghc-hetmet.git] / aclocal.m4
index 62c5de7..ab0ba43 100644 (file)
@@ -75,27 +75,6 @@ AC_SUBST(ContextDiffCmd, [$fp_cv_context_diff])
 ])# FP_PROG_CONTEXT_DIFF
 
 
-# FP_DECL_ALTZONE
-# ---------------
-# Defines HAVE_DECL_ALTZONE to 1 if declared, 0 otherwise.
-#
-# Used by base package.
-AC_DEFUN([FP_DECL_ALTZONE],
-[AC_REQUIRE([AC_HEADER_TIME])dnl
-AC_CHECK_HEADERS([sys/time.h])
-AC_CHECK_DECLS([altzone], [], [],[#if TIME_WITH_SYS_TIME
-# include <sys/time.h>
-# include <time.h>
-#else
-# if HAVE_SYS_TIME_H
-#  include <sys/time.h>
-# else
-#  include <time.h>
-# endif
-#endif])
-])# FP_DECL_ALTZONE
-
-
 # FP_COMPUTE_INT(EXPRESSION, VARIABLE, INCLUDES, IF-FAILS)
 # --------------------------------------------------------
 # Assign VARIABLE the value of the compile-time EXPRESSION using INCLUDES for
@@ -256,8 +235,11 @@ else
 fi;
 changequote([, ])dnl
 ])
-FP_COMPARE_VERSIONS([$fptools_cv_happy_version],[-lt],[1.15],
-  [AC_MSG_ERROR([Happy version 1.15 or later is required to compile GHC.])])[]dnl
+if test ! -f compiler/parser/Parser.hs || test ! -f compiler/main/ParsePkgConf.hs || test ! -f compiler/cmm/CmmParse.hs || test ! -f compiler/parser/ParserCore.hs
+then
+    FP_COMPARE_VERSIONS([$fptools_cv_happy_version],[-lt],[1.15],
+      [AC_MSG_ERROR([Happy version 1.15 or later is required to compile GHC.])])[]dnl
+fi
 HappyVersion=$fptools_cv_happy_version;
 AC_SUBST(HappyVersion)
 ])
@@ -276,8 +258,7 @@ dnl do without it for now.
 
 dnl
 dnl Check for Alex and version.  If we're building GHC, then we need
-dnl at least Alex version 2.0.  If there's no installed Alex, we look
-dnl for a alex source tree and point the build system at that instead.
+dnl at least Alex version 2.0.1.
 dnl
 AC_DEFUN([FPTOOLS_ALEX],
 [
@@ -292,8 +273,11 @@ else
 fi;
 changequote([, ])dnl
 ])
-FP_COMPARE_VERSIONS([$fptools_cv_alex_version],[-lt],[2.0],
-  [AC_MSG_ERROR([Alex version 2.0 or later is required to compile GHC.])])[]dnl
+if test ! -f compiler/cmm/CmmLex.hs || test ! -f compiler/parser/Lexer.hs
+then
+    FP_COMPARE_VERSIONS([$fptools_cv_alex_version],[-lt],[2.0.1],
+      [AC_MSG_ERROR([Alex version 2.0.1 or later is required to compile GHC.])])[]dnl
+fi
 AlexVersion=$fptools_cv_alex_version;
 AC_SUBST(AlexVersion)
 ])