]> granicus.if.org Git - pdns/commitdiff
ZeroMQ remotebackend requires remote backend itself
authorThomas D <whissi@whissi.de>
Sat, 14 Feb 2015 16:43:34 +0000 (17:43 +0100)
committerThomas D <whissi@whissi.de>
Sat, 14 Feb 2015 17:46:02 +0000 (18:46 +0100)
configure.ac
m4/pdns_enable_remotebackend_zeromq.m4

index f34cc6331385f1d8a0f0183177aecec2f9cca39b..bc6ad983f45387a97ccb7009443a3d9e86b632de 100644 (file)
@@ -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"])
index 9fba38fdfa35772e21e36e85117b7adecb141f50..ef9f19c59d52ac594a0aa5016f943aaaed3110d3 100644 (file)
@@ -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!])]
+      )
+    ]
   )
 ])
-