[PATCH 4/4] manywarnings: use AS_IF

2023-04-23 Thread Paul Eggert
* m4/manywarnings.m4 (gl_MANYWARN_COMPLEMENT): Use AS_IF when the body contains Autoconf macros that could conceivably require something. --- ChangeLog | 5 + m4/manywarnings.m4 | 10 -- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog

Re: AS_IF

2020-10-12 Thread Zack Weinberg
On Mon, Oct 12, 2020 at 3:01 AM Paul Eggert wrote: > On 10/6/20 5:52 PM, Zack Weinberg wrote: > > 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

Re: AS_IF

2020-10-12 Thread Paul Eggert
On 10/6/20 5:52 PM, Zack Weinberg wrote: 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

Re: AS_IF

2020-10-06 Thread Zack Weinberg
t, 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

Re: AS_IF

2020-10-06 Thread Bruno Haible
> 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

Re: AS_IF

2020-10-04 Thread Paul Eggert
: - 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 whethe

Re: AS_IF

2020-10-04 Thread Bruno Haible
yes; then > - AC_SUBST([LIBCSTACK], [$LIBSIGSEGV]) > - AC_SUBST([LTLIBCSTACK], [$LTLIBSIGSEGV]) > - fi > + AS_IF([test "$gl_cv_sys_xsi_stack_overflow_heuristic" != yes], > + [gl_LIBSIGSEGV > + AS_IF([test "$gl_cv_lib_sigsegv" = yes], > +