Commit 4d245707 authored by audreyt@audreyt.org's avatar audreyt@audreyt.org

* 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.)
parent 2cc64da9
......@@ -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*
])
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment