autoconf-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Paul Eggert
Subject: Re: [PATCH] Revert 'Fix logic error in _AC_PROG_LEX_YYTEXT_DECL (#109320)'
Date: Thu, 16 Jul 2020 10:16:03 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0

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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]