summaryrefslogtreecommitdiffstats
path: root/source3/configure.in
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2009-03-20 14:53:10 +0100
committerVolker Lendecke <vl@samba.org>2009-03-23 17:09:53 +0100
commit4c1794c41c0595b2a62a1b4d96f7592ef746a76d (patch)
tree3e61a872ae0ddd01c98db885dbd6ac94ecf915cd /source3/configure.in
parentdfa93041abca0778a9988b384ddeaee234b324a2 (diff)
downloadsamba-4c1794c41c0595b2a62a1b4d96f7592ef746a76d.tar.gz
samba-4c1794c41c0595b2a62a1b4d96f7592ef746a76d.tar.xz
samba-4c1794c41c0595b2a62a1b4d96f7592ef746a76d.zip
Add avahi detection to configure
Diffstat (limited to 'source3/configure.in')
-rw-r--r--source3/configure.in36
1 files changed, 36 insertions, 0 deletions
diff --git a/source3/configure.in b/source3/configure.in
index f8b76a01b48..444f93f4c72 100644
--- a/source3/configure.in
+++ b/source3/configure.in
@@ -6005,6 +6005,42 @@ if test x"$enable_dnssd" == x"yes"; then
fi
#################################################
+# Check if user wants avahi support
+
+AC_ARG_ENABLE(avahi,
+[AS_HELP_STRING([--enable-avahi], [Enable Avahi support (default=auto)])])
+
+AC_SUBST(AVAHI_LIBS)
+if test x"$enable_avahi" != x"no"; then
+ have_avahi_support=yes
+
+ AC_CHECK_HEADERS(avahi-common/watch.h)
+ if test x"$ac_cv_header_avahi_common_watch_h" != x"yes"; then
+ have_avahi_support=no
+ fi
+
+ AC_CHECK_HEADERS(avahi-client/client.h)
+ if test x"$ac_cv_header_avahi_common_watch_h" != x"yes"; then
+ have_avahi_support=no
+ fi
+
+ AC_CHECK_LIB_EXT(avahi-client, AVAHI_LIBS, avahi_client_new)
+ if test x"$ac_cv_lib_ext_avahi_client_avahi_client_new" != x"yes"; then
+ have_avahi_support=no
+ fi
+
+ if test x"$have_avahi_support" = x"yes"; then
+ AC_DEFINE(WITH_AVAHI_SUPPORT, 1,
+ [Whether to enable avahi support])
+ else
+ if test x"$enable_avahi" = x"yes"; then
+ AC_MSG_ERROR(avahi support not available)
+ fi
+ fi
+
+fi
+
+#################################################
# Check to see if we should use the included iniparser
AC_ARG_WITH(included-iniparser,