From 8ee4004edfbc79b1a17bf03c262f063f2f4c128d Mon Sep 17 00:00:00 2001 From: Guus Sliepen Date: Fri, 26 Dec 2014 15:40:09 +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 1b89280..9ed54a6 100644 --- a/configure.ac +++ b/configure.ac @@ -204,7 +204,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.25.1