[Top][All Lists]

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

Re: bad m4 quotation? (was: echo "enhancement" leads to confused legacy

From: Stepan Kasal
Subject: Re: bad m4 quotation? (was: echo "enhancement" leads to confused legacy script tools...)
Date: Tue, 28 Mar 2006 15:09:24 +0200
User-agent: Mutt/1.4.1i

Hello Ralf,

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. [*]

(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.)

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.

[*]  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.  ;-)

Have a nice day,

reply via email to

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