]> granicus.if.org Git - pdns/commitdiff
Check for libcurl when tools are enabled
authorPieter Lexis <pieter.lexis@powerdns.com>
Mon, 20 May 2019 14:44:05 +0000 (16:44 +0200)
committerPeter van Dijk <peter.van.dijk@powerdns.com>
Tue, 4 Jun 2019 13:46:16 +0000 (15:46 +0200)
configure.ac
m4/pdns_enable_tools.m4 [new file with mode: 0644]

index 1c00fff9756336949b49656bffb9098010cf281d..501661e6a7faedfb93cd35b1709c51f6e813a80f 100644 (file)
@@ -225,15 +225,7 @@ done
 
 PDNS_ENABLE_REMOTEBACKEND_ZEROMQ
 
-AC_MSG_CHECKING([whether we will be building and installing the extra tools])
-AC_ARG_ENABLE([tools],
-  [AS_HELP_STRING([--enable-tools], [if we should build and install the tools @<:@default=no@:>@])],
-  [enable_tools=$enableval],
-  [enable_tools=no]
-)
-
-AC_MSG_RESULT([$enable_tools])
-AM_CONDITIONAL([TOOLS], [test "x$enable_tools" != "xno"])
+PDNS_ENABLE_TOOLS
 PDNS_ENABLE_IXFRDIST
 
 PDNS_WITH_PROTOBUF
diff --git a/m4/pdns_enable_tools.m4 b/m4/pdns_enable_tools.m4
new file mode 100644 (file)
index 0000000..1221c61
--- /dev/null
@@ -0,0 +1,15 @@
+AC_DEFUN([PDNS_ENABLE_TOOLS], [
+  AC_MSG_CHECKING([whether we will be building and installing the extra tools])
+  AC_ARG_ENABLE([tools],
+    [AS_HELP_STRING([--enable-tools], [if we should build and install the tools @<:@default=no@:>@])],
+    [enable_tools=$enableval],
+    [enable_tools=no]
+    )
+  AC_MSG_RESULT([$enable_tools])
+
+  AM_CONDITIONAL([TOOLS], [test "x$enable_tools" != "xno"])
+
+  AS_IF([test "x$enable_tools" != "xno"], [
+    PDNS_CHECK_LIBCURL() dnl We only care about the #define HAVE_LIBCURL and can build tools without DOH support.
+  ])
+])