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: Thomas Schwinge
Subject: Re: Inconsistency w.r.t. defining the same symbol more than once
Date: Tue, 10 Oct 2006 15:35:44 +0200
User-agent: Mutt/1.5.6+20040907i

Hello!

On Mon, Oct 09, 2006 at 02:51:54PM +0200, Stepan Kasal wrote:
> On Mon, Oct 09, 2006 at 07:24:47AM -0400, Thomas Dickey wrote:
> > [...], why isn't it documented?
> 
> this is the easier of your questions:
> 
> The behaviour is not part of the documented interface, because we do not want
> to commit it.  IOW, we do not want to guarantee that a future version of
> Autoconf will have the same behaviour.

Could you subscribe to make it documented and working behavior also for
future versions (and fix the remaining problems with it)?


> Does this present a problem for you?

Hm.  I for sure can work around it using shell variables, but it would
have been nice to be able to simply do the following:

configfrag.ac
#v+
[...]
AC_DEFINE([MACH_MACHINE_ROUTINES], [0], [MACH_MACHINE_ROUTINES])
[...]
#v-

i386/configfrag.ac
#v+
[...]
AC_DEFINE([MACH_MACHINE_ROUTINES], [1], [MACH_MACHINE_ROUTINES])
[...]
#v-

configure.ac
#v+
[...]
m4_include([configfrag.ac])
[...]
[if [ "$systype" = i386 ]; then]
  m4_include([i386/configfrag.ac])
[fi]
[...]
#v-

... and thus have the definition of `MACH_MACHINE_ROUTINES' simply
overridden to `1' instead of `0' in the case of `i386'.  But as I said, I
could also have a shell variable carry the value and only use `AC_DEFINE'
once.


> Let me give some details.
> 
> Why we decided this way:
> 1) The bug you reported was present in Autoconf for many years and
> no one has reported it.  So it seems that the feature is not used.

That's only because I only recently started to actively use the GNU Auto*
tools.  If I had done so, I had reported it earlier.  :-)

> 2) The feature is not fully implemented, as you noticed: DEFS has all
> instances, not only the last one.

Right.


Regards,
 Thomas

Attachment: signature.asc
Description: Digital signature


reply via email to

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