Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 26 Nov 2001 21:52:17 +0900
From:      Jun Kuriyama <kuriyama@imgsrc.co.jp>
To:        dirk@FreeBSD.org
Cc:        Ports Team <ports@FreeBSD.org>
Subject:   www/mod_php4 with bison-1.29
Message-ID:  <7msnb18zjy.wl@waterblue.imgsrc.co.jp>

next in thread | raw e-mail | index | archive | help

On my environment (with devel/bison of 1.29), I cannot build
www/mod_php4.  It seems these patches are required.  Could you please
check these in?


----- patch-Zend.m4
--- Zend/Zend.m4.orig	Mon Mar 12 04:35:25 2001
+++ Zend/Zend.m4	Mon Nov 26 21:42:25 2001
@@ -4,12 +4,18 @@
 if test "$YACC" != "bison -y"; then
     AC_MSG_WARN(You will need bison if you want to regenerate the Zend parser.)
 else
-    AC_MSG_CHECKING(bison version)
-    set `bison --version| sed -e 's/^GNU Bison version //' -e 's/\./ /'`
-    if test "${1}" = "1" -a "${2}" -lt "28"; then
-        AC_MSG_WARN(You will need bison 1.28 if you want to regenerate the Zend parser (found ${1}.${2}).)
-    fi
-    AC_MSG_RESULT(${1}.${2} (ok))
+    AC_MSG_CHECKING([version of bison])
+changequote(<<,>>)dnl
+    ac_prog_version=`bison --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
+    case $ac_prog_version in
+      '') ac_prog_version="v. ?.??, bad";;
+      1.29 | 1.[3-9][0-9]* | [2-9].*)
+changequote([,])dnl
+         ac_prog_version="$ac_prog_version, ok";;
+      *) ac_prog_version="$ac_prog_version, ok"
+         AC_MSG_WARN(You will need bison 1.28 if you want to regenerate the Zend parser (found $ac_prog_version).);;
+    esac
+    AC_MSG_RESULT([$ac_prog_version])
 fi
 
 ])

-----

----- patch-configure.in
--- configure.in.orig	Thu Jun 21 05:12:59 2001
+++ configure.in	Mon Nov 26 21:40:06 2001
@@ -78,14 +78,18 @@
 if test "$YACC" != "bison -y"; then
     AC_MSG_WARN(You will need bison if you want to regenerate the PHP parsers.)
 else
-    AC_MSG_CHECKING(bison version)
-    oldIFS=$IFS; IFS=.
-    set `bison -V | sed -e 's/^GNU Bison version //'`
-    IFS=$oldIFS
-    if test "$1" = "1" -a "$2" -lt "25"; then
-        AC_MSG_WARN(Bison 1.25 or newer needed to regenerate parsers (found $1.$2).)
-    fi
-    AC_MSG_RESULT($1.$2 (ok))
+    AC_MSG_CHECKING([version of bison])
+changequote(<<,>>)dnl
+    ac_prog_version=`bison --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
+    case $ac_prog_version in
+      '') ac_prog_version="v. ?.??, bad";;
+      1.2[5-9]* | 1.[3-9][0-9]* | [2-9].*)
+changequote([,])dnl
+        AC_MSG_WARN(Bison 1.25 or newer needed to regenerate parsers (found $ac_prog_version).)
+        ac_prog_version="$ac_prog_version, ok";;
+      *) ac_prog_version="$ac_prog_version, ok";;
+    esac
+    AC_MSG_RESULT([$ac_prog_version])
 fi
 
 AC_PROG_CC
-----


-- 
Jun Kuriyama <kuriyama@imgsrc.co.jp> // IMG SRC, Inc.

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?7msnb18zjy.wl>