Commit e635d479 authored by Max Kellermann's avatar Max Kellermann

configure.ac: use MPD_AUTO_PKG to detect avahi

Don't abort the configure script when avahi could not be auto-detected. It previously did, because there was no custom "fail" action for PKG_CHECK_MODULES.
parent 53ac72a8
ver 0.16.4 (2011/??/??) ver 0.16.4 (2011/??/??)
* don't abort configure when avahi is not found
* fix memory leaks * fix memory leaks
* don't resume playback when seeking to another song while paused * don't resume playback when seeking to another song while paused
* apply follow_inside_symlinks to absolute symlinks * apply follow_inside_symlinks to absolute symlinks
......
...@@ -530,27 +530,31 @@ dnl --------------------------------------------------------------------------- ...@@ -530,27 +530,31 @@ dnl ---------------------------------------------------------------------------
dnl --------------------------------- zeroconf -------------------------------- dnl --------------------------------- zeroconf --------------------------------
case $with_zeroconf in case $with_zeroconf in
no|avahi|bonjour) no|bonjour)
enable_avahi=no
;; ;;
avahi)
enable_avahi=yes
;;
*) *)
with_zeroconf=auto with_zeroconf=auto
enable_avahi=auto
;; ;;
esac esac
enable_avahi=no MPD_AUTO_PKG(avahi, AVAHI, [avahi-client avahi-glib],
enable_bounjour=no [avahi client library], [avahi client+glib not found])
if test x$with_zeroconf != xno; then if test x$enable_avahi = xyes; then
if test x$with_zeroconf = xavahi || test x$with_zeroconf = xauto; then AC_DEFINE([HAVE_AVAHI], 1, [Define to enable Avahi Zeroconf support])
PKG_CHECK_MODULES([AVAHI], [avahi-client avahi-glib], with_zeroconf=avahi
[enable_avahi=yes;AC_DEFINE([HAVE_AVAHI], 1, [Define to enable Avahi Zeroconf support])]) fi
fi
if test x$enable_avahi = xyes; then AM_CONDITIONAL(HAVE_AVAHI, test x$enable_avahi = xyes)
with_zeroconf=avahi
elif test x$with_zeroconf = xavahi; then
AC_MSG_ERROR([Avahi support requested but not found])
fi
enable_bounjour=no
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,
[enable_bonjour=yes;AC_DEFINE([HAVE_BONJOUR], 1, [Define to enable Bonjour Zeroconf support])]) [enable_bonjour=yes;AC_DEFINE([HAVE_BONJOUR], 1, [Define to enable Bonjour Zeroconf support])])
...@@ -573,7 +577,6 @@ if test x$with_zeroconf != xno; then ...@@ -573,7 +577,6 @@ if test x$with_zeroconf != xno; then
fi fi
AM_CONDITIONAL(HAVE_ZEROCONF, test x$with_zeroconf != xno) AM_CONDITIONAL(HAVE_ZEROCONF, test x$with_zeroconf != xno)
AM_CONDITIONAL(HAVE_AVAHI, test x$with_zeroconf = xavahi)
AM_CONDITIONAL(HAVE_BONJOUR, test x$with_zeroconf = xbonjour) AM_CONDITIONAL(HAVE_BONJOUR, test x$with_zeroconf = xbonjour)
dnl --------------------------------------------------------------------------- dnl ---------------------------------------------------------------------------
......
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