Skip to content

Commit

Permalink
Correcting checking of flex version (dave)
Browse files Browse the repository at this point in the history
  • Loading branch information
David Hill committed Mar 27, 2003
1 parent 1972a65 commit b7bb820
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions configure.in
Original file line number Diff line number Diff line change
Expand Up @@ -155,11 +155,19 @@ if test "$ac_cv_c_const" = "yes" ; then
fi

AC_MSG_CHECKING([flex version])
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
if test "$LEX" ;then
flexvers=`echo "" | $LEX -V -v --version 2>/dev/null |
sed -e 's/^.* //' -e 's/\./ /g'`
if test ! -z "$flexvers"; then
set $flexvers
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
fi
AC_MSG_RESULT(${1}.${2}.${3} (ok))
else
AC_MSG_WARN(You will need flex 2.5.4 or later if you want to regenerate Zend/PHP lexical parsers.)
fi

dnl Platform-specific compile settings.
dnl -------------------------------------------------------------------------
Expand Down

0 comments on commit b7bb820

Please sign in to comment.