Alexandre Julliard : configure: Add check for recent enough bison.

Alexandre Julliard julliard at winehq.org
Wed Apr 24 16:33:30 CDT 2019


Module: wine
Branch: master
Commit: a4c93936c9493f7619e1877b522eeb809a390dfe
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=a4c93936c9493f7619e1877b522eeb809a390dfe

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Wed Apr 24 22:31:31 2019 +0200

configure: Add check for recent enough bison.

Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 configure    | 20 ++++++++++++++++++++
 configure.ac | 13 +++++++++++++
 2 files changed, 33 insertions(+)

diff --git a/configure b/configure
index 1ed30b9..e97f57f 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 <<EOF
+%define parse.error verbose
+%%
+empty: ;
+EOF
+    if $BISON 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 68d52a8..d1502ba 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 <<EOF
+%define parse.error verbose
+%%
+empty: ;
+EOF
+    if $BISON 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)




More information about the wine-cvs mailing list