[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 <eagle@eyrie.org> 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__],
> [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]],
> [[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.
zw
- Re: autoconf-2.69c released [beta], (continued)
- Re: autoconf-2.69c released [beta], Bob Friesenhahn, 2020/09/27
- Re: autoconf-2.69c released [beta], Gavin Smith, 2020/09/27
- Re: autoconf-2.69c released [beta], Bob Friesenhahn, 2020/09/27
- Re: autoconf-2.69c released [beta], Gavin Smith, 2020/09/27
- Re: autoconf-2.69c released [beta], Gavin Smith, 2020/09/27
- Re: autoconf-2.69c released [beta], Bob Friesenhahn, 2020/09/29
- Re: autoconf-2.69c released [beta], Russ Allbery, 2020/09/29
- Re: autoconf-2.69c released [beta],
Zack Weinberg <=
Re: autoconf-2.69c released [beta], Zack Weinberg, 2020/09/30
Message not available
- Message not available
- Re: autoconf-2.69c released [beta], Bruno Haible, 2020/09/27
- Re: autoconf-2.69c released [beta], Paul Eggert, 2020/09/27
- Re: autoconf-2.69c released [beta], Bruno Haible, 2020/09/27
- Re: autoconf-2.69c released [beta], Zack Weinberg, 2020/09/30
- Re: autoconf-2.69c released [beta], Eric Blake, 2020/09/30