]> granicus.if.org Git - php/commitdiff
Fixed flex version check. Some lex scanners like Sun's SGU do not appear
authorIlia Alshanetsky <iliaa@php.net>
Mon, 2 Dec 2002 07:03:00 +0000 (07:03 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Mon, 2 Dec 2002 07:03:00 +0000 (07:03 +0000)
to support -V flag, so by passing them data on stdin we prevent them from
sitting idle waiting for stdin data. I've also added some common version
retrieval flags, that may be supported by various lex scanners.

configure.in

index a8b451ddb85f0187633ee841598713e6f2e70925..08d7d4984d31754de885e719ae8a3f5e97876c67 100644 (file)
@@ -159,7 +159,7 @@ if test "$ac_cv_c_const" = "yes" ; then
 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'`
+set `echo "" | $LEX -V -v --version 2>/dev/null | 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