[Pkg-mpd-commits] [SCM] Git repository for pkg-mpd branch, master, updated. debian/0.16.2-1-20-ga4e0297

Alexander Wirt formorer at debian.org
Thu Oct 13 10:28:29 UTC 2011


The following commit has been merged in the master branch:
commit 9bce739b713b7618371399fc0307d95acebc54f6
Author: Alexander Wirt <formorer at debian.org>
Date:   Thu Oct 13 12:27:18 2011 +0200

    Imported Upstream version 0.16.5

diff --git a/Makefile.am b/Makefile.am
index b3620bd..45dd631 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,7 +1,7 @@
 ACLOCAL_AMFLAGS = -I m4
 AUTOMAKE_OPTIONS = foreign 1.10 dist-bzip2 subdir-objects
 
-AM_CPPFLAGS = -I$(srcdir)/src $(GLIB_CFLAGS)
+AM_CPPFLAGS += -I$(srcdir)/src $(GLIB_CFLAGS)
 
 AM_CPPFLAGS += -DSYSTEM_CONFIG_FILE_LOCATION='"$(sysconfdir)/mpd.conf"'
 
@@ -243,6 +243,7 @@ src_mpd_SOURCES = \
 	$(OUTPUT_API_SRC) $(OUTPUT_SRC) \
 	$(MIXER_API_SRC) $(MIXER_SRC) \
 	$(FILTER_SRC) \
+	src/glib_socket.h \
 	src/notify.c \
 	src/audio.c \
 	src/audio_check.c \
@@ -802,6 +803,15 @@ FILTER_SRC = \
 
 
 #
+# systemd unit
+#
+
+if HAVE_SYSTEMD
+systemdsystemunit_DATA = \
+	mpd.service
+endif
+
+#
 # Sparse code analysis
 #
 # sparse is a semantic parser
diff --git a/Makefile.in b/Makefile.in
index 06bd134..3ebc558 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -159,8 +159,9 @@ bin_PROGRAMS = src/mpd$(EXEEXT)
 subdir = .
 DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
 	$(srcdir)/Makefile.in $(srcdir)/config.h.in \
-	$(top_srcdir)/configure AUTHORS COPYING INSTALL NEWS \
-	config.guess config.sub depcomp install-sh missing
+	$(srcdir)/mpd.service.in $(top_srcdir)/configure AUTHORS \
+	COPYING INSTALL NEWS config.guess config.sub depcomp \
+	install-sh missing
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/m4/faad.m4 \
 	$(top_srcdir)/m4/libwrap.m4 $(top_srcdir)/m4/mpd_auto.m4 \
@@ -173,7 +174,7 @@ am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
  configure.lineno config.status.lineno
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = config.h
-CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_FILES = mpd.service
 CONFIG_CLEAN_VPATH_FILES =
 LIBRARIES = $(noinst_LIBRARIES)
 AR = ar
@@ -189,7 +190,7 @@ libmodplug_decoder_plugin_a_OBJECTS =  \
 am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" \
 	"$(DESTDIR)$(man5dir)" "$(DESTDIR)$(developerdir)" \
 	"$(DESTDIR)$(docdir)" "$(DESTDIR)$(protocoldir)" \
-	"$(DESTDIR)$(userdir)"
+	"$(DESTDIR)$(systemdsystemunitdir)" "$(DESTDIR)$(userdir)"
 @ENABLE_TEST_TRUE@@HAVE_ALSA_TRUE at am__EXEEXT_1 =  \
 @ENABLE_TEST_TRUE@@HAVE_ALSA_TRUE@	test/read_mixer$(EXEEXT)
 @ENABLE_ENCODER_TRUE@@ENABLE_TEST_TRUE at am__EXEEXT_2 = test/run_encoder$(EXEEXT)
@@ -339,10 +340,10 @@ am__src_mpd_SOURCES_DIST = src/check.h src/notify.h src/ack.h \
 	src/filter/route_filter_plugin.c \
 	src/filter/normalize_filter_plugin.c \
 	src/filter/replay_gain_filter_plugin.c \
-	src/filter/volume_filter_plugin.c src/notify.c src/audio.c \
-	src/audio_check.c src/audio_format.c src/audio_parser.c \
-	src/command.c src/idle.c src/cmdline.c src/conf.c \
-	src/crossfade.c src/dbUtils.c src/decoder_thread.c \
+	src/filter/volume_filter_plugin.c src/glib_socket.h \
+	src/notify.c src/audio.c src/audio_check.c src/audio_format.c \
+	src/audio_parser.c src/command.c src/idle.c src/cmdline.c \
+	src/conf.c src/crossfade.c src/dbUtils.c src/decoder_thread.c \
 	src/decoder_control.c src/decoder_api.c src/decoder_internal.c \
 	src/decoder_print.c src/directory.c src/directory_save.c \
 	src/directory_print.c src/database.c src/dirvec.c \
@@ -1372,7 +1373,8 @@ man1dir = $(mandir)/man1
 man5dir = $(mandir)/man5
 NROFF = nroff
 MANS = $(man_MANS)
-DATA = $(developer_DATA) $(doc_DATA) $(protocol_DATA) $(user_DATA)
+DATA = $(developer_DATA) $(doc_DATA) $(protocol_DATA) \
+	$(systemdsystemunit_DATA) $(user_DATA)
 ETAGS = etags
 CTAGS = ctags
 am__tty_colors = \
@@ -1393,6 +1395,9 @@ ALSA_CFLAGS = @ALSA_CFLAGS@
 ALSA_LIBS = @ALSA_LIBS@
 AMTAR = @AMTAR@
 AM_CFLAGS = @AM_CFLAGS@
+AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(srcdir)/src $(GLIB_CFLAGS) \
+	-DSYSTEM_CONFIG_FILE_LOCATION='"$(sysconfdir)/mpd.conf"'
+AM_CXXFLAGS = @AM_CXXFLAGS@
 AO_CFLAGS = @AO_CFLAGS@
 AO_LIBS = @AO_LIBS@
 AUDIOFILE_CFLAGS = @AUDIOFILE_CFLAGS@
@@ -1569,14 +1574,13 @@ sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
 sysconfdir = @sysconfdir@
+systemdsystemunitdir = @systemdsystemunitdir@
 target_alias = @target_alias@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 ACLOCAL_AMFLAGS = -I m4
 AUTOMAKE_OPTIONS = foreign 1.10 dist-bzip2 subdir-objects
-AM_CPPFLAGS = -I$(srcdir)/src $(GLIB_CFLAGS) \
-	-DSYSTEM_CONFIG_FILE_LOCATION='"$(sysconfdir)/mpd.conf"'
 noinst_LIBRARIES = $(am__append_22)
 src_mpd_CFLAGS = $(AM_CFLAGS) $(MPD_CFLAGS)
 src_mpd_CPPFLAGS = $(AM_CPPFLAGS) \
@@ -1805,13 +1809,14 @@ mpd_headers = \
 src_mpd_SOURCES = $(mpd_headers) $(ARCHIVE_SRC) $(INPUT_SRC) \
 	$(PLAYLIST_SRC) $(TAG_SRC) $(DECODER_SRC) $(ENCODER_SRC) \
 	$(OUTPUT_API_SRC) $(OUTPUT_SRC) $(MIXER_API_SRC) $(MIXER_SRC) \
-	$(FILTER_SRC) src/notify.c src/audio.c src/audio_check.c \
-	src/audio_format.c src/audio_parser.c src/command.c src/idle.c \
-	src/cmdline.c src/conf.c src/crossfade.c src/dbUtils.c \
-	src/decoder_thread.c src/decoder_control.c src/decoder_api.c \
-	src/decoder_internal.c src/decoder_print.c src/directory.c \
-	src/directory_save.c src/directory_print.c src/database.c \
-	src/dirvec.c src/exclude.c src/fd_util.c src/fifo_buffer.c \
+	$(FILTER_SRC) src/glib_socket.h src/notify.c src/audio.c \
+	src/audio_check.c src/audio_format.c src/audio_parser.c \
+	src/command.c src/idle.c src/cmdline.c src/conf.c \
+	src/crossfade.c src/dbUtils.c src/decoder_thread.c \
+	src/decoder_control.c src/decoder_api.c src/decoder_internal.c \
+	src/decoder_print.c src/directory.c src/directory_save.c \
+	src/directory_print.c src/database.c src/dirvec.c \
+	src/exclude.c src/fd_util.c src/fifo_buffer.c \
 	src/filter_config.c src/filter_plugin.c src/filter_registry.c \
 	src/update.c src/update_queue.c src/update_walk.c \
 	src/update_remove.c src/client.c src/client_event.c \
@@ -2006,6 +2011,13 @@ FILTER_SRC = \
 
 
 #
+# systemd unit
+#
+ at HAVE_SYSTEMD_TRUE@systemdsystemunit_DATA = \
+ at HAVE_SYSTEMD_TRUE@	mpd.service
+
+
+#
 # Sparse code analysis
 #
 # sparse is a semantic parser
@@ -2330,6 +2342,8 @@ $(srcdir)/config.h.in:  $(am__configure_deps)
 
 distclean-hdr:
 	-rm -f config.h stamp-h1
+mpd.service: $(top_builddir)/config.status $(srcdir)/mpd.service.in
+	cd $(top_builddir) && $(SHELL) ./config.status $@
 
 clean-noinstLIBRARIES:
 	-test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
@@ -12938,6 +12952,26 @@ uninstall-protocolDATA:
 	test -n "$$files" || exit 0; \
 	echo " ( cd '$(DESTDIR)$(protocoldir)' && rm -f" $$files ")"; \
 	cd "$(DESTDIR)$(protocoldir)" && rm -f $$files
+install-systemdsystemunitDATA: $(systemdsystemunit_DATA)
+	@$(NORMAL_INSTALL)
+	test -z "$(systemdsystemunitdir)" || $(MKDIR_P) "$(DESTDIR)$(systemdsystemunitdir)"
+	@list='$(systemdsystemunit_DATA)'; test -n "$(systemdsystemunitdir)" || list=; \
+	for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; \
+	done | $(am__base_list) | \
+	while read files; do \
+	  echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(systemdsystemunitdir)'"; \
+	  $(INSTALL_DATA) $$files "$(DESTDIR)$(systemdsystemunitdir)" || exit $$?; \
+	done
+
+uninstall-systemdsystemunitDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(systemdsystemunit_DATA)'; test -n "$(systemdsystemunitdir)" || list=; \
+	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+	test -n "$$files" || exit 0; \
+	echo " ( cd '$(DESTDIR)$(systemdsystemunitdir)' && rm -f" $$files ")"; \
+	cd "$(DESTDIR)$(systemdsystemunitdir)" && rm -f $$files
 install-userDATA: $(user_DATA)
 	@$(NORMAL_INSTALL)
 	test -z "$(userdir)" || $(MKDIR_P) "$(DESTDIR)$(userdir)"
@@ -13270,7 +13304,7 @@ check: check-am
 all-am: Makefile $(LIBRARIES) $(PROGRAMS) $(MANS) $(DATA) config.h \
 		all-local
 installdirs:
-	for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man5dir)" "$(DESTDIR)$(developerdir)" "$(DESTDIR)$(docdir)" "$(DESTDIR)$(protocoldir)" "$(DESTDIR)$(userdir)"; do \
+	for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man5dir)" "$(DESTDIR)$(developerdir)" "$(DESTDIR)$(docdir)" "$(DESTDIR)$(protocoldir)" "$(DESTDIR)$(systemdsystemunitdir)" "$(DESTDIR)$(userdir)"; do \
 	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
 	done
 install: install-am
@@ -13351,7 +13385,7 @@ info-am:
 
 install-data-am: install-data-local install-developerDATA \
 	install-docDATA install-man install-protocolDATA \
-	install-userDATA
+	install-systemdsystemunitDATA install-userDATA
 
 install-dvi: install-dvi-am
 
@@ -13400,7 +13434,8 @@ ps-am:
 
 uninstall-am: uninstall-binPROGRAMS uninstall-developerDATA \
 	uninstall-docDATA uninstall-local uninstall-man \
-	uninstall-protocolDATA uninstall-userDATA
+	uninstall-protocolDATA uninstall-systemdsystemunitDATA \
+	uninstall-userDATA
 
 uninstall-man: uninstall-man1 uninstall-man5
 
@@ -13419,13 +13454,15 @@ uninstall-man: uninstall-man1 uninstall-man5
 	install-exec-am install-html install-html-am install-info \
 	install-info-am install-man install-man1 install-man5 \
 	install-pdf install-pdf-am install-protocolDATA install-ps \
-	install-ps-am install-strip install-userDATA installcheck \
-	installcheck-am installdirs maintainer-clean \
-	maintainer-clean-generic mostlyclean mostlyclean-compile \
-	mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \
-	uninstall-am uninstall-binPROGRAMS uninstall-developerDATA \
-	uninstall-docDATA uninstall-local uninstall-man uninstall-man1 \
-	uninstall-man5 uninstall-protocolDATA uninstall-userDATA
+	install-ps-am install-strip install-systemdsystemunitDATA \
+	install-userDATA installcheck installcheck-am installdirs \
+	maintainer-clean maintainer-clean-generic mostlyclean \
+	mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \
+	tags uninstall uninstall-am uninstall-binPROGRAMS \
+	uninstall-developerDATA uninstall-docDATA uninstall-local \
+	uninstall-man uninstall-man1 uninstall-man5 \
+	uninstall-protocolDATA uninstall-systemdsystemunitDATA \
+	uninstall-userDATA
 
 sparse-check:
 	$(SPARSE) -I. $(src_mpd_CFLAGS) $(src_mpd_CPPFLAGS) $(SPARSE_FLAGS) $(SPARSE_CPPFLAGS) $(filter-out %.cxx,$(src_mpd_SOURCES))
diff --git a/NEWS b/NEWS
index d72e0e0..ab2eaf4 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,27 @@
+ver 0.16.5 (2010/10/09)
+* configure.ac
+  - disable assertions in the non-debugging build
+  - show solaris plugin result correctly
+  - add option --enable-solaris-output
+* pcm_format: fix 32-to-24 bit conversion (the "silence" bug)
+* input:
+  - rewind: reduce heap usage
+* decoder:
+  - ffmpeg: higher precision timestamps
+  - ffmpeg: don't require key frame for seeking
+  - fix CUE track seeking
+* output:
+  - openal: auto-fallback to mono if channel count is unsupported
+* player:
+  - make seeking to CUE track more reliable
+  - the "seek" command works when MPD is stopped
+  - restore song position from state file (bug fix)
+  - fix crash that sometimes occurred when audio device fails on startup
+  - fix absolute path support in playlists
+* WIN32: close sockets properly
+* install systemd service file if systemd is available
+
+
 ver 0.16.4 (2011/09/01)
 * don't abort configure when avahi is not found
 * auto-detect libmad without pkg-config
diff --git a/aclocal.m4 b/aclocal.m4
index 38e3e6f..5c401b4 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -13,8 +13,8 @@
 
 m4_ifndef([AC_AUTOCONF_VERSION],
   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
-m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.67],,
-[m4_warning([this file was generated for autoconf 2.67.
+m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],,
+[m4_warning([this file was generated for autoconf 2.68.
 You have another version of autoconf.  It may work, but is not guaranteed to.
 If you have problems, you may need to regenerate the build system entirely.
 To do so, use the procedure documented by the package, typically `autoreconf'.])])
diff --git a/config.guess b/config.guess
index c2246a4..40eaed4 100755
--- a/config.guess
+++ b/config.guess
@@ -1,10 +1,10 @@
 #! /bin/sh
 # Attempt to guess a canonical system name.
 #   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
-#   Free Software Foundation, Inc.
+#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
+#   2011 Free Software Foundation, Inc.
 
-timestamp='2009-12-30'
+timestamp='2011-05-11'
 
 # This file is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by
@@ -57,7 +57,7 @@ GNU config.guess ($timestamp)
 
 Originally written by Per Bothner.
 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free
+2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free
 Software Foundation, Inc.
 
 This is free software; see the source for copying conditions.  There is NO
@@ -181,7 +181,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
 		fi
 		;;
 	    *)
-	        os=netbsd
+		os=netbsd
 		;;
 	esac
 	# The OS release
@@ -224,7 +224,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
 		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
 		;;
 	*5.*)
-	        UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
+		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
 		;;
 	esac
 	# According to Compaq, /usr/sbin/psrinfo has been available on
@@ -270,7 +270,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
 	# A Xn.n version is an unreleased experimental baselevel.
 	# 1.2 uses "1.2" for uname -r.
 	echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-	exit ;;
+	# Reset EXIT trap before exiting to avoid spurious non-zero exit code.
+	exitcode=$?
+	trap '' 0
+	exit $exitcode ;;
     Alpha\ *:Windows_NT*:*)
 	# How do we know it's Interix rather than the generic POSIX subsystem?
 	# Should we change UNAME_MACHINE based on the output of uname instead
@@ -296,7 +299,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
 	echo s390-ibm-zvmoe
 	exit ;;
     *:OS400:*:*)
-        echo powerpc-ibm-os400
+	echo powerpc-ibm-os400
 	exit ;;
     arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
 	echo arm-acorn-riscix${UNAME_RELEASE}
@@ -395,23 +398,23 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
     # MiNT.  But MiNT is downward compatible to TOS, so this should
     # be no problem.
     atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
-        echo m68k-atari-mint${UNAME_RELEASE}
+	echo m68k-atari-mint${UNAME_RELEASE}
 	exit ;;
     atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
 	echo m68k-atari-mint${UNAME_RELEASE}
-        exit ;;
+	exit ;;
     *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
-        echo m68k-atari-mint${UNAME_RELEASE}
+	echo m68k-atari-mint${UNAME_RELEASE}
 	exit ;;
     milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
-        echo m68k-milan-mint${UNAME_RELEASE}
-        exit ;;
+	echo m68k-milan-mint${UNAME_RELEASE}
+	exit ;;
     hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
-        echo m68k-hades-mint${UNAME_RELEASE}
-        exit ;;
+	echo m68k-hades-mint${UNAME_RELEASE}
+	exit ;;
     *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
-        echo m68k-unknown-mint${UNAME_RELEASE}
-        exit ;;
+	echo m68k-unknown-mint${UNAME_RELEASE}
+	exit ;;
     m68k:machten:*:*)
 	echo m68k-apple-machten${UNAME_RELEASE}
 	exit ;;
@@ -481,8 +484,8 @@ EOF
 	echo m88k-motorola-sysv3
 	exit ;;
     AViiON:dgux:*:*)
-        # DG/UX returns AViiON for all architectures
-        UNAME_PROCESSOR=`/usr/bin/uname -p`
+	# DG/UX returns AViiON for all architectures
+	UNAME_PROCESSOR=`/usr/bin/uname -p`
 	if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
 	then
 	    if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
@@ -495,7 +498,7 @@ EOF
 	else
 	    echo i586-dg-dgux${UNAME_RELEASE}
 	fi
- 	exit ;;
+	exit ;;
     M88*:DolphinOS:*:*)	# DolphinOS (SVR3)
 	echo m88k-dolphin-sysv3
 	exit ;;
@@ -552,7 +555,7 @@ EOF
 		echo rs6000-ibm-aix3.2
 	fi
 	exit ;;
-    *:AIX:*:[456])
+    *:AIX:*:[4567])
 	IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
 	if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
 		IBM_ARCH=rs6000
@@ -595,52 +598,52 @@ EOF
 	    9000/[678][0-9][0-9])
 		if [ -x /usr/bin/getconf ]; then
 		    sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
-                    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
-                    case "${sc_cpu_version}" in
-                      523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
-                      528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
-                      532)                      # CPU_PA_RISC2_0
-                        case "${sc_kernel_bits}" in
-                          32) HP_ARCH="hppa2.0n" ;;
-                          64) HP_ARCH="hppa2.0w" ;;
+		    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
+		    case "${sc_cpu_version}" in
+		      523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
+		      528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
+		      532)                      # CPU_PA_RISC2_0
+			case "${sc_kernel_bits}" in
+			  32) HP_ARCH="hppa2.0n" ;;
+			  64) HP_ARCH="hppa2.0w" ;;
 			  '') HP_ARCH="hppa2.0" ;;   # HP-UX 10.20
-                        esac ;;
-                    esac
+			esac ;;
+		    esac
 		fi
 		if [ "${HP_ARCH}" = "" ]; then
 		    eval $set_cc_for_build
-		    sed 's/^              //' << EOF >$dummy.c
+		    sed 's/^		//' << EOF >$dummy.c
 
-              #define _HPUX_SOURCE
-              #include <stdlib.h>
-              #include <unistd.h>
+		#define _HPUX_SOURCE
+		#include <stdlib.h>
+		#include <unistd.h>
 
-              int main ()
-              {
-              #if defined(_SC_KERNEL_BITS)
-                  long bits = sysconf(_SC_KERNEL_BITS);
-              #endif
-                  long cpu  = sysconf (_SC_CPU_VERSION);
+		int main ()
+		{
+		#if defined(_SC_KERNEL_BITS)
+		    long bits = sysconf(_SC_KERNEL_BITS);
+		#endif
+		    long cpu  = sysconf (_SC_CPU_VERSION);
 
-                  switch (cpu)
-              	{
-              	case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
-              	case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
-              	case CPU_PA_RISC2_0:
-              #if defined(_SC_KERNEL_BITS)
-              	    switch (bits)
-              		{
-              		case 64: puts ("hppa2.0w"); break;
-              		case 32: puts ("hppa2.0n"); break;
-              		default: puts ("hppa2.0"); break;
-              		} break;
-              #else  /* !defined(_SC_KERNEL_BITS) */
-              	    puts ("hppa2.0"); break;
-              #endif
-              	default: puts ("hppa1.0"); break;
-              	}
-                  exit (0);
-              }
+		    switch (cpu)
+			{
+			case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
+			case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
+			case CPU_PA_RISC2_0:
+		#if defined(_SC_KERNEL_BITS)
+			    switch (bits)
+				{
+				case 64: puts ("hppa2.0w"); break;
+				case 32: puts ("hppa2.0n"); break;
+				default: puts ("hppa2.0"); break;
+				} break;
+		#else  /* !defined(_SC_KERNEL_BITS) */
+			    puts ("hppa2.0"); break;
+		#endif
+			default: puts ("hppa1.0"); break;
+			}
+		    exit (0);
+		}
 EOF
 		    (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
 		    test -z "$HP_ARCH" && HP_ARCH=hppa
@@ -731,22 +734,22 @@ EOF
 	exit ;;
     C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
 	echo c1-convex-bsd
-        exit ;;
+	exit ;;
     C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
 	if getsysinfo -f scalar_acc
 	then echo c32-convex-bsd
 	else echo c2-convex-bsd
 	fi
-        exit ;;
+	exit ;;
     C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
 	echo c34-convex-bsd
-        exit ;;
+	exit ;;
     C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
 	echo c38-convex-bsd
-        exit ;;
+	exit ;;
     C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
 	echo c4-convex-bsd
-        exit ;;
+	exit ;;
     CRAY*Y-MP:*:*:*)
 	echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
 	exit ;;
@@ -770,14 +773,14 @@ EOF
 	exit ;;
     F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
 	FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
-        FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
-        echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
-        exit ;;
+	FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+	FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
+	echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+	exit ;;
     5000:UNIX_System_V:4.*:*)
-        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
-        FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
-        echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+	FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+	FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
+	echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
 	exit ;;
     i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
 	echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
@@ -805,14 +808,14 @@ EOF
 	echo ${UNAME_MACHINE}-pc-mingw32
 	exit ;;
     i*:windows32*:*)
-    	# uname -m includes "-pc" on this system.
-    	echo ${UNAME_MACHINE}-mingw32
+	# uname -m includes "-pc" on this system.
+	echo ${UNAME_MACHINE}-mingw32
 	exit ;;
     i*:PW*:*)
 	echo ${UNAME_MACHINE}-pc-pw32
 	exit ;;
     *:Interix*:*)
-    	case ${UNAME_MACHINE} in
+	case ${UNAME_MACHINE} in
 	    x86)
 		echo i586-pc-interix${UNAME_RELEASE}
 		exit ;;
@@ -867,7 +870,7 @@ EOF
 	  EV6)   UNAME_MACHINE=alphaev6 ;;
 	  EV67)  UNAME_MACHINE=alphaev67 ;;
 	  EV68*) UNAME_MACHINE=alphaev68 ;;
-        esac
+	esac
 	objdump --private-headers /bin/sh | grep -q ld.so.1
 	if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
 	echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
@@ -879,7 +882,13 @@ EOF
 	then
 	    echo ${UNAME_MACHINE}-unknown-linux-gnu
 	else
-	    echo ${UNAME_MACHINE}-unknown-linux-gnueabi
+	    if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
+		| grep -q __ARM_PCS_VFP
+	    then
+		echo ${UNAME_MACHINE}-unknown-linux-gnueabi
+	    else
+		echo ${UNAME_MACHINE}-unknown-linux-gnueabihf
+	    fi
 	fi
 	exit ;;
     avr32*:Linux:*:*)
@@ -892,7 +901,7 @@ EOF
 	echo crisv32-axis-linux-gnu
 	exit ;;
     frv:Linux:*:*)
-    	echo frv-unknown-linux-gnu
+	echo frv-unknown-linux-gnu
 	exit ;;
     i*86:Linux:*:*)
 	LIBC=gnu
@@ -960,7 +969,7 @@ EOF
 	echo ${UNAME_MACHINE}-ibm-linux
 	exit ;;
     sh64*:Linux:*:*)
-    	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
 	exit ;;
     sh*:Linux:*:*)
 	echo ${UNAME_MACHINE}-unknown-linux-gnu
@@ -968,6 +977,9 @@ EOF
     sparc:Linux:*:* | sparc64:Linux:*:*)
 	echo ${UNAME_MACHINE}-unknown-linux-gnu
 	exit ;;
+    tile*:Linux:*:*)
+	echo ${UNAME_MACHINE}-tilera-linux-gnu
+	exit ;;
     vax:Linux:*:*)
 	echo ${UNAME_MACHINE}-dec-linux-gnu
 	exit ;;
@@ -975,7 +987,7 @@ EOF
 	echo x86_64-unknown-linux-gnu
 	exit ;;
     xtensa*:Linux:*:*)
-    	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
 	exit ;;
     i*86:DYNIX/ptx:4*:*)
 	# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
@@ -984,11 +996,11 @@ EOF
 	echo i386-sequent-sysv4
 	exit ;;
     i*86:UNIX_SV:4.2MP:2.*)
-        # Unixware is an offshoot of SVR4, but it has its own version
-        # number series starting with 2...
-        # I am not positive that other SVR4 systems won't match this,
+	# Unixware is an offshoot of SVR4, but it has its own version
+	# number series starting with 2...
+	# I am not positive that other SVR4 systems won't match this,
 	# I just have to hope.  -- rms.
-        # Use sysv4.2uw... so that sysv4* matches it.
+	# Use sysv4.2uw... so that sysv4* matches it.
 	echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
 	exit ;;
     i*86:OS/2:*:*)
@@ -1020,7 +1032,7 @@ EOF
 	fi
 	exit ;;
     i*86:*:5:[678]*)
-    	# UnixWare 7.x, OpenUNIX and OpenServer 6.
+	# UnixWare 7.x, OpenUNIX and OpenServer 6.
 	case `/bin/uname -X | grep "^Machine"` in
 	    *486*)	     UNAME_MACHINE=i486 ;;
 	    *Pentium)	     UNAME_MACHINE=i586 ;;
@@ -1048,13 +1060,13 @@ EOF
 	exit ;;
     pc:*:*:*)
 	# Left here for compatibility:
-        # uname -m prints for DJGPP always 'pc', but it prints nothing about
-        # the processor, so we play safe by assuming i586.
+	# uname -m prints for DJGPP always 'pc', but it prints nothing about
+	# the processor, so we play safe by assuming i586.
 	# Note: whatever this is, it MUST be the same as what config.sub
 	# prints for the "djgpp" host, or else GDB configury will decide that
 	# this is a cross-build.
 	echo i586-pc-msdosdjgpp
-        exit ;;
+	exit ;;
     Intel:Mach:3*:*)
 	echo i386-pc-mach3
 	exit ;;
@@ -1089,8 +1101,8 @@ EOF
 	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
 	  && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
     3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
-        /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
-          && { echo i486-ncr-sysv4; exit; } ;;
+	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+	  && { echo i486-ncr-sysv4; exit; } ;;
     NCR*:*:4.2:* | MPRAS*:*:4.2:*)
 	OS_REL='.3'
 	test -r /etc/.relid \
@@ -1133,10 +1145,10 @@ EOF
 		echo ns32k-sni-sysv
 	fi
 	exit ;;
-    PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
-                      # says <Richard.M.Bartel at ccMail.Census.GOV>
-        echo i586-unisys-sysv4
-        exit ;;
+    PENTIUM:*:4.0*:*)	# Unisys `ClearPath HMP IX 4000' SVR4/MP effort
+			# says <Richard.M.Bartel at ccMail.Census.GOV>
+	echo i586-unisys-sysv4
+	exit ;;
     *:UNIX_System_V:4*:FTX*)
 	# From Gerald Hewes <hewes at openmarket.com>.
 	# How about differentiating between stratus architectures? -djm
@@ -1162,11 +1174,11 @@ EOF
 	exit ;;
     R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
 	if [ -d /usr/nec ]; then
-	        echo mips-nec-sysv${UNAME_RELEASE}
+		echo mips-nec-sysv${UNAME_RELEASE}
 	else
-	        echo mips-unknown-sysv${UNAME_RELEASE}
+		echo mips-unknown-sysv${UNAME_RELEASE}
 	fi
-        exit ;;
+	exit ;;
     BeBox:BeOS:*:*)	# BeOS running on hardware made by Be, PPC only.
 	echo powerpc-be-beos
 	exit ;;
@@ -1231,6 +1243,9 @@ EOF
     *:QNX:*:4*)
 	echo i386-pc-qnx
 	exit ;;
+    NEO-?:NONSTOP_KERNEL:*:*)
+	echo neo-tandem-nsk${UNAME_RELEASE}
+	exit ;;
     NSE-?:NONSTOP_KERNEL:*:*)
 	echo nse-tandem-nsk${UNAME_RELEASE}
 	exit ;;
