summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2019-09-18 23:50:20 -0400
committerBen Gamari <ben@well-typed.com>2019-09-25 17:15:32 -0400
commit68dc96a00cc1f4d4d0d5f6520b0ce8f5c240b752 (patch)
treeb34c4496109159bbee1c51b1d49d911174a0e331
parent795986aaf33e2ffc233836b86a92a77366c91db2 (diff)
downloadhaskell-wip/T16860.tar.gz
configure: Don't depend upon alex in source dist buildwip/T16860
This fixes #16860 by verifying that the generated sources don't already exist before asserting that the `alex` executable was found. This replicates the logic already used for `happy` in the case of `alex`.
-rw-r--r--aclocal.m47
1 files changed, 5 insertions, 2 deletions
diff --git a/aclocal.m4 b/aclocal.m4
index 4729a1ca16..6b96a7c084 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -984,8 +984,11 @@ else
fi;
changequote([, ])dnl
])
-FP_COMPARE_VERSIONS([$fptools_cv_alex_version],[-lt],[3.1.7],
- [AC_MSG_ERROR([Alex version 3.1.7 or later is required to compile GHC.])])[]
+if test ! -f compiler/parser/Lexer.hs
+then
+ FP_COMPARE_VERSIONS([$fptools_cv_alex_version],[-lt],[3.1.7],
+ [AC_MSG_ERROR([Alex version 3.1.7 or later is required to compile GHC.])])[]
+fi
AlexVersion=$fptools_cv_alex_version;
AC_SUBST(AlexVersion)
])