dnl AC_PROG_FLEX: Check whether the LEXer is flex, and which version it has
dnl The first arg must be a version number with 3 parts.
dnl AC_PROG_FLEX: Check whether the LEXer is flex, and which version it has
dnl The first arg must be a version number with 3 parts.
AC_DEFUN([_AC_PROG_FLEX_HELPER_TOO_OLD],[
AC_MSG_NOTICE([Found flex is too old. Parsers won't get updated (Found v$FLEX_VERSION < v$1)])
AC_DEFUN([_AC_PROG_FLEX_HELPER_TOO_OLD],[
AC_MSG_NOTICE([Found flex is too old. Parsers won't get updated (Found v$FLEX_VERSION < v$1)])
changequote(<<, >>)dnl because of the regexp [blabla]
FLEX_VERSION=`flex --version | sed -e 's/^[^0-9]*//' -e 's/[^0-9]*$//'`
changequote(<<, >>)dnl because of the regexp [blabla]
FLEX_VERSION=`flex --version | sed -e 's/^[^0-9]*//' -e 's/[^0-9]*$//'`
test "$FLEX_VER_MAJ" -eq "$WANT_VER_MAJ" -a "$FLEX_VER_MED" -eq "$WANT_VER_MED" -a "$FLEX_VER_MIN" -lt "$WANT_VER_MIN" ;
then
AC_MSG_NOTICE([Found flex is too old. Parsers won't get updated (Found v$FLEX_VERSION < v$1)])
test "$FLEX_VER_MAJ" -eq "$WANT_VER_MAJ" -a "$FLEX_VER_MED" -eq "$WANT_VER_MED" -a "$FLEX_VER_MIN" -lt "$WANT_VER_MIN" ;
then
AC_MSG_NOTICE([Found flex is too old. Parsers won't get updated (Found v$FLEX_VERSION < v$1)])