@@ -1276,13 +1291,13 @@ EOF
 	echo pdp10-unknown-its
 	exit ;;
     SEI:*:*:SEIUX)
-        echo mips-sei-seiux${UNAME_RELEASE}
+	echo mips-sei-seiux${UNAME_RELEASE}
 	exit ;;
     *:DragonFly:*:*)
 	echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
 	exit ;;
     *:*VMS:*:*)
-    	UNAME_MACHINE=`(uname -p) 2>/dev/null`
+	UNAME_MACHINE=`(uname -p) 2>/dev/null`
 	case "${UNAME_MACHINE}" in
 	    A*) echo alpha-dec-vms ; exit ;;
 	    I*) echo ia64-dec-vms ; exit ;;
@@ -1322,11 +1337,11 @@ main ()
 #include <sys/param.h>
   printf ("m68k-sony-newsos%s\n",
 #ifdef NEWSOS4
-          "4"
+	"4"
 #else
-	  ""
+	""
 #endif
-         ); exit (0);
+	); exit (0);
 #endif
 #endif
 
diff --git a/config.sub b/config.sub
index c2d1257..30fdca8 100755
--- a/config.sub
+++ b/config.sub
@@ -1,10 +1,10 @@
 #! /bin/sh
 # Configuration validation subroutine script.
 #   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
-#   Free Software Foundation, Inc.
+#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
+#   2011 Free Software Foundation, Inc.
 
-timestamp='2010-01-22'
+timestamp='2011-03-23'
 
 # This file is (in principle) common to ALL GNU software.
 # The presence of a machine in this file suggests that SOME GNU software
@@ -76,7 +76,7 @@ version="\
 GNU config.sub ($timestamp)
 
 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free
+2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free
 Software Foundation, Inc.
 
 This is free software; see the source for copying conditions.  There is NO
@@ -124,8 +124,9 @@ esac
 # Here we must recognize all the valid KERNEL-OS combinations.
 maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
 case $maybe_os in
-  nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
-  uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
+  nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
+  linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
+  knetbsd*-gnu* | netbsd*-gnu* | \
   kopensolaris*-gnu* | \
   storm-chaos* | os2-emx* | rtmk-nova*)
     os=-$maybe_os
@@ -157,8 +158,8 @@ case $os in
 		os=
 		basic_machine=$1
 		;;
-        -bluegene*)
-	        os=-cnk
+	-bluegene*)
+		os=-cnk
 		;;
 	-sim | -cisco | -oki | -wec | -winbond)
 		os=
@@ -174,10 +175,10 @@ case $os in
 		os=-chorusos
 		basic_machine=$1
 		;;
- 	-chorusrdb)
- 		os=-chorusrdb
+	-chorusrdb)
+		os=-chorusrdb
 		basic_machine=$1
- 		;;
+		;;
 	-hiux*)
 		os=-hiuxwe2
 		;;
@@ -282,11 +283,13 @@ case $basic_machine in
 	| moxie \
 	| mt \
 	| msp430 \
+	| nds32 | nds32le | nds32be \
 	| nios | nios2 \
 	| ns16k | ns32k \
+	| open8 \
 	| or32 \
 	| pdp10 | pdp11 | pj | pjl \
-	| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
+	| powerpc | powerpc64 | powerpc64le | powerpcle \
 	| pyramid \
 	| rx \
 	| score \
@@ -294,15 +297,24 @@ case $basic_machine in
 	| sh64 | sh64le \
 	| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
 	| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
-	| spu | strongarm \
-	| tahoe | thumb | tic4x | tic80 | tron \
+	| spu \
+	| tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
 	| ubicom32 \
 	| v850 | v850e \
 	| we32k \
-	| x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
+	| x86 | xc16x | xstormy16 | xtensa \
 	| z8k | z80)
 		basic_machine=$basic_machine-unknown
 		;;
+	c54x)
+		basic_machine=tic54x-unknown
+		;;
+	c55x)
+		basic_machine=tic55x-unknown
+		;;
+	c6x)
+		basic_machine=tic6x-unknown
+		;;
 	m6811 | m68hc11 | m6812 | m68hc12 | picochip)
 		# Motorola 68HC11/12.
 		basic_machine=$basic_machine-unknown
@@ -314,6 +326,18 @@ case $basic_machine in
 		basic_machine=mt-unknown
 		;;
 
+	strongarm | thumb | xscale)
+		basic_machine=arm-unknown
+		;;
+
+	xscaleeb)
+		basic_machine=armeb-unknown
+		;;
+
+	xscaleel)
+		basic_machine=armel-unknown
+		;;
+
 	# We use `pc' rather than `unknown'
 	# because (1) that's what they normally are, and
 	# (2) the word "unknown" tends to confuse beginning users.
@@ -334,7 +358,7 @@ case $basic_machine in
 	| arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
 	| avr-* | avr32-* \
 	| bfin-* | bs2000-* \
-	| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
+	| c[123]* | c30-* | [cjt]90-* | c4x-* \
 	| clipper-* | craynv-* | cydra-* \
 	| d10v-* | d30v-* | dlx-* \
 	| elxsi-* \
@@ -368,26 +392,28 @@ case $basic_machine in
 	| mmix-* \
 	| mt-* \
 	| msp430-* \
+	| nds32-* | nds32le-* | nds32be-* \
 	| nios-* | nios2-* \
 	| none-* | np1-* | ns16k-* | ns32k-* \
+	| open8-* \
 	| orion-* \
 	| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
-	| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
+	| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
 	| pyramid-* \
 	| romp-* | rs6000-* | rx-* \
 	| sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
 	| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
 	| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
 	| sparclite-* \
-	| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
-	| tahoe-* | thumb-* \
+	| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \
+	| tahoe-* \
 	| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
 	| tile-* | tilegx-* \
 	| tron-* \
 	| ubicom32-* \
 	| v850-* | v850e-* | vax-* \
 	| we32k-* \
-	| x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
+	| x86-* | x86_64-* | xc16x-* | xps100-* \
 	| xstormy16-* | xtensa*-* \
 	| ymp-* \
 	| z8k-* | z80-*)
@@ -412,7 +438,7 @@ case $basic_machine in
 		basic_machine=a29k-amd
 		os=-udi
 		;;
-    	abacus)
+	abacus)
 		basic_machine=abacus-unknown
 		;;
 	adobe68k)
@@ -482,11 +508,20 @@ case $basic_machine in
 		basic_machine=powerpc-ibm
 		os=-cnk
 		;;
+	c54x-*)
+		basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	c55x-*)
+		basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	c6x-*)
+		basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
 	c90)
 		basic_machine=c90-cray
 		os=-unicos
 		;;
-        cegcc)
+	cegcc)
 		basic_machine=arm-unknown
 		os=-cegcc
 		;;
@@ -518,7 +553,7 @@ case $basic_machine in
 		basic_machine=craynv-cray
 		os=-unicosmp
 		;;
-	cr16)
+	cr16 | cr16-*)
 		basic_machine=cr16-unknown
 		os=-elf
 		;;
@@ -734,7 +769,7 @@ case $basic_machine in
 		basic_machine=ns32k-utek
 		os=-sysv
 		;;
-        microblaze)
+	microblaze)
 		basic_machine=microblaze-xilinx
 		;;
 	mingw32)
@@ -841,6 +876,12 @@ case $basic_machine in
 	np1)
 		basic_machine=np1-gould
 		;;
+	neo-tandem)
+		basic_machine=neo-tandem
+		;;
+	nse-tandem)
+		basic_machine=nse-tandem
+		;;
 	nsr-tandem)
 		basic_machine=nsr-tandem
 		;;
@@ -923,9 +964,10 @@ case $basic_machine in
 		;;
 	power)	basic_machine=power-ibm
 		;;
-	ppc)	basic_machine=powerpc-unknown
+	ppc | ppcbe)	basic_machine=powerpc-unknown
 		;;
-	ppc-*)	basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
+	ppc-* | ppcbe-*)
+		basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
 		;;
 	ppcle | powerpclittle | ppc-le | powerpc-little)
 		basic_machine=powerpcle-unknown
@@ -1019,6 +1061,9 @@ case $basic_machine in
 		basic_machine=i860-stratus
 		os=-sysv4
 		;;
+	strongarm-* | thumb-*)
+		basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
 	sun2)
 		basic_machine=m68000-sun
 		;;
@@ -1075,20 +1120,8 @@ case $basic_machine in
 		basic_machine=t90-cray
 		os=-unicos
 		;;
-	tic54x | c54x*)
-		basic_machine=tic54x-unknown
-		os=-coff
-		;;
-	tic55x | c55x*)
-		basic_machine=tic55x-unknown
-		os=-coff
-		;;
-	tic6x | c6x*)
-		basic_machine=tic6x-unknown
-		os=-coff
-		;;
-        # This must be matched before tile*.
-        tilegx*)
+	# This must be matched before tile*.
+	tilegx*)
 		basic_machine=tilegx-unknown
 		os=-linux-gnu
 		;;
@@ -1163,6 +1196,9 @@ case $basic_machine in
 	xps | xps100)
 		basic_machine=xps100-honeywell
 		;;
+	xscale-* | xscalee[bl]-*)
+		basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'`
+		;;
 	ymp)
 		basic_machine=ymp-cray
 		os=-unicos
@@ -1260,11 +1296,11 @@ esac
 if [ x"$os" != x"" ]
 then
 case $os in
-        # First match some system type aliases
-        # that might get confused with valid system types.
+	# First match some system type aliases
+	# that might get confused with valid system types.
 	# -solaris* is a basic system type, with this one exception.
-        -auroraux)
-	        os=-auroraux
+	-auroraux)
+		os=-auroraux
 		;;
 	-solaris1 | -solaris1.*)
 		os=`echo $os | sed -e 's|solaris1|sunos4|'`
@@ -1301,7 +1337,8 @@ case $os in
 	      | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
 	      | -chorusos* | -chorusrdb* | -cegcc* \
 	      | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
-	      | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
+	      | -mingw32* | -linux-gnu* | -linux-android* \
+	      | -linux-newlib* | -linux-uclibc* \
 	      | -uxpv* | -beos* | -mpeix* | -udk* \
 	      | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
 	      | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
@@ -1348,7 +1385,7 @@ case $os in
 	-opened*)
 		os=-openedition
 		;;
-        -os400*)
+	-os400*)
 		os=-os400
 		;;
 	-wince*)
@@ -1397,7 +1434,7 @@ case $os in
 	-sinix*)
 		os=-sysv4
 		;;
-        -tpf*)
+	-tpf*)
 		os=-tpf
 		;;
 	-triton*)
@@ -1442,8 +1479,8 @@ case $os in
 	-dicos*)
 		os=-dicos
 		;;
-        -nacl*)
-	        ;;
+	-nacl*)
+		;;
 	-none)
 		;;
 	*)
@@ -1466,10 +1503,10 @@ else
 # system, and we'll never get to this point.
 
 case $basic_machine in
-        score-*)
+	score-*)
 		os=-elf
 		;;
-        spu-*)
+	spu-*)
 		os=-elf
 		;;
 	*-acorn)
@@ -1481,8 +1518,17 @@ case $basic_machine in
 	arm*-semi)
 		os=-aout
 		;;
-        c4x-* | tic4x-*)
-        	os=-coff
+	c4x-* | tic4x-*)
+		os=-coff
+		;;
+	tic54x-*)
+		os=-coff
+		;;
+	tic55x-*)
+		os=-coff
+		;;
+	tic6x-*)
+		os=-coff
 		;;
 	# This must come before the *-dec entry.
 	pdp10-*)
@@ -1509,7 +1555,7 @@ case $basic_machine in
 	m68*-cisco)
 		os=-aout
 		;;
-        mep-*)
+	mep-*)
 		os=-elf
 		;;
 	mips*-cisco)
@@ -1536,7 +1582,7 @@ case $basic_machine in
 	*-ibm)
 		os=-aix
 		;;
-    	*-knuth)
+	*-knuth)
 		os=-mmixware
 		;;
 	*-wec)
diff --git a/configure b/configure
index abbe4c2..209c717 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.67 for mpd 0.16.4.
+# Generated by GNU Autoconf 2.68 for mpd 0.16.5.
 #
 # Report bugs to <musicpd-dev-team at lists.sourceforge.net>.
 #
@@ -91,6 +91,7 @@ fi
 IFS=" ""	$as_nl"
 
 # Find who we are.  Look in the path if we contain no directory separator.
+as_myself=
 case $0 in #((
   *[\\/]* ) as_myself=$0 ;;
   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -216,11 +217,18 @@ IFS=$as_save_IFS
   # We cannot yet assume a decent shell, so we have to provide a
 	# neutralization value for shells without unset; and this also
 	# works around shells that cannot unset nonexistent variables.
+	# Preserve -v and -x to the replacement shell.
 	BASH_ENV=/dev/null
 	ENV=/dev/null
 	(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
 	export CONFIG_SHELL
-	exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
+	case $- in # ((((
+	  *v*x* | *x*v* ) as_opts=-vx ;;
+	  *v* ) as_opts=-v ;;
+	  *x* ) as_opts=-x ;;
+	  * ) as_opts= ;;
+	esac
+	exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"}
 fi
 
     if test x$as_have_required = xno; then :
@@ -552,8 +560,8 @@ MAKEFLAGS=
 # Identity of this package.
 PACKAGE_NAME='mpd'
 PACKAGE_TARNAME='mpd'
-PACKAGE_VERSION='0.16.4'
-PACKAGE_STRING='mpd 0.16.4'
+PACKAGE_VERSION='0.16.5'
+PACKAGE_STRING='mpd 0.16.5'
 PACKAGE_BUGREPORT='musicpd-dev-team at lists.sourceforge.net'
 PACKAGE_URL=''
 
@@ -819,7 +827,12 @@ build_cpu
 build
 MPD_CFLAGS
 MPD_LIBS
+AM_CXXFLAGS
 AM_CFLAGS
+AM_CPPFLAGS
+HAVE_SYSTEMD_FALSE
+HAVE_SYSTEMD_TRUE
+systemdsystemunitdir
 PKG_CONFIG
 RANLIB
 am__fastdepCXX_FALSE
@@ -909,6 +922,7 @@ ac_subst_files=''
 ac_user_opts='
 enable_option_checking
 enable_dependency_tracking
+with_systemdsystemunitdir
 enable_alsa
 enable_ao
 enable_audiofile
@@ -951,6 +965,7 @@ enable_recorder_output
 enable_sidplay
 enable_shout
 enable_sndfile
+enable_solaris_output
 enable_sqlite
 enable_tcp
 enable_test
@@ -1453,7 +1468,7 @@ Try \`$0 --help' for more information"
     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
-    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
+    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
     ;;
 
   esac
@@ -1591,7 +1606,7 @@ if test "$ac_init_help" = "long"; then
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures mpd 0.16.4 to adapt to many kinds of systems.
+\`configure' configures mpd 0.16.5 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1661,7 +1676,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of mpd 0.16.4:";;
+     short | recursive ) echo "Configuration of mpd 0.16.5:";;
    esac
   cat <<\_ACEOF
 
@@ -1690,7 +1705,7 @@ Optional Features:
   --enable-gme            enable Blargg's game music emulator plugin
   --enable-gprof          enable profiling via gprof (default: disabled)
   --enable-httpd-output   enables the HTTP server output
-  --enable-id3            disable id3 support
+  --enable-id3            enable id3 support
   --disable-inotify       disable support Inotify automatic database update
                           (default: enabled)
   --disable-ipv6          disable IPv6 support (default: enable)
@@ -1721,6 +1736,7 @@ Optional Features:
   --enable-sidplay        enable C64 SID support via libsidplay2
   --enable-shout          enables the shoutcast streaming output
   --enable-sndfile        enable sndfile support
+  --enable-solaris-output enables the Solaris /dev/audio output
   --enable-sqlite         enable support for the SQLite database
   --disable-tcp           disable support for clients connecting via TCP
                           (default: enable)
@@ -1741,6 +1757,8 @@ Optional Features:
 Optional Packages:
   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
+  --with-systemdsystemunitdir=DIR
+                          Directory for systemd service files
   --with-tremor=PFX       use Tremor (vorbisidec) integer Ogg Vorbis decoder
                           (with optional prefix)
   --with-zeroconf=[auto|avahi|bonjour|no]
@@ -1932,8 +1950,8 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-mpd configure 0.16.4
-generated by GNU Autoconf 2.67
+mpd configure 0.16.5
+generated by GNU Autoconf 2.68
 
 Copyright (C) 2010 Free Software Foundation, Inc.
 This configure script is free software; the Free Software Foundation
@@ -1979,7 +1997,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
 
 	ac_retval=1
 fi
-  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
   as_fn_set_status $ac_retval
 
 } # ac_fn_c_try_compile
@@ -2017,7 +2035,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
 
 	ac_retval=1
 fi
-  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
   as_fn_set_status $ac_retval
 
 } # ac_fn_cxx_try_compile
@@ -2063,7 +2081,7 @@ fi
   # interfere with the next link command; also delete a directory that is
   # left behind by Apple's compiler.  We do this before executing the actions.
   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
-  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
   as_fn_set_status $ac_retval
 
 } # ac_fn_c_try_link
@@ -2076,7 +2094,7 @@ ac_fn_c_check_func ()
   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
 $as_echo_n "checking for $2... " >&6; }
-if eval "test \"\${$3+set}\"" = set; then :
+if eval \${$3+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -2131,7 +2149,7 @@ fi
 eval ac_res=\$$3
 	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
 $as_echo "$ac_res" >&6; }
-  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
 
 } # ac_fn_c_check_func
 
@@ -2167,7 +2185,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
 
     ac_retval=1
 fi
-  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
   as_fn_set_status $ac_retval
 
 } # ac_fn_c_try_cpp
@@ -2180,10 +2198,10 @@ fi
 ac_fn_c_check_header_mongrel ()
 {
   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-  if eval "test \"\${$3+set}\"" = set; then :
+  if eval \${$3+:} false; then :
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
 $as_echo_n "checking for $2... " >&6; }
-if eval "test \"\${$3+set}\"" = set; then :
+if eval \${$3+:} false; then :
   $as_echo_n "(cached) " >&6
 fi
 eval ac_res=\$$3
@@ -2250,7 +2268,7 @@ $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
 esac
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
 $as_echo_n "checking for $2... " >&6; }
-if eval "test \"\${$3+set}\"" = set; then :
+if eval \${$3+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   eval "$3=\$ac_header_compiler"
@@ -2259,7 +2277,7 @@ eval ac_res=\$$3
 	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
 $as_echo "$ac_res" >&6; }
 fi
-  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
 
 } # ac_fn_c_check_header_mongrel
 
@@ -2300,7 +2318,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
        ac_retval=$ac_status
 fi
   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
-  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
   as_fn_set_status $ac_retval
 
 } # ac_fn_c_try_run
@@ -2314,7 +2332,7 @@ ac_fn_c_check_header_compile ()
   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
 $as_echo_n "checking for $2... " >&6; }
-if eval "test \"\${$3+set}\"" = set; then :
+if eval \${$3+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -2332,7 +2350,7 @@ fi
 eval ac_res=\$$3
 	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
 $as_echo "$ac_res" >&6; }
-  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
 
 } # ac_fn_c_check_header_compile
 
@@ -2347,7 +2365,7 @@ ac_fn_c_check_decl ()
   as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
 $as_echo_n "checking whether $as_decl_name is declared... " >&6; }
-if eval "test \"\${$3+set}\"" = set; then :
+if eval \${$3+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -2378,7 +2396,7 @@ fi
 eval ac_res=\$$3
 	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
 $as_echo "$ac_res" >&6; }
-  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
 
 } # ac_fn_c_check_decl
 
@@ -2391,7 +2409,7 @@ ac_fn_c_check_member ()
   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
 $as_echo_n "checking for $2.$3... " >&6; }
-if eval "test \"\${$4+set}\"" = set; then :
+if eval \${$4+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -2435,15 +2453,15 @@ fi
 eval ac_res=\$$4
 	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
 $as_echo "$ac_res" >&6; }
-  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
 
 } # ac_fn_c_check_member
 cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by mpd $as_me 0.16.4, which was
-generated by GNU Autoconf 2.67.  Invocation command line was
+It was created by mpd $as_me 0.16.5, which was
+generated by GNU Autoconf 2.68.  Invocation command line was
 
   $ $0 $@
 
@@ -2701,7 +2719,7 @@ $as_echo "$as_me: loading site script $ac_site_file" >&6;}
       || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
 as_fn_error $? "failed to load site script $ac_site_file
-See \`config.log' for more details" "$LINENO" 5 ; }
+See \`config.log' for more details" "$LINENO" 5; }
   fi
 done
 
@@ -2839,7 +2857,7 @@ ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
 $as_echo_n "checking for a BSD-compatible install... " >&6; }
 if test -z "$INSTALL"; then
-if test "${ac_cv_path_install+set}" = set; then :
+if ${ac_cv_path_install+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -2926,11 +2944,11 @@ am_lf='
 '
 case `pwd` in
   *[\\\"\#\$\&\'\`$am_lf]*)
-    as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5 ;;
+    as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
 esac
 case $srcdir in
   *[\\\"\#\$\&\'\`$am_lf\ \	]*)
-    as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5 ;;
+    as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;;
 esac
 
 # Do `set' in a subshell so we don't clobber the current shell's
