summaryrefslogtreecommitdiffstats
path: root/src/external/libresolv.m4
diff options
context:
space:
mode:
Diffstat (limited to 'src/external/libresolv.m4')
-rw-r--r--src/external/libresolv.m412
1 files changed, 12 insertions, 0 deletions
diff --git a/src/external/libresolv.m4 b/src/external/libresolv.m4
new file mode 100644
index 000000000..225cf2be8
--- /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"])