Index: bsd.lib.mk =================================================================== --- bsd.lib.mk (revision 243899) +++ bsd.lib.mk (working copy) @@ -45,6 +45,13 @@ STRIP?= -s .endif +.if defined(PCADD) +PCFLAGS!= ${PKGCONF} --cflags ${PCADD} +PCLIBS!= ${PKGCONF} --libs ${PCADD} +CFLAGS+= ${PCFLAGS} +LDADD+= ${PCLIBS} +.endif + .include # prefer .s to a .c, add .po, remove stuff not used in the BSD libraries Index: bsd.prog.mk =================================================================== --- bsd.prog.mk (revision 243899) +++ bsd.prog.mk (working copy) @@ -36,6 +36,17 @@ LDFLAGS+= -static .endif +.if defined(PCADD) +PCFLAGS!= ${PKGCONF} --cflags ${PCADD} +.if defined(NO_SHARED) && (${NO_SHARED} != "no" && ${NO_SHARED} != "NO") +PCLIBS!= ${PKGCONF} --libs --static ${PCADD} +.else +PCLIBS!= ${PKGCONF} --libs ${PCADD} +.endif +CFLAGS+= ${PCFLAGS} +LDADD+= ${PCLIBS} +.endif + .if defined(PROG_CXX) PROG= ${PROG_CXX} .endif