Subject: Best approach for pkg which uses .h file existence for option enabling?
To: None <>
From: Jeff Rizzo <>
List: tech-pkg
Date: 03/30/2005 10:53:58
This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
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

...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?


Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

Version: GnuPG v1.2.6 (Darwin)