[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: |
Thu, 28 Dec 2006 18:49:14 -0500 |
User-agent: |
Thunderbird 1.5.0.9 (Macintosh/20061207) |
Paul Eggert wrote:
But there are at least two regressions here. First, the one reported
by Andrey Simonenko in
<http://lists.gnu.org/archive/html/bug-autoconf/2006-12/msg00026.html>,
where AC_DEFINE([DEF(x)], [somevalue]) does not work in Autoconf 2.61
as it did in Autoconf 2.59. Second, the one I introduced in
<http://lists.gnu.org/archive/html/bug-autoconf/2006-12/msg00031.html>,
which explicitly generates a warning when you invoke
AC_DEFINE([DEF(x)], [somevalue]).
Ah, I didn't notice that you had added this warning.
Regarding Andrey Simonenko's complaint, it has to do with old-style
#define templates in the config.h.in file, which are now deprecated
according to the manual. In particular, he was relying on the old (no
longer documented?) behavior that if you #define VAR VALUE in the .h.in
file then it gets replaced, but it doesn't get replaced if you do just
#define VAR [no value]. He wanted to do the same thing for a macro with
arguments, i.e. #define VAR(args) [no value] and have it not be
replaced. I'm not sure what is the rationale to support this
deprecated, no-longer-documented behavior in the context of a "new"
feature (macros with arguments). (It's not a regression since it was
never documented.)
However, the source of this "regression" (if you want to call it that)
seems to be revision 1.83 of status.m4 (see your 2006-01-06 entry in the
ChangeLog). In particular, prior to that change, the conftest.defines
sed pattern skipped to the close-parenthesis (if there was an
open-parenthesis after the macro name) before checking to see whether
the #define had a value. It would be fairly easy to go back to this
behavior if we wanted to, I guess, but I don't really see the point.
Regarding the second problem, I have fixed it in the attached patch. In
particular, it now always traces just the name of the macro, not
including the argument list, matching the behavior of AH_TEMPLATE.
Attached is a patch, with ChangeLog entry below.
Steven
2006-12-28 Steven G. Johnson <address@hidden>
* lib/autoconf/general.m4 (AC_DEFINE_TRACE): Don't include
preprocessor macro arguments in traced name.
* doc/autoconf.texi (Defining symbols): Document longstanding
support for AC_DEFINE-ing macros with arguments, and document
behavior when the same variable has multiple AC_DEFINEs.
* lib/autoconf/fortran.m4 (_AC_FC_WRAPPERS): Revert to the
old implementation which AC_DEFINEs the FC_FUNC and FC_FUNC_
macros directly, giving much shorter and simpler code.
diff.out
Description: Binary data