aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2011-09-01 10:07:58 +0200
committerMax Kellermann <max@duempel.org>2011-09-01 10:11:23 +0200
commite635d479129fe3a6ea4cff13b682be6cc97db81c (patch)
treeb7350b3a1c60e835058a42f0803fab9a1eb5da6f
parent53ac72a8783c54467f7462cf536d637e058da0fd (diff)
downloadmpd-e635d479129fe3a6ea4cff13b682be6cc97db81c.tar.gz
mpd-e635d479129fe3a6ea4cff13b682be6cc97db81c.tar.xz
mpd-e635d479129fe3a6ea4cff13b682be6cc97db81c.zip
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.
Diffstat (limited to '')
-rw-r--r--NEWS1
-rw-r--r--configure.ac31
2 files changed, 18 insertions, 14 deletions
diff --git a/NEWS b/NEWS
index 56a846582..e0c376ec9 100644
--- a/NEWS
+++ b/NEWS
@@ -1,4 +1,5 @@
ver 0.16.4 (2011/??/??)
+* don't abort configure when avahi is not found
* fix memory leaks
* don't resume playback when seeking to another song while paused
* apply follow_inside_symlinks to absolute symlinks
diff --git a/configure.ac b/configure.ac
index cf992eb9d..4de63dac9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -530,27 +530,31 @@ dnl ---------------------------------------------------------------------------
dnl --------------------------------- zeroconf --------------------------------
case $with_zeroconf in
-no|avahi|bonjour)
+no|bonjour)
+ enable_avahi=no
;;
+
+avahi)
+ enable_avahi=yes
+ ;;
+
*)
with_zeroconf=auto
+ enable_avahi=auto
;;
esac
-enable_avahi=no
-enable_bounjour=no
-if test x$with_zeroconf != xno; then
- if test x$with_zeroconf = xavahi || test x$with_zeroconf = xauto; then
- PKG_CHECK_MODULES([AVAHI], [avahi-client avahi-glib],
- [enable_avahi=yes;AC_DEFINE([HAVE_AVAHI], 1, [Define to enable Avahi Zeroconf support])])
- fi
+MPD_AUTO_PKG(avahi, AVAHI, [avahi-client avahi-glib],
+ [avahi client library], [avahi client+glib not found])
+if test x$enable_avahi = xyes; then
+ AC_DEFINE([HAVE_AVAHI], 1, [Define to enable Avahi Zeroconf support])
+ with_zeroconf=avahi
+fi
- if test x$enable_avahi = xyes; then
- with_zeroconf=avahi
- elif test x$with_zeroconf = xavahi; then
- AC_MSG_ERROR([Avahi support requested but not found])
- fi
+AM_CONDITIONAL(HAVE_AVAHI, test x$enable_avahi = xyes)
+enable_bounjour=no
+if test x$with_zeroconf != xno; then
if test x$with_zeroconf = xbonjour || test x$with_zeroconf = xauto; then
AC_CHECK_HEADER(dns_sd.h,
[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
fi
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)
dnl ---------------------------------------------------------------------------