]> granicus.if.org Git - pdns/commitdiff
Add check for curl program
authorThomas D <whissi@whissi.de>
Fri, 13 Feb 2015 12:58:26 +0000 (13:58 +0100)
committerThomas D <whissi@whissi.de>
Tue, 17 Feb 2015 09:30:47 +0000 (10:30 +0100)
When building "remote" module with unit tests enabled we need the curl program
because the remotebacked testsuite uses the curl program.

configure.ac
m4/pdns_check_curl_program.m4 [new file with mode: 0644]

index b89e6cac9e0bdfbc5870cd72afc92e8c747671c1..cde58a67d7ac82dcb8d0d7e6e2ee39157f4b229a 100644 (file)
@@ -269,6 +269,10 @@ for a in $modules $dynmodules; do
       PDNS_CHECK_OPENDBX
       ;;
     remote)
+      AS_IF([test "x$enable_unit_tests" = "xyes"],
+        [PDNS_CHECK_CURL_PROGRAM]
+      )
+
       have_remotebackend=yes
       ;;
     tinydns)
diff --git a/m4/pdns_check_curl_program.m4 b/m4/pdns_check_curl_program.m4
new file mode 100644 (file)
index 0000000..d6abe1c
--- /dev/null
@@ -0,0 +1,7 @@
+AC_DEFUN([PDNS_CHECK_CURL_PROGRAM], [
+  AC_CHECK_PROG([CURL], [curl], [curl], [no])
+
+  AS_IF([test "x$CURL" = "xno"], [
+    AC_MSG_ERROR([curl program is missing, required for running remotebackend unit tests])
+  ])
+])