Subject: Re: how to deal with USE_INET6 and BUILD_DEFS?
To: Lubomir Sedlacik <salo@Xtrmntr.org>
From: Georg Schwarz <firstname.lastname@example.org>
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/bsd.prefs.mk makes sure:
# if the system is IPv6-ready, compile with IPv6 support turned on.
. if empty(USE_INET6:M[Yy][Ee][Ss]) || defined(USE_SOCKS)
.elif empty(_OPSYS_HAS_INET6:M[nN][oO]) && !defined(USE_SOCKS)
> 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 http://home.pages.de/~schwarz/
email@example.com +49 178 8545053