2004-09-21 19:01:48 +00:00
|
|
|
# $FreeBSD$
|
|
|
|
|
2006-03-17 18:54:44 +00:00
|
|
|
.include <bsd.own.mk>
|
|
|
|
|
2004-09-22 12:13:58 +00:00
|
|
|
# BIND version number
|
2004-09-23 07:52:51 +00:00
|
|
|
.if defined(BIND_DIR) && exists(${BIND_DIR}/version)
|
|
|
|
.include "${BIND_DIR}/version"
|
|
|
|
BIND_VERSION= ${MAJORVER}.${MINORVER}.${PATCHVER}${RELEASETYPE}${RELEASEVER}
|
|
|
|
CFLAGS+= -DVERSION='"${BIND_VERSION}"'
|
|
|
|
.endif
|
2004-09-21 19:01:48 +00:00
|
|
|
|
2004-09-22 12:13:58 +00:00
|
|
|
CFLAGS+= -DHAVE_CONFIG_H
|
|
|
|
|
|
|
|
# Get version numbers (for libraries)
|
2004-09-21 19:01:48 +00:00
|
|
|
.if defined(SRCDIR) && exists(${SRCDIR}/api)
|
|
|
|
.include "${SRCDIR}/api"
|
|
|
|
CFLAGS+= -DLIBINTERFACE=${LIBINTERFACE}
|
|
|
|
CFLAGS+= -DLIBREVISION=${LIBREVISION}
|
|
|
|
CFLAGS+= -DLIBAGE=${LIBAGE}
|
2006-03-17 18:54:44 +00:00
|
|
|
.if ${MK_BIND_LIBS} != "no"
|
2004-09-24 13:42:00 +00:00
|
|
|
SHLIB_MAJOR= ${LIBINTERFACE}
|
|
|
|
SHLIB_MINOR= ${LIBINTERFACE}
|
|
|
|
.else
|
2004-10-24 15:46:50 +00:00
|
|
|
INTERNALLIB=
|
2004-09-24 13:42:00 +00:00
|
|
|
.endif
|
2004-09-21 19:01:48 +00:00
|
|
|
.endif
|
|
|
|
|
2004-09-23 07:21:02 +00:00
|
|
|
# GSSAPI support is incomplete in 9.3.0
|
2006-03-17 18:54:44 +00:00
|
|
|
#.if ${MK_KERBEROS} != "no"
|
2004-09-21 19:01:48 +00:00
|
|
|
#CFLAGS+= -DGSSAPI
|
|
|
|
#.endif
|
|
|
|
|
2004-09-22 12:13:58 +00:00
|
|
|
# Enable IPv6 support if available
|
2006-03-17 18:54:44 +00:00
|
|
|
.if ${MK_INET6_SUPPORT} != "no"
|
2004-09-21 19:01:48 +00:00
|
|
|
CFLAGS+= -DWANT_IPV6
|
|
|
|
.endif
|
|
|
|
|
2004-09-22 12:13:58 +00:00
|
|
|
# Enable crypto if available
|
2006-03-17 18:54:44 +00:00
|
|
|
.if ${MK_OPENSSL} != "no"
|
2004-09-22 12:13:58 +00:00
|
|
|
CFLAGS+= -DOPENSSL
|
|
|
|
.endif
|
|
|
|
|
|
|
|
# Enable MD5 - BIND has its own implementation
|
|
|
|
CFLAGS+= -DUSE_MD5
|
|
|
|
|
|
|
|
# Endianness
|
|
|
|
.if ${MACHINE_ARCH} == "powerpc" || ${MACHINE_ARCH} == "sparc64"
|
2004-09-21 19:01:48 +00:00
|
|
|
CFLAGS+= -DWORDS_BIGENDIAN
|
|
|
|
.endif
|
|
|
|
|
2004-09-22 12:13:58 +00:00
|
|
|
# Default file locations
|
2004-09-23 04:46:56 +00:00
|
|
|
LOCALSTATEDIR= /var
|
2004-09-22 12:13:58 +00:00
|
|
|
SYSCONFDIR= /etc/namedb
|
2004-09-21 19:01:48 +00:00
|
|
|
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"'
|
|
|
|
|
2004-09-22 12:13:58 +00:00
|
|
|
# Add correct include path for config.h
|
|
|
|
.if defined(LIB_BIND_DIR) && exists(${LIB_BIND_DIR}/config.h)
|
|
|
|
CFLAGS+= -I${LIB_BIND_DIR}
|
|
|
|
.endif
|
|
|
|
|
2007-06-02 23:19:58 +00:00
|
|
|
# Use the right version of the atomic.h file from lib/isc
|
2007-06-03 16:49:57 +00:00
|
|
|
.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386"
|
2007-06-02 23:19:58 +00:00
|
|
|
ISC_ATOMIC_ARCH= x86_32
|
|
|
|
.else
|
|
|
|
ISC_ATOMIC_ARCH= ${MACHINE_ARCH}
|
|
|
|
.endif
|
|
|
|
|
2004-09-22 12:13:58 +00:00
|
|
|
# Link against BIND libraries
|
2006-03-17 18:54:44 +00:00
|
|
|
.if ${MK_BIND_LIBS} == "no"
|
2004-09-24 13:42:00 +00:00
|
|
|
LIBBIND9= ${LIB_BIND_REL}/bind9/libbind9.a
|
|
|
|
CFLAGS+= -I${BIND_DIR}/lib/bind9/include
|
|
|
|
LIBDNS= ${LIB_BIND_REL}/dns/libdns.a
|
2005-03-17 08:35:21 +00:00
|
|
|
CFLAGS+= -I${BIND_DIR}/lib/dns/include/dst \
|
2004-09-24 13:42:00 +00:00
|
|
|
-I${BIND_DIR}/lib/dns/include \
|
|
|
|
-I${LIB_BIND_DIR}/dns
|
|
|
|
LIBISCCC= ${LIB_BIND_REL}/isccc/libisccc.a
|
|
|
|
CFLAGS+= -I${BIND_DIR}/lib/isccc/include
|
|
|
|
LIBISCCFG= ${LIB_BIND_REL}/isccfg/libisccfg.a
|
|
|
|
CFLAGS+= -I${BIND_DIR}/lib/isccfg/include
|
|
|
|
LIBISC= ${LIB_BIND_REL}/isc/libisc.a
|
|
|
|
CFLAGS+= -I${BIND_DIR}/lib/isc/unix/include \
|
2007-06-02 23:19:58 +00:00
|
|
|
-I${BIND_DIR}/lib/isc/pthreads/include \
|
2004-09-24 13:42:00 +00:00
|
|
|
-I${BIND_DIR}/lib/isc/include \
|
|
|
|
-I${LIB_BIND_DIR}/isc
|
|
|
|
LIBLWRES= ${LIB_BIND_REL}/lwres/liblwres.a
|
|
|
|
CFLAGS+= -I${BIND_DIR}/lib/lwres/unix/include \
|
|
|
|
-I${BIND_DIR}/lib/lwres/include \
|
|
|
|
-I${LIB_BIND_DIR}/lwres
|
|
|
|
.endif
|
2004-09-21 19:01:48 +00:00
|
|
|
BIND_DPADD= ${LIBBIND9} ${LIBDNS} ${LIBISCCC} ${LIBISCCFG} \
|
2004-09-22 12:13:58 +00:00
|
|
|
${LIBISC} ${LIBLWRES}
|
2006-03-17 18:54:44 +00:00
|
|
|
.if ${MK_BIND_LIBS} != "no"
|
2004-09-22 12:13:58 +00:00
|
|
|
BIND_LDADD= -lbind9 -ldns -lisccc -lisccfg -lisc -llwres
|
2004-09-24 13:42:00 +00:00
|
|
|
.else
|
|
|
|
BIND_LDADD= ${BIND_DPADD}
|
|
|
|
.endif
|
2004-09-22 12:13:58 +00:00
|
|
|
|
|
|
|
# Link against crypto library
|
2006-03-17 18:54:44 +00:00
|
|
|
.if ${MK_OPENSSL} != "no"
|
2004-09-22 14:36:12 +00:00
|
|
|
CRYPTO_DPADD= ${LIBCRYPTO}
|
|
|
|
CRYPTO_LDADD= -lcrypto
|
2004-09-22 12:13:58 +00:00
|
|
|
.endif
|
2007-06-02 23:19:58 +00:00
|
|
|
|
|
|
|
PTHREAD_DPADD= ${LIBPTHREAD}
|
|
|
|
PTHREAD_LDADD= -lpthread
|
|
|
|
|