]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - lib/bind/config.mk
This commit was generated by cvs2svn to compensate for changes in r168433,
[FreeBSD/FreeBSD.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
14 # Get version numbers (for libraries)
15 .if defined(SRCDIR) && exists(${SRCDIR}/api)
16 .include        "${SRCDIR}/api"
17 CFLAGS+=        -DLIBINTERFACE=${LIBINTERFACE}
18 CFLAGS+=        -DLIBREVISION=${LIBREVISION}
19 CFLAGS+=        -DLIBAGE=${LIBAGE}
20 .if ${MK_BIND_LIBS} != "no"
21 SHLIB_MAJOR=    ${LIBINTERFACE}
22 SHLIB_MINOR=    ${LIBINTERFACE}
23 .else
24 INTERNALLIB=
25 .endif
26 .endif
27
28 # GSSAPI support is incomplete in 9.3.0
29 #.if ${MK_KERBEROS} != "no"
30 #CFLAGS+=       -DGSSAPI
31 #.endif
32
33 # Enable IPv6 support if available
34 .if ${MK_INET6_SUPPORT} != "no"
35 CFLAGS+=        -DWANT_IPV6
36 .endif
37
38 # Enable crypto if available
39 .if ${MK_OPENSSL} != "no"
40 CFLAGS+=        -DOPENSSL
41 .endif
42
43 # Enable MD5 - BIND has its own implementation
44 CFLAGS+=        -DUSE_MD5
45
46 # Endianness
47 .if ${MACHINE_ARCH} == "powerpc" || ${MACHINE_ARCH} == "sparc64"
48 CFLAGS+=        -DWORDS_BIGENDIAN
49 .endif
50
51 # Default file locations
52 LOCALSTATEDIR=  /var
53 SYSCONFDIR=     /etc/namedb
54 CFLAGS+=        -DNS_LOCALSTATEDIR='"${LOCALSTATEDIR}"'
55 CFLAGS+=        -DNS_SYSCONFDIR='"${SYSCONFDIR}"'
56 CFLAGS+=        -DNAMED_CONFFILE='"${SYSCONFDIR}/named.conf"'
57 CFLAGS+=        -DRNDC_CONFFILE='"${SYSCONFDIR}/rndc.conf"'
58 CFLAGS+=        -DRNDC_KEYFILE='"${SYSCONFDIR}/rndc.key"'
59
60 # Add correct include path for config.h
61 .if defined(LIB_BIND_DIR) && exists(${LIB_BIND_DIR}/config.h)
62 CFLAGS+=        -I${LIB_BIND_DIR}
63 .endif
64
65 # Link against BIND libraries
66 .if ${MK_BIND_LIBS} == "no"
67 LIBBIND9=       ${LIB_BIND_REL}/bind9/libbind9.a
68 CFLAGS+=        -I${BIND_DIR}/lib/bind9/include
69 LIBDNS=         ${LIB_BIND_REL}/dns/libdns.a
70 CFLAGS+=        -I${BIND_DIR}/lib/dns/include/dst \
71                 -I${BIND_DIR}/lib/dns/include \
72                 -I${LIB_BIND_DIR}/dns
73 LIBISCCC=       ${LIB_BIND_REL}/isccc/libisccc.a
74 CFLAGS+=        -I${BIND_DIR}/lib/isccc/include
75 LIBISCCFG=      ${LIB_BIND_REL}/isccfg/libisccfg.a
76 CFLAGS+=        -I${BIND_DIR}/lib/isccfg/include
77 LIBISC=         ${LIB_BIND_REL}/isc/libisc.a
78 CFLAGS+=        -I${BIND_DIR}/lib/isc/unix/include \
79                 -I${BIND_DIR}/lib/isc/nothreads/include \
80                 -I${BIND_DIR}/lib/isc/include \
81                 -I${LIB_BIND_DIR}/isc
82 LIBLWRES=       ${LIB_BIND_REL}/lwres/liblwres.a
83 CFLAGS+=        -I${BIND_DIR}/lib/lwres/unix/include \
84                 -I${BIND_DIR}/lib/lwres/include \
85                 -I${LIB_BIND_DIR}/lwres
86 .endif
87 BIND_DPADD=     ${LIBBIND9} ${LIBDNS} ${LIBISCCC} ${LIBISCCFG} \
88                 ${LIBISC} ${LIBLWRES}
89 .if ${MK_BIND_LIBS} != "no"
90 BIND_LDADD=     -lbind9 -ldns -lisccc -lisccfg -lisc -llwres
91 .else
92 BIND_LDADD=     ${BIND_DPADD}
93 .endif
94
95 # Link against crypto library
96 .if ${MK_OPENSSL} != "no"
97 CRYPTO_DPADD=   ${LIBCRYPTO}
98 CRYPTO_LDADD=   -lcrypto
99 .endif