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