[Top][All Lists]

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

Re: autoconf 2.61: AC_DEFINE variable with parenthesis

From: Stepan Kasal
Subject: Re: autoconf 2.61: AC_DEFINE variable with parenthesis
Date: Tue, 19 Dec 2006 12:32:04 +0100
User-agent: Mutt/


On Mon, Dec 18, 2006 at 01:29:54PM -0800, Paul Eggert wrote:
> >> > AC_DEFINE([DEF(x)], [somevalue])
> >> 
> >> Ouch!  That's not supported, and I'm surprised you got it to work as
> >> well as it did.
> >
> > status.m4 contains a code which supports this, so until now I had no
> > idea that this may be deprecated.  I think this feature was available
> > since the beginning of Autoconf.
> When you say "this", do you mean AC_DEFINE([DEF(x)], [somevalue]),
> or do you mean merely putting something like this into
>   #define DEF(x) somevalue
> and having 'configure' ignore it if DEF is not otherwise affected by
> substitutions?

I meant the former; the sed script which creates conftest.defines
from confdefs.h has a special code to understand macros with
parameters.  After some digging in the CVS, I found out that this
code was added to acgeneral.m4 rel. 1.261, dated 1999-10-30, "merged
from the experimental branch".

So the feature, though undocumented, was there for 7 years.
OTOH, I see that the use of it is very limited.

>    AC_DEFINE([DEF(x], [) x])

No, I do not care about this, of course.  But I think that
    AC_DEFINE([DEF(x)], [somevalue])
is quite natural.

I'm not sure whether deprecate it or not; unless new reasons appear,
let's leave it deprecated.

The sitation with templates is clear, OTOH: anything but "#undef FOO"
is deprecated.  (I plan to fix the regression, though.)


reply via email to

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