[Top][All Lists]

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

Re: autoconf-2.69c released [beta]

From: Zack Weinberg
Subject: Re: autoconf-2.69c released [beta]
Date: Wed, 30 Sep 2020 09:26:37 -0400

On Tue, Sep 29, 2020 at 8:04 PM Russ Allbery <> wrote:
> This is separate from the question of how Autoconf should handle old
> configure scripts and how autoupdate should work, but while you're
> manually making changes to macros anyway, you will probably be happier in
> the long run if you quote all arguments and make a habit of using AS_IF
> instead of open-coded shell if statements.
> # Test for C compiler __func__ support
> AS_IF([test "$ac_cv_have_C__func__" != 'yes'], [
> AC_CACHE_CHECK([for C compiler __func__ support], [ac_cv_have_C__func__],
> [[const char *func=__func__;
> return (func != 0 ? 0 : 1);
> ]])],
> [ac_cv_have_C__func__='yes'],
> [ac_cv_have_C__func__='no'])])
> AS_IF([test "$ac_cv_have_C__func__" = 'yes'], [
>  AC_DEFINE([HAS_C__func__],[1],[Define if C compiler supports __func__])
> ])
> ])
> This will protect against a lot of edge cases.

Very much agree.  We have several reports already that the betas break
old scripts with insufficient quoting and/or open-coded if statements,
and all I can do about them is put dire warnings in NEWS, because
autoupdate can only act on obsolete _macro names_...

Also I want to point out that the AS_IF wrapping the AC_CACHE_CHECK is
unnecessary: AC_CACHE_CHECK does the same thing internally.


reply via email to

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