summaryrefslogtreecommitdiff
path: root/source3/configure.in
diff options
context:
space:
mode:
authorJames Peach <jpeach@samba.org>2007-10-12 22:16:22 -0700
committerJames Peach <jpeach@samba.org>2007-12-12 19:55:20 -0800
commitfa8966690bc2c5ab968b10e12fac113d0da1f641 (patch)
tree94fd1fb9e22992c165a8c3198afeb218bd84e08d /source3/configure.in
parent96591dd868a7c07d69623814d0bc4eaa107f0c89 (diff)
downloadsamba-fa8966690bc2c5ab968b10e12fac113d0da1f641.tar.gz
samba-fa8966690bc2c5ab968b10e12fac113d0da1f641.tar.bz2
samba-fa8966690bc2c5ab968b10e12fac113d0da1f641.zip
Autoconf support for detecting DNS Service Discovery support.
Patch from Rishi Srivatsavai <rishisv@gmail.com>, with some adaptations. (This used to be commit 2dfe9525b9e6e7dcbac191c1fb6288e166d171e5)
Diffstat (limited to 'source3/configure.in')
-rw-r--r--source3/configure.in37
1 files changed, 37 insertions, 0 deletions
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])
#################################################