From: Pieter Lexis Date: Mon, 20 May 2019 14:34:53 +0000 (+0200) Subject: Move libcurl detection to its own function X-Git-Tag: dnsdist-1.4.0-beta1~3^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b9f7a489b1d4f491e92c72a304450c5880deeb9e;p=thirdparty%2Fpdns.git Move libcurl detection to its own function --- diff --git a/m4/pdns_check_libcurl.m4 b/m4/pdns_check_libcurl.m4 new file mode 100644 index 0000000000..c85ed123df --- /dev/null +++ b/m4/pdns_check_libcurl.m4 @@ -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 ]) + ]) +]) diff --git a/m4/pdns_with_lua_records.m4 b/m4/pdns_with_lua_records.m4 index a3f2419c87..7c4beb89ed 100644 --- a/m4/pdns_with_lua_records.m4 +++ b/m4/pdns_with_lua_records.m4 @@ -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"])