From b6bf81803977318aad8b876a56a42e4a3ffbae6a Mon Sep 17 00:00:00 2001 From: Jakub Hrozek Date: Wed, 15 Jul 2009 18:21:15 +0200 Subject: Add ares helpers into sssd This patch adds ares parsing functions that are not yet upstreamed together with a private ares header file (ares_dns.h) that contains some necessary macros for parsing common structures in the replies. Users of these two parsing functions must also include the header files ares_parse_{srv,txt}_reply.h that contain the function and structures declarations that should eventually end up in upstream ares.h --- server/external/libcares.m4 | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'server/external') diff --git a/server/external/libcares.m4 b/server/external/libcares.m4 index 09451b3f7..020a1708d 100644 --- a/server/external/libcares.m4 +++ b/server/external/libcares.m4 @@ -7,3 +7,25 @@ AC_CHECK_HEADERS(ares.h, [AC_MSG_ERROR([c-ares header files are not installed])] ) +dnl Check if this particular version of c-ares supports parsing of SRV records +AC_CHECK_LIB([cares], + [ares_parse_srv_reply], + [AC_DEFINE([HAVE_ARES_PARSE_SRV], 1, [Does c-ares support srv parsing?]) + ], + [ + ares_build_srv=1 + ] +) + +dnl Check if this particular version of c-ares supports parsing of TXT records +AC_CHECK_LIB([cares], + [ares_parse_txt_reply], + [AC_DEFINE([HAVE_ARES_PARSE_TXT], 1, [Does c-ares support txt parsing?]) + ], + [ + ares_build_txt=1 + ] +) + +AM_CONDITIONAL(BUILD_ARES_PARSE_SRV, test x$ares_build_srv = x1) +AM_CONDITIONAL(BUILD_ARES_PARSE_TXT, test x$ares_build_txt = x1) -- cgit