X-Git-Url: https://git.draconx.ca/gitweb/cdecl99.git/blobdiff_plain/566e87bb15a98ed499e79b45f6c834ad0ffdc3b7..ad172f6d46ad5b36fdc9cc34a2450c93f48b0f99:/configure.ac diff --git a/configure.ac b/configure.ac index f1bd702..b963324 100644 --- a/configure.ac +++ b/configure.ac @@ -98,6 +98,26 @@ 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], + [dx_cv_bison_api_token_raw], [dx_cv_bison_api_token_raw=no +cat >conftest.y <<'EOF' +%token T_TEST +%{ +int yylex(void) { return 0; } +void yyerror(const char *msg) { } +%} +%% +input: +EOF +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"])]) + AH_TOP([#include ]) AH_BOTTOM([#include ])