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

14
configure vendored
View File

@ -5786,6 +5786,9 @@ 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; }
if ${wine_cv_recent_flex+:} false; then :
$as_echo_n "(cached) " >&6
else
cat >conftest.l <<EOF
%top{
#include "prediluvian.h"
@ -5794,13 +5797,14 @@ cat >conftest.l <<EOF
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; }
wine_cv_recent_flex=yes
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
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,8 +269,8 @@ 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"
}
@ -278,11 +278,11 @@ cat >conftest.l <<EOF
EOF
if $FLEX -t conftest.l >/dev/null 2>&AS_MESSAGE_LOG_FD
then
AC_MSG_RESULT([yes])
wine_cv_recent_flex=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
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)