From: Guus Sliepen Date: Mon, 22 Dec 2014 17:17:11 +0000 (+0100) Subject: Check whether res_init() really lives in libresolv. X-Git-Tag: release-1.0.25~1 X-Git-Url: https://tinc-vpn.org/git/browse?a=commitdiff_plain;h=507610b1188da859b826d607aae8e1a0aaff91fe;p=tinc 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. --- 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 ])