2 AC_INIT(mpd, 0.16~git, musicpd-dev-team@lists.sourceforge.net)
3 AC_CONFIG_SRCDIR([src/main.c])
4 AM_INIT_AUTOMAKE([foreign 1.10 dist-bzip2 subdir-objects])
5 AM_CONFIG_HEADER(config.h)
6 AC_CONFIG_MACRO_DIR([m4])
8 AC_DEFINE(PROTOCOL_VERSION, "0.16.0", [The MPD protocol version])
11 dnl ---------------------------------------------------------------------------
13 dnl ---------------------------------------------------------------------------
18 if test x$CXX = xg++; then
19 # CXX=g++ probably means that autoconf hasn't found any C++
20 # compiler; to be sure, we check again
21 AC_PATH_PROG(CXX, $CXX, no)
22 if test x$CXX = xno; then
23 # no, we don't have C++ - the following hack is
24 # required because automake insists on using $(CXX)
25 # for linking the MPD binary
26 AC_MSG_NOTICE([Disabling C++ support])
36 dnl ---------------------------------------------------------------------------
38 dnl ---------------------------------------------------------------------------
39 AC_SUBST(AM_CFLAGS,"")
46 dnl ---------------------------------------------------------------------------
47 dnl OS Specific Defaults
48 dnl ---------------------------------------------------------------------------
53 MPD_LIBS="$MPD_LIBS -lws2_32"
57 if test -z "$prefix" || test "x$prefix" = xNONE; then
61 # aren't autotools supposed to be smart enough to figure this out? oh
62 # well, the git-core Makefile managed to do some of the work for us :)
65 local_lib='/sw/lib /opt/local/lib'
66 local_include='/sw/include /opt/local/include'
69 local_lib=/usr/local/lib
70 local_include=/usr/local/include
73 local_lib=/usr/pkg/lib
74 local_include=/usr/pkg/include
75 LDFLAGS="$LDFLAGS -Wl,-rpath,/usr/pkg/lib"
79 for d in $local_lib; do
81 LDFLAGS="$LDFLAGS -L$d"
85 for d in $local_include; do
93 dnl ---------------------------------------------------------------------------
94 dnl Header/Library Checks
95 dnl ---------------------------------------------------------------------------
96 AC_CHECK_FUNCS(daemon fork syslog)
97 if test $ac_cv_func_syslog = no; then
98 # syslog is not in the default libraries. See if it's in some other.
99 for lib in bsd socket inet; do
100 AC_CHECK_LIB($lib, syslog,
101 [AC_DEFINE(HAVE_SYSLOG)
102 LIBS="$LIBS -l$lib"; break])
106 AC_CHECK_LIB(socket,socket,MPD_LIBS="$MPD_LIBS -lsocket",)
107 AC_CHECK_LIB(nsl,gethostbyname,MPD_LIBS="$MPD_LIBS -lnsl",)
109 AC_CHECK_FUNCS(pipe2 accept4)
111 AC_CHECK_LIB(m,exp,MPD_LIBS="$MPD_LIBS -lm",)
113 AC_CHECK_HEADERS(locale.h)
114 AC_CHECK_HEADERS(valgrind/memcheck.h)
116 dnl ---------------------------------------------------------------------------
117 dnl Allow tools to be specifically built
118 dnl ---------------------------------------------------------------------------
120 AS_HELP_STRING([--enable-alsa], [enable ALSA support]),,
124 AS_HELP_STRING([--enable-ao],
125 [enable support for libao]),,
128 AC_ARG_ENABLE(audiofile,
129 AS_HELP_STRING([--enable-audiofile],
130 [enable audiofile support (WAV and others)]),,
131 enable_audiofile=auto)
134 AS_HELP_STRING([--enable-bzip2],
135 [enable bzip2 archive support (default: disabled)]),,
139 AS_HELP_STRING([--enable-cue],
140 [enable support for libcue support]),,
144 AS_HELP_STRING([--enable-curl],
145 [enable support for libcurl HTTP streaming (default: auto)]),,
149 AS_HELP_STRING([--enable-debug],
150 [enable debugging (default: disabled)]),,
153 AC_ARG_ENABLE(documentation,
154 AS_HELP_STRING([--enable-documentation],
155 [build documentation (default: disable)]),,
156 [enable_documentation=no])
158 AC_ARG_ENABLE(ffmpeg,
159 AS_HELP_STRING([--enable-ffmpeg],
160 [enable FFMPEG support]),,
164 AS_HELP_STRING([--disable-fifo],
165 [disable support for writing audio to a FIFO (default: enable)]),,
169 AS_HELP_STRING([--disable-flac],
170 [disable flac support (default: enable)]),,
173 AC_ARG_ENABLE(fluidsynth,
174 AS_HELP_STRING([--enable-fluidsynth],
175 [enable MIDI support via fluidsynth (default: disable)]),,
176 enable_fluidsynth=no)
179 AS_HELP_STRING([--enable-gprof],
180 [enable profiling via gprof (default: disabled)]),,
183 AC_ARG_ENABLE(httpd-output,
184 AS_HELP_STRING([--enable-httpd-output],
185 [enables the HTTP server output]),,
186 [enable_httpd_output=auto])
189 AS_HELP_STRING([--disable-id3],
190 [disable id3 support (default: enable)]),,
193 AC_ARG_ENABLE(inotify,
194 AS_HELP_STRING([--disable-inotify],
195 [disable support Inotify automatic database update (default: enabled) ]),,
196 [enable_inotify=yes])
199 AS_HELP_STRING([--disable-ipv6],
200 [disable IPv6 support (default: enable)]),,
203 AC_ARG_ENABLE(iso9660,
204 AS_HELP_STRING([--enable-iso9660],
205 [enable iso9660 archive support (default: disabled)]),,
209 AS_HELP_STRING([--enable-jack],
210 [enable jack support]),,
215 AC_ARG_ENABLE(lastfm,
216 AS_HELP_STRING([--enable-lastfm],
217 [enable support for last.fm radio (default: disable)]),,
220 AC_ARG_ENABLE(lame-encoder,
221 AS_HELP_STRING([--enable-lame-encoder],
222 [enable the LAME mp3 encoder]),,
223 enable_lame_encoder=auto)
225 AC_ARG_ENABLE([libwrap],
226 AS_HELP_STRING([--enable-libwrap], [use libwrap]),,
227 [enable_libwrap=auto])
230 AS_HELP_STRING([--enable-lsr],
231 [enable libsamplerate support]),,
235 AS_HELP_STRING([--enable-mad],
236 [enable libmad mp3 decoder plugin]),,
239 AC_ARG_ENABLE(mikmod,
240 AS_HELP_STRING([--enable-mikmod],
241 [enable the mikmod decoder (default: disable)]),,
245 AS_HELP_STRING([--enable-mms],
246 [enable the MMS protocol with libmms]),,
249 AC_ARG_ENABLE(modplug,
250 AS_HELP_STRING([--enable-modplug],
251 [enable modplug decoder plugin]),,
255 AS_HELP_STRING([--disable-mpc],
256 [disable musepack (MPC) support (default: enable)]),,
259 AC_ARG_ENABLE(mpg123,
260 AS_HELP_STRING([--enable-mpg123],
261 [enable libmpg123 decoder plugin]),,
265 AS_HELP_STRING([--enable-mvp],
266 [enable support for Hauppauge Media MVP (default: disable)]),,
269 AC_ARG_ENABLE(oggflac,
270 AS_HELP_STRING([--disable-oggflac],
271 [disable OggFLAC support (default: enable)]),,
274 AC_ARG_ENABLE(openal,
275 AS_HELP_STRING([--enable-openal],
276 [enable OpenAL support (default: disable)]),,
280 AS_HELP_STRING([--disable-oss],
281 [disable OSS support (default: enable)]),,
284 AC_ARG_ENABLE(pipe-output,
285 AS_HELP_STRING([--enable-pipe-output],
286 [enable support for writing audio to a pipe (default: disable)]),,
287 enable_pipe_output=no)
290 AS_HELP_STRING([--enable-pulse],
291 [enable support for the PulseAudio sound server]),,
294 AC_ARG_ENABLE(recorder-output,
295 AS_HELP_STRING([--enable-recorder-output],
296 [enables the recorder file output plugin (default: disable)]),,
297 [enable_recorder_output=auto])
299 AC_ARG_ENABLE(sidplay,
300 AS_HELP_STRING([--enable-sidplay],
301 [enable C64 SID support via libsidplay2]),,
306 AS_HELP_STRING([--enable-shout],
307 [enables the shoutcast streaming output]),,
310 AC_ARG_ENABLE(sndfile,
311 AS_HELP_STRING([--enable-sndfile],
312 [enable sndfile support]),,
315 AC_ARG_ENABLE(sqlite,
316 AS_HELP_STRING([--enable-sqlite],
317 [enable support for the SQLite database]),,
318 [enable_sqlite=auto])
321 AS_HELP_STRING([--disable-tcp],
322 [disable support for clients connecting via TCP (default: enable)]),,
326 AS_HELP_STRING([--enable-test],
327 [build the test programs (default: disabled)]),,
331 AS_HELP_STRING([--with-tremor=PFX],
332 [use Tremor (vorbisidec) integer Ogg Vorbis decoder (with optional prefix)]),,
335 AC_ARG_ENABLE(twolame-encoder,
336 AS_HELP_STRING([--enable-twolame-encoder],
337 [enable the TwoLAME mp2 encoder]),,
338 enable_twolame_encoder=auto)
341 AS_HELP_STRING([--disable-un],
342 [disable support for clients connecting via unix domain sockets (default: enable)]),,
345 AC_ARG_ENABLE(vorbis,
346 AS_HELP_STRING([--disable-vorbis],
347 [disable Ogg Vorbis support (default: enable)]),,
350 AC_ARG_ENABLE(vorbis-encoder,
351 AS_HELP_STRING([--enable-vorbis-encoder],
352 [enable the Ogg Vorbis encoder]),,
353 [enable_vorbis_encoder=auto])
355 AC_ARG_ENABLE(wave-encoder,
356 AS_HELP_STRING([--enable-wave-encoder],
357 [enable the PCM wave encoder]),,
358 enable_wave_encoder=yes)
360 AC_ARG_ENABLE(wavpack,
361 AS_HELP_STRING([--enable-wavpack],
362 [enable WavPack support]),,
365 AC_ARG_ENABLE(werror,
366 AS_HELP_STRING([--enable-werror],
367 [treat warnings as errors (default: disabled)]),,
370 AC_ARG_ENABLE(wildmidi,
371 AS_HELP_STRING([--enable-wildmidi],
372 [enable MIDI support via wildmidi (default: disable)]),,
375 AC_ARG_WITH(zeroconf,
376 AS_HELP_STRING([--with-zeroconf=@<:@auto|avahi|bonjour|no@:>@],
377 [enable zeroconf backend (default=auto)]),,
378 with_zeroconf="auto")
381 AS_HELP_STRING([--enable-zzip],
382 [enable zip archive support (default: disabled)]),,
386 AC_ARG_WITH(tremor-libraries,
387 AS_HELP_STRING([--with-tremor-libraries=DIR],
388 [directory where Tremor library is installed (optional)]),,
391 AC_ARG_WITH(tremor-includes,
392 AS_HELP_STRING([--with-tremor-includes=DIR],
393 [directory where Tremor header files are installed (optional)]),,
396 dnl ---------------------------------------------------------------------------
397 dnl Mandatory Libraries
398 dnl ---------------------------------------------------------------------------
399 PKG_CHECK_MODULES([GLIB], [glib-2.0 >= 2.12 gthread-2.0],,
400 [AC_MSG_ERROR([GLib 2.12 is required])])
402 dnl ---------------------------------------------------------------------------
404 dnl ---------------------------------------------------------------------------
406 if test x$enable_tcp = xno; then
407 # if we don't support TCP, we don't need IPv6 either
411 if test x$enable_ipv6 = xyes; then
412 AC_MSG_CHECKING(for ipv6)
413 AC_EGREP_CPP([AP_maGiC_VALUE],
415 #include <sys/types.h>
416 #include <sys/socket.h>
424 AC_DEFINE(HAVE_IPV6, 1, [Define if IPv6 support present])
425 AC_MSG_RESULT([yes]),
430 if test x$enable_tcp = xyes; then
431 AC_DEFINE(HAVE_TCP, 1, [Define if TCP socket support is enabled])
440 if test x$enable_un = xyes; then
441 AC_DEFINE(HAVE_UN, 1, [Define if unix domain socket support is enabled])
445 dnl ---------------------------------------------------------------------------
447 dnl ---------------------------------------------------------------------------
448 if test x$enable_largefile != xno; then
449 AC_DEFINE([ENABLE_LARGEFILE], 1, [Define if large file support is enabled])
452 dnl ---------------------------------------------------------------------------
453 dnl Miscellaneous Libraries
454 dnl ---------------------------------------------------------------------------
456 dnl --------------------------------- inotify ---------------------------------
457 AC_CHECK_FUNCS(inotify_init inotify_init1)
459 if test x$ac_cv_func_inotify_init = xno; then
463 if test x$enable_inotify = xyes; then
464 AC_DEFINE([ENABLE_INOTIFY], 1, [Define to enable inotify support])
466 AM_CONDITIONAL(ENABLE_INOTIFY, test x$enable_inotify = xyes)
468 dnl --------------------------------- libwrap ---------------------------------
469 if test x$enable_libwrap != xno; then
470 AC_CHECK_LIBWRAP(found_libwrap=yes, found_libwrap=no)
471 MPD_AUTO_RESULT(libwrap, libwrap, [libwrap not found])
474 if test x$enable_libwrap = xyes; then
475 AC_SUBST(LIBWRAP_CFLAGS)
476 AC_SUBST(LIBWRAP_LDFLAGS)
477 AC_DEFINE(HAVE_LIBWRAP, 1, [define to enable libwrap library])
480 dnl ---------------------------------------------------------------------------
482 dnl ---------------------------------------------------------------------------
484 dnl ---------------------------------- libcue ---------------------------------
485 MPD_AUTO_PKG(cue, CUE, [libcue],
486 [libcue parsing library], [libcue not found])
487 if test x$enable_cue = xyes; then
488 AC_DEFINE([HAVE_CUE], 1,
489 [Define to enable libcue support])
492 AM_CONDITIONAL(HAVE_CUE, test x$enable_cue = xyes)
494 dnl -------------------------------- libid3tag --------------------------------
495 if test x$enable_id3 = xyes; then
496 PKG_CHECK_MODULES([ID3TAG], [id3tag],,
497 AC_CHECK_LIB(id3tag, id3_file_open,
498 [ID3TAG_LIBS="-lid3tag -lz" ID3TAG_CFLAGS=""],
502 if test x$enable_id3 = xyes; then
503 AC_DEFINE(HAVE_ID3TAG, 1, [Define to use id3tag])
506 AM_CONDITIONAL(HAVE_ID3TAG, test x$enable_id3 = xyes)
508 dnl ---------------------------------------------------------------------------
510 dnl ---------------------------------------------------------------------------
512 dnl --------------------------------- zeroconf --------------------------------
514 case $with_zeroconf in
522 if test x$with_zeroconf != xno; then
523 if test x$with_zeroconf = xavahi || test x$with_zeroconf = xauto; then
524 PKG_CHECK_MODULES([AVAHI], [avahi-client avahi-glib],
525 [found_avahi=1;AC_DEFINE([HAVE_AVAHI], 1, [Define to enable Avahi Zeroconf support])]
526 MPD_LIBS="$MPD_LIBS $AVAHI_LIBS" MPD_CFLAGS="$MPD_CFLAGS $AVAHI_CFLAGS",
530 if test x$found_avahi = x1; then
532 elif test x$with_zeroconf = xavahi; then
533 AC_MSG_ERROR([Avahi support requested but not found])
536 if test x$with_zeroconf = xbonjour || test x$with_zeroconf = xauto; then
537 AC_CHECK_HEADER(dns_sd.h,
538 [found_bonjour=1;AC_DEFINE([HAVE_BONJOUR], 1, [Define to enable Bonjour Zeroconf support])],
540 AC_CHECK_LIB(dns_sd, DNSServiceRegister,
541 MPD_LIBS="$MPD_LIBS -ldns_sd")
544 if test x$found_bonjour = x1; then
545 with_zeroconf=bonjour
546 elif test x$with_zeroconf = xbonjour; then
547 AC_MSG_ERROR([Bonjour support requested but not found])
550 if test x$with_zeroconf = xauto; then
551 AC_MSG_WARN([No supported Zeroconf backend found, disabling Zeroconf])
554 AC_DEFINE([HAVE_ZEROCONF], 1, [Define to enable Zeroconf support])
558 AM_CONDITIONAL(HAVE_ZEROCONF, test x$with_zeroconf != xno)
559 AM_CONDITIONAL(HAVE_AVAHI, test x$with_zeroconf = xavahi)
560 AM_CONDITIONAL(HAVE_BONJOUR, test x$with_zeroconf = xbonjour)
562 dnl ---------------------------------------------------------------------------
564 dnl ---------------------------------------------------------------------------
566 dnl ---------------------------------- sqlite ---------------------------------
568 MPD_AUTO_PKG(sqlite, SQLITE, [sqlite3],
569 [SQLite database support], [sqlite not found])
570 if test x$enable_sqlite = xyes; then
571 AC_DEFINE([ENABLE_SQLITE], 1, [Define to enable sqlite database support])
574 AM_CONDITIONAL(ENABLE_SQLITE, test x$enable_sqlite = xyes)
576 dnl ---------------------------------------------------------------------------
577 dnl Converter Plugins
578 dnl ---------------------------------------------------------------------------
580 dnl ------------------------------ libsamplerate ------------------------------
581 MPD_AUTO_PKG(lsr, SAMPLERATE, [samplerate >= 0.0.15],
582 [libsamplerate resampling], [libsamplerate not found])
583 if test x$enable_lsr = xyes; then
584 AC_DEFINE([HAVE_LIBSAMPLERATE], 1,
585 [Define to enable libsamplerate])
588 if test x$enable_lsr = xyes; then
589 PKG_CHECK_MODULES([SAMPLERATE_013],
590 [samplerate >= 0.1.3],,
591 [AC_DEFINE([HAVE_LIBSAMPLERATE_NOINT], 1,
592 [libsamplerate doesn't provide src_int_to_float_array() (<0.1.3)])])
595 AM_CONDITIONAL(HAVE_LIBSAMPLERATE, test x$enable_lsr = xyes)
597 dnl ---------------------------------------------------------------------------
599 dnl ---------------------------------------------------------------------------
601 dnl ----------------------------------- CURL ----------------------------------
602 MPD_AUTO_PKG(curl, CURL, [libcurl],
603 [libcurl HTTP streaming], [libcurl not found])
604 if test x$enable_curl = xyes; then
605 AC_DEFINE(ENABLE_CURL, 1, [Define when libcurl is used for HTTP streaming])
607 AM_CONDITIONAL(ENABLE_CURL, test x$enable_curl = xyes)
609 dnl --------------------------------- Last.FM ---------------------------------
610 if test x$enable_lastfm = xyes; then
611 if test x$enable_curl != xyes; then
612 AC_MSG_ERROR([Cannot enable last.fm radio without curl])
615 AC_DEFINE(ENABLE_LASTFM, 1, [Define when last.fm radio is enabled])
617 AM_CONDITIONAL(ENABLE_LASTFM, test x$enable_lastfm = xyes)
619 dnl ---------------------------------- libmms ---------------------------------
620 MPD_AUTO_PKG(mms, MMS, [libmms >= 0.4],
621 [libmms mms:// protocol support], [libmms not found])
622 if test x$enable_mms = xyes; then
623 AC_DEFINE(ENABLE_MMS, 1,
624 [Define when libmms is used for the MMS protocol])
626 AM_CONDITIONAL(ENABLE_MMS, test x$enable_mms = xyes)
628 dnl ---------------------------------------------------------------------------
630 dnl ---------------------------------------------------------------------------
632 dnl --------------------------------- iso9660 ---------------------------------
633 MPD_AUTO_PKG(iso9660, ISO9660, [libiso9660],
634 [libiso9660 archive library], [libiso9660 not found])
636 AM_CONDITIONAL(HAVE_ISO9660, test x$enable_iso9660 = xyes)
637 if test x$enable_iso9660 = xyes; then
638 AC_DEFINE(HAVE_ISO9660, 1, [Define to have ISO9660 archive support])
640 AC_PATH_PROG(MKISOFS, mkisofs, no)
645 AM_CONDITIONAL(ENABLE_ISO9660_TEST, test x$MKISOFS != xno)
647 dnl ---------------------------------- libbz2 ---------------------------------
648 if test x$enable_bzip2 = xyes; then
649 AC_CHECK_LIB(bz2, BZ2_bzDecompressInit,
650 [MPD_LIBS="$MPD_LIBS -lbz2"],
651 [AC_MSG_ERROR([libbz2 not found])])
654 AM_CONDITIONAL(HAVE_BZ2, test x$enable_bzip2 = xyes)
655 if test x$enable_bzip2 = xyes; then
656 AC_DEFINE(HAVE_BZ2, 1, [Define to have bz2 archive support])
658 AC_PATH_PROG(BZIP2, bzip2, no)
663 AM_CONDITIONAL(ENABLE_BZIP2_TEST, test x$BZIP2 != xno)
665 dnl --------------------------------- libzzip ---------------------------------
666 MPD_AUTO_PKG(zzip, ZZIP, [zziplib >= 0.13],
667 [libzzip archive library], [libzzip not found])
669 AM_CONDITIONAL(HAVE_ZZIP, test x$enable_zzip = xyes)
670 if test x$enable_zzip = xyes; then
671 AC_DEFINE(HAVE_ZZIP, 1, [Define to have zip archive support])
673 AC_PATH_PROG(ZIP, zip, no)
678 AM_CONDITIONAL(ENABLE_ZZIP_TEST, test x$ZIP != xno)
680 dnl ------------------------------- Archive API -------------------------------
682 test x$enable_bzip2 = xyes ||
683 test x$enable_zzip = xyes ||
684 test x$enable_iso9660 = xyes; then
686 AC_DEFINE(ENABLE_ARCHIVE, 1, [The archive API is available])
691 AM_CONDITIONAL(ENABLE_ARCHIVE, test x$enable_archive = xyes)
703 MPD_AUTO_PKG(audiofile, AUDIOFILE, [audiofile >= 0.1.7],
704 [audiofile decoder plugin], [libaudiofile not found])
705 AM_CONDITIONAL(HAVE_AUDIOFILE, test x$enable_audiofile = xyes)
706 if test x$enable_audiofile = xyes; then
707 AC_DEFINE(HAVE_AUDIOFILE, 1, [Define for audiofile support])
714 MPD_AUTO_PKG(mad, MAD, [mad],
715 [libmad MP3 decoder plugin], [libmad not found])
716 if test x$enable_mad = xyes; then
717 AC_DEFINE(HAVE_MAD, 1, [Define to use libmad])
719 AM_CONDITIONAL(HAVE_MAD, test x$enable_mad = xyes)
721 MPD_AUTO_PKG(mpg123, MPG123, [libmpg123],
722 [libmpg123 decoder plugin], [libmpg123 not found])
723 if test x$enable_mpg123 = xyes; then
724 AC_DEFINE(HAVE_MPG123, 1, [Define to use libmpg123])
726 AM_CONDITIONAL(HAVE_MPG123, test x$enable_mpg123 = xyes)
728 if test x$enable_mikmod = xyes; then
729 AC_PATH_PROG(LIBMIKMOD_CONFIG, libmikmod-config)
730 if test x$LIBMIKMOD_CONFIG != x ; then
731 AC_SUBST(LIBMIKMOD_CFLAGS, `$LIBMIKMOD_CONFIG --cflags`)
732 AC_SUBST(LIBMIKMOD_LIBS, `$LIBMIKMOD_CONFIG --libs`)
733 AC_DEFINE(ENABLE_MIKMOD_DECODER, 1, [Define for mikmod support])
739 AM_CONDITIONAL(ENABLE_MIKMOD_DECODER, test x$enable_mikmod = xyes)
741 found_modplug=$HAVE_CXX
742 MPD_AUTO_PRE(modplug, [modplug decoder plugin], [No C++ compiler found])
744 MPD_AUTO_PKG(modplug, MODPLUG, [libmodplug],
745 [modplug decoder plugin], [libmodplug not found])
746 AM_CONDITIONAL(HAVE_MODPLUG, test x$enable_modplug = xyes)
747 if test x$enable_modplug = xyes; then
748 AC_DEFINE(HAVE_MODPLUG, 1, [Define for modplug support])
752 AS_HELP_STRING([--enable-gme],
753 [enable Blargg's game music emulator plugin]),,
756 MPD_AUTO_PKG(gme, GME, [libgme],
757 [gme decoder plugin], [libgme not found])
758 AM_CONDITIONAL(HAVE_GME, test x$enable_gme = xyes)
759 if test x$enable_gme = xyes; then
760 AC_DEFINE(HAVE_GME, 1, [Define for gme support])
764 AS_HELP_STRING([--disable-mpc],
765 [disable musepack (MPC) support (default: enable)]),,
768 AC_ARG_ENABLE(oggflac,
769 AS_HELP_STRING([--disable-oggflac],
770 [disable OggFLAC support (default: enable)]),,
773 AC_ARG_ENABLE(vorbis,
774 AS_HELP_STRING([--disable-vorbis],
775 [disable Ogg Vorbis support (default: enable)]),,
778 AC_ARG_ENABLE(sndfile,
779 AS_HELP_STRING([--enable-sndfile],
780 [enable sndfile support]),,
783 if test x$enable_sndfile = xauto && test x$enable_modplug = xyes; then
784 dnl If modplug is enabled, enable sndfile only if explicitly
785 dnl requested - modplug's modplug/sndfile.h is known to
786 dnl conflict with libsndfile's sndfile.h.
787 AC_MSG_NOTICE([disabling libsndfile auto-detection, because the modplug decoder is enabled])
791 MPD_AUTO_PKG(sndfile, SNDFILE, [sndfile],
792 [libsndfile decoder plugin], [libsndfile not found])
793 AM_CONDITIONAL(ENABLE_SNDFILE, test x$enable_sndfile = xyes)
794 if test x$enable_sndfile = xyes; then
795 AC_DEFINE(ENABLE_SNDFILE, 1, [Define to enable the sndfile decoder plugin])
803 if test x$with_tremor = xyes || test x$with_tremor = xno; then
804 use_tremor="$with_tremor"
806 tremor_prefix="$with_tremor"
810 found_sidplay=$HAVE_CXX
811 MPD_AUTO_PRE(sidplay, [sidplay decoder plugin], [No C++ compiler found])
813 if test x$enable_sidplay != xno; then
814 # we're not using pkg-config here
815 # because libsidplay2's .pc file requires libtool
816 AC_HAVE_LIBRARY(sidplay2, [found_sidplay=yes], [found_sidplay=no])
817 MPD_AUTO_PRE(sidplay, [sidplay decoder plugin],
818 [libsidplay2 not found])
821 if test x$enable_sidplay != xno; then
822 # can't use AC_HAVE_LIBRARY here, because the dash in the
823 # library name triggers an autoconf bug
824 AC_CHECK_LIB(resid-builder, main,
825 [found_sidplay=yes], [found_sidplay=no])
827 if test x$found_sidplay = xyes; then
828 AC_HAVE_LIBRARY(sidutils,, [found_sidplay=no])
831 MPD_AUTO_RESULT(sidplay, [sidplay decoder plugin],
832 [libresid-builder or libsidutils not found])
835 if test x$enable_sidplay = xyes; then
836 AC_SUBST(SIDPLAY_LIBS,"-lsidplay2 -lresid-builder -lsidutils")
837 AC_SUBST(SIDPLAY_CFLAGS,)
839 AC_DEFINE(ENABLE_SIDPLAY, 1, [Define for libsidplay2 support])
842 AM_CONDITIONAL(ENABLE_SIDPLAY, test x$enable_sidplay = xyes)
844 MPD_AUTO_PKG(wavpack, WAVPACK, [wavpack],
845 [WavPack decoder plugin], [libwavpack not found])
846 AM_CONDITIONAL(HAVE_WAVPACK, test x$enable_wavpack = xyes)
847 if test x$enable_wavpack = xyes; then
848 AC_DEFINE([HAVE_WAVPACK], 1, [Define to enable WavPack support])
853 dnl ---------------------------------------------------------------------------
854 dnl Encoders for Streaming Audio Output Plugins
855 dnl ---------------------------------------------------------------------------
857 dnl ---------------------------------------------------------------------------
858 dnl Audio Output Plugins (Nonstreaming)
859 dnl ---------------------------------------------------------------------------
861 dnl ----------------------------------- ALSA ----------------------------------
862 MPD_AUTO_PKG(alsa, ALSA, [alsa >= 0.9.0],
863 [ALSA output plugin], [libasound not found])
865 if test x$enable_alsa = xyes; then
866 AC_DEFINE(HAVE_ALSA, 1, [Define to enable ALSA support])
869 AM_CONDITIONAL(HAVE_ALSA, test x$enable_alsa = xyes)
871 dnl ----------------------------------- FIFO ----------------------------------
872 if test x$enable_fifo = xyes; then
873 AC_CHECK_FUNC([mkfifo],
874 [enable_fifo=yes;AC_DEFINE([HAVE_FIFO], 1,
875 [Define to enable support for writing audio to a FIFO])],
876 [enable_fifo=no;AC_MSG_WARN([mkfifo not found -- disabling support for writing audio to a FIFO])])
879 AM_CONDITIONAL(HAVE_FIFO, test x$enable_fifo = xyes)
881 dnl ----------------------------------- JACK ----------------------------------
882 MPD_AUTO_PKG(jack, JACK, [jack >= 0.100],
883 [JACK output plugin], [libjack not found])
884 if test x$enable_jack = xyes; then
885 AC_DEFINE([HAVE_JACK], 1, [Define to enable JACK support])
888 if test x$enable_jack = xyes; then
889 # check whether jack_set_info_function() is available
891 LIBS="$LIBS $JACK_LIBS"
893 AC_CHECK_FUNCS(jack_set_info_function)
898 AM_CONDITIONAL(HAVE_JACK, test x$enable_jack = xyes)
900 dnl ---------------------------------- libao ----------------------------------
901 MPD_AUTO_PKG(ao, AO, [ao],
902 [libao output plugin], [libao not found])
903 if test x$enable_ao = xyes; then
904 AC_DEFINE(HAVE_AO, 1, [Define to play with ao])
907 AM_CONDITIONAL(HAVE_AO, test x$enable_ao = xyes)
909 dnl ---------------------------------- OpenAL ---------------------------------
910 AC_SUBST(OPENAL_CFLAGS,"")
911 AC_SUBST(OPENAL_LIBS,"")
913 if test x$enable_openal = xyes; then
914 if test x$enable_osx = xyes; then
915 AC_CHECK_HEADERS([OpenAL/al.h OpenAL/alc.h], [], [enable_openal=no])
916 if test x$enable_openal = xyes; then
917 OPENAL_LIBS="-framework OpenAL"
918 AC_DEFINE(HAVE_OPENAL, 1, [Define for OpenAL support])
920 AC_MSG_WARN(OpenAL headers not found -- disabling OpenAL support)
923 PKG_CHECK_MODULES([OPENAL], [openal],
924 AC_DEFINE(HAVE_OPENAL, 1, [Define for OpenAL support]),
929 AM_CONDITIONAL(HAVE_OPENAL, test x$enable_openal = xyes)
931 dnl ---------------------------- Open Sound System ----------------------------
932 if test x$enable_oss = xyes; then
933 AC_CHECK_HEADER(sys/soundcard.h,
934 [enable_oss=yes;AC_DEFINE(HAVE_OSS,1,[Define to enable OSS])],
935 [AC_MSG_WARN(Soundcard headers not found -- disabling OSS support);
939 AM_CONDITIONAL(HAVE_OSS, test x$enable_oss = xyes)
941 dnl ----------------------------------- OSX -----------------------------------
945 AC_DEFINE(HAVE_OSX, 1, [Define for compiling OS X support])
946 MPD_LIBS="$MPD_LIBS -framework AudioUnit -framework CoreServices"
950 AM_CONDITIONAL(HAVE_OSX, test x$enable_osx = xyes)
952 dnl ------------------------------- Pipe Output -------------------------------
953 if test x$enable_pipe_output = xyes; then
954 AC_DEFINE([ENABLE_PIPE_OUTPUT], 1,
955 [Define to enable support for writing audio to a pipe])
957 AM_CONDITIONAL(ENABLE_PIPE_OUTPUT, test x$enable_pipe_output = xyes)
959 dnl -------------------------------- PulseAudio -------------------------------
960 MPD_AUTO_PKG(pulse, PULSE, [libpulse],
961 [PulseAudio output plugin], [libpulse not found])
962 if test x$enable_pulse = xyes; then
963 AC_DEFINE([HAVE_PULSE], 1,
964 [Define to enable PulseAudio support])
967 AM_CONDITIONAL(HAVE_PULSE, test x$enable_pulse = xyes)
971 enable_shout2="$enable_shout"
972 MPD_AUTO_PKG(shout, SHOUT, [shout],
973 [shout output plugin], [libshout not found])
974 if test x$enable_shout = xyes && test x$enable_shout2 = xauto; then
980 AC_DEFINE(ENABLE_SOLARIS_OUTPUT, 1, [Define to enable Solaris /dev/audio support])
981 enable_solaris_output=yes
985 enable_solaris_output=no
989 AM_CONDITIONAL(ENABLE_SOLARIS_OUTPUT, test x$enable_solaris_output = xyes)
997 if test x$enable_mvp = xyes; then
998 AC_DEFINE(HAVE_MVP,1,[Define to enable Hauppauge Media MVP support])
1001 AM_CONDITIONAL(HAVE_MVP, test x$enable_mvp = xyes)
1003 if test x$enable_mpc = xyes; then
1004 if test "x$mpcdec_libraries" != "x" ; then
1005 MPCDEC_LIBS="-L$mpcdec_libraries"
1006 elif test "x$mpcdec_prefix" != "x" ; then
1007 MPCDEC_LIBS="-L$mpcdec_prefix/lib"
1010 MPCDEC_LIBS="$MPCDEC_LIBS -lmpcdec"
1012 if test "x$mpcdec_includes" != "x" ; then
1013 MPCDEC_CFLAGS="-I$mpcdec_includes"
1014 elif test "x$mpcdec_prefix" != "x" ; then
1015 MPCDEC_CFLAGS="-I$mpcdec_prefix/include"
1020 oldcppflags=$CPPFLAGS
1021 CFLAGS="$CFLAGS $MPD_CFLAGS $MPCDEC_CFLAGS -I."
1022 LIBS="$LIBS $MPD_LIBS $MPCDEC_LIBS"
1024 AC_CHECK_HEADER(mpc/mpcdec.h,
1026 [AC_CHECK_HEADER(mpcdec/mpcdec.h,
1029 if test x$enable_mpc = xyes; then
1030 AC_CHECK_LIB(mpcdec,main,
1031 [MPD_LIBS="$MPD_LIBS $MPCDEC_LIBS";
1032 MPD_CFLAGS="$MPD_CFLAGS $MPCDEC_CFLAGS";],
1035 if test x$enable_mpc = xyes; then
1036 AC_DEFINE(HAVE_MPCDEC,1,
1037 [Define to use libmpcdec for MPC decoding])
1038 if test x$old_mpcdec = xyes; then
1039 AC_DEFINE(MPC_IS_OLD_API, 1,
1040 [Define if an old pre-SV8 libmpcdec is used])
1043 AC_MSG_WARN([mpcdec lib needed for MPC support -- disabling MPC support])
1047 CPPFLAGS=$oldcppflags
1050 AM_CONDITIONAL(HAVE_MPCDEC, test x$enable_mpc = xyes)
1054 AM_CONDITIONAL(HAVE_FAAD, test x$enable_aac = xyes)
1056 AM_CONDITIONAL(HAVE_MP4, test x$enable_mp4 = xyes)
1058 if test x$use_tremor = xyes; then
1059 if test "x$tremor_libraries" != "x" ; then
1060 TREMOR_LIBS="-L$tremor_libraries"
1061 elif test "x$tremor_prefix" != "x" ; then
1062 TREMOR_LIBS="-L$tremor_prefix/lib"
1064 TREMOR_LIBS="$TREMOR_LIBS -lvorbisidec"
1065 if test "x$tremor_includes" != "x" ; then
1066 TREMOR_CFLAGS="-I$tremor_includes"
1067 elif test "x$tremor_prefix" != "x" ; then
1068 TREMOR_CFLAGS="-I$tremor_prefix/include"
1070 ac_save_CFLAGS="$CFLAGS"
1071 ac_save_LIBS="$LIBS"
1072 CFLAGS="$CFLAGS $TREMOR_CFLAGS"
1073 LIBS="$LIBS $TREMOR_LIBS"
1074 AC_CHECK_LIB(vorbisidec,ov_read,enable_vorbis=yes,enable_vorbis=no;
1075 AC_MSG_WARN([vorbisidec lib needed for ogg support with tremor -- disabling ogg support]))
1076 CFLAGS="$ac_save_CFLAGS"
1077 LIBS="$ac_save_LIBS"
1078 if test x$enable_vorbis = xyes; then
1079 AC_DEFINE(ENABLE_VORBIS_DECODER, 1, [Define for Ogg Vorbis support])
1081 elif test x$enable_vorbis = xyes; then
1082 PKG_CHECK_MODULES(VORBIS, [ogg vorbis vorbisfile],
1083 AC_DEFINE(ENABLE_VORBIS_DECODER, 1, [Define for Ogg Vorbis support]),
1087 AM_CONDITIONAL(ENABLE_VORBIS_DECODER, test x$enable_vorbis = xyes)
1089 if test x$use_tremor = xyes; then
1090 AC_DEFINE(HAVE_TREMOR,1,
1091 [Define to use tremor (libvorbisidec) for ogg support])
1092 if test x$enable_oggflac = xyes; then
1093 AC_MSG_WARN([disabling OggFLAC support because it is incompatible with tremor])
1098 AC_SUBST(TREMOR_CFLAGS)
1099 AC_SUBST(TREMOR_LIBS)
1101 if test x$enable_flac = xyes; then
1102 PKG_CHECK_MODULES(FLAC, [flac >= 1.1],
1103 AC_DEFINE(HAVE_FLAC, 1, [Define for FLAC support]),
1108 CFLAGS="$CFLAGS $FLAC_CFLAGS"
1109 LIBS="$LIBS $FLAC_LIBS"
1110 if test x$enable_flac = xyes && test x$enable_oggflac = xyes; then
1111 AC_CHECK_DECL(FLAC_API_SUPPORTS_OGG_FLAC,
1112 [enable_oggflac=flac], [],
1113 [#include <FLAC/export.h>])
1119 AM_CONDITIONAL(HAVE_FLAC, test x$enable_flac = xyes)
1121 enable_flac_encoder=$enable_flac
1123 if test x$enable_oggflac = xyes; then
1124 oldmpdcflags="$MPD_CFLAGS"
1125 oldmpdlibs="$MPD_LIBS"
1126 AM_PATH_LIBOGGFLAC(MPD_LIBS="$MPD_LIBS $LIBOGGFLAC_LIBS"
1127 MPD_CFLAGS="$MPD_CFLAGS $LIBOGGFLAC_CFLAGS",
1131 if test x$enable_oggflac = xyes; then
1132 AC_DEFINE(HAVE_OGGFLAC,1,[Define for OggFLAC support])
1135 AM_CONDITIONAL(HAVE_OGGFLAC, test x$enable_oggflac = xyes)
1137 AM_CONDITIONAL(HAVE_FLAC_COMMON,
1138 test x$enable_flac = xyes || test x$enable_oggflac = xyes)
1139 AM_CONDITIONAL(HAVE_OGG_COMMON,
1140 test x$enable_vorbis = xyes || test x$enable_oggflac = xyes || test x$enable_flac = xyes)
1142 MPD_AUTO_PKG(ffmpeg, FFMPEG, [libavformat libavcodec libavutil],
1143 [ffmpeg decoder library], [libavformat+libavcodec+libavutil not found])
1145 if test x$enable_ffmpeg = xyes; then
1147 LIBS="$LIBS $FFMPEG_LIBS"
1148 AC_CHECK_LIB(avcodec, avcodec_decode_audio2,,
1153 if test x$enable_ffmpeg = xyes; then
1154 # prior to ffmpeg svn12865, you had to specify include files
1155 # without path prefix
1156 old_CPPCFLAGS=$CPPFLAGS
1157 CPPFLAGS="$CPPFLAGS $FFMPEG_CFLAGS"
1158 AC_CHECK_HEADER(libavcodec/avcodec.h,,
1159 AC_DEFINE(OLD_FFMPEG_INCLUDES, 1,
1160 [Define if avcodec.h instead of libavcodec/avcodec.h should be included]))
1161 CPPCFLAGS=$old_CPPFLAGS
1164 if test x$enable_ffmpeg = xyes; then
1165 AC_DEFINE(HAVE_FFMPEG, 1, [Define for FFMPEG support])
1168 AM_CONDITIONAL(HAVE_FFMPEG, test x$enable_ffmpeg = xyes)
1170 if test x$enable_fluidsynth = xyes; then
1171 PKG_CHECK_MODULES(FLUIDSYNTH, [fluidsynth],
1172 AC_DEFINE(ENABLE_FLUIDSYNTH, 1, [Define for fluidsynth support]),
1173 enable_fluidsynth=no)
1176 AM_CONDITIONAL(ENABLE_FLUIDSYNTH, test x$enable_fluidsynth = xyes)
1178 if test x$enable_wildmidi = xyes; then
1181 oldcppflags=$CPPFLAGS
1183 AC_CHECK_LIB(WildMidi, WildMidi_Init,,
1184 AC_MSG_ERROR([libwildmidi not found]))
1188 CPPFLAGS=$oldcppflags
1190 AC_SUBST(WILDMIDI_LIBS,-lWildMidi)
1191 AC_SUBST(WILDMIDI_CFLAGS,)
1193 AC_DEFINE(ENABLE_WILDMIDI, 1, [Define for wildmidi support])
1196 AM_CONDITIONAL(ENABLE_WILDMIDI, test x$enable_wildmidi = xyes)
1200 dnl Encoder API and shout/httpd output plugin
1203 if test x$enable_shout = xyes || \
1204 test x$enable_recorder_output = xyes || \
1205 test x$enable_httpd_output = xyes; then
1206 # at least one output using encoders is explicitly enabled
1208 elif test x$enable_shout = xauto || \
1209 test x$enable_recorder_output = xauto || \
1210 test x$enable_httpd_output = xauto; then
1213 # all outputs using encoders are disabled
1216 # don't bother to check for encoder plugins
1217 enable_vorbis_encoder=no
1218 enable_lame_encoder=no
1219 enable_twolame_encoder=no
1220 enable_wave_encoder=no
1221 enable_flac_encoder=no
1224 MPD_AUTO_PKG(vorbis_encoder, VORBISENC, [vorbisenc],
1225 [Ogg Vorbis encoder], [libvorbisenc not found])
1227 if test x$enable_lame_encoder != xno; then
1228 AC_CHECK_HEADERS(lame/lame.h,,
1229 [AC_CHECK_HEADERS(lame.h,, using_lame=no)])
1230 AC_CHECK_LIB(mp3lame, lame_init,, using_lame=no)
1231 if test x$using_lame != xno; then
1232 AC_DEFINE(HAVE_LAME, 1, [Define to 1 if you have lame 3.98 or greater.])
1233 LAME_LIBS="-lmp3lame -lm"
1234 enable_lame_encoder=yes
1237 if test "$enable_lame_encoder" = "yes" -a "$using_lame" = "no"; then
1238 AC_MSG_ERROR([LAME libraries and development support files not found.])
1244 MPD_AUTO_PKG(twolame_encoder, TWOLAME, [twolame],
1245 [TwoLAME encoder], [libtwolame not found])
1247 if test x$enable_vorbis_encoder != xno ||
1248 test x$enable_lame_encoder != xno ||
1249 test x$enable_twolame_encoder != xno ||
1250 test x$enable_flac_encoder != xno ||
1251 test x$enable_wave_encoder != xno; then
1252 # at least one encoder plugin is enabled
1255 # no encoder plugin is enabled: disable the whole encoder API
1258 if test x$need_encoder = xyes; then
1259 AC_MSG_ERROR([No encoder plugin found])
1264 if test x$enable_shout = xauto; then
1265 # handle shout auto-detection: disable if no encoder is
1267 if test x$enable_encoder = xyes; then
1270 AC_MSG_WARN([No encoder plugin -- disabling the shout output plugin])
1275 if test x$enable_recorder_output = xauto; then
1276 # handle recorder auto-detection: disable if no encoder is
1278 if test x$enable_encoder = xyes; then
1279 enable_recorder_output=yes
1281 AC_MSG_WARN([No encoder plugin -- disabling the recorder output plugin])
1282 enable_recorder_output=no
1286 if test x$enable_httpd_output = xauto; then
1287 # handle HTTPD auto-detection: disable if no encoder is
1289 if test x$enable_encoder = xyes; then
1290 enable_httpd_output=yes
1292 AC_MSG_WARN([No encoder plugin -- disabling the HTTP output plugin])
1293 enable_httpd_output=no
1297 AM_CONDITIONAL(HAVE_SHOUT, test x$enable_shout = xyes)
1298 if test x$enable_shout = xyes; then
1299 AC_DEFINE(HAVE_SHOUT, 1, [Define to enable the shoutcast output])
1302 AM_CONDITIONAL(ENABLE_RECORDER_OUTPUT, test x$enable_recorder_output = xyes)
1303 if test x$enable_recorder_output = xyes; then
1304 AC_DEFINE(ENABLE_RECORDER_OUTPUT, 1, [Define to enable the recorder output])
1307 AM_CONDITIONAL(ENABLE_HTTPD_OUTPUT, test x$enable_httpd_output = xyes)
1308 if test x$enable_httpd_output = xyes; then
1309 AC_DEFINE(ENABLE_HTTPD_OUTPUT, 1, [Define to enable the HTTP server output])
1312 AM_CONDITIONAL(ENABLE_ENCODER, test x$enable_encoder = xyes)
1313 if test x$enable_encoder = xyes; then
1314 AC_DEFINE(ENABLE_ENCODER, 1,
1315 [Define to enable the encoder plugins])
1318 AM_CONDITIONAL(ENABLE_VORBIS_ENCODER, test x$enable_vorbis_encoder = xyes)
1319 if test x$enable_vorbis_encoder = xyes; then
1320 AC_DEFINE(ENABLE_VORBIS_ENCODER, 1,
1321 [Define to enable the vorbis encoder plugin])
1324 AM_CONDITIONAL(ENABLE_LAME_ENCODER, test x$enable_lame_encoder = xyes)
1325 if test x$enable_lame_encoder = xyes; then
1326 AC_DEFINE(ENABLE_LAME_ENCODER, 1,
1327 [Define to enable the lame encoder plugin])
1330 AM_CONDITIONAL(ENABLE_TWOLAME_ENCODER, test x$enable_twolame_encoder = xyes)
1331 if test x$enable_twolame_encoder = xyes; then
1332 AC_DEFINE(ENABLE_TWOLAME_ENCODER, 1,
1333 [Define to enable the TwoLAME encoder plugin])
1336 AM_CONDITIONAL(ENABLE_WAVE_ENCODER, test x$enable_wave_encoder = xyes)
1337 if test x$enable_wave_encoder = xyes; then
1338 AC_DEFINE(ENABLE_WAVE_ENCODER, 1,
1339 [Define to enable the PCM wave encoder plugin])
1342 AM_CONDITIONAL(ENABLE_FLAC_ENCODER, test x$enable_flac_encoder = xyes)
1343 if test x$enable_flac_encoder = xyes; then
1344 AC_DEFINE(ENABLE_FLAC_ENCODER, 1,
1345 [Define to enable the FLAC encoder plugin])
1348 dnl ---------------------------------------------------------------------------
1350 dnl ---------------------------------------------------------------------------
1353 if test x$enable_documentation = xyes; then
1354 AC_PATH_PROG(XMLTO, xmlto)
1356 AM_CONDITIONAL(HAVE_XMLTO, test x$XMLTO != x)
1358 AC_PATH_PROG(DOXYGEN, doxygen)
1359 if test x$DOXYGEN = x; then
1360 AC_MSG_ERROR([doxygen not found])
1365 AM_CONDITIONAL(HAVE_XMLTO, false)
1368 AM_CONDITIONAL(ENABLE_DOCUMENTATION, test x$enable_documentation = xyes)
1376 if test "x$enable_werror" = xyes; then
1377 AM_CFLAGS="$AM_CFLAGS -Werror -pedantic-errors"
1380 #if test "x$enable_debug" = xno; then
1381 # don't set NDEBUG for now, until MPD is stable
1382 #AM_CFLAGS="$AM_CFLAGS -DNDEBUG"
1385 if test "x$enable_gprof" = xyes; then
1386 MPD_CFLAGS="$MPD_CFLAGS -pg"
1387 MPD_LIBS="$MPD_LIBS -pg"
1390 dnl ---------------------------------------------------------------------------
1392 dnl ---------------------------------------------------------------------------
1393 AM_CONDITIONAL(ENABLE_TEST, test "x$enable_test" = xyes)
1395 dnl ---------------------------------------------------------------------------
1397 dnl ---------------------------------------------------------------------------
1398 if test x$GCC = xyes
1400 MPD_CHECK_FLAG([-Wall])
1401 MPD_CHECK_FLAG([-Wextra])
1402 MPD_CHECK_FLAG([-Wno-deprecated-declarations])
1403 MPD_CHECK_FLAG([-Wmissing-prototypes])
1404 MPD_CHECK_FLAG([-Wshadow])
1405 MPD_CHECK_FLAG([-Wpointer-arith])
1406 MPD_CHECK_FLAG([-Wstrict-prototypes])
1407 MPD_CHECK_FLAG([-Wcast-qual])
1408 MPD_CHECK_FLAG([-Wwrite-strings])
1409 MPD_CHECK_FLAG([-pedantic])
1412 dnl ---------------------------------------------------------------------------
1413 dnl Pretty-Print Results
1414 dnl ---------------------------------------------------------------------------
1416 echo "########### MPD CONFIGURATION ############"
1419 echo " Client Support:"
1420 if test x$enable_ipv6 = xyes; then
1421 echo " IPv6 support ..................enabled"
1423 echo " IPv6 support ..................disabled"
1426 if test x$enable_tcp = xyes; then
1427 echo " TCP support ...................enabled"
1429 echo " TCP support ...................disabled"
1432 if test x$enable_un = xyes; then
1433 echo " Unix domain socket support ....enabled"
1435 echo " Unix domain socket support ....disabled"
1441 test x$enable_tcp = xno &&
1442 test x$enable_un = xno; then
1443 AC_MSG_ERROR([No client interfaces configured!])
1446 echo " Playback Support:"
1447 if test x$enable_alsa = xyes; then
1448 echo " ALSA support ..................enabled"
1450 echo " ALSA support ..................disabled"
1453 if test x$enable_fifo = xyes; then
1454 echo " FIFO support ..................enabled"
1456 echo " FIFO support ..................disabled"
1459 if test x$enable_recorder_output = xyes; then
1460 echo " File Recorder support .........enabled"
1462 echo " File Recorder support .........disabled"
1465 if test x$enable_httpd_output = xyes; then
1466 echo " HTTP daemon support ...........enabled"
1468 echo " HTTP daemon support ...........disabled"
1471 if test x$enable_jack = xyes; then
1472 echo " JACK support ..................enabled"
1474 echo " JACK support ..................disabled"
1477 if test x$enable_ao = xyes; then
1478 echo " libao support .................enabled"
1480 echo " libao support .................disabled"
1483 if test x$enable_oss = xyes; then
1484 echo " OSS support ...................enabled"
1486 echo " OSS support ...................disabled"
1489 if test x$enable_openal = xyes; then
1490 echo " OpenAL support ................enabled"
1492 echo " OpenAL support ................disabled"
1495 if test x$enable_osx = xyes; then
1496 echo " OS X support ..................enabled"
1498 echo " OS X support ..................disabled"
1501 if test x$enable_pipe_output = xyes; then
1502 echo " Pipeline output support .......enabled"
1504 echo " Pipeline output support .......disabled"
1507 if test x$enable_pulse = xyes; then
1508 echo " PulseAudio support ............enabled"
1510 echo " PulseAudio support ............disabled"
1513 if test x$enable_mvp = xyes; then
1514 echo " Media MVP support .............enabled"
1516 echo " Media MVP support .............disabled"
1519 if test x$enable_shout = xyes; then
1520 echo " SHOUTcast support .............enabled"
1522 echo " SHOUTcast support .............disabled"
1525 if test x$enable_solaris_output = xyes; then
1526 echo " Solaris /dev/audio support ....enabled"
1528 echo " Solaris /dev/audio support ....disabled"
1534 test x$enable_ao = xno &&
1535 test x$enable_oss = xno &&
1536 test x$enable_openal = xno &&
1537 test x$enable_shout = xno &&
1538 test x$enable_recorder_output = xno &&
1539 test x$enable_httpd_output = xno &&
1540 test x$enable_solaris_output = xno &&
1541 test x$enable_alsa = xno &&
1542 test x$enable_osx = xno &&
1543 test x$enable_pulse = xno &&
1544 test x$enable_jack = xno &&
1545 test x$enable_fifo = xno &&
1546 test x$enable_pipe_output = xno &&
1547 test x$enable_mvp = xno; then
1548 AC_MSG_ERROR([No Audio Output types configured!])
1552 test x$enable_shout = xyes ||
1553 test x$enable_recorder = xyes ||
1554 test x$enable_httpd_output = xyes; then
1555 echo " Streaming Encoder Support:"
1556 if test x$enable_lame_encoder = xyes; then
1557 echo " LAME mp3 encoder ..............enabled"
1559 echo " LAME mp3 encoder ..............disabled"
1562 if test x$enable_vorbis_encoder = xyes; then
1563 echo " Ogg Vorbis encoder ............enabled"
1565 echo " Ogg Vorbis encoder ............disabled"
1568 if test x$enable_twolame_encoder = xyes; then
1569 echo " TwoLAME mp3 encoder ...........enabled"
1571 echo " TwoLAME mp3 encoder ...........disabled"
1574 if test x$enable_flac_encoder = xyes; then
1575 echo " FLAC encoder ..................enabled"
1577 echo " FLAC encoder ..................disabled"
1580 if test x$enable_wave_encoder = xyes; then
1581 echo " PCM wave encoder ..............enabled"
1583 echo " PCM wave encoder ..............disabled"
1589 echo " File Format Support:"
1591 if test x$enable_aac = xyes; then
1592 echo " AAC support ...................enabled"
1594 echo " AAC support ...................disabled"
1597 if test x$enable_sidplay = xyes; then
1598 echo " C64 SID support ...............enabled"
1600 echo " C64 SID support ...............disabled"
1603 if test x$enable_ffmpeg = xyes; then
1604 echo " FFMPEG support ................enabled"
1606 echo " FFMPEG support ................disabled"
1609 if test x$enable_flac = xyes; then
1610 echo " FLAC support ..................enabled"
1612 echo " FLAC support ..................disabled"
1615 if test x$enable_fluidsynth = xyes; then
1616 echo " fluidsynth MIDI support .......enabled"
1618 echo " fluidsynth MIDI support .......disabled"
1621 if test x$enable_mikmod = xyes; then
1622 echo " MikMod support ................enabled"
1624 echo " MikMod support ................disabled"
1627 if test x$enable_modplug = xyes; then
1628 echo " MODPLUG support ...............enabled"
1630 echo " MODPLUG support ...............disabled"
1633 if test x$enable_gme = xyes; then
1634 echo " GME support ....................enabled"
1636 echo " GME support ...................disabled"
1639 if test x$enable_mad = xyes; then
1640 echo " MAD mp3 decoder support .......enabled"
1642 echo " MAD mp3 decoder support .......disabled"
1645 if test x$enable_mpg123 = xyes; then
1646 echo " libmpg123 decoder support .....enabled"
1648 echo " libmpg123 decoder support .....disabled"
1651 if test x$enable_mp4 = xyes; then
1652 echo " MP4 support ...................enabled"
1654 echo " MP4 support ...................disabled"
1657 if test x$enable_mpc = xyes; then
1658 echo " Musepack (MPC) support ........enabled"
1660 echo " Musepack (MPC) support ........disabled"
1663 case $enable_oggflac in
1665 echo " OggFLAC support ...............enabled"
1668 echo " OggFLAC support ...............enabled(FLAC 1.1.3)"
1671 echo " OggFLAC support ...............disabled"
1675 if test x$enable_vorbis = xyes; then
1676 echo " Ogg Vorbis support ............enabled"
1677 if test x$use_tremor = xyes; then
1678 echo " using tremor.................yes"
1680 echo " using tremor.................no"
1683 echo " Ogg Vorbis support ............disabled"
1686 if test x$enable_sndfile = xyes; then
1687 echo " libsndfile ....................enabled"
1689 echo " libsndfile ....................disabled"
1692 if test x$enable_audiofile = xyes; then
1693 echo " Wave file support .............enabled"
1695 echo " Wave file support .............disabled"
1698 if test x$enable_wavpack = xyes; then
1699 echo " WavPack support ...............enabled"
1701 echo " WavPack support ...............disabled"
1704 if test x$enable_wildmidi = xyes; then
1705 echo " wildmidi MIDI support .........enabled"
1707 echo " wildmidi MIDI support .........disabled"
1713 test x$enable_mad = xno &&
1714 test x$enable_mpg123 = xno &&
1715 test x$enable_vorbis = xno &&
1716 test x$enable_flac = xno &&
1717 test x$enable_oggflac = xno &&
1718 test x$enable_audiofile = xno &&
1719 test x$enable_aac = xno &&
1720 test x$enable_mpc = xno &&
1721 test x$enable_wavpack = xno &&
1722 test x$enable_ffmpeg = xno &&
1723 test x$enable_modplug = xno &&
1724 test x$enable_sidplay = xno &&
1725 test x$enable_gme = xno &&
1726 test x$enable_fluidsynth = xno &&
1727 test x$enable_wildmidi = xno &&
1728 test x$enable_mp4 = xno &&
1729 test x$enable_mikmod = xno; then
1730 AC_MSG_ERROR([No input plugins supported!])
1734 echo " Archive support:"
1736 if test x$enable_bzip2 = xyes; then
1737 echo " BZ2 archives support ..........enabled"
1739 echo " BZ2 archives support ..........disabled"
1742 if test x$enable_iso9660 = xyes; then
1743 echo " ISO 9660 archives support .....enabled"
1745 echo " ISO 9660 archives support .....disabled"
1748 if test x$enable_zzip = xyes; then
1749 echo " ZIP archives support ..........enabled"
1751 echo " ZIP archives support ..........disabled"
1755 echo " Streaming support:"
1757 if test x$enable_lastfm = xyes; then
1758 echo " last.fm radio support .........enabled"
1760 echo " last.fm radio support .........disabled"
1763 if test x$enable_curl = xyes; then
1764 echo " libcurl support (streaming) ...enabled"
1766 echo " libcurl support (streaming) ...disabled"
1769 if test x$enable_mms = xyes; then
1770 echo " libmms support ................enabled"
1772 echo " libmms support ................disabled"
1776 echo " Other features:"
1778 if test x$enable_id3 = xyes; then
1779 echo " ID3 tag support ...............enabled"
1781 echo " ID3 tag support ...............disabled"
1784 if test x$enable_lsr = xyes; then
1785 echo " libsamplerate support .........enabled"
1787 echo " libsamplerate support .........disabled"
1790 if test x$with_zeroconf != xno; then
1791 echo " Zeroconf support ..............$with_zeroconf"
1793 echo " Zeroconf support ..............disabled"
1796 if test x$enable_cue = xyes; then
1797 echo " libcue support ................enabled"
1799 echo " libcue support ................disabled"
1802 if test x$enable_inotify = xyes; then
1803 echo " Inotify support (autoupdate) ..enabled"
1805 echo " Inotify support (autoupdate) ..disabled"
1809 echo "##########################################"
1812 if test x$enable_sndfile = xyes && test x$enable_modplug = xyes; then
1813 AC_MSG_WARN([compilation may fail, because libmodplug conflicts with libsndfile])
1814 AC_MSG_WARN([libmodplug ships modplug/sndfile.h, which hides libsndfile's sndfile.h])
1817 echo "Generating needed files for compilation"
1828 echo "You are now ready to compile MPD"
1829 echo "Type \"make\" to compile MPD"