aboutsummaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorPatrik Weiskircher <pat@icore.at>2007-06-02 17:06:08 +0000
committerPatrik Weiskircher <pat@icore.at>2007-06-02 17:06:08 +0000
commitb91af54d2a2b83648a844d2036254dab26c6a33c (patch)
tree1e6971a9395fa3e4793927197c203bae63227c43 /configure.ac
parent7b07a45dc48371a0ec3ebb7297e339051e1aa5e2 (diff)
downloadmpd-b91af54d2a2b83648a844d2036254dab26c6a33c.tar.gz
mpd-b91af54d2a2b83648a844d2036254dab26c6a33c.tar.xz
mpd-b91af54d2a2b83648a844d2036254dab26c6a33c.zip
Added Bonjour zeroconf support. This works now natively on MacOS X.
I couldn't test mDNSResponder support on Linux, as Debian doesn't include it - but should work as well. git-svn-id: https://svn.musicpd.org/mpd/trunk@6453 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to '')
-rw-r--r--configure.ac34
1 files changed, 21 insertions, 13 deletions
diff --git a/configure.ac b/configure.ac
index 46398fb96..02cb6b9ec 100644
--- a/configure.ac
+++ b/configure.ac
@@ -586,24 +586,32 @@ no|avahi|bonjour)
esac
if test x$with_zeroconf != xno; then
- if test x$with_zeroconf = xauto; then
+ if test x$with_zeroconf = xavahi -o x$with_zeroconf = xauto; then
PKG_CHECK_MODULES([AVAHI], [avahi-client],
- [with_zeroconf=avahi;AC_DEFINE([HAVE_AVAHI], 1, [Define to enable Avahi Zeroconf support])] MPD_LIBS="$MPD_LIBS $AVAHI_LIBS" MPD_CFLAGS="$MPD_CFLAGS $AVAHI_CFLAGS",
- [with_zeroconf=auto])
- elif test x$with_zeroconf = xavahi; then
- PKG_CHECK_MODULES([AVAHI], [avahi-client],
- [with_zeroconf=avahi;AC_DEFINE([HAVE_AVAHI], 1, [Define to enable Avahi Zeroconf support])] MPD_LIBS="$MPD_LIBS $AVAHI_LIBS" MPD_CFLAGS="$MPD_CFLAGS $AVAHI_CFLAGS")
+ [found_avahi=1;AC_DEFINE([HAVE_AVAHI], 1, [Define to enable Avahi Zeroconf support])] MPD_LIBS="$MPD_LIBS $AVAHI_LIBS" MPD_CFLAGS="$MPD_CFLAGS $AVAHI_CFLAGS", found_avahi=0)
fi
- # In the future, should add bonjour support (for OSX) and check at autodetect
- # time
- #if test x$with_zeroconf = xbonjour -o x$with_zeroconf = xauto; then
- if test x$with_zeroconf = xbonjour; then
- AC_MSG_WARN([Bonjour support has not been implemented yet, disabling Zeroconf])
- with_zeroconf=no
+ if test x$found_avahi = x1; then
+ with_zeroconf=avahi
+ else
+ if test x$with_zeroconf = xavahi; then
+ with_zeroconf=no
+ fi
+ fi
+
+ if test x$with_zeroconf = xbonjour -o x$with_zeroconf = xauto; then
+ AC_CHECK_HEADER(dns_sd.h, [found_bonjour=1;AC_DEFINE(HAVE_BONJOUR,1,[Define to enable Bonjour Zeroconf support])],[found_bonjour=0])
+ fi
+
+ if test x$found_bonjour = x1; then
+ with_zeroconf=bonjour
+ else
+ if test x$with_zeroconf = xbonjour; then
+ with_zeroconf=no
+ fi
fi
- if test x$with_zeroconf = xauto; then
+ if test x$with_zeroconf = xauto -o x$with_zeroconf = xno; then
AC_MSG_WARN([No supported Zeroconf backend found, disabling Zeroconf])
with_zeroconf=no
fi