From 15ada9d3a0e46c28c0a3af2357b64bbd14d818a8 Mon Sep 17 00:00:00 2001 From: Jannick Date: Tue, 3 Nov 2020 10:11:23 -0500 Subject: [PATCH] _AC_PROG_YYTEXT_DECL: Forward declare yywrap (#110312) MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Some versions of lex need you to forward-declare yywrap in a %{ %} block before the rules section, if you’re going to define it yourself. May help with bug #110312. * lib/autoconf/programs.m4 (_AC_PROG_LEX_YYTEXT_DECL): In the test input to lex, forward-declare yywrap before the rules. --- lib/autoconf/programs.m4 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/autoconf/programs.m4 b/lib/autoconf/programs.m4 index e289a0185..b352ce244 100644 --- a/lib/autoconf/programs.m4 +++ b/lib/autoconf/programs.m4 @@ -746,6 +746,9 @@ fi])]) # declares yytext as a char * by default. AC_DEFUN([_AC_PROG_LEX_YYTEXT_DECL], [cat >conftest.l <<_ACEOF[ +%{ +int yywrap(void); +%} %% a { ECHO; } b { REJECT; } -- 2.47.3