[sr #110312] 2.69b: broken AC_PROG_LEX macro

Jannick <[email protected]>
Newsgroups gmane.comp.sysutils.autoconf.bugs
Message-ID <[email protected]>
Follow-up Comment #8, sr #110312 (project autoconf):

In order to mimic flex's '%option noyywrap', the generated scanner code
(inserted between the first and second %%) needs a declaration (or definition)
of yywrap _before_ the first %%:

Applying

 
diff --git a/lib/autoconf/programs.m4 b/lib/autoconf/programs.m4
index e289a018..b352ce24 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; }

to

$ git describe
v2.69c-18-gf1047b2e 

(NB: this excludes the commit 46f384f850, 'Revert to 2.69-compatible behavior
in AC_PROG_LEX') 

makes configure print (for Zack's test configure.ac below)

checking for lex output file root... lex.yy
checking for lex library... none needed
checking whether yytext is a pointer... yes


    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/support/?110312>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.