From: Guus Sliepen Date: Fri, 26 Dec 2014 14:40:09 +0000 (+0100) Subject: Check whether res_init() really lives in libresolv. X-Git-Tag: release-1.1pre11~7 X-Git-Url: https://git.tinc-vpn.org/git/browse?a=commitdiff_plain;h=8ee4004edfbc79b1a17bf03c262f063f2f4c128d;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 1b892804..9ed54a6e 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 ])