configure.ac: Check bison version (bug #127838)

Original commit message from CVS:
reviewed by: David Schleef  <ds@schleef.org>
* configure.ac: Check bison version (bug #127838)
This commit is contained in:
David Schleef 2004-03-25 22:19:19 +00:00
parent e2e72a8993
commit 5710f325b3
2 changed files with 19 additions and 0 deletions

View file

@ -1,3 +1,9 @@
2004-03-25 Tim-Philipp Müller <t.i.m@zen.co.uk>
reviewed by: David Schleef <ds@schleef.org>
* configure.ac: Check bison version (bug #127838)
2004-03-25 David Schleef <ds@schleef.org> 2004-03-25 David Schleef <ds@schleef.org>
* docs/gst/gstreamer-docs.sgml: More fine tuning. * docs/gst/gstreamer-docs.sgml: More fine tuning.

View file

@ -120,6 +120,8 @@ if test x$PERL_PATH = xno; then
AC_MSG_ERROR(Could not find perl) AC_MSG_ERROR(Could not find perl)
fi fi
AC_PROG_AWK
dnl we require bison for building the parser dnl we require bison for building the parser
dnl FIXME: check if AC_PROG_YACC is suitable here dnl FIXME: check if AC_PROG_YACC is suitable here
AC_PATH_PROG(BISON_PATH, bison, no) 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) AC_MSG_ERROR(Could not find bison)
fi 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 we require flex for building the parser
dnl FIXME: check if AC_PROG_LEX is suitable here dnl FIXME: check if AC_PROG_LEX is suitable here
AC_PATH_PROG(FLEX_PATH, flex, no) AC_PATH_PROG(FLEX_PATH, flex, no)