From a1cef22a4e8f98d71f774118a3b4b2dff9febd85 Mon Sep 17 00:00:00 2001 From: Max Bolingbroke Date: Sun, 3 Feb 2013 18:05:25 +0000 Subject: Fix construction of ALL_ALEX_OPTS and ALL_AS_OPTS Signed-off-by: David Waern --- aclocal.m4 | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'aclocal.m4') diff --git a/aclocal.m4 b/aclocal.m4 index 69b40fccf1..e225030ddd 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -863,7 +863,7 @@ AC_SUBST(HappyVersion) dnl dnl Check for Alex and version. If we're building GHC, then we need -dnl at least Alex version 2.0.1. +dnl at least Alex version 2.1.1. dnl AC_DEFUN([FPTOOLS_ALEX], [ @@ -879,12 +879,17 @@ else fi; changequote([, ])dnl ]) +FP_COMPARE_VERSIONS([$fptools_cv_alex_version],[-ge],[3.0], + [Alex3=YES],[Alex3=NO]) if test ! -f compiler/cmm/CmmLex.hs || test ! -f compiler/parser/Lexer.hs then FP_COMPARE_VERSIONS([$fptools_cv_alex_version],[-lt],[2.1.0], [AC_MSG_ERROR([Alex version 2.1.0 or later is required to compile GHC.])])[] - FP_COMPARE_VERSIONS([$fptools_cv_alex_version],[-ge],[3.0], - [Alex3=YES],[Alex3=NO]) +fi +if test ! -f utils/haddock/src/Haddock/Lex.hs +then + FP_COMPARE_VERSIONS([$fptools_cv_alex_version],[-lt],[3.0], + [AC_MSG_ERROR([Alex version 3.0 or later is required to compile Haddock.])])[] fi AlexVersion=$fptools_cv_alex_version; AC_SUBST(AlexVersion) -- cgit v1.2.1