diff options
author | audreyt@audreyt.org <unknown> | 2007-07-11 16:58:51 +0000 |
---|---|---|
committer | audreyt@audreyt.org <unknown> | 2007-07-11 16:58:51 +0000 |
commit | 4d2457071327bc82898b2c974d0d2e03747537c9 (patch) | |
tree | 42472cddf3392b2688f5682fcc5368a6129dab21 /aclocal.m4 | |
parent | 2cc64da9094b7bdb122c17e5b30b5b6b3c2259b5 (diff) | |
download | haskell-4d2457071327bc82898b2c974d0d2e03747537c9.tar.gz |
* Future-proof autoconf's Perl version test.
GHC only works with Perl versions 5.6 and later; however
the current test greps in a rather non-future-proof way
(explicitly against 5.6 and 5.8).
We instead exploit the "v-string" change in 5.6, which
displays the version string as "v5.x.y", rather than
the earlier format "version 5.xxx_yyy". Hence grepping
against "v5" will make it future proof for a while.
(At least until Perl 6 is installed as the system perl.)
Diffstat (limited to 'aclocal.m4')
-rw-r--r-- | aclocal.m4 | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/aclocal.m4 b/aclocal.m4 index f2762b30b8..ce8e58511e 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -571,22 +571,17 @@ AC_DEFUN([FP_MINGW_GCC], ]) dnl Small feature test for perl version. Assumes PerlCmd -dnl contains path to perl binary +dnl contains path to perl binary. +dnl +dnl (Perl versions prior to v5.6 does not contain the string "v5"; +dnl instead they display version strings such as "version 5.005".) dnl AC_DEFUN([FPTOOLS_CHECK_PERL_VERSION], [$PerlCmd -v >conftest.out 2>&1 - if grep "v5.6" conftest.out >/dev/null 2>&1; then + if grep "v5" conftest.out >/dev/null 2>&1; then : else - if grep "v5.8" conftest.out >/dev/null 2>&1; then - : - else - if grep "version 6" conftest.out >/dev/null 2>&1; then - : - else - AC_MSG_ERROR([your version of perl probably won't work, try upgrading it.]) - fi - fi + AC_MSG_ERROR([your version of perl probably won't work, try upgrading it.]) fi rm -fr conftest* ]) |