]> granicus.if.org Git - php/commitdiff
We have to require bison version <= 1.30 >= 1.75 since any versions between are broken..
authorfoobar <sniper@php.net>
Sun, 27 Oct 2002 19:47:34 +0000 (19:47 +0000)
committerfoobar <sniper@php.net>
Sun, 27 Oct 2002 19:47:34 +0000 (19:47 +0000)
build/buildcheck.sh

index d3f267c580c43e86728e08123ad19b4239ba6d5f..0fe90b01c351d2876ac6c5985eeaaac7cc4a28c0 100755 (executable)
@@ -16,7 +16,7 @@
 #  |          Sascha Schumann <sascha@schumann.cx>                        |
 #  +----------------------------------------------------------------------+
 #
-# $Id: buildcheck.sh,v 1.19 2002-07-21 13:09:07 sas Exp $ 
+# $Id: buildcheck.sh,v 1.20 2002-10-27 19:47:34 sniper Exp $ 
 #
 
 echo "buildconf: checking installation..."
@@ -70,6 +70,25 @@ else
 echo "buildconf: automake version $am_version (ok)"
 fi
 
+# Bison <= 1.30 or >= 1.75 required (1.35, 1.50 have some bugs)
+bison_version=`bison --version| grep 'GNU Bison' | cut -d ' ' -f 4`
+bison_version_clean=`echo $bison_version|sed -e 's/-p[0-9]*$//'`
+if test "$bison_version" = ""; then
+echo "buildconf: bison not found."
+echo "           You need bison version <= 1.30 >= 1.75 installed"
+echo "           to build PHP from CVS."
+exit 1
+fi
+IFS=.; set $bison_version_clean; IFS=' '
+if test "$1" = "1" -a "$2" -le "30" || test "$1" = "1" -a "$2" -ge "75"; then
+echo "buildconf: bison version $bison_version (ok)"
+else
+echo "buildconf: bison version $bison_version found."
+echo "           You need bison version <= 1.30 >= 1.75 installed"
+echo "           to build PHP from CVS."
+exit 1
+fi
+
 # libtool 1.4 or newer
 # Prefer glibtool over libtool for Mac OS X compatibility
 libtool=`which glibtool 2> /dev/null`