From bf54fbed126ec3d459af40ea370ffadacd31c76d Mon Sep 17 00:00:00 2001 From: Jakub Hrozek Date: Fri, 12 Dec 2014 17:10:25 +0100 Subject: RESOLV: Add an internal function to read TTL from a DNS packet MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Related: https://fedorahosted.org/sssd/ticket/1884 Adds an internal resolver function that reads the TTL for SRV records as specified by RFC-2181. Several internal c-ares definitions are used until c-ares contains a function that exposes all this information via a parsing function. Reviewed-by: Pavel Březina --- src/external/libresolv.m4 | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 src/external/libresolv.m4 (limited to 'src/external') diff --git a/src/external/libresolv.m4 b/src/external/libresolv.m4 new file mode 100644 index 00000000..225cf2be --- /dev/null +++ b/src/external/libresolv.m4 @@ -0,0 +1,12 @@ +AC_SUBST(RESOLV_CFLAGS) +AC_SUBST(RESOLV_LIBS) + +# Some unit tests require libresolv to fake DNS packets +SSS_AC_EXPAND_LIB_DIR() +AC_CHECK_LIB([resolv], + [ns_name_compress], + [RESOLV_LIBS="-L$sss_extra_libdir -lresolv"], + [AC_MSG_WARN([No libresolv detected, some tests will not run])], + [-L$sss_extra_libdir]) + +AM_CONDITIONAL([HAVE_LIBRESOLV], [test x"$RESOLV_LIBS" != "x"]) -- cgit