14.11.2015 19:22, Peter Cheung пишет:
hi
    my flex in mac is installed using macports.

$flex --version
flex 2.5.35 Apple(flex-31)

And the line in configure fail

version=`$LEX --version | $AWK '{ split($NF,x,"."); print 
x[1]*10000+x[2]*100+x[3]; }’`

Better to change it to:

version=`$LEX --version | sed 's/flex //'|sed 's/ .*//'| $AWK '{ 
split($NF,x,"."); print x[1]*10000+x[2]*100+x[3]; }’`


Does attached patch help?
From: Andrei Borzenkov <arvidj...@gmail.com>
Subject: [PATCH] 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 <mcheun...@hotmail.com>

---
 configure.ac | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index 9e8a606..3300545 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
-- 
tg: (7994077..) u/flex-macports (depends on: master)
_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel

Reply via email to