2007-06-01 20:32:25 +02:00
|
|
|
AC_PREREQ(2.60)
|
2012-02-18 12:33:49 +01:00
|
|
|
|
2013-11-13 18:39:10 +01:00
|
|
|
AC_INIT(mpd, 0.19~git, musicpd-dev-team@lists.sourceforge.net)
|
2012-02-18 12:33:49 +01:00
|
|
|
|
|
|
|
VERSION_MAJOR=0
|
2013-11-26 13:07:59 +01:00
|
|
|
VERSION_MINOR=19
|
2012-02-18 12:33:49 +01:00
|
|
|
VERSION_REVISION=0
|
|
|
|
VERSION_EXTRA=0
|
|
|
|
|
2012-10-01 13:37:02 +02:00
|
|
|
AC_CONFIG_SRCDIR([src/Main.cxx])
|
2013-11-08 12:29:56 +01:00
|
|
|
AM_INIT_AUTOMAKE([foreign 1.11 dist-xz subdir-objects])
|
2011-10-09 16:15:51 +02:00
|
|
|
AM_SILENT_RULES
|
2011-12-10 17:28:16 +01:00
|
|
|
AC_CONFIG_HEADERS(config.h)
|
2008-09-23 22:38:46 +02:00
|
|
|
AC_CONFIG_MACRO_DIR([m4])
|
2004-02-24 00:41:20 +01:00
|
|
|
|
2013-12-19 12:16:02 +01:00
|
|
|
AC_DEFINE(PROTOCOL_VERSION, "0.19.0", [The MPD protocol version])
|
2009-01-05 09:31:04 +01:00
|
|
|
|
|
|
|
|
2010-04-17 04:27:44 +02:00
|
|
|
dnl ---------------------------------------------------------------------------
|
|
|
|
dnl Programs
|
|
|
|
dnl ---------------------------------------------------------------------------
|
2008-09-29 15:51:02 +02:00
|
|
|
AC_PROG_CC_C99
|
2009-02-12 18:14:14 +01:00
|
|
|
AC_PROG_CXX
|
2011-01-09 18:21:27 +01:00
|
|
|
AC_PROG_RANLIB
|
2009-02-12 18:14:14 +01:00
|
|
|
|
2013-08-01 09:13:41 +02:00
|
|
|
AN_MAKEVAR([AR], [AC_PROG_AR])
|
|
|
|
AN_PROGRAM([ar], [AC_PROG_AR])
|
|
|
|
AC_DEFUN([AC_PROG_AR], [AC_CHECK_TOOL(AR, ar, :)])
|
|
|
|
AC_PROG_AR
|
|
|
|
|
2004-03-17 19:13:29 +01:00
|
|
|
AC_PROG_INSTALL
|
2004-05-18 22:27:12 +02:00
|
|
|
AC_PROG_MAKE_SET
|
2009-01-05 09:31:04 +01:00
|
|
|
PKG_PROG_PKG_CONFIG
|
2011-09-30 08:37:36 +02:00
|
|
|
AC_ARG_WITH([systemdsystemunitdir],
|
|
|
|
AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [Directory for systemd service files]),
|
2011-10-07 09:55:02 +02:00
|
|
|
[], [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
|
2011-09-30 08:37:36 +02:00
|
|
|
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 ])
|
2004-03-17 19:13:29 +01:00
|
|
|
|
2010-04-17 04:27:44 +02:00
|
|
|
dnl ---------------------------------------------------------------------------
|
|
|
|
dnl Declare Variables
|
|
|
|
dnl ---------------------------------------------------------------------------
|
2011-09-16 07:34:52 +02:00
|
|
|
AC_SUBST(AM_CPPFLAGS,"")
|
2009-02-25 16:46:07 +01:00
|
|
|
AC_SUBST(AM_CFLAGS,"")
|
2011-09-16 07:34:52 +02:00
|
|
|
AC_SUBST(AM_CXXFLAGS,"")
|
2009-02-25 16:46:07 +01:00
|
|
|
|
2012-02-18 12:33:49 +01:00
|
|
|
## Used for the windows resource file
|
|
|
|
AC_SUBST(VERSION_MAJOR)
|
|
|
|
AC_SUBST(VERSION_MINOR)
|
|
|
|
AC_SUBST(VERSION_REVISION)
|
|
|
|
AC_SUBST(VERSION_EXTRA)
|
|
|
|
|
2010-04-17 04:27:44 +02:00
|
|
|
dnl ---------------------------------------------------------------------------
|
|
|
|
dnl OS Specific Defaults
|
|
|
|
dnl ---------------------------------------------------------------------------
|
2009-02-18 23:01:08 +01:00
|
|
|
AC_CANONICAL_HOST
|
|
|
|
|
2013-12-19 12:59:01 +01:00
|
|
|
host_is_unix=yes
|
2013-12-19 12:53:02 +01:00
|
|
|
host_is_linux=no
|
2013-10-28 22:18:56 +01:00
|
|
|
host_is_darwin=no
|
2013-12-19 12:55:43 +01:00
|
|
|
host_is_solaris=no
|
2013-11-29 07:30:29 +01:00
|
|
|
host_is_windows=no
|
2013-10-28 22:18:56 +01:00
|
|
|
|
2013-12-19 12:53:02 +01:00
|
|
|
linux_auto=no
|
|
|
|
|
2009-02-18 23:07:13 +01:00
|
|
|
case "$host_os" in
|
2013-12-19 12:53:02 +01:00
|
|
|
linux*)
|
|
|
|
host_is_linux=yes
|
|
|
|
linux_auto=auto
|
|
|
|
;;
|
|
|
|
|
2009-02-18 23:07:13 +01:00
|
|
|
mingw32* | windows*)
|
2012-02-18 12:33:49 +01:00
|
|
|
AC_CONFIG_FILES([
|
|
|
|
src/win/mpd_win32_rc.rc
|
|
|
|
])
|
|
|
|
AC_CHECK_TOOL(WINDRES, windres)
|
2013-01-11 11:06:16 +01:00
|
|
|
AM_CPPFLAGS="$AM_CPPFLAGS -DWIN32_LEAN_AND_MEAN"
|
2013-01-11 10:57:39 +01:00
|
|
|
AM_CPPFLAGS="$AM_CPPFLAGS -DWINVER=0x0600 -D_WIN32_WINNT=0x0600"
|
2011-10-09 17:33:09 +02:00
|
|
|
LIBS="$LIBS -lws2_32"
|
2013-11-29 07:30:29 +01:00
|
|
|
host_is_windows=yes
|
2013-12-19 12:59:01 +01:00
|
|
|
host_is_unix=no
|
2009-01-03 13:21:25 +01:00
|
|
|
;;
|
2013-10-28 22:18:56 +01:00
|
|
|
|
|
|
|
darwin*)
|
|
|
|
host_is_darwin=yes
|
|
|
|
;;
|
2013-12-19 12:55:43 +01:00
|
|
|
|
|
|
|
solaris*)
|
|
|
|
host_is_solaris=yes
|
|
|
|
;;
|
2009-01-03 13:21:25 +01:00
|
|
|
esac
|
2013-11-29 07:30:29 +01:00
|
|
|
AM_CONDITIONAL([HAVE_WINDOWS], [test x$host_is_windows = xyes])
|
2009-01-03 13:21:25 +01:00
|
|
|
|
2006-07-23 01:28:30 +02:00
|
|
|
if test -z "$prefix" || test "x$prefix" = xNONE; then
|
|
|
|
local_lib=
|
|
|
|
local_include=
|
|
|
|
|
|
|
|
# aren't autotools supposed to be smart enough to figure this out? oh
|
|
|
|
# well, the git-core Makefile managed to do some of the work for us :)
|
|
|
|
case "$host_os" in
|
|
|
|
darwin*)
|
|
|
|
local_lib='/sw/lib /opt/local/lib'
|
|
|
|
local_include='/sw/include /opt/local/include'
|
|
|
|
;;
|
|
|
|
freebsd* | openbsd*)
|
|
|
|
local_lib=/usr/local/lib
|
|
|
|
local_include=/usr/local/include
|
|
|
|
;;
|
|
|
|
netbsd*)
|
|
|
|
local_lib=/usr/pkg/lib
|
|
|
|
local_include=/usr/pkg/include
|
|
|
|
LDFLAGS="$LDFLAGS -Wl,-rpath,/usr/pkg/lib"
|
|
|
|
;;
|
|
|
|
esac
|
2006-07-18 11:55:15 +02:00
|
|
|
|
2006-07-23 01:28:30 +02:00
|
|
|
for d in $local_lib; do
|
|
|
|
if test -d "$d"; then
|
|
|
|
LDFLAGS="$LDFLAGS -L$d"
|
|
|
|
break
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
for d in $local_include; do
|
|
|
|
if test -d "$d"; then
|
2012-07-30 11:02:11 +02:00
|
|
|
CPPFLAGS="$CPPFLAGS -I$d"
|
2006-07-23 01:28:30 +02:00
|
|
|
break
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
fi
|
2004-02-24 00:41:20 +01:00
|
|
|
|
2012-07-30 11:06:48 +02:00
|
|
|
dnl ---------------------------------------------------------------------------
|
|
|
|
dnl Language Checks
|
|
|
|
dnl ---------------------------------------------------------------------------
|
|
|
|
|
|
|
|
AC_CXX_COMPILE_STDCXX_0X
|
|
|
|
if test "$ax_cv_cxx_compile_cxx0x_native" != yes; then
|
|
|
|
if test "$ax_cv_cxx_compile_cxx0x_gxx" = yes; then
|
|
|
|
AM_CXXFLAGS="$AM_CXXFLAGS -std=gnu++0x"
|
|
|
|
elif test "$ax_cv_cxx_compile_cxx0x_cxx" = yes; then
|
|
|
|
AM_CXXFLAGS="$AM_CXXFLAGS -std=c++0x"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2010-04-17 04:27:44 +02:00
|
|
|
dnl ---------------------------------------------------------------------------
|
|
|
|
dnl Header/Library Checks
|
|
|
|
dnl ---------------------------------------------------------------------------
|
2011-10-09 17:02:20 +02:00
|
|
|
AC_CHECK_FUNCS(daemon fork)
|
|
|
|
|
|
|
|
AC_SEARCH_LIBS([syslog], [bsd socket inet],
|
|
|
|
[AC_DEFINE(HAVE_SYSLOG, 1, [Define if syslog() is available])])
|
2008-12-28 19:48:53 +01:00
|
|
|
|
2011-10-09 17:09:29 +02:00
|
|
|
AC_SEARCH_LIBS([socket], [socket])
|
|
|
|
AC_SEARCH_LIBS([gethostbyname], [nsl])
|
2010-04-17 04:40:32 +02:00
|
|
|
|
2013-12-19 12:53:02 +01:00
|
|
|
if test x$host_is_linux = xyes; then
|
|
|
|
AC_CHECK_FUNCS(pipe2 accept4)
|
|
|
|
fi
|
|
|
|
|
2013-12-06 12:07:32 +01:00
|
|
|
AC_CHECK_FUNCS(getpwnam_r getpwuid_r)
|
2013-12-19 12:53:02 +01:00
|
|
|
|
|
|
|
if test x$host_is_linux = xyes; then
|
|
|
|
MPD_OPTIONAL_FUNC(eventfd, eventfd, USE_EVENTFD)
|
|
|
|
MPD_OPTIONAL_FUNC(signalfd, signalfd, USE_SIGNALFD)
|
|
|
|
fi
|
2010-04-17 04:40:32 +02:00
|
|
|
|
2011-10-09 17:09:29 +02:00
|
|
|
AC_SEARCH_LIBS([exp], [m],,
|
|
|
|
[AC_MSG_ERROR([exp() not found])])
|
2010-04-17 04:40:32 +02:00
|
|
|
|
|
|
|
AC_CHECK_HEADERS(locale.h)
|
|
|
|
AC_CHECK_HEADERS(valgrind/memcheck.h)
|
|
|
|
|
2013-11-27 12:04:38 +01:00
|
|
|
dnl ---------------------------------------------------------------------------
|
|
|
|
dnl Event loop selection
|
|
|
|
dnl ---------------------------------------------------------------------------
|
|
|
|
|
2013-11-30 09:45:56 +01:00
|
|
|
MPD_OPTIONAL_FUNC_NODEF(poll, poll)
|
2013-12-19 12:53:02 +01:00
|
|
|
|
|
|
|
if test x$host_is_linux = xyes; then
|
|
|
|
MPD_OPTIONAL_FUNC_NODEF(epoll, epoll_create1)
|
|
|
|
fi
|
2013-11-27 12:04:38 +01:00
|
|
|
|
|
|
|
AC_ARG_WITH(pollmethod,
|
|
|
|
AS_HELP_STRING(
|
2013-11-30 09:45:56 +01:00
|
|
|
[--with-pollmethod=@<:@epoll|poll|winselect|auto@:>@],
|
2013-11-27 12:04:38 +01:00
|
|
|
[specify poll method for internal event loop (default=auto)]),,
|
|
|
|
[with_pollmethod=auto])
|
|
|
|
|
2014-01-04 19:31:23 +01:00
|
|
|
if test "x$with_pollmethod" = xauto; then
|
|
|
|
if test "x$enable_epoll" = xyes; then
|
|
|
|
with_pollmethod=epoll
|
|
|
|
elif test "x$enable_poll" = xyes; then
|
|
|
|
with_pollmethod=poll
|
|
|
|
elif test "x$host_is_windows" = xyes; then
|
|
|
|
with_pollmethod=winselect
|
2013-11-27 12:04:38 +01:00
|
|
|
else
|
2014-01-04 19:31:23 +01:00
|
|
|
AC_MSG_ERROR([no poll method is available for your platform])
|
2013-11-27 12:04:38 +01:00
|
|
|
fi
|
|
|
|
fi
|
2014-01-04 19:31:23 +01:00
|
|
|
case "$with_pollmethod" in
|
|
|
|
epoll)
|
|
|
|
AC_DEFINE(USE_EPOLL, 1, [Define to poll sockets with epoll])
|
2013-11-27 12:04:38 +01:00
|
|
|
;;
|
2014-01-04 19:31:23 +01:00
|
|
|
poll)
|
|
|
|
AC_DEFINE(USE_POLL, 1, [Define to poll sockets with poll])
|
2013-11-27 12:04:38 +01:00
|
|
|
;;
|
2014-01-04 19:31:23 +01:00
|
|
|
winselect)
|
|
|
|
AC_DEFINE(USE_WINSELECT, 1,
|
|
|
|
[Define to poll sockets with Windows select])
|
2013-11-27 12:04:38 +01:00
|
|
|
;;
|
2014-01-04 19:31:23 +01:00
|
|
|
*)
|
|
|
|
AC_MSG_ERROR([unknown pollmethod option: $with_pollmethod])
|
2013-11-27 12:04:38 +01:00
|
|
|
esac
|
|
|
|
|
2010-04-17 04:40:32 +02:00
|
|
|
dnl ---------------------------------------------------------------------------
|
|
|
|
dnl Allow tools to be specifically built
|
|
|
|
dnl ---------------------------------------------------------------------------
|
2011-09-05 22:53:46 +02:00
|
|
|
|
2013-04-16 23:44:32 +02:00
|
|
|
AC_ARG_ENABLE(libmpdclient,
|
2011-09-05 22:53:46 +02:00
|
|
|
AS_HELP_STRING([--enable-libmpdclient],
|
|
|
|
[enable support for the MPD client]),,
|
|
|
|
enable_libmpdclient=auto)
|
|
|
|
|
2014-01-09 11:57:47 +01:00
|
|
|
AC_ARG_ENABLE(expat,
|
|
|
|
AS_HELP_STRING([--enable-expat],
|
|
|
|
[enable the expat XML parser]),,
|
|
|
|
enable_expat=auto)
|
|
|
|
|
2012-09-25 22:03:44 +02:00
|
|
|
AC_ARG_ENABLE(adplug,
|
|
|
|
AS_HELP_STRING([--enable-adplug],
|
|
|
|
[enable the AdPlug decoder plugin (default: auto)]),,
|
|
|
|
enable_adplug=auto)
|
|
|
|
|
2010-04-17 04:40:32 +02:00
|
|
|
AC_ARG_ENABLE(alsa,
|
|
|
|
AS_HELP_STRING([--enable-alsa], [enable ALSA support]),,
|
2013-12-19 12:53:02 +01:00
|
|
|
[enable_alsa=$linux_auto])
|
2010-04-17 04:40:32 +02:00
|
|
|
|
2011-02-08 00:17:58 +01:00
|
|
|
AC_ARG_ENABLE(roar,
|
|
|
|
AS_HELP_STRING([--enable-roar],
|
|
|
|
[enable support for RoarAudio]),,
|
|
|
|
[enable_roar=auto])
|
|
|
|
|
2010-04-17 04:40:32 +02:00
|
|
|
AC_ARG_ENABLE(ao,
|
|
|
|
AS_HELP_STRING([--enable-ao],
|
|
|
|
[enable support for libao]),,
|
|
|
|
enable_ao=auto)
|
|
|
|
|
|
|
|
AC_ARG_ENABLE(audiofile,
|
|
|
|
AS_HELP_STRING([--enable-audiofile],
|
|
|
|
[enable audiofile support (WAV and others)]),,
|
|
|
|
enable_audiofile=auto)
|
|
|
|
|
|
|
|
AC_ARG_ENABLE(bzip2,
|
|
|
|
AS_HELP_STRING([--enable-bzip2],
|
2013-10-16 23:57:05 +02:00
|
|
|
[enable bzip2 archive support (default: auto)]),,
|
|
|
|
enable_bzip2=auto)
|
2010-04-17 04:40:32 +02:00
|
|
|
|
2010-12-21 22:23:01 +01:00
|
|
|
AC_ARG_ENABLE(cdio-paranoia,
|
|
|
|
AS_HELP_STRING([--enable-cdio-paranoia],
|
|
|
|
[enable support for audio CD support]),,
|
|
|
|
enable_cdio_paranoia=auto)
|
|
|
|
|
2010-04-17 04:40:32 +02:00
|
|
|
AC_ARG_ENABLE(curl,
|
|
|
|
AS_HELP_STRING([--enable-curl],
|
|
|
|
[enable support for libcurl HTTP streaming (default: auto)]),,
|
|
|
|
[enable_curl=auto])
|
|
|
|
|
2013-12-29 00:36:57 +01:00
|
|
|
AC_ARG_ENABLE(smbclient,
|
|
|
|
AS_HELP_STRING([--enable-smbclient],
|
|
|
|
[enable support for libsmbclient (default: auto)]),,
|
|
|
|
[enable_smbclient=auto])
|
|
|
|
|
2010-04-17 04:40:32 +02:00
|
|
|
AC_ARG_ENABLE(debug,
|
|
|
|
AS_HELP_STRING([--enable-debug],
|
|
|
|
[enable debugging (default: disabled)]),,
|
|
|
|
enable_debug=no)
|
|
|
|
|
|
|
|
AC_ARG_ENABLE(documentation,
|
|
|
|
AS_HELP_STRING([--enable-documentation],
|
|
|
|
[build documentation (default: disable)]),,
|
|
|
|
[enable_documentation=no])
|
|
|
|
|
|
|
|
AC_ARG_ENABLE(ffmpeg,
|
|
|
|
AS_HELP_STRING([--enable-ffmpeg],
|
|
|
|
[enable FFMPEG support]),,
|
|
|
|
enable_ffmpeg=auto)
|
|
|
|
|
|
|
|
AC_ARG_ENABLE(fifo,
|
|
|
|
AS_HELP_STRING([--disable-fifo],
|
|
|
|
[disable support for writing audio to a FIFO (default: enable)]),,
|
|
|
|
enable_fifo=yes)
|
|
|
|
|
|
|
|
AC_ARG_ENABLE(flac,
|
2011-09-01 18:37:40 +02:00
|
|
|
AS_HELP_STRING([--enable-flac],
|
|
|
|
[enable FLAC decoder]),,
|
|
|
|
enable_flac=auto)
|
2010-04-17 04:40:32 +02:00
|
|
|
|
|
|
|
AC_ARG_ENABLE(fluidsynth,
|
|
|
|
AS_HELP_STRING([--enable-fluidsynth],
|
2012-08-15 00:29:59 +02:00
|
|
|
[enable MIDI support via fluidsynth (default: auto)]),,
|
|
|
|
enable_fluidsynth=auto)
|
2010-04-17 04:40:32 +02:00
|
|
|
|
2010-04-17 12:47:13 +02:00
|
|
|
AC_ARG_ENABLE(gme,
|
|
|
|
AS_HELP_STRING([--enable-gme],
|
|
|
|
[enable Blargg's game music emulator plugin]),,
|
|
|
|
enable_gme=auto)
|
|
|
|
|
2010-04-17 04:40:32 +02:00
|
|
|
AC_ARG_ENABLE(httpd-output,
|
|
|
|
AS_HELP_STRING([--enable-httpd-output],
|
|
|
|
[enables the HTTP server output]),,
|
|
|
|
[enable_httpd_output=auto])
|
|
|
|
|
|
|
|
AC_ARG_ENABLE(id3,
|
2011-09-01 09:18:16 +02:00
|
|
|
AS_HELP_STRING([--enable-id3],
|
2011-09-20 21:14:56 +02:00
|
|
|
[enable id3 support]),,
|
2011-09-01 09:18:16 +02:00
|
|
|
enable_id3=auto)
|
2010-04-17 04:40:32 +02:00
|
|
|
|
|
|
|
AC_ARG_ENABLE(inotify,
|
|
|
|
AS_HELP_STRING([--disable-inotify],
|
|
|
|
[disable support Inotify automatic database update (default: enabled) ]),,
|
|
|
|
[enable_inotify=yes])
|
|
|
|
|
|
|
|
AC_ARG_ENABLE(ipv6,
|
|
|
|
AS_HELP_STRING([--disable-ipv6],
|
|
|
|
[disable IPv6 support (default: enable)]),,
|
|
|
|
[enable_ipv6=yes])
|
|
|
|
|
|
|
|
AC_ARG_ENABLE(iso9660,
|
|
|
|
AS_HELP_STRING([--enable-iso9660],
|
|
|
|
[enable iso9660 archive support (default: disabled)]),,
|
|
|
|
enable_iso9660=no)
|
|
|
|
|
|
|
|
AC_ARG_ENABLE(jack,
|
|
|
|
AS_HELP_STRING([--enable-jack],
|
|
|
|
[enable jack support]),,
|
|
|
|
enable_jack=auto)
|
|
|
|
|
|
|
|
AC_SYS_LARGEFILE
|
|
|
|
|
2011-03-27 08:41:40 +02:00
|
|
|
AC_ARG_ENABLE(despotify,
|
|
|
|
AS_HELP_STRING([--enable-despotify],
|
|
|
|
[enable support for despotify (default: disable)]),,
|
|
|
|
[enable_despotify=no])
|
|
|
|
|
2012-02-27 13:19:45 +01:00
|
|
|
AC_ARG_ENABLE(soundcloud,
|
|
|
|
AS_HELP_STRING([--enable-soundcloud],
|
2012-03-01 20:18:16 +01:00
|
|
|
[enable support for soundcloud.com]),,
|
|
|
|
[enable_soundcloud=auto])
|
2012-02-27 13:19:45 +01:00
|
|
|
|
2010-04-17 04:40:32 +02:00
|
|
|
AC_ARG_ENABLE(lame-encoder,
|
|
|
|
AS_HELP_STRING([--enable-lame-encoder],
|
|
|
|
[enable the LAME mp3 encoder]),,
|
|
|
|
enable_lame_encoder=auto)
|
|
|
|
|
|
|
|
AC_ARG_ENABLE([libwrap],
|
|
|
|
AS_HELP_STRING([--enable-libwrap], [use libwrap]),,
|
|
|
|
[enable_libwrap=auto])
|
|
|
|
|
|
|
|
AC_ARG_ENABLE(lsr,
|
|
|
|
AS_HELP_STRING([--enable-lsr],
|
|
|
|
[enable libsamplerate support]),,
|
|
|
|
enable_lsr=auto)
|
|
|
|
|
2013-11-10 19:17:16 +01:00
|
|
|
AC_ARG_ENABLE(soxr,
|
|
|
|
AS_HELP_STRING([--enable-soxr],
|
|
|
|
[enable the libsoxr resampler]),,
|
|
|
|
enable_soxr=auto)
|
|
|
|
|
2010-04-17 04:40:32 +02:00
|
|
|
AC_ARG_ENABLE(mad,
|
|
|
|
AS_HELP_STRING([--enable-mad],
|
|
|
|
[enable libmad mp3 decoder plugin]),,
|
|
|
|
enable_mad=auto)
|
|
|
|
|
|
|
|
AC_ARG_ENABLE(mikmod,
|
|
|
|
AS_HELP_STRING([--enable-mikmod],
|
|
|
|
[enable the mikmod decoder (default: disable)]),,
|
|
|
|
enable_mikmod=no)
|
|
|
|
|
|
|
|
AC_ARG_ENABLE(mms,
|
|
|
|
AS_HELP_STRING([--enable-mms],
|
|
|
|
[enable the MMS protocol with libmms]),,
|
|
|
|
[enable_mms=auto])
|
|
|
|
|
|
|
|
AC_ARG_ENABLE(modplug,
|
|
|
|
AS_HELP_STRING([--enable-modplug],
|
|
|
|
[enable modplug decoder plugin]),,
|
|
|
|
enable_modplug=auto)
|
|
|
|
|
|
|
|
AC_ARG_ENABLE(mpc,
|
2013-10-16 23:57:05 +02:00
|
|
|
AS_HELP_STRING([--enable-mpc],
|
|
|
|
[disable musepack (MPC) support (default: auto)]),,
|
|
|
|
enable_mpc=auto)
|
2010-04-17 04:40:32 +02:00
|
|
|
|
|
|
|
AC_ARG_ENABLE(mpg123,
|
|
|
|
AS_HELP_STRING([--enable-mpg123],
|
|
|
|
[enable libmpg123 decoder plugin]),,
|
|
|
|
enable_mpg123=auto)
|
|
|
|
|
|
|
|
AC_ARG_ENABLE(openal,
|
|
|
|
AS_HELP_STRING([--enable-openal],
|
2013-10-30 19:02:59 +01:00
|
|
|
[enable OpenAL support (default: auto)]),,
|
|
|
|
enable_openal=auto)
|
2010-04-17 04:40:32 +02:00
|
|
|
|
2012-09-04 09:26:18 +02:00
|
|
|
AC_ARG_ENABLE(opus,
|
|
|
|
AS_HELP_STRING([--enable-opus],
|
|
|
|
[enable Opus codec support (default: auto)]),,
|
|
|
|
enable_opus=auto)
|
|
|
|
|
2010-04-17 04:40:32 +02:00
|
|
|
AC_ARG_ENABLE(oss,
|
|
|
|
AS_HELP_STRING([--disable-oss],
|
|
|
|
[disable OSS support (default: enable)]),,
|
|
|
|
enable_oss=yes)
|
|
|
|
|
2013-10-28 22:25:58 +01:00
|
|
|
AC_ARG_ENABLE(osx,
|
|
|
|
AS_HELP_STRING([--enable-osx],
|
|
|
|
[enable the OS X output plugin - unsupported! (default: disable)]),,
|
|
|
|
enable_osx=no)
|
|
|
|
|
2010-04-17 04:40:32 +02:00
|
|
|
AC_ARG_ENABLE(pipe-output,
|
|
|
|
AS_HELP_STRING([--enable-pipe-output],
|
|
|
|
[enable support for writing audio to a pipe (default: disable)]),,
|
|
|
|
enable_pipe_output=no)
|
|
|
|
|
|
|
|
AC_ARG_ENABLE(pulse,
|
|
|
|
AS_HELP_STRING([--enable-pulse],
|
|
|
|
[enable support for the PulseAudio sound server]),,
|
|
|
|
enable_pulse=auto)
|
|
|
|
|
|
|
|
AC_ARG_ENABLE(recorder-output,
|
|
|
|
AS_HELP_STRING([--enable-recorder-output],
|
|
|
|
[enables the recorder file output plugin (default: disable)]),,
|
|
|
|
[enable_recorder_output=auto])
|
|
|
|
|
|
|
|
AC_ARG_ENABLE(sidplay,
|
|
|
|
AS_HELP_STRING([--enable-sidplay],
|
|
|
|
[enable C64 SID support via libsidplay2]),,
|
|
|
|
enable_sidplay=auto)
|
|
|
|
|
|
|
|
|
|
|
|
AC_ARG_ENABLE(shout,
|
|
|
|
AS_HELP_STRING([--enable-shout],
|
|
|
|
[enables the shoutcast streaming output]),,
|
|
|
|
[enable_shout=auto])
|
|
|
|
|
|
|
|
AC_ARG_ENABLE(sndfile,
|
|
|
|
AS_HELP_STRING([--enable-sndfile],
|
|
|
|
[enable sndfile support]),,
|
|
|
|
enable_sndfile=auto)
|
|
|
|
|
2011-09-19 07:39:27 +02:00
|
|
|
AC_ARG_ENABLE(solaris_output,
|
|
|
|
AS_HELP_STRING([--enable-solaris-output],
|
|
|
|
[enables the Solaris /dev/audio output]),,
|
2013-12-19 12:55:43 +01:00
|
|
|
[enable_solaris_output=$host_is_solaris])
|
2011-09-19 07:39:27 +02:00
|
|
|
|
2010-04-17 04:40:32 +02:00
|
|
|
AC_ARG_ENABLE(sqlite,
|
|
|
|
AS_HELP_STRING([--enable-sqlite],
|
|
|
|
[enable support for the SQLite database]),,
|
|
|
|
[enable_sqlite=auto])
|
|
|
|
|
2012-02-13 20:48:51 +01:00
|
|
|
AC_ARG_ENABLE(systemd-daemon,
|
|
|
|
AS_HELP_STRING([--enable-systemd-daemon],
|
|
|
|
[use the systemd daemon library (default=auto)]),,
|
2013-12-19 12:53:02 +01:00
|
|
|
[enable_systemd_daemon=$linux_auto])
|
2012-02-13 20:48:51 +01:00
|
|
|
|
2010-04-17 04:40:32 +02:00
|
|
|
AC_ARG_ENABLE(tcp,
|
|
|
|
AS_HELP_STRING([--disable-tcp],
|
|
|
|
[disable support for clients connecting via TCP (default: enable)]),,
|
|
|
|
[enable_tcp=yes])
|
|
|
|
|
|
|
|
AC_ARG_ENABLE(test,
|
|
|
|
AS_HELP_STRING([--enable-test],
|
|
|
|
[build the test programs (default: disabled)]),,
|
|
|
|
enable_test=no)
|
|
|
|
|
|
|
|
AC_ARG_WITH(tremor,
|
|
|
|
AS_HELP_STRING([--with-tremor=PFX],
|
|
|
|
[use Tremor (vorbisidec) integer Ogg Vorbis decoder (with optional prefix)]),,
|
|
|
|
with_tremor=no)
|
|
|
|
|
|
|
|
AC_ARG_ENABLE(twolame-encoder,
|
|
|
|
AS_HELP_STRING([--enable-twolame-encoder],
|
|
|
|
[enable the TwoLAME mp2 encoder]),,
|
|
|
|
enable_twolame_encoder=auto)
|
|
|
|
|
|
|
|
AC_ARG_ENABLE(un,
|
|
|
|
AS_HELP_STRING([--disable-un],
|
|
|
|
[disable support for clients connecting via unix domain sockets (default: enable)]),,
|
2013-12-19 12:59:01 +01:00
|
|
|
[enable_un=$host_is_unix])
|
2010-04-17 04:40:32 +02:00
|
|
|
|
|
|
|
AC_ARG_ENABLE(vorbis,
|
2011-09-01 18:42:17 +02:00
|
|
|
AS_HELP_STRING([--enable-vorbis],
|
|
|
|
[enable Ogg Vorbis decoder]),,
|
|
|
|
enable_vorbis=auto)
|
2010-04-17 04:40:32 +02:00
|
|
|
|
|
|
|
AC_ARG_ENABLE(vorbis-encoder,
|
|
|
|
AS_HELP_STRING([--enable-vorbis-encoder],
|
|
|
|
[enable the Ogg Vorbis encoder]),,
|
|
|
|
[enable_vorbis_encoder=auto])
|
|
|
|
|
|
|
|
AC_ARG_ENABLE(wave-encoder,
|
|
|
|
AS_HELP_STRING([--enable-wave-encoder],
|
|
|
|
[enable the PCM wave encoder]),,
|
|
|
|
enable_wave_encoder=yes)
|
|
|
|
|
|
|
|
AC_ARG_ENABLE(wavpack,
|
|
|
|
AS_HELP_STRING([--enable-wavpack],
|
|
|
|
[enable WavPack support]),,
|
|
|
|
enable_wavpack=auto)
|
|
|
|
|
|
|
|
AC_ARG_ENABLE(werror,
|
|
|
|
AS_HELP_STRING([--enable-werror],
|
|
|
|
[treat warnings as errors (default: disabled)]),,
|
|
|
|
enable_werror=no)
|
|
|
|
|
|
|
|
AC_ARG_ENABLE(wildmidi,
|
|
|
|
AS_HELP_STRING([--enable-wildmidi],
|
2013-10-16 23:57:05 +02:00
|
|
|
[enable MIDI support via wildmidi (default: auto)]),,
|
|
|
|
enable_wildmidi=auto)
|
2010-04-17 04:40:32 +02:00
|
|
|
|
|
|
|
AC_ARG_WITH(zeroconf,
|
|
|
|
AS_HELP_STRING([--with-zeroconf=@<:@auto|avahi|bonjour|no@:>@],
|
|
|
|
[enable zeroconf backend (default=auto)]),,
|
|
|
|
with_zeroconf="auto")
|
|
|
|
|
|
|
|
AC_ARG_ENABLE(zzip,
|
|
|
|
AS_HELP_STRING([--enable-zzip],
|
|
|
|
[enable zip archive support (default: disabled)]),,
|
|
|
|
enable_zzip=no)
|
|
|
|
|
|
|
|
|
|
|
|
AC_ARG_WITH(tremor-libraries,
|
|
|
|
AS_HELP_STRING([--with-tremor-libraries=DIR],
|
|
|
|
[directory where Tremor library is installed (optional)]),,
|
|
|
|
tremor_libraries="")
|
|
|
|
|
|
|
|
AC_ARG_WITH(tremor-includes,
|
|
|
|
AS_HELP_STRING([--with-tremor-includes=DIR],
|
|
|
|
[directory where Tremor header files are installed (optional)]),,
|
|
|
|
tremor_includes="")
|
|
|
|
|
2010-04-17 04:27:44 +02:00
|
|
|
dnl ---------------------------------------------------------------------------
|
|
|
|
dnl Mandatory Libraries
|
|
|
|
dnl ---------------------------------------------------------------------------
|
2013-12-15 12:32:15 +01:00
|
|
|
|
|
|
|
AC_ARG_ENABLE(glib,
|
|
|
|
AS_HELP_STRING([--enable-glib],
|
|
|
|
[enable GLib usage (default: enabled)]),,
|
|
|
|
enable_glib=yes)
|
|
|
|
|
|
|
|
if test x$enable_glib = xyes; then
|
|
|
|
PKG_CHECK_MODULES([GLIB], [glib-2.0 >= 2.28 gthread-2.0],,
|
2013-10-15 09:35:25 +02:00
|
|
|
[AC_MSG_ERROR([GLib 2.28 is required])])
|
2009-01-05 09:31:04 +01:00
|
|
|
|
2013-12-15 12:32:15 +01:00
|
|
|
if test x$GCC = xyes; then
|
|
|
|
# suppress warnings in the GLib headers
|
|
|
|
GLIB_CFLAGS=`echo $GLIB_CFLAGS |sed -e 's,-I/,-isystem /,g'`
|
|
|
|
fi
|
|
|
|
|
|
|
|
AC_DEFINE(HAVE_GLIB, 1, [Define if GLib is used])
|
2011-12-13 20:12:49 +01:00
|
|
|
fi
|
2013-12-15 12:32:15 +01:00
|
|
|
AM_CONDITIONAL(HAVE_GLIB, test x$enable_glib = xyes)
|
2011-12-13 20:12:49 +01:00
|
|
|
|
2010-04-17 04:27:44 +02:00
|
|
|
dnl ---------------------------------------------------------------------------
|
|
|
|
dnl Protocol Options
|
|
|
|
dnl ---------------------------------------------------------------------------
|
2008-10-16 08:40:55 +02:00
|
|
|
|
2009-01-05 09:43:07 +01:00
|
|
|
if test x$enable_tcp = xno; then
|
|
|
|
# if we don't support TCP, we don't need IPv6 either
|
|
|
|
enable_ipv6=no
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test x$enable_ipv6 = xyes; then
|
|
|
|
AC_MSG_CHECKING(for ipv6)
|
|
|
|
AC_EGREP_CPP([AP_maGiC_VALUE],
|
|
|
|
[
|
|
|
|
#include <sys/types.h>
|
2011-12-11 03:37:45 +01:00
|
|
|
#ifdef WIN32
|
|
|
|
#include <winsock2.h>
|
|
|
|
#else
|
2009-01-05 09:43:07 +01:00
|
|
|
#include <sys/socket.h>
|
2011-12-11 03:37:45 +01:00
|
|
|
#endif
|
2009-01-05 09:43:07 +01:00
|
|
|
#include <netdb.h>
|
|
|
|
#ifdef PF_INET6
|
|
|
|
#ifdef AF_INET6
|
|
|
|
AP_maGiC_VALUE
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
],
|
|
|
|
AC_DEFINE(HAVE_IPV6, 1, [Define if IPv6 support present])
|
|
|
|
AC_MSG_RESULT([yes]),
|
|
|
|
AC_MSG_RESULT([no])
|
|
|
|
)
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test x$enable_tcp = xyes; then
|
|
|
|
AC_DEFINE(HAVE_TCP, 1, [Define if TCP socket support is enabled])
|
|
|
|
fi
|
2008-10-16 08:40:55 +02:00
|
|
|
|
2009-01-05 09:43:07 +01:00
|
|
|
if test x$enable_un = xyes; then
|
|
|
|
AC_DEFINE(HAVE_UN, 1, [Define if unix domain socket support is enabled])
|
|
|
|
STRUCT_UCRED
|
2010-06-19 11:14:35 +02:00
|
|
|
AC_CHECK_FUNCS(getpeereid)
|
2009-01-05 09:43:07 +01:00
|
|
|
fi
|
|
|
|
|
2010-04-17 20:11:18 +02:00
|
|
|
dnl --------------------------- Post Protocol Tests ---------------------------
|
|
|
|
if
|
|
|
|
test x$enable_tcp = xno &&
|
|
|
|
test x$enable_un = xno; then
|
|
|
|
AC_MSG_ERROR([No client interfaces configured!])
|
|
|
|
fi
|
|
|
|
|
2012-02-13 20:48:51 +01:00
|
|
|
MPD_AUTO_PKG(systemd_daemon, SYSTEMD_DAEMON, libsystemd-daemon,
|
|
|
|
[systemd activation], [libsystemd-daemon not found])
|
|
|
|
AM_CONDITIONAL(ENABLE_SYSTEMD_DAEMON, test x$enable_systemd_daemon = xyes)
|
|
|
|
if test x$enable_systemd_daemon = xyes; then
|
|
|
|
AC_DEFINE([ENABLE_SYSTEMD_DAEMON], 1, [Define to use the systemd daemon library])
|
|
|
|
fi
|
|
|
|
|
2010-04-17 04:40:32 +02:00
|
|
|
dnl ---------------------------------------------------------------------------
|
|
|
|
dnl LIBC Features
|
|
|
|
dnl ---------------------------------------------------------------------------
|
|
|
|
if test x$enable_largefile != xno; then
|
|
|
|
AC_DEFINE([ENABLE_LARGEFILE], 1, [Define if large file support is enabled])
|
|
|
|
fi
|
2008-10-16 08:40:55 +02:00
|
|
|
|
2010-04-17 04:27:44 +02:00
|
|
|
dnl ---------------------------------------------------------------------------
|
2010-04-17 04:47:23 +02:00
|
|
|
dnl Miscellaneous Libraries
|
2010-04-17 04:27:44 +02:00
|
|
|
dnl ---------------------------------------------------------------------------
|
2009-03-06 11:30:40 +01:00
|
|
|
|
2011-09-05 22:53:46 +02:00
|
|
|
dnl -------------------------------- libmpdclient --------------------------------
|
|
|
|
MPD_AUTO_PKG(libmpdclient, LIBMPDCLIENT, [libmpdclient >= 2.2],
|
|
|
|
[MPD client library], [libmpdclient not found])
|
|
|
|
if test x$enable_libmpdclient = xyes; then
|
|
|
|
AC_DEFINE(HAVE_LIBMPDCLIENT, 1, [Define to use libmpdclient])
|
|
|
|
fi
|
|
|
|
|
|
|
|
AM_CONDITIONAL(HAVE_LIBMPDCLIENT, test x$enable_libmpdclient = xyes)
|
|
|
|
|
2014-01-09 11:57:47 +01:00
|
|
|
dnl -------------------------------- expat --------------------------------
|
|
|
|
MPD_AUTO_PKG(expat, EXPAT, [expat],
|
|
|
|
[expat XML parser], [expat not found])
|
|
|
|
if test x$enable_expat = xyes; then
|
|
|
|
AC_DEFINE(HAVE_EXPAT, 1, [Define to use the expat XML parser])
|
|
|
|
fi
|
|
|
|
|
|
|
|
AM_CONDITIONAL(HAVE_EXPAT, test x$enable_expat = xyes)
|
|
|
|
|
2010-04-17 04:52:45 +02:00
|
|
|
dnl --------------------------------- inotify ---------------------------------
|
2010-04-17 04:47:23 +02:00
|
|
|
AC_CHECK_FUNCS(inotify_init inotify_init1)
|
|
|
|
|
|
|
|
if test x$ac_cv_func_inotify_init = xno; then
|
|
|
|
enable_inotify=no
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test x$enable_inotify = xyes; then
|
|
|
|
AC_DEFINE([ENABLE_INOTIFY], 1, [Define to enable inotify support])
|
|
|
|
fi
|
|
|
|
AM_CONDITIONAL(ENABLE_INOTIFY, test x$enable_inotify = xyes)
|
|
|
|
|
2010-04-17 04:52:45 +02:00
|
|
|
dnl --------------------------------- libwrap ---------------------------------
|
2010-01-20 21:23:43 +01:00
|
|
|
if test x$enable_libwrap != xno; then
|
|
|
|
AC_CHECK_LIBWRAP(found_libwrap=yes, found_libwrap=no)
|
2013-01-27 21:34:43 +01:00
|
|
|
|
|
|
|
if test x$found_libwrap = xyes; then
|
|
|
|
dnl See if libwrap is compatible with C++; it is
|
|
|
|
dnl broken on many systems
|
|
|
|
AC_MSG_CHECKING(whether libwrap is compatible with C++)
|
|
|
|
AC_LANG_PUSH([C++])
|
|
|
|
AC_COMPILE_IFELSE([AC_LANG_SOURCE([
|
|
|
|
#include <tcpd.h>
|
|
|
|
bool CheckLibWrap(int fd, const char &progname) {
|
|
|
|
struct request_info req;
|
|
|
|
request_init(&req, RQ_FILE, fd, RQ_DAEMON, progname, 0);
|
|
|
|
fromhost(&req);
|
|
|
|
return hosts_access(&req);
|
|
|
|
}
|
|
|
|
])],
|
|
|
|
AC_MSG_RESULT([yes]),
|
|
|
|
[found_libwrap=no; AC_MSG_RESULT([no]);
|
|
|
|
AC_MSG_WARN([Your version of libwrap is broken with C++])])
|
|
|
|
AC_LANG_POP
|
|
|
|
fi
|
|
|
|
|
2010-01-20 21:23:43 +01:00
|
|
|
MPD_AUTO_RESULT(libwrap, libwrap, [libwrap not found])
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test x$enable_libwrap = xyes; then
|
|
|
|
AC_SUBST(LIBWRAP_CFLAGS)
|
|
|
|
AC_SUBST(LIBWRAP_LDFLAGS)
|
|
|
|
AC_DEFINE(HAVE_LIBWRAP, 1, [define to enable libwrap library])
|
|
|
|
fi
|
2010-01-20 21:04:07 +01:00
|
|
|
|
2010-04-17 04:27:44 +02:00
|
|
|
dnl ---------------------------------------------------------------------------
|
|
|
|
dnl Metadata Plugins
|
|
|
|
dnl ---------------------------------------------------------------------------
|
2009-03-31 21:48:04 +02:00
|
|
|
|
2010-04-17 04:52:45 +02:00
|
|
|
dnl -------------------------------- libid3tag --------------------------------
|
2011-09-01 09:18:16 +02:00
|
|
|
MPD_AUTO_PKG_LIB(id3, ID3TAG, id3tag, id3tag, id3_file_open, [-lid3tag -lz], [],
|
|
|
|
[id3tag], [libid3tag not found])
|
2010-04-17 04:49:51 +02:00
|
|
|
if test x$enable_id3 = xyes; then
|
|
|
|
AC_DEFINE(HAVE_ID3TAG, 1, [Define to use id3tag])
|
|
|
|
fi
|
|
|
|
|
|
|
|
AM_CONDITIONAL(HAVE_ID3TAG, test x$enable_id3 = xyes)
|
|
|
|
|
2010-04-17 04:27:44 +02:00
|
|
|
dnl ---------------------------------------------------------------------------
|
|
|
|
dnl Autodiscovery
|
|
|
|
dnl ---------------------------------------------------------------------------
|
2008-10-26 19:32:43 +01:00
|
|
|
|
2010-04-17 04:52:45 +02:00
|
|
|
dnl --------------------------------- zeroconf --------------------------------
|
|
|
|
|
2009-01-05 09:44:48 +01:00
|
|
|
case $with_zeroconf in
|
2011-09-01 10:07:58 +02:00
|
|
|
no|bonjour)
|
|
|
|
enable_avahi=no
|
2009-01-05 09:44:48 +01:00
|
|
|
;;
|
2011-09-01 10:07:58 +02:00
|
|
|
|
|
|
|
avahi)
|
|
|
|
enable_avahi=yes
|
|
|
|
;;
|
|
|
|
|
2009-01-05 09:44:48 +01:00
|
|
|
*)
|
|
|
|
with_zeroconf=auto
|
2011-09-01 10:07:58 +02:00
|
|
|
enable_avahi=auto
|
2009-01-05 09:44:48 +01:00
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
2013-10-18 09:16:55 +02:00
|
|
|
MPD_AUTO_PKG(avahi, AVAHI, [avahi-client],
|
|
|
|
[avahi client library], [avahi-client not found])
|
2011-09-01 10:07:58 +02:00
|
|
|
if test x$enable_avahi = xyes; then
|
|
|
|
AC_DEFINE([HAVE_AVAHI], 1, [Define to enable Avahi Zeroconf support])
|
|
|
|
with_zeroconf=avahi
|
|
|
|
fi
|
2009-01-05 09:44:48 +01:00
|
|
|
|
2011-09-01 10:07:58 +02:00
|
|
|
AM_CONDITIONAL(HAVE_AVAHI, test x$enable_avahi = xyes)
|
2009-01-05 09:44:48 +01:00
|
|
|
|
2011-09-01 10:07:58 +02:00
|
|
|
enable_bounjour=no
|
|
|
|
if test x$with_zeroconf != xno; then
|
2009-01-05 09:44:48 +01:00
|
|
|
if test x$with_zeroconf = xbonjour || test x$with_zeroconf = xauto; then
|
|
|
|
AC_CHECK_HEADER(dns_sd.h,
|
2011-07-03 15:42:22 +02:00
|
|
|
[enable_bonjour=yes;AC_DEFINE([HAVE_BONJOUR], 1, [Define to enable Bonjour Zeroconf support])])
|
2011-10-09 17:33:09 +02:00
|
|
|
AC_CHECK_LIB([dns_sd], [DNSServiceRegister])
|
2009-01-05 09:44:48 +01:00
|
|
|
fi
|
|
|
|
|
2011-07-03 15:42:22 +02:00
|
|
|
if test x$enable_bonjour = xyes; then
|
2009-01-05 09:44:48 +01:00
|
|
|
with_zeroconf=bonjour
|
|
|
|
elif test x$with_zeroconf = xbonjour; then
|
|
|
|
AC_MSG_ERROR([Bonjour support requested but not found])
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test x$with_zeroconf = xauto; then
|
|
|
|
AC_MSG_WARN([No supported Zeroconf backend found, disabling Zeroconf])
|
|
|
|
with_zeroconf=no
|
|
|
|
else
|
|
|
|
AC_DEFINE([HAVE_ZEROCONF], 1, [Define to enable Zeroconf support])
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
AM_CONDITIONAL(HAVE_ZEROCONF, test x$with_zeroconf != xno)
|
|
|
|
AM_CONDITIONAL(HAVE_BONJOUR, test x$with_zeroconf = xbonjour)
|
|
|
|
|
2010-04-17 04:27:44 +02:00
|
|
|
dnl ---------------------------------------------------------------------------
|
|
|
|
dnl Sticker Database
|
|
|
|
dnl ---------------------------------------------------------------------------
|
2009-01-12 09:56:14 +01:00
|
|
|
|
2010-04-17 04:52:45 +02:00
|
|
|
dnl ---------------------------------- sqlite ---------------------------------
|
|
|
|
|
2009-03-28 21:48:09 +01:00
|
|
|
MPD_AUTO_PKG(sqlite, SQLITE, [sqlite3],
|
|
|
|
[SQLite database support], [sqlite not found])
|
2009-01-12 09:56:14 +01:00
|
|
|
if test x$enable_sqlite = xyes; then
|
|
|
|
AC_DEFINE([ENABLE_SQLITE], 1, [Define to enable sqlite database support])
|
|
|
|
fi
|
|
|
|
|
|
|
|
AM_CONDITIONAL(ENABLE_SQLITE, test x$enable_sqlite = xyes)
|
|
|
|
|
2010-04-17 04:58:00 +02:00
|
|
|
dnl ---------------------------------------------------------------------------
|
|
|
|
dnl Converter Plugins
|
|
|
|
dnl ---------------------------------------------------------------------------
|
|
|
|
|
|
|
|
dnl ------------------------------ libsamplerate ------------------------------
|
2013-11-28 20:48:02 +01:00
|
|
|
MPD_AUTO_PKG(lsr, SAMPLERATE, [samplerate >= 0.1.3],
|
2010-04-17 04:58:00 +02:00
|
|
|
[libsamplerate resampling], [libsamplerate not found])
|
|
|
|
if test x$enable_lsr = xyes; then
|
|
|
|
AC_DEFINE([HAVE_LIBSAMPLERATE], 1,
|
|
|
|
[Define to enable libsamplerate])
|
|
|
|
fi
|
|
|
|
AM_CONDITIONAL(HAVE_LIBSAMPLERATE, test x$enable_lsr = xyes)
|
|
|
|
|
2013-11-10 19:17:16 +01:00
|
|
|
dnl ------------------------------ libsoxr ------------------------------------
|
|
|
|
MPD_AUTO_PKG(soxr, SOXR, [soxr],
|
|
|
|
[libsoxr resampler], [libsoxr not found])
|
|
|
|
if test x$enable_soxr = xyes; then
|
|
|
|
AC_DEFINE([HAVE_SOXR], 1, [Define to enable libsoxr])
|
|
|
|
fi
|
|
|
|
|
|
|
|
AM_CONDITIONAL(HAVE_SOXR, test x$enable_soxr = xyes)
|
|
|
|
|
2010-04-17 04:27:44 +02:00
|
|
|
dnl ---------------------------------------------------------------------------
|
|
|
|
dnl Input Plugins
|
|
|
|
dnl ---------------------------------------------------------------------------
|
2008-10-16 08:40:55 +02:00
|
|
|
|
2010-04-17 04:52:45 +02:00
|
|
|
dnl ----------------------------------- CURL ----------------------------------
|
2013-01-10 20:46:47 +01:00
|
|
|
MPD_AUTO_PKG(curl, CURL, [libcurl >= 7.18],
|
2009-03-28 21:48:09 +01:00
|
|
|
[libcurl HTTP streaming], [libcurl not found])
|
2009-01-05 09:44:48 +01:00
|
|
|
if test x$enable_curl = xyes; then
|
2009-09-24 21:40:07 +02:00
|
|
|
AC_DEFINE(ENABLE_CURL, 1, [Define when libcurl is used for HTTP streaming])
|
2009-01-05 09:44:48 +01:00
|
|
|
fi
|
2009-09-24 21:40:07 +02:00
|
|
|
AM_CONDITIONAL(ENABLE_CURL, test x$enable_curl = xyes)
|
2009-01-05 09:44:48 +01:00
|
|
|
|
2013-12-29 00:36:57 +01:00
|
|
|
dnl ----------------------------------- smbclient -----------------------------
|
|
|
|
MPD_AUTO_PKG(smbclient, SMBCLIENT, [smbclient >= 0.2],
|
|
|
|
[smbclient input plugin], [libsmbclient not found])
|
|
|
|
if test x$enable_smbclient = xyes; then
|
|
|
|
AC_DEFINE(ENABLE_SMBCLIENT, 1, [Define when libsmbclient is used])
|
|
|
|
fi
|
|
|
|
AM_CONDITIONAL(ENABLE_SMBCLIENT, test x$enable_smbclient = xyes)
|
|
|
|
|
2011-03-27 08:41:40 +02:00
|
|
|
dnl --------------------------------- Despotify ---------------------------------
|
|
|
|
MPD_AUTO_PKG(despotify, DESPOTIFY, [despotify],
|
2011-04-02 08:38:05 +02:00
|
|
|
[Despotify support], [despotify not found])
|
2011-03-27 08:41:40 +02:00
|
|
|
if test x$enable_despotify = xyes; then
|
|
|
|
AC_DEFINE(ENABLE_DESPOTIFY, 1, [Define when despotify is enabled])
|
|
|
|
fi
|
|
|
|
AM_CONDITIONAL(ENABLE_DESPOTIFY, test x$enable_despotify = xyes)
|
|
|
|
|
2012-02-27 13:19:45 +01:00
|
|
|
dnl --------------------------------- Soundcloud ------------------------------
|
2012-03-01 20:18:16 +01:00
|
|
|
if test x$enable_soundcloud != xno; then
|
2012-03-19 21:16:48 +01:00
|
|
|
PKG_CHECK_MODULES([YAJL], [yajl >= 2.0],
|
|
|
|
[found_soundcloud=yes],
|
2013-12-29 14:12:33 +01:00
|
|
|
AC_CHECK_LIB([yajl], [yajl_parse_complete],
|
2012-03-19 21:16:48 +01:00
|
|
|
[found_soundcloud=yes YAJL_CFLAGS=-DHAVE_YAJL1 YAJL_LIBS=-lyajl],
|
|
|
|
[found_soundcloud=no]))
|
2012-03-01 20:18:16 +01:00
|
|
|
fi
|
|
|
|
MPD_AUTO_RESULT([soundcloud], [soundcloud.com support], [libyajl not found])
|
2012-02-27 13:19:45 +01:00
|
|
|
if test x$enable_soundcloud = xyes; then
|
|
|
|
AC_DEFINE(ENABLE_SOUNDCLOUD, 1, [Define when soundcloud is enabled])
|
|
|
|
fi
|
|
|
|
AM_CONDITIONAL(ENABLE_SOUNDCLOUD, test x$enable_soundcloud = xyes)
|
2012-03-01 20:18:16 +01:00
|
|
|
AC_SUBST(YAJL_LIBS)
|
2012-02-27 13:19:45 +01:00
|
|
|
|
2012-02-10 00:12:29 +01:00
|
|
|
dnl ---------------------------------- cdio ---------------------------------
|
2010-12-21 22:23:01 +01:00
|
|
|
MPD_AUTO_PKG(cdio_paranoia, CDIO_PARANOIA, [libcdio_paranoia],
|
|
|
|
[libcdio_paranoia audio CD library], [libcdio_paranoia not found])
|
|
|
|
if test x$enable_cdio_paranoia = xyes; then
|
|
|
|
AC_DEFINE([ENABLE_CDIO_PARANOIA], 1,
|
|
|
|
[Define to enable libcdio_paranoia support])
|
2013-11-27 08:24:34 +01:00
|
|
|
AC_CHECK_HEADERS(cdio/paranoia/paranoia.h)
|
2010-12-21 22:23:01 +01:00
|
|
|
fi
|
|
|
|
|
|
|
|
AM_CONDITIONAL(ENABLE_CDIO_PARANOIA, test x$enable_cdio_paranoia = xyes)
|
|
|
|
|
2010-04-17 04:52:45 +02:00
|
|
|
dnl ---------------------------------- libmms ---------------------------------
|
2009-11-10 20:57:10 +01:00
|
|
|
MPD_AUTO_PKG(mms, MMS, [libmms >= 0.4],
|
2009-03-28 21:48:09 +01:00
|
|
|
[libmms mms:// protocol support], [libmms not found])
|
2009-01-29 21:42:10 +01:00
|
|
|
if test x$enable_mms = xyes; then
|
2009-03-28 21:48:09 +01:00
|
|
|
AC_DEFINE(ENABLE_MMS, 1,
|
|
|
|
[Define when libmms is used for the MMS protocol])
|
2009-01-29 21:42:10 +01:00
|
|
|
fi
|
|
|
|
AM_CONDITIONAL(ENABLE_MMS, test x$enable_mms = xyes)
|
|
|
|
|
2010-04-17 04:27:44 +02:00
|
|
|
dnl ---------------------------------------------------------------------------
|
|
|
|
dnl Archive Plugins
|
|
|
|
dnl ---------------------------------------------------------------------------
|
2008-12-16 21:45:59 +01:00
|
|
|
|
2010-04-17 04:56:24 +02:00
|
|
|
dnl --------------------------------- iso9660 ---------------------------------
|
|
|
|
MPD_AUTO_PKG(iso9660, ISO9660, [libiso9660],
|
|
|
|
[libiso9660 archive library], [libiso9660 not found])
|
|
|
|
|
|
|
|
AM_CONDITIONAL(HAVE_ISO9660, test x$enable_iso9660 = xyes)
|
|
|
|
if test x$enable_iso9660 = xyes; then
|
|
|
|
AC_DEFINE(HAVE_ISO9660, 1, [Define to have ISO9660 archive support])
|
|
|
|
|
|
|
|
AC_PATH_PROG(MKISOFS, mkisofs, no)
|
|
|
|
else
|
|
|
|
MKISOFS="no"
|
|
|
|
fi
|
|
|
|
|
|
|
|
AM_CONDITIONAL(ENABLE_ISO9660_TEST, test x$MKISOFS != xno)
|
|
|
|
|
|
|
|
dnl ---------------------------------- libbz2 ---------------------------------
|
2013-10-16 23:57:05 +02:00
|
|
|
|
|
|
|
MPD_AUTO_LIB(bzip2, BZ2, bz2, BZ2_bzDecompressInit, [-lbz2], [],
|
|
|
|
[bzip2], [libbz2 not found])
|
2008-12-27 13:45:17 +01:00
|
|
|
|
2009-03-07 23:05:25 +01:00
|
|
|
AM_CONDITIONAL(HAVE_BZ2, test x$enable_bzip2 = xyes)
|
|
|
|
if test x$enable_bzip2 = xyes; then
|
2008-12-27 13:45:17 +01:00
|
|
|
AC_DEFINE(HAVE_BZ2, 1, [Define to have bz2 archive support])
|
2009-12-31 11:11:14 +01:00
|
|
|
|
|
|
|
AC_PATH_PROG(BZIP2, bzip2, no)
|
|
|
|
else
|
|
|
|
BZIP2="no"
|
2008-12-27 13:45:17 +01:00
|
|
|
fi
|
2008-12-16 21:45:59 +01:00
|
|
|
|
2009-12-31 11:11:14 +01:00
|
|
|
AM_CONDITIONAL(ENABLE_BZIP2_TEST, test x$BZIP2 != xno)
|
|
|
|
|
2010-04-17 04:56:24 +02:00
|
|
|
dnl --------------------------------- libzzip ---------------------------------
|
2009-12-15 20:29:44 +01:00
|
|
|
MPD_AUTO_PKG(zzip, ZZIP, [zziplib >= 0.13],
|
2009-04-13 20:46:31 +02:00
|
|
|
[libzzip archive library], [libzzip not found])
|
2008-12-27 13:45:17 +01:00
|
|
|
|
2009-12-15 20:29:44 +01:00
|
|
|
AM_CONDITIONAL(HAVE_ZZIP, test x$enable_zzip = xyes)
|
|
|
|
if test x$enable_zzip = xyes; then
|
|
|
|
AC_DEFINE(HAVE_ZZIP, 1, [Define to have zip archive support])
|
2009-12-31 11:11:14 +01:00
|
|
|
|
|
|
|
AC_PATH_PROG(ZIP, zip, no)
|
|
|
|
else
|
|
|
|
ZIP="no"
|
2008-12-27 13:45:17 +01:00
|
|
|
fi
|
2008-12-16 21:46:11 +01:00
|
|
|
|
2009-12-31 11:11:14 +01:00
|
|
|
AM_CONDITIONAL(ENABLE_ZZIP_TEST, test x$ZIP != xno)
|
|
|
|
|
2010-04-17 04:56:24 +02:00
|
|
|
dnl ------------------------------- Archive API -------------------------------
|
2009-03-06 17:16:37 +01:00
|
|
|
if
|
2009-03-07 23:05:25 +01:00
|
|
|
test x$enable_bzip2 = xyes ||
|
2009-12-15 20:29:44 +01:00
|
|
|
test x$enable_zzip = xyes ||
|
2009-03-07 23:05:25 +01:00
|
|
|
test x$enable_iso9660 = xyes; then
|
2009-03-06 17:16:37 +01:00
|
|
|
enable_archive=yes
|
|
|
|
AC_DEFINE(ENABLE_ARCHIVE, 1, [The archive API is available])
|
2008-12-27 14:33:41 +01:00
|
|
|
else
|
|
|
|
enable_archive=no
|
|
|
|
fi
|
|
|
|
|
|
|
|
AM_CONDITIONAL(ENABLE_ARCHIVE, test x$enable_archive = xyes)
|
|
|
|
|
2010-04-17 12:29:40 +02:00
|
|
|
dnl ---------------------------------------------------------------------------
|
|
|
|
dnl Decoder Plugins
|
|
|
|
dnl ---------------------------------------------------------------------------
|
2005-02-02 11:27:24 +01:00
|
|
|
|
2012-09-25 22:03:44 +02:00
|
|
|
dnl -------------------------------- libadplug --------------------------------
|
|
|
|
MPD_AUTO_PKG(adplug, ADPLUG, [adplug],
|
|
|
|
[AdPlug decoder plugin], [libadplug not found])
|
|
|
|
if test x$enable_adplug = xyes; then
|
|
|
|
AC_DEFINE(HAVE_ADPLUG, 1, [Define to use libadplug])
|
|
|
|
fi
|
|
|
|
AM_CONDITIONAL(HAVE_ADPLUG, test x$enable_adplug = xyes)
|
|
|
|
|
2010-04-17 12:29:40 +02:00
|
|
|
dnl -------------------------------- audiofile --------------------------------
|
2013-11-06 20:04:21 +01:00
|
|
|
MPD_AUTO_PKG(audiofile, AUDIOFILE, [audiofile >= 0.3],
|
2010-04-17 12:29:40 +02:00
|
|
|
[audiofile decoder plugin], [libaudiofile not found])
|
|
|
|
AM_CONDITIONAL(HAVE_AUDIOFILE, test x$enable_audiofile = xyes)
|
|
|
|
if test x$enable_audiofile = xyes; then
|
|
|
|
AC_DEFINE(HAVE_AUDIOFILE, 1, [Define for audiofile support])
|
|
|
|
fi
|
2010-01-01 17:10:10 +01:00
|
|
|
|
2010-04-17 12:31:03 +02:00
|
|
|
dnl ----------------------------------- FAAD ----------------------------------
|
|
|
|
AM_PATH_FAAD()
|
2009-08-31 09:26:22 +02:00
|
|
|
|
2010-04-17 12:31:03 +02:00
|
|
|
AM_CONDITIONAL(HAVE_FAAD, test x$enable_aac = xyes)
|
2008-10-26 21:58:37 +01:00
|
|
|
|
2010-04-17 12:58:24 +02:00
|
|
|
dnl ---------------------------------- ffmpeg ---------------------------------
|
2013-07-31 01:01:21 +02:00
|
|
|
MPD_AUTO_PKG(ffmpeg, FFMPEG, [libavformat >= 53.17 libavcodec >= 53.25 libavutil >= 51.17],
|
2010-04-17 12:58:24 +02:00
|
|
|
[ffmpeg decoder library], [libavformat+libavcodec+libavutil not found])
|
|
|
|
|
|
|
|
if test x$enable_ffmpeg = xyes; then
|
|
|
|
AC_DEFINE(HAVE_FFMPEG, 1, [Define for FFMPEG support])
|
|
|
|
fi
|
|
|
|
|
|
|
|
AM_CONDITIONAL(HAVE_FFMPEG, test x$enable_ffmpeg = xyes)
|
|
|
|
|
2010-04-17 12:32:35 +02:00
|
|
|
dnl ----------------------------------- FLAC ----------------------------------
|
2011-09-01 18:37:40 +02:00
|
|
|
|
2012-10-02 10:04:44 +02:00
|
|
|
MPD_AUTO_PKG(flac, FLAC, [flac >= 1.2],
|
2011-09-01 18:37:40 +02:00
|
|
|
[FLAC decoder], [libFLAC not found])
|
|
|
|
|
2010-04-17 12:32:35 +02:00
|
|
|
if test x$enable_flac = xyes; then
|
2011-09-01 18:37:40 +02:00
|
|
|
AC_DEFINE(HAVE_FLAC, 1, [Define for FLAC support])
|
2010-04-17 12:32:35 +02:00
|
|
|
fi
|
2005-08-25 02:08:41 +02:00
|
|
|
|
2010-04-17 12:32:35 +02:00
|
|
|
AM_CONDITIONAL(HAVE_FLAC, test x$enable_flac = xyes)
|
|
|
|
|
|
|
|
enable_flac_encoder=$enable_flac
|
2008-10-26 21:58:37 +01:00
|
|
|
|
2010-04-17 12:34:06 +02:00
|
|
|
dnl -------------------------------- FluidSynth -------------------------------
|
2013-11-21 22:50:58 +01:00
|
|
|
|
|
|
|
MPD_AUTO_PKG(fluidsynth, FLUIDSYNTH, [fluidsynth >= 1.1],
|
|
|
|
[fluidsynth decoder], [fluidsynth not found])
|
|
|
|
|
2010-04-17 12:34:06 +02:00
|
|
|
if test x$enable_fluidsynth = xyes; then
|
2013-11-21 22:50:58 +01:00
|
|
|
AC_DEFINE(ENABLE_FLUIDSYNTH, 1, [Define for fluidsynth support])
|
2010-04-17 12:34:06 +02:00
|
|
|
fi
|
|
|
|
|
|
|
|
AM_CONDITIONAL(ENABLE_FLUIDSYNTH, test x$enable_fluidsynth = xyes)
|
|
|
|
|
2010-04-17 12:47:13 +02:00
|
|
|
dnl ---------------------------------- libgme ---------------------------------
|
2013-01-09 09:35:25 +01:00
|
|
|
MPD_AUTO_PKG_LIB(gme, GME, [libgme], gme, gme_open_file, [-lgme -lstdc++], [],
|
2010-04-17 12:47:13 +02:00
|
|
|
[gme decoder plugin], [libgme not found])
|
|
|
|
AM_CONDITIONAL(HAVE_GME, test x$enable_gme = xyes)
|
|
|
|
if test x$enable_gme = xyes; then
|
|
|
|
AC_DEFINE(HAVE_GME, 1, [Define for gme support])
|
|
|
|
fi
|
|
|
|
|
2010-04-17 12:35:47 +02:00
|
|
|
dnl ---------------------------------- libmad ---------------------------------
|
2011-09-01 09:22:18 +02:00
|
|
|
MPD_AUTO_PKG_LIB(mad, MAD, [mad],
|
|
|
|
mad, mad_stream_init, [-lmad], [],
|
2010-04-17 12:35:47 +02:00
|
|
|
[libmad MP3 decoder plugin], [libmad not found])
|
|
|
|
if test x$enable_mad = xyes; then
|
|
|
|
AC_DEFINE(HAVE_MAD, 1, [Define to use libmad])
|
|
|
|
fi
|
|
|
|
AM_CONDITIONAL(HAVE_MAD, test x$enable_mad = xyes)
|
2010-04-17 05:13:38 +02:00
|
|
|
|
|
|
|
enable_shout2="$enable_shout"
|
|
|
|
MPD_AUTO_PKG(shout, SHOUT, [shout],
|
|
|
|
[shout output plugin], [libshout not found])
|
|
|
|
if test x$enable_shout = xyes && test x$enable_shout2 = xauto; then
|
|
|
|
enable_shout=auto
|
|
|
|
fi
|
|
|
|
|
2010-04-17 12:37:24 +02:00
|
|
|
dnl -------------------------------- libmpg123 --------------------------------
|
|
|
|
MPD_AUTO_PKG(mpg123, MPG123, [libmpg123],
|
|
|
|
[libmpg123 decoder plugin], [libmpg123 not found])
|
|
|
|
if test x$enable_mpg123 = xyes; then
|
|
|
|
AC_DEFINE(HAVE_MPG123, 1, [Define to use libmpg123])
|
|
|
|
fi
|
|
|
|
AM_CONDITIONAL(HAVE_MPG123, test x$enable_mpg123 = xyes)
|
2010-04-17 05:13:38 +02:00
|
|
|
|
2010-04-17 12:38:29 +02:00
|
|
|
dnl -------------------------------- libmikmod --------------------------------
|
|
|
|
if test x$enable_mikmod = xyes; then
|
|
|
|
AC_PATH_PROG(LIBMIKMOD_CONFIG, libmikmod-config)
|
|
|
|
if test x$LIBMIKMOD_CONFIG != x ; then
|
|
|
|
AC_SUBST(LIBMIKMOD_CFLAGS, `$LIBMIKMOD_CONFIG --cflags`)
|
|
|
|
AC_SUBST(LIBMIKMOD_LIBS, `$LIBMIKMOD_CONFIG --libs`)
|
|
|
|
AC_DEFINE(ENABLE_MIKMOD_DECODER, 1, [Define for mikmod support])
|
|
|
|
else
|
|
|
|
enable_mikmod=no
|
|
|
|
fi
|
|
|
|
fi
|
2010-04-17 05:13:38 +02:00
|
|
|
|
2010-04-17 12:38:29 +02:00
|
|
|
AM_CONDITIONAL(ENABLE_MIKMOD_DECODER, test x$enable_mikmod = xyes)
|
2010-04-17 05:13:38 +02:00
|
|
|
|
2010-04-17 12:39:56 +02:00
|
|
|
dnl -------------------------------- libmodplug -------------------------------
|
|
|
|
MPD_AUTO_PKG(modplug, MODPLUG, [libmodplug],
|
|
|
|
[modplug decoder plugin], [libmodplug not found])
|
2010-04-17 05:13:38 +02:00
|
|
|
|
2010-04-17 12:39:56 +02:00
|
|
|
if test x$enable_modplug = xyes; then
|
|
|
|
AC_DEFINE(HAVE_MODPLUG, 1, [Define for modplug support])
|
|
|
|
fi
|
|
|
|
AM_CONDITIONAL(HAVE_MODPLUG, test x$enable_modplug = xyes)
|
2010-04-17 05:13:38 +02:00
|
|
|
|
2012-09-04 09:26:18 +02:00
|
|
|
dnl -------------------------------- libopus ----------------------------------
|
|
|
|
MPD_AUTO_PKG(opus, OPUS, [opus ogg],
|
|
|
|
[opus decoder plugin], [libopus not found])
|
|
|
|
if test x$enable_opus = xyes; then
|
|
|
|
AC_DEFINE(HAVE_OPUS, 1, [Define to use libopus])
|
|
|
|
fi
|
|
|
|
AM_CONDITIONAL(HAVE_OPUS, test x$enable_opus = xyes)
|
|
|
|
|
2010-04-17 12:42:57 +02:00
|
|
|
dnl -------------------------------- libsndfile -------------------------------
|
2010-04-17 19:21:04 +02:00
|
|
|
dnl See above test, which may disable this.
|
2010-04-17 12:42:57 +02:00
|
|
|
MPD_AUTO_PKG(sndfile, SNDFILE, [sndfile],
|
|
|
|
[libsndfile decoder plugin], [libsndfile not found])
|
|
|
|
|
|
|
|
if test x$enable_sndfile = xyes; then
|
|
|
|
AC_DEFINE(ENABLE_SNDFILE, 1, [Define to enable the sndfile decoder plugin])
|
|
|
|
fi
|
|
|
|
AM_CONDITIONAL(ENABLE_SNDFILE, test x$enable_sndfile = xyes)
|
2010-04-17 05:13:38 +02:00
|
|
|
|
2010-04-17 12:44:51 +02:00
|
|
|
dnl --------------------------------- musepack --------------------------------
|
2005-02-01 05:15:41 +01:00
|
|
|
|
2013-10-16 23:57:05 +02:00
|
|
|
MPD_AUTO_LIB(mpc, MPCDEC, mpcdec, main, [-lmpcdec], [],
|
|
|
|
[mpcdec], [libmpcdec not found])
|
2013-10-17 00:07:04 +02:00
|
|
|
if test x$enable_mpc = xyes; then
|
|
|
|
AC_DEFINE(HAVE_MPCDEC, 1, [Define to use libmpcdec for MPC decoding])
|
|
|
|
fi
|
2008-10-17 21:57:09 +02:00
|
|
|
AM_CONDITIONAL(HAVE_MPCDEC, test x$enable_mpc = xyes)
|
|
|
|
|
2010-04-17 12:47:13 +02:00
|
|
|
dnl -------------------------------- Ogg Tremor -------------------------------
|
|
|
|
if test x$with_tremor = xyes || test x$with_tremor = xno; then
|
2010-09-12 05:07:55 +02:00
|
|
|
enable_tremor="$with_tremor"
|
2010-04-17 12:47:13 +02:00
|
|
|
else
|
|
|
|
tremor_prefix="$with_tremor"
|
2010-09-12 05:07:55 +02:00
|
|
|
enable_tremor=yes
|
2010-04-17 12:47:13 +02:00
|
|
|
fi
|
2008-11-03 16:48:12 +01:00
|
|
|
|
2010-09-12 05:07:55 +02:00
|
|
|
if test x$enable_tremor = xyes; then
|
2006-07-19 17:54:53 +02:00
|
|
|
if test "x$tremor_libraries" != "x" ; then
|
|
|
|
TREMOR_LIBS="-L$tremor_libraries"
|
|
|
|
elif test "x$tremor_prefix" != "x" ; then
|
|
|
|
TREMOR_LIBS="-L$tremor_prefix/lib"
|
|
|
|
fi
|
|
|
|
TREMOR_LIBS="$TREMOR_LIBS -lvorbisidec"
|
|
|
|
if test "x$tremor_includes" != "x" ; then
|
|
|
|
TREMOR_CFLAGS="-I$tremor_includes"
|
|
|
|
elif test "x$tremor_prefix" != "x" ; then
|
|
|
|
TREMOR_CFLAGS="-I$tremor_prefix/include"
|
|
|
|
fi
|
2005-08-25 10:07:28 +02:00
|
|
|
ac_save_CFLAGS="$CFLAGS"
|
|
|
|
ac_save_LIBS="$LIBS"
|
|
|
|
CFLAGS="$CFLAGS $TREMOR_CFLAGS"
|
|
|
|
LIBS="$LIBS $TREMOR_LIBS"
|
2011-01-28 12:21:03 +01:00
|
|
|
AC_CHECK_LIB(vorbisidec,ov_read,,enable_tremor=no;
|
2009-03-06 17:16:37 +01:00
|
|
|
AC_MSG_WARN([vorbisidec lib needed for ogg support with tremor -- disabling ogg support]))
|
2009-04-01 22:45:00 +02:00
|
|
|
CFLAGS="$ac_save_CFLAGS"
|
|
|
|
LIBS="$ac_save_LIBS"
|
2011-01-28 12:21:03 +01:00
|
|
|
fi
|
2004-02-24 00:41:20 +01:00
|
|
|
|
2011-01-28 12:21:03 +01:00
|
|
|
if test x$enable_tremor = xyes; then
|
2009-03-06 17:16:37 +01:00
|
|
|
AC_DEFINE(HAVE_TREMOR,1,
|
|
|
|
[Define to use tremor (libvorbisidec) for ogg support])
|
2011-09-01 18:42:17 +02:00
|
|
|
AC_DEFINE(ENABLE_VORBIS_DECODER, 1, [Define for Ogg Vorbis support])
|
2011-01-28 12:21:03 +01:00
|
|
|
else
|
|
|
|
TREMOR_CFLAGS=
|
|
|
|
TREMOR_LIBS=
|
2006-09-12 01:41:07 +02:00
|
|
|
fi
|
2005-08-25 10:07:28 +02:00
|
|
|
|
2009-04-01 22:45:00 +02:00
|
|
|
AC_SUBST(TREMOR_CFLAGS)
|
|
|
|
AC_SUBST(TREMOR_LIBS)
|
|
|
|
|
2010-04-17 12:52:37 +02:00
|
|
|
dnl -------------------------------- Ogg Vorbis -------------------------------
|
2011-09-01 18:42:17 +02:00
|
|
|
|
|
|
|
if test x$enable_tremor = xyes; then
|
|
|
|
if test x$enable_vorbis = xyes; then
|
2010-09-12 05:06:05 +02:00
|
|
|
AC_MSG_WARN(["OggTremor detected, could not enable Vorbis."])
|
2010-04-23 15:48:12 +02:00
|
|
|
fi
|
2011-09-01 18:42:17 +02:00
|
|
|
enable_vorbis=no
|
2012-09-25 10:41:39 +02:00
|
|
|
|
|
|
|
if test x$enable_vorbis_encoder = xauto; then
|
|
|
|
AC_MSG_WARN([OggTremor detected, disabling the Vorbis encoder plugin.])
|
|
|
|
enable_vorbis_encoder=no
|
|
|
|
fi
|
2011-09-01 18:42:17 +02:00
|
|
|
fi
|
|
|
|
|
|
|
|
MPD_AUTO_PKG(vorbis, VORBIS, [vorbis vorbisfile ogg],
|
|
|
|
[Ogg Vorbis decoder], [libvorbis not found])
|
|
|
|
if test x$enable_vorbis = xyes; then
|
|
|
|
AC_DEFINE(ENABLE_VORBIS_DECODER, 1, [Define for Ogg Vorbis support])
|
2010-04-17 12:52:37 +02:00
|
|
|
fi
|
|
|
|
|
2011-01-28 12:21:03 +01:00
|
|
|
AM_CONDITIONAL(ENABLE_VORBIS_DECODER, test x$enable_vorbis = xyes || test x$enable_tremor = xyes)
|
2010-04-17 12:52:37 +02:00
|
|
|
|
2010-04-17 12:54:47 +02:00
|
|
|
dnl --------------------------------- sidplay ---------------------------------
|
|
|
|
if test x$enable_sidplay != xno; then
|
|
|
|
# we're not using pkg-config here
|
|
|
|
# because libsidplay2's .pc file requires libtool
|
2011-12-11 02:40:20 +01:00
|
|
|
AC_CHECK_LIB([sidplay2],[main],[found_sidplay=yes],[found_sidplay=no],[])
|
|
|
|
|
2010-04-17 12:54:47 +02:00
|
|
|
MPD_AUTO_PRE(sidplay, [sidplay decoder plugin],
|
|
|
|
[libsidplay2 not found])
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test x$enable_sidplay != xno; then
|
2011-12-11 02:40:20 +01:00
|
|
|
AC_CHECK_LIB([resid-builder], [main],
|
2010-04-17 12:54:47 +02:00
|
|
|
[found_sidplay=yes], [found_sidplay=no])
|
|
|
|
|
|
|
|
if test x$found_sidplay = xyes; then
|
2013-10-16 23:46:11 +02:00
|
|
|
AC_CHECK_LIB([sidutils],[main],[:],[found_sidplay=no],[])
|
2010-04-17 12:54:47 +02:00
|
|
|
fi
|
|
|
|
|
|
|
|
MPD_AUTO_RESULT(sidplay, [sidplay decoder plugin],
|
|
|
|
[libresid-builder or libsidutils not found])
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test x$enable_sidplay = xyes; then
|
|
|
|
AC_SUBST(SIDPLAY_LIBS,"-lsidplay2 -lresid-builder -lsidutils")
|
|
|
|
AC_SUBST(SIDPLAY_CFLAGS,)
|
|
|
|
|
|
|
|
AC_DEFINE(ENABLE_SIDPLAY, 1, [Define for libsidplay2 support])
|
|
|
|
fi
|
|
|
|
|
|
|
|
AM_CONDITIONAL(ENABLE_SIDPLAY, test x$enable_sidplay = xyes)
|
|
|
|
|
2010-04-17 12:55:52 +02:00
|
|
|
dnl --------------------------------- wavpack ---------------------------------
|
|
|
|
MPD_AUTO_PKG(wavpack, WAVPACK, [wavpack],
|
|
|
|
[WavPack decoder plugin], [libwavpack not found])
|
|
|
|
AM_CONDITIONAL(HAVE_WAVPACK, test x$enable_wavpack = xyes)
|
|
|
|
if test x$enable_wavpack = xyes; then
|
|
|
|
AC_DEFINE([HAVE_WAVPACK], 1, [Define to enable WavPack support])
|
|
|
|
fi
|
|
|
|
|
2010-04-17 12:57:05 +02:00
|
|
|
dnl --------------------------------- WildMidi --------------------------------
|
2013-10-16 23:57:05 +02:00
|
|
|
MPD_AUTO_LIB(wildmidi, WILDMIDI, WildMidi, WildMidi_Init, [-lWildMidi], [],
|
|
|
|
[wildmidi], [libwildmidi not found])
|
2010-04-17 12:57:05 +02:00
|
|
|
if test x$enable_wildmidi = xyes; then
|
|
|
|
AC_DEFINE(ENABLE_WILDMIDI, 1, [Define for wildmidi support])
|
|
|
|
fi
|
|
|
|
|
|
|
|
AM_CONDITIONAL(ENABLE_WILDMIDI, test x$enable_wildmidi = xyes)
|
2010-04-17 12:55:52 +02:00
|
|
|
|
2010-04-17 13:00:03 +02:00
|
|
|
dnl ------------------------ Post Decoder Plugins Tests -----------------------
|
|
|
|
|
2010-04-17 20:09:02 +02:00
|
|
|
if
|
|
|
|
test x$enable_aac = xno &&
|
|
|
|
test x$enable_audiofile = xno &&
|
|
|
|
test x$enable_ffmpeg = xno &&
|
|
|
|
test x$enable_flac = xno &&
|
|
|
|
test x$enable_fluidsynth = xno &&
|
|
|
|
test x$enable_mad = xno &&
|
|
|
|
test x$enable_mikmod = xno; then
|
|
|
|
test x$enable_modplug = xno &&
|
|
|
|
test x$enable_mpc = xno &&
|
|
|
|
test x$enable_mpg123 = xno &&
|
2012-09-04 09:26:18 +02:00
|
|
|
test x$enable_opus = xno &&
|
2010-04-17 20:09:02 +02:00
|
|
|
test x$enable_sidplay = xno &&
|
2010-09-12 05:08:35 +02:00
|
|
|
test x$enable_tremor = xno &&
|
2010-04-17 20:09:02 +02:00
|
|
|
test x$enable_vorbis = xno &&
|
|
|
|
test x$enable_wavpack = xno &&
|
|
|
|
test x$enable_wildmidi = xno &&
|
|
|
|
|
|
|
|
AC_MSG_ERROR([No input plugins supported!])
|
|
|
|
fi
|
|
|
|
|
2012-09-05 22:56:17 +02:00
|
|
|
AM_CONDITIONAL(HAVE_XIPH,
|
2012-09-04 09:26:18 +02:00
|
|
|
test x$enable_vorbis = xyes || test x$enable_tremor = xyes || test x$enable_flac = xyes || test x$enable_opus = xyes)
|
2010-04-17 13:00:03 +02:00
|
|
|
|
2010-04-26 15:49:12 +02:00
|
|
|
dnl ---------------------------------------------------------------------------
|
|
|
|
dnl Encoders for Streaming Audio Output Plugins
|
|
|
|
dnl ---------------------------------------------------------------------------
|
|
|
|
|
|
|
|
dnl ------------------------------- Encoder API -------------------------------
|
|
|
|
if test x$enable_shout = xyes || \
|
|
|
|
test x$enable_recorder_output = xyes || \
|
|
|
|
test x$enable_httpd_output = xyes; then
|
|
|
|
# at least one output using encoders is explicitly enabled
|
|
|
|
need_encoder=yes
|
|
|
|
elif test x$enable_shout = xauto || \
|
|
|
|
test x$enable_recorder_output = xauto || \
|
|
|
|
test x$enable_httpd_output = xauto; then
|
|
|
|
need_encoder=auto
|
|
|
|
else
|
|
|
|
# all outputs using encoders are disabled
|
|
|
|
need_encoder=no
|
|
|
|
|
|
|
|
# don't bother to check for encoder plugins
|
|
|
|
enable_vorbis_encoder=no
|
|
|
|
enable_lame_encoder=no
|
|
|
|
enable_twolame_encoder=no
|
|
|
|
enable_wave_encoder=no
|
|
|
|
enable_flac_encoder=no
|
|
|
|
fi
|
|
|
|
|
|
|
|
dnl ------------------------------- FLAC Encoder ------------------------------
|
|
|
|
if test x$enable_flac_encoder = xyes; then
|
|
|
|
AC_DEFINE(ENABLE_FLAC_ENCODER, 1,
|
|
|
|
[Define to enable the FLAC encoder plugin])
|
|
|
|
fi
|
|
|
|
AM_CONDITIONAL(ENABLE_FLAC_ENCODER, test x$enable_flac_encoder = xyes)
|
|
|
|
|
|
|
|
dnl ---------------------------- Ogg Vorbis Encoder ---------------------------
|
|
|
|
MPD_AUTO_PKG(vorbis_encoder, VORBISENC, [vorbisenc],
|
|
|
|
[Ogg Vorbis encoder], [libvorbisenc not found])
|
|
|
|
|
|
|
|
if test x$enable_vorbis_encoder = xyes; then
|
|
|
|
AC_DEFINE(ENABLE_VORBIS_ENCODER, 1,
|
|
|
|
[Define to enable the vorbis encoder plugin])
|
|
|
|
fi
|
|
|
|
AM_CONDITIONAL(ENABLE_VORBIS_ENCODER, test x$enable_vorbis_encoder = xyes)
|
|
|
|
|
|
|
|
dnl ------------------------------- LAME Encoder ------------------------------
|
|
|
|
|
2013-10-16 23:57:05 +02:00
|
|
|
MPD_AUTO_LIB(lame_encoder, LAME, mp3lame, lame_init, [-lmp3lame], [],
|
|
|
|
[libmp3lame], [libmp3lame not found])
|
2010-04-26 15:49:12 +02:00
|
|
|
if test x$enable_lame_encoder = xyes; then
|
|
|
|
AC_DEFINE(ENABLE_LAME_ENCODER, 1,
|
|
|
|
[Define to enable the lame encoder plugin])
|
|
|
|
fi
|
|
|
|
AM_CONDITIONAL(ENABLE_LAME_ENCODER, test x$enable_lame_encoder = xyes)
|
|
|
|
|
|
|
|
dnl ----------------------------- TwoLAME Encoder -----------------------------
|
|
|
|
MPD_AUTO_PKG(twolame_encoder, TWOLAME, [twolame],
|
|
|
|
[TwoLAME encoder], [libtwolame not found])
|
|
|
|
|
|
|
|
if test x$enable_twolame_encoder = xyes; then
|
|
|
|
AC_DEFINE(ENABLE_TWOLAME_ENCODER, 1,
|
|
|
|
[Define to enable the TwoLAME encoder plugin])
|
|
|
|
fi
|
|
|
|
AM_CONDITIONAL(ENABLE_TWOLAME_ENCODER, test x$enable_twolame_encoder = xyes)
|
|
|
|
|
|
|
|
dnl ------------------------------- WAVE Encoder ------------------------------
|
|
|
|
AM_CONDITIONAL(ENABLE_WAVE_ENCODER, test x$enable_wave_encoder = xyes)
|
|
|
|
if test x$enable_wave_encoder = xyes; then
|
|
|
|
AC_DEFINE(ENABLE_WAVE_ENCODER, 1,
|
|
|
|
[Define to enable the PCM wave encoder plugin])
|
|
|
|
fi
|
|
|
|
|
|
|
|
dnl --------------------------- encoder plugins test --------------------------
|
|
|
|
if test x$enable_vorbis_encoder != xno ||
|
2012-10-01 20:15:15 +02:00
|
|
|
test x$enable_opus != xno ||
|
2010-04-26 15:49:12 +02:00
|
|
|
test x$enable_lame_encoder != xno ||
|
|
|
|
test x$enable_twolame_encoder != xno ||
|
|
|
|
test x$enable_flac_encoder != xno ||
|
|
|
|
test x$enable_wave_encoder != xno; then
|
|
|
|
# at least one encoder plugin is enabled
|
|
|
|
enable_encoder=yes
|
|
|
|
else
|
|
|
|
# no encoder plugin is enabled: disable the whole encoder API
|
|
|
|
enable_encoder=no
|
|
|
|
|
|
|
|
if test x$need_encoder = xyes; then
|
|
|
|
AC_MSG_ERROR([No encoder plugin found])
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test x$enable_encoder = xyes; then
|
|
|
|
AC_DEFINE(ENABLE_ENCODER, 1,
|
|
|
|
[Define to enable the encoder plugins])
|
|
|
|
fi
|
|
|
|
AM_CONDITIONAL(ENABLE_ENCODER, test x$enable_encoder = xyes)
|
2013-10-19 14:43:24 +02:00
|
|
|
AM_CONDITIONAL(HAVE_OGG_ENCODER, test x$enable_vorbis_encoder = xyes || test x$enable_opus = xyes)
|
2010-04-17 20:20:52 +02:00
|
|
|
|
|
|
|
dnl ---------------------------------------------------------------------------
|
|
|
|
dnl Audio Output Plugins
|
|
|
|
dnl ---------------------------------------------------------------------------
|
|
|
|
|
|
|
|
dnl ----------------------------------- ALSA ----------------------------------
|
|
|
|
MPD_AUTO_PKG(alsa, ALSA, [alsa >= 0.9.0],
|
|
|
|
[ALSA output plugin], [libasound not found])
|
|
|
|
|
|
|
|
if test x$enable_alsa = xyes; then
|
|
|
|
AC_DEFINE(HAVE_ALSA, 1, [Define to enable ALSA support])
|
|
|
|
fi
|
|
|
|
|
|
|
|
AM_CONDITIONAL(HAVE_ALSA, test x$enable_alsa = xyes)
|
|
|
|
|
2011-02-08 00:17:58 +01:00
|
|
|
dnl ----------------------------------- ROAR ----------------------------------
|
|
|
|
MPD_AUTO_PKG(roar, ROAR, [libroar >= 0.4.0],
|
|
|
|
[ROAR output plugin], [libroar not found])
|
|
|
|
|
|
|
|
if test x$enable_roar = xyes; then
|
|
|
|
AC_DEFINE(HAVE_ROAR, 1, [Define to enable ROAR support])
|
|
|
|
fi
|
|
|
|
|
|
|
|
AM_CONDITIONAL(HAVE_ROAR, test x$enable_roar = xyes)
|
|
|
|
|
2010-04-17 20:20:52 +02:00
|
|
|
dnl ----------------------------------- FIFO ----------------------------------
|
|
|
|
if test x$enable_fifo = xyes; then
|
|
|
|
AC_CHECK_FUNC([mkfifo],
|
|
|
|
[enable_fifo=yes;AC_DEFINE([HAVE_FIFO], 1,
|
|
|
|
[Define to enable support for writing audio to a FIFO])],
|
|
|
|
[enable_fifo=no;AC_MSG_WARN([mkfifo not found -- disabling support for writing audio to a FIFO])])
|
|
|
|
fi
|
|
|
|
|
|
|
|
AM_CONDITIONAL(HAVE_FIFO, test x$enable_fifo = xyes)
|
|
|
|
|
|
|
|
dnl ------------------------------- HTTPD Output ------------------------------
|
|
|
|
if test x$enable_httpd_output = xauto; then
|
|
|
|
# handle HTTPD auto-detection: disable if no encoder is
|
|
|
|
# available
|
|
|
|
if test x$enable_encoder = xyes; then
|
|
|
|
enable_httpd_output=yes
|
|
|
|
else
|
|
|
|
AC_MSG_WARN([No encoder plugin -- disabling the HTTP output plugin])
|
|
|
|
enable_httpd_output=no
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test x$enable_httpd_output = xyes; then
|
|
|
|
AC_DEFINE(ENABLE_HTTPD_OUTPUT, 1, [Define to enable the HTTP server output])
|
|
|
|
fi
|
|
|
|
AM_CONDITIONAL(ENABLE_HTTPD_OUTPUT, test x$enable_httpd_output = xyes)
|
|
|
|
|
|
|
|
dnl ----------------------------------- JACK ----------------------------------
|
|
|
|
MPD_AUTO_PKG(jack, JACK, [jack >= 0.100],
|
|
|
|
[JACK output plugin], [libjack not found])
|
|
|
|
if test x$enable_jack = xyes; then
|
|
|
|
AC_DEFINE([HAVE_JACK], 1, [Define to enable JACK support])
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test x$enable_jack = xyes; then
|
|
|
|
# check whether jack_set_info_function() is available
|
|
|
|
old_LIBS=$LIBS
|
|
|
|
LIBS="$LIBS $JACK_LIBS"
|
|
|
|
|
|
|
|
AC_CHECK_FUNCS(jack_set_info_function)
|
|
|
|
|
|
|
|
LIBS=$old_LIBS
|
|
|
|
fi
|
|
|
|
|
|
|
|
AM_CONDITIONAL(HAVE_JACK, test x$enable_jack = xyes)
|
|
|
|
|
|
|
|
dnl ---------------------------------- libao ----------------------------------
|
|
|
|
MPD_AUTO_PKG(ao, AO, [ao],
|
|
|
|
[libao output plugin], [libao not found])
|
|
|
|
if test x$enable_ao = xyes; then
|
|
|
|
AC_DEFINE(HAVE_AO, 1, [Define to play with ao])
|
|
|
|
fi
|
|
|
|
|
|
|
|
AM_CONDITIONAL(HAVE_AO, test x$enable_ao = xyes)
|
|
|
|
|
|
|
|
dnl ---------------------------------- OpenAL ---------------------------------
|
|
|
|
AC_SUBST(OPENAL_CFLAGS,"")
|
|
|
|
AC_SUBST(OPENAL_LIBS,"")
|
|
|
|
|
2013-10-30 19:02:59 +01:00
|
|
|
if test x$host_is_darwin = xyes; then
|
|
|
|
if test x$enable_openal != xno; then
|
|
|
|
AC_CHECK_HEADERS([OpenAL/al.h OpenAL/alc.h],
|
|
|
|
[found_openal=yes], [found_openal=no])
|
|
|
|
fi
|
|
|
|
|
|
|
|
MPD_AUTO_RESULT(openal, [OpenAL output plugin], [OpenAL not found])
|
|
|
|
|
|
|
|
if test x$enable_openal = xyes; then
|
|
|
|
OPENAL_LIBS="-framework OpenAL"
|
2010-04-17 20:20:52 +02:00
|
|
|
fi
|
2013-10-30 19:02:59 +01:00
|
|
|
else
|
|
|
|
MPD_AUTO_PKG(openal, [OPENAL], [openal],
|
|
|
|
[OpenAL output plugin], [OpenAL not found])
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test x$enable_openal = xyes; then
|
|
|
|
AC_DEFINE(HAVE_OPENAL, 1, [Define for OpenAL support])
|
2010-04-17 20:20:52 +02:00
|
|
|
fi
|
|
|
|
|
|
|
|
AM_CONDITIONAL(HAVE_OPENAL, test x$enable_openal = xyes)
|
|
|
|
|
|
|
|
dnl ---------------------------- Open Sound System ----------------------------
|
|
|
|
if test x$enable_oss = xyes; then
|
|
|
|
AC_CHECK_HEADER(sys/soundcard.h,
|
|
|
|
[enable_oss=yes;AC_DEFINE(HAVE_OSS,1,[Define to enable OSS])],
|
|
|
|
[AC_MSG_WARN(Soundcard headers not found -- disabling OSS support);
|
|
|
|
enable_oss=no])
|
|
|
|
fi
|
|
|
|
|
|
|
|
AM_CONDITIONAL(HAVE_OSS, test x$enable_oss = xyes)
|
|
|
|
|
|
|
|
dnl ----------------------------------- OSX -----------------------------------
|
2013-10-28 22:18:56 +01:00
|
|
|
if test x$enable_osx = xyes; then
|
|
|
|
AC_DEFINE(HAVE_OSX, 1, [Define for compiling OS X support])
|
|
|
|
LIBS="$LIBS -framework AudioUnit -framework CoreAudio -framework CoreServices"
|
|
|
|
fi
|
2010-04-17 20:20:52 +02:00
|
|
|
|
|
|
|
AM_CONDITIONAL(HAVE_OSX, test x$enable_osx = xyes)
|
|
|
|
|
|
|
|
dnl ------------------------------- Pipe Output -------------------------------
|
|
|
|
if test x$enable_pipe_output = xyes; then
|
|
|
|
AC_DEFINE([ENABLE_PIPE_OUTPUT], 1,
|
|
|
|
[Define to enable support for writing audio to a pipe])
|
|
|
|
fi
|
|
|
|
AM_CONDITIONAL(ENABLE_PIPE_OUTPUT, test x$enable_pipe_output = xyes)
|
|
|
|
|
|
|
|
dnl -------------------------------- PulseAudio -------------------------------
|
2013-09-04 16:44:57 +02:00
|
|
|
MPD_AUTO_PKG(pulse, PULSE, [libpulse >= 0.9.16],
|
2010-04-17 20:20:52 +02:00
|
|
|
[PulseAudio output plugin], [libpulse not found])
|
|
|
|
if test x$enable_pulse = xyes; then
|
|
|
|
AC_DEFINE([HAVE_PULSE], 1,
|
|
|
|
[Define to enable PulseAudio support])
|
|
|
|
fi
|
|
|
|
|
|
|
|
AM_CONDITIONAL(HAVE_PULSE, test x$enable_pulse = xyes)
|
|
|
|
|
|
|
|
dnl --------------------------------- Recorder --------------------------------
|
|
|
|
if test x$enable_recorder_output = xauto; then
|
|
|
|
# handle recorder auto-detection: disable if no encoder is
|
|
|
|
# available
|
|
|
|
if test x$enable_encoder = xyes; then
|
|
|
|
enable_recorder_output=yes
|
|
|
|
else
|
|
|
|
AC_MSG_WARN([No encoder plugin -- disabling the recorder output plugin])
|
|
|
|
enable_recorder_output=no
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test x$enable_recorder_output = xyes; then
|
|
|
|
AC_DEFINE(ENABLE_RECORDER_OUTPUT, 1, [Define to enable the recorder output])
|
|
|
|
fi
|
|
|
|
AM_CONDITIONAL(ENABLE_RECORDER_OUTPUT, test x$enable_recorder_output = xyes)
|
|
|
|
|
|
|
|
dnl -------------------------------- SHOUTcast --------------------------------
|
|
|
|
if test x$enable_shout = xauto; then
|
|
|
|
# handle shout auto-detection: disable if no encoder is
|
|
|
|
# available
|
|
|
|
if test x$enable_encoder = xyes; then
|
|
|
|
enable_shout=yes
|
|
|
|
else
|
|
|
|
AC_MSG_WARN([No encoder plugin -- disabling the shout output plugin])
|
|
|
|
enable_shout=no
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test x$enable_shout = xyes; then
|
|
|
|
AC_DEFINE(HAVE_SHOUT, 1, [Define to enable the shoutcast output])
|
|
|
|
fi
|
|
|
|
AM_CONDITIONAL(HAVE_SHOUT, test x$enable_shout = xyes)
|
|
|
|
|
|
|
|
dnl --------------------------------- Solaris ---------------------------------
|
2011-09-19 07:39:27 +02:00
|
|
|
|
|
|
|
if test x$enable_solaris_output = xyes; then
|
|
|
|
AC_DEFINE(ENABLE_SOLARIS_OUTPUT, 1, [Define to enable Solaris /dev/audio support])
|
|
|
|
fi
|
2010-04-17 20:20:52 +02:00
|
|
|
|
|
|
|
AM_CONDITIONAL(ENABLE_SOLARIS_OUTPUT, test x$enable_solaris_output = xyes)
|
|
|
|
|
2010-10-08 19:55:14 +02:00
|
|
|
dnl --------------------------------- WinMM ---------------------------------
|
2010-05-18 22:56:42 +02:00
|
|
|
|
2013-11-29 07:30:29 +01:00
|
|
|
if test "x$host_is_windows" = xyes; then
|
|
|
|
AC_DEFINE(ENABLE_WINMM_OUTPUT, 1, [Define to enable WinMM support])
|
|
|
|
enable_winmm_output=yes
|
|
|
|
LIBS="$LIBS -lwinmm"
|
|
|
|
else
|
|
|
|
enable_winmm_output=no
|
|
|
|
fi
|
2010-05-18 22:56:42 +02:00
|
|
|
|
2010-10-08 19:55:14 +02:00
|
|
|
AM_CONDITIONAL(ENABLE_WINMM_OUTPUT, test x$enable_winmm_output = xyes)
|
2010-05-18 22:56:42 +02:00
|
|
|
|
2010-04-17 20:20:52 +02:00
|
|
|
dnl --------------------- Post Audio Output Plugins Tests ---------------------
|
|
|
|
if
|
|
|
|
test x$enable_alsa = xno &&
|
2011-02-08 00:17:58 +01:00
|
|
|
test x$enable_roar = xno &&
|
2010-04-17 20:20:52 +02:00
|
|
|
test x$enable_ao = xno &&
|
|
|
|
test x$enable_fifo = xno &&
|
|
|
|
test x$enable_httpd_output = xno &&
|
|
|
|
test x$enable_jack = xno &&
|
|
|
|
test x$enable_openal = xno &&
|
|
|
|
test x$enable_oss = xno &&
|
|
|
|
test x$enable_osx = xno &&
|
|
|
|
test x$enable_pipe_output = xno &&
|
|
|
|
test x$enable_pulse = xno &&
|
|
|
|
test x$enable_recorder_output = xno &&
|
|
|
|
test x$enable_shout = xno &&
|
|
|
|
test x$enable_solaris_output = xno &&
|
2013-04-17 00:33:37 +02:00
|
|
|
test x$enable_winmm_output = xno; then
|
2010-04-17 20:20:52 +02:00
|
|
|
|
|
|
|
AC_MSG_ERROR([No Audio Output types configured!])
|
|
|
|
fi
|
|
|
|
|
2010-04-17 04:27:44 +02:00
|
|
|
dnl ---------------------------------------------------------------------------
|
2008-11-20 08:59:55 +01:00
|
|
|
dnl Documentation
|
2010-04-17 04:27:44 +02:00
|
|
|
dnl ---------------------------------------------------------------------------
|
2009-02-04 15:25:57 +01:00
|
|
|
if test x$enable_documentation = xyes; then
|
|
|
|
AC_PATH_PROG(XMLTO, xmlto)
|
2008-11-20 08:59:55 +01:00
|
|
|
AC_SUBST(XMLTO)
|
2009-03-01 01:26:04 +01:00
|
|
|
AM_CONDITIONAL(HAVE_XMLTO, test x$XMLTO != x)
|
2009-02-13 09:11:22 +01:00
|
|
|
|
|
|
|
AC_PATH_PROG(DOXYGEN, doxygen)
|
|
|
|
if test x$DOXYGEN = x; then
|
|
|
|
AC_MSG_ERROR([doxygen not found])
|
|
|
|
fi
|
|
|
|
|
|
|
|
AC_SUBST(DOXYGEN)
|
2009-03-01 01:26:04 +01:00
|
|
|
else
|
|
|
|
AM_CONDITIONAL(HAVE_XMLTO, false)
|
2008-11-20 08:59:55 +01:00
|
|
|
fi
|
|
|
|
|
2009-02-04 15:25:57 +01:00
|
|
|
AM_CONDITIONAL(ENABLE_DOCUMENTATION, test x$enable_documentation = xyes)
|
2008-11-20 08:59:55 +01:00
|
|
|
|
2010-04-17 04:27:44 +02:00
|
|
|
dnl ---------------------------------------------------------------------------
|
|
|
|
dnl test suite
|
|
|
|
dnl ---------------------------------------------------------------------------
|
2013-10-16 21:55:00 +02:00
|
|
|
|
|
|
|
if test "x$enable_test" = xyes; then
|
|
|
|
PKG_CHECK_MODULES([CPPUNIT], [cppunit],,
|
|
|
|
[AC_MSG_ERROR([cppunit not found])])
|
|
|
|
fi
|
|
|
|
|
2009-02-18 19:27:05 +01:00
|
|
|
AM_CONDITIONAL(ENABLE_TEST, test "x$enable_test" = xyes)
|
|
|
|
|
2010-04-17 04:27:44 +02:00
|
|
|
dnl ---------------------------------------------------------------------------
|
2008-10-14 17:21:51 +02:00
|
|
|
dnl CFLAGS
|
2010-04-17 04:27:44 +02:00
|
|
|
dnl ---------------------------------------------------------------------------
|
2010-04-17 13:30:56 +02:00
|
|
|
|
2013-10-30 19:17:07 +01:00
|
|
|
dnl ---------------------------- warnings as errors ---------------------------
|
|
|
|
if test "x$enable_werror" = xyes; then
|
|
|
|
CFLAGS="$CFLAGS -Werror -pedantic-errors"
|
|
|
|
CXXFLAGS="$CXXFLAGS -Werror"
|
|
|
|
fi
|
|
|
|
|
|
|
|
dnl ---------------------------- language features ----------------------------
|
2013-10-30 18:22:35 +01:00
|
|
|
AX_APPEND_COMPILE_FLAGS([-fvisibility=hidden])
|
2013-10-30 18:14:46 +01:00
|
|
|
AX_APPEND_COMPILE_FLAGS([-ffast-math])
|
|
|
|
AX_APPEND_COMPILE_FLAGS([-ftree-vectorize])
|
2013-10-30 18:22:35 +01:00
|
|
|
|
|
|
|
AC_LANG_PUSH([C++])
|
|
|
|
AX_APPEND_COMPILE_FLAGS([-fvisibility=hidden])
|
|
|
|
AX_APPEND_COMPILE_FLAGS([-fno-threadsafe-statics])
|
|
|
|
AX_APPEND_COMPILE_FLAGS([-fmerge-all-constants])
|
|
|
|
AX_APPEND_COMPILE_FLAGS([-fno-exceptions])
|
|
|
|
AX_APPEND_COMPILE_FLAGS([-fno-rtti])
|
2013-10-30 18:14:46 +01:00
|
|
|
AX_APPEND_COMPILE_FLAGS([-ffast-math])
|
|
|
|
AX_APPEND_COMPILE_FLAGS([-ftree-vectorize])
|
2013-10-30 18:22:35 +01:00
|
|
|
AC_LANG_POP
|
|
|
|
|
2010-04-17 13:30:56 +02:00
|
|
|
dnl ---------------------------------- debug ----------------------------------
|
2011-09-16 07:31:06 +02:00
|
|
|
if test "x$enable_debug" = xno; then
|
|
|
|
AM_CPPFLAGS="$AM_CPPFLAGS -DNDEBUG"
|
2012-08-02 19:09:29 +02:00
|
|
|
|
|
|
|
AX_APPEND_COMPILE_FLAGS([-ffunction-sections])
|
|
|
|
AX_APPEND_COMPILE_FLAGS([-fdata-sections])
|
|
|
|
|
|
|
|
AC_LANG_PUSH([C++])
|
|
|
|
AX_APPEND_COMPILE_FLAGS([-ffunction-sections])
|
|
|
|
AX_APPEND_COMPILE_FLAGS([-fdata-sections])
|
|
|
|
AC_LANG_POP
|
|
|
|
|
|
|
|
AX_APPEND_LINK_FLAGS([-Wl,--gc-sections])
|
2011-09-16 07:31:06 +02:00
|
|
|
fi
|
2010-04-17 13:30:56 +02:00
|
|
|
|
|
|
|
dnl ----------------------------------- GCC -----------------------------------
|
2008-10-14 17:21:51 +02:00
|
|
|
if test x$GCC = xyes
|
|
|
|
then
|
2012-07-30 11:10:04 +02:00
|
|
|
AX_APPEND_COMPILE_FLAGS([-Wall])
|
|
|
|
AX_APPEND_COMPILE_FLAGS([-Wextra])
|
|
|
|
AX_APPEND_COMPILE_FLAGS([-Wmissing-prototypes])
|
|
|
|
AX_APPEND_COMPILE_FLAGS([-Wshadow])
|
|
|
|
AX_APPEND_COMPILE_FLAGS([-Wpointer-arith])
|
|
|
|
AX_APPEND_COMPILE_FLAGS([-Wstrict-prototypes])
|
|
|
|
AX_APPEND_COMPILE_FLAGS([-Wcast-qual])
|
|
|
|
AX_APPEND_COMPILE_FLAGS([-Wwrite-strings])
|
|
|
|
AX_APPEND_COMPILE_FLAGS([-pedantic])
|
2012-07-30 11:06:48 +02:00
|
|
|
|
|
|
|
AC_LANG_PUSH([C++])
|
|
|
|
AX_APPEND_COMPILE_FLAGS([-Wall])
|
|
|
|
AX_APPEND_COMPILE_FLAGS([-Wextra])
|
|
|
|
AX_APPEND_COMPILE_FLAGS([-Wmissing-declarations])
|
|
|
|
AX_APPEND_COMPILE_FLAGS([-Wshadow])
|
|
|
|
AX_APPEND_COMPILE_FLAGS([-Wpointer-arith])
|
|
|
|
AX_APPEND_COMPILE_FLAGS([-Wcast-qual])
|
|
|
|
AX_APPEND_COMPILE_FLAGS([-Wwrite-strings])
|
|
|
|
AX_APPEND_COMPILE_FLAGS([-Wsign-compare])
|
|
|
|
AC_LANG_POP
|
2008-10-14 17:21:51 +02:00
|
|
|
fi
|
|
|
|
|
2010-04-17 04:27:44 +02:00
|
|
|
dnl ---------------------------------------------------------------------------
|
|
|
|
dnl Pretty-Print Results
|
|
|
|
dnl ---------------------------------------------------------------------------
|
2010-04-17 20:02:41 +02:00
|
|
|
echo ''
|
|
|
|
echo '########### MPD CONFIGURATION ############'
|
2008-04-12 06:07:31 +02:00
|
|
|
|
2011-01-07 17:26:09 +01:00
|
|
|
printf '\nArchive support:\n\t'
|
2010-04-17 20:02:41 +02:00
|
|
|
results(bzip2,[bzip2])
|
|
|
|
results(iso9660,[ISO9660])
|
|
|
|
results(zzip,[ZIP])
|
2009-02-28 16:50:13 +01:00
|
|
|
|
2010-04-17 20:02:41 +02:00
|
|
|
if test x$with_zeroconf != xno; then
|
2011-01-07 17:26:09 +01:00
|
|
|
printf '\nAutodiscovery support:\n\t'
|
2010-04-17 20:02:41 +02:00
|
|
|
results(avahi, [Avahi])
|
|
|
|
results(bonjour, [Bonjour])
|
2008-04-12 06:07:24 +02:00
|
|
|
fi
|
|
|
|
|
2011-01-07 17:26:09 +01:00
|
|
|
printf '\nClient support:\n\t'
|
2010-04-17 20:02:41 +02:00
|
|
|
results(ipv6, "IPv6")
|
|
|
|
results(tcp, "TCP")
|
|
|
|
results(un,[UNIX Domain Sockets])
|
2008-04-12 06:07:24 +02:00
|
|
|
|
2011-01-07 17:26:09 +01:00
|
|
|
printf '\nFile format support:\n\t'
|
2010-04-17 20:02:41 +02:00
|
|
|
results(aac, [AAC])
|
2013-01-10 09:33:10 +01:00
|
|
|
results(adplug, [AdPlug])
|
2010-04-17 20:02:41 +02:00
|
|
|
results(sidplay, [C64 SID])
|
|
|
|
results(ffmpeg, [FFMPEG])
|
|
|
|
results(flac, [FLAC])
|
|
|
|
results(fluidsynth, [FluidSynth])
|
|
|
|
results(gme, [GME])
|
2011-01-07 17:26:09 +01:00
|
|
|
printf '\n\t'
|
2013-01-10 09:47:15 +01:00
|
|
|
results(sndfile, [libsndfile])
|
2010-04-17 20:02:41 +02:00
|
|
|
results(mikmod, [MikMod])
|
|
|
|
results(modplug, [MODPLUG])
|
|
|
|
results(mad, [MAD])
|
|
|
|
results(mpg123, [MPG123])
|
|
|
|
results(mpc, [Musepack])
|
2011-01-07 17:26:09 +01:00
|
|
|
printf '\n\t'
|
2013-01-10 09:32:18 +01:00
|
|
|
results(opus, [Opus])
|
2010-09-12 05:07:55 +02:00
|
|
|
results(tremor, [OggTremor])
|
2010-04-17 20:02:41 +02:00
|
|
|
results(vorbis, [OggVorbis])
|
|
|
|
results(audiofile, [WAVE])
|
|
|
|
results(wavpack, [WavPack])
|
|
|
|
results(wildmidi, [WildMidi])
|
2005-03-13 20:23:09 +01:00
|
|
|
|
2011-01-07 17:26:09 +01:00
|
|
|
printf '\nOther features:\n\t'
|
2010-04-17 20:02:41 +02:00
|
|
|
results(lsr, [libsamplerate])
|
2013-11-10 19:17:16 +01:00
|
|
|
results(soxr, [libsoxr])
|
2013-01-11 11:47:56 +01:00
|
|
|
results(libmpdclient, [libmpdclient])
|
2010-04-17 20:02:41 +02:00
|
|
|
results(inotify, [inotify])
|
2010-05-26 07:01:28 +02:00
|
|
|
results(sqlite, [SQLite])
|
2010-04-17 20:02:41 +02:00
|
|
|
|
2011-01-07 17:26:09 +01:00
|
|
|
printf '\nMetadata support:\n\t'
|
2010-04-17 20:02:41 +02:00
|
|
|
results(id3,[ID3])
|
|
|
|
|
2011-01-07 17:26:09 +01:00
|
|
|
printf '\nPlayback support:\n\t'
|
2010-04-17 20:02:41 +02:00
|
|
|
results(alsa,ALSA)
|
|
|
|
results(fifo,FIFO)
|
|
|
|
results(recorder_output,[File Recorder])
|
|
|
|
results(httpd_output,[HTTP Daemon])
|
|
|
|
results(jack,[JACK])
|
2011-12-10 17:18:34 +01:00
|
|
|
printf '\n\t'
|
2010-04-17 20:02:41 +02:00
|
|
|
results(ao,[libao])
|
|
|
|
results(oss,[OSS])
|
|
|
|
results(openal,[OpenAL])
|
|
|
|
results(osx, [OS X])
|
|
|
|
results(pipe_output, [Pipeline])
|
2011-12-10 17:18:34 +01:00
|
|
|
printf '\n\t'
|
2010-04-17 20:02:41 +02:00
|
|
|
results(pulse, [PulseAudio])
|
2011-12-10 17:18:34 +01:00
|
|
|
results(roar,[ROAR])
|
2010-04-17 20:02:41 +02:00
|
|
|
results(shout, [SHOUTcast])
|
2011-09-19 07:42:11 +02:00
|
|
|
results(solaris_output, [Solaris])
|
2010-10-08 19:55:14 +02:00
|
|
|
results(winmm_output, [WinMM])
|
2005-03-05 13:29:00 +01:00
|
|
|
|
2009-03-15 20:02:43 +01:00
|
|
|
if
|
|
|
|
test x$enable_shout = xyes ||
|
2009-08-24 18:57:06 +02:00
|
|
|
test x$enable_recorder = xyes ||
|
2009-03-15 20:02:43 +01:00
|
|
|
test x$enable_httpd_output = xyes; then
|
2011-01-07 17:26:09 +01:00
|
|
|
printf '\nStreaming encoder support:\n\t'
|
2010-04-17 20:02:41 +02:00
|
|
|
results(flac_encoder, [FLAC])
|
|
|
|
results(lame_encoder, [LAME])
|
|
|
|
results(vorbis_encoder, [Ogg Vorbis])
|
2012-10-01 20:15:15 +02:00
|
|
|
results(opus, [Opus])
|
2010-04-17 20:02:41 +02:00
|
|
|
results(twolame_encoder, [TwoLAME])
|
|
|
|
results(wave_encoder, [WAVE])
|
2004-03-17 19:13:29 +01:00
|
|
|
fi
|
|
|
|
|
2011-01-07 17:26:09 +01:00
|
|
|
printf '\nStreaming support:\n\t'
|
2011-12-10 17:18:34 +01:00
|
|
|
results(cdio_paranoia, [CDIO_PARANOIA])
|
2010-04-17 20:02:41 +02:00
|
|
|
results(curl,[CURL])
|
2013-12-29 00:36:57 +01:00
|
|
|
results(smbclient,[SMBCLIENT])
|
2011-12-10 17:18:34 +01:00
|
|
|
results(despotify,[Despotify])
|
2012-02-27 13:19:45 +01:00
|
|
|
results(soundcloud,[Soundcloud])
|
|
|
|
printf '\n\t'
|
2010-04-17 20:02:41 +02:00
|
|
|
results(mms,[MMS])
|
2004-03-17 19:13:29 +01:00
|
|
|
|
2013-11-27 12:04:38 +01:00
|
|
|
printf '\nEvent loop:\n\t'
|
2014-01-04 19:31:23 +01:00
|
|
|
printf $with_pollmethod
|
2013-11-27 12:04:38 +01:00
|
|
|
|
2011-01-07 17:26:09 +01:00
|
|
|
printf '\n\n##########################################\n\n'
|
2008-12-22 12:02:12 +01:00
|
|
|
|
2011-01-07 17:26:09 +01:00
|
|
|
echo 'Generating files needed for compilation'
|
2008-12-22 12:02:12 +01:00
|
|
|
|
2010-04-17 20:30:40 +02:00
|
|
|
dnl ---------------------------------------------------------------------------
|
|
|
|
dnl Generate files
|
|
|
|
dnl ---------------------------------------------------------------------------
|
2011-12-10 17:28:16 +01:00
|
|
|
AC_CONFIG_FILES(Makefile)
|
|
|
|
AC_CONFIG_FILES(doc/doxygen.conf)
|
|
|
|
AC_CONFIG_FILES(mpd.service)
|
|
|
|
AC_OUTPUT
|
2008-12-22 12:02:12 +01:00
|
|
|
|
2010-04-17 20:30:40 +02:00
|
|
|
echo 'MPD is ready for compilation, type "make" to begin.'
|