# ARES_CHECK_CONFIG ([DEFAULT-ACTION])
# ----------------------------------------------------------
# This macro #defines HAVE_ARES_H if required header files are
# found, and sets @ARES_LDFLAGS@ and @ARES_CFLAGS@ to the necessary
# This macro is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
AC_DEFUN([ARES_TRY_LINK],
AC_LINK_IFELSE([AC_LANG_PROGRAM([[
struct ares_channeldata *channel;
struct ares_addrinfo_hints hints;
ares_library_init(ARES_LIB_INIT_ALL);
ares_getaddrinfo(channel, "localhost", NULL, &hints, NULL, NULL);
]])],[found_ares="yes"],[])
AC_DEFUN([ARES_CHECK_CONFIG],
If you want to use c-ares library:
AS_HELP_STRING([--with-ares@<:@=ARG@:>@], [use c-ares library @<:@default=no@:>@,])],
if test "x$withval" = "xyes"; then
AC_ARG_WITH([ares-include],
AS_HELP_STRING([--with-ares-include=DIR],
[use c-ares include headers from given path.]
AS_HELP_STRING([--with-ares-lib=DIR],
[use c-ares libraries from given path.]
ARES_LDFLAGS="-L$withval"