From a4c93936c9493f7619e1877b522eeb809a390dfe Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Wed, 24 Apr 2019 22:31:31 +0200 Subject: [PATCH] configure: Add check for recent enough bison. Signed-off-by: Alexandre Julliard --- configure | 20 ++++++++++++++++++++ configure.ac | 13 +++++++++++++ 2 files changed, 33 insertions(+) diff --git a/configure b/configure index 1ed30b949b2..e97f57fd1f7 100755 --- a/configure +++ b/configure @@ -5892,6 +5892,26 @@ if test "$BISON" = "none" then as_fn_error $? "no suitable bison found. Please install the 'bison' package." "$LINENO" 5 fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether bison is recent enough" >&5 +$as_echo_n "checking whether bison is recent enough... " >&6; } +if ${wine_cv_recent_bison+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat >conftest.y </dev/null 2>&5 + then + wine_cv_recent_bison=yes + else + wine_cv_recent_bison=no + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $wine_cv_recent_bison" >&5 +$as_echo "$wine_cv_recent_bison" >&6; } +test $wine_cv_recent_bison != no || as_fn_error $? "Your bison version is too old. Please install bison version 3.0 or newer." "$LINENO" 5 if test -n "$ac_tool_prefix"; then for ac_prog in ar gar diff --git a/configure.ac b/configure.ac index 68d52a8ceae..d1502bacf78 100644 --- a/configure.ac +++ b/configure.ac @@ -288,6 +288,19 @@ if test "$BISON" = "none" then AC_MSG_ERROR([no suitable bison found. Please install the 'bison' package.]) fi +AC_CACHE_CHECK([whether bison is recent enough],wine_cv_recent_bison, + [cat >conftest.y </dev/null 2>&AS_MESSAGE_LOG_FD + then + wine_cv_recent_bison=yes + else + wine_cv_recent_bison=no + fi]) +test $wine_cv_recent_bison != no || AC_MSG_ERROR([Your bison version is too old. Please install bison version 3.0 or newer.]) AC_CHECK_TOOLS(AR,[ar gar],ar) AC_CHECK_TOOL(STRIP,strip,strip)