From 00639aa9d1d323329c7a68b850697ea76910be6d Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Fri, 11 Jan 2013 13:48:14 +0900 Subject: [PATCH] Require bison 2.6 or later. It turns out the apiprefix define is quite new (I didn't realize it at the time) and I'd rather get FTBFS reports based on configure catching the error than gcc catching it. --- INSTALL | 2 +- config.d/programs.m4 | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/INSTALL b/INSTALL index 788dfa49f..8b747944a 100644 --- a/INSTALL +++ b/INSTALL @@ -23,7 +23,7 @@ The following packages are required to build QuakeForge: \li GNU autoconf 2.50 or later \li GNU automake 1.6 or later \li GNU libtool 1.4 or later -\li GNU bison +\li GNU bison 2.6 or later \li GNU flex \li GNU make (BSD make doesn't like some constructs used) \li C compiler and preprocessor (gcc and cpp recommended) diff --git a/config.d/programs.m4 b/config.d/programs.m4 index 9a5effbe7..439fb7c93 100644 --- a/config.d/programs.m4 +++ b/config.d/programs.m4 @@ -19,6 +19,18 @@ else AC_MSG_ERROR(GNU bison is required but was not found) fi fi +BISON_REQ=2.6 +AC_MSG_CHECKING([is bison version >= ${BISON_REQ}]) +BISON_VER=`$YACC --version | sed -n '1s/^.*) //p'` +AS_VERSION_COMPARE([$BISON_VER], [2.6], + [AC_MSG_RESULT([no]) + LOC=`which ${YACC}` + AC_MSG_ERROR( + [GNU bison >= 2.6 is required. $BISON_VER found in $LOC] + )], + AC_MSG_RESULT([yes]), + AC_MSG_RESULT([yes]) +) AM_PROG_LEX if echo $LEX | grep -v flex > /dev/null; then