diff --git a/lib/bind/config.mk b/lib/bind/config.mk index 92cfbec36cc7..a50d348afec2 100644 --- a/lib/bind/config.mk +++ b/lib/bind/config.mk @@ -70,6 +70,19 @@ ISC_ATOMIC_ARCH= x86_32 ISC_ATOMIC_ARCH= ${MACHINE_ARCH} .endif +# Optional features +.if ${MK_BIND_LARGE_FILE} == "yes" +CFLAGS+= -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 +.endif +.if ${MK_BIND_SIGCHASE} == "yes" +CFLAGS+= -DDIG_SIGCHASE +.endif +.if ${MK_BIND_XML} == "yes" +CFLAGS+= -DHAVE_LIBXML2 +CFLAGS+= -I/usr/local/include -I/usr/local/include/libxml2 +CFLAGS+= -L/usr/local/lib -lxml2 -lz -liconv -lm +.endif + # Link against BIND libraries .if ${MK_BIND_LIBS} == "no" LIBBIND9= ${LIB_BIND_REL}/bind9/libbind9.a diff --git a/share/mk/bsd.own.mk b/share/mk/bsd.own.mk index a4523bac1474..4206969b19ad 100644 --- a/share/mk/bsd.own.mk +++ b/share/mk/bsd.own.mk @@ -402,7 +402,11 @@ MK_${var}:= yes # MK_* options which default to "no". # .for var in \ + BIND_IDN \ + BIND_LARGE_FILE \ BIND_LIBS \ + BIND_SIGCHASE \ + BIND_XML \ GNU_CPIO \ HESIOD \ IDEA diff --git a/tools/build/options/WITH_BIND_IDN b/tools/build/options/WITH_BIND_IDN new file mode 100644 index 000000000000..35d6628dbcd2 --- /dev/null +++ b/tools/build/options/WITH_BIND_IDN @@ -0,0 +1,3 @@ +.\" $FreeBSD$ +Set to enable IDN support for dig, host, and nslookup. +This requires ports/dns/idnkit to be installed in /usr/local. diff --git a/tools/build/options/WITH_BIND_LARGE_FILE b/tools/build/options/WITH_BIND_LARGE_FILE new file mode 100644 index 000000000000..00e48eb48982 --- /dev/null +++ b/tools/build/options/WITH_BIND_LARGE_FILE @@ -0,0 +1,2 @@ +.\" $FreeBSD$ +Set to enable 64-bit file support. diff --git a/tools/build/options/WITH_BIND_SIGCHASE b/tools/build/options/WITH_BIND_SIGCHASE new file mode 100644 index 000000000000..889e6ec2bf54 --- /dev/null +++ b/tools/build/options/WITH_BIND_SIGCHASE @@ -0,0 +1,2 @@ +.\" $FreeBSD$ +Set to enable DNSSEC validation support for dig, host, and nslookup. diff --git a/tools/build/options/WITH_BIND_XML b/tools/build/options/WITH_BIND_XML new file mode 100644 index 000000000000..67ba3a5c6f54 --- /dev/null +++ b/tools/build/options/WITH_BIND_XML @@ -0,0 +1,3 @@ +.\" $FreeBSD$ +Set to enable the http statistics interface for named. +This requires ports/textproc/libxml2 to be installed in /usr/local. diff --git a/usr.bin/dig/Makefile b/usr.bin/dig/Makefile index 4ac3e64b246f..585e3794b193 100644 --- a/usr.bin/dig/Makefile +++ b/usr.bin/dig/Makefile @@ -15,6 +15,11 @@ SRCS+= dig.c dighost.c CFLAGS+= -I${SRCDIR}/include CFLAGS+= -I${BIND_DIR}/lib/isc/${ISC_ATOMIC_ARCH}/include +.if ${MK_BIND_IDN} == "yes" +CFLAGS+= -DWITH_IDN -I/usr/local/include +CFLAGS+= -L/usr/local/lib -lidnkit -R/usr/local/lib -liconv +.endif + DPADD+= ${BIND_DPADD} ${CRYPTO_DPADD} ${PTHREAD_DPADD} LDADD+= ${BIND_LDADD} ${CRYPTO_LDADD} ${PTHREAD_LDADD} diff --git a/usr.sbin/named/Makefile b/usr.sbin/named/Makefile index cb09169786cd..608866a4466e 100644 --- a/usr.sbin/named/Makefile +++ b/usr.sbin/named/Makefile @@ -9,7 +9,25 @@ SRCDIR= ${BIND_DIR}/bin/named PROG= named -CONFIGARGS='--prefix=/usr' '--without-libxml2' '--without-idn' '--infodir=/usr/share/info' '--mandir=/usr/share/man' '--enable-threads' '--disable-ipv6' '--enable-getifaddrs' '--disable-linux-caps' '--with-openssl=/usr' '--with-randomdev=/dev/random' +CONFIGARGS='--prefix=/usr' '--infodir=/usr/share/info' '--mandir=/usr/share/man' '--enable-threads' '--disable-ipv6' '--enable-getifaddrs' '--disable-linux-caps' '--with-openssl=/usr' '--with-randomdev=/dev/random' + +# Optional features +.if ${MK_BIND_LARGE_FILE} == "yes" +CONFIGARGS+='--enable-largefile' +.endif +.if ${MK_BIND_SIGCHASE} == "yes" +CONFIGARGS+='STD_CDEFINES=-DDIG_SIGCHASE=1' +.endif +.if ${MK_BIND_IDN} == "yes" +CONFIGARGS+='--with-idn=/usr/local' +.else +CONFIGARGS+='--without-idn' +.endif +.if ${MK_BIND_XML} == "yes" +CONFIGARGS+='--with-libxml2=/usr/local' +.else +CONFIGARGS+='--without-libxml2' +.endif .PATH: ${SRCDIR}/unix SRCS+= os.c