From f7e1be24c8fcf588d4e48aa53a85b22bd035e3b0 Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Fri, 7 Nov 2014 18:17:52 +0100 Subject: [PATCH] build: Improve test for ADNS * configure.ac : Use adns_free as probe function for libadns. (HAVE_ADNS_FREE): Remove bogus tests to set this and remove the macro. (ADNSLIBS): Do not ac_subst - it is only used within configure. -- adns_free is required on Windows anyway (for robustness reasons) and it has been around for so long now that we do not need a separate test. An upstream adns 1.5 has meanwhile been release but I doubt that this has the required Windows code - and it is not libtool based anyway. --- common/dns-cert.c | 3 --- common/pka.c | 3 --- common/srv.c | 3 --- configure.ac | 8 ++------ 4 files changed, 2 insertions(+), 15 deletions(-) diff --git a/common/dns-cert.c b/common/dns-cert.c index 179bb1524..4e297bf92 100644 --- a/common/dns-cert.c +++ b/common/dns-cert.c @@ -44,9 +44,6 @@ #endif #ifdef USE_ADNS # include -# ifndef HAVE_ADNS_FREE -# define adns_free free -# endif #endif #include "util.h" diff --git a/common/pka.c b/common/pka.c index 3c45e8bbf..d47216298 100644 --- a/common/pka.c +++ b/common/pka.c @@ -48,9 +48,6 @@ #endif /* USE_DNS_PKA */ #ifdef USE_ADNS # include -# ifndef HAVE_ADNS_FREE -# define adns_free free -# endif #endif #include "util.h" diff --git a/common/srv.c b/common/srv.c index 380e356bd..7a0c42d4f 100644 --- a/common/srv.c +++ b/common/srv.c @@ -45,9 +45,6 @@ #include #ifdef USE_ADNS # include -# ifndef HAVE_ADNS_FREE -# define adns_free free -# endif #endif #include "util.h" diff --git a/configure.ac b/configure.ac index 9afcd3b64..320ee27a7 100644 --- a/configure.ac +++ b/configure.ac @@ -904,18 +904,14 @@ AC_ARG_WITH(adns, fi]) if test "$with_adns" != "no"; then AC_CHECK_HEADERS(adns.h, - AC_CHECK_LIB(adns, adns_init, + AC_CHECK_LIB(adns, adns_free, [have_adns=yes], [CPPFLAGS=${_cppflags} LDFLAGS=${_ldflags}]), - [CPPFLAGS=${_cppflags} LDFLAGS=${_ldflags}]) + [CPPFLAGS=${_cppflags} LDFLAGS=${_ldflags}]) fi if test "$have_adns" = "yes"; then ADNSLIBS="-ladns" fi -AC_SUBST(ADNSLIBS) -# Newer adns versions feature a free function to be used under W32. -AC_CHECK_FUNCS(adns_free) - #