From: Andrei Borzenkov Date: Fri, 27 Nov 2015 16:42:23 +0000 (+0300) Subject: configure: fix macports flex version detection X-Git-Tag: 2.02-beta3~165 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=a2618427857c7013a6d3107eb3b9be2d526a69ed;p=thirdparty%2Fgrub.git configure: fix macports flex version detection 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 --- diff --git a/configure.ac b/configure.ac index 9e8a606a6..3300545e0 100644 --- a/configure.ac +++ b/configure.ac @@ -315,7 +315,7 @@ AC_PROG_LN_S 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