diff options
author | des <des@FreeBSD.org> | 2004-09-22 12:13:58 +0000 |
---|---|---|
committer | des <des@FreeBSD.org> | 2004-09-22 12:13:58 +0000 |
commit | 41e930f4803c0d151b08a076f014e9458115444e (patch) | |
tree | e64094c8992b4e9318db4a40d3a0d5f30c70dced /lib | |
parent | f34045dc6a6b7c24616c69b5ba53967c243f0910 (diff) | |
download | FreeBSD-src-41e930f4803c0d151b08a076f014e9458115444e.zip FreeBSD-src-41e930f4803c0d151b08a076f014e9458115444e.tar.gz |
Clean up and comment config.mk. Centralize more stuff. Bitch if
POSIX threads libraries are not available. Add crypto support if
the crypto libraries are available. Build dnssec-{keygen,signzone}
if crypto is available.
Submitted by: (in part) dougb@
Diffstat (limited to 'lib')
-rw-r--r-- | lib/bind/bind/Makefile | 4 | ||||
-rw-r--r-- | lib/bind/bind9/Makefile | 4 | ||||
-rw-r--r-- | lib/bind/config.mk | 67 | ||||
-rw-r--r-- | lib/bind/dns/Makefile | 4 | ||||
-rw-r--r-- | lib/bind/isc/Makefile | 4 | ||||
-rw-r--r-- | lib/bind/isccc/Makefile | 4 | ||||
-rw-r--r-- | lib/bind/isccfg/Makefile | 4 | ||||
-rw-r--r-- | lib/bind/lwres/Makefile | 4 |
8 files changed, 60 insertions, 35 deletions
diff --git a/lib/bind/bind/Makefile b/lib/bind/bind/Makefile index d636bcc..2297e2f 100644 --- a/lib/bind/bind/Makefile +++ b/lib/bind/bind/Makefile @@ -60,8 +60,8 @@ SRCS+= herror.c res_comp.c res_data.c \ CFLAGS+= -I${SRCDIR}/port/freebsd/include -I${SRCDIR}/include CFLAGS+= -I${.CURDIR} -I${.CURDIR}/.. -DPADD= ${LIBPTHREAD} -LDADD= -lpthread +DPADD= ${PTHREAD_DPADD} +LDADD= ${PTHREAD_LDADD} #INCS= ${SRCDIR}/include/isc/assertions.h \ # ${SRCDIR}/include/isc/ctl.h \ diff --git a/lib/bind/bind9/Makefile b/lib/bind/bind9/Makefile index be21498..73fc1f1 100644 --- a/lib/bind/bind9/Makefile +++ b/lib/bind/bind9/Makefile @@ -13,8 +13,8 @@ SRCS= check.c getaddresses.c version.c CFLAGS+= -I${SRCDIR}/include -I${.CURDIR} -I${.CURDIR}/.. -DPADD= ${LIBPTHREAD} -LDADD= -lpthread +DPADD= ${PTHREAD_DPADD} +LDADD= ${PTHREAD_LDADD} INCS= ${SRCDIR}/include/bind9/check.h \ ${SRCDIR}/include/bind9/getaddresses.h \ diff --git a/lib/bind/config.mk b/lib/bind/config.mk index 9e09254..e950d7d 100644 --- a/lib/bind/config.mk +++ b/lib/bind/config.mk @@ -1,54 +1,79 @@ # $FreeBSD$ +# BIND version number CFLAGS+= -DVERSION='"9.3.0rc4"' +CFLAGS+= -DHAVE_CONFIG_H + +# Get version numbers (for libraries) .if defined(SRCDIR) && exists(${SRCDIR}/api) .include "${SRCDIR}/api" -.endif - -.if defined(LIB_BIND_DIR) && exists(${LIB_BIND_DIR}/config.h) -CFLAGS+= -I${LIB_BIND_DIR} -.endif - -.if defined(LIBINTERFACE) CFLAGS+= -DLIBINTERFACE=${LIBINTERFACE} SHLIB_MAJOR= ${LIBINTERFACE} -.endif - -.if defined(LIBREVISION) CFLAGS+= -DLIBREVISION=${LIBREVISION} SHLIB_MINOR= ${LIBINTERFACE} -.endif - -.if defined(LIBAGE) CFLAGS+= -DLIBAGE=${LIBAGE} .endif -CFLAGS+= -DHAVE_CONFIG_H - # GSSAPI support is incomplete in 9.3.0rc4 #.if !defined(NO_KERBEROS) #CFLAGS+= -DGSSAPI #.endif +# Enable IPv6 support if available .if !defined(NOINET6) CFLAGS+= -DWANT_IPV6 .endif -.if ${MACHINE_ARCH} == powerpc || ${MACHINE_ARCH} == sparc64 +# Enable crypto if available +.if !defined(NOCRYPT) +CFLAGS+= -DOPENSSL +.endif + +# Enable MD5 - BIND has its own implementation +CFLAGS+= -DUSE_MD5 + +# Endianness +.if ${MACHINE_ARCH} == "powerpc" || ${MACHINE_ARCH} == "sparc64" CFLAGS+= -DWORDS_BIGENDIAN .endif +# Default file locations LOCALSTATEDIR= /var/run -SYSCONFDIR= /etc - +SYSCONFDIR= /etc/namedb CFLAGS+= -DNS_LOCALSTATEDIR='"${LOCALSTATEDIR}"' CFLAGS+= -DNS_SYSCONFDIR='"${SYSCONFDIR}"' CFLAGS+= -DNAMED_CONFFILE='"${SYSCONFDIR}/named.conf"' CFLAGS+= -DRNDC_CONFFILE='"${SYSCONFDIR}/rndc.conf"' CFLAGS+= -DRNDC_KEYFILE='"${SYSCONFDIR}/rndc.key"' +# Add correct include path for config.h +.if defined(LIB_BIND_DIR) && exists(${LIB_BIND_DIR}/config.h) +CFLAGS+= -I${LIB_BIND_DIR} +.endif + +# Link against BIND libraries BIND_DPADD= ${LIBBIND9} ${LIBDNS} ${LIBISCCC} ${LIBISCCFG} \ - ${LIBISC} ${LIBLWRES} ${LIBCRYPTO} ${LIBPTHREAD} -BIND_LDADD= -lbind9 -ldns -lisccc -lisccfg -lisc -llwres \ - -lcrypto -lpthread + ${LIBISC} ${LIBLWRES} +BIND_LDADD= -lbind9 -ldns -lisccc -lisccfg -lisc -llwres + +# Link against crypto library +.if !defined(NOCRYPT) +CRYPTO_DPADD+= ${LIBCRYPTO} +CRYPTO_LDADD+= -lcrypto +.endif + +# Link against POSIX threads library +.if ${MACHINE_ARCH} == "alpha" || ${MACHINE_ARCH} == "sparc64" +.if defined(NOLIBC_R) +.error "BIND requires libc_r - define NO_BIND, or undefine NOLIBC_R" +.endif +PTHREAD_DPADD+= ${LIBC_R} +PTHREAD_LDADD+= -lc_r +.else +.if defined(NOLIBPTHREAD) +.error "BIND requires libpthread - define NO_BIND, or undefine NOLIBPTHREAD" +.endif +PTHREAD_DPADD+= ${LIBPTHREAD} +PTHREAD_LDADD+= -lpthread +.endif diff --git a/lib/bind/dns/Makefile b/lib/bind/dns/Makefile index f8cc4ac..3a3d056 100644 --- a/lib/bind/dns/Makefile +++ b/lib/bind/dns/Makefile @@ -36,8 +36,8 @@ SRCS+= acl.c adb.c byaddr.c \ CFLAGS+= -I${SRCDIR}/sec/dst/include -I${SRCDIR}/include -I${SRCDIR} CFLAGS+= -I${.CURDIR} -I${.CURDIR}/.. -DPADD= ${LIBPTHREAD} -LDADD= -lpthread +DPADD= ${CRYPTO_DPADD} ${PTHREAD_DPADD} +LDADD= ${CRYPTO_LDADD} ${PTHREAD_LDADD} DNSINCS= ${SRCDIR}/include/dns/acl.h \ ${SRCDIR}/include/dns/adb.h \ diff --git a/lib/bind/isc/Makefile b/lib/bind/isc/Makefile index 437ba09..6fc1a1f 100644 --- a/lib/bind/isc/Makefile +++ b/lib/bind/isc/Makefile @@ -37,8 +37,8 @@ SRCS+= inet_pton.c \ CFLAGS+= -I${SRCDIR}/unix/include -I${SRCDIR}/pthreads/include CFLAGS+= -I${SRCDIR}/include -I${.CURDIR} -I${.CURDIR}/.. -DPADD= ${LIBPTHREAD} -LDADD= -lpthread +DPADD= ${PTHREAD_DPADD} +LDADD= ${PTHREAD_LDADD} INCS= ${SRCDIR}/include/isc/app.h \ ${SRCDIR}/include/isc/assertions.h \ diff --git a/lib/bind/isccc/Makefile b/lib/bind/isccc/Makefile index 6b316c3..9d3d1fe 100644 --- a/lib/bind/isccc/Makefile +++ b/lib/bind/isccc/Makefile @@ -15,8 +15,8 @@ SRCS= alist.c base64.c cc.c ccmsg.c \ CFLAGS+= -I${SRCDIR}/include -I${.CURDIR} -I${.CURDIR}/.. -DPADD= ${LIBPTHREAD} -LDADD= -lpthread +DPADD= ${PTHREAD_DPADD} +LDADD= ${PTHREAD_LDADD} INCS= ${SRCDIR}/include/isccc/alist.h \ ${SRCDIR}/include/isccc/base64.h \ diff --git a/lib/bind/isccfg/Makefile b/lib/bind/isccfg/Makefile index 1f77ffc..b37a700 100644 --- a/lib/bind/isccfg/Makefile +++ b/lib/bind/isccfg/Makefile @@ -13,8 +13,8 @@ SRCS= log.c namedconf.c parser.c version.c CFLAGS+= -I${SRCDIR}/include -I${.CURDIR} -I${.CURDIR}/.. -DPADD= ${LIBPTHREAD} -LDADD= -lpthread +DPADD= ${PTHREAD_DPADD} +LDADD= ${PTHREAD_LDADD} INCS= ${SRCDIR}/include/isccfg/cfg.h \ ${SRCDIR}/include/isccfg/grammar.h \ diff --git a/lib/bind/lwres/Makefile b/lib/bind/lwres/Makefile index 4a2b6ee..c8594c6 100644 --- a/lib/bind/lwres/Makefile +++ b/lib/bind/lwres/Makefile @@ -18,8 +18,8 @@ SRCS+= context.c gai_strerror.c getaddrinfo.c gethost.c \ CFLAGS+= -I${SRCDIR}/unix/include -I${SRCDIR}/include CFLAGS+= -I${.CURDIR} -I${.CURDIR}/.. -DPADD= ${LIBPTHREAD} -LDADD= -lpthread +DPADD= ${PTHREAD_DPADD} +LDADD= ${PTHREAD_LDADD} INCS= ${SRCDIR}/include/lwres/context.h \ ${SRCDIR}/include/lwres/int.h \ |