Re: [PATCH] Revert 'Fix logic error in _AC_PROG_LEX_YYTEXT_DECL (#109320)'

Paul Eggert <[email protected]>
Newsgroups gmane.comp.sysutils.autoconf.patches
Organization UCLA Computer Science Department
Message-ID <[email protected]>
On 7/16/20 7:10 AM, Zack Weinberg wrote:

> I propose to make the following additional changes, instead of reverting
> the patch:
> 
>   - Change the conftest.l used by _AC_PROG_LEX_YYTEXT_DECL so that it
> defines yywrap itself (it already defines main).  Thus, LEXLIB will
> only be set to -ll or -lfl if there's something in there *besides*
> yywrap and main that the generated scanner needs.  Document this.
> 
>   - Add a new macro, tentatively AC_FUNC_YYWRAP([action-if-not-found]),
> that tries to find a definition of yywrap in libl and libfl, sets
> LEXLIB accordingly, and failing that executes action-if-not-found,
> which defaults to AC_LIBOBJ([yywrap]).
> 
> What do you think?

Unfortunately I read this email *after* looking at the bug reports on Savannah. 
(I *hate* having multiple streams of bug reports! Can't we standardize on just 
one? If it were up to me I'd stop using Savannah and stick with just 
bug-autoconf like the Autoconf manual says - but I digress.)

The patch I installed was simpler and more conservative than what you proposed. 
It gives up on 'flex' and sets LEX back to ":" if any of the 
_AC_PROG_LEX_YYTEXT_DECL tests fail.

I had not considered the fact that -lfl is basically useless. I like your first 
suggestion, as I expect it'll make AC_PROG_LEX more useful and will encourage 
people to stop linking with -lfl which is a good thing. I'm not sure that the 
AC_FUNC_YYWRAP macro would be worth the trouble.
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.