From 5710f325b35ecd559f6300e28bfa7361569c8ae3 Mon Sep 17 00:00:00 2001 From: David Schleef Date: Thu, 25 Mar 2004 22:19:19 +0000 Subject: [PATCH] configure.ac: Check bison version (bug #127838) Original commit message from CVS: reviewed by: David Schleef * configure.ac: Check bison version (bug #127838) --- ChangeLog | 6 ++++++ configure.ac | 13 +++++++++++++ 2 files changed, 19 insertions(+) diff --git a/ChangeLog b/ChangeLog index 34365352b9..91a2236f78 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2004-03-25 Tim-Philipp Müller + + reviewed by: David Schleef + + * configure.ac: Check bison version (bug #127838) + 2004-03-25 David Schleef * docs/gst/gstreamer-docs.sgml: More fine tuning. diff --git a/configure.ac b/configure.ac index 49839138a2..e918d9f436 100644 --- a/configure.ac +++ b/configure.ac @@ -120,6 +120,8 @@ if test x$PERL_PATH = xno; then AC_MSG_ERROR(Could not find perl) fi +AC_PROG_AWK + dnl we require bison for building the parser dnl FIXME: check if AC_PROG_YACC is suitable here AC_PATH_PROG(BISON_PATH, bison, no) @@ -127,6 +129,17 @@ if test x$BISON_PATH = xno; then AC_MSG_ERROR(Could not find bison) fi +dnl check bison version +AC_MSG_CHECKING([bison version]) + +if $BISON_PATH --version | head -n 1 | $AWK '{ if ($4 < 1.35) exit 1; else exit 0;}'; +then + AC_MSG_RESULT([ok]) +else + AC_MSG_RESULT([too old.]) + AC_MSG_ERROR([Your bison version is too old, v1.35 or later is required.]) +fi + dnl we require flex for building the parser dnl FIXME: check if AC_PROG_LEX is suitable here AC_PATH_PROG(FLEX_PATH, flex, no)