Subject: Re: how to deal with USE_INET6 and BUILD_DEFS?
To: Lubomir Sedlacik <>
From: Georg Schwarz <>
List: tech-pkg
Date: 03/04/2005 16:41:49
> > What would be the proer way of handling this?  Should it be checked
> > whether the system could at all use IPv6, and only in that case add
> > USE_INET6 to BUILD_DEFS, or add it unconditionally?
> you seem to have it backwards.
> system, which couldn't at all use IPv6 should not set USE_INET6.

well, they do use it, it is just that on such systems is has to be NO;
and in fact this is what mk/ makes sure:

# if the system is IPv6-ready, compile with IPv6 support turned on.
.if defined(USE_INET6)
.  if empty(USE_INET6:M[Yy][Ee][Ss]) || defined(USE_SOCKS)
USE_INET6=              NO
.  else
USE_INET6=              YES
.  endif
.elif empty(_OPSYS_HAS_INET6:M[nN][oO]) && !defined(USE_SOCKS)
USE_INET6=              YES
USE_INET6=              NO

> BUILD_DEFS should contain USE_INET6 only when it's set, BUILD_DEFS is a
> list of options the package was built with.

OK, then maybe I need to ask again to make we have the same undertanding of

USE_INET6 can be either YES or NO (so for clarity I here will refer to it as
If the way a package gets compiled depends on the setting of a switch,
should that switch (not its setting!) then be listed in BUILD_DEFS?
My understanding is yes, and it is to added independently of the setting
of that respective switch.

This is exactly what is being done for USE_INET6; c.f. e.g.
net/zebra/Makefile. However, with chat/eggdrop/Makefile things are
handled differently (and incorrectly, to my undestanding).

Now I would agree that things are different with options such as inet6
(see above), but to my knowledge these are not listed in BUILD_DEFS.

Please, if I have gotten things wrong, anyone correct me. Thanks.


Georg Schwarz  +49 178 8545053