[Top][All Lists]

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

Re: bad m4 quotation?

From: Ralf Wildenhues
Subject: Re: bad m4 quotation?
Date: Tue, 28 Mar 2006 15:36:25 +0200
User-agent: Mutt/1.5.11

Hi Stepan,

* Stepan Kasal wrote on Tue, Mar 28, 2006 at 03:09:24PM CEST:
> you metioned that the call
>       AC_CONFIG_FILES([m4_default([$1], [foobar])])
> (which appears inside a definition of an Autoconf macro) doesn't work;
> the outer pair of quotes have to be removed.
> As we both know, the reason is that the first parameter of
> AC_CONFIG_FOOS is split by whitespace before any expansion. [*]

Oh, I did not look AC_CONFIG_FOOS up.

> [*]  I vaguely recall contemplating this, but I wasn't able to find
> strong reasons for any of the two variants.  So I tried to be backward
> compatible in this case.  ;-)

Backwards compatible to what?  It breaks the AC_PREFIX_CONFIG_H macro.
So if there is a need for backwards compatibility here, it should be
noted, so that we can tell that Guido so he updates the macro in the
archive.  And that we do not accidentally break compatibility here

> (I think that the individual words are expanded later, but I'm afraid
> that the only well tested case is when the words are literal strings,
> without any quotes or macro calls.)

Hmm.  This is a rather important macro, you know.  ;-)

> Actually, m4_default is usually used this way: the logic ``if the
> parameter given was empty, use this one'' should be executed before
> the macro call, the macro called (AC_CONFIG_FILES in this case) shall
> see only the result of this decision.

Well, I took m4_default as an example.  The actual macro uses `ifelse'
(sic).  It would be very helpful if you could take a look at it.


reply via email to

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