autoconf
[Top][All Lists]
Advanced

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

Re: Inconsistency w.r.t. defining the same symbol more than once


From: Stepan Kasal
Subject: Re: Inconsistency w.r.t. defining the same symbol more than once
Date: Mon, 9 Oct 2006 13:03:57 +0200
User-agent: Mutt/1.4.2.1i

Hello,

On Sun, Oct 08, 2006 at 02:16:00PM +0200, Thomas Schwinge wrote:
> $ grep FOO config.h
> /* FOO 1 */
> #define FOO 0
...
> The _first_ definition (i.e. `FOO=0') will be used.

this bug was fixed in the latest release.  With ./configure generated
by Autoconf 2.60, you get:

/* FOO 1 */
#define FOO 1

So the last value set by AC_DEFINE is used.

But even though the fix was intentional, this behaviour is still
undocumented, so the more important part of the answer is what Paul
said: do not do that.

In detail:
1) The third parameter, the description, is read by autoheader, when
it is creating config.h.in, and it should be the same for all calls.
2) During the execution of ./configure, only one instance of
AC_DEFINE should be reached.

Have a nice day,
        Stepan Kasal




reply via email to

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