@@ -3016,7 +3034,7 @@ if test "$cross_compiling" != no; then
 set dummy ${ac_tool_prefix}strip; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_STRIP+set}" = set; then :
+if ${ac_cv_prog_STRIP+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$STRIP"; then
@@ -3056,7 +3074,7 @@ if test -z "$ac_cv_prog_STRIP"; then
 set dummy strip; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
+if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$ac_ct_STRIP"; then
@@ -3109,7 +3127,7 @@ INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
 if test -z "$MKDIR_P"; then
-  if test "${ac_cv_path_mkdir+set}" = set; then :
+  if ${ac_cv_path_mkdir+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -3160,7 +3178,7 @@ do
 set dummy $ac_prog; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_AWK+set}" = set; then :
+if ${ac_cv_prog_AWK+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$AWK"; then
@@ -3200,7 +3218,7 @@ done
 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
 set x ${MAKE-make}
 ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
-if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\"" = set; then :
+if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat >conftest.make <<\_ACEOF
@@ -3258,7 +3276,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE='mpd'
- VERSION='0.16.4'
+ VERSION='0.16.5'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -3379,7 +3397,7 @@ if test -n "$ac_tool_prefix"; then
 set dummy ${ac_tool_prefix}gcc; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then :
+if ${ac_cv_prog_CC+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$CC"; then
@@ -3419,7 +3437,7 @@ if test -z "$ac_cv_prog_CC"; then
 set dummy gcc; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
+if ${ac_cv_prog_ac_ct_CC+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$ac_ct_CC"; then
@@ -3472,7 +3490,7 @@ if test -z "$CC"; then
 set dummy ${ac_tool_prefix}cc; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then :
+if ${ac_cv_prog_CC+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$CC"; then
@@ -3512,7 +3530,7 @@ if test -z "$CC"; then
 set dummy cc; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then :
+if ${ac_cv_prog_CC+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$CC"; then
@@ -3571,7 +3589,7 @@ if test -z "$CC"; then
 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then :
+if ${ac_cv_prog_CC+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$CC"; then
@@ -3615,7 +3633,7 @@ do
 set dummy $ac_prog; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
+if ${ac_cv_prog_ac_ct_CC+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$ac_ct_CC"; then
@@ -3670,7 +3688,7 @@ fi
 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
 as_fn_error $? "no acceptable C compiler found in \$PATH
-See \`config.log' for more details" "$LINENO" 5 ; }
+See \`config.log' for more details" "$LINENO" 5; }
 
 # Provide some information about the compiler.
 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
@@ -3785,7 +3803,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
 as_fn_error 77 "C compiler cannot create executables
-See \`config.log' for more details" "$LINENO" 5 ; }
+See \`config.log' for more details" "$LINENO" 5; }
 else
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
@@ -3828,7 +3846,7 @@ else
   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
-See \`config.log' for more details" "$LINENO" 5 ; }
+See \`config.log' for more details" "$LINENO" 5; }
 fi
 rm -f conftest conftest$ac_cv_exeext
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
@@ -3887,7 +3905,7 @@ $as_echo "$ac_try_echo"; } >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
 as_fn_error $? "cannot run C compiled programs.
 If you meant to cross compile, use \`--host'.
-See \`config.log' for more details" "$LINENO" 5 ; }
+See \`config.log' for more details" "$LINENO" 5; }
     fi
   fi
 fi
@@ -3898,7 +3916,7 @@ rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
 ac_clean_files=$ac_clean_files_save
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
 $as_echo_n "checking for suffix of object files... " >&6; }
-if test "${ac_cv_objext+set}" = set; then :
+if ${ac_cv_objext+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -3939,7 +3957,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
 as_fn_error $? "cannot compute suffix of object files: cannot compile
-See \`config.log' for more details" "$LINENO" 5 ; }
+See \`config.log' for more details" "$LINENO" 5; }
 fi
 rm -f conftest.$ac_cv_objext conftest.$ac_ext
 fi
@@ -3949,7 +3967,7 @@ OBJEXT=$ac_cv_objext
 ac_objext=$OBJEXT
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
-if test "${ac_cv_c_compiler_gnu+set}" = set; then :
+if ${ac_cv_c_compiler_gnu+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -3986,7 +4004,7 @@ ac_test_CFLAGS=${CFLAGS+set}
 ac_save_CFLAGS=$CFLAGS
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
 $as_echo_n "checking whether $CC accepts -g... " >&6; }
-if test "${ac_cv_prog_cc_g+set}" = set; then :
+if ${ac_cv_prog_cc_g+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_save_c_werror_flag=$ac_c_werror_flag
@@ -4064,7 +4082,7 @@ else
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
-if test "${ac_cv_prog_cc_c89+set}" = set; then :
+if ${ac_cv_prog_cc_c89+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_cv_prog_cc_c89=no
@@ -4163,7 +4181,7 @@ depcc="$CC"   am_compiler_list=
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
 $as_echo_n "checking dependency style of $depcc... " >&6; }
-if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
+if ${am_cv_CC_dependencies_compiler_type+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
@@ -4288,7 +4306,7 @@ fi
 
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5
 $as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
-if test "${ac_cv_prog_cc_c99+set}" = set; then :
+if ${ac_cv_prog_cc_c99+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_cv_prog_cc_c99=no
@@ -4479,7 +4497,7 @@ if test -z "$CXX"; then
 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CXX+set}" = set; then :
+if ${ac_cv_prog_CXX+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$CXX"; then
@@ -4523,7 +4541,7 @@ do
 set dummy $ac_prog; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then :
+if ${ac_cv_prog_ac_ct_CXX+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$ac_ct_CXX"; then
@@ -4601,7 +4619,7 @@ done
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
-if test "${ac_cv_cxx_compiler_gnu+set}" = set; then :
+if ${ac_cv_cxx_compiler_gnu+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -4638,7 +4656,7 @@ ac_test_CXXFLAGS=${CXXFLAGS+set}
 ac_save_CXXFLAGS=$CXXFLAGS
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
 $as_echo_n "checking whether $CXX accepts -g... " >&6; }
-if test "${ac_cv_prog_cxx_g+set}" = set; then :
+if ${ac_cv_prog_cxx_g+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_save_cxx_werror_flag=$ac_cxx_werror_flag
@@ -4724,7 +4742,7 @@ depcc="$CXX"  am_compiler_list=
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
 $as_echo_n "checking dependency style of $depcc... " >&6; }
-if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then :
+if ${am_cv_CXX_dependencies_compiler_type+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
@@ -4852,7 +4870,7 @@ if test -n "$ac_tool_prefix"; then
 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_RANLIB+set}" = set; then :
+if ${ac_cv_prog_RANLIB+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$RANLIB"; then
@@ -4892,7 +4910,7 @@ if test -z "$ac_cv_prog_RANLIB"; then
 set dummy ranlib; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
+if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$ac_ct_RANLIB"; then
@@ -4948,7 +4966,7 @@ if test x$CXX = xg++; then
 set dummy $CXX; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_CXX+set}" = set; then :
+if ${ac_cv_path_CXX+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   case $CXX in
@@ -5001,7 +5019,7 @@ fi
 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
 set x ${MAKE-make}
 ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
-if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\"" = set; then :
+if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat >conftest.make <<\_ACEOF
@@ -5036,7 +5054,7 @@ if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
+if ${ac_cv_path_PKG_CONFIG+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   case $PKG_CONFIG in
@@ -5079,7 +5097,7 @@ if test -z "$ac_cv_path_PKG_CONFIG"; then
 set dummy pkg-config; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then :
+if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   case $ac_pt_PKG_CONFIG in
@@ -5145,8 +5163,42 @@ $as_echo "no" >&6; }
 
 fi
 
+# Check whether --with-systemdsystemunitdir was given.
+if test "${with_systemdsystemunitdir+set}" = set; then :
+  withval=$with_systemdsystemunitdir;
+else
+  with_systemdsystemunitdir=no
+fi
+
+if test "x$with_systemdsystemunitdir" = xyes; then
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for systemd" >&5
+$as_echo_n "checking for systemd... " >&6; }
+	with_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd)
+	if test -z "$with_systemdsystemunitdir"; then
+		as_fn_error $? "Failed to detect systemd" "$LINENO" 5
+	fi
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_systemdsystemunitdir" >&5
+$as_echo "$with_systemdsystemunitdir" >&6; }
+fi
+if test "x$with_systemdsystemunitdir" != xno; then
+	systemdsystemunitdir=$with_systemdsystemunitdir
+
+fi
+ if test -n "$with_systemdsystemunitdir" -a "x$with_systemdsystemunitdir" != xno ; then
+  HAVE_SYSTEMD_TRUE=
+  HAVE_SYSTEMD_FALSE='#'
+else
+  HAVE_SYSTEMD_TRUE='#'
+  HAVE_SYSTEMD_FALSE=
+fi
+
+
+AM_CPPFLAGS=""
+
 AM_CFLAGS=""
 
+AM_CXXFLAGS=""
+
 
 
 
@@ -5159,7 +5211,7 @@ $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
 $as_echo_n "checking build system type... " >&6; }
-if test "${ac_cv_build+set}" = set; then :
+if ${ac_cv_build+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_build_alias=$build_alias
@@ -5175,7 +5227,7 @@ fi
 $as_echo "$ac_cv_build" >&6; }
 case $ac_cv_build in
 *-*-*) ;;
-*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5 ;;
+*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
 esac
 build=$ac_cv_build
 ac_save_IFS=$IFS; IFS='-'
@@ -5193,7 +5245,7 @@ case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
 $as_echo_n "checking host system type... " >&6; }
-if test "${ac_cv_host+set}" = set; then :
+if ${ac_cv_host+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test "x$host_alias" = x; then
@@ -5208,7 +5260,7 @@ fi
 $as_echo "$ac_cv_host" >&6; }
 case $ac_cv_host in
 *-*-*) ;;
-*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5 ;;
+*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
 esac
 host=$ac_cv_host
 ac_save_IFS=$IFS; IFS='-'
@@ -5286,7 +5338,7 @@ if test $ac_cv_func_syslog = no; then
 		as_ac_Lib=`$as_echo "ac_cv_lib_$lib''_syslog" | $as_tr_sh`
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for syslog in -l$lib" >&5
 $as_echo_n "checking for syslog in -l$lib... " >&6; }
-if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
+if eval \${$as_ac_Lib+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -5332,7 +5384,7 @@ fi
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
 $as_echo_n "checking for socket in -lsocket... " >&6; }
-if test "${ac_cv_lib_socket_socket+set}" = set; then :
+if ${ac_cv_lib_socket_socket+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -5366,13 +5418,13 @@ LIBS=$ac_check_lib_save_LIBS
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
 $as_echo "$ac_cv_lib_socket_socket" >&6; }
-if test "x$ac_cv_lib_socket_socket" = x""yes; then :
+if test "x$ac_cv_lib_socket_socket" = xyes; then :
   MPD_LIBS="$MPD_LIBS -lsocket"
 fi
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
 $as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
-if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then :
+if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -5406,7 +5458,7 @@ LIBS=$ac_check_lib_save_LIBS
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
 $as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
-if test "x$ac_cv_lib_nsl_gethostbyname" = x""yes; then :
+if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
   MPD_LIBS="$MPD_LIBS -lnsl"
 fi
 
@@ -5426,7 +5478,7 @@ done
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for exp in -lm" >&5
 $as_echo_n "checking for exp in -lm... " >&6; }
-if test "${ac_cv_lib_m_exp+set}" = set; then :
+if ${ac_cv_lib_m_exp+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -5460,7 +5512,7 @@ LIBS=$ac_check_lib_save_LIBS
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_exp" >&5
 $as_echo "$ac_cv_lib_m_exp" >&6; }
-if test "x$ac_cv_lib_m_exp" = x""yes; then :
+if test "x$ac_cv_lib_m_exp" = xyes; then :
   MPD_LIBS="$MPD_LIBS -lm"
 fi
 
@@ -5477,7 +5529,7 @@ if test -n "$CPP" && test -d "$CPP"; then
   CPP=
 fi
 if test -z "$CPP"; then
-  if test "${ac_cv_prog_CPP+set}" = set; then :
+  if ${ac_cv_prog_CPP+:} false; then :
   $as_echo_n "(cached) " >&6
 else
       # Double quotes because CPP needs to be expanded
@@ -5593,7 +5645,7 @@ else
   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
-See \`config.log' for more details" "$LINENO" 5 ; }
+See \`config.log' for more details" "$LINENO" 5; }
 fi
 
 ac_ext=c
@@ -5605,7 +5657,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
-if test "${ac_cv_path_GREP+set}" = set; then :
+if ${ac_cv_path_GREP+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -z "$GREP"; then
@@ -5668,7 +5720,7 @@ $as_echo "$ac_cv_path_GREP" >&6; }
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
 $as_echo_n "checking for egrep... " >&6; }
-if test "${ac_cv_path_EGREP+set}" = set; then :
+if ${ac_cv_path_EGREP+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
@@ -5735,7 +5787,7 @@ $as_echo "$ac_cv_path_EGREP" >&6; }
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
 $as_echo_n "checking for ANSI C header files... " >&6; }
-if test "${ac_cv_header_stdc+set}" = set; then :
+if ${ac_cv_header_stdc+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -5865,7 +5917,7 @@ done
 for ac_header in locale.h
 do :
   ac_fn_c_check_header_mongrel "$LINENO" "locale.h" "ac_cv_header_locale_h" "$ac_includes_default"
-if test "x$ac_cv_header_locale_h" = x""yes; then :
+if test "x$ac_cv_header_locale_h" = xyes; then :
   cat >>confdefs.h <<_ACEOF
 #define HAVE_LOCALE_H 1
 _ACEOF
@@ -5877,7 +5929,7 @@ done
 for ac_header in valgrind/memcheck.h
 do :
   ac_fn_c_check_header_mongrel "$LINENO" "valgrind/memcheck.h" "ac_cv_header_valgrind_memcheck_h" "$ac_includes_default"
-if test "x$ac_cv_header_valgrind_memcheck_h" = x""yes; then :
+if test "x$ac_cv_header_valgrind_memcheck_h" = xyes; then :
   cat >>confdefs.h <<_ACEOF
 #define HAVE_VALGRIND_MEMCHECK_H 1
 _ACEOF
@@ -6064,7 +6116,7 @@ if test "$enable_largefile" != no; then
 
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
-if test "${ac_cv_sys_largefile_CC+set}" = set; then :
+if ${ac_cv_sys_largefile_CC+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_cv_sys_largefile_CC=no
@@ -6115,7 +6167,7 @@ $as_echo "$ac_cv_sys_largefile_CC" >&6; }
 
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
-if test "${ac_cv_sys_file_offset_bits+set}" = set; then :
+if ${ac_cv_sys_file_offset_bits+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   while :; do
@@ -6184,7 +6236,7 @@ rm -rf conftest*
   if test $ac_cv_sys_file_offset_bits = unknown; then
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
-if test "${ac_cv_sys_large_files+set}" = set; then :
+if ${ac_cv_sys_large_files+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   while :; do
@@ -6415,6 +6467,14 @@ else
 fi
 
 
+# Check whether --enable-solaris_output was given.
+if test "${enable_solaris_output+set}" = set; then :
+  enableval=$enable_solaris_output;
+else
+  enable_solaris_output=auto
+fi
+
+
 # Check whether --enable-sqlite was given.
 if test "${enable_sqlite+set}" = set; then :
   enableval=$enable_sqlite;
@@ -6677,7 +6737,7 @@ $as_echo "#define HAVE_UN 1" >>confdefs.h
 
 	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct ucred" >&5
 $as_echo_n "checking for struct ucred... " >&6; }
-	if test "${mpd_cv_have_struct_ucred+set}" = set; then :
+	if ${mpd_cv_have_struct_ucred+:} false; then :
   $as_echo_n "(cached) " >&6
 else
 
@@ -6738,7 +6798,7 @@ $as_echo "#define HAVE_STRUCT_UCRED 1" >>confdefs.h
 	for ac_func in getpeereid
 do :
   ac_fn_c_check_func "$LINENO" "getpeereid" "ac_cv_func_getpeereid"
-if test "x$ac_cv_func_getpeereid" = x""yes; then :
+if test "x$ac_cv_func_getpeereid" = xyes; then :
   cat >>confdefs.h <<_ACEOF
 #define HAVE_GETPEEREID 1
 _ACEOF
@@ -6797,13 +6857,13 @@ if test x$enable_libwrap != xno; then
 	for ac_header in tcpd.h
 do :
   ac_fn_c_check_header_mongrel "$LINENO" "tcpd.h" "ac_cv_header_tcpd_h" "$ac_includes_default"
-if test "x$ac_cv_header_tcpd_h" = x""yes; then :
+if test "x$ac_cv_header_tcpd_h" = xyes; then :
   cat >>confdefs.h <<_ACEOF
 #define HAVE_TCPD_H 1
 _ACEOF
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for request_init in -lwrap" >&5
 $as_echo_n "checking for request_init in -lwrap... " >&6; }
-if test "${ac_cv_lib_wrap_request_init+set}" = set; then :
+if ${ac_cv_lib_wrap_request_init+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -6837,7 +6897,7 @@ LIBS=$ac_check_lib_save_LIBS
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_wrap_request_init" >&5
 $as_echo "$ac_cv_lib_wrap_request_init" >&6; }
-if test "x$ac_cv_lib_wrap_request_init" = x""yes; then :
+if test "x$ac_cv_lib_wrap_request_init" = xyes; then :
   LIBWRAP_CFLAGS=""
 			LIBWRAP_LDFLAGS="-lwrap"
 			found_libwrap=yes
@@ -7095,7 +7155,7 @@ fi
 $as_echo "no" >&6; }
                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for id3_file_open in -lid3tag" >&5
 $as_echo_n "checking for id3_file_open in -lid3tag... " >&6; }
-if test "${ac_cv_lib_id3tag_id3_file_open+set}" = set; then :
+if ${ac_cv_lib_id3tag_id3_file_open+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -7129,7 +7189,7 @@ LIBS=$ac_check_lib_save_LIBS
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_id3tag_id3_file_open" >&5
 $as_echo "$ac_cv_lib_id3tag_id3_file_open" >&6; }
-if test "x$ac_cv_lib_id3tag_id3_file_open" = x""yes; then :
+if test "x$ac_cv_lib_id3tag_id3_file_open" = xyes; then :
   eval "found_id3=yes ID3TAG_LIBS='-lid3tag -lz' ID3TAG_CFLAGS=''"
 else
   eval "found_id3=no"
@@ -7138,7 +7198,7 @@ fi
 elif test $pkg_failed = untried; then
 	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for id3_file_open in -lid3tag" >&5
 $as_echo_n "checking for id3_file_open in -lid3tag... " >&6; }
-if test "${ac_cv_lib_id3tag_id3_file_open+set}" = set; then :
+if ${ac_cv_lib_id3tag_id3_file_open+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -7172,7 +7232,7 @@ LIBS=$ac_check_lib_save_LIBS
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_id3tag_id3_file_open" >&5
 $as_echo "$ac_cv_lib_id3tag_id3_file_open" >&6; }
-if test "x$ac_cv_lib_id3tag_id3_file_open" = x""yes; then :
+if test "x$ac_cv_lib_id3tag_id3_file_open" = xyes; then :
   eval "found_id3=yes ID3TAG_LIBS='-lid3tag -lz' ID3TAG_CFLAGS=''"
 else
   eval "found_id3=no"
@@ -7392,7 +7452,7 @@ enable_bounjour=no
 if test x$with_zeroconf != xno; then
 	if test x$with_zeroconf = xbonjour || test x$with_zeroconf = xauto; then
 		ac_fn_c_check_header_mongrel "$LINENO" "dns_sd.h" "ac_cv_header_dns_sd_h" "$ac_includes_default"
-if test "x$ac_cv_header_dns_sd_h" = x""yes; then :
+if test "x$ac_cv_header_dns_sd_h" = xyes; then :
   enable_bonjour=yes;
 $as_echo "#define HAVE_BONJOUR 1" >>confdefs.h
 
@@ -7401,7 +7461,7 @@ fi
 
 		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for DNSServiceRegister in -ldns_sd" >&5
 $as_echo_n "checking for DNSServiceRegister in -ldns_sd... " >&6; }
-if test "${ac_cv_lib_dns_sd_DNSServiceRegister+set}" = set; then :
+if ${ac_cv_lib_dns_sd_DNSServiceRegister+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -7435,7 +7495,7 @@ LIBS=$ac_check_lib_save_LIBS
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dns_sd_DNSServiceRegister" >&5
 $as_echo "$ac_cv_lib_dns_sd_DNSServiceRegister" >&6; }
-if test "x$ac_cv_lib_dns_sd_DNSServiceRegister" = x""yes; then :
+if test "x$ac_cv_lib_dns_sd_DNSServiceRegister" = xyes; then :
   MPD_LIBS="$MPD_LIBS -ldns_sd"
 fi
 
@@ -8222,7 +8282,7 @@ $as_echo "#define HAVE_ISO9660 1" >>confdefs.h
 set dummy mkisofs; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_MKISOFS+set}" = set; then :
+if ${ac_cv_path_MKISOFS+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   case $MKISOFS in
@@ -8275,7 +8335,7 @@ fi
 if test x$enable_bzip2 = xyes; then
 	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BZ2_bzDecompressInit in -lbz2" >&5
 $as_echo_n "checking for BZ2_bzDecompressInit in -lbz2... " >&6; }
-if test "${ac_cv_lib_bz2_BZ2_bzDecompressInit+set}" = set; then :
+if ${ac_cv_lib_bz2_BZ2_bzDecompressInit+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -8309,7 +8369,7 @@ LIBS=$ac_check_lib_save_LIBS
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bz2_BZ2_bzDecompressInit" >&5
 $as_echo "$ac_cv_lib_bz2_BZ2_bzDecompressInit" >&6; }
-if test "x$ac_cv_lib_bz2_BZ2_bzDecompressInit" = x""yes; then :
+if test "x$ac_cv_lib_bz2_BZ2_bzDecompressInit" = xyes; then :
   MPD_LIBS="$MPD_LIBS -lbz2"
 else
   as_fn_error $? "libbz2 not found" "$LINENO" 5
@@ -8334,7 +8394,7 @@ $as_echo "#define HAVE_BZ2 1" >>confdefs.h
 set dummy bzip2; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_BZIP2+set}" = set; then :
+if ${ac_cv_path_BZIP2+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   case $BZIP2 in
@@ -8516,7 +8576,7 @@ $as_echo "#define HAVE_ZZIP 1" >>confdefs.h
 set dummy zip; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_ZIP+set}" = set; then :
+if ${ac_cv_path_ZIP+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   case $ZIP in
@@ -8772,7 +8832,7 @@ if test x$enable_aac = xyes; then
 	LIBS="$LIBS $MPD_LIBS $FAAD_LIBS"
 	CPPFLAGS=$CFLAGS
 	ac_fn_c_check_header_mongrel "$LINENO" "faad.h" "ac_cv_header_faad_h" "$ac_includes_default"
-if test "x$ac_cv_header_faad_h" = x""yes; then :
+if test "x$ac_cv_header_faad_h" = xyes; then :
 
 else
   enable_aac=no
@@ -8782,7 +8842,7 @@ fi
 	if test x$enable_aac = xyes; then
 		ac_fn_c_check_decl "$LINENO" "FAAD2_VERSION" "ac_cv_have_decl_FAAD2_VERSION" "#include <faad.h>
 "
-if test "x$ac_cv_have_decl_FAAD2_VERSION" = x""yes; then :
+if test "x$ac_cv_have_decl_FAAD2_VERSION" = xyes; then :
 
 else
   enable_aac=no
@@ -8792,7 +8852,7 @@ fi
 	if test x$enable_aac = xyes; then
 		ac_fn_c_check_decl "$LINENO" "faacDecInit2" "ac_cv_have_decl_faacDecInit2" "#include <faad.h>
 "
-if test "x$ac_cv_have_decl_faacDecInit2" = x""yes; then :
+if test "x$ac_cv_have_decl_faacDecInit2" = xyes; then :
 
 else
   enable_aac=no
@@ -8802,7 +8862,7 @@ fi
 	if test x$enable_aac = xyes; then
 		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for faacDecInit2 in -lfaad" >&5
 $as_echo_n "checking for faacDecInit2 in -lfaad... " >&6; }
-if test "${ac_cv_lib_faad_faacDecInit2+set}" = set; then :
+if ${ac_cv_lib_faad_faacDecInit2+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -8836,7 +8896,7 @@ LIBS=$ac_check_lib_save_LIBS
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_faad_faacDecInit2" >&5
 $as_echo "$ac_cv_lib_faad_faacDecInit2" >&6; }
-if test "x$ac_cv_lib_faad_faacDecInit2" = x""yes; then :
+if test "x$ac_cv_lib_faad_faacDecInit2" = xyes; then :
   MPD_LIBS="$MPD_LIBS $FAAD_LIBS";MPD_CFLAGS="$MPD_CFLAGS $FAAD_CFLAGS"
 else
   enable_aac=no
@@ -8846,7 +8906,7 @@ fi
 			enable_aac=yes
 			{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for NeAACDecInit2 in -lfaad" >&5
 $as_echo_n "checking for NeAACDecInit2 in -lfaad... " >&6; }
-if test "${ac_cv_lib_faad_NeAACDecInit2+set}" = set; then :
+if ${ac_cv_lib_faad_NeAACDecInit2+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -8880,7 +8940,7 @@ LIBS=$ac_check_lib_save_LIBS
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_faad_NeAACDecInit2" >&5
 $as_echo "$ac_cv_lib_faad_NeAACDecInit2" >&6; }
-if test "x$ac_cv_lib_faad_NeAACDecInit2" = x""yes; then :
+if test "x$ac_cv_lib_faad_NeAACDecInit2" = xyes; then :
   MPD_LIBS="$MPD_LIBS $FAAD_LIBS";MPD_CFLAGS="$MPD_CFLAGS $FAAD_CFLAGS"
 else
   enable_aac=no
@@ -8977,7 +9037,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 	if test x$enable_aac = xyes; then
 		ac_fn_c_check_member "$LINENO" "faacDecConfiguration" "downMatrix" "ac_cv_member_faacDecConfiguration_downMatrix" "#include <faad.h>
 "
-if test "x$ac_cv_member_faacDecConfiguration_downMatrix" = x""yes; then :
+if test "x$ac_cv_member_faacDecConfiguration_downMatrix" = xyes; then :
 
 cat >>confdefs.h <<_ACEOF
 #define HAVE_FAACDECCONFIGURATION_DOWNMATRIX 1
@@ -8987,7 +9047,7 @@ _ACEOF
 fi
 ac_fn_c_check_member "$LINENO" "faacDecConfiguration" "dontUpSampleImplicitSBR" "ac_cv_member_faacDecConfiguration_dontUpSampleImplicitSBR" "#include <faad.h>
 "
-if test "x$ac_cv_member_faacDecConfiguration_dontUpSampleImplicitSBR" = x""yes; then :
+if test "x$ac_cv_member_faacDecConfiguration_dontUpSampleImplicitSBR" = xyes; then :
 
 cat >>confdefs.h <<_ACEOF
 #define HAVE_FAACDECCONFIGURATION_DONTUPSAMPLEIMPLICITSBR 1
@@ -8997,7 +9057,7 @@ _ACEOF
 fi
 ac_fn_c_check_member "$LINENO" "faacDecFrameInfo" "samplerate" "ac_cv_member_faacDecFrameInfo_samplerate" "#include <faad.h>
 "
-if test "x$ac_cv_member_faacDecFrameInfo_samplerate" = x""yes; then :
+if test "x$ac_cv_member_faacDecFrameInfo_samplerate" = xyes; then :
 
 cat >>confdefs.h <<_ACEOF
 #define HAVE_FAACDECFRAMEINFO_SAMPLERATE 1
@@ -9073,7 +9133,7 @@ if test x$enable_aac = xyes; then
 	CPPFLAGS=$CFLAGS
 
 	ac_fn_c_check_header_mongrel "$LINENO" "mp4ff.h" "ac_cv_header_mp4ff_h" "$ac_includes_default"
-if test "x$ac_cv_header_mp4ff_h" = x""yes; then :
+if test "x$ac_cv_header_mp4ff_h" = xyes; then :
 
 else
   enable_mp4=no
@@ -9084,7 +9144,7 @@ fi
 	if test x$enable_mp4 = xyes; then
 		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for mp4ff_open_read in -lmp4ff" >&5
 $as_echo_n "checking for mp4ff_open_read in -lmp4ff... " >&6; }
-if test "${ac_cv_lib_mp4ff_mp4ff_open_read+set}" = set; then :
+if ${ac_cv_lib_mp4ff_mp4ff_open_read+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -9118,7 +9178,7 @@ LIBS=$ac_check_lib_save_LIBS
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mp4ff_mp4ff_open_read" >&5
 $as_echo "$ac_cv_lib_mp4ff_mp4ff_open_read" >&6; }
-if test "x$ac_cv_lib_mp4ff_mp4ff_open_read" = x""yes; then :
+if test "x$ac_cv_lib_mp4ff_mp4ff_open_read" = xyes; then :
   cat >>confdefs.h <<_ACEOF
 #define HAVE_LIBMP4FF 1
 _ACEOF
@@ -9288,7 +9348,7 @@ if test x$enable_ffmpeg = xyes; then
 	old_CPPCFLAGS=$CPPFLAGS
 	CPPFLAGS="$CPPFLAGS $FFMPEG_CFLAGS"
 	ac_fn_c_check_header_mongrel "$LINENO" "libavcodec/avcodec.h" "ac_cv_header_libavcodec_avcodec_h" "$ac_includes_default"
-if test "x$ac_cv_header_libavcodec_avcodec_h" = x""yes; then :
+if test "x$ac_cv_header_libavcodec_avcodec_h" = xyes; then :
 
 else
 
@@ -9443,7 +9503,7 @@ $as_echo "#define HAVE_FLAC 1" >>confdefs.h
 	if test x$enable_flac = xyes && test x$enable_oggflac = xyes; then
 		ac_fn_c_check_decl "$LINENO" "FLAC_API_SUPPORTS_OGG_FLAC" "ac_cv_have_decl_FLAC_API_SUPPORTS_OGG_FLAC" "#include <FLAC/export.h>
 "
-if test "x$ac_cv_have_decl_FLAC_API_SUPPORTS_OGG_FLAC" = x""yes; then :
+if test "x$ac_cv_have_decl_FLAC_API_SUPPORTS_OGG_FLAC" = xyes; then :
   enable_oggflac=flac
 fi
 
@@ -9819,7 +9879,7 @@ fi
 $as_echo "no" >&6; }
                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mad_stream_init in -lmad" >&5
 $as_echo_n "checking for mad_stream_init in -lmad... " >&6; }
-if test "${ac_cv_lib_mad_mad_stream_init+set}" = set; then :
+if ${ac_cv_lib_mad_mad_stream_init+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -9853,7 +9913,7 @@ LIBS=$ac_check_lib_save_LIBS
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mad_mad_stream_init" >&5
 $as_echo "$ac_cv_lib_mad_mad_stream_init" >&6; }
-if test "x$ac_cv_lib_mad_mad_stream_init" = x""yes; then :
+if test "x$ac_cv_lib_mad_mad_stream_init" = xyes; then :
   eval "found_mad=yes MAD_LIBS='-lmad' MAD_CFLAGS=''"
 else
   eval "found_mad=no"
@@ -9862,7 +9922,7 @@ fi
 elif test $pkg_failed = untried; then
 	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for mad_stream_init in -lmad" >&5
 $as_echo_n "checking for mad_stream_init in -lmad... " >&6; }
-if test "${ac_cv_lib_mad_mad_stream_init+set}" = set; then :
+if ${ac_cv_lib_mad_mad_stream_init+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -9896,7 +9956,7 @@ LIBS=$ac_check_lib_save_LIBS
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mad_mad_stream_init" >&5
 $as_echo "$ac_cv_lib_mad_mad_stream_init" >&6; }
-if test "x$ac_cv_lib_mad_mad_stream_init" = x""yes; then :
+if test "x$ac_cv_lib_mad_mad_stream_init" = xyes; then :
   eval "found_mad=yes MAD_LIBS='-lmad' MAD_CFLAGS=''"
 else
   eval "found_mad=no"
@@ -10216,7 +10276,7 @@ if test x$enable_mikmod = xyes; then
 set dummy libmikmod-config; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_LIBMIKMOD_CONFIG+set}" = set; then :
+if ${ac_cv_path_LIBMIKMOD_CONFIG+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   case $LIBMIKMOD_CONFIG in
@@ -10579,11 +10639,11 @@ if test x$enable_mpc = xyes; then
 	LIBS="$LIBS $MPD_LIBS $MPCDEC_LIBS"
 	CPPFLAGS=$CFLAGS
 	ac_fn_c_check_header_mongrel "$LINENO" "mpc/mpcdec.h" "ac_cv_header_mpc_mpcdec_h" "$ac_includes_default"
-if test "x$ac_cv_header_mpc_mpcdec_h" = x""yes; then :
+if test "x$ac_cv_header_mpc_mpcdec_h" = xyes; then :
   old_mpcdec=no
 else
   ac_fn_c_check_header_mongrel "$LINENO" "mpcdec/mpcdec.h" "ac_cv_header_mpcdec_mpcdec_h" "$ac_includes_default"
-if test "x$ac_cv_header_mpcdec_mpcdec_h" = x""yes; then :
+if test "x$ac_cv_header_mpcdec_mpcdec_h" = xyes; then :
   old_mpcdec=yes
 else
   enable_mpc=no
@@ -10596,7 +10656,7 @@ fi
 	if test x$enable_mpc = xyes; then
 		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lmpcdec" >&5
 $as_echo_n "checking for main in -lmpcdec... " >&6; }
-if test "${ac_cv_lib_mpcdec_main+set}" = set; then :
+if ${ac_cv_lib_mpcdec_main+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -10624,7 +10684,7 @@ LIBS=$ac_check_lib_save_LIBS
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpcdec_main" >&5
 $as_echo "$ac_cv_lib_mpcdec_main" >&6; }
-if test "x$ac_cv_lib_mpcdec_main" = x""yes; then :
+if test "x$ac_cv_lib_mpcdec_main" = xyes; then :
   MPD_LIBS="$MPD_LIBS $MPCDEC_LIBS";
 			MPD_CFLAGS="$MPD_CFLAGS $MPCDEC_CFLAGS";
 else
@@ -10684,7 +10744,7 @@ if test x$enable_tremor = xyes; then
 	LIBS="$LIBS $TREMOR_LIBS"
 	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ov_read in -lvorbisidec" >&5
 $as_echo_n "checking for ov_read in -lvorbisidec... " >&6; }
-if test "${ac_cv_lib_vorbisidec_ov_read+set}" = set; then :
+if ${ac_cv_lib_vorbisidec_ov_read+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -10718,7 +10778,7 @@ LIBS=$ac_check_lib_save_LIBS
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_vorbisidec_ov_read" >&5
 $as_echo "$ac_cv_lib_vorbisidec_ov_read" >&6; }
-if test "x$ac_cv_lib_vorbisidec_ov_read" = x""yes; then :
+if test "x$ac_cv_lib_vorbisidec_ov_read" = xyes; then :
   cat >>confdefs.h <<_ACEOF
 #define HAVE_LIBVORBISIDEC 1
 _ACEOF
@@ -10759,7 +10819,7 @@ fi
 
 if test x$enable_oggflac = xyes; then
 	ac_fn_c_check_header_mongrel "$LINENO" "OggFLAC/stream_decoder.h" "ac_cv_header_OggFLAC_stream_decoder_h" "$ac_includes_default"
-if test "x$ac_cv_header_OggFLAC_stream_decoder_h" = x""yes; then :
+if test "x$ac_cv_header_OggFLAC_stream_decoder_h" = xyes; then :
 
 else
   enable_oggflac=no
@@ -10952,7 +11012,7 @@ if test x$enable_sidplay != xno; then
 	# because libsidplay2's .pc file requires libtool
 	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lsidplay2" >&5
 $as_echo_n "checking for main in -lsidplay2... " >&6; }
-if test "${ac_cv_lib_sidplay2_main+set}" = set; then :
+if ${ac_cv_lib_sidplay2_main+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -10980,7 +11040,7 @@ LIBS=$ac_check_lib_save_LIBS
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sidplay2_main" >&5
 $as_echo "$ac_cv_lib_sidplay2_main" >&6; }
-if test "x$ac_cv_lib_sidplay2_main" = x""yes; then :
+if test "x$ac_cv_lib_sidplay2_main" = xyes; then :
   found_sidplay=yes
 else
   found_sidplay=no
@@ -11017,7 +11077,7 @@ if test x$enable_sidplay != xno; then
 	# library name triggers an autoconf bug
 	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lresid-builder" >&5
 $as_echo_n "checking for main in -lresid-builder... " >&6; }
-if test "${ac_cv_lib_resid_builder_main+set}" = set; then :
+if ${ac_cv_lib_resid_builder_main+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -11045,7 +11105,7 @@ LIBS=$ac_check_lib_save_LIBS
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resid_builder_main" >&5
 $as_echo "$ac_cv_lib_resid_builder_main" >&6; }
-if test "x$ac_cv_lib_resid_builder_main" = x""yes; then :
+if test "x$ac_cv_lib_resid_builder_main" = xyes; then :
   found_sidplay=yes
 else
   found_sidplay=no
@@ -11055,7 +11115,7 @@ fi
 	if test x$found_sidplay = xyes; then
 		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lsidutils" >&5
 $as_echo_n "checking for main in -lsidutils... " >&6; }
-if test "${ac_cv_lib_sidutils_main+set}" = set; then :
+if ${ac_cv_lib_sidutils_main+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -11083,7 +11143,7 @@ LIBS=$ac_check_lib_save_LIBS
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sidutils_main" >&5
 $as_echo "$ac_cv_lib_sidutils_main" >&6; }
-if test "x$ac_cv_lib_sidutils_main" = x""yes; then :
+if test "x$ac_cv_lib_sidutils_main" = xyes; then :
   cat >>confdefs.h <<_ACEOF
 #define HAVE_LIBSIDUTILS 1
 _ACEOF
@@ -11291,7 +11351,7 @@ if test x$enable_wildmidi = xyes; then
 
 	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for WildMidi_Init in -lWildMidi" >&5
 $as_echo_n "checking for WildMidi_Init in -lWildMidi... " >&6; }
-if test "${ac_cv_lib_WildMidi_WildMidi_Init+set}" = set; then :
+if ${ac_cv_lib_WildMidi_WildMidi_Init+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -11325,7 +11385,7 @@ LIBS=$ac_check_lib_save_LIBS
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_WildMidi_WildMidi_Init" >&5
 $as_echo "$ac_cv_lib_WildMidi_WildMidi_Init" >&6; }
-if test "x$ac_cv_lib_WildMidi_WildMidi_Init" = x""yes; then :
+if test "x$ac_cv_lib_WildMidi_WildMidi_Init" = xyes; then :
   cat >>confdefs.h <<_ACEOF
 #define HAVE_LIBWILDMIDI 1
 _ACEOF
@@ -11339,7 +11399,7 @@ fi
 
 	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for WildMidi_SampledSeek in -lWildMidi" >&5
 $as_echo_n "checking for WildMidi_SampledSeek in -lWildMidi... " >&6; }
-if test "${ac_cv_lib_WildMidi_WildMidi_SampledSeek+set}" = set; then :
+if ${ac_cv_lib_WildMidi_WildMidi_SampledSeek+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -11373,7 +11433,7 @@ LIBS=$ac_check_lib_save_LIBS
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_WildMidi_WildMidi_SampledSeek" >&5
 $as_echo "$ac_cv_lib_WildMidi_WildMidi_SampledSeek" >&6; }
-if test "x$ac_cv_lib_WildMidi_WildMidi_SampledSeek" = x""yes; then :
+if test "x$ac_cv_lib_WildMidi_WildMidi_SampledSeek" = xyes; then :
 
 $as_echo "#define HAVE_WILDMIDI_SAMPLED_SEEK 1" >>confdefs.h
 
@@ -11612,7 +11672,7 @@ if test x$enable_lame_encoder != xno; then
 	for ac_header in lame/lame.h
 do :
   ac_fn_c_check_header_mongrel "$LINENO" "lame/lame.h" "ac_cv_header_lame_lame_h" "$ac_includes_default"
-if test "x$ac_cv_header_lame_lame_h" = x""yes; then :
+if test "x$ac_cv_header_lame_lame_h" = xyes; then :
   cat >>confdefs.h <<_ACEOF
 #define HAVE_LAME_LAME_H 1
 _ACEOF
@@ -11621,7 +11681,7 @@ else
   for ac_header in lame.h
 do :
   ac_fn_c_check_header_mongrel "$LINENO" "lame.h" "ac_cv_header_lame_h" "$ac_includes_default"
-if test "x$ac_cv_header_lame_h" = x""yes; then :
+if test "x$ac_cv_header_lame_h" = xyes; then :
   cat >>confdefs.h <<_ACEOF
 #define HAVE_LAME_H 1
 _ACEOF
@@ -11638,7 +11698,7 @@ done
 
 	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lame_init in -lmp3lame" >&5
 $as_echo_n "checking for lame_init in -lmp3lame... " >&6; }
-if test "${ac_cv_lib_mp3lame_lame_init+set}" = set; then :
+if ${ac_cv_lib_mp3lame_lame_init+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -11672,7 +11732,7 @@ LIBS=$ac_check_lib_save_LIBS
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mp3lame_lame_init" >&5
 $as_echo "$ac_cv_lib_mp3lame_lame_init" >&6; }
-if test "x$ac_cv_lib_mp3lame_lame_init" = x""yes; then :
+if test "x$ac_cv_lib_mp3lame_lame_init" = xyes; then :
   cat >>confdefs.h <<_ACEOF
 #define HAVE_LIBMP3LAME 1
 _ACEOF
@@ -12149,7 +12209,7 @@ fi
 
 if test x$enable_fifo = xyes; then
 	ac_fn_c_check_func "$LINENO" "mkfifo" "ac_cv_func_mkfifo"
-if test "x$ac_cv_func_mkfifo" = x""yes; then :
+if test "x$ac_cv_func_mkfifo" = xyes; then :
   enable_fifo=yes;
 $as_echo "#define HAVE_FIFO 1" >>confdefs.h
 
@@ -12323,7 +12383,7 @@ if test x$enable_jack = xyes; then
 	for ac_func in jack_set_info_function
 do :
   ac_fn_c_check_func "$LINENO" "jack_set_info_function" "ac_cv_func_jack_set_info_function"
-if test "x$ac_cv_func_jack_set_info_function" = x""yes; then :
+if test "x$ac_cv_func_jack_set_info_function" = xyes; then :
   cat >>confdefs.h <<_ACEOF
 #define HAVE_JACK_SET_INFO_FUNCTION 1
 _ACEOF
@@ -12607,7 +12667,7 @@ fi
 
 if test x$enable_oss = xyes; then
 	ac_fn_c_check_header_mongrel "$LINENO" "sys/soundcard.h" "ac_cv_header_sys_soundcard_h" "$ac_includes_default"
-if test "x$ac_cv_header_sys_soundcard_h" = x""yes; then :
+if test "x$ac_cv_header_sys_soundcard_h" = xyes; then :
   enable_oss=yes;
 $as_echo "#define HAVE_OSS 1" >>confdefs.h
 
@@ -12843,18 +12903,24 @@ else
 fi
 
 
-case "$host_os" in
-	solaris*)
-
-$as_echo "#define ENABLE_SOLARIS_OUTPUT 1" >>confdefs.h
 
+if test x$enable_solaris_output = xauto; then
+	case "$host_os" in
+	solaris*)
 		enable_solaris_output=yes
 		;;
 
 	*)
 		enable_solaris_output=no
 		;;
-esac
+	esac
+fi
+
+if test x$enable_solaris_output = xyes; then
+
+$as_echo "#define ENABLE_SOLARIS_OUTPUT 1" >>confdefs.h
+
+fi
 
  if test x$enable_solaris_output = xyes; then
   ENABLE_SOLARIS_OUTPUT_TRUE=
@@ -12915,7 +12981,7 @@ if test x$enable_documentation = xyes; then
 set dummy xmlto; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_XMLTO+set}" = set; then :
+if ${ac_cv_path_XMLTO+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   case $XMLTO in
@@ -12965,7 +13031,7 @@ fi
 set dummy doxygen; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_DOXYGEN+set}" = set; then :
+if ${ac_cv_path_DOXYGEN+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   case $DOXYGEN in
@@ -13036,10 +13102,9 @@ fi
 
 
 
-#if test "x$enable_debug" = xno; then
-	# don't set NDEBUG for now, until MPD is stable
-	#AM_CFLAGS="$AM_CFLAGS -DNDEBUG"
-#fi
+if test "x$enable_debug" = xno; then
+	AM_CPPFLAGS="$AM_CPPFLAGS -DNDEBUG"
+fi
 
 if test x$GCC = xyes
 then
@@ -13047,7 +13112,7 @@ then
   var=`echo "-Wall" | tr "=-" "__"`
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler accepts -Wall" >&5
 $as_echo_n "checking whether the C compiler accepts -Wall... " >&6; }
-if eval "test \"\${mpd_check_cflag_$var+set}\"" = set; then :
+if eval \${mpd_check_cflag_$var+:} false; then :
   $as_echo_n "(cached) " >&6
 else
 
@@ -13081,7 +13146,7 @@ $as_echo "$ac_res" >&6; }
   var=`echo "-Wextra" | tr "=-" "__"`
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler accepts -Wextra" >&5
 $as_echo_n "checking whether the C compiler accepts -Wextra... " >&6; }
-if eval "test \"\${mpd_check_cflag_$var+set}\"" = set; then :
+if eval \${mpd_check_cflag_$var+:} false; then :
   $as_echo_n "(cached) " >&6
 else
 
@@ -13115,7 +13180,7 @@ $as_echo "$ac_res" >&6; }
   var=`echo "-Wno-deprecated-declarations" | tr "=-" "__"`
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler accepts -Wno-deprecated-declarations" >&5
 $as_echo_n "checking whether the C compiler accepts -Wno-deprecated-declarations... " >&6; }
-if eval "test \"\${mpd_check_cflag_$var+set}\"" = set; then :
+if eval \${mpd_check_cflag_$var+:} false; then :
   $as_echo_n "(cached) " >&6
 else
 
@@ -13149,7 +13214,7 @@ $as_echo "$ac_res" >&6; }
   var=`echo "-Wmissing-prototypes" | tr "=-" "__"`
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler accepts -Wmissing-prototypes" >&5
 $as_echo_n "checking whether the C compiler accepts -Wmissing-prototypes... " >&6; }
-if eval "test \"\${mpd_check_cflag_$var+set}\"" = set; then :
+if eval \${mpd_check_cflag_$var+:} false; then :
   $as_echo_n "(cached) " >&6
 else
 
@@ -13183,7 +13248,7 @@ $as_echo "$ac_res" >&6; }
   var=`echo "-Wshadow" | tr "=-" "__"`
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler accepts -Wshadow" >&5
 $as_echo_n "checking whether the C compiler accepts -Wshadow... " >&6; }
-if eval "test \"\${mpd_check_cflag_$var+set}\"" = set; then :
+if eval \${mpd_check_cflag_$var+:} false; then :
   $as_echo_n "(cached) " >&6
 else
 
@@ -13217,7 +13282,7 @@ $as_echo "$ac_res" >&6; }
   var=`echo "-Wpointer-arith" | tr "=-" "__"`
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler accepts -Wpointer-arith" >&5
 $as_echo_n "checking whether the C compiler accepts -Wpointer-arith... " >&6; }
-if eval "test \"\${mpd_check_cflag_$var+set}\"" = set; then :
+if eval \${mpd_check_cflag_$var+:} false; then :
   $as_echo_n "(cached) " >&6
 else
 
@@ -13251,7 +13316,7 @@ $as_echo "$ac_res" >&6; }
   var=`echo "-Wstrict-prototypes" | tr "=-" "__"`
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler accepts -Wstrict-prototypes" >&5
 $as_echo_n "checking whether the C compiler accepts -Wstrict-prototypes... " >&6; }
-if eval "test \"\${mpd_check_cflag_$var+set}\"" = set; then :
+if eval \${mpd_check_cflag_$var+:} false; then :
   $as_echo_n "(cached) " >&6
 else
 
@@ -13285,7 +13350,7 @@ $as_echo "$ac_res" >&6; }
   var=`echo "-Wcast-qual" | tr "=-" "__"`
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler accepts -Wcast-qual" >&5
 $as_echo_n "checking whether the C compiler accepts -Wcast-qual... " >&6; }
-if eval "test \"\${mpd_check_cflag_$var+set}\"" = set; then :
+if eval \${mpd_check_cflag_$var+:} false; then :
   $as_echo_n "(cached) " >&6
 else
 
@@ -13319,7 +13384,7 @@ $as_echo "$ac_res" >&6; }
   var=`echo "-Wwrite-strings" | tr "=-" "__"`
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler accepts -Wwrite-strings" >&5
 $as_echo_n "checking whether the C compiler accepts -Wwrite-strings... " >&6; }
-if eval "test \"\${mpd_check_cflag_$var+set}\"" = set; then :
+if eval \${mpd_check_cflag_$var+:} false; then :
   $as_echo_n "(cached) " >&6
 else
 
@@ -13353,7 +13418,7 @@ $as_echo "$ac_res" >&6; }
   var=`echo "-pedantic" | tr "=-" "__"`
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler accepts -pedantic" >&5
 $as_echo_n "checking whether the C compiler accepts -pedantic... " >&6; }
-if eval "test \"\${mpd_check_cflag_$var+set}\"" = set; then :
+if eval \${mpd_check_cflag_$var+:} false; then :
   $as_echo_n "(cached) " >&6
 else
 
@@ -13392,6 +13457,7 @@ fi
 
 if test "x$enable_werror" = xyes; then
 	AM_CFLAGS="$AM_CFLAGS -Werror -pedantic-errors"
+	AM_CXXFLAGS="$AM_CXXFLAGS -Werror"
 fi
 
 echo ''
@@ -14245,11 +14311,11 @@ printf '\n\t'
 
 printf '\n\t'
 
-		num=`expr solaris : 'with'`
+		num=`expr solaris_output : 'with'`
 	if test "$num" != "0"; then
-		var="`echo '$'solaris`"
+		var="`echo '$'solaris_output`"
 	else
-		var="`echo '$'enable_solaris`"
+		var="`echo '$'enable_solaris_output`"
 	fi
 
 	printf '('
@@ -14504,10 +14570,21 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
      :end' >>confcache
 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
   if test -w "$cache_file"; then
-    test "x$cache_file" != "x/dev/null" &&
+    if test "x$cache_file" != "x/dev/null"; then
       { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
 $as_echo "$as_me: updating cache $cache_file" >&6;}
-    cat confcache >$cache_file
+      if test ! -f "$cache_file" || test -h "$cache_file"; then
+	cat confcache >"$cache_file"
+      else
+        case $cache_file in #(
+        */* | ?:*)
+	  mv -f confcache "$cache_file"$$ &&
+	  mv -f "$cache_file"$$ "$cache_file" ;; #(
+        *)
+	  mv -f confcache "$cache_file" ;;
+	esac
+      fi
+    fi
   else
     { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
@@ -14558,6 +14635,10 @@ if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then
   as_fn_error $? "conditional \"am__fastdepCXX\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
+if test -z "${HAVE_SYSTEMD_TRUE}" && test -z "${HAVE_SYSTEMD_FALSE}"; then
+  as_fn_error $? "conditional \"HAVE_SYSTEMD\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
 if test -z "${ENABLE_INOTIFY_TRUE}" && test -z "${ENABLE_INOTIFY_FALSE}"; then
   as_fn_error $? "conditional \"ENABLE_INOTIFY\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
@@ -14815,7 +14896,7 @@ if test -z "${ENABLE_TEST_TRUE}" && test -z "${ENABLE_TEST_FALSE}"; then
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
 
-: ${CONFIG_STATUS=./config.status}
+: "${CONFIG_STATUS=./config.status}"
 ac_write_fail=0
 ac_clean_files_save=$ac_clean_files
 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
@@ -14916,6 +14997,7 @@ fi
 IFS=" ""	$as_nl"
 
 # Find who we are.  Look in the path if we contain no directory separator.
+as_myself=
 case $0 in #((
   *[\\/]* ) as_myself=$0 ;;
   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -15222,8 +15304,8 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by mpd $as_me 0.16.4, which was
-generated by GNU Autoconf 2.67.  Invocation command line was
+This file was extended by mpd $as_me 0.16.5, which was
+generated by GNU Autoconf 2.68.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
   CONFIG_HEADERS  = $CONFIG_HEADERS
@@ -15288,8 +15370,8 @@ _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-mpd config.status 0.16.4
-configured by $0, generated by GNU Autoconf 2.67,
+mpd config.status 0.16.5
+configured by $0, generated by GNU Autoconf 2.68,
   with options \\"\$ac_cs_config\\"
 
 Copyright (C) 2010 Free Software Foundation, Inc.
@@ -15421,7 +15503,7 @@ do
     "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
     "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
 
-  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;;
+  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
   esac
 done
 
@@ -15444,9 +15526,10 @@ fi
 # after its creation but before its name has been assigned to `$tmp'.
 $debug ||
 {
-  tmp=
+  tmp= ac_tmp=
   trap 'exit_status=$?
-  { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
+  : "${ac_tmp:=$tmp}"
+  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
 ' 0
   trap 'as_fn_exit 1' 1 2 13 15
 }
@@ -15454,12 +15537,13 @@ $debug ||
 
 {
   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
-  test -n "$tmp" && test -d "$tmp"
+  test -d "$tmp"
 }  ||
 {
   tmp=./conf$$-$RANDOM
   (umask 077 && mkdir "$tmp")
 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
+ac_tmp=$tmp
 
 # Set up the scripts for CONFIG_FILES section.
 # No need to generate them if there are no CONFIG_FILES.
@@ -15481,7 +15565,7 @@ else
   ac_cs_awk_cr=$ac_cr
 fi
 
-echo 'BEGIN {' >"$tmp/subs1.awk" &&
+echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
 _ACEOF
 
 
@@ -15509,7 +15593,7 @@ done
 rm -f conf$$subs.sh
 
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
+cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
 _ACEOF
 sed -n '
 h
@@ -15557,7 +15641,7 @@ t delim
 rm -f conf$$subs.awk
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 _ACAWK
-cat >>"\$tmp/subs1.awk" <<_ACAWK &&
+cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
   for (key in S) S_is_set[key] = 1
   FS = ""
 
@@ -15589,7 +15673,7 @@ if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
 else
   cat
-fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
+fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
   || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
 _ACEOF
 
@@ -15623,7 +15707,7 @@ fi # test -n "$CONFIG_FILES"
 # No need to generate them if there are no CONFIG_HEADERS.
 # This happens for instance with `./config.status Makefile'.
 if test -n "$CONFIG_HEADERS"; then
-cat >"$tmp/defines.awk" <<\_ACAWK ||
+cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
 BEGIN {
 _ACEOF
 
@@ -15635,8 +15719,8 @@ _ACEOF
 # handling of long lines.
 ac_delim='%!_!# '
 for ac_last_try in false false :; do
-  ac_t=`sed -n "/$ac_delim/p" confdefs.h`
-  if test -z "$ac_t"; then
+  ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
+  if test -z "$ac_tt"; then
     break
   elif $ac_last_try; then
     as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
@@ -15737,7 +15821,7 @@ do
   esac
   case $ac_mode$ac_tag in
   :[FHL]*:*);;
-  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5 ;;
+  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
   :[FH]-) ac_tag=-:-;;
   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
   esac
@@ -15756,7 +15840,7 @@ do
     for ac_f
     do
       case $ac_f in
-      -) ac_f="$tmp/stdin";;
+      -) ac_f="$ac_tmp/stdin";;
       *) # Look for the file first in the build tree, then in the source tree
 	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
 	 # because $ac_f cannot contain `:'.
@@ -15765,7 +15849,7 @@ do
 	   [\\/$]*) false;;
 	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
 	   esac ||
-	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5 ;;
+	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
       esac
       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
       as_fn_append ac_file_inputs " '$ac_f'"
@@ -15791,8 +15875,8 @@ $as_echo "$as_me: creating $ac_file" >&6;}
     esac
 
     case $ac_tag in
-    *:-:* | *:-) cat >"$tmp/stdin" \
-      || as_fn_error $? "could not create $ac_file" "$LINENO" 5  ;;
+    *:-:* | *:-) cat >"$ac_tmp/stdin" \
+      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
     esac
     ;;
   esac
@@ -15928,21 +16012,1753 @@ s&@INSTALL@&$ac_INSTALL&;t t
 s&@MKDIR_P@&$ac_MKDIR_P&;t t
 $ac_datarootdir_hack
 "
-eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
+eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
+  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+
+test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
+  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
+  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
+      "$ac_tmp/out"`; test -z "$ac_out"; } &&
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined.  Please make sure it is defined" >&5
+$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined.  Please make sure it is defined" >&2;}
+
+  rm -f "$ac_tmp/stdin"
+  case $ac_file in
+  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
+  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
+  esac \
   || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+ ;;
+  :H)
+  #
+  # CONFIG_HEADER
+  #
+  if test x"$ac_file" != x-; then
+    {
+      $as_echo "/* $configure_input  */" \
+      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
+    } >"$ac_tmp/config.h" \
+      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+    if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
+      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
+$as_echo "$as_me: $ac_file is unchanged" >&6;}
+    else
+      rm -f "$ac_file"
+      mv "$ac_tmp/config.h" "$ac_file" \
+	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
+    fi
+  else
+    $as_echo "/* $configure_input  */" \
+      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
+      || as_fn_error $? "could not create -" "$LINENO" 5
+  fi
+# Compute "$ac_file"'s index in $config_headers.
+_am_arg="$ac_file"
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+  case $_am_header in
+    $_am_arg | $_am_arg:* )
+      break ;;
+    * )
+      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+  esac
+done
+echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
+$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$_am_arg" : 'X\(//\)[^/]' \| \
+	 X"$_am_arg" : 'X\(//\)$' \| \
+	 X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$_am_arg" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)[^/].*/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`/stamp-h$_am_stamp_count
+ ;;
+
+  :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
+$as_echo "$as_me: executing $ac_file commands" >&6;}
+ ;;
+  esac
+
+
+  case $ac_file$ac_mode in
+    "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
+  # Autoconf 2.62 quotes --file arguments for eval, but not when files
+  # are listed without --file.  Let's play safe and only enable the eval
+  # if we detect the quoting.
+  case $CONFIG_FILES in
+  *\'*) eval set x "$CONFIG_FILES" ;;
+  *)   set x $CONFIG_FILES ;;
+  esac
+  shift
+  for mf
+  do
+    # Strip MF so we end up with the name of the file.
+    mf=`echo "$mf" | sed -e 's/:.*$//'`
+    # Check whether this is an Automake generated Makefile or not.
+    # We used to match only the files named `Makefile.in', but
+    # some people rename them; so instead we look at the file content.
+    # Grep'ing the first line is not enough: some people post-process
+    # each Makefile.in and add a new line on top of each file to say so.
+    # Grep'ing the whole file is not good either: AIX grep has a line
+    # limit of 2048, but all sed's we know have understand at least 4000.
+    if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
+      dirpart=`$as_dirname -- "$mf" ||
+$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$mf" : 'X\(//\)[^/]' \| \
+	 X"$mf" : 'X\(//\)$' \| \
+	 X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$mf" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)[^/].*/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+    else
+      continue
+    fi
+    # Extract the definition of DEPDIR, am__include, and am__quote
+    # from the Makefile without running `make'.
+    DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+    test -z "$DEPDIR" && continue
+    am__include=`sed -n 's/^am__include = //p' < "$mf"`
+    test -z "am__include" && continue
+    am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+    # When using ansi2knr, U may be empty or an underscore; expand it
+    U=`sed -n 's/^U = //p' < "$mf"`
+    # Find all dependency output files, they are included files with
+    # $(DEPDIR) in their names.  We invoke sed twice because it is the
+    # simplest approach to changing $(DEPDIR) to its actual value in the
+    # expansion.
+    for file in `sed -n "
+      s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+	 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+      # Make sure the directory exists.
+      test -f "$dirpart/$file" && continue
+      fdir=`$as_dirname -- "$file" ||
+$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$file" : 'X\(//\)[^/]' \| \
+	 X"$file" : 'X\(//\)$' \| \
+	 X"$file" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$file" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)[^/].*/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+      as_dir=$dirpart/$fdir; as_fn_mkdir_p
+      # echo "creating $dirpart/$file"
+      echo '# dummy' > "$dirpart/$file"
+    done
+  done
+}
+ ;;
+
+  esac
+done # for ac_tag
+
+
+as_fn_exit 0
+_ACEOF
+ac_clean_files=$ac_clean_files_save
+
+test $ac_write_fail = 0 ||
+  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
+
+
+# configure is writing to config.log, and then calls config.status.
+# config.status does its own redirection, appending to config.log.
+# Unfortunately, on DOS this fails, as config.log is still kept open
+# by configure, so config.status won't be able to write to it; its
+# output is simply discarded.  So we exec the FD to /dev/null,
+# effectively closing config.log, so it can be properly (re)opened and
+# appended to by config.status.  When coming back to configure, we
+# need to make the FD available again.
+if test "$no_create" != yes; then
+  ac_cs_success=:
+  ac_config_status_args=
+  test "$silent" = yes &&
+    ac_config_status_args="$ac_config_status_args --quiet"
+  exec 5>/dev/null
+  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
+  exec 5>>config.log
+  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
+  # would make configure fail if this is the last instruction.
+  $ac_cs_success || as_fn_exit 1
+fi
+if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
+$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
+fi
+
+ac_config_files="$ac_config_files mpd.service"
+
+cat >confcache <<\_ACEOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs, see configure's option --config-cache.
+# It is not useful on other systems.  If it contains results you don't
+# want to keep, you may remove or edit it.
+#
+# config.status only pays attention to the cache file if you give it
+# the --recheck option to rerun configure.
+#
+# `ac_cv_env_foo' variables (set or unset) will be overridden when
+# loading this file, other *unset* `ac_cv_foo' will be assigned the
+# following values.
+
+_ACEOF
+
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, we kill variables containing newlines.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+(
+  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
+    eval ac_val=\$$ac_var
+    case $ac_val in #(
+    *${as_nl}*)
+      case $ac_var in #(
+      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+      esac
+      case $ac_var in #(
+      _ | IFS | as_nl) ;; #(
+      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+      *) { eval $ac_var=; unset $ac_var;} ;;
+      esac ;;
+    esac
+  done
+
+  (set) 2>&1 |
+    case $as_nl`(ac_space=' '; set) 2>&1` in #(
+    *${as_nl}ac_space=\ *)
+      # `set' does not quote correctly, so add quotes: double-quote
+      # substitution turns \\\\ into \\, and sed turns \\ into \.
+      sed -n \
+	"s/'/'\\\\''/g;
+	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
+      ;; #(
+    *)
+      # `set' quotes correctly as required by POSIX, so do not add quotes.
+      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+      ;;
+    esac |
+    sort
+) |
+  sed '
+     /^ac_cv_env_/b end
+     t clear
+     :clear
+     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+     t end
+     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+     :end' >>confcache
+if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
+  if test -w "$cache_file"; then
+    if test "x$cache_file" != "x/dev/null"; then
+      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
+$as_echo "$as_me: updating cache $cache_file" >&6;}
+      if test ! -f "$cache_file" || test -h "$cache_file"; then
+	cat confcache >"$cache_file"
+      else
+        case $cache_file in #(
+        */* | ?:*)
+	  mv -f confcache "$cache_file"$$ &&
+	  mv -f "$cache_file"$$ "$cache_file" ;; #(
+        *)
+	  mv -f confcache "$cache_file" ;;
+	esac
+      fi
+    fi
+  else
+    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
+$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
+  fi
+fi
+rm -f confcache
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+DEFS=-DHAVE_CONFIG_H
+
+ac_libobjs=
+ac_ltlibobjs=
+U=
+for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
+  # 1. Remove the extension, and $U if already installed.
+  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
+  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
+  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
+  #    will be set to the directory where LIBOBJS objects are built.
+  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
+  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
+done
+LIBOBJS=$ac_libobjs
+
+LTLIBOBJS=$ac_ltlibobjs
+
+
+ if test -n "$EXEEXT"; then
+  am__EXEEXT_TRUE=
+  am__EXEEXT_FALSE='#'
+else
+  am__EXEEXT_TRUE='#'
+  am__EXEEXT_FALSE=
+fi
+
+if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
+  as_fn_error $? "conditional \"AMDEP\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
+  as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then
+  as_fn_error $? "conditional \"am__fastdepCXX\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${HAVE_SYSTEMD_TRUE}" && test -z "${HAVE_SYSTEMD_FALSE}"; then
+  as_fn_error $? "conditional \"HAVE_SYSTEMD\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${ENABLE_INOTIFY_TRUE}" && test -z "${ENABLE_INOTIFY_FALSE}"; then
+  as_fn_error $? "conditional \"ENABLE_INOTIFY\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${HAVE_CUE_TRUE}" && test -z "${HAVE_CUE_FALSE}"; then
+  as_fn_error $? "conditional \"HAVE_CUE\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${HAVE_ID3TAG_TRUE}" && test -z "${HAVE_ID3TAG_FALSE}"; then
+  as_fn_error $? "conditional \"HAVE_ID3TAG\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${HAVE_AVAHI_TRUE}" && test -z "${HAVE_AVAHI_FALSE}"; then
+  as_fn_error $? "conditional \"HAVE_AVAHI\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${HAVE_ZEROCONF_TRUE}" && test -z "${HAVE_ZEROCONF_FALSE}"; then
+  as_fn_error $? "conditional \"HAVE_ZEROCONF\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${HAVE_BONJOUR_TRUE}" && test -z "${HAVE_BONJOUR_FALSE}"; then
+  as_fn_error $? "conditional \"HAVE_BONJOUR\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${ENABLE_SQLITE_TRUE}" && test -z "${ENABLE_SQLITE_FALSE}"; then
+  as_fn_error $? "conditional \"ENABLE_SQLITE\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${HAVE_LIBSAMPLERATE_TRUE}" && test -z "${HAVE_LIBSAMPLERATE_FALSE}"; then
+  as_fn_error $? "conditional \"HAVE_LIBSAMPLERATE\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${ENABLE_CURL_TRUE}" && test -z "${ENABLE_CURL_FALSE}"; then
+  as_fn_error $? "conditional \"ENABLE_CURL\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${ENABLE_LASTFM_TRUE}" && test -z "${ENABLE_LASTFM_FALSE}"; then
+  as_fn_error $? "conditional \"ENABLE_LASTFM\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${ENABLE_MMS_TRUE}" && test -z "${ENABLE_MMS_FALSE}"; then
+  as_fn_error $? "conditional \"ENABLE_MMS\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${HAVE_ISO9660_TRUE}" && test -z "${HAVE_ISO9660_FALSE}"; then
+  as_fn_error $? "conditional \"HAVE_ISO9660\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${ENABLE_ISO9660_TEST_TRUE}" && test -z "${ENABLE_ISO9660_TEST_FALSE}"; then
+  as_fn_error $? "conditional \"ENABLE_ISO9660_TEST\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${HAVE_BZ2_TRUE}" && test -z "${HAVE_BZ2_FALSE}"; then
+  as_fn_error $? "conditional \"HAVE_BZ2\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${ENABLE_BZIP2_TEST_TRUE}" && test -z "${ENABLE_BZIP2_TEST_FALSE}"; then
+  as_fn_error $? "conditional \"ENABLE_BZIP2_TEST\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${HAVE_ZZIP_TRUE}" && test -z "${HAVE_ZZIP_FALSE}"; then
+  as_fn_error $? "conditional \"HAVE_ZZIP\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${ENABLE_ZZIP_TEST_TRUE}" && test -z "${ENABLE_ZZIP_TEST_FALSE}"; then
+  as_fn_error $? "conditional \"ENABLE_ZZIP_TEST\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${ENABLE_ARCHIVE_TRUE}" && test -z "${ENABLE_ARCHIVE_FALSE}"; then
+  as_fn_error $? "conditional \"ENABLE_ARCHIVE\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${HAVE_AUDIOFILE_TRUE}" && test -z "${HAVE_AUDIOFILE_FALSE}"; then
+  as_fn_error $? "conditional \"HAVE_AUDIOFILE\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${HAVE_FAAD_TRUE}" && test -z "${HAVE_FAAD_FALSE}"; then
+  as_fn_error $? "conditional \"HAVE_FAAD\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${HAVE_MP4_TRUE}" && test -z "${HAVE_MP4_FALSE}"; then
+  as_fn_error $? "conditional \"HAVE_MP4\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${HAVE_FFMPEG_TRUE}" && test -z "${HAVE_FFMPEG_FALSE}"; then
+  as_fn_error $? "conditional \"HAVE_FFMPEG\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${HAVE_FLAC_TRUE}" && test -z "${HAVE_FLAC_FALSE}"; then
+  as_fn_error $? "conditional \"HAVE_FLAC\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${ENABLE_FLUIDSYNTH_TRUE}" && test -z "${ENABLE_FLUIDSYNTH_FALSE}"; then
+  as_fn_error $? "conditional \"ENABLE_FLUIDSYNTH\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${HAVE_GME_TRUE}" && test -z "${HAVE_GME_FALSE}"; then
+  as_fn_error $? "conditional \"HAVE_GME\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${HAVE_MAD_TRUE}" && test -z "${HAVE_MAD_FALSE}"; then
+  as_fn_error $? "conditional \"HAVE_MAD\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${HAVE_MPG123_TRUE}" && test -z "${HAVE_MPG123_FALSE}"; then
+  as_fn_error $? "conditional \"HAVE_MPG123\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${ENABLE_MIKMOD_DECODER_TRUE}" && test -z "${ENABLE_MIKMOD_DECODER_FALSE}"; then
+  as_fn_error $? "conditional \"ENABLE_MIKMOD_DECODER\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${HAVE_MODPLUG_TRUE}" && test -z "${HAVE_MODPLUG_FALSE}"; then
+  as_fn_error $? "conditional \"HAVE_MODPLUG\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${ENABLE_SNDFILE_TRUE}" && test -z "${ENABLE_SNDFILE_FALSE}"; then
+  as_fn_error $? "conditional \"ENABLE_SNDFILE\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${HAVE_MPCDEC_TRUE}" && test -z "${HAVE_MPCDEC_FALSE}"; then
+  as_fn_error $? "conditional \"HAVE_MPCDEC\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${HAVE_OGGFLAC_TRUE}" && test -z "${HAVE_OGGFLAC_FALSE}"; then
+  as_fn_error $? "conditional \"HAVE_OGGFLAC\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${ENABLE_VORBIS_DECODER_TRUE}" && test -z "${ENABLE_VORBIS_DECODER_FALSE}"; then
+  as_fn_error $? "conditional \"ENABLE_VORBIS_DECODER\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${ENABLE_SIDPLAY_TRUE}" && test -z "${ENABLE_SIDPLAY_FALSE}"; then
+  as_fn_error $? "conditional \"ENABLE_SIDPLAY\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${HAVE_WAVPACK_TRUE}" && test -z "${HAVE_WAVPACK_FALSE}"; then
+  as_fn_error $? "conditional \"HAVE_WAVPACK\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${ENABLE_WILDMIDI_TRUE}" && test -z "${ENABLE_WILDMIDI_FALSE}"; then
+  as_fn_error $? "conditional \"ENABLE_WILDMIDI\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${HAVE_OGG_COMMON_TRUE}" && test -z "${HAVE_OGG_COMMON_FALSE}"; then
+  as_fn_error $? "conditional \"HAVE_OGG_COMMON\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${HAVE_FLAC_COMMON_TRUE}" && test -z "${HAVE_FLAC_COMMON_FALSE}"; then
+  as_fn_error $? "conditional \"HAVE_FLAC_COMMON\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${ENABLE_FLAC_ENCODER_TRUE}" && test -z "${ENABLE_FLAC_ENCODER_FALSE}"; then
+  as_fn_error $? "conditional \"ENABLE_FLAC_ENCODER\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${ENABLE_VORBIS_ENCODER_TRUE}" && test -z "${ENABLE_VORBIS_ENCODER_FALSE}"; then
+  as_fn_error $? "conditional \"ENABLE_VORBIS_ENCODER\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${ENABLE_LAME_ENCODER_TRUE}" && test -z "${ENABLE_LAME_ENCODER_FALSE}"; then
+  as_fn_error $? "conditional \"ENABLE_LAME_ENCODER\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${ENABLE_TWOLAME_ENCODER_TRUE}" && test -z "${ENABLE_TWOLAME_ENCODER_FALSE}"; then
+  as_fn_error $? "conditional \"ENABLE_TWOLAME_ENCODER\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${ENABLE_WAVE_ENCODER_TRUE}" && test -z "${ENABLE_WAVE_ENCODER_FALSE}"; then
+  as_fn_error $? "conditional \"ENABLE_WAVE_ENCODER\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${ENABLE_ENCODER_TRUE}" && test -z "${ENABLE_ENCODER_FALSE}"; then
+  as_fn_error $? "conditional \"ENABLE_ENCODER\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${HAVE_ALSA_TRUE}" && test -z "${HAVE_ALSA_FALSE}"; then
+  as_fn_error $? "conditional \"HAVE_ALSA\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${ENABLE_FFADO_OUTPUT_TRUE}" && test -z "${ENABLE_FFADO_OUTPUT_FALSE}"; then
+  as_fn_error $? "conditional \"ENABLE_FFADO_OUTPUT\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${HAVE_FIFO_TRUE}" && test -z "${HAVE_FIFO_FALSE}"; then
+  as_fn_error $? "conditional \"HAVE_FIFO\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${ENABLE_HTTPD_OUTPUT_TRUE}" && test -z "${ENABLE_HTTPD_OUTPUT_FALSE}"; then
+  as_fn_error $? "conditional \"ENABLE_HTTPD_OUTPUT\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${HAVE_JACK_TRUE}" && test -z "${HAVE_JACK_FALSE}"; then
+  as_fn_error $? "conditional \"HAVE_JACK\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${HAVE_AO_TRUE}" && test -z "${HAVE_AO_FALSE}"; then
+  as_fn_error $? "conditional \"HAVE_AO\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${HAVE_MVP_TRUE}" && test -z "${HAVE_MVP_FALSE}"; then
+  as_fn_error $? "conditional \"HAVE_MVP\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${HAVE_OPENAL_TRUE}" && test -z "${HAVE_OPENAL_FALSE}"; then
+  as_fn_error $? "conditional \"HAVE_OPENAL\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${HAVE_OSS_TRUE}" && test -z "${HAVE_OSS_FALSE}"; then
+  as_fn_error $? "conditional \"HAVE_OSS\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${HAVE_OSX_TRUE}" && test -z "${HAVE_OSX_FALSE}"; then
+  as_fn_error $? "conditional \"HAVE_OSX\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${ENABLE_PIPE_OUTPUT_TRUE}" && test -z "${ENABLE_PIPE_OUTPUT_FALSE}"; then
+  as_fn_error $? "conditional \"ENABLE_PIPE_OUTPUT\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${HAVE_PULSE_TRUE}" && test -z "${HAVE_PULSE_FALSE}"; then
+  as_fn_error $? "conditional \"HAVE_PULSE\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${ENABLE_RECORDER_OUTPUT_TRUE}" && test -z "${ENABLE_RECORDER_OUTPUT_FALSE}"; then
+  as_fn_error $? "conditional \"ENABLE_RECORDER_OUTPUT\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${HAVE_SHOUT_TRUE}" && test -z "${HAVE_SHOUT_FALSE}"; then
+  as_fn_error $? "conditional \"HAVE_SHOUT\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${ENABLE_SOLARIS_OUTPUT_TRUE}" && test -z "${ENABLE_SOLARIS_OUTPUT_FALSE}"; then
+  as_fn_error $? "conditional \"ENABLE_SOLARIS_OUTPUT\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${ENABLE_WINMM_OUTPUT_TRUE}" && test -z "${ENABLE_WINMM_OUTPUT_FALSE}"; then
+  as_fn_error $? "conditional \"ENABLE_WINMM_OUTPUT\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${HAVE_XMLTO_TRUE}" && test -z "${HAVE_XMLTO_FALSE}"; then
+  as_fn_error $? "conditional \"HAVE_XMLTO\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${HAVE_XMLTO_TRUE}" && test -z "${HAVE_XMLTO_FALSE}"; then
+  as_fn_error $? "conditional \"HAVE_XMLTO\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${ENABLE_DOCUMENTATION_TRUE}" && test -z "${ENABLE_DOCUMENTATION_FALSE}"; then
+  as_fn_error $? "conditional \"ENABLE_DOCUMENTATION\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${ENABLE_TEST_TRUE}" && test -z "${ENABLE_TEST_FALSE}"; then
+  as_fn_error $? "conditional \"ENABLE_TEST\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${am__EXEEXT_TRUE}" && test -z "${am__EXEEXT_FALSE}"; then
+  as_fn_error $? "conditional \"am__EXEEXT\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+
+: "${CONFIG_STATUS=./config.status}"
+ac_write_fail=0
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files $CONFIG_STATUS"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
+$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
+as_write_fail=0
+cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
+#! $SHELL
+# Generated by $as_me.
+# Run this file to recreate the current configuration.
+# Compiler output produced by configure, useful for debugging
+# configure, is in config.log if it exists.
+
+debug=false
+ac_cs_recheck=false
+ac_cs_silent=false
+
+SHELL=\${CONFIG_SHELL-$SHELL}
+export SHELL
+_ASEOF
+cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
+## -------------------- ##
+## M4sh Initialization. ##
+## -------------------- ##
+
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
+  emulate sh
+  NULLCMD=:
+  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '${1+"$@"}'='"$@"'
+  setopt NO_GLOB_SUBST
+else
+  case `(set -o) 2>/dev/null` in #(
+  *posix*) :
+    set -o posix ;; #(
+  *) :
+     ;;
+esac
+fi
+
+
+as_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
+# Prefer a ksh shell builtin over an external printf program on Solaris,
+# but without wasting forks for bash or zsh.
+if test -z "$BASH_VERSION$ZSH_VERSION" \
+    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
+  as_echo='print -r --'
+  as_echo_n='print -rn --'
+elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+  as_echo='printf %s\n'
+  as_echo_n='printf %s'
+else
+  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+    as_echo_n='/usr/ucb/echo -n'
+  else
+    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+    as_echo_n_body='eval
+      arg=$1;
+      case $arg in #(
+      *"$as_nl"*)
+	expr "X$arg" : "X\\(.*\\)$as_nl";
+	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+      esac;
+      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+    '
+    export as_echo_n_body
+    as_echo_n='sh -c $as_echo_n_body as_echo'
+  fi
+  export as_echo_body
+  as_echo='sh -c $as_echo_body as_echo'
+fi
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+  PATH_SEPARATOR=:
+  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+      PATH_SEPARATOR=';'
+  }
+fi
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.  Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+IFS=" ""	$as_nl"
+
+# Find who we are.  Look in the path if we contain no directory separator.
+as_myself=
+case $0 in #((
+  *[\\/]* ) as_myself=$0 ;;
+  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+  done
+IFS=$as_save_IFS
+
+     ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+  as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+  exit 1
+fi
+
+# Unset variables that we do not need and which cause bugs (e.g. in
+# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
+# suppresses any "Segmentation fault" message there.  '((' could
+# trigger a bug in pdksh 5.2.14.
+for as_var in BASH_ENV ENV MAIL MAILPATH
+do eval test x\${$as_var+set} = xset \
+  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
+done
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# CDPATH.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
+# ----------------------------------------
+# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
+# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
+# script with STATUS, using 1 if that was 0.
+as_fn_error ()
+{
+  as_status=$1; test $as_status -eq 0 && as_status=1
+  if test "$4"; then
+    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+  fi
+  $as_echo "$as_me: error: $2" >&2
+  as_fn_exit $as_status
+} # as_fn_error
+
+
+# as_fn_set_status STATUS
+# -----------------------
+# Set $? to STATUS, without forking.
+as_fn_set_status ()
+{
+  return $1
+} # as_fn_set_status
+
+# as_fn_exit STATUS
+# -----------------
+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+as_fn_exit ()
+{
+  set +e
+  as_fn_set_status $1
+  exit $1
+} # as_fn_exit
+
+# as_fn_unset VAR
+# ---------------
+# Portably unset VAR.
+as_fn_unset ()
+{
+  { eval $1=; unset $1;}
+}
+as_unset=as_fn_unset
+# as_fn_append VAR VALUE
+# ----------------------
+# Append the text in VALUE to the end of the definition contained in VAR. Take
+# advantage of any shell optimizations that allow amortized linear growth over
+# repeated appends, instead of the typical quadratic growth present in naive
+# implementations.
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
+  eval 'as_fn_append ()
+  {
+    eval $1+=\$2
+  }'
+else
+  as_fn_append ()
+  {
+    eval $1=\$$1\$2
+  }
+fi # as_fn_append
+
+# as_fn_arith ARG...
+# ------------------
+# Perform arithmetic evaluation on the ARGs, and store the result in the
+# global $as_val. Take advantage of shells that can avoid forks. The arguments
+# must be portable across $(()) and expr.
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
+  eval 'as_fn_arith ()
+  {
+    as_val=$(( $* ))
+  }'
+else
+  as_fn_arith ()
+  {
+    as_val=`expr "$@" || test $? -eq 1`
+  }
+fi # as_fn_arith
+
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+   test "X`expr 00001 : '.*\(...\)'`" = X001; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+  as_basename=basename
+else
+  as_basename=false
+fi
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+  as_dirname=dirname
+else
+  as_dirname=false
+fi
+
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+	 X"$0" : 'X\(//\)$' \| \
+	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$0" |
+    sed '/^.*\/\([^/][^/]*\)\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\/\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\/\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in #(((((
+-n*)
+  case `echo 'xy\c'` in
+  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
+  xy)  ECHO_C='\c';;
+  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
+       ECHO_T='	';;
+  esac;;
+*)
+  ECHO_N='-n';;
+esac
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+  rm -f conf$$.dir/conf$$.file
+else
+  rm -f conf$$.dir
+  mkdir conf$$.dir 2>/dev/null
+fi
+if (echo >conf$$.file) 2>/dev/null; then
+  if ln -s conf$$.file conf$$ 2>/dev/null; then
+    as_ln_s='ln -s'
+    # ... but there are two gotchas:
+    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+    # In both cases, we have to default to `cp -p'.
+    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+      as_ln_s='cp -p'
+  elif ln conf$$.file conf$$ 2>/dev/null; then
+    as_ln_s=ln
+  else
+    as_ln_s='cp -p'
+  fi
+else
+  as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+
+# as_fn_mkdir_p
+# -------------
+# Create "$as_dir" as a directory, including parents if necessary.
+as_fn_mkdir_p ()
+{
+
+  case $as_dir in #(
+  -*) as_dir=./$as_dir;;
+  esac
+  test -d "$as_dir" || eval $as_mkdir_p || {
+    as_dirs=
+    while :; do
+      case $as_dir in #(
+      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+      *) as_qdir=$as_dir;;
+      esac
+      as_dirs="'$as_qdir' $as_dirs"
+      as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$as_dir" : 'X\(//\)[^/]' \| \
+	 X"$as_dir" : 'X\(//\)$' \| \
+	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_dir" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)[^/].*/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+      test -d "$as_dir" && break
+    done
+    test -z "$as_dirs" || eval "mkdir $as_dirs"
+  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
+
+
+} # as_fn_mkdir_p
+if mkdir -p . 2>/dev/null; then
+  as_mkdir_p='mkdir -p "$as_dir"'
+else
+  test -d ./-p && rmdir ./-p
+  as_mkdir_p=false
+fi
+
+if test -x / >/dev/null 2>&1; then
+  as_test_x='test -x'
+else
+  if ls -dL / >/dev/null 2>&1; then
+    as_ls_L_option=L
+  else
+    as_ls_L_option=
+  fi
+  as_test_x='
+    eval sh -c '\''
+      if test -d "$1"; then
+	test -d "$1/.";
+      else
+	case $1 in #(
+	-*)set "./$1";;
+	esac;
+	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
+	???[sx]*):;;*)false;;esac;fi
+    '\'' sh
+  '
+fi
+as_executable_p=$as_test_x
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+exec 6>&1
+## ----------------------------------- ##
+## Main body of $CONFIG_STATUS script. ##
+## ----------------------------------- ##
+_ASEOF
+test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# Save the log message, to keep $0 and so on meaningful, and to
+# report actual input values of CONFIG_FILES etc. instead of their
+# values after options handling.
+ac_log="
+This file was extended by mpd $as_me 0.16.5, which was
+generated by GNU Autoconf 2.68.  Invocation command line was
+
+  CONFIG_FILES    = $CONFIG_FILES
+  CONFIG_HEADERS  = $CONFIG_HEADERS
+  CONFIG_LINKS    = $CONFIG_LINKS
+  CONFIG_COMMANDS = $CONFIG_COMMANDS
+  $ $0 $@
+
+on `(hostname || uname -n) 2>/dev/null | sed 1q`
+"
+
+_ACEOF
+
+case $ac_config_files in *"
+"*) set x $ac_config_files; shift; ac_config_files=$*;;
+esac
+
+case $ac_config_headers in *"
+"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
+esac
+
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+# Files that config.status was made for.
+config_files="$ac_config_files"
+config_headers="$ac_config_headers"
+config_commands="$ac_config_commands"
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+ac_cs_usage="\
+\`$as_me' instantiates files and other configuration actions
+from templates according to the current configuration.  Unless the files
+and actions are specified as TAGs, all are instantiated by default.
+
+Usage: $0 [OPTION]... [TAG]...
+
+  -h, --help       print this help, then exit
+  -V, --version    print version number and configuration settings, then exit
+      --config     print configuration, then exit
+  -q, --quiet, --silent
+                   do not print progress messages
+  -d, --debug      don't remove temporary files
+      --recheck    update $as_me by reconfiguring in the same conditions
+      --file=FILE[:TEMPLATE]
+                   instantiate the configuration file FILE
+      --header=FILE[:TEMPLATE]
+                   instantiate the configuration header FILE
+
+Configuration files:
+$config_files
+
+Configuration headers:
+$config_headers
+
+Configuration commands:
+$config_commands
+
+Report bugs to <musicpd-dev-team at lists.sourceforge.net>."
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
+ac_cs_version="\\
+mpd config.status 0.16.5
+configured by $0, generated by GNU Autoconf 2.68,
+  with options \\"\$ac_cs_config\\"
+
+Copyright (C) 2010 Free Software Foundation, Inc.
+This config.status script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it."
+
+ac_pwd='$ac_pwd'
+srcdir='$srcdir'
+INSTALL='$INSTALL'
+MKDIR_P='$MKDIR_P'
+AWK='$AWK'
+test -n "\$AWK" || AWK=awk
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# The default lists apply if the user does not specify any file.
+ac_need_defaults=:
+while test $# != 0
+do
+  case $1 in
+  --*=?*)
+    ac_option=`expr "X$1" : 'X\([^=]*\)='`
+    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
+    ac_shift=:
+    ;;
+  --*=)
+    ac_option=`expr "X$1" : 'X\([^=]*\)='`
+    ac_optarg=
+    ac_shift=:
+    ;;
+  *)
+    ac_option=$1
+    ac_optarg=$2
+    ac_shift=shift
+    ;;
+  esac
+
+  case $ac_option in
+  # Handling of the options.
+  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+    ac_cs_recheck=: ;;
+  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
+    $as_echo "$ac_cs_version"; exit ;;
+  --config | --confi | --conf | --con | --co | --c )
+    $as_echo "$ac_cs_config"; exit ;;
+  --debug | --debu | --deb | --de | --d | -d )
+    debug=: ;;
+  --file | --fil | --fi | --f )
+    $ac_shift
+    case $ac_optarg in
+    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+    '') as_fn_error $? "missing file argument" ;;
+    esac
+    as_fn_append CONFIG_FILES " '$ac_optarg'"
+    ac_need_defaults=false;;
+  --header | --heade | --head | --hea )
+    $ac_shift
+    case $ac_optarg in
+    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+    esac
+    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
+    ac_need_defaults=false;;
+  --he | --h)
+    # Conflict between --help and --header
+    as_fn_error $? "ambiguous option: \`$1'
+Try \`$0 --help' for more information.";;
+  --help | --hel | -h )
+    $as_echo "$ac_cs_usage"; exit ;;
+  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+  | -silent | --silent | --silen | --sile | --sil | --si | --s)
+    ac_cs_silent=: ;;
+
+  # This is an error.
+  -*) as_fn_error $? "unrecognized option: \`$1'
+Try \`$0 --help' for more information." ;;
+
+  *) as_fn_append ac_config_targets " $1"
+     ac_need_defaults=false ;;
+
+  esac
+  shift
+done
+
+ac_configure_extra_args=
+
+if $ac_cs_silent; then
+  exec 6>/dev/null
+  ac_configure_extra_args="$ac_configure_extra_args --silent"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+if \$ac_cs_recheck; then
+  set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+  shift
+  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
+  CONFIG_SHELL='$SHELL'
+  export CONFIG_SHELL
+  exec "\$@"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+exec 5>>config.log
+{
+  echo
+  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## Running $as_me. ##
+_ASBOX
+  $as_echo "$ac_log"
+} >&5
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+#
+# INIT-COMMANDS
+#
+AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+
+# Handling of arguments.
+for ac_config_target in $ac_config_targets
+do
+  case $ac_config_target in
+    "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
+    "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
+    "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+    "mpd.service") CONFIG_FILES="$CONFIG_FILES mpd.service" ;;
+
+  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
+  esac
+done
+
+
+# If the user did not use the arguments to specify the items to instantiate,
+# then the envvar interface is used.  Set only those that are not.
+# We use the long form for the default assignment because of an extremely
+# bizarre bug on SunOS 4.1.3.
+if $ac_need_defaults; then
+  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
+  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
+  test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
+fi
+
+# Have a temporary directory for convenience.  Make it in the build tree
+# simply because there is no reason against having it here, and in addition,
+# creating and moving files from /tmp can sometimes cause problems.
+# Hook for its removal unless debugging.
+# Note that there is a small window in which the directory will not be cleaned:
+# after its creation but before its name has been assigned to `$tmp'.
+$debug ||
+{
+  tmp= ac_tmp=
+  trap 'exit_status=$?
+  : "${ac_tmp:=$tmp}"
+  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
+' 0
+  trap 'as_fn_exit 1' 1 2 13 15
+}
+# Create a (secure) tmp directory for tmp files.
+
+{
+  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
+  test -d "$tmp"
+}  ||
+{
+  tmp=./conf$$-$RANDOM
+  (umask 077 && mkdir "$tmp")
+} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
+ac_tmp=$tmp
+
+# Set up the scripts for CONFIG_FILES section.
+# No need to generate them if there are no CONFIG_FILES.
+# This happens for instance with `./config.status config.h'.
+if test -n "$CONFIG_FILES"; then
+
+
+ac_cr=`echo X | tr X '\015'`
+# On cygwin, bash can eat \r inside `` if the user requested igncr.
+# But we know of no other shell where ac_cr would be empty at this
+# point, so we can use a bashism as a fallback.
+if test "x$ac_cr" = x; then
+  eval ac_cr=\$\'\\r\'
+fi
+ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
+if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
+  ac_cs_awk_cr='\\r'
+else
+  ac_cs_awk_cr=$ac_cr
+fi
+
+echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
+_ACEOF
+
+
+{
+  echo "cat >conf$$subs.awk <<_ACEOF" &&
+  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
+  echo "_ACEOF"
+} >conf$$subs.sh ||
+  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
+ac_delim='%!_!# '
+for ac_last_try in false false false false false :; do
+  . ./conf$$subs.sh ||
+    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+
+  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
+  if test $ac_delim_n = $ac_delim_num; then
+    break
+  elif $ac_last_try; then
+    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+  else
+    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+  fi
+done
+rm -f conf$$subs.sh
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
+_ACEOF
+sed -n '
+h
+s/^/S["/; s/!.*/"]=/
+p
+g
+s/^[^!]*!//
+:repl
+t repl
+s/'"$ac_delim"'$//
+t delim
+:nl
+h
+s/\(.\{148\}\)..*/\1/
+t more1
+s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
+p
+n
+b repl
+:more1
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t nl
+:delim
+h
+s/\(.\{148\}\)..*/\1/
+t more2
+s/["\\]/\\&/g; s/^/"/; s/$/"/
+p
+b
+:more2
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t delim
+' <conf$$subs.awk | sed '
+/^[^""]/{
+  N
+  s/\n//
+}
+' >>$CONFIG_STATUS || ac_write_fail=1
+rm -f conf$$subs.awk
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+_ACAWK
+cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
+  for (key in S) S_is_set[key] = 1
+  FS = ""
+
+}
+{
+  line = $ 0
+  nfields = split(line, field, "@")
+  substed = 0
+  len = length(field[1])
+  for (i = 2; i < nfields; i++) {
+    key = field[i]
+    keylen = length(key)
+    if (S_is_set[key]) {
+      value = S[key]
+      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
+      len += length(value) + length(field[++i])
+      substed = 1
+    } else
+      len += 1 + keylen
+  }
+
+  print line
+}
+
+_ACAWK
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
+  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
+else
+  cat
+fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
+  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
+_ACEOF
+
+# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
+# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
+# trailing colons and then remove the whole line if VPATH becomes empty
+# (actually we leave an empty line to preserve line numbers).
+if test "x$srcdir" = x.; then
+  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
+h
+s///
+s/^/:/
+s/[	 ]*$/:/
+s/:\$(srcdir):/:/g
+s/:\${srcdir}:/:/g
+s/:@srcdir@:/:/g
+s/^:*//
+s/:*$//
+x
+s/\(=[	 ]*\).*/\1/
+G
+s/\n//
+s/^[^=]*=[	 ]*$//
+}'
+fi
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+fi # test -n "$CONFIG_FILES"
+
+# Set up the scripts for CONFIG_HEADERS section.
+# No need to generate them if there are no CONFIG_HEADERS.
+# This happens for instance with `./config.status Makefile'.
+if test -n "$CONFIG_HEADERS"; then
+cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
+BEGIN {
+_ACEOF
+
+# Transform confdefs.h into an awk script `defines.awk', embedded as
+# here-document in config.status, that substitutes the proper values into
+# config.h.in to produce config.h.
+
+# Create a delimiter string that does not exist in confdefs.h, to ease
+# handling of long lines.
+ac_delim='%!_!# '
+for ac_last_try in false false :; do
+  ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
+  if test -z "$ac_tt"; then
+    break
+  elif $ac_last_try; then
+    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
+  else
+    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+  fi
+done
+
+# For the awk script, D is an array of macro values keyed by name,
+# likewise P contains macro parameters if any.  Preserve backslash
+# newline sequences.
+
+ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
+sed -n '
+s/.\{148\}/&'"$ac_delim"'/g
+t rset
+:rset
+s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
+t def
+d
+:def
+s/\\$//
+t bsnl
+s/["\\]/\\&/g
+s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
+D["\1"]=" \3"/p
+s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
+d
+:bsnl
+s/["\\]/\\&/g
+s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
+D["\1"]=" \3\\\\\\n"\\/p
+t cont
+s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
+t cont
+d
+:cont
+n
+s/.\{148\}/&'"$ac_delim"'/g
+t clear
+:clear
+s/\\$//
+t bsnlc
+s/["\\]/\\&/g; s/^/"/; s/$/"/p
+d
+:bsnlc
+s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
+b cont
+' <confdefs.h | sed '
+s/'"$ac_delim"'/"\\\
+"/g' >>$CONFIG_STATUS || ac_write_fail=1
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+  for (key in D) D_is_set[key] = 1
+  FS = ""
+}
+/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
+  line = \$ 0
+  split(line, arg, " ")
+  if (arg[1] == "#") {
+    defundef = arg[2]
+    mac1 = arg[3]
+  } else {
+    defundef = substr(arg[1], 2)
+    mac1 = arg[2]
+  }
+  split(mac1, mac2, "(") #)
+  macro = mac2[1]
+  prefix = substr(line, 1, index(line, defundef) - 1)
+  if (D_is_set[macro]) {
+    # Preserve the white space surrounding the "#".
+    print prefix "define", macro P[macro] D[macro]
+    next
+  } else {
+    # Replace #undef with comments.  This is necessary, for example,
+    # in the case of _POSIX_SOURCE, which is predefined and required
+    # on some systems where configure will not decide to define it.
+    if (defundef == "undef") {
+      print "/*", prefix defundef, macro, "*/"
+      next
+    }
+  }
+}
+{ print }
+_ACAWK
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
+fi # test -n "$CONFIG_HEADERS"
+
+
+eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    :C $CONFIG_COMMANDS"
+shift
+for ac_tag
+do
+  case $ac_tag in
+  :[FHLC]) ac_mode=$ac_tag; continue;;
+  esac
+  case $ac_mode$ac_tag in
+  :[FHL]*:*);;
+  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
+  :[FH]-) ac_tag=-:-;;
+  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
+  esac
+  ac_save_IFS=$IFS
+  IFS=:
+  set x $ac_tag
+  IFS=$ac_save_IFS
+  shift
+  ac_file=$1
+  shift
+
+  case $ac_mode in
+  :L) ac_source=$1;;
+  :[FH])
+    ac_file_inputs=
+    for ac_f
+    do
+      case $ac_f in
+      -) ac_f="$ac_tmp/stdin";;
+      *) # Look for the file first in the build tree, then in the source tree
+	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
+	 # because $ac_f cannot contain `:'.
+	 test -f "$ac_f" ||
+	   case $ac_f in
+	   [\\/$]*) false;;
+	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
+	   esac ||
+	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
+      esac
+      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
+      as_fn_append ac_file_inputs " '$ac_f'"
+    done
+
+    # Let's still pretend it is `configure' which instantiates (i.e., don't
+    # use $as_me), people would be surprised to read:
+    #    /* config.h.  Generated by config.status.  */
+    configure_input='Generated from '`
+	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
+	`' by configure.'
+    if test x"$ac_file" != x-; then
+      configure_input="$ac_file.  $configure_input"
+      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
+$as_echo "$as_me: creating $ac_file" >&6;}
+    fi
+    # Neutralize special characters interpreted by sed in replacement strings.
+    case $configure_input in #(
+    *\&* | *\|* | *\\* )
+       ac_sed_conf_input=`$as_echo "$configure_input" |
+       sed 's/[\\\\&|]/\\\\&/g'`;; #(
+    *) ac_sed_conf_input=$configure_input;;
+    esac
+
+    case $ac_tag in
+    *:-:* | *:-) cat >"$ac_tmp/stdin" \
+      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
+    esac
+    ;;
+  esac
+
+  ac_dir=`$as_dirname -- "$ac_file" ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$ac_file" : 'X\(//\)[^/]' \| \
+	 X"$ac_file" : 'X\(//\)$' \| \
+	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$ac_file" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)[^/].*/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+  as_dir="$ac_dir"; as_fn_mkdir_p
+  ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+  # A ".." for each directory in $ac_dir_suffix.
+  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+  case $ac_top_builddir_sub in
+  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+  esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+  .)  # We are building in place.
+    ac_srcdir=.
+    ac_top_srcdir=$ac_top_builddir_sub
+    ac_abs_top_srcdir=$ac_pwd ;;
+  [\\/]* | ?:[\\/]* )  # Absolute name.
+    ac_srcdir=$srcdir$ac_dir_suffix;
+    ac_top_srcdir=$srcdir
+    ac_abs_top_srcdir=$srcdir ;;
+  *) # Relative name.
+    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+    ac_top_srcdir=$ac_top_build_prefix$srcdir
+    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+
+  case $ac_mode in
+  :F)
+  #
+  # CONFIG_FILE
+  #
+
+  case $INSTALL in
+  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
+  *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
+  esac
+  ac_MKDIR_P=$MKDIR_P
+  case $MKDIR_P in
+  [\\/$]* | ?:[\\/]* ) ;;
+  */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
+  esac
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# If the template does not know about datarootdir, expand it.
+# FIXME: This hack should be removed a few years after 2.60.
+ac_datarootdir_hack=; ac_datarootdir_seen=
+ac_sed_dataroot='
+/datarootdir/ {
+  p
+  q
+}
+/@datadir@/p
+/@docdir@/p
+/@infodir@/p
+/@localedir@/p
+/@mandir@/p'
+case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
+*datarootdir*) ac_datarootdir_seen=yes;;
+*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
+$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+  ac_datarootdir_hack='
+  s&@datadir@&$datadir&g
+  s&@docdir@&$docdir&g
+  s&@infodir@&$infodir&g
+  s&@localedir@&$localedir&g
+  s&@mandir@&$mandir&g
+  s&\\\${datarootdir}&$datarootdir&g' ;;
+esac
+_ACEOF
+
+# Neutralize VPATH when `$srcdir' = `.'.
+# Shell code in configure.ac might set extrasub.
+# FIXME: do we really want to maintain this feature?
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_sed_extra="$ac_vpsub
+$extrasub
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+:t
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+s|@configure_input@|$ac_sed_conf_input|;t t
+s&@top_builddir@&$ac_top_builddir_sub&;t t
+s&@top_build_prefix@&$ac_top_build_prefix&;t t
+s&@srcdir@&$ac_srcdir&;t t
+s&@abs_srcdir@&$ac_abs_srcdir&;t t
+s&@top_srcdir@&$ac_top_srcdir&;t t
+s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
+s&@builddir@&$ac_builddir&;t t
+s&@abs_builddir@&$ac_abs_builddir&;t t
+s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
+s&@INSTALL@&$ac_INSTALL&;t t
+s&@MKDIR_P@&$ac_MKDIR_P&;t t
+$ac_datarootdir_hack
+"
+eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
+  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
 
 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
