From: Nick Bowler Date: Wed, 6 Dec 2023 01:34:20 +0000 (-0500) Subject: Skip Bison api.token.raw probe if Bison is not found. X-Git-Tag: v1.3~66 X-Git-Url: https://git.draconx.ca/gitweb/cdecl99.git/commitdiff_plain/eb7be85350a2dd971bb509e9191c33fc640cd0d5 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. --- 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 ])