]> granicus.if.org Git - php/commitdiff
Added a flex version check. In the event required flex version is not
authorIlia Alshanetsky <iliaa@php.net>
Mon, 11 Nov 2002 16:12:56 +0000 (16:12 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Mon, 11 Nov 2002 16:12:56 +0000 (16:12 +0000)
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

index 73dc78888ff222305822bc76f1533c99562a60a0..b93005648ea324e05da6601c3893a72f5938bac2 100644 (file)
@@ -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 -------------------------------------------------------------------------