diff --git a/lib/Makefile b/lib/Makefile index 20258f5b7d26..e0b90541b771 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.118 2007/11/04 23:28:17 tls Exp $ +# $NetBSD: Makefile,v 1.119 2007/11/05 04:58:52 tls Exp $ # from: @(#)Makefile 5.25.1.1 (Berkeley) 5/7/91 .include @@ -10,12 +10,6 @@ SUBDIR= csu libc .WAIT libarch libbsdmalloc libbluetooth libbz2 \ libpthread_dbg libpuffs libresolv librmt librpcsvc librt libsdp \ libterm libusbhid libutil libwrap liby libz -# XXX These bind9/ISC libraries should depend on each other but the -# XXX dependency ordering requires considerable investigation. -# XXX Please preserve the order below so we know the order ISC links -# XXX them in in their Makefiles. -SUBDIR+= libbind9 libdns liblwres libisccfg libisccc libisc - .if (${MKSKEY} != "no") SUBDIR+= libskey .endif @@ -87,6 +81,12 @@ SUBDIR+= libkrb5 # depends on libcrypto and more SUBDIR+= librefuse # depends on libpuffs .endif +# XXX These bind9/ISC libraries should depend on each other but the +# XXX dependency ordering requires considerable investigation. +# XXX Please preserve the order below so we know the order ISC links +# XXX them in in their Makefiles. +SUBDIR+= libbind9 libdns liblwres libisccfg libisccc libisc # dep. libpthread + #==================== 2nd library dependency barrier ==================== SUBDIR+= .WAIT diff --git a/usr.sbin/bind/Makefile.inc b/usr.sbin/bind/Makefile.inc index 1cb856f6dc43..1cdb255d2cb0 100644 --- a/usr.sbin/bind/Makefile.inc +++ b/usr.sbin/bind/Makefile.inc @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.29 2007/11/04 23:28:20 tls Exp $ +# $NetBSD: Makefile.inc,v 1.30 2007/11/05 04:58:52 tls Exp $ .if !defined(BIND9_MAKEFILE_INC) BIND9_MAKEFILE_INC=yes @@ -59,8 +59,12 @@ CPPFLAGS+= -DLIBINTERFACE=${LIBINTERFACE} \ .endif .if ${NAMED_USE_PTHREADS} == "yes" +.if !defined (LIB) || empty(LIB) LDADD+= -lpthread -DPADD+= ${LIBPTHREAD} # XXX defined in bsd.prog.mk doesn't work for src/lib +DPADD+= ${LIBPTHREAD} +.else +LIBDPLIBS+= pthread ${.CURDIR}/../libpthread +.endif .endif .if ${NAMED_USE_OPENSSL} == "yes"