Subject: Best approach for pkg which uses .h file existence for option enabling?
To: None <tech-pkg@netbsd.org>
From: Jeff Rizzo <riz@tastylime.net>
List: tech-pkg
Date: 03/30/2005 10:53:58
This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--------------enig924F4A6BCA5BEB4E7D59C836
Content-Type: text/plain; charset=ISO-8859-15
Content-Transfer-Encoding: 7bit
I'm working on a package that does a lot of compile-time configuration
(ie, what shared objects to build) based on detecting the presence of
certain header files. For NetBSD, it isn't that hard to fix up, since
all the headers in question would be in ${PREFIX}/include, and
buildlink3 takes care of having them there or not based on my
PKG_OPTIONS settings.
For Linux, however, there's a lot of stuff like this:
CHANNEL_LIBS+=$(shell [ -f /usr/include/linux/ixjuser.h ] && echo
chan_phone.so)
...which seems more complicated, since it expects to have the include
potentially in the base system.
Mind you, I don't actually have a Linux system of any flavor to test
this on at the moment, but I'd like to do the right thing now so that
later on it'll be easier for someone to fix. :)
What's the best way of handling these? Should I remove any checks for
potentially optional things from base system directories (such as
/usr/include/linux) and assume that such things will ONLY be supported
from pkgsrc if at all?
Thanks,
+j
--------------enig924F4A6BCA5BEB4E7D59C836
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (Darwin)
iQCVAwUBQkr1ybOuUtxCgar5AQICoAP/Xl2eX81Vc3w5eHZ6HJi48DczW3hAo5mh
2irnpXezhV4QMS+jOuC436HMWb/NH83GVIf/7PB3tamzZi/DoKZtjvZCESQ+87fQ
jLjXD6oVY81ATUd8K+1KzSCtuZD2cVIxUUd2HsqoSPqcOFjoZcpAZkXaeQUKG+zQ
HKa57dIH0R8=
=fBAb
-----END PGP SIGNATURE-----
--------------enig924F4A6BCA5BEB4E7D59C836--