]> granicus.if.org Git - yasm/commitdiff
Fix #88: Allow only GNU Bison (not Bison++ or plain old yacc) for YACC, and clear...
authorPeter Johnson <peter@tortall.net>
Mon, 30 Oct 2006 05:08:48 +0000 (05:08 -0000)
committerPeter Johnson <peter@tortall.net>
Mon, 30 Oct 2006 05:08:48 +0000 (05:08 -0000)
if too low (<1.25) version found.

svn path=/trunk/yasm/; revision=1675

configure.ac

index 1e1e04518ec80f889bc582d3c84c9bb5d2d2ad0d..e15066fcbe50d88309cc8f45c987cc79f28c0a07 100644 (file)
@@ -67,14 +67,24 @@ esac], enable_python="auto")
 AC_PROG_YACC
 # check for Bison in particular
 if test "$YACC" != "bison -y"; then
-       AC_MSG_WARN([You will need bison if you want to regenerate parsers.])
+       AC_MSG_WARN([You will need GNU Bison if you want to regenerate parsers.])
+       YACC=
 else
        AC_MSG_CHECKING([bison version])
-       set `bison --version | sed -e 's/^@<:@A-Za-z() @:>@*//' -e 's/\./ /'`
-       if test "$1" = "1" -a "$2" -lt "25"; then
-               AC_MSG_WARN([You will need bison 1.25 or better if you want to regenerate parsers (found $1.$2).])
+       set `bison --version | grep 'GNU Bison' | sed -e 's/^@<:@A-Za-z() @:>@*//g' -e 's/\./ /'`
+       if test -z "$1" -o -z "$2"; then
+               AC_MSG_RESULT([unknown])
+               AC_MSG_WARN([You will need GNU Bison 1.25 or better if you want to regenerate parsers.])
+               YACC=
+       else
+               if test "$1" = "1" -a "$2" -lt "25"; then
+                       AC_MSG_RESULT([$1.$2])
+                       AC_MSG_WARN([You will need GNU Bison 1.25 or better if you want to regenerate parsers (found $1.$2).])
+                       YACC=
+               else
+                       AC_MSG_RESULT([$1.$2 (ok)])
+               fi
        fi
-       AC_MSG_RESULT([$1.$2 (ok)])
 fi
 AC_PROG_CC_STDC
 AC_PROG_INSTALL