# LIBRESOLV_CHECK_CONFIG ([DEFAULT-ACTION])
# ----------------------------------------------------------
# Checks for DNS functions.
AC_DEFUN([LIBRESOLV_TRY_LINK],
AC_LINK_IFELSE([AC_LANG_PROGRAM([[
#ifdef HAVE_ARPA_NAMESER_H
# include <arpa/nameser.h>
res_query("", C_IN, T_SOA, (unsigned char *)buf, 0);
AC_DEFUN([LIBRESOLV_CHECK_CONFIG],
AC_MSG_CHECKING(for DNS lookup functions)
if test "x$found_resolv" != "xyes"; then
LIBRESOLV_TRY_LINK([-lresolv])
if test "x$found_resolv" != "xyes"; then
LIBRESOLV_TRY_LINK([-lbind])
if test "x$found_resolv" != "xyes"; then
LIBRESOLV_TRY_LINK([-lsocket])
if test "x$found_resolv" = "xyes"; then
AC_DEFINE([HAVE_RES_QUERY], 1, [Define to 1 if you have the DNS functions])
AC_MSG_RESULT($found_resolv)