]> CyberLeo.Net >> Repos - FreeBSD/releng/7.2.git/blob - lib/bind/config.mk
Create releng/7.2 from stable/7 in preparation for 7.2-RELEASE.
[FreeBSD/releng/7.2.git] / lib / bind / config.mk
1 # $FreeBSD$
2
3 .include <bsd.own.mk>
4
5 # BIND version number
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}"'
10 .endif
11
12 CFLAGS+=        -DHAVE_CONFIG_H
13 CFLAGS+=        -D_REENTRANT -D_THREAD_SAFE
14
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}
24 .else
25 INTERNALLIB=
26 .endif
27 .endif
28
29 # GSSAPI support is incomplete in 9.3.0
30 #.if ${MK_KERBEROS} != "no"
31 #CFLAGS+=       -DGSSAPI
32 #.endif
33
34 # Enable IPv6 support if available
35 .if ${MK_INET6_SUPPORT} != "no"
36 CFLAGS+=        -DWANT_IPV6
37 .endif
38
39 # Enable crypto if available
40 .if ${MK_OPENSSL} != "no"
41 CFLAGS+=        -DOPENSSL
42 .endif
43
44 # Enable MD5 - BIND has its own implementation
45 CFLAGS+=        -DUSE_MD5
46
47 # Endianness
48 .if ${MACHINE_ARCH} == "powerpc" || ${MACHINE_ARCH} == "sparc64"
49 CFLAGS+=        -DWORDS_BIGENDIAN
50 .endif
51
52 # Default file locations
53 LOCALSTATEDIR=  /var
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"'
60
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}
64 .endif
65
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
69 .else
70 ISC_ATOMIC_ARCH=        ${MACHINE_ARCH}
71 .endif
72
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 \
80                 -I${LIB_BIND_DIR}/dns
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 \
89                 -I${LIB_BIND_DIR}/isc
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
94 .endif
95 BIND_DPADD=     ${LIBBIND9} ${LIBDNS} ${LIBISCCC} ${LIBISCCFG} \
96                 ${LIBISC} ${LIBLWRES}
97 .if ${MK_BIND_LIBS} != "no"
98 BIND_LDADD=     -lbind9 -ldns -lisccc -lisccfg -lisc -llwres
99 .else
100 BIND_LDADD=     ${BIND_DPADD}
101 .endif
102
103 # Link against crypto library
104 .if ${MK_OPENSSL} != "no"
105 CRYPTO_DPADD=   ${LIBCRYPTO}
106 CRYPTO_LDADD=   -lcrypto
107 .endif
108
109 PTHREAD_DPADD=  ${LIBPTHREAD}
110 PTHREAD_LDADD=  -lpthread
111