diff --git a/configure b/configure index f93853585df..949e95f94c2 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 <&6 +else + cat >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 51ca0fa88fc..f2f75f0ba90 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 <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)