-  { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
-  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
+  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
+  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
+      "$ac_tmp/out"`; test -z "$ac_out"; } &&
   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
 which seems to be undefined.  Please make sure it is defined" >&5
 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
 which seems to be undefined.  Please make sure it is defined" >&2;}
 
-  rm -f "$tmp/stdin"
+  rm -f "$ac_tmp/stdin"
   case $ac_file in
-  -) cat "$tmp/out" && rm -f "$tmp/out";;
-  *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
+  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
+  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
   esac \
   || as_fn_error $? "could not create $ac_file" "$LINENO" 5
  ;;
@@ -15953,20 +17769,20 @@ which seems to be undefined.  Please make sure it is defined" >&2;}
   if test x"$ac_file" != x-; then
     {
       $as_echo "/* $configure_input  */" \
-      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
-    } >"$tmp/config.h" \
+      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
+    } >"$ac_tmp/config.h" \
       || as_fn_error $? "could not create $ac_file" "$LINENO" 5
-    if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
+    if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
       { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
 $as_echo "$as_me: $ac_file is unchanged" >&6;}
     else
       rm -f "$ac_file"
-      mv "$tmp/config.h" "$ac_file" \
+      mv "$ac_tmp/config.h" "$ac_file" \
 	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
     fi
   else
     $as_echo "/* $configure_input  */" \
-      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
+      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
       || as_fn_error $? "could not create -" "$LINENO" 5
   fi
 # Compute "$ac_file"'s index in $config_headers.
diff --git a/configure.ac b/configure.ac
index 49233f4..0ef9970 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,5 +1,5 @@
 AC_PREREQ(2.60)
-AC_INIT(mpd, 0.16.4, musicpd-dev-team at lists.sourceforge.net)
+AC_INIT(mpd, 0.16.5, musicpd-dev-team at lists.sourceforge.net)
 AC_CONFIG_SRCDIR([src/main.c])
 AM_INIT_AUTOMAKE([foreign 1.10 dist-bzip2 subdir-objects])
 AM_CONFIG_HEADER(config.h)
@@ -33,11 +33,28 @@ fi
 AC_PROG_INSTALL
 AC_PROG_MAKE_SET
 PKG_PROG_PKG_CONFIG
+AC_ARG_WITH([systemdsystemunitdir],
+	    AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [Directory for systemd service files]),
+	    [], [with_systemdsystemunitdir=no])
+if test "x$with_systemdsystemunitdir" = xyes; then
+	AC_MSG_CHECKING(for systemd)
+	with_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd)
+	if test -z "$with_systemdsystemunitdir"; then
+		AC_MSG_ERROR([Failed to detect systemd])
+	fi
+	AC_MSG_RESULT([$with_systemdsystemunitdir])
+fi
+if test "x$with_systemdsystemunitdir" != xno; then
+	AC_SUBST([systemdsystemunitdir], [$with_systemdsystemunitdir])
+fi
+AM_CONDITIONAL(HAVE_SYSTEMD, [test -n "$with_systemdsystemunitdir" -a "x$with_systemdsystemunitdir" != xno ])
 
 dnl ---------------------------------------------------------------------------
 dnl Declare Variables
 dnl ---------------------------------------------------------------------------
+AC_SUBST(AM_CPPFLAGS,"")
 AC_SUBST(AM_CFLAGS,"")
+AC_SUBST(AM_CXXFLAGS,"")
 
 AC_SUBST(MPD_LIBS)
 AC_SUBST(MPD_CFLAGS)
@@ -197,7 +214,7 @@ AC_ARG_ENABLE(httpd-output,
 
 AC_ARG_ENABLE(id3,
 	AS_HELP_STRING([--enable-id3],
-		[disable id3 support]),,
+		[enable id3 support]),,
 	enable_id3=auto)
 
 AC_ARG_ENABLE(inotify,
@@ -322,6 +339,11 @@ AC_ARG_ENABLE(sndfile,
 		[enable sndfile support]),,
 	enable_sndfile=auto)
 
+AC_ARG_ENABLE(solaris_output,
+	AS_HELP_STRING([--enable-solaris-output],
+		[enables the Solaris /dev/audio output]),,
+	[enable_solaris_output=auto])
+
 AC_ARG_ENABLE(sqlite,
 	AS_HELP_STRING([--enable-sqlite],
 		[enable support for the SQLite database]),,
@@ -1368,16 +1390,22 @@ fi
 AM_CONDITIONAL(HAVE_SHOUT, test x$enable_shout = xyes)
 
 dnl --------------------------------- Solaris ---------------------------------
-case "$host_os" in
+
+if test x$enable_solaris_output = xauto; then
+	case "$host_os" in
 	solaris*)
-		AC_DEFINE(ENABLE_SOLARIS_OUTPUT, 1, [Define to enable Solaris /dev/audio support])
 		enable_solaris_output=yes
 		;;
 
 	*)
 		enable_solaris_output=no
 		;;
-esac
+	esac
+fi
+
+if test x$enable_solaris_output = xyes; then
+	AC_DEFINE(ENABLE_SOLARIS_OUTPUT, 1, [Define to enable Solaris /dev/audio support])
+fi
 
 AM_CONDITIONAL(ENABLE_SOLARIS_OUTPUT, test x$enable_solaris_output = xyes)
 
@@ -1449,10 +1477,9 @@ dnl CFLAGS
 dnl ---------------------------------------------------------------------------
 
 dnl ---------------------------------- debug ----------------------------------
-#if test "x$enable_debug" = xno; then
-	# don't set NDEBUG for now, until MPD is stable
-	#AM_CFLAGS="$AM_CFLAGS -DNDEBUG"
-#fi
+if test "x$enable_debug" = xno; then
+	AM_CPPFLAGS="$AM_CPPFLAGS -DNDEBUG"
+fi
 
 dnl ----------------------------------- GCC -----------------------------------
 if test x$GCC = xyes
@@ -1478,6 +1505,7 @@ fi
 dnl ---------------------------- warnings as errors ---------------------------
 if test "x$enable_werror" = xyes; then
 	AM_CFLAGS="$AM_CFLAGS -Werror -pedantic-errors"
+	AM_CXXFLAGS="$AM_CXXFLAGS -Werror"
 fi
 
 dnl ---------------------------------------------------------------------------
@@ -1551,7 +1579,7 @@ results(pulse, [PulseAudio])
 results(mvp, [Media MVP])
 results(shout, [SHOUTcast])
 printf '\n\t'
-results(solaris, [Solaris])
+results(solaris_output, [Solaris])
 results(winmm_output, [WinMM])
 
 if
@@ -1579,5 +1607,6 @@ dnl ---------------------------------------------------------------------------
 dnl Generate files
 dnl ---------------------------------------------------------------------------
 AC_OUTPUT(Makefile)
+AC_OUTPUT(mpd.service)
 
 echo 'MPD is ready for compilation, type "make" to begin.'
diff --git a/mpd.service.in b/mpd.service.in
new file mode 100644
index 0000000..9e9282f
--- /dev/null
+++ b/mpd.service.in
@@ -0,0 +1,9 @@
+[Unit]
+Description=Music Player Daemon
+After=sound.target
+
+[Service]
+ExecStart=@prefix@/bin/mpd --no-daemon
+
+[Install]
+WantedBy=multi-user.target
diff --git a/src/client_new.c b/src/client_new.c
index 781a365..e764a65 100644
--- a/src/client_new.c
+++ b/src/client_new.c
@@ -19,9 +19,11 @@
 
 #include "config.h"
 #include "client_internal.h"
+#include "fd_util.h"
 #include "fifo_buffer.h"
 #include "socket_util.h"
 #include "permission.h"
+#include "glib_socket.h"
 
 #include <assert.h>
 #include <sys/types.h>
@@ -66,7 +68,7 @@ void client_new(int fd, const struct sockaddr *sa, size_t sa_length, int uid)
 			      progname, hostaddr);
 
 			g_free(hostaddr);
-			close(fd);
+			close_socket(fd);
 			return;
 		}
 
@@ -76,17 +78,13 @@ void client_new(int fd, const struct sockaddr *sa, size_t sa_length, int uid)
 
 	if (client_list_is_full()) {
 		g_warning("Max Connections Reached!");
-		close(fd);
+		close_socket(fd);
 		return;
 	}
 
 	client = g_new0(struct client, 1);
 
-#ifndef G_OS_WIN32
-	client->channel = g_io_channel_unix_new(fd);
-#else
-	client->channel = g_io_channel_win32_new_socket(fd);
-#endif
+	client->channel = g_io_channel_new_socket(fd);
 	/* GLib is responsible for closing the file descriptor */
 	g_io_channel_set_close_on_unref(client->channel, true);
 	/* NULL encoding means the stream is binary safe; the MPD
diff --git a/src/decoder/audiofile_decoder_plugin.c b/src/decoder/audiofile_decoder_plugin.c
index b099cf7..a8311a3 100644
--- a/src/decoder/audiofile_decoder_plugin.c
+++ b/src/decoder/audiofile_decoder_plugin.c
@@ -25,6 +25,7 @@
 #include <af_vfs.h>
 #include <assert.h>
 #include <glib.h>
+#include <stdio.h>
 
 #undef G_LOG_DOMAIN
 #define G_LOG_DOMAIN "audiofile"
diff --git a/src/decoder/ffmpeg_decoder_plugin.c b/src/decoder/ffmpeg_decoder_plugin.c
index 70628df..ba47b2c 100644
--- a/src/decoder/ffmpeg_decoder_plugin.c
+++ b/src/decoder/ffmpeg_decoder_plugin.c
@@ -214,6 +214,24 @@ align16(void *p, size_t *length_p)
 	return (char *)p + add;
 }
 
+G_GNUC_CONST
+static double
+time_from_ffmpeg(int64_t t, const AVRational time_base)
+{
+	assert(t != (int64_t)AV_NOPTS_VALUE);
+
+	return (double)av_rescale_q(t, time_base, (AVRational){1, 1024})
+		/ (double)1024;
+}
+
+G_GNUC_CONST
+static int64_t
+time_to_ffmpeg(double t, const AVRational time_base)
+{
+	return av_rescale_q((int64_t)(t * 1024), (AVRational){1, 1024},
+			    time_base);
+}
+
 static enum decoder_command
 ffmpeg_send_packet(struct decoder *decoder, struct input_stream *is,
 		   const AVPacket *packet,
@@ -222,8 +240,7 @@ ffmpeg_send_packet(struct decoder *decoder, struct input_stream *is,
 {
 	if (packet->pts != (int64_t)AV_NOPTS_VALUE)
 		decoder_timestamp(decoder,
-				  av_rescale_q(packet->pts, *time_base,
-					       (AVRational){1, 1}));
+				  time_from_ffmpeg(packet->pts, *time_base));
 
 #if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(52,25,0)
 	AVPacket packet2 = *packet;
@@ -375,8 +392,9 @@ ffmpeg_decode(struct decoder *decoder, struct input_stream *input)
 		return;
 	}
 
-	AVCodecContext *codec_context =
-		format_context->streams[audio_stream]->codec;
+	AVStream *av_stream = format_context->streams[audio_stream];
+
+	AVCodecContext *codec_context = av_stream->codec;
 	if (codec_context->codec_name[0] != 0)
 		g_debug("codec '%s'", codec_context->codec_name);
 
@@ -427,7 +445,7 @@ ffmpeg_decode(struct decoder *decoder, struct input_stream *input)
 		if (packet.stream_index == audio_stream)
 			cmd = ffmpeg_send_packet(decoder, input,
 						 &packet, codec_context,
-						 &format_context->streams[audio_stream]->time_base);
+						 &av_stream->time_base);
 		else
 			cmd = decoder_get_command(decoder);
 
@@ -435,12 +453,16 @@ ffmpeg_decode(struct decoder *decoder, struct input_stream *input)
 
 		if (cmd == DECODE_COMMAND_SEEK) {
 			int64_t where =
-				decoder_seek_where(decoder) * AV_TIME_BASE;
+				time_to_ffmpeg(decoder_seek_where(decoder),
+					       av_stream->time_base);
 
-			if (av_seek_frame(format_context, -1, where, 0) < 0)
+			if (av_seek_frame(format_context, audio_stream, where,
+					  AV_TIME_BASE) < 0)
 				decoder_seek_error(decoder);
-			else
+			else {
+				avcodec_flush_buffers(codec_context);
 				decoder_command_finished(decoder);
+			}
 		}
 	} while (cmd != DECODE_COMMAND_STOP);
 
diff --git a/src/decoder/wavpack_decoder_plugin.c b/src/decoder/wavpack_decoder_plugin.c
index 24d0c17..6102684 100644
--- a/src/decoder/wavpack_decoder_plugin.c
+++ b/src/decoder/wavpack_decoder_plugin.c
@@ -176,7 +176,7 @@ wavpack_decode(struct decoder *decoder, WavpackContext *wpc, bool can_seek)
 		return;
 	}
 
-	if ((WavpackGetMode(wpc) & MODE_FLOAT) == MODE_FLOAT) {
+	if (is_float) {
 		format_samples = format_samples_float;
 	} else {
 		format_samples = format_samples_int;
diff --git a/src/decoder_api.c b/src/decoder_api.c
index fe34ea3..6dcca32 100644
--- a/src/decoder_api.c
+++ b/src/decoder_api.c
@@ -78,15 +78,64 @@ decoder_initialized(struct decoder *decoder,
 					       &af_string));
 }
 
-enum decoder_command decoder_get_command(G_GNUC_UNUSED struct decoder * decoder)
+/**
+ * Checks if we need an "initial seek".  If so, then the initial seek
+ * is prepared, and the function returns true.
+ */
+G_GNUC_PURE
+static bool
+decoder_prepare_initial_seek(struct decoder *decoder)
 {
 	const struct decoder_control *dc = decoder->dc;
+	assert(dc->pipe != NULL);
+
+	if (decoder->initial_seek_running)
+		/* initial seek has already begun - override any other
+		   command */
+		return true;
 
+	if (decoder->initial_seek_pending) {
+		if (dc->command == DECODE_COMMAND_NONE) {
+			/* begin initial seek */
+
+			decoder->initial_seek_pending = false;
+			decoder->initial_seek_running = true;
+			return true;
+		}
+
+		/* skip initial seek when there's another command
+		   (e.g. STOP) */
+
+		decoder->initial_seek_pending = false;
+	}
+
+	return false;
+}
+
+/**
+ * Returns the current decoder command.  May return a "virtual"
+ * synthesized command, e.g. to seek to the beginning of the CUE
+ * track.
+ */
+G_GNUC_PURE
+static enum decoder_command
+decoder_get_virtual_command(struct decoder *decoder)
+{
+	const struct decoder_control *dc = decoder->dc;
 	assert(dc->pipe != NULL);
 
+	if (decoder_prepare_initial_seek(decoder))
+		return DECODE_COMMAND_SEEK;
+
 	return dc->command;
 }
 
+enum decoder_command
+decoder_get_command(struct decoder *decoder)
+{
+	return decoder_get_virtual_command(decoder);
+}
+
 void
 decoder_command_finished(struct decoder *decoder)
 {
@@ -94,11 +143,24 @@ decoder_command_finished(struct decoder *decoder)
 
 	decoder_lock(dc);
 
-	assert(dc->command != DECODE_COMMAND_NONE);
+	assert(dc->command != DECODE_COMMAND_NONE ||
+	       decoder->initial_seek_running);
 	assert(dc->command != DECODE_COMMAND_SEEK ||
+	       decoder->initial_seek_running ||
 	       dc->seek_error || decoder->seeking);
 	assert(dc->pipe != NULL);
 
+	if (decoder->initial_seek_running) {
+		assert(!decoder->seeking);
+		assert(decoder->chunk == NULL);
+		assert(music_pipe_empty(dc->pipe));
+
+		decoder->initial_seek_running = false;
+		decoder->timestamp = dc->start_ms / 1000.;
+		decoder_unlock(dc);
+		return;
+	}
+
 	if (decoder->seeking) {
 		decoder->seeking = false;
 
@@ -124,9 +186,13 @@ double decoder_seek_where(G_GNUC_UNUSED struct decoder * decoder)
 {
 	const struct decoder_control *dc = decoder->dc;
 
-	assert(dc->command == DECODE_COMMAND_SEEK);
 	assert(dc->pipe != NULL);
 
+	if (decoder->initial_seek_running)
+		return dc->start_ms / 1000.;
+
+	assert(dc->command == DECODE_COMMAND_SEEK);
+
 	decoder->seeking = true;
 
 	return dc->seek_where;
@@ -136,9 +202,17 @@ void decoder_seek_error(struct decoder * decoder)
 {
 	struct decoder_control *dc = decoder->dc;
 
-	assert(dc->command == DECODE_COMMAND_SEEK);
 	assert(dc->pipe != NULL);
 
+	if (decoder->initial_seek_running) {
+		/* d'oh, we can't seek to the sub-song start position,
+		   what now? - no idea, ignoring the problem for now. */
+		decoder->initial_seek_running = false;
+		return;
+	}
+
+	assert(dc->command == DECODE_COMMAND_SEEK);
+
 	dc->seek_error = true;
 	decoder->seeking = false;
 
@@ -270,7 +344,7 @@ decoder_data(struct decoder *decoder,
 	assert(length % audio_format_frame_size(&dc->in_audio_format) == 0);
 
 	decoder_lock(dc);
-	cmd = dc->command;
+	cmd = decoder_get_virtual_command(decoder);
 	decoder_unlock(dc);
 
 	if (cmd == DECODE_COMMAND_STOP || cmd == DECODE_COMMAND_SEEK ||
@@ -357,8 +431,8 @@ decoder_data(struct decoder *decoder,
 		decoder->timestamp += (double)nbytes /
 			audio_format_time_to_size(&dc->out_audio_format);
 
-		if (dc->song->end_ms > 0 &&
-		    decoder->timestamp >= dc->song->end_ms / 1000.0)
+		if (dc->end_ms > 0 &&
+		    decoder->timestamp >= dc->end_ms / 1000.0)
 			/* the end of this range has been reached:
 			   stop decoding */
 			return DECODE_COMMAND_STOP;
@@ -388,6 +462,14 @@ decoder_tag(G_GNUC_UNUSED struct decoder *decoder, struct input_stream *is,
 
 	update_stream_tag(decoder, is);
 
+	/* check if we're seeking */
+
+	if (decoder_prepare_initial_seek(decoder))
+		/* during initial seek, no music chunk must be created
+		   until seeking is finished; skip the rest of the
+		   function here */
+		return DECODE_COMMAND_SEEK;
+
 	/* send tag to music pipe */
 
 	if (decoder->stream_tag != NULL) {
diff --git a/src/decoder_control.c b/src/decoder_control.c
index a5e6e4a..85c2e5b 100644
--- a/src/decoder_control.c
+++ b/src/decoder_control.c
@@ -102,6 +102,7 @@ dc_command_async(struct decoder_control *dc, enum decoder_command cmd)
 
 void
 dc_start(struct decoder_control *dc, struct song *song,
+	 unsigned start_ms, unsigned end_ms,
 	 struct music_buffer *buffer, struct music_pipe *pipe)
 {
 	assert(song != NULL);
@@ -110,6 +111,8 @@ dc_start(struct decoder_control *dc, struct song *song,
 	assert(music_pipe_empty(pipe));
 
 	dc->song = song;
+	dc->start_ms = start_ms;
+	dc->end_ms = end_ms;
 	dc->buffer = buffer;
 	dc->pipe = pipe;
 	dc_command(dc, DECODE_COMMAND_START);
diff --git a/src/decoder_control.h b/src/decoder_control.h
index 449e974..64c7c30 100644
--- a/src/decoder_control.h
+++ b/src/decoder_control.h
@@ -79,6 +79,23 @@ struct decoder_control {
 	 */
 	const struct song *song;
 
+	/**
+	 * The initial seek position (in milliseconds), e.g. to the
+	 * start of a sub-track described by a CUE file.
+	 *
+	 * This attribute is set by dc_start().
+	 */
+	unsigned start_ms;
+
+	/**
+	 * The decoder will stop when it reaches this position (in
+	 * milliseconds).  0 means don't stop before the end of the
+	 * file.
+	 *
+	 * This attribute is set by dc_start().
+	 */
+	unsigned end_ms;
+
 	float total_time;
 
 	/** the #music_chunk allocator */
@@ -225,11 +242,14 @@ dc_command_wait(struct decoder_control *dc);
  *
  * @param the decoder
  * @param song the song to be decoded
+ * @param start_ms see #decoder_control
+ * @param end_ms see #decoder_control
  * @param pipe the pipe which receives the decoded chunks (owned by
  * the caller)
  */
 void
 dc_start(struct decoder_control *dc, struct song *song,
+	 unsigned start_ms, unsigned end_ms,
 	 struct music_buffer *buffer, struct music_pipe *pipe);
 
 void
diff --git a/src/decoder_internal.h b/src/decoder_internal.h
index 9e7e203..5818632 100644
--- a/src/decoder_internal.h
+++ b/src/decoder_internal.h
@@ -36,6 +36,25 @@ struct decoder {
 	 */
 	double timestamp;
 
+	/**
+	 * Is the initial seek (to the start position of the sub-song)
+	 * pending, or has it been performed already?
+	 */
+	bool initial_seek_pending;
+
+	/**
+	 * Is the initial seek currently running?  During this time,
+	 * the decoder command is SEEK.  This flag is set by
+	 * decoder_get_virtual_command(), when the virtual SEEK
+	 * command is generated for the first time.
+	 */
+	bool initial_seek_running;
+
+	/**
+	 * This flag is set by decoder_seek_where(), and checked by
+	 * decoder_command_finished().  It is used to clean up after
+	 * seeking.
+	 */
 	bool seeking;
 
 	/**
diff --git a/src/decoder_thread.c b/src/decoder_thread.c
index 10a7969..201cd5a 100644
--- a/src/decoder_thread.c
+++ b/src/decoder_thread.c
@@ -369,6 +369,8 @@ decoder_run_song(struct decoder_control *dc,
 {
 	struct decoder decoder = {
 		.dc = dc,
+		.initial_seek_pending = dc->start_ms > 0,
+		.initial_seek_running = false,
 	};
 	int ret;
 
diff --git a/src/event_pipe.c b/src/event_pipe.c
index 5b51998..edfd40e 100644
--- a/src/event_pipe.c
+++ b/src/event_pipe.c
@@ -21,6 +21,7 @@
 #include "event_pipe.h"
 #include "fd_util.h"
 #include "mpd_error.h"
+#include "glib_socket.h"
 
 #include <stdbool.h>
 #include <assert.h>
@@ -94,11 +95,7 @@ void event_pipe_init(void)
 	if (ret < 0)
 		MPD_ERROR("Couldn't open pipe: %s", strerror(errno));
 
-#ifndef G_OS_WIN32
-	channel = g_io_channel_unix_new(event_pipe[0]);
-#else
-	channel = g_io_channel_win32_new_fd(event_pipe[0]);
-#endif
+	channel = g_io_channel_new_socket(event_pipe[0]);
 	g_io_channel_set_encoding(channel, NULL, NULL);
 	g_io_channel_set_buffered(channel, false);
 
diff --git a/src/fd_util.c b/src/fd_util.c
index 1f3004d..4636c19 100644
--- a/src/fd_util.c
+++ b/src/fd_util.c
@@ -304,3 +304,13 @@ inotify_init_cloexec(void)
 }
 
 #endif
+
+int
+close_socket(int fd)
+{
+#ifdef WIN32
+	return closesocket(fd);
+#else
+	return close(fd);
+#endif
+}
diff --git a/src/fd_util.h b/src/fd_util.h
index 5b80df2..d74bb30 100644
--- a/src/fd_util.h
+++ b/src/fd_util.h
@@ -36,6 +36,8 @@
 #ifndef FD_UTIL_H
 #define FD_UTIL_H
 
+#include "check.h"
+
 #include <stdbool.h>
 #include <stddef.h>
 
@@ -120,6 +122,8 @@ recvmsg_cloexec(int sockfd, struct msghdr *msg, int flags);
 
 #endif
 
+#ifdef HAVE_INOTIFY_INIT
+
 /**
  * Wrapper for inotify_init(), which sets the CLOEXEC flag (atomically
  * if supported by the OS).
@@ -128,3 +132,11 @@ int
 inotify_init_cloexec(void);
 
 #endif
+
+/**
+ * Portable wrapper for close(); use closesocket() on WIN32/WinSock.
+ */
+int
+close_socket(int fd);
+
+#endif
diff --git a/src/tag_id3.h b/src/glib_socket.h
similarity index 68%
copy from src/tag_id3.h
copy to src/glib_socket.h
index 43f9678..46fab37 100644
--- a/src/tag_id3.h
+++ b/src/glib_socket.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2003-2010 The Music Player Daemon Project
+ * Copyright (C) 2003-2011 The Music Player Daemon Project
  * http://www.musicpd.org
  *
  * This program is free software; you can redistribute it and/or modify
@@ -17,29 +17,24 @@
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
 
-#ifndef MPD_TAG_ID3_H
-#define MPD_TAG_ID3_H
-
-#include "check.h"
-
-struct tag;
-
-#ifdef HAVE_ID3TAG
-struct id3_tag;
-struct tag *tag_id3_import(struct id3_tag *);
-
-struct tag *tag_id3_load(const char *file);
-
-#else
+#ifndef MPD_GLIB_SOCKET_H
+#define MPD_GLIB_SOCKET_H
 
 #include <glib.h>
 
-static inline struct tag *
-tag_id3_load(G_GNUC_UNUSED const char *file)
+/**
+ * Portable wrapper for g_io_channel_unix_new() or
+ * g_io_channel_win32_new_socket().
+ */
+G_GNUC_MALLOC
+static inline GIOChannel *
+g_io_channel_new_socket(int fd)
 {
-	return NULL;
-}
-
+#ifdef G_OS_WIN32
+	return g_io_channel_win32_new_socket(fd);
+#else
+	return g_io_channel_unix_new(fd);
 #endif
+}
 
 #endif
diff --git a/src/input/curl_input_plugin.c b/src/input/curl_input_plugin.c
index 2c4ac2f..604965d 100644
--- a/src/input/curl_input_plugin.c
+++ b/src/input/curl_input_plugin.c
@@ -177,7 +177,7 @@ buffer_free_callback(gpointer data, G_GNUC_UNUSED gpointer user_data)
 
 	assert(buffer->consumed <= buffer->size);
 
-	g_free(data);
+	g_free(buffer);
 }
 
 /**
diff --git a/src/input/rewind_input_plugin.c b/src/input/rewind_input_plugin.c
index 6325a97..f0d533b 100644
--- a/src/input/rewind_input_plugin.c
+++ b/src/input/rewind_input_plugin.c
@@ -83,12 +83,14 @@ copy_attributes(struct input_rewind *r)
 	assert(dest != src);
 	assert(src->mime == NULL || dest->mime != src->mime);
 
+	bool dest_ready = dest->ready;
+
 	dest->ready = src->ready;
 	dest->seekable = src->seekable;
 	dest->size = src->size;
 	dest->offset = src->offset;
 
-	if (src->mime != NULL) {
+	if (!dest_ready && src->ready) {
 		g_free(dest->mime);
 		dest->mime = g_strdup(src->mime);
 	}
diff --git a/src/output/alsa_plugin.c b/src/output/alsa_plugin.c
index 422264f..ae06847 100644
--- a/src/output/alsa_plugin.c
+++ b/src/output/alsa_plugin.c
@@ -186,6 +186,9 @@ static snd_pcm_format_t
 get_bitformat(enum sample_format sample_format)
 {
 	switch (sample_format) {
+	case SAMPLE_FORMAT_UNDEFINED:
+		return SND_PCM_FORMAT_UNKNOWN;
+
 	case SAMPLE_FORMAT_S8:
 		return SND_PCM_FORMAT_S8;
 
@@ -202,10 +205,10 @@ get_bitformat(enum sample_format sample_format)
 
 	case SAMPLE_FORMAT_S32:
 		return SND_PCM_FORMAT_S32;
-
-	default:
-		return SND_PCM_FORMAT_UNKNOWN;
 	}
+
+	assert(false);
+	return SND_PCM_FORMAT_UNKNOWN;
 }
 
 static snd_pcm_format_t
diff --git a/src/output/httpd_client.c b/src/output/httpd_client.c
index 1119a78..995c1f6 100644
--- a/src/output/httpd_client.c
+++ b/src/output/httpd_client.c
@@ -24,6 +24,7 @@
 #include "page.h"
 #include "icy_server.h"
 #include "glib_compat.h"
+#include "glib_socket.h"
 
 #include <stdbool.h>
 #include <assert.h>
@@ -459,11 +460,7 @@ httpd_client_new(struct httpd_output *httpd, int fd, bool metadata_supported)
 
 	client->httpd = httpd;
 
-#ifndef G_OS_WIN32
-	client->channel = g_io_channel_unix_new(fd);
-#else
-	client->channel = g_io_channel_win32_new_socket(fd);
-#endif
+	client->channel = g_io_channel_new_socket(fd);
 
 	/* GLib is responsible for closing the file descriptor */
 	g_io_channel_set_close_on_unref(client->channel, true);
diff --git a/src/output/httpd_output_plugin.c b/src/output/httpd_output_plugin.c
index 40ad05c..2c140a3 100644
--- a/src/output/httpd_output_plugin.c
+++ b/src/output/httpd_output_plugin.c
@@ -201,7 +201,7 @@ httpd_listen_in_event(int fd, const struct sockaddr *address,
 			g_warning("libwrap refused connection (libwrap=%s) from %s",
 			      progname, hostaddr);
 			g_free(hostaddr);
-			close(fd);
+			close_socket(fd);
 			g_mutex_unlock(httpd->mutex);
 			return;
 		}
@@ -222,7 +222,7 @@ httpd_listen_in_event(int fd, const struct sockaddr *address,
 		     httpd->clients_cnt < httpd->clients_max))
 			httpd_client_add(httpd, fd);
 		else
-			close(fd);
+			close_socket(fd);
 	} else if (fd < 0 && errno != EINTR) {
 		g_warning("accept() failed: %s", g_strerror(errno));
 	}
diff --git a/src/output/openal_plugin.c b/src/output/openal_plugin.c
index 767b3eb..0a8f253 100644
--- a/src/output/openal_plugin.c
+++ b/src/output/openal_plugin.c
@@ -64,26 +64,26 @@ openal_audio_format(struct audio_format *audio_format)
 			return AL_FORMAT_STEREO16;
 		if (audio_format->channels == 1)
 			return AL_FORMAT_MONO16;
-		break;
+
+		/* fall back to mono */
+		audio_format->channels = 1;
+		return openal_audio_format(audio_format);
 
 	case SAMPLE_FORMAT_S8:
 		if (audio_format->channels == 2)
 			return AL_FORMAT_STEREO8;
 		if (audio_format->channels == 1)
 			return AL_FORMAT_MONO8;
-		break;
+
+		/* fall back to mono */
+		audio_format->channels = 1;
+		return openal_audio_format(audio_format);
 
 	default:
 		/* fall back to 16 bit */
 		audio_format->format = SAMPLE_FORMAT_S16;
-		if (audio_format->channels == 2)
-			return AL_FORMAT_STEREO16;
-		if (audio_format->channels == 1)
-			return AL_FORMAT_MONO16;
-		break;
+		return openal_audio_format(audio_format);
 	}
-
-	return 0;
 }
 
 static bool
diff --git a/src/output/pulse_output_plugin.c b/src/output/pulse_output_plugin.c
index 34d7365..5fe2f57 100644
--- a/src/output/pulse_output_plugin.c
+++ b/src/output/pulse_output_plugin.c
@@ -72,7 +72,8 @@ pulse_output_set_mixer(struct pulse_output *po, struct pulse_mixer *pm)
 }
 
 void
-pulse_output_clear_mixer(struct pulse_output *po, struct pulse_mixer *pm)
+pulse_output_clear_mixer(struct pulse_output *po,
+			 G_GNUC_UNUSED struct pulse_mixer *pm)
 {
 	assert(po != NULL);
 	assert(pm != NULL);
@@ -247,6 +248,8 @@ pulse_output_delete_stream(struct pulse_output *po)
 
 /**
  * Frees and clears the context.
+ *
+ * Caller must lock the main loop.
  */
 static void
 pulse_output_delete_context(struct pulse_output *po)
@@ -265,6 +268,8 @@ pulse_output_delete_context(struct pulse_output *po)
 /**
  * Create, set up and connect a context.
  *
+ * Caller must lock the main loop.
+ *
  * @return true on success, false on error
  */
 static bool
@@ -355,12 +360,8 @@ pulse_output_enable(void *data, GError **error_r)
 		return false;
 	}
 
-	pa_threaded_mainloop_unlock(po->mainloop);
-
 	/* create the libpulse context and connect it */
 
-	pa_threaded_mainloop_lock(po->mainloop);
-
 	if (!pulse_output_setup_context(po, error_r)) {
 		pa_threaded_mainloop_unlock(po->mainloop);
 		pa_threaded_mainloop_stop(po->mainloop);
@@ -392,6 +393,8 @@ pulse_output_disable(void *data)
  * Check if the context is (already) connected, and waits if not.  If
  * the context has been disconnected, retry to connect.
  *
+ * Caller must lock the main loop.
+ *
  * @return true on success, false on error
  */
 static bool
@@ -401,8 +404,6 @@ pulse_output_wait_connection(struct pulse_output *po, GError **error_r)
 
 	pa_context_state_t state;
 
-	pa_threaded_mainloop_lock(po->mainloop);
-
 	if (po->context == NULL && !pulse_output_setup_context(po, error_r))
 		return false;
 
@@ -411,7 +412,6 @@ pulse_output_wait_connection(struct pulse_output *po, GError **error_r)
 		switch (state) {
 		case PA_CONTEXT_READY:
 			/* nothing to do */
-			pa_threaded_mainloop_unlock(po->mainloop);
 			return true;
 
 		case PA_CONTEXT_UNCONNECTED:
@@ -422,7 +422,6 @@ pulse_output_wait_connection(struct pulse_output *po, GError **error_r)
 				    "failed to connect: %s",
 				    pa_strerror(pa_context_errno(po->context)));
 			pulse_output_delete_context(po);
-			pa_threaded_mainloop_unlock(po->mainloop);
 			return false;
 
 		case PA_CONTEXT_CONNECTING:
@@ -505,6 +504,8 @@ pulse_output_open(void *data, struct audio_format *audio_format,
 
 	assert(po->mainloop != NULL);
 
+	pa_threaded_mainloop_lock(po->mainloop);
+
 	if (po->context != NULL) {
 		switch (pa_context_get_state(po->context)) {
 		case PA_CONTEXT_UNCONNECTED:
@@ -524,8 +525,10 @@ pulse_output_open(void *data, struct audio_format *audio_format,
 		}
 	}
 
-	if (!pulse_output_wait_connection(po, error_r))
+	if (!pulse_output_wait_connection(po, error_r)) {
+		pa_threaded_mainloop_unlock(po->mainloop);
 		return false;
+	}
 
 	/* MPD doesn't support the other pulseaudio sample formats, so
 	   we just force MPD to send us everything as 16 bit */
@@ -535,8 +538,6 @@ pulse_output_open(void *data, struct audio_format *audio_format,
 	ss.rate = audio_format->sample_rate;
 	ss.channels = audio_format->channels;
 
-	pa_threaded_mainloop_lock(po->mainloop);
-
 	/* create a stream .. */
 
 	po->stream = pa_stream_new(po->context, po->name, &ss, NULL);
diff --git a/src/output/solaris_output_plugin.c b/src/output/solaris_output_plugin.c
index 22c5838..6f6f507 100644
--- a/src/output/solaris_output_plugin.c
+++ b/src/output/solaris_output_plugin.c
@@ -23,7 +23,6 @@
 
 #include <glib.h>
 
-#include <sys/audio.h>
 #include <sys/stropts.h>
 #include <sys/types.h>
 #include <sys/stat.h>
@@ -31,6 +30,25 @@
 #include <fcntl.h>
 #include <errno.h>
 
+#ifdef __sun
+#include <sys/audio.h>
+#else
+
+/* some fake declarations that allow build this plugin on systems
+   other than Solaris, just to see if it compiles */
+
+#define AUDIO_GETINFO 0
+#define AUDIO_SETINFO 0
+#define AUDIO_ENCODING_LINEAR 0
+
+struct audio_info {
+	struct {
+		unsigned sample_rate, channels, precision, encoding;
+	} play;
+};
+
+#endif
+
 #undef G_LOG_DOMAIN
 #define G_LOG_DOMAIN "solaris_output"
 
diff --git a/src/output_control.c b/src/output_control.c
index f8c5cd8..24485f1 100644
--- a/src/output_control.c
+++ b/src/output_control.c
@@ -102,9 +102,6 @@ audio_output_disable(struct audio_output *ao)
 	g_mutex_unlock(ao->mutex);
 }
 
-static void
-audio_output_close_locked(struct audio_output *ao);
-
 /**
  * Object must be locked (and unlocked) by the caller.
  */
diff --git a/src/pcm_convert.c b/src/pcm_convert.c
index 5fe89b5..7bd4d72 100644
--- a/src/pcm_convert.c
+++ b/src/pcm_convert.c
@@ -222,7 +222,7 @@ pcm_convert_32(struct pcm_convert_state *state,
 				src_buffer, src_size, &len);
 	if (buf == NULL) {
 		g_set_error(error_r, pcm_convert_quark(), 0,
-			    "Conversion from %s to 24 bit is not implemented",
+			    "Conversion from %s to 32 bit is not implemented",
 			    sample_format_to_string(src_format->format));
 		return NULL;
 	}
diff --git a/src/pcm_format.c b/src/pcm_format.c
index 3fd76a9..1e4b8d7 100644
--- a/src/pcm_format.c
+++ b/src/pcm_format.c
@@ -143,7 +143,7 @@ pcm_convert_16_to_24(int32_t *out, const int16_t *in,
 }
 
 static void
-pcm_convert_32_to_24(int32_t *out, const int16_t *in,
+pcm_convert_32_to_24(int32_t *out, const int32_t *in,
 		     unsigned num_samples)
 {
 	while (num_samples > 0) {
@@ -197,7 +197,7 @@ pcm_convert_to_24(struct pcm_buffer *buffer,
 		*dest_size_r = num_samples * sizeof(*dest);
 		dest = pcm_buffer_get(buffer, *dest_size_r);
 
-		pcm_convert_32_to_24(dest, (const int16_t *)src,
+		pcm_convert_32_to_24(dest, (const int32_t *)src,
 				     num_samples);
 		return dest;
 	}
diff --git a/src/player_control.c b/src/player_control.c
index a190bbd..e3e6b77 100644
--- a/src/player_control.c
+++ b/src/player_control.c
@@ -309,9 +309,6 @@ pc_seek(struct song *song, float seek_time)
 {
 	assert(song != NULL);
 
-	if (pc.state == PLAYER_STATE_STOP)
-		return false;
-
 	player_lock();
 	pc.next_song = song;
 	pc.seek_where = seek_time;
diff --git a/src/player_thread.c b/src/player_thread.c
index a89e599..52788e5 100644
--- a/src/player_thread.c
+++ b/src/player_thread.c
@@ -74,6 +74,14 @@ struct player {
 	bool queued;
 
 	/**
+	 * Was any audio output opened successfully?  It might have
+	 * failed meanwhile, but was not explicitly closed by the
+	 * player thread.  When this flag is unset, some output
+	 * methods must not be called.
+	 */
+	bool output_open;
+
+	/**
 	 * the song currently being played
 	 */
 	struct song *song;
@@ -145,7 +153,13 @@ player_dc_start(struct player *player, struct music_pipe *pipe)
 	assert(player->queued || pc.command == PLAYER_COMMAND_SEEK);
 	assert(pc.next_song != NULL);
 
-	dc_start(dc, pc.next_song, player_buffer, pipe);
+	unsigned start_ms = pc.next_song->start_ms;
+	if (pc.command == PLAYER_COMMAND_SEEK)
+		start_ms += (unsigned)(pc.seek_where * 1000);
+
+	dc_start(dc, pc.next_song,
+		 start_ms, pc.next_song->end_ms,
+		 player_buffer, pipe);
 }
 
 /**
@@ -271,6 +285,44 @@ real_song_duration(const struct song *song, double decoder_duration)
 }
 
 /**
+ * Wrapper for audio_output_all_open().  Upon failure, it pauses the
+ * player.
+ *
+ * @return true on success
+ */
+static bool
+player_open_output(struct player *player)
+{
+	assert(audio_format_defined(&player->play_audio_format));
+	assert(pc.state == PLAYER_STATE_PLAY ||
+	       pc.state == PLAYER_STATE_PAUSE);
+
+	if (audio_output_all_open(&player->play_audio_format, player_buffer)) {
+		player->output_open = true;
+		player->paused = false;
+
+		player_lock();
+		pc.state = PLAYER_STATE_PLAY;
+		player_unlock();
+
+		return true;
+	} else {
+		player->output_open = false;
+
+		/* pause: the user may resume playback as soon as an
+		   audio output becomes available */
+		player->paused = true;
+
+		player_lock();
+		pc.error = PLAYER_ERROR_AUDIO;
+		pc.state = PLAYER_STATE_PAUSE;
+		player_unlock();
+
+		return false;
+	}
+}
+
+/**
  * The decoder has acknowledged the "START" command (see
  * player_wait_for_decoder()).  This function checks if the decoder
  * initialization has completed yet.
@@ -301,7 +353,7 @@ player_check_decoder_startup(struct player *player)
 
 		decoder_unlock(dc);
 
-		if (audio_format_defined(&player->play_audio_format) &&
+		if (player->output_open &&
 		    !audio_output_all_wait(1))
 			/* the output devices havn't finished playing
 			   all chunks yet - wait for that */
@@ -315,23 +367,12 @@ player_check_decoder_startup(struct player *player)
 		player->play_audio_format = dc->out_audio_format;
 		player->decoder_starting = false;
 
-		if (!player->paused &&
-		    !audio_output_all_open(&dc->out_audio_format,
-					   player_buffer)) {
+		if (!player->paused && !player_open_output(player)) {
 			char *uri = song_get_uri(dc->song);
 			g_warning("problems opening audio device "
 				  "while playing \"%s\"", uri);
 			g_free(uri);
 
-			player_lock();
-			pc.error = PLAYER_ERROR_AUDIO;
-
-			/* pause: the user may resume playback as soon
-			   as an audio output becomes available */
-			pc.state = PLAYER_STATE_PAUSE;
-			player_unlock();
-
-			player->paused = true;
 			return true;
 		}
 
@@ -356,6 +397,7 @@ player_check_decoder_startup(struct player *player)
 static bool
 player_send_silence(struct player *player)
 {
+	assert(player->output_open);
 	assert(audio_format_defined(&player->play_audio_format));
 
 	struct music_chunk *chunk = music_buffer_allocate(player_buffer);
@@ -511,17 +553,8 @@ static void player_process_command(struct player *player)
 			player_lock();
 
 			pc.state = PLAYER_STATE_PLAY;
-		} else if (audio_output_all_open(&player->play_audio_format, player_buffer)) {
-			/* unpaused, continue playing */
-			player_lock();
-
-			pc.state = PLAYER_STATE_PLAY;
 		} else {
-			/* the audio device has failed - rollback to
-			   pause mode */
-			pc.error = PLAYER_ERROR_AUDIO;
-
-			player->paused = true;
+			player_open_output(player);
 
 			player_lock();
 		}
@@ -558,8 +591,7 @@ static void player_process_command(struct player *player)
 		break;
 
 	case PLAYER_COMMAND_REFRESH:
-		if (audio_format_defined(&player->play_audio_format) &&
-		    !player->paused) {
+		if (player->output_open && !player->paused) {
 			player_unlock();
 			audio_output_all_check();
 			player_lock();
@@ -810,6 +842,7 @@ static void do_play(struct decoder_control *dc)
 		.decoder_starting = false,
 		.paused = false,
 		.queued = true,
+		.output_open = false,
 		.song = NULL,
 		.xfade = XFADE_UNKNOWN,
 		.cross_fading = false,
@@ -833,6 +866,10 @@ static void do_play(struct decoder_control *dc)
 	}
 
 	player_lock();
+
+	if (pc.command == PLAYER_COMMAND_SEEK)
+		player.elapsed_time = pc.seek_where;
+
 	pc.state = PLAYER_STATE_PLAY;
 	player_command_finished_locked();
 
@@ -858,7 +895,7 @@ static void do_play(struct decoder_control *dc)
 				/* not enough decoded buffer space yet */
 
 				if (!player.paused &&
-				    audio_format_defined(&player.play_audio_format) &&
+				    player.output_open &&
 				    audio_output_all_check() < 4 &&
 				    !player_send_silence(&player))
 					break;
@@ -881,16 +918,6 @@ static void do_play(struct decoder_control *dc)
 			if (!player_check_decoder_startup(&player))
 				break;
 
-			/* seek to the beginning of the range */
-			const struct song *song = decoder_current_song(dc);
-			if (song != NULL && song->start_ms > 0 &&
-			    /* we must not send a seek command until
-			       the decoder is initialized
-			       completely */
-			    !player.decoder_starting &&
-			    !dc_seek(dc, song->start_ms / 1000.0))
-				player_dc_stop(&player);
-
 			player_lock();
 			continue;
 		}
@@ -973,7 +1000,7 @@ static void do_play(struct decoder_control *dc)
 				audio_output_all_drain();
 				break;
 			}
-		} else {
+		} else if (player.output_open) {
 			/* the decoder is too busy and hasn't provided
 			   new PCM data in time: send silence (if the
 			   output pipe is empty) */
@@ -1021,6 +1048,7 @@ static gpointer player_task(G_GNUC_UNUSED gpointer arg)
 
 	while (1) {
 		switch (pc.command) {
+		case PLAYER_COMMAND_SEEK:
 		case PLAYER_COMMAND_QUEUE:
 			assert(pc.next_song != NULL);
 
@@ -1034,7 +1062,6 @@ static gpointer player_task(G_GNUC_UNUSED gpointer arg)
 
 			/* fall through */
 
-		case PLAYER_COMMAND_SEEK:
 		case PLAYER_COMMAND_PAUSE:
 			pc.next_song = NULL;
 			player_command_finished_locked();
diff --git a/src/playlist_song.c b/src/playlist_song.c
index 1a543a0..8270986 100644
--- a/src/playlist_song.c
+++ b/src/playlist_song.c
@@ -114,9 +114,7 @@ playlist_check_translate_song(struct song *song, const char *base_uri)
 
 	if (g_path_is_absolute(uri)) {
 		/* XXX fs_charset vs utf8? */
-		char *prefix = base_uri != NULL
-			? map_uri_fs(base_uri)
-			: map_directory_fs(db_get_root());
+		char *prefix = map_directory_fs(db_get_root());
 
 		if (prefix == NULL || !g_str_has_prefix(uri, prefix) ||
 		    uri[strlen(prefix)] != '/') {
@@ -127,6 +125,7 @@ playlist_check_translate_song(struct song *song, const char *base_uri)
 			return NULL;
 		}
 
+		base_uri = NULL;
 		uri += strlen(prefix) + 1;
 		g_free(prefix);
 	}
diff --git a/src/server_socket.c b/src/server_socket.c
index bb7a6f0..b4114d2 100644
--- a/src/server_socket.c
+++ b/src/server_socket.c
@@ -22,6 +22,7 @@
 #include "socket_util.h"
 #include "fd_util.h"
 #include "glib_compat.h"
+#include "glib_socket.h"
 
 #include <sys/types.h>
 #include <sys/stat.h>
@@ -218,7 +219,7 @@ server_socket_open(struct server_socket *ss, GError **error_r)
 
 		/* register in the GLib main loop */
 
-		GIOChannel *channel = g_io_channel_unix_new(s->fd);
+		GIOChannel *channel = g_io_channel_new_socket(s->fd);
 		s->source_id = g_io_add_watch(channel, G_IO_IN,
 					      server_socket_in_event, s);
 		g_io_channel_unref(channel);
@@ -252,7 +253,7 @@ server_socket_close(struct server_socket *ss)
 			continue;
 
 		g_source_remove(s->source_id);
-		close(s->fd);
+		close_socket(s->fd);
 		s->fd = -1;
 	}
 }
diff --git a/src/socket_util.c b/src/socket_util.c
index 0909765..3f7075e 100644
--- a/src/socket_util.c
+++ b/src/socket_util.c
@@ -122,7 +122,7 @@ socket_bind_listen(int domain, int type, int protocol,
 	if (ret < 0) {
 		g_set_error(error, listen_quark(), errno,
 			    "setsockopt() failed: %s", g_strerror(errno));
-		close(fd);
+		close_socket(fd);
 		return -1;
 	}
 
@@ -130,7 +130,7 @@ socket_bind_listen(int domain, int type, int protocol,
 	if (ret < 0) {
 		g_set_error(error, listen_quark(), errno,
 			    "%s", g_strerror(errno));
-		close(fd);
+		close_socket(fd);
 		return -1;
 	}
 
@@ -138,7 +138,7 @@ socket_bind_listen(int domain, int type, int protocol,
 	if (ret < 0) {
 		g_set_error(error, listen_quark(), errno,
 			    "listen() failed: %s", g_strerror(errno));
-		close(fd);
+		close_socket(fd);
 		return -1;
 	}
 
diff --git a/src/uri.h b/src/uri.h
index 422b959..00c63c0 100644
--- a/src/uri.h
+++ b/src/uri.h
@@ -25,7 +25,7 @@
 #include <stdbool.h>
 
 /**
- * Checks whether the specified URI has a schema in the form
+ * Checks whether the specified URI has a scheme in the form
  * "scheme://".
  */
 G_GNUC_PURE

-- 
Git repository for pkg-mpd



More information about the Pkg-mpd-commits mailing list