2004-09-21 19:01:48 +00:00
|
|
|
# $FreeBSD$
|
|
|
|
|
2004-09-22 12:13:58 +00:00
|
|
|
# BIND version number
|
2004-09-21 19:01:48 +00:00
|
|
|
CFLAGS+= -DVERSION='"9.3.0rc4"'
|
|
|
|
|
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}
|
|
|
|
SHLIB_MAJOR= ${LIBINTERFACE}
|
|
|
|
CFLAGS+= -DLIBREVISION=${LIBREVISION}
|
|
|
|
SHLIB_MINOR= ${LIBINTERFACE}
|
|
|
|
CFLAGS+= -DLIBAGE=${LIBAGE}
|
|
|
|
.endif
|
|
|
|
|
|
|
|
# GSSAPI support is incomplete in 9.3.0rc4
|
|
|
|
#.if !defined(NO_KERBEROS)
|
|
|
|
#CFLAGS+= -DGSSAPI
|
|
|
|
#.endif
|
|
|
|
|
2004-09-22 12:13:58 +00:00
|
|
|
# Enable IPv6 support if available
|
2004-09-21 19:01:48 +00:00
|
|
|
.if !defined(NOINET6)
|
|
|
|
CFLAGS+= -DWANT_IPV6
|
|
|
|
.endif
|
|
|
|
|
2004-09-22 12:13:58 +00:00
|
|
|
# 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"
|
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-21 19:01:48 +00:00
|
|
|
LOCALSTATEDIR= /var/run
|
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
|
|
|
|
|
|
|
|
# Link against BIND libraries
|
2004-09-21 19:01:48 +00:00
|
|
|
BIND_DPADD= ${LIBBIND9} ${LIBDNS} ${LIBISCCC} ${LIBISCCFG} \
|
2004-09-22 12:13:58 +00:00
|
|
|
${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
|