6 .if defined(BIND_DIR) && exists(${BIND_DIR}/version)
7 .include "${BIND_DIR}/version"
8 BIND_VERSION= ${MAJORVER}.${MINORVER}.${PATCHVER}${RELEASETYPE}${RELEASEVER}
9 CFLAGS+= -DVERSION='"${BIND_VERSION}"'
12 CFLAGS+= -DHAVE_CONFIG_H
13 CFLAGS+= -D_REENTRANT -D_THREAD_SAFE
15 # Get version numbers (for libraries)
16 .if defined(SRCDIR) && exists(${SRCDIR}/api)
17 .include "${SRCDIR}/api"
18 CFLAGS+= -DLIBINTERFACE=${LIBINTERFACE}
19 CFLAGS+= -DLIBREVISION=${LIBREVISION}
20 CFLAGS+= -DLIBAGE=${LIBAGE}
21 .if ${MK_BIND_LIBS} != "no"
22 SHLIB_MAJOR= ${LIBINTERFACE}
23 SHLIB_MINOR= ${LIBINTERFACE}
29 # GSSAPI support is incomplete in 9.3.0
30 #.if ${MK_KERBEROS} != "no"
34 # Enable IPv6 support if available
35 .if ${MK_INET6_SUPPORT} != "no"
39 # Enable crypto if available
40 .if ${MK_OPENSSL} != "no"
44 # Enable MD5 - BIND has its own implementation
48 .if ${MACHINE_ARCH} == "powerpc" || ${MACHINE_ARCH} == "sparc64"
49 CFLAGS+= -DWORDS_BIGENDIAN
52 # Default file locations
54 SYSCONFDIR= /etc/namedb
55 CFLAGS+= -DNS_LOCALSTATEDIR='"${LOCALSTATEDIR}"'
56 CFLAGS+= -DNS_SYSCONFDIR='"${SYSCONFDIR}"'
57 CFLAGS+= -DNAMED_CONFFILE='"${SYSCONFDIR}/named.conf"'
58 CFLAGS+= -DRNDC_CONFFILE='"${SYSCONFDIR}/rndc.conf"'
59 CFLAGS+= -DRNDC_KEYFILE='"${SYSCONFDIR}/rndc.key"'
61 # Add correct include path for config.h
62 .if defined(LIB_BIND_DIR) && exists(${LIB_BIND_DIR}/config.h)
63 CFLAGS+= -I${LIB_BIND_DIR}
66 # Use the right version of the atomic.h file from lib/isc
67 .if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386"
68 ISC_ATOMIC_ARCH= x86_32
70 ISC_ATOMIC_ARCH= ${MACHINE_ARCH}
73 # Link against BIND libraries
74 .if ${MK_BIND_LIBS} == "no"
75 LIBBIND9= ${LIB_BIND_REL}/bind9/libbind9.a
76 CFLAGS+= -I${BIND_DIR}/lib/bind9/include
77 LIBDNS= ${LIB_BIND_REL}/dns/libdns.a
78 CFLAGS+= -I${BIND_DIR}/lib/dns/include/dst \
79 -I${BIND_DIR}/lib/dns/include \
81 LIBISCCC= ${LIB_BIND_REL}/isccc/libisccc.a
82 CFLAGS+= -I${BIND_DIR}/lib/isccc/include
83 LIBISCCFG= ${LIB_BIND_REL}/isccfg/libisccfg.a
84 CFLAGS+= -I${BIND_DIR}/lib/isccfg/include
85 LIBISC= ${LIB_BIND_REL}/isc/libisc.a
86 CFLAGS+= -I${BIND_DIR}/lib/isc/unix/include \
87 -I${BIND_DIR}/lib/isc/pthreads/include \
88 -I${BIND_DIR}/lib/isc/include \
90 LIBLWRES= ${LIB_BIND_REL}/lwres/liblwres.a
91 CFLAGS+= -I${BIND_DIR}/lib/lwres/unix/include \
92 -I${BIND_DIR}/lib/lwres/include \
93 -I${LIB_BIND_DIR}/lwres
95 BIND_DPADD= ${LIBBIND9} ${LIBDNS} ${LIBISCCC} ${LIBISCCFG} \
97 .if ${MK_BIND_LIBS} != "no"
98 BIND_LDADD= -lbind9 -ldns -lisccc -lisccfg -lisc -llwres
100 BIND_LDADD= ${BIND_DPADD}
103 # Link against crypto library
104 .if ${MK_OPENSSL} != "no"
105 CRYPTO_DPADD= ${LIBCRYPTO}
106 CRYPTO_LDADD= -lcrypto
109 PTHREAD_DPADD= ${LIBPTHREAD}
110 PTHREAD_LDADD= -lpthread