From ca28add0f29f1856b21443443b96566d98bceed9 Mon Sep 17 00:00:00 2001 From: Pieter Lexis Date: Wed, 16 May 2018 14:38:19 +0200 Subject: [PATCH] ixfrdist: have a configure flag to enable --- build-scripts/build-auth-rpm | 5 ++--- build-scripts/debian-authoritative/control.in | 2 +- build-scripts/debian-authoritative/rules | 1 + build-scripts/travis.sh | 1 + configure.ac | 6 +----- docs/Makefile.am | 10 ++++++++-- m4/pdns_enable_ixfrdist.m4 | 18 ++++++++++++++++++ pdns/Makefile.am | 10 +++++++--- 8 files changed, 39 insertions(+), 14 deletions(-) create mode 100644 m4/pdns_enable_ixfrdist.m4 diff --git a/build-scripts/build-auth-rpm b/build-scripts/build-auth-rpm index 5c4edb72f..6d383a623 100755 --- a/build-scripts/build-auth-rpm +++ b/build-scripts/build-auth-rpm @@ -457,7 +457,6 @@ fi %{_bindir}/dnsscope %{_bindir}/dnswasher %{_bindir}/dumresp -%{_bindir}/ixfrdist %{_bindir}/ixplore %{_bindir}/pdns_notify %{_bindir}/nproxy @@ -472,8 +471,6 @@ fi %{_mandir}/man1/dnsscope.1.gz %{_mandir}/man1/dnswasher.1.gz %{_mandir}/man1/dumresp.1.gz -%{_mandir}/man1/ixfrdist.1.gz -%{_mandir}/man5/ixfrdist.yml.5.gz %{_mandir}/man1/ixplore.1.gz %{_mandir}/man1/pdns_notify.1.gz %{_mandir}/man1/nproxy.1.gz @@ -704,6 +701,7 @@ export CPPFLAGS="-DLDAP_DEPRECATED" --with-lua=luajit \ --with-dynmodules='%{backends} random' \ --enable-tools \ + --enable-ixfrdist \ --enable-libsodium \ --enable-unit-tests \ --enable-experimental-pkcs11 \ @@ -992,6 +990,7 @@ export CPPFLAGS="-DLDAP_DEPRECATED" --with-lua \ --with-dynmodules='%{backends} random' \ --enable-tools \ + --enable-ixfrdist \ --without-protobuf \ --enable-unit-tests \ --enable-systemd \ diff --git a/build-scripts/debian-authoritative/control.in b/build-scripts/debian-authoritative/control.in index 06a37c05b..9278dc9f0 100644 --- a/build-scripts/debian-authoritative/control.in +++ b/build-scripts/debian-authoritative/control.in @@ -4,7 +4,7 @@ Priority: extra Standards-Version: 3.9.8 Maintainer: PowerDNS Autobuilder Origin: PowerDNS -Build-Depends: debhelper (>= 9~), dh-autoreconf, dh-systemd, po-debconf, curl, libtool, flex, bison, libmysqlclient-dev, libpq-dev, libssl-dev, libgdbm-dev, libldap2-dev, libsqlite3-dev, dpkg-dev (>= 1.17.0~), libboost-dev, libboost-serialization-dev, libboost-program-options-dev, libboost-test-dev, autotools-dev, automake, autoconf, libluajit5.1-dev, pkg-config, ragel, libgmp-dev, libcurl4-openssl-dev, libzmq-dev, libyaml-cpp-dev (>= 0.5), libgeoip-dev, libmaxminddb-dev, libopendbx1-dev, libcdb-dev, unixodbc-dev (>= 2.3.1), libprotobuf-dev, protobuf-compiler, libp11-kit-dev @LIBSYSTEMDDEV@ @LIBSODIUMDEV@ +Build-Depends: debhelper (>= 9~), dh-autoreconf, dh-systemd, po-debconf, curl, libtool, flex, bison, libmysqlclient-dev, libpq-dev, libssl-dev, libgdbm-dev, libldap2-dev, libsqlite3-dev, dpkg-dev (>= 1.17.0~), libboost-dev, libboost-serialization-dev, libboost-program-options-dev, libboost-test-dev, autotools-dev, automake, autoconf, libluajit5.1-dev, pkg-config, ragel, libgmp-dev, libcurl4-openssl-dev, libzmq-dev, libyaml-cpp-dev (>= 0.5), libgeoip-dev, libmaxminddb-dev, libopendbx1-dev, libcdb-dev, unixodbc-dev (>= 2.3.1), libprotobuf-dev, protobuf-compiler, libp11-kit-dev, libyaml-cpp-dev, @LIBSYSTEMDDEV@ @LIBSODIUMDEV@ Homepage: http://www.powerdns.com/ Package: pdns-server diff --git a/build-scripts/debian-authoritative/rules b/build-scripts/debian-authoritative/rules index 784721f9d..6b27c974e 100755 --- a/build-scripts/debian-authoritative/rules +++ b/build-scripts/debian-authoritative/rules @@ -51,6 +51,7 @@ override_dh_auto_configure: --with-dynmodules="$(backends)" \ --with-modules="" \ --enable-tools \ + --enable-ixfrdist \ --enable-unit-tests \ --with-lua=luajit \ --enable-experimental-pkcs11 \ diff --git a/build-scripts/travis.sh b/build-scripts/travis.sh index 9c4be9765..bdaf1060a 100755 --- a/build-scripts/travis.sh +++ b/build-scripts/travis.sh @@ -384,6 +384,7 @@ build_auth() { --enable-experimental-pkcs11 \ --enable-remotebackend-zeromq \ --enable-tools \ + --enable-ixfrdist \ --enable-unit-tests \ --enable-backend-unit-tests \ --disable-dependency-tracking \ diff --git a/configure.ac b/configure.ac index 0f14fbe3a..7984a4c15 100644 --- a/configure.ac +++ b/configure.ac @@ -224,11 +224,7 @@ AC_ARG_ENABLE([tools], AC_MSG_RESULT([$enable_tools]) AM_CONDITIONAL([TOOLS], [test "x$enable_tools" != "xno"]) -AS_IF([test "x$enable_tools" != "xno"], [ - PKG_CHECK_MODULES([YAML], [yaml-cpp >= 0.5],[], - AC_MSG_ERROR([Could not find yaml-cpp]) - )] -) +PDNS_ENABLE_IXFRDIST PDNS_WITH_PROTOBUF diff --git a/docs/Makefile.am b/docs/Makefile.am index 1622f1d72..af10ac730 100644 --- a/docs/Makefile.am +++ b/docs/Makefile.am @@ -20,8 +20,6 @@ MANPAGES_TARGET_TOOLS = calidns.1 \ dnsscope.1 \ dnswasher.1 \ dumresp.1 \ - ixfrdist.1 \ - ixfrdist.yml.5 \ ixplore.1 \ nproxy.1 \ nsec3dig.1 \ @@ -29,7 +27,11 @@ MANPAGES_TARGET_TOOLS = calidns.1 \ saxfr.1 \ sdig.1 +MANPAGES_TARGET_IXFRDIST = ixfrdist.1 \ + ixfrdist.yml.5 + MANPAGES_DIST += $(MANPAGES_TARGET_TOOLS) \ + $(MANPAGES_TARGET_IXFRDIST) \ dnsbulktest.1 \ dnstcpbench.1 \ dnspcap2protobuf.1 @@ -49,6 +51,10 @@ if TOOLS MANPAGES_INSTALL += $(MANPAGES_TARGET_TOOLS) endif +if IXFRDIST +MANPAGES_INSTALL += $(MANPAGES_TARGET_IXFRDIST) +endif + man_MANS = $(MANPAGES_INSTALL) EXTRA_DIST = $(MANPAGES_DIST) diff --git a/m4/pdns_enable_ixfrdist.m4 b/m4/pdns_enable_ixfrdist.m4 new file mode 100644 index 000000000..8113a6fa8 --- /dev/null +++ b/m4/pdns_enable_ixfrdist.m4 @@ -0,0 +1,18 @@ +AC_DEFUN([PDNS_ENABLE_IXFRDIST], [ + AC_MSG_CHECKING([whether we will be building ixfrdist]) + AC_ARG_ENABLE([ixfrdist], [ + AS_HELP_STRING([--enable-ixfrdist], [if we should build and install ixfrdist @<:@default=no@:>@]) + ], [ + enable_ixfrdist=$enableval + ], [ + enable_ixfrdist=no + ]) + + AC_MSG_RESULT([$enable_ixfrdist]) + AM_CONDITIONAL([IXFRDIST], [test "x$enable_ixfrdist" != "xno"]) + AS_IF([test "x$enable_ixfrdist" != "xno"], [ + PKG_CHECK_MODULES([YAML], [yaml-cpp >= 0.5], [ : ], [ + AC_MSG_ERROR([Could not find yaml-cpp >= 0.5, required for ixfrdist]) + ]) + ]) +]) diff --git a/pdns/Makefile.am b/pdns/Makefile.am index e3617525f..48ac1532e 100644 --- a/pdns/Makefile.am +++ b/pdns/Makefile.am @@ -101,7 +101,6 @@ bin_PROGRAMS += \ saxfr \ stubquery \ ixplore \ - ixfrdist \ sdig if HAVE_RECVMMSG @@ -114,6 +113,11 @@ bin_PROGRAMS += \ dnstcpbench endif +endif # TOOLS + +if IXFRDIST +bin_PROGRAMS += \ + ixfrdist endif EXTRA_PROGRAMS = \ @@ -1419,13 +1423,13 @@ CLEANFILES += \ pdns.service \ pdns@.service -if TOOLS +if IXFRDIST ixfrdist.service: ixfrdist.service.in $(AM_V_GEN)sed -e 's![@]bindir[@]!$(bindir)!' < $< > $@ systemdsystemunit_DATA += \ ixfrdist.service -endif # TOOLS +endif # IXFRDIST CLEANFILES += \ ixfrdist.service -- 2.40.0