autoconf-patches
[Top][All Lists]
Advanced

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

Re: test in a m4 macro and variable created from pushdef


From: Ralf Wildenhues
Subject: Re: test in a m4 macro and variable created from pushdef
Date: Fri, 10 Aug 2007 19:49:18 +0200
User-agent: Mutt/1.5.13 (2006-08-11)

Hello Vincent,

* Vincent Torri wrote on Fri, Aug 10, 2007 at 07:51:00AM CEST:
> On Thu, 9 Aug 2007, Eric Blake wrote:
>
>>  AM_CONDITIONAL([BUILD_DRIVER_]UP, [...])
>> calls AM_CONDITIONAL with a string consisting of UP already expanded (ok
>> if UP is alphanumeric, but with the potential for m4 syntax confusion if
>> it contains anything in the character class [][,()].
>
> both solutions:
>
> AM_CONDITIONAL([BUILD_DRIVER_]UP, [test "x${use_]DOWN[_driver}" = "xyes"])
> AM_CONDITIONAL([BUILD_DRIVER_]UP, test "x${[use_]DOWN[_driver]}" = "xyes")
>
> are working

One check to avoid further hidden issues is to
  grep UP configure
  grep DOWN configure

There seems to be at least one harmless unexpanded instance left in a
comment, hopefully fixed by the (untested) patch below.  OK to apply?

Cheers,
Ralf

2007-08-10  Ralf Wildenhues  <address@hidden>

        * lib/autoconf/general.m4 (_AC_ENABLE_IF): Expand macro
        arguments in comment.
        Report by Vincent Torri <address@hidden>.

Index: lib/autoconf/general.m4
===================================================================
RCS file: /cvsroot/autoconf/autoconf/lib/autoconf/general.m4,v
retrieving revision 1.952
diff -u -r1.952 general.m4
--- lib/autoconf/general.m4     20 Jul 2007 23:11:52 -0000      1.952
+++ lib/autoconf/general.m4     10 Aug 2007 17:43:07 -0000
@@ -1389,7 +1389,7 @@
 # OPTION is either "enable" or "with".
 #
 m4_define([_AC_ENABLE_IF],
-[# Check whether --$1-$2 was given.
address@hidden:@ Check whether --$1-$2 was given.
 _AC_ENABLE_IF_ACTION([$1], m4_translit([$2], [-.], [__]), [$3], [$4])[]dnl
 ])
 




reply via email to

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