From a4e7793e51e11e6a382a72866d92f4edca5c857c Mon Sep 17 00:00:00 2001 From: Ilia Alshanetsky Date: Mon, 11 Nov 2002 16:12:56 +0000 Subject: [PATCH] Added a flex version check. In the event required flex version is not available, an advisory warning (similar to bison one) will be given to the user. This is needed for systems such as Sun OS, where the existing lex parser cannot be used to regenerate Zend/PHP lexical parsers. --- configure.in | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/configure.in b/configure.in index 73dc78888f..b93005648e 100644 --- a/configure.in +++ b/configure.in @@ -158,6 +158,12 @@ if test "$ac_cv_c_const" = "yes" ; then LEX_CFLAGS="-DYY_USE_CONST" fi +AC_MSG_CHECKING([flex version]) +set `$LEX -V | grep 'version' | cut -d ' ' -f 3 | sed -e 's/\./ /g' | sed -e 's/[^0-9 ]//g'` +if test "${1}" != "2" -o "${2}" != "5" -o "${3}" -lt "4"; then + AC_MSG_WARN(You will need flex 2.5.4 or later if you want to regenerate Zend/PHP lexical parsers.) +fi +AC_MSG_RESULT(${1}.${2}.${3} (ok)) dnl Platform-specific compile settings. dnl ------------------------------------------------------------------------- -- 2.40.0