From: Thomas D Date: Sat, 14 Feb 2015 16:43:34 +0000 (+0100) Subject: ZeroMQ remotebackend requires remote backend itself X-Git-Tag: dnsdist-1.0.0-alpha1~291^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e29ece132c7f34a842d59932416ef7c9acc8e538;p=pdns ZeroMQ remotebackend requires remote backend itself --- diff --git a/configure.ac b/configure.ac index f34cc6331..bc6ad983f 100644 --- a/configure.ac +++ b/configure.ac @@ -183,7 +183,6 @@ PDNS_ENABLE_BOTAN PDNS_ENABLE_PKCS11 PDNS_WITH_CRYPTOPP PDNS_ENABLE_ED25519 -PDNS_ENABLE_REMOTEBACKEND_ZEROMQ AS_IF([test "x$static" != "xno"], [ LDFLAGS="-all-static $LDFLAGS" @@ -264,6 +263,9 @@ for a in $modules $dynmodules; do opendbx) PDNS_CHECK_OPENDBX ;; + remote) + have_remotebackend=yes + ;; tinydns) PDNS_CHECK_CDB ;; @@ -281,6 +283,8 @@ for a in $modules $dynmodules; do esac done +PDNS_ENABLE_REMOTEBACKEND_ZEROMQ + AM_CONDITIONAL([ORACLE],[test "x$needoracle" = "xyes"]) AM_CONDITIONAL([LDAP],[test "x$needldap" = "xyes"]) diff --git a/m4/pdns_enable_remotebackend_zeromq.m4 b/m4/pdns_enable_remotebackend_zeromq.m4 index 9fba38fdf..ef9f19c59 100644 --- a/m4/pdns_enable_remotebackend_zeromq.m4 +++ b/m4/pdns_enable_remotebackend_zeromq.m4 @@ -12,27 +12,34 @@ AC_DEFUN([PDNS_ENABLE_REMOTEBACKEND_ZEROMQ],[ AM_CONDITIONAL([REMOTEBACKEND_ZEROMQ],[test "x$enable_remotebackend_zeromq" != "xno"]) AC_SUBST(REMOTEBACKEND_ZEROMQ) - AS_IF([test "x$enable_remotebackend_zeromq" != "xno"], - [PKG_CHECK_MODULES([LIBZMQ], [libzmq], - [ - AC_DEFINE([HAVE_LIBZMQ], [1], [Define to 1 if you have libzmq]) - AC_DEFINE([REMOTEBACKEND_ZEROMQ], [1], [Define to 1 if you have the ZeroMQ connector]) - REMOTEBACKEND_ZEROMQ=yes - ], - [AC_MSG_ERROR([Could not find libzmq])] - )] + AS_IF([test "x$enable_remotebackend_zeromq" != "xno"], + [ + AS_IF([test "x$have_remotebackend" == "xyes"], + [ + PKG_CHECK_MODULES([LIBZMQ], [libzmq], + [ + AC_DEFINE([HAVE_LIBZMQ], [1], [Define to 1 if you have libzmq]) + AC_DEFINE([REMOTEBACKEND_ZEROMQ], [1], [Define to 1 if you have the ZeroMQ connector]) + REMOTEBACKEND_ZEROMQ=yes + ], + [AC_MSG_ERROR([Could not find libzmq])] + ) - old_CXXFLAGS="$CXXFLAGS" - old_LDFLAGS="$LDFLAGS" - CXXFLAGS="$CFLAGS $LIBZMQ_CFLAGS" - LDFLAGS="$LDFLAGS $LIBZMQ_LIBS" - AC_CHECK_LIB([zmq], [zmq_msg_send], - [ - AC_DEFINE([HAVE_ZMQ_MSG_SEND], [1], [Define to 1 if the ZeroMQ 3.x or greater API is available]) - ]) - CXXFLAGS="$old_CXXFLAGS" - LDFLAGS="$old_LDFLAGS" + old_CXXFLAGS="$CXXFLAGS" + old_LDFLAGS="$LDFLAGS" + CXXFLAGS="$CFLAGS $LIBZMQ_CFLAGS" + LDFLAGS="$LDFLAGS $LIBZMQ_LIBS" + AC_CHECK_LIB([zmq], [zmq_msg_send], + [ + AC_DEFINE([HAVE_ZMQ_MSG_SEND], [1], [Define to 1 if the ZeroMQ 3.x or greater API is available]) + ] + ) + CXXFLAGS="$old_CXXFLAGS" + LDFLAGS="$old_LDFLAGS" + ], + [AC_MSG_ERROR([remotebackend \"zeromq\" selected but the \"remote\" backend itself is not selected. Please add \"remote\" to your modules or dynmodules list and re-run configure!])] + ) + ] ) ]) -