Module: wine Branch: master Commit: 86a5dc80d839fbef7802ddb44f638ea0a00cf950 URL: https://source.winehq.org/git/wine.git/?a=commit;h=86a5dc80d839fbef7802ddb44...
Author: Alexandre Julliard julliard@winehq.org Date: Sun Apr 14 14:50:00 2019 +0200
configure: Cache result of the flex version check.
Signed-off-by: Alexandre Julliard julliard@winehq.org
---
configure | 22 +++++++++++++--------- configure.ac | 18 +++++++++--------- 2 files changed, 22 insertions(+), 18 deletions(-)
diff --git a/configure b/configure index f938535..949e95f 100755 --- a/configure +++ b/configure @@ -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 diff --git a/configure.ac b/configure.ac index 51ca0fa..f2f75f0 100644 --- a/configure.ac +++ b/configure.ac @@ -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)