Commit d5596a1c authored by J. Alexander Treuman's avatar J. Alexander Treuman

Define HAVE_ZEROCONF if Avahi or Bonjour support is enabled, so that we can

silence a warning about an unused variable without using stupid checks for HAVE_AVAHI || HAVE_BONJOUR. git-svn-id: https://svn.musicpd.org/mpd/trunk@6471 09075e82-0dd4-0310-85a5-a0d7c8717e4f
parent ab14f8a3
...@@ -601,7 +601,7 @@ if test x$with_zeroconf != xno; then ...@@ -601,7 +601,7 @@ if test x$with_zeroconf != xno; then
if test x$with_zeroconf = xbonjour || test x$with_zeroconf = xauto; then if test x$with_zeroconf = xbonjour || test x$with_zeroconf = xauto; then
AC_CHECK_HEADER(dns_sd.h, AC_CHECK_HEADER(dns_sd.h,
[found_bonjour=1;AC_DEFINE(HAVE_BONJOUR, 1, [Define to enable Bonjour Zeroconf support])], [found_bonjour=1;AC_DEFINE([HAVE_BONJOUR], 1, [Define to enable Bonjour Zeroconf support])],
[found_bonjour=0]) [found_bonjour=0])
AC_CHECK_LIB(dns_sd, DNSServiceRegister, AC_CHECK_LIB(dns_sd, DNSServiceRegister,
MPD_LIBS="$MPD_LIBS -ldns_sd") MPD_LIBS="$MPD_LIBS -ldns_sd")
...@@ -616,6 +616,8 @@ if test x$with_zeroconf != xno; then ...@@ -616,6 +616,8 @@ if test x$with_zeroconf != xno; then
if test x$with_zeroconf = xauto || test x$with_zeroconf = xno; then if test x$with_zeroconf = xauto || test x$with_zeroconf = xno; then
AC_MSG_WARN([No supported Zeroconf backend found, disabling Zeroconf]) AC_MSG_WARN([No supported Zeroconf backend found, disabling Zeroconf])
with_zeroconf=no with_zeroconf=no
else
AC_DEFINE([HAVE_ZEROCONF], 1, [Define to enable Zeroconf support])
fi fi
fi fi
......
...@@ -40,8 +40,10 @@ ...@@ -40,8 +40,10 @@
static int zeroconfEnabled; static int zeroconfEnabled;
#ifdef HAVE_ZEROCONF
static struct ioOps zeroConfIo = { static struct ioOps zeroConfIo = {
}; };
#endif
#ifdef HAVE_BONJOUR #ifdef HAVE_BONJOUR
#include <dns_sd.h> #include <dns_sd.h>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment