Subject: best practise of adding dependency on getopt.h?
To: Packages Technical List NetBSD Discussion <tech-pkg@netbsd.org>
From: Georg Schwarz <georg.schwarz@freenet.de>
List: tech-pkg
Date: 01/01/2007 17:10:02
I discovered that a package (wip/weplab) requires getopt.h to compile  
which is not present on Solaris 7.
I added the following lines to the Makefile:

.if !exists(/usr/include/getopt.h)
.include "../../devel/libgetopt/buildlink3.mk"
LIBS+=  ${BUILDLINK_LDADD.getopt:Q}
.endif


is this the right way to do it? Should I in addition evaluate some  
"Prefer pkgsrc" variable and, if that one is set, include pkgsrc's  
libgetopt?

A more general question: should BUILDLINK_LDADD.* be added to LIBS or  
to LDFLAGS?


-- 
Georg Schwarz    http://home.pages.de/~schwarz/
georg.schwarz@freenet.de  +49 151 11559652