chiark / gitweb /
server/: Maybe use GNU ADNS rather than mLib's `bres' for name resolution.
[tripe] / configure.ac
index 84fcf5a90bd9a4a7a223fb0560642cc8fd4b0464..887f81d31ee46cc512658bf0449727ff598f9234 100644 (file)
@@ -63,6 +63,27 @@ case "$host_os" in
     ;;
 esac
 
+AC_ARG_WITH([adns],
+  AS_HELP_STRING([--with-adns],
+                [use ADNS library for background name resolution]),
+  [want_adns=$withval],
+  [want_adns=auto])
+case $want_adns in
+  no) ;;
+  *) AC_CHECK_LIB([adns], [adns_submit], [have_adns=yes], [have_adns=no]) ;;
+esac
+AC_SUBST([ADNS_LIBS])
+case $want_adns,$have_adns in
+  yes,no)
+    AC_MSG_ERROR([ADNS library not found but explicitly requested])
+    ;;
+  yes,yes | auto,yes)
+    ADNS_LIBS="-ladns"
+    AC_DEFINE([HAVE_LIBADNS], [1],
+             [Define if the GNU adns library is available.])
+    ;;
+esac
+
 PKG_CHECK_MODULES([mLib], [mLib >= 2.2.1])
 PKG_CHECK_MODULES([catacomb], [catacomb >= 2.2.2-38])