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 fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether flex is recent enough" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether flex is recent enough" >&5
$as_echo_n "checking whether flex is recent enough... " >&6; } $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{ %top{
#include "prediluvian.h" #include "prediluvian.h"
} }
%% %%
EOF EOF
if $FLEX -t conftest.l >/dev/null 2>&5 if $FLEX -t conftest.l >/dev/null 2>&5
then then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 wine_cv_recent_flex=yes
$as_echo "yes" >&6; } else
else wine_cv_recent_flex=no
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 fi
$as_echo "no" >&6; }
as_fn_error $? "Your flex version is too old. Please install flex version 2.5.33 or newer." "$LINENO" 5
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 for ac_prog in bison
do do

View File

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