[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: AS_IF
From: |
Bruno Haible |
Subject: |
Re: AS_IF |
Date: |
Mon, 05 Oct 2020 01:40:39 +0200 |
User-agent: |
KMail/5.1.3 (Linux/4.4.0-189-generic; KDE/5.18.0; x86_64; ; ) |
Hi Paul,
> The third patch merely streamlines 'configure' when running on platforms like
> Solaris that need not use libsigsegv.
>
> - if test "$gl_cv_lib_sigsegv" = yes \
> - && test "$gl_cv_sys_xsi_stack_overflow_heuristic" != 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],
> + [AC_SUBST([LIBCSTACK], [$LIBSIGSEGV])
> + AC_SUBST([LTLIBCSTACK], [$LTLIBSIGSEGV])])])
Any particular reason why AS_IF is used here?
I typically don't use AS_IF because
- I find a line of shell code more readable than a mix between m4 syntax
and shell syntax,
- it's yet another step in the learning curve, for someone who wants to
understand how Autoconf macros work.
The Autoconf documentation says
AS_IF "ensures any required macros ... are expanded before
the first test."
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.
Bruno
Re: grep-3.5 fails to build on Solaris when libsigsegv is installed, Paul Eggert, 2020/10/05