diff options
author | Ben Gamari <ben@smart-cactus.org> | 2019-09-18 23:50:20 -0400 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2019-09-27 22:11:53 -0400 |
commit | 144abba394c6a23eb877fbde727111a5e75b9d47 (patch) | |
tree | eaa127bd712a7cac72f9375671476e2a0547964d /aclocal.m4 | |
parent | 9c02a793be61a66bc091729f50e567096ab74a5c (diff) | |
download | haskell-144abba394c6a23eb877fbde727111a5e75b9d47.tar.gz |
configure: Don't depend upon alex in source dist build
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`.
Diffstat (limited to 'aclocal.m4')
-rw-r--r-- | aclocal.m4 | 7 |
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) ]) |