configure: Add check for recent enough bison.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Alexandre Julliard 2019-04-24 22:31:31 +02:00
parent 370441b33d
commit a4c93936c9
2 changed files with 33 additions and 0 deletions

20
configure vendored
View File

@ -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

View File

@ -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)