[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: |
Steven G. Johnson |
Subject: |
Re: autoconf 2.61: AC_DEFINE variable with parenthesis |
Date: |
Tue, 26 Dec 2006 20:37:02 -0500 |
User-agent: |
Thunderbird 1.5.0.9 (Macintosh/20061207) |
Paul Eggert wrote:
That could well be, but it was never documented and it's not clear
to me what the semantics would be. Are arbitrary characters allowed
in the macro name? Surely not.
No, just things that are valid in cpp #defines.
> What happens if we have
AC_DEFINE([NAME(x)], ...) followed by AC_DEFINE([NAME(y)], ...)
followed by AC_DEFINE([NAME], ...)?
The same thing that happens if you do AC_DEFINE([NAME],[VAL1]) followed
by AC_DEFINE([NAME],[VAL2]): the last definition encountered is the one
used.
(Not that the case of multiple AC_DEFINEs is well documented even in the
ordinary case of no-argument macros, so I'm not sure why you should
single out the case here.)
None of this stuff seems
clear to me at all, with the old version.
>
I'm open to having it be supported, but if so, these loose ends would
need to be tied down, and the feature would need to be documented.
(The hard part is probably the documentation....)
I think you're making it out to be more complicated than it is. In the
@defmac AC_DEFINE, in autoconf.tex, all we need to do is to add a single
sentence, after the sentence "@var{variable} should be a C identifier
that contains only letters, digits, and underscores," something like:
"Using the same syntax as in C @samp{#define} macros, @var{variable} may
also be suffixed with a parenthesized, comma-delimited argument list to
define a preprocessor macro with arguments."
Steven