summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/Makefile.in1
-rw-r--r--source3/configure.in37
2 files changed, 38 insertions, 0 deletions
diff --git a/source3/Makefile.in b/source3/Makefile.in
index 285255e7f7..d26f688f80 100644
--- a/source3/Makefile.in
+++ b/source3/Makefile.in
@@ -63,6 +63,7 @@ KRB5LIBS=@KRB5_LIBS@
LDAP_LIBS=@LDAP_LIBS@
NSCD_LIBS=@NSCD_LIBS@
UUID_LIBS=@UUID_LIBS@
+DNSSD_LIBS=@DNSSD_LIBS@
INSTALLCMD=@INSTALL@
INSTALLLIBCMD_SH=@INSTALLLIBCMD_SH@
diff --git a/source3/configure.in b/source3/configure.in
index 4c72ad3dd3..06a6a458b0 100644
--- a/source3/configure.in
+++ b/source3/configure.in
@@ -6162,6 +6162,40 @@ AC_SUBST(POPTLIBS)
AC_SUBST(FLAGS1)
#################################################
+# Check if user wants DNS service discovery support
+
+AC_ARG_ENABLE(dnssd,
+[ --enable-dnssd Enable DNS service discovery support (default=auto)])
+
+if test x"$enable_dnssd" != x"no"; then
+ have_dnssd_support=yes
+
+ AC_CHECK_HEADERS(dns_sd.h)
+ if test x"$ac_cv_header_dns_sd_h" != x"yes"; then
+ have_dnssd_support=no
+ fi
+
+ # On Darwin the DNSSD API is in libc, but on other platforms it's
+ # probably in -ldns_sd
+ AC_CHECK_FUNCS(DNSServiceRegister)
+ AC_CHECK_LIB_EXT(dns_sd, DNSSD_LIBS, DNSServiceRegister)
+ if test x"$ac_cv_func_DNSServiceRegister" != x"yes" -a \
+ x"$ac_cv_lib_ext_DNSServiceRegister" != x"yes"; then
+ have_dnssd_support=no
+ fi
+
+ if test x"$have_dnssd_support" = x"yes"; then
+ AC_DEFINE(WTH_DNSSD_SUPPORT, 1,
+ [Whether to enable DNS service discovery support])
+ else
+ if test x"$enable_dnssd" = x"yes"; then
+ AC_MSG_ERROR(DNS service discovery support not available)
+ fi
+ fi
+
+fi
+
+#################################################
# Check to see if we should use the included iniparser
AC_ARG_WITH(included-iniparser,
@@ -6467,6 +6501,9 @@ fi
if test x"$with_dnsupdate_support" != x"no"; then
AC_MSG_RESULT([ UUID_LIBS = $UUID_LIBS])
fi
+if test x"$have_dnssd_support" != x"no"; then
+ AC_MSG_RESULT([ DNSSD_LIBS = $DNSSD_LIBS])
+fi
AC_MSG_RESULT([ AUTH_LIBS = $AUTH_LIBS])
#################################################