autoconf-patches
[Top][All Lists]
Advanced

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

Re: AS_IF


From: Zack Weinberg
Subject: Re: AS_IF
Date: Tue, 6 Oct 2020 20:52:17 -0400

On Tue, Oct 6, 2020 at 5:57 PM Bruno Haible <bruno@clisp.org> wrote:
> Paul Eggert wrote in
> <https://lists.gnu.org/archive/html/bug-gnulib/2020-10/msg00019.html>:
> > > AFAICS, this is relevant for code written directly into configure.ac. But
> > > inside an AC_DEFUN it is irrelevant, because required macros are hoisted
> > > before the body of the AC_DEFUN anyway.
...
> > But now that you mention it, AS_IF isn't needed here and I installed the
> > attached further patch. Also, to help prevent others from making a similar
> > mistake, I plan to reword the Autoconf NEWS item to start with something 
> > like
> > "Autoconf macros that use AC_REQUIRE are not safe to use in hand-written 
> > shell
> > control-flow constructs that appear outside of macros defined by AC_DEFUN."
>
> Thanks. But if you, Paul, make an incorrect assumption about what AS_IF really
> does, how many more users (who read only the documentation) will make the same
> mistake? I therefore think the documentation should be enhanced to avoid this
> misinterpretation.

I agree that this should be clarified; I just had the same
conversation in another thread. I'm not sure we should say AS_IF/CASE
are equivalent to plain shell if/case inside an AC_DEFUN; they do do
more than just make the m4 expansion stack not be empty.

Also, why is AS_FOR not documented? Maybe, instead of avoiding
mentioning it in NEWS, it should be documented?

zw



reply via email to

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