From eb7be85350a2dd971bb509e9191c33fc640cd0d5 Mon Sep 17 00:00:00 2001 From: Nick Bowler Date: Tue, 5 Dec 2023 20:34:20 -0500 Subject: [PATCH] Skip Bison api.token.raw probe if Bison is not found. Printing the api.token.raw probe when Bison was not found at all gives strange configure output, let's just make the whole check conditional. --- configure.ac | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/configure.ac b/configure.ac index 6d4bf6c..4e9262e 100644 --- a/configure.ac +++ b/configure.ac @@ -85,9 +85,8 @@ AS_IF([test x"$dx_cv_bison_warn_no_deprecated" = x"yes"], [AS_VAR_APPEND([BISON_COMPAT], ["${BISON_COMPAT:+ }-Wno-deprecated"])]) AC_SUBST([BISON_COMPAT]) -AS_IF([test x"$dx_cv_bison_define_cmdline" != x"yes"], - [dx_cv_bison_api_token_raw=no]) -AC_CACHE_CHECK([whether $BISON supports api.token.raw], +AS_CASE([$dx_cv_bison_define_cmdline], [yes], +[AC_CACHE_CHECK([whether $BISON supports api.token.raw], [dx_cv_bison_api_token_raw], [dx_cv_bison_api_token_raw=no cat >conftest.y <<'EOF' %token T_TEST @@ -102,8 +101,8 @@ AS_IF([$BISON --define api.token.raw conftest.y >&AS_MESSAGE_LOG_FD 2>&1], [AC_COMPUTE_INT([testval], [T_TEST], [#include "conftest.tab.c" ]) AS_IF([test "$testval" -lt 256], [dx_cv_bison_api_token_raw=yes])])]) -AS_IF([test x"$dx_cv_bison_api_token_raw" = x"yes"], - [AS_VAR_APPEND([BISON_COMPAT], [" --define api.token.raw"])]) +AS_CASE([$dx_cv_bison_api_token_raw], [yes], + [AS_VAR_APPEND([BISON_COMPAT], [" --define api.token.raw"])])]) AH_TOP([#include ]) AH_BOTTOM([#include ]) -- 2.43.2