2007-06-01 20:32:25 +02:00
|
|
|
AC_PREREQ(2.60)
|
2012-02-18 12:33:49 +01:00
|
|
|
|
2017-01-10 23:01:42 +01:00
|
|
|
AC_INIT(mpd, 0.20.2, musicpd-dev-team@lists.sourceforge.net)
|
2012-02-18 12:33:49 +01:00
|
|
|
|
|
|
|
VERSION_MAJOR=0
|
2014-10-25 00:29:51 +02:00
|
|
|
VERSION_MINOR=20
|
2017-01-05 19:36:32 +01:00
|
|
|
VERSION_REVISION=1
|
2012-02-18 12:33:49 +01:00
|
|
|
VERSION_EXTRA=0
|
|
|
|
|
2012-10-01 13:37:02 +02:00
|
|
|
AC_CONFIG_SRCDIR([src/Main.cxx])
|
2014-01-27 09:01:02 +01:00
|
|
|
AC_CONFIG_AUX_DIR(build)
|
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
|
|
|
|
2015-02-06 17:16:57 +01:00
|
|
|
AC_DEFINE(PROTOCOL_VERSION, "0.20.0", [The MPD protocol version])
|
2009-01-05 09:31:04 +01:00
|
|
|
|
2014-01-20 23:21:48 +01:00
|
|
|
GIT_COMMIT=`GIT_DIR="$srcdir/.git" git describe --dirty --always 2>/dev/null`
|
|
|
|
if test x$GIT_COMMIT != x; then
|
|
|
|
AC_DEFINE_UNQUOTED(GIT_COMMIT, ["$GIT_COMMIT"], [The current git commit])
|
|
|
|
fi
|
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
|
|
|
|
2016-12-13 08:41:55 +01:00
|
|
|
AC_ARG_WITH([systemduserunitdir],
|
|
|
|
AS_HELP_STRING([--with-systemduserunitdir=DIR], [Directory for systemd service files]),
|
|
|
|
[], [with_systemduserunitdir=no])
|
|
|
|
if test "x$with_systemduserunitdir" = xyes; then
|
|
|
|
AC_MSG_CHECKING(for systemd)
|
|
|
|
with_systemduserunitdir=$($PKG_CONFIG --variable=systemduserunitdir systemd)
|
|
|
|
if test -z "$with_systemduserunitdir"; then
|
|
|
|
AC_MSG_ERROR([Failed to detect systemd])
|
|
|
|
fi
|
|
|
|
AC_MSG_RESULT([$with_systemduserunitdir])
|
|
|
|
fi
|
|
|
|
if test "x$with_systemduserunitdir" != xno; then
|
|
|
|
AC_SUBST([systemduserunitdir], [$with_systemduserunitdir])
|
|
|
|
fi
|
|
|
|
AM_CONDITIONAL(HAVE_SYSTEMD_USER, [test -n "$with_systemduserunitdir" -a "x$with_systemduserunitdir" != xno ])
|
|
|
|
|
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
|
2014-02-21 10:27:07 +01:00
|
|
|
host_is_android=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
|
2014-02-21 10:27:07 +01:00
|
|
|
linux-android*)
|
|
|
|
host_is_android=yes
|
|
|
|
host_is_linux=yes
|
|
|
|
linux_auto=auto
|
|
|
|
AM_CPPFLAGS="$AM_CPPFLAGS -DANDROID"
|
|
|
|
;;
|
|
|
|
|
2013-12-19 12:53:02 +01:00
|
|
|
linux*)
|
|
|
|
host_is_linux=yes
|
|
|
|
linux_auto=auto
|
2014-03-15 18:24:46 +01:00
|
|
|
|
|
|
|
dnl allow using all glibc features
|
|
|
|
CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
|
2013-12-19 12:53:02 +01:00
|
|
|
;;
|
|
|
|
|
2009-02-18 23:07:13 +01:00
|
|
|
mingw32* | windows*)
|
2012-02-18 12:33:49 +01:00
|
|
|
AC_CONFIG_FILES([
|
2014-12-09 13:15:40 +01:00
|
|
|
win32/res/mpd.rc
|
2012-02-18 12:33:49 +01:00
|
|
|
])
|
|
|
|
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"
|
2015-02-25 16:01:30 +01:00
|
|
|
AM_CPPFLAGS="$AM_CPPFLAGS -DSTRICT"
|
2015-02-25 16:01:46 +01:00
|
|
|
AM_CPPFLAGS="$AM_CPPFLAGS -DUNICODE -D_UNICODE"
|
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
|
|
|
|
;;
|
2015-09-17 22:18:14 +02:00
|
|
|
haiku*)
|
|
|
|
AC_CHECK_TOOL(RC, rc)
|
|
|
|
AC_CHECK_TOOL(XRES, xres)
|
|
|
|
;;
|
2009-01-03 13:21:25 +01:00
|
|
|
esac
|
2014-02-21 10:27:07 +01:00
|
|
|
|
|
|
|
AM_CONDITIONAL([ANDROID], [test x$host_is_android = xyes])
|
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
|
|
|
|
2014-02-18 08:33:06 +01:00
|
|
|
dnl ---------------------------------------------------------------------------
|
|
|
|
dnl Android
|
|
|
|
dnl ---------------------------------------------------------------------------
|
|
|
|
|
|
|
|
AC_ARG_WITH([android-sdk],
|
|
|
|
AS_HELP_STRING([--with-android-sdk=DIR],
|
|
|
|
[Directory for Android SDK]),
|
|
|
|
[], [with_android_sdk=no])
|
|
|
|
|
|
|
|
if test x$host_is_android = xyes; then
|
|
|
|
if test x$with_android_sdk = xno; then
|
|
|
|
AC_MSG_ERROR([Android build requires option --with-android-sdk=DIR])
|
|
|
|
fi
|
|
|
|
|
|
|
|
if ! test -x $with_android_sdk/tools/android; then
|
|
|
|
AC_MSG_ERROR([Android SDK not found in $with_android_sdk])
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
AC_SUBST(ANDROID_SDK, [$with_android_sdk])
|
|
|
|
|
2012-07-30 11:06:48 +02:00
|
|
|
dnl ---------------------------------------------------------------------------
|
|
|
|
dnl Language Checks
|
|
|
|
dnl ---------------------------------------------------------------------------
|
|
|
|
|
2016-11-18 08:41:47 +01:00
|
|
|
AX_CXX_COMPILE_STDCXX_14([noext], [mandatory])
|
2012-07-30 11:06:48 +02:00
|
|
|
|
2010-04-17 04:27:44 +02:00
|
|
|
dnl ---------------------------------------------------------------------------
|
|
|
|
dnl Header/Library Checks
|
|
|
|
dnl ---------------------------------------------------------------------------
|
2011-10-09 17:02:20 +02:00
|
|
|
|
2014-12-09 18:42:35 +01:00
|
|
|
AX_PTHREAD
|
|
|
|
LIBS="$PTHREAD_LIBS $LIBS"
|
|
|
|
AM_CFLAGS="$AM_CFLAGS $PTHREAD_CFLAGS"
|
|
|
|
AM_CXXFLAGS="$AM_CXXFLAGS $PTHREAD_CFLAGS"
|
|
|
|
|
2014-12-09 20:15:35 +01:00
|
|
|
MPD_WITH_LIBRARY([PTHREAD],
|
|
|
|
[AC_CHECK_FUNCS([pthread_setname_np])])
|
2014-12-09 18:42:35 +01:00
|
|
|
|
2014-01-27 14:59:09 +01:00
|
|
|
AC_SEARCH_LIBS([clock_gettime], [rt])
|
|
|
|
|
2014-11-21 14:51:54 +01:00
|
|
|
AC_ARG_ENABLE(syslog,
|
|
|
|
AS_HELP_STRING([--enable-syslog],
|
|
|
|
[enable syslog support (default: auto)]),,
|
|
|
|
enable_syslog=auto)
|
2014-11-23 07:39:05 +01:00
|
|
|
MPD_AUTO(syslog, [syslog support], [syslog() not available],
|
|
|
|
[AC_SEARCH_LIBS([syslog], [bsd socket inet],
|
2014-11-21 14:51:54 +01:00
|
|
|
[found_syslog=yes],
|
2014-11-23 07:39:05 +01:00
|
|
|
[found_syslog=no])])
|
2014-11-21 14:51:54 +01:00
|
|
|
if test x$enable_syslog = xyes; then
|
|
|
|
AC_DEFINE(HAVE_SYSLOG, 1, [Define if syslog() is available])
|
|
|
|
fi
|
2008-12-28 19:48:53 +01:00
|
|
|
|
2015-09-17 22:18:07 +02:00
|
|
|
AC_SEARCH_LIBS([socket], [network socket])
|
2011-10-09 17:09:29 +02:00
|
|
|
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
|
2015-01-05 20:24:59 +01:00
|
|
|
AC_CHECK_FUNCS(pipe2 accept4 linkat)
|
2013-12-19 12:53:02 +01:00
|
|
|
fi
|
|
|
|
|
2013-12-06 12:07:32 +01:00
|
|
|
AC_CHECK_FUNCS(getpwnam_r getpwuid_r)
|
2016-02-23 20:13:34 +01:00
|
|
|
AC_CHECK_FUNCS(initgroups)
|
2015-06-22 18:55:49 +02:00
|
|
|
AC_CHECK_FUNCS(fnmatch)
|
2015-01-26 05:02:15 +01:00
|
|
|
AC_CHECK_FUNCS(strndup)
|
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)
|
|
|
|
|
2014-01-30 18:37:30 +01:00
|
|
|
AC_CHECK_HEADERS([sys/prctl.h], AC_CHECK_FUNCS([prctl]))
|
|
|
|
|
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
|
|
|
|
2014-01-30 20:29:48 +01:00
|
|
|
AC_ARG_ENABLE(database,
|
|
|
|
AS_HELP_STRING([--enable-database],
|
|
|
|
[enable support for the music database]),,
|
|
|
|
enable_database=yes)
|
2014-12-21 23:25:48 +01:00
|
|
|
MPD_DEFINE_CONDITIONAL(enable_database, ENABLE_DATABASE,
|
|
|
|
[the music database])
|
2014-01-30 20:29:48 +01:00
|
|
|
if test x$enable_database = xyes; then
|
|
|
|
database_auto=auto
|
|
|
|
else
|
|
|
|
database_auto=no
|
|
|
|
fi
|
|
|
|
|
2014-11-20 20:38:37 +01:00
|
|
|
default_enable_daemon=yes
|
|
|
|
if test x$host_is_android = xyes || test x$host_is_android = xyes; then
|
|
|
|
default_enable_daemon=no
|
|
|
|
fi
|
|
|
|
AC_ARG_ENABLE(daemon,
|
|
|
|
AS_HELP_STRING([--enable-daemon],
|
|
|
|
[enable daemonization (default: enabled)]),,
|
|
|
|
enable_daemon=$default_enable_daemon)
|
2014-12-21 23:25:48 +01:00
|
|
|
MPD_DEFINE_CONDITIONAL(enable_daemon, ENABLE_DAEMON, [Enable daemonization?])
|
2014-11-20 20:38:37 +01:00
|
|
|
|
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])
|
|
|
|
|
2014-09-26 09:00:58 +02:00
|
|
|
AC_ARG_ENABLE(dsd,
|
|
|
|
AS_HELP_STRING([--enable-dsd],
|
|
|
|
[enable DSD decoder (default: enable)]),,
|
|
|
|
[enable_dsd=yes])
|
|
|
|
|
2010-04-17 04:40:32 +02:00
|
|
|
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(httpd-output,
|
|
|
|
AS_HELP_STRING([--enable-httpd-output],
|
|
|
|
[enables the HTTP server output]),,
|
|
|
|
[enable_httpd_output=auto])
|
|
|
|
|
|
|
|
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_SYS_LARGEFILE
|
|
|
|
|
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([libwrap],
|
|
|
|
AS_HELP_STRING([--enable-libwrap], [use libwrap]),,
|
|
|
|
[enable_libwrap=auto])
|
|
|
|
|
|
|
|
AC_ARG_ENABLE(mikmod,
|
|
|
|
AS_HELP_STRING([--enable-mikmod],
|
|
|
|
[enable the mikmod decoder (default: disable)]),,
|
|
|
|
enable_mikmod=no)
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
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(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])
|
|
|
|
|
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(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_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(wave-encoder,
|
|
|
|
AS_HELP_STRING([--enable-wave-encoder],
|
|
|
|
[enable the PCM wave encoder]),,
|
|
|
|
enable_wave_encoder=yes)
|
|
|
|
|
|
|
|
AC_ARG_ENABLE(werror,
|
|
|
|
AS_HELP_STRING([--enable-werror],
|
|
|
|
[treat warnings as errors (default: disabled)]),,
|
|
|
|
enable_werror=no)
|
|
|
|
|
|
|
|
AC_ARG_WITH(zeroconf,
|
|
|
|
AS_HELP_STRING([--with-zeroconf=@<:@auto|avahi|bonjour|no@:>@],
|
|
|
|
[enable zeroconf backend (default=auto)]),,
|
|
|
|
with_zeroconf="auto")
|
|
|
|
|
2010-04-17 04:27:44 +02:00
|
|
|
dnl ---------------------------------------------------------------------------
|
|
|
|
dnl Mandatory Libraries
|
|
|
|
dnl ---------------------------------------------------------------------------
|
2013-12-15 12:32:15 +01:00
|
|
|
|
2014-06-11 08:38:57 +02:00
|
|
|
AX_BOOST_BASE([1.46],, [AC_MSG_ERROR([Boost not found])])
|
|
|
|
|
2014-02-23 19:27:08 +01:00
|
|
|
AC_ARG_ENABLE(icu,
|
|
|
|
AS_HELP_STRING([--enable-icu],
|
2015-06-27 15:13:00 +02:00
|
|
|
[enable libicu for Unicode (default: auto)]),,
|
|
|
|
enable_icu=auto)
|
2014-12-21 23:25:48 +01:00
|
|
|
|
2015-06-27 15:13:00 +02:00
|
|
|
MPD_AUTO_PKG(icu, ICU, [icu-i18n], [libicu], [libicu not found])
|
2014-12-21 23:25:48 +01:00
|
|
|
MPD_DEFINE_CONDITIONAL(enable_icu, HAVE_ICU, [libicu])
|
2014-02-23 19:27:08 +01:00
|
|
|
|
2015-06-27 15:32:26 +02:00
|
|
|
AC_ARG_ENABLE(iconv,
|
|
|
|
AS_HELP_STRING([--enable-iconv],
|
|
|
|
[enable iconv for character set conversion (default: auto)]),,
|
|
|
|
enable_iconv=yes)
|
|
|
|
|
|
|
|
if test x$enable_icu = xyes; then
|
|
|
|
dnl We don't need iconv() if we have libicu
|
|
|
|
enable_iconv=no
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test x$enable_iconv = xyes; then
|
2015-06-26 16:43:27 +02:00
|
|
|
AC_CHECK_FUNCS(iconv)
|
|
|
|
fi
|
|
|
|
|
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
|
|
|
|
|
2015-03-20 22:12:43 +01:00
|
|
|
MPD_ENABLE_AUTO(systemd_daemon, SYSTEMD_DAEMON, [systemd socket activation],
|
|
|
|
[libsystemd not found], [$linux_auto], [
|
|
|
|
dnl Check for libsystemd and fall back to (the older)
|
|
|
|
dnl libsystemd-daemon
|
|
|
|
PKG_CHECK_MODULES([SYSTEMD_DAEMON], [libsystemd],
|
|
|
|
[found_systemd_daemon=yes],
|
|
|
|
[PKG_CHECK_MODULES([SYSTEMD_DAEMON], [libsystemd-daemon],
|
|
|
|
[found_systemd_daemon=yes],
|
|
|
|
[found_systemd_daemon=no])])
|
|
|
|
])
|
2012-02-13 20:48:51 +01:00
|
|
|
|
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 --------------------------------
|
2014-11-21 22:19:57 +01:00
|
|
|
MPD_ENABLE_AUTO_PKG_DEPENDS(libmpdclient, LIBMPDCLIENT,
|
|
|
|
[libmpdclient >= 2.2],
|
|
|
|
[MPD client library], [libmpdclient not found], [],
|
|
|
|
[enable_database], [Cannot use --enable-libmpdclient with --disable-database])
|
2011-09-05 22:53:46 +02:00
|
|
|
|
2014-01-09 11:57:47 +01:00
|
|
|
dnl -------------------------------- expat --------------------------------
|
2014-11-21 22:19:57 +01:00
|
|
|
MPD_ENABLE_AUTO_PKG(expat, EXPAT, [expat],
|
2014-01-09 11:57:47 +01:00
|
|
|
[expat XML parser], [expat not found])
|
|
|
|
|
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
|
|
|
|
|
2014-12-21 23:25:48 +01:00
|
|
|
MPD_DEFINE_CONDITIONAL(enable_inotify, ENABLE_INOTIFY, [inotify support])
|
2010-04-17 04:47:23 +02:00
|
|
|
|
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 --------------------------------
|
2014-11-22 23:18:07 +01:00
|
|
|
MPD_ENABLE_AUTO_PKG_LIB(id3, ID3TAG,
|
|
|
|
id3tag, id3tag, id3_file_open, [-lid3tag -lz], [],
|
2014-12-09 21:19:05 +01:00
|
|
|
[ID3 support using libid3tag], [libid3tag not found])
|
2010-04-17 04:49:51 +02:00
|
|
|
|
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
|
|
|
|
|
2014-06-10 23:00:47 +02:00
|
|
|
MPD_AUTO_PKG(avahi, AVAHI, [avahi-client dbus-1],
|
2013-10-18 09:16:55 +02:00
|
|
|
[avahi client library], [avahi-client not found])
|
2011-09-01 10:07:58 +02:00
|
|
|
if test x$enable_avahi = xyes; then
|
|
|
|
with_zeroconf=avahi
|
|
|
|
fi
|
2009-01-05 09:44:48 +01:00
|
|
|
|
2014-12-21 23:25:48 +01:00
|
|
|
MPD_DEFINE_CONDITIONAL(enable_avahi, HAVE_AVAHI, [Avahi Zeroconf])
|
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 ---------------------------------
|
|
|
|
|
2014-12-12 20:41:36 +01:00
|
|
|
MPD_ENABLE_AUTO_PKG(sqlite, SQLITE, [sqlite3 >= 3.7.3],
|
2014-11-21 22:19:57 +01:00
|
|
|
[SQLite database support], [sqlite not found],
|
|
|
|
[$database_auto])
|
2009-01-12 09:56:14 +01:00
|
|
|
|
2010-04-17 04:58:00 +02:00
|
|
|
dnl ---------------------------------------------------------------------------
|
|
|
|
dnl Converter Plugins
|
|
|
|
dnl ---------------------------------------------------------------------------
|
|
|
|
|
|
|
|
dnl ------------------------------ libsamplerate ------------------------------
|
2014-11-21 22:19:57 +01:00
|
|
|
MPD_ENABLE_AUTO_PKG(lsr, LIBSAMPLERATE, [samplerate >= 0.1.3],
|
2010-04-17 04:58:00 +02:00
|
|
|
[libsamplerate resampling], [libsamplerate not found])
|
|
|
|
|
2013-11-10 19:17:16 +01:00
|
|
|
dnl ------------------------------ libsoxr ------------------------------------
|
2014-11-21 22:19:57 +01:00
|
|
|
MPD_ENABLE_AUTO_PKG(soxr, SOXR, [soxr],
|
2013-11-10 19:17:16 +01:00
|
|
|
[libsoxr resampler], [libsoxr not found])
|
|
|
|
|
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 ----------------------------------
|
2014-11-21 22:19:57 +01:00
|
|
|
MPD_ENABLE_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
|
|
|
|
2013-12-29 00:36:57 +01:00
|
|
|
dnl ----------------------------------- smbclient -----------------------------
|
2014-11-22 23:18:07 +01:00
|
|
|
MPD_ENABLE_AUTO_PKG_LIB(smbclient, SMBCLIENT, [smbclient >= 0.2],
|
2014-01-27 14:47:46 +01:00
|
|
|
[smbclient], [smbc_init], [-lsmbclient], [],
|
2013-12-29 00:36:57 +01:00
|
|
|
[smbclient input plugin], [libsmbclient not found])
|
|
|
|
|
2014-02-06 07:29:26 +01:00
|
|
|
dnl ----------------------------------- NFS -----------------------------
|
2014-11-21 22:19:57 +01:00
|
|
|
MPD_ENABLE_AUTO_PKG(nfs, NFS, [libnfs],
|
2014-02-06 07:29:26 +01:00
|
|
|
[NFS input plugin], [libnfs not found])
|
|
|
|
|
2012-02-27 13:19:45 +01:00
|
|
|
dnl --------------------------------- Soundcloud ------------------------------
|
2014-11-23 07:39:05 +01:00
|
|
|
MPD_AUTO([soundcloud], [soundcloud.com support], [libyajl not found],
|
|
|
|
[PKG_CHECK_MODULES([YAJL], [yajl >= 2.0],
|
2012-03-19 21:16:48 +01:00
|
|
|
[found_soundcloud=yes],
|
2013-12-14 21:42:51 +01:00
|
|
|
[found_soundcloud=no])])
|
2014-12-21 23:25:48 +01:00
|
|
|
MPD_DEFINE_CONDITIONAL(enable_soundcloud, ENABLE_SOUNDCLOUD,
|
|
|
|
[soundcloud.com support])
|
2012-02-27 13:19:45 +01:00
|
|
|
|
2012-02-10 00:12:29 +01:00
|
|
|
dnl ---------------------------------- cdio ---------------------------------
|
2014-12-01 22:22:29 +01:00
|
|
|
MPD_ENABLE_AUTO_PKG(cdio_paranoia, CDIO_PARANOIA, [libcdio_paranoia],
|
|
|
|
[libcdio_paranoia input plugin], [libcdio_paranoia not found])
|
2010-12-21 22:23:01 +01:00
|
|
|
if test x$enable_cdio_paranoia = xyes; then
|
2013-11-27 08:24:34 +01:00
|
|
|
AC_CHECK_HEADERS(cdio/paranoia/paranoia.h)
|
2010-12-21 22:23:01 +01:00
|
|
|
fi
|
|
|
|
|
2014-11-21 22:19:57 +01:00
|
|
|
MPD_ENABLE_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
|
|
|
|
2017-01-03 07:25:14 +01:00
|
|
|
dnl ---------------------------------------------------------------------------
|
|
|
|
dnl Storage Plugins
|
|
|
|
dnl ---------------------------------------------------------------------------
|
|
|
|
|
|
|
|
MPD_ENABLE_AUTO(webdav, WEBDAV, [WebDAV storage plugin],
|
|
|
|
[WebDAV requires libcurl and libexpat],
|
|
|
|
[auto],
|
|
|
|
[if test x$enable_curl = xyes && test x$enable_expat = xyes; then
|
|
|
|
found_webdav=yes
|
|
|
|
else
|
|
|
|
found_webdav=no
|
|
|
|
fi])
|
|
|
|
|
2014-12-08 18:38:03 +01:00
|
|
|
dnl ---------------------------------------------------------------------------
|
|
|
|
dnl Playlist Plugins
|
|
|
|
dnl ---------------------------------------------------------------------------
|
|
|
|
|
|
|
|
MPD_ARG_ENABLE(cue, CUE, [CUE sheet parser], yes)
|
|
|
|
|
2014-01-18 16:36:42 +01:00
|
|
|
dnl ---------------------------------------------------------------------------
|
|
|
|
dnl Neighbor Plugins
|
|
|
|
dnl ---------------------------------------------------------------------------
|
|
|
|
|
|
|
|
AC_ARG_ENABLE(neighbor-plugins,
|
|
|
|
AS_HELP_STRING([--enable-neighbor-plugins],
|
|
|
|
[enable support for neighbor discovery (default: auto)]),,
|
|
|
|
[enable_neighbor_plugins=auto])
|
|
|
|
|
|
|
|
if test x$enable_neighbor_plugins = xauto; then
|
|
|
|
if test x$enable_smbclient = xyes; then
|
|
|
|
enable_neighbor_plugins=yes
|
|
|
|
fi
|
2014-01-26 11:19:17 +01:00
|
|
|
if test x$enable_upnp = xyes; then
|
|
|
|
enable_neighbor_plugins=yes
|
|
|
|
fi
|
2014-01-18 16:36:42 +01:00
|
|
|
fi
|
|
|
|
|
2014-12-21 23:25:48 +01:00
|
|
|
MPD_DEFINE_CONDITIONAL(enable_neighbor_plugins, ENABLE_NEIGHBOR_PLUGINS,
|
|
|
|
[neighbor discovery])
|
2014-01-18 16:36:42 +01:00
|
|
|
|
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 ---------------------------------
|
2014-11-21 22:19:57 +01:00
|
|
|
MPD_ENABLE_AUTO_PKG(iso9660, ISO9660, [libiso9660],
|
|
|
|
[libiso9660 archive plugin], [libiso9660 not found])
|
2010-04-17 04:56:24 +02:00
|
|
|
|
|
|
|
if test x$enable_iso9660 = xyes; then
|
|
|
|
AC_PATH_PROG(MKISOFS, mkisofs, no)
|
|
|
|
else
|
|
|
|
MKISOFS="no"
|
|
|
|
fi
|
|
|
|
|
|
|
|
AM_CONDITIONAL(ENABLE_ISO9660_TEST, test x$MKISOFS != xno)
|
|
|
|
|
2014-07-30 22:26:24 +02:00
|
|
|
dnl ---------------------------------- zlib ---------------------------------
|
|
|
|
|
2014-11-21 22:19:57 +01:00
|
|
|
MPD_ENABLE_AUTO_PKG(zlib, ZLIB, [zlib],
|
2014-07-30 22:26:24 +02:00
|
|
|
[zlib support], [zlib not found])
|
|
|
|
|
2010-04-17 04:56:24 +02:00
|
|
|
dnl ---------------------------------- libbz2 ---------------------------------
|
2013-10-16 23:57:05 +02:00
|
|
|
|
2014-12-09 21:07:05 +01:00
|
|
|
MPD_ENABLE_AUTO_LIB(bzip2, BZ2, bz2, BZ2_bzDecompressInit, [-lbz2], [],
|
|
|
|
[bzip2 archive plugin], [libbz2 not found])
|
2008-12-27 13:45:17 +01:00
|
|
|
|
2009-03-07 23:05:25 +01:00
|
|
|
if test x$enable_bzip2 = xyes; then
|
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)
|
|
|
|
|
2013-11-01 19:26:01 +01:00
|
|
|
dnl ---------------------------------- libupnp ---------------------------------
|
|
|
|
|
|
|
|
if test x$enable_expat = xno; then
|
|
|
|
if test x$enable_upnp = xauto; then
|
|
|
|
AC_MSG_WARN([expat disabled -- disabling UPnP])
|
|
|
|
enable_upnp=no
|
|
|
|
elif test x$enable_upnp = xyes; then
|
|
|
|
AC_MSG_ERROR([expat disabled -- required for UPnP])
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2014-11-21 22:19:57 +01:00
|
|
|
MPD_ENABLE_AUTO_PKG_DEPENDS(upnp, UPNP, [libupnp],
|
|
|
|
[UPnP client support], [libupnp not found], [],
|
|
|
|
[enable_database], [Cannot use --enable-upnp with --disable-database])
|
2013-11-01 19:26:01 +01:00
|
|
|
|
2010-04-17 04:56:24 +02:00
|
|
|
dnl --------------------------------- libzzip ---------------------------------
|
2014-11-21 22:19:57 +01:00
|
|
|
MPD_ENABLE_AUTO_PKG(zzip, ZZIP, [zziplib >= 0.13],
|
|
|
|
[libzzip archive library], [libzzip not found],
|
|
|
|
[no])
|
2008-12-27 13:45:17 +01:00
|
|
|
|
2009-12-15 20:29:44 +01:00
|
|
|
if test x$enable_zzip = xyes; then
|
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
|
2008-12-27 14:33:41 +01:00
|
|
|
else
|
|
|
|
enable_archive=no
|
|
|
|
fi
|
|
|
|
|
2014-12-21 23:25:48 +01:00
|
|
|
MPD_DEFINE_CONDITIONAL(enable_archive, ENABLE_ARCHIVE, [the archive API])
|
2008-12-27 14:33:41 +01:00
|
|
|
|
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 --------------------------------
|
2014-11-21 22:19:57 +01:00
|
|
|
MPD_ENABLE_AUTO_PKG(adplug, ADPLUG, [adplug],
|
2012-09-25 22:03:44 +02:00
|
|
|
[AdPlug decoder plugin], [libadplug not found])
|
|
|
|
|
2010-04-17 12:29:40 +02:00
|
|
|
dnl -------------------------------- audiofile --------------------------------
|
2014-11-21 22:19:57 +01:00
|
|
|
MPD_ENABLE_AUTO_PKG(audiofile, AUDIOFILE, [audiofile >= 0.3],
|
2010-04-17 12:29:40 +02:00
|
|
|
[audiofile decoder plugin], [libaudiofile not found])
|
2010-01-01 17:10:10 +01:00
|
|
|
|
2014-09-26 09:00:58 +02:00
|
|
|
dnl ----------------------------------- DSD -----------------------------------
|
|
|
|
|
2014-12-21 23:25:48 +01:00
|
|
|
MPD_DEFINE_CONDITIONAL(enable_dsd, ENABLE_DSD, [DSD decoder])
|
2014-09-26 09:00:58 +02:00
|
|
|
|
2010-04-17 12:31:03 +02:00
|
|
|
dnl ----------------------------------- FAAD ----------------------------------
|
2014-12-09 21:36:52 +01:00
|
|
|
MPD_ENABLE_AUTO_LIB(aac, FAAD, faad, NeAACDecOpen, [-lfaad], [],
|
|
|
|
[FAAD decoder plugin], [libfaad not found])
|
2008-10-26 21:58:37 +01:00
|
|
|
|
2010-04-17 12:58:24 +02:00
|
|
|
dnl ---------------------------------- ffmpeg ---------------------------------
|
2014-11-21 22:19:57 +01:00
|
|
|
MPD_ENABLE_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])
|
|
|
|
|
2010-04-17 12:32:35 +02:00
|
|
|
dnl ----------------------------------- FLAC ----------------------------------
|
2011-09-01 18:37:40 +02:00
|
|
|
|
2014-11-21 22:19:57 +01:00
|
|
|
MPD_ENABLE_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
|
|
|
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
|
|
|
|
2014-11-21 22:19:57 +01:00
|
|
|
MPD_ENABLE_AUTO_PKG(fluidsynth, FLUIDSYNTH, [fluidsynth >= 1.1],
|
|
|
|
[fluidsynth MIDI decoder plugin], [fluidsynth not found])
|
2010-04-17 12:34:06 +02:00
|
|
|
|
2010-04-17 12:47:13 +02:00
|
|
|
dnl ---------------------------------- libgme ---------------------------------
|
2014-12-22 10:28:15 +01:00
|
|
|
|
|
|
|
MPD_ENABLE_AUTO_PKG_LIB(gme, GME, [libgme],
|
2015-09-30 22:21:17 +02:00
|
|
|
gme, gme_open_file, [-lgme], [],
|
2014-12-22 10:28:15 +01:00
|
|
|
[Game Music Emulator decoder plugin], [libgme not found])
|
2010-04-17 12:47:13 +02:00
|
|
|
|
2010-04-17 12:35:47 +02:00
|
|
|
dnl ---------------------------------- libmad ---------------------------------
|
2014-11-22 23:18:07 +01:00
|
|
|
MPD_ENABLE_AUTO_PKG_LIB(mad, MAD, [mad],
|
2011-09-01 09:22:18 +02:00
|
|
|
mad, mad_stream_init, [-lmad], [],
|
2010-04-17 12:35:47 +02:00
|
|
|
[libmad MP3 decoder plugin], [libmad not found])
|
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 --------------------------------
|
2014-11-21 22:19:57 +01:00
|
|
|
MPD_ENABLE_AUTO_PKG(mpg123, MPG123, [libmpg123],
|
2010-04-17 12:37:24 +02:00
|
|
|
[libmpg123 decoder plugin], [libmpg123 not found])
|
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 -------------------------------
|
2014-11-21 22:19:57 +01:00
|
|
|
MPD_ENABLE_AUTO_PKG(modplug, MODPLUG, [libmodplug],
|
2010-04-17 12:39:56 +02:00
|
|
|
[modplug decoder plugin], [libmodplug not found])
|
2010-04-17 05:13:38 +02:00
|
|
|
|
2012-09-04 09:26:18 +02:00
|
|
|
dnl -------------------------------- libopus ----------------------------------
|
2014-11-21 22:19:57 +01:00
|
|
|
MPD_ENABLE_AUTO_PKG(opus, OPUS, [opus ogg],
|
2012-09-04 09:26:18 +02:00
|
|
|
[opus decoder plugin], [libopus not found])
|
|
|
|
|
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.
|
2014-11-21 22:19:57 +01:00
|
|
|
MPD_ENABLE_AUTO_PKG(sndfile, SNDFILE, [sndfile],
|
2010-04-17 12:42:57 +02:00
|
|
|
[libsndfile decoder plugin], [libsndfile not found])
|
|
|
|
|
2010-04-17 12:44:51 +02:00
|
|
|
dnl --------------------------------- musepack --------------------------------
|
2005-02-01 05:15:41 +01:00
|
|
|
|
2014-12-09 21:07:05 +01:00
|
|
|
MPD_ENABLE_AUTO_LIB(mpc, MPCDEC, mpcdec, mpc_demux_init, [-lmpcdec], [],
|
|
|
|
[Musepack decoder plugin], [libmpcdec not found])
|
2008-10-17 21:57:09 +02:00
|
|
|
|
2010-04-17 12:47:13 +02:00
|
|
|
dnl -------------------------------- Ogg Tremor -------------------------------
|
2014-12-09 20:50:33 +01:00
|
|
|
|
2014-12-09 21:02:05 +01:00
|
|
|
AC_ARG_WITH(tremor,
|
|
|
|
AS_HELP_STRING([--with-tremor=PFX],
|
|
|
|
[use Tremor (vorbisidec) integer Ogg Vorbis decoder (with optional prefix)]),,
|
|
|
|
with_tremor=no)
|
|
|
|
|
2014-12-09 20:50:33 +01:00
|
|
|
AC_ARG_VAR([TREMOR_CFLAGS], [C compiler flags for Tremor])
|
|
|
|
AC_ARG_VAR([TREMOR_LIBS], [linker flags for Tremor])
|
|
|
|
|
2010-04-17 12:47:13 +02:00
|
|
|
if test x$with_tremor = xyes || test x$with_tremor = xno; then
|
2010-09-12 05:07:55 +02:00
|
|
|
enable_tremor="$with_tremor"
|
2014-12-09 20:54:21 +01:00
|
|
|
tremor_prefix=""
|
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
|
2014-12-09 20:50:33 +01:00
|
|
|
if test x$TREMOR_CFLAGS = x && test x$tremor_prefix != x; then
|
2006-07-19 17:54:53 +02:00
|
|
|
TREMOR_CFLAGS="-I$tremor_prefix/include"
|
|
|
|
fi
|
2014-12-09 20:50:33 +01:00
|
|
|
if test x$TREMOR_LIBS = x; then
|
|
|
|
TREMOR_LIBS="-lvorbisidec"
|
|
|
|
|
|
|
|
if test x$tremor_prefix != x; then
|
|
|
|
TREMOR_LIBS="-L$tremor_prefix/lib $TREMOR_LIBS"
|
|
|
|
fi
|
|
|
|
fi
|
2014-12-09 20:23:22 +01:00
|
|
|
|
|
|
|
MPD_WITH_LIBRARY([TREMOR],
|
2014-12-09 20:44:00 +01:00
|
|
|
[AC_CHECK_FUNC([ov_read],,
|
|
|
|
[AC_MSG_ERROR([libvorbisidec not found])])])
|
2004-02-24 00:41:20 +01:00
|
|
|
|
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
|
|
|
|
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
|
|
|
|
|
2016-05-14 10:18:30 +02:00
|
|
|
MPD_AUTO_PKG(vorbis, VORBIS, [vorbis ogg],
|
2011-09-01 18:42:17 +02:00
|
|
|
[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
|
2016-07-29 15:31:02 +02:00
|
|
|
dnl Check for libsidplayfp first
|
|
|
|
PKG_CHECK_MODULES([SIDPLAY], [libsidplayfp libsidutils],
|
|
|
|
[found_sidplayfp=yes],
|
|
|
|
[found_sidplayfp=no])
|
|
|
|
found_sidplay=$found_sidplayfp
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test x$enable_sidplay != xno && test x$found_sidplayfp = xno; then
|
2016-07-29 15:21:38 +02:00
|
|
|
PKG_CHECK_MODULES([SIDPLAY], [libsidplay2 libsidutils],
|
|
|
|
[found_sidplay=yes],
|
|
|
|
[found_sidplay=no])
|
2011-12-11 02:40:20 +01:00
|
|
|
|
2010-04-17 12:54:47 +02:00
|
|
|
MPD_AUTO_PRE(sidplay, [sidplay decoder plugin],
|
|
|
|
[libsidplay2 not found])
|
|
|
|
fi
|
|
|
|
|
2016-07-29 15:31:02 +02:00
|
|
|
if test x$enable_sidplay != xno && test x$found_sidplayfp = 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])
|
|
|
|
|
|
|
|
MPD_AUTO_RESULT(sidplay, [sidplay decoder plugin],
|
2016-07-29 15:21:38 +02:00
|
|
|
[libresid-builder not found])
|
2010-04-17 12:54:47 +02:00
|
|
|
fi
|
|
|
|
|
|
|
|
if test x$enable_sidplay = xyes; then
|
2016-07-29 15:21:38 +02:00
|
|
|
SIDPLAY_LIBS="$SIDPLAY_LIBS -lresid-builder"
|
2010-04-17 12:54:47 +02:00
|
|
|
AC_DEFINE(ENABLE_SIDPLAY, 1, [Define for libsidplay2 support])
|
2016-07-29 15:31:02 +02:00
|
|
|
if test x$found_sidplayfp = xyes; then
|
|
|
|
AC_DEFINE(HAVE_SIDPLAYFP, 1, [Define if libsidplayfp is used instead of libsidplay2])
|
|
|
|
fi
|
2010-04-17 12:54:47 +02:00
|
|
|
fi
|
|
|
|
|
|
|
|
AM_CONDITIONAL(ENABLE_SIDPLAY, test x$enable_sidplay = xyes)
|
|
|
|
|
2010-04-17 12:55:52 +02:00
|
|
|
dnl --------------------------------- wavpack ---------------------------------
|
2014-11-21 22:19:57 +01:00
|
|
|
MPD_ENABLE_AUTO_PKG(wavpack, WAVPACK, [wavpack],
|
2010-04-17 12:55:52 +02:00
|
|
|
[WavPack decoder plugin], [libwavpack not found])
|
|
|
|
|
2010-04-17 12:57:05 +02:00
|
|
|
dnl --------------------------------- WildMidi --------------------------------
|
2014-12-09 21:07:05 +01:00
|
|
|
MPD_ENABLE_AUTO_LIB(wildmidi, WILDMIDI, WildMidi, WildMidi_Init, [-lWildMidi], [],
|
|
|
|
[WildMidi decoder plugin], [libwildmidi not found])
|
2010-04-17 12:55:52 +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
|
2014-01-12 21:40:29 +01:00
|
|
|
enable_shine_encoder=no
|
2010-04-26 15:49:12 +02:00
|
|
|
enable_wave_encoder=no
|
|
|
|
enable_flac_encoder=no
|
|
|
|
fi
|
|
|
|
|
|
|
|
dnl ------------------------------- FLAC Encoder ------------------------------
|
2014-12-21 23:25:48 +01:00
|
|
|
MPD_DEFINE_CONDITIONAL(enable_flac_encoder, ENABLE_FLAC_ENCODER,
|
|
|
|
[FLAC encoder plugin])
|
2010-04-26 15:49:12 +02:00
|
|
|
|
2014-01-12 21:40:29 +01:00
|
|
|
dnl ------------------------------- Shine Encoder ------------------------------
|
|
|
|
|
2014-11-21 22:19:57 +01:00
|
|
|
MPD_ENABLE_AUTO_PKG(shine_encoder, SHINE, [shine >= 3.1],
|
2014-01-12 21:40:29 +01:00
|
|
|
[shine encoder], [libshine not found])
|
|
|
|
|
2010-04-26 15:49:12 +02:00
|
|
|
dnl ---------------------------- Ogg Vorbis Encoder ---------------------------
|
2014-12-04 17:43:01 +01:00
|
|
|
MPD_ENABLE_AUTO_PKG(vorbis_encoder, VORBISENC, [vorbisenc vorbis ogg],
|
|
|
|
[Ogg Vorbis encoder], [libvorbisenc not found])
|
2010-04-26 15:49:12 +02:00
|
|
|
|
|
|
|
dnl ------------------------------- LAME Encoder ------------------------------
|
|
|
|
|
2014-12-09 21:07:05 +01:00
|
|
|
MPD_ENABLE_AUTO_LIB(lame_encoder, LAME, mp3lame, lame_init, [-lmp3lame], [],
|
|
|
|
[LAME encoder plugin], [libmp3lame not found])
|
2010-04-26 15:49:12 +02:00
|
|
|
|
|
|
|
dnl ----------------------------- TwoLAME Encoder -----------------------------
|
2014-11-21 22:19:57 +01:00
|
|
|
MPD_ENABLE_AUTO_PKG(twolame_encoder, TWOLAME, [twolame],
|
|
|
|
[TwoLAME encoder plugin], [libtwolame not found])
|
2010-04-26 15:49:12 +02:00
|
|
|
|
|
|
|
dnl ------------------------------- WAVE Encoder ------------------------------
|
2014-12-21 23:25:48 +01:00
|
|
|
MPD_DEFINE_CONDITIONAL(enable_wave_encoder, ENABLE_WAVE_ENCODER,
|
|
|
|
[PCM wave encoder plugin])
|
2010-04-26 15:49:12 +02:00
|
|
|
|
|
|
|
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 ||
|
2014-01-12 21:40:29 +01:00
|
|
|
test x$enable_shine_encoder != xno ||
|
2010-04-26 15:49:12 +02:00
|
|
|
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
|
|
|
|
|
2014-12-21 23:25:48 +01:00
|
|
|
MPD_DEFINE_CONDITIONAL(enable_encoder, ENABLE_ENCODER,
|
|
|
|
[the encoder plugins])
|
|
|
|
|
2010-04-17 20:20:52 +02:00
|
|
|
dnl ---------------------------------------------------------------------------
|
|
|
|
dnl Audio Output Plugins
|
|
|
|
dnl ---------------------------------------------------------------------------
|
|
|
|
|
|
|
|
dnl ----------------------------------- ALSA ----------------------------------
|
2014-11-21 22:19:57 +01:00
|
|
|
MPD_ENABLE_AUTO_PKG(alsa, ALSA, [alsa >= 0.9.0],
|
|
|
|
[ALSA output plugin], [libasound not found],
|
|
|
|
[$linux_auto])
|
2010-04-17 20:20:52 +02:00
|
|
|
|
2011-02-08 00:17:58 +01:00
|
|
|
dnl ----------------------------------- ROAR ----------------------------------
|
2014-11-21 22:19:57 +01:00
|
|
|
MPD_ENABLE_AUTO_PKG(roar, ROAR, [libroar >= 0.4.0],
|
|
|
|
[RoarAudio output plugin], [libroar not found])
|
2011-02-08 00:17:58 +01:00
|
|
|
|
2010-04-17 20:20:52 +02:00
|
|
|
dnl ----------------------------------- FIFO ----------------------------------
|
|
|
|
if test x$enable_fifo = xyes; then
|
|
|
|
AC_CHECK_FUNC([mkfifo],
|
2014-12-21 23:25:48 +01:00
|
|
|
[enable_fifo=yes],
|
2010-04-17 20:20:52 +02:00
|
|
|
[enable_fifo=no;AC_MSG_WARN([mkfifo not found -- disabling support for writing audio to a FIFO])])
|
|
|
|
fi
|
|
|
|
|
2014-12-21 23:25:48 +01:00
|
|
|
MPD_DEFINE_CONDITIONAL(enable_fifo, HAVE_FIFO,
|
|
|
|
[support for writing audio to a FIFO])
|
2010-04-17 20:20:52 +02:00
|
|
|
|
2016-06-21 19:28:41 +02:00
|
|
|
dnl ----------------------------------- SNDIO ----------------------------------
|
2016-12-26 13:23:07 +01:00
|
|
|
MPD_ENABLE_AUTO_HEADER([sndio], [SNDIO], [sndio.h],
|
|
|
|
[-lsndio], [],
|
|
|
|
[sndio output plugin],
|
|
|
|
[libsndio not found])
|
2016-06-21 19:28:41 +02:00
|
|
|
|
2015-09-17 22:18:16 +02:00
|
|
|
dnl ----------------------------------- Haiku ---------------------------------
|
2016-12-26 13:23:07 +01:00
|
|
|
MPD_ENABLE_AUTO_HEADER([haiku], [HAIKU], [media/MediaDefs.h],
|
|
|
|
[-lbe -lmedia], [],
|
|
|
|
[Haiku output plugin],
|
|
|
|
[Haiku headers not found])
|
2015-09-17 22:18:16 +02:00
|
|
|
|
2010-04-17 20:20:52 +02:00
|
|
|
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
|
|
|
|
|
2014-12-21 23:25:48 +01:00
|
|
|
MPD_DEFINE_CONDITIONAL(enable_httpd_output, ENABLE_HTTPD_OUTPUT,
|
|
|
|
[the HTTP server output])
|
2010-04-17 20:20:52 +02:00
|
|
|
|
|
|
|
dnl ----------------------------------- JACK ----------------------------------
|
2014-12-03 21:39:45 +01:00
|
|
|
MPD_ENABLE_AUTO_PKG(jack, JACK, [jack >= 0.100],
|
|
|
|
[JACK output plugin], [libjack not found])
|
2010-04-17 20:20:52 +02:00
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
dnl ---------------------------------- libao ----------------------------------
|
2014-12-03 21:39:45 +01:00
|
|
|
MPD_ENABLE_AUTO_PKG(ao, AO, [ao],
|
|
|
|
[libao output plugin], [libao not found])
|
2010-04-17 20:20:52 +02:00
|
|
|
|
|
|
|
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
|
|
|
|
|
2014-12-21 23:25:48 +01:00
|
|
|
MPD_DEFINE_CONDITIONAL(enable_openal, HAVE_OPENAL, [OpenAL support])
|
2010-04-17 20:20:52 +02:00
|
|
|
|
|
|
|
dnl ---------------------------- Open Sound System ----------------------------
|
|
|
|
if test x$enable_oss = xyes; then
|
|
|
|
AC_CHECK_HEADER(sys/soundcard.h,
|
2014-12-21 23:25:48 +01:00
|
|
|
[enable_oss=yes],
|
2010-04-17 20:20:52 +02:00
|
|
|
[AC_MSG_WARN(Soundcard headers not found -- disabling OSS support);
|
|
|
|
enable_oss=no])
|
|
|
|
fi
|
|
|
|
|
2014-12-21 23:25:48 +01:00
|
|
|
MPD_DEFINE_CONDITIONAL(enable_oss, HAVE_OSS, [Open Sound System])
|
2010-04-17 20:20:52 +02:00
|
|
|
|
|
|
|
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 -------------------------------
|
2014-12-21 23:25:48 +01:00
|
|
|
MPD_DEFINE_CONDITIONAL(enable_pipe_output, ENABLE_PIPE_OUTPUT,
|
|
|
|
[support for writing audio to a pipe])
|
2010-04-17 20:20:52 +02:00
|
|
|
|
|
|
|
dnl -------------------------------- PulseAudio -------------------------------
|
2014-11-21 22:19:57 +01:00
|
|
|
MPD_ENABLE_AUTO_PKG(pulse, PULSE, [libpulse >= 0.9.16],
|
2010-04-17 20:20:52 +02:00
|
|
|
[PulseAudio output plugin], [libpulse not found])
|
|
|
|
|
|
|
|
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
|
|
|
|
|
2014-12-21 23:25:48 +01:00
|
|
|
MPD_DEFINE_CONDITIONAL(enable_recorder_output, ENABLE_RECORDER_OUTPUT,
|
|
|
|
[the recorder output])
|
2010-04-17 20:20:52 +02:00
|
|
|
|
|
|
|
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
|
|
|
|
|
2014-12-21 23:25:48 +01:00
|
|
|
MPD_DEFINE_CONDITIONAL(enable_shout, HAVE_SHOUT,
|
|
|
|
[shoutcast output])
|
2010-04-17 20:20:52 +02:00
|
|
|
|
|
|
|
dnl --------------------------------- Solaris ---------------------------------
|
2011-09-19 07:39:27 +02:00
|
|
|
|
2014-12-21 23:25:48 +01:00
|
|
|
MPD_DEFINE_CONDITIONAL(enable_solaris_output, ENABLE_SOLARIS_OUTPUT,
|
|
|
|
[Solaris /dev/audio support])
|
2010-04-17 20:20:52 +02:00
|
|
|
|
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
|
|
|
|
2016-05-03 12:52:30 +02:00
|
|
|
dnl ---------------------------------------------------------------------------
|
|
|
|
dnl Option groups
|
|
|
|
dnl ---------------------------------------------------------------------------
|
|
|
|
|
|
|
|
have_ogg=no
|
2016-05-03 23:40:21 +02:00
|
|
|
if test x$enable_vorbis = xyes || test x$enable_tremor = xyes || test x$enable_opus = xyes || test x$enable_vorbis_encoder = xyes; then
|
2016-05-03 12:52:30 +02:00
|
|
|
have_ogg=yes
|
|
|
|
fi
|
|
|
|
|
|
|
|
have_xiph=no
|
2016-07-02 14:22:34 +02:00
|
|
|
if test x$have_ogg = xyes || test x$enable_flac = xyes || test x$enable_flac_encoder = xyes; then
|
2016-05-03 12:52:30 +02:00
|
|
|
have_xiph=yes
|
|
|
|
fi
|
|
|
|
|
2016-05-03 23:31:17 +02:00
|
|
|
if test x$have_ogg = xyes; then
|
|
|
|
PKG_CHECK_MODULES([OGG], [ogg],, [AC_MSG_ERROR([libogg not found])])
|
|
|
|
fi
|
|
|
|
|
2016-05-03 12:52:30 +02:00
|
|
|
AM_CONDITIONAL(HAVE_OGG, test x$have_ogg = xyes)
|
|
|
|
AM_CONDITIONAL(HAVE_XIPH, test x$have_xiph = xyes)
|
|
|
|
|
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)
|
2014-10-25 00:14:25 +02:00
|
|
|
if test x$XMLTO = x; then
|
|
|
|
AC_MSG_ERROR([xmlto not found])
|
|
|
|
fi
|
|
|
|
|
2008-11-20 08:59:55 +01:00
|
|
|
AC_SUBST(XMLTO)
|
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)
|
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])
|
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
|
|
|
|
2014-10-25 00:21:18 +02:00
|
|
|
printf '\nStorage support:\n\t'
|
|
|
|
results(nfs, [NFS])
|
|
|
|
results(smbclient, [SMB])
|
|
|
|
|
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])
|
2014-10-25 00:19:01 +02:00
|
|
|
results(dsd, [DSD])
|
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)
|
2016-06-21 19:28:41 +02:00
|
|
|
results(sndio,[SNDIO])
|
2010-04-17 20:02:41 +02:00
|
|
|
results(recorder_output,[File Recorder])
|
2015-09-17 22:18:16 +02:00
|
|
|
results(haiku,[Haiku])
|
2010-04-17 20:02:41 +02:00
|
|
|
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])
|
2014-01-12 21:40:29 +01:00
|
|
|
results(shine_encoder, [Shine])
|
2010-04-17 20:02:41 +02:00
|
|
|
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])
|
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)
|
2016-12-13 08:42:05 +01:00
|
|
|
AC_CONFIG_FILES(systemd/system/mpd.service)
|
2016-12-13 08:41:55 +01:00
|
|
|
AC_CONFIG_FILES(systemd/user/mpd.service)
|
2011-12-10 17:28:16 +01:00
|
|
|
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.'
|