autoconf
[Top][All Lists]
Advanced

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

Re: [PATCH] bug fixes for AS_IF and _AC_LANG_COMPILER_GNU


From: Paul Eggert
Subject: Re: [PATCH] bug fixes for AS_IF and _AC_LANG_COMPILER_GNU
Date: Fri, 10 Jul 2020 13:44:48 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0

On 3/14/20 7:31 AM, Jannick wrote:

- AS_IF: cope with blank false branch.
- _AC_LANG_COMPILER_GNU: make cached result available to calling macro.

Thanks, I installed the _AC_LANG_COMPILER_GNU patch into the master branch on savannah. However, the AS_IF patch causes 'make check' to fail, because tests/compile.at's AC_RUN_IFELSE test does this:

AC_RUN_IFELSE([AC_LANG_PROGRAM([], [return 2])],
              [AC_MSG_ERROR([saw `return 2' as a success])],
              [estatus=$?
test $estatus != 2 &&
  AC_MSG_ERROR([did not get as 2 exit status: $estatus])])

and because the AS_IF patch inserts ":" between the "else" and the "estatus=$?", the ":" sets $? to 0 and makes the test fail. So I did not install that patch.

Autoconf's nblank macros don't test whether the argument eventually expands to just blanks; it tests whether the argument currently consists of just blanks. So I think we'll just have to advise people to write [] instead of [[]] when they want the empty string. The Autoconf manual already contains a couple of examples illustrating why [] and [[]] are not the same thing, so I added one more example by installing the attached documentation patch.

Attachment: 0001-Document-AS_IF-.-.-glitch.patch
Description: Text Data


reply via email to

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