[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: AS_IF
From: |
Paul Eggert |
Subject: |
Re: AS_IF |
Date: |
Sun, 4 Oct 2020 18:50:21 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 |
On 10/4/20 4:40 PM, Bruno Haible wrote:
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.
I was playing it safe based on this NEWS item from Autoconf 2.69c:
- Autoconf macros that use AC_REQUIRE internally, are not safe to
use inside of hand-written shell control-flow constructs. Use
AS_IF, AS_CASE, AS_FOR, etc. instead. (See the “Prerequisite
Macros” section of the manual for further explanation.)
Since I didn't know whether the macros in question used AC_REQUIRE internally, I
played it safe.
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."
0001-c-stack-avoid-AS_IF.patch
Description: Text Data
Re: grep-3.5 fails to build on Solaris when libsigsegv is installed, Paul Eggert, 2020/10/05