From 507610b1188da859b826d607aae8e1a0aaff91fe Mon Sep 17 00:00:00 2001 From: Guus Sliepen Date: Mon, 22 Dec 2014 18:17:11 +0100 Subject: [PATCH] Check whether res_init() really lives in libresolv. On some platforms (Mac OS X for example), the res_init() function requires linking with libresolv. On others (Linux, OpenBSD for example), res_init() lives in libc. --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index b43bec8c..85df11e6 100644 --- a/configure.ac +++ b/configure.ac @@ -202,7 +202,7 @@ AC_CHECK_DECLS([freeaddrinfo, gai_strerror, getaddrinfo, getnameinfo], [], [], [#include "src/have.h"] ) -AC_CHECK_DECLS([res_init], [LIBS="$LIBS -lresolv"], [], [ +AC_CHECK_DECLS([res_init], [AC_CHECK_LIB(resolv, res_init)], [], [ #include #include ]) -- 2.20.1