configure: Cache result of the flex version check.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Alexandre Julliard 2019-04-14 14:50:00 +02:00
parent 92714fcb62
commit 86a5dc80d8
2 changed files with 22 additions and 18 deletions

22
configure vendored
View File

@ -5786,21 +5786,25 @@ then
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether flex is recent enough" >&5
$as_echo_n "checking whether flex is recent enough... " >&6; }
cat >conftest.l <<EOF
if ${wine_cv_recent_flex+:} false; then :
$as_echo_n "(cached) " >&6
else
cat >conftest.l <<EOF
%top{
#include "prediluvian.h"
}
%%
EOF
if $FLEX -t conftest.l >/dev/null 2>&5
then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
as_fn_error $? "Your flex version is too old. Please install flex version 2.5.33 or newer." "$LINENO" 5
if $FLEX -t conftest.l >/dev/null 2>&5
then
wine_cv_recent_flex=yes
else
wine_cv_recent_flex=no
fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $wine_cv_recent_flex" >&5
$as_echo "$wine_cv_recent_flex" >&6; }
test $wine_cv_recent_flex != no || as_fn_error $? "Your flex version is too old. Please install flex version 2.5.33 or newer." "$LINENO" 5
for ac_prog in bison
do

View File

@ -269,20 +269,20 @@ if test "$FLEX" = "none"
then
AC_MSG_ERROR([no suitable flex found. Please install the 'flex' package.])
fi
AC_MSG_CHECKING([whether flex is recent enough])
cat >conftest.l <<EOF
AC_CACHE_CHECK([whether flex is recent enough],wine_cv_recent_flex,
[cat >conftest.l <<EOF
%top{
#include "prediluvian.h"
}
%%
EOF
if $FLEX -t conftest.l >/dev/null 2>&AS_MESSAGE_LOG_FD
then
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no])
AC_MSG_ERROR([Your flex version is too old. Please install flex version 2.5.33 or newer.])
fi
if $FLEX -t conftest.l >/dev/null 2>&AS_MESSAGE_LOG_FD
then
wine_cv_recent_flex=yes
else
wine_cv_recent_flex=no
fi])
test $wine_cv_recent_flex != no || AC_MSG_ERROR([Your flex version is too old. Please install flex version 2.5.33 or newer.])
dnl Check for bison
AC_CHECK_PROGS(BISON,bison,none)