From 17acd2096243c0396842a4fd3d876d2735e9f092 Mon Sep 17 00:00:00 2001 From: Marko Kreen Date: Fri, 25 Mar 2011 23:26:31 +0200 Subject: [PATCH] configure.ac: evdns logic change - use evdns on libevent 2.x by default - use new AC_USUAL_GETADDRINFO_A macro --- configure.ac | 13 ++++++++++++- lib | 2 +- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 9456580..5570108 100644 --- a/configure.ac +++ b/configure.ac @@ -75,8 +75,14 @@ AC_CHECK_FUNCS(crypt lstat) dnl Find libevent AC_USUAL_LIBEVENT +dnl On libevent 2.x use evdns by default use_evdns=no -AC_ARG_ENABLE(evdns, AC_HELP_STRING([--enable-evdns],[Use libevent for DNS lookups]), +if test "$ac_cv_func_evdns_base_new" = "yes"; then + use_evdns=yes +fi + +dnl Allow user to override the decision +AC_ARG_ENABLE(evdns, AC_HELP_STRING([--enable-evdns],[Use libevent for DNS lookups (default on libevent 2.x)]), [use_evdns=$enableval]) AC_MSG_CHECKING([whether to use libevent for DNS lookups]) if test "$use_evdns" = "yes"; then @@ -86,6 +92,11 @@ else AC_MSG_RESULT([no]) fi +dnl Check if need getaddinfo_a compat +if test "$use_evdns" = no; then + AC_USUAL_GETADDRINFO_A +fi + AC_USUAL_DEBUG AC_USUAL_CASSERT AC_USUAL_WERROR diff --git a/lib b/lib index 0adfd7a..8c29a0c 160000 --- a/lib +++ b/lib @@ -1 +1 @@ -Subproject commit 0adfd7afe3cc7bfc694edb430c565640d0e4897d +Subproject commit 8c29a0c5a42a22b1a6654776dd35784189d35b98 -- 2.39.5