]> granicus.if.org Git - pdns/commitdiff
Move libcurl detection to its own function
authorPieter Lexis <pieter.lexis@powerdns.com>
Mon, 20 May 2019 14:34:53 +0000 (16:34 +0200)
committerPeter van Dijk <peter.van.dijk@powerdns.com>
Tue, 4 Jun 2019 13:46:16 +0000 (15:46 +0200)
m4/pdns_check_libcurl.m4 [new file with mode: 0644]
m4/pdns_with_lua_records.m4

diff --git a/m4/pdns_check_libcurl.m4 b/m4/pdns_check_libcurl.m4
new file mode 100644 (file)
index 0000000..c85ed12
--- /dev/null
@@ -0,0 +1,5 @@
+AC_DEFUN([PDNS_CHECK_LIBCURL], [
+  AS_IF([test -n "$HAVE_LIBCURL"], [ : ], [
+    LIBCURL_CHECK_CONFIG("yes", "7.21.3", [ HAVE_LIBCURL=y ], [ HAVE_LIBCURL=n ])
+  ])
+])
index a3f2419c87b1e7b255388ba5e43769c5c346017f..7c4beb89ed32f303542b4f6191a785c14860fb2d 100644 (file)
@@ -12,9 +12,11 @@ AC_DEFUN([PDNS_WITH_LUA_RECORDS], [
     AS_IF([test "x$LUAPC" = "x"],
       AC_MSG_ERROR([LUA records need LUA. You can disable this feature with the --disable-lua-records switch or configure a proper LUA installation.])
     )
-    LIBCURL_CHECK_CONFIG("yes", "7.21.3", [ : ], [
+    PDNS_CHECK_LIBCURL()
+    AS_IF([test "$HAVE_LIBCURL" != "y"], [
       AC_MSG_ERROR([libcurl minimum version requirement not met. This is required for LUA records. You can disable it with the --disable-lua-records switch or use --with-libcurl to select another curl installation.])
     ])
+
     AC_DEFINE([HAVE_LUA_RECORDS], [1], [Define if enabling LUA records.])
   ])
   AM_CONDITIONAL([HAVE_LUA_RECORDS], [test "x$enable_lua_records" != "xno"])