Macports add extra information after version itself:
$flex --version
flex 2.5.35 Apple(flex-31)
We require at least felx 2.5.35 so do not need to care about prehistoric
"flex version n.n.n"; just use second field always.
Reported by Peter Cheung <mcheung63@hotmail.com>
if test "x$LEX" = "x:"; then
AC_MSG_ERROR([flex is not found])
else
- version=`$LEX --version | $AWK '{ split($NF,x,"."); print x[[1]]*10000+x[[2]]*100+x[[3]]; }'`
+ version=`$LEX --version | $AWK '{ split($2,x,"."); print x[[1]]*10000+x[[2]]*100+x[[3]]; }'`
if test -n "$version" -a "$version" -ge 20535; then
:
else