diff options
author | Jim Ramsay <i.am@jimramsay.com> | 2007-01-11 20:41:17 +0000 |
---|---|---|
committer | Jim Ramsay <i.am@jimramsay.com> | 2007-01-11 20:41:17 +0000 |
commit | 5d79aced8cc587b8b8889647b7cb9da79d500d64 (patch) | |
tree | f468e73434d6dea628859e93bd722313a5244ebc /configure.ac | |
parent | 2d985b01c2685f8f05fdc7c1e78cbca0f170b5b9 (diff) | |
download | mpd-5d79aced8cc587b8b8889647b7cb9da79d500d64.tar.gz mpd-5d79aced8cc587b8b8889647b7cb9da79d500d64.tar.xz mpd-5d79aced8cc587b8b8889647b7cb9da79d500d64.zip |
Added zeroconf service publishing using avahi
git-svn-id: https://svn.musicpd.org/mpd/trunk@5238 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to '')
-rw-r--r-- | configure.ac | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index f8aee7a4c..c2869c461 100644 --- a/configure.ac +++ b/configure.ac @@ -101,6 +101,7 @@ AC_ARG_WITH(mad-includes,[ --with-mad-includes=DIR Directory where mad head AC_ARG_WITH(faad,[ --with-faad=PFX Prefix where faad2 is installed], faad_prefix="$withval", faad_prefix="") AC_ARG_WITH(faad-libraries,[ --with-faad-libraries=DIR Directory where faad2 library is installed (optional)], faad_libraries="$withval", faad_libraries="") AC_ARG_WITH(faad-includes,[ --with-faad-includes=DIR Directory where faad2 header files are installed (optional)], faad_includes="$withval", faad_includes="") +AC_ARG_WITH(zeroconf,[[ --with-zeroconf=[auto|avahi|bonjour|no] Enable zeroconf backend (default=auto)]], with_zeroconf="$withval", with_zeroconf="auto") AC_C_BIGENDIAN @@ -587,6 +588,36 @@ if test x$enable_mod = xyes; then fi fi +if test x$with_zeroconf != xno -a \ + x$with_zeroconf != xavahi -a \ + x$with_zeroconf != xbonjour; then + with_zeroconf=auto +fi + +if test x$with_zeroconf != xno; then + if test 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") + 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 + fi + + if test x$with_zeroconf = xauto; then + AC_MSG_WARN([No supported Zeroconf backend found, disabling Zeroconf]) + with_zeroconf=no + fi +fi + AC_OUTPUT(src/mp4ff/Makefile doc/Makefile src/Makefile Makefile ) echo "" @@ -736,6 +767,15 @@ if fi echo "" + +echo " Other features:" +if test x$with_zeroconf != xno; then + echo " Zeroconf support ..............$with_zeroconf" +else + echo " Zeroconf support ..............disabled" +fi + +echo "" echo "##########################################" echo "" echo "You are now ready to compile MPD" |