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-gme],
180 [enable Blargg's game music emulator plugin]),,
184 AS_HELP_STRING([--enable-gprof],
185 [enable profiling via gprof (default: disabled)]),,
188 AC_ARG_ENABLE(httpd-output,
189 AS_HELP_STRING([--enable-httpd-output],
190 [enables the HTTP server output]),,
191 [enable_httpd_output=auto])
194 AS_HELP_STRING([--disable-id3],
195 [disable id3 support (default: enable)]),,
198 AC_ARG_ENABLE(inotify,
199 AS_HELP_STRING([--disable-inotify],
200 [disable support Inotify automatic database update (default: enabled) ]),,
201 [enable_inotify=yes])
204 AS_HELP_STRING([--disable-ipv6],
205 [disable IPv6 support (default: enable)]),,
208 AC_ARG_ENABLE(iso9660,
209 AS_HELP_STRING([--enable-iso9660],
210 [enable iso9660 archive support (default: disabled)]),,
214 AS_HELP_STRING([--enable-jack],
215 [enable jack support]),,
220 AC_ARG_ENABLE(lastfm,
221 AS_HELP_STRING([--enable-lastfm],
222 [enable support for last.fm radio (default: disable)]),,
225 AC_ARG_ENABLE(lame-encoder,
226 AS_HELP_STRING([--enable-lame-encoder],
227 [enable the LAME mp3 encoder]),,
228 enable_lame_encoder=auto)
230 AC_ARG_ENABLE([libwrap],
231 AS_HELP_STRING([--enable-libwrap], [use libwrap]),,
232 [enable_libwrap=auto])
235 AS_HELP_STRING([--enable-lsr],
236 [enable libsamplerate support]),,
240 AS_HELP_STRING([--enable-mad],
241 [enable libmad mp3 decoder plugin]),,
244 AC_ARG_ENABLE(mikmod,
245 AS_HELP_STRING([--enable-mikmod],
246 [enable the mikmod decoder (default: disable)]),,
250 AS_HELP_STRING([--enable-mms],
251 [enable the MMS protocol with libmms]),,
254 AC_ARG_ENABLE(modplug,
255 AS_HELP_STRING([--enable-modplug],
256 [enable modplug decoder plugin]),,
260 AS_HELP_STRING([--disable-mpc],
261 [disable musepack (MPC) support (default: enable)]),,
264 AC_ARG_ENABLE(mpg123,
265 AS_HELP_STRING([--enable-mpg123],
266 [enable libmpg123 decoder plugin]),,
270 AS_HELP_STRING([--enable-mvp],
271 [enable support for Hauppauge Media MVP (default: disable)]),,
274 AC_ARG_ENABLE(oggflac,
275 AS_HELP_STRING([--disable-oggflac],
276 [disable OggFLAC support (default: enable)]),,
279 AC_ARG_ENABLE(openal,
280 AS_HELP_STRING([--enable-openal],
281 [enable OpenAL support (default: disable)]),,
285 AS_HELP_STRING([--disable-oss],
286 [disable OSS support (default: enable)]),,
289 AC_ARG_ENABLE(pipe-output,
290 AS_HELP_STRING([--enable-pipe-output],
291 [enable support for writing audio to a pipe (default: disable)]),,
292 enable_pipe_output=no)
295 AS_HELP_STRING([--enable-pulse],
296 [enable support for the PulseAudio sound server]),,
299 AC_ARG_ENABLE(recorder-output,
300 AS_HELP_STRING([--enable-recorder-output],
301 [enables the recorder file output plugin (default: disable)]),,
302 [enable_recorder_output=auto])
304 AC_ARG_ENABLE(sidplay,
305 AS_HELP_STRING([--enable-sidplay],
306 [enable C64 SID support via libsidplay2]),,
311 AS_HELP_STRING([--enable-shout],
312 [enables the shoutcast streaming output]),,
315 AC_ARG_ENABLE(sndfile,
316 AS_HELP_STRING([--enable-sndfile],
317 [enable sndfile support]),,
320 AC_ARG_ENABLE(sqlite,
321 AS_HELP_STRING([--enable-sqlite],
322 [enable support for the SQLite database]),,
323 [enable_sqlite=auto])
326 AS_HELP_STRING([--disable-tcp],
327 [disable support for clients connecting via TCP (default: enable)]),,
331 AS_HELP_STRING([--enable-test],
332 [build the test programs (default: disabled)]),,
336 AS_HELP_STRING([--with-tremor=PFX],
337 [use Tremor (vorbisidec) integer Ogg Vorbis decoder (with optional prefix)]),,
340 AC_ARG_ENABLE(twolame-encoder,
341 AS_HELP_STRING([--enable-twolame-encoder],
342 [enable the TwoLAME mp2 encoder]),,
343 enable_twolame_encoder=auto)
346 AS_HELP_STRING([--disable-un],
347 [disable support for clients connecting via unix domain sockets (default: enable)]),,
350 AC_ARG_ENABLE(vorbis,
351 AS_HELP_STRING([--disable-vorbis],
352 [disable Ogg Vorbis support (default: enable)]),,
355 AC_ARG_ENABLE(vorbis-encoder,
356 AS_HELP_STRING([--enable-vorbis-encoder],
357 [enable the Ogg Vorbis encoder]),,
358 [enable_vorbis_encoder=auto])
360 AC_ARG_ENABLE(wave-encoder,
361 AS_HELP_STRING([--enable-wave-encoder],
362 [enable the PCM wave encoder]),,
363 enable_wave_encoder=yes)
365 AC_ARG_ENABLE(wavpack,
366 AS_HELP_STRING([--enable-wavpack],
367 [enable WavPack support]),,
370 AC_ARG_ENABLE(werror,
371 AS_HELP_STRING([--enable-werror],
372 [treat warnings as errors (default: disabled)]),,
375 AC_ARG_ENABLE(wildmidi,
376 AS_HELP_STRING([--enable-wildmidi],
377 [enable MIDI support via wildmidi (default: disable)]),,
380 AC_ARG_WITH(zeroconf,
381 AS_HELP_STRING([--with-zeroconf=@<:@auto|avahi|bonjour|no@:>@],
382 [enable zeroconf backend (default=auto)]),,
383 with_zeroconf="auto")
386 AS_HELP_STRING([--enable-zzip],
387 [enable zip archive support (default: disabled)]),,
391 AC_ARG_WITH(tremor-libraries,
392 AS_HELP_STRING([--with-tremor-libraries=DIR],
393 [directory where Tremor library is installed (optional)]),,
396 AC_ARG_WITH(tremor-includes,
397 AS_HELP_STRING([--with-tremor-includes=DIR],
398 [directory where Tremor header files are installed (optional)]),,
401 dnl ---------------------------------------------------------------------------
402 dnl Mandatory Libraries
403 dnl ---------------------------------------------------------------------------
404 PKG_CHECK_MODULES([GLIB], [glib-2.0 >= 2.12 gthread-2.0],,
405 [AC_MSG_ERROR([GLib 2.12 is required])])
407 dnl ---------------------------------------------------------------------------
409 dnl ---------------------------------------------------------------------------
411 if test x$enable_tcp = xno; then
412 # if we don't support TCP, we don't need IPv6 either
416 if test x$enable_ipv6 = xyes; then
417 AC_MSG_CHECKING(for ipv6)
418 AC_EGREP_CPP([AP_maGiC_VALUE],
420 #include <sys/types.h>
421 #include <sys/socket.h>
429 AC_DEFINE(HAVE_IPV6, 1, [Define if IPv6 support present])
430 AC_MSG_RESULT([yes]),
435 if test x$enable_tcp = xyes; then
436 AC_DEFINE(HAVE_TCP, 1, [Define if TCP socket support is enabled])
445 if test x$enable_un = xyes; then
446 AC_DEFINE(HAVE_UN, 1, [Define if unix domain socket support is enabled])
450 dnl ---------------------------------------------------------------------------
452 dnl ---------------------------------------------------------------------------
453 if test x$enable_largefile != xno; then
454 AC_DEFINE([ENABLE_LARGEFILE], 1, [Define if large file support is enabled])
457 dnl ---------------------------------------------------------------------------
458 dnl Miscellaneous Libraries
459 dnl ---------------------------------------------------------------------------
461 dnl --------------------------------- inotify ---------------------------------
462 AC_CHECK_FUNCS(inotify_init inotify_init1)
464 if test x$ac_cv_func_inotify_init = xno; then
468 if test x$enable_inotify = xyes; then
469 AC_DEFINE([ENABLE_INOTIFY], 1, [Define to enable inotify support])
471 AM_CONDITIONAL(ENABLE_INOTIFY, test x$enable_inotify = xyes)
473 dnl --------------------------------- libwrap ---------------------------------
474 if test x$enable_libwrap != xno; then
475 AC_CHECK_LIBWRAP(found_libwrap=yes, found_libwrap=no)
476 MPD_AUTO_RESULT(libwrap, libwrap, [libwrap not found])
479 if test x$enable_libwrap = xyes; then
480 AC_SUBST(LIBWRAP_CFLAGS)
481 AC_SUBST(LIBWRAP_LDFLAGS)
482 AC_DEFINE(HAVE_LIBWRAP, 1, [define to enable libwrap library])
485 dnl ---------------------------------------------------------------------------
487 dnl ---------------------------------------------------------------------------
489 dnl ---------------------------------- libcue ---------------------------------
490 MPD_AUTO_PKG(cue, CUE, [libcue],
491 [libcue parsing library], [libcue not found])
492 if test x$enable_cue = xyes; then
493 AC_DEFINE([HAVE_CUE], 1,
494 [Define to enable libcue support])
497 AM_CONDITIONAL(HAVE_CUE, test x$enable_cue = xyes)
499 dnl -------------------------------- libid3tag --------------------------------
500 if test x$enable_id3 = xyes; then
501 PKG_CHECK_MODULES([ID3TAG], [id3tag],,
502 AC_CHECK_LIB(id3tag, id3_file_open,
503 [ID3TAG_LIBS="-lid3tag -lz" ID3TAG_CFLAGS=""],
507 if test x$enable_id3 = xyes; then
508 AC_DEFINE(HAVE_ID3TAG, 1, [Define to use id3tag])
511 AM_CONDITIONAL(HAVE_ID3TAG, test x$enable_id3 = xyes)
513 dnl ---------------------------------------------------------------------------
515 dnl ---------------------------------------------------------------------------
517 dnl --------------------------------- zeroconf --------------------------------
519 case $with_zeroconf in
527 if test x$with_zeroconf != xno; then
528 if test x$with_zeroconf = xavahi || test x$with_zeroconf = xauto; then
529 PKG_CHECK_MODULES([AVAHI], [avahi-client avahi-glib],
530 [found_avahi=1;AC_DEFINE([HAVE_AVAHI], 1, [Define to enable Avahi Zeroconf support])]
531 MPD_LIBS="$MPD_LIBS $AVAHI_LIBS" MPD_CFLAGS="$MPD_CFLAGS $AVAHI_CFLAGS",
535 if test x$found_avahi = x1; then
537 elif test x$with_zeroconf = xavahi; then
538 AC_MSG_ERROR([Avahi support requested but not found])
541 if test x$with_zeroconf = xbonjour || test x$with_zeroconf = xauto; then
542 AC_CHECK_HEADER(dns_sd.h,
543 [found_bonjour=1;AC_DEFINE([HAVE_BONJOUR], 1, [Define to enable Bonjour Zeroconf support])],
545 AC_CHECK_LIB(dns_sd, DNSServiceRegister,
546 MPD_LIBS="$MPD_LIBS -ldns_sd")
549 if test x$found_bonjour = x1; then
550 with_zeroconf=bonjour
551 elif test x$with_zeroconf = xbonjour; then
552 AC_MSG_ERROR([Bonjour support requested but not found])
555 if test x$with_zeroconf = xauto; then
556 AC_MSG_WARN([No supported Zeroconf backend found, disabling Zeroconf])
559 AC_DEFINE([HAVE_ZEROCONF], 1, [Define to enable Zeroconf support])
563 AM_CONDITIONAL(HAVE_ZEROCONF, test x$with_zeroconf != xno)
564 AM_CONDITIONAL(HAVE_AVAHI, test x$with_zeroconf = xavahi)
565 AM_CONDITIONAL(HAVE_BONJOUR, test x$with_zeroconf = xbonjour)
567 dnl ---------------------------------------------------------------------------
569 dnl ---------------------------------------------------------------------------
571 dnl ---------------------------------- sqlite ---------------------------------
573 MPD_AUTO_PKG(sqlite, SQLITE, [sqlite3],
574 [SQLite database support], [sqlite not found])
575 if test x$enable_sqlite = xyes; then
576 AC_DEFINE([ENABLE_SQLITE], 1, [Define to enable sqlite database support])
579 AM_CONDITIONAL(ENABLE_SQLITE, test x$enable_sqlite = xyes)
581 dnl ---------------------------------------------------------------------------
582 dnl Converter Plugins
583 dnl ---------------------------------------------------------------------------
585 dnl ------------------------------ libsamplerate ------------------------------
586 MPD_AUTO_PKG(lsr, SAMPLERATE, [samplerate >= 0.0.15],
587 [libsamplerate resampling], [libsamplerate not found])
588 if test x$enable_lsr = xyes; then
589 AC_DEFINE([HAVE_LIBSAMPLERATE], 1,
590 [Define to enable libsamplerate])
593 if test x$enable_lsr = xyes; then
594 PKG_CHECK_MODULES([SAMPLERATE_013],
595 [samplerate >= 0.1.3],,
596 [AC_DEFINE([HAVE_LIBSAMPLERATE_NOINT], 1,
597 [libsamplerate doesn't provide src_int_to_float_array() (<0.1.3)])])
600 AM_CONDITIONAL(HAVE_LIBSAMPLERATE, test x$enable_lsr = xyes)
602 dnl ---------------------------------------------------------------------------
604 dnl ---------------------------------------------------------------------------
606 dnl ----------------------------------- CURL ----------------------------------
607 MPD_AUTO_PKG(curl, CURL, [libcurl],
608 [libcurl HTTP streaming], [libcurl not found])
609 if test x$enable_curl = xyes; then
610 AC_DEFINE(ENABLE_CURL, 1, [Define when libcurl is used for HTTP streaming])
612 AM_CONDITIONAL(ENABLE_CURL, test x$enable_curl = xyes)
614 dnl --------------------------------- Last.FM ---------------------------------
615 if test x$enable_lastfm = xyes; then
616 if test x$enable_curl != xyes; then
617 AC_MSG_ERROR([Cannot enable last.fm radio without curl])
620 AC_DEFINE(ENABLE_LASTFM, 1, [Define when last.fm radio is enabled])
622 AM_CONDITIONAL(ENABLE_LASTFM, test x$enable_lastfm = xyes)
624 dnl ---------------------------------- libmms ---------------------------------
625 MPD_AUTO_PKG(mms, MMS, [libmms >= 0.4],
626 [libmms mms:// protocol support], [libmms not found])
627 if test x$enable_mms = xyes; then
628 AC_DEFINE(ENABLE_MMS, 1,
629 [Define when libmms is used for the MMS protocol])
631 AM_CONDITIONAL(ENABLE_MMS, test x$enable_mms = xyes)
633 dnl ---------------------------------------------------------------------------
635 dnl ---------------------------------------------------------------------------
637 dnl --------------------------------- iso9660 ---------------------------------
638 MPD_AUTO_PKG(iso9660, ISO9660, [libiso9660],
639 [libiso9660 archive library], [libiso9660 not found])
641 AM_CONDITIONAL(HAVE_ISO9660, test x$enable_iso9660 = xyes)
642 if test x$enable_iso9660 = xyes; then
643 AC_DEFINE(HAVE_ISO9660, 1, [Define to have ISO9660 archive support])
645 AC_PATH_PROG(MKISOFS, mkisofs, no)
650 AM_CONDITIONAL(ENABLE_ISO9660_TEST, test x$MKISOFS != xno)
652 dnl ---------------------------------- libbz2 ---------------------------------
653 if test x$enable_bzip2 = xyes; then
654 AC_CHECK_LIB(bz2, BZ2_bzDecompressInit,
655 [MPD_LIBS="$MPD_LIBS -lbz2"],
656 [AC_MSG_ERROR([libbz2 not found])])
659 AM_CONDITIONAL(HAVE_BZ2, test x$enable_bzip2 = xyes)
660 if test x$enable_bzip2 = xyes; then
661 AC_DEFINE(HAVE_BZ2, 1, [Define to have bz2 archive support])
663 AC_PATH_PROG(BZIP2, bzip2, no)
668 AM_CONDITIONAL(ENABLE_BZIP2_TEST, test x$BZIP2 != xno)
670 dnl --------------------------------- libzzip ---------------------------------
671 MPD_AUTO_PKG(zzip, ZZIP, [zziplib >= 0.13],
672 [libzzip archive library], [libzzip not found])
674 AM_CONDITIONAL(HAVE_ZZIP, test x$enable_zzip = xyes)
675 if test x$enable_zzip = xyes; then
676 AC_DEFINE(HAVE_ZZIP, 1, [Define to have zip archive support])
678 AC_PATH_PROG(ZIP, zip, no)
683 AM_CONDITIONAL(ENABLE_ZZIP_TEST, test x$ZIP != xno)
685 dnl ------------------------------- Archive API -------------------------------
687 test x$enable_bzip2 = xyes ||
688 test x$enable_zzip = xyes ||
689 test x$enable_iso9660 = xyes; then
691 AC_DEFINE(ENABLE_ARCHIVE, 1, [The archive API is available])
696 AM_CONDITIONAL(ENABLE_ARCHIVE, test x$enable_archive = xyes)
698 dnl ---------------------------------------------------------------------------
699 dnl Encoders for Streaming Audio Output Plugins
700 dnl ---------------------------------------------------------------------------
702 dnl ---------------------------------------------------------------------------
703 dnl Audio Output Plugins (Nonstreaming)
704 dnl ---------------------------------------------------------------------------
706 dnl ----------------------------------- ALSA ----------------------------------
707 MPD_AUTO_PKG(alsa, ALSA, [alsa >= 0.9.0],
708 [ALSA output plugin], [libasound not found])
710 if test x$enable_alsa = xyes; then
711 AC_DEFINE(HAVE_ALSA, 1, [Define to enable ALSA support])
714 AM_CONDITIONAL(HAVE_ALSA, test x$enable_alsa = xyes)
716 dnl ----------------------------------- FIFO ----------------------------------
717 if test x$enable_fifo = xyes; then
718 AC_CHECK_FUNC([mkfifo],
719 [enable_fifo=yes;AC_DEFINE([HAVE_FIFO], 1,
720 [Define to enable support for writing audio to a FIFO])],
721 [enable_fifo=no;AC_MSG_WARN([mkfifo not found -- disabling support for writing audio to a FIFO])])
724 AM_CONDITIONAL(HAVE_FIFO, test x$enable_fifo = xyes)
726 dnl ----------------------------------- JACK ----------------------------------
727 MPD_AUTO_PKG(jack, JACK, [jack >= 0.100],
728 [JACK output plugin], [libjack not found])
729 if test x$enable_jack = xyes; then
730 AC_DEFINE([HAVE_JACK], 1, [Define to enable JACK support])
733 if test x$enable_jack = xyes; then
734 # check whether jack_set_info_function() is available
736 LIBS="$LIBS $JACK_LIBS"
738 AC_CHECK_FUNCS(jack_set_info_function)
743 AM_CONDITIONAL(HAVE_JACK, test x$enable_jack = xyes)
745 dnl ---------------------------------- libao ----------------------------------
746 MPD_AUTO_PKG(ao, AO, [ao],
747 [libao output plugin], [libao not found])
748 if test x$enable_ao = xyes; then
749 AC_DEFINE(HAVE_AO, 1, [Define to play with ao])
752 AM_CONDITIONAL(HAVE_AO, test x$enable_ao = xyes)
754 dnl ---------------------------------- OpenAL ---------------------------------
755 AC_SUBST(OPENAL_CFLAGS,"")
756 AC_SUBST(OPENAL_LIBS,"")
758 if test x$enable_openal = xyes; then
759 if test x$enable_osx = xyes; then
760 AC_CHECK_HEADERS([OpenAL/al.h OpenAL/alc.h], [], [enable_openal=no])
761 if test x$enable_openal = xyes; then
762 OPENAL_LIBS="-framework OpenAL"
763 AC_DEFINE(HAVE_OPENAL, 1, [Define for OpenAL support])
765 AC_MSG_WARN(OpenAL headers not found -- disabling OpenAL support)
768 PKG_CHECK_MODULES([OPENAL], [openal],
769 AC_DEFINE(HAVE_OPENAL, 1, [Define for OpenAL support]),
774 AM_CONDITIONAL(HAVE_OPENAL, test x$enable_openal = xyes)
776 dnl ---------------------------- Open Sound System ----------------------------
777 if test x$enable_oss = xyes; then
778 AC_CHECK_HEADER(sys/soundcard.h,
779 [enable_oss=yes;AC_DEFINE(HAVE_OSS,1,[Define to enable OSS])],
780 [AC_MSG_WARN(Soundcard headers not found -- disabling OSS support);
784 AM_CONDITIONAL(HAVE_OSS, test x$enable_oss = xyes)
786 dnl ----------------------------------- OSX -----------------------------------
790 AC_DEFINE(HAVE_OSX, 1, [Define for compiling OS X support])
791 MPD_LIBS="$MPD_LIBS -framework AudioUnit -framework CoreServices"
795 AM_CONDITIONAL(HAVE_OSX, test x$enable_osx = xyes)
797 dnl ------------------------------- Pipe Output -------------------------------
798 if test x$enable_pipe_output = xyes; then
799 AC_DEFINE([ENABLE_PIPE_OUTPUT], 1,
800 [Define to enable support for writing audio to a pipe])
802 AM_CONDITIONAL(ENABLE_PIPE_OUTPUT, test x$enable_pipe_output = xyes)
804 dnl -------------------------------- PulseAudio -------------------------------
805 MPD_AUTO_PKG(pulse, PULSE, [libpulse],
806 [PulseAudio output plugin], [libpulse not found])
807 if test x$enable_pulse = xyes; then
808 AC_DEFINE([HAVE_PULSE], 1,
809 [Define to enable PulseAudio support])
812 AM_CONDITIONAL(HAVE_PULSE, test x$enable_pulse = xyes)
814 dnl ----------------------------------- MVP -----------------------------------
815 if test x$enable_mvp = xyes; then
816 AC_DEFINE(HAVE_MVP,1,[Define to enable Hauppauge Media MVP support])
819 AM_CONDITIONAL(HAVE_MVP, test x$enable_mvp = xyes)
821 dnl --------------------------------- Solaris ---------------------------------
824 AC_DEFINE(ENABLE_SOLARIS_OUTPUT, 1, [Define to enable Solaris /dev/audio support])
825 enable_solaris_output=yes
829 enable_solaris_output=no
833 AM_CONDITIONAL(ENABLE_SOLARIS_OUTPUT, test x$enable_solaris_output = xyes)
835 dnl ---------------------------------------------------------------------------
837 dnl ---------------------------------------------------------------------------
839 dnl -------------------------------- audiofile --------------------------------
840 MPD_AUTO_PKG(audiofile, AUDIOFILE, [audiofile >= 0.1.7],
841 [audiofile decoder plugin], [libaudiofile not found])
842 AM_CONDITIONAL(HAVE_AUDIOFILE, test x$enable_audiofile = xyes)
843 if test x$enable_audiofile = xyes; then
844 AC_DEFINE(HAVE_AUDIOFILE, 1, [Define for audiofile support])
847 dnl ----------------------------------- FAAD ----------------------------------
850 AM_CONDITIONAL(HAVE_FAAD, test x$enable_aac = xyes)
851 AM_CONDITIONAL(HAVE_MP4, test x$enable_mp4 = xyes)
853 dnl ---------------------------------- ffmpeg ---------------------------------
854 MPD_AUTO_PKG(ffmpeg, FFMPEG, [libavformat libavcodec libavutil],
855 [ffmpeg decoder library], [libavformat+libavcodec+libavutil not found])
857 if test x$enable_ffmpeg = xyes; then
859 LIBS="$LIBS $FFMPEG_LIBS"
860 AC_CHECK_LIB(avcodec, avcodec_decode_audio2,,
865 if test x$enable_ffmpeg = xyes; then
866 # prior to ffmpeg svn12865, you had to specify include files
867 # without path prefix
868 old_CPPCFLAGS=$CPPFLAGS
869 CPPFLAGS="$CPPFLAGS $FFMPEG_CFLAGS"
870 AC_CHECK_HEADER(libavcodec/avcodec.h,,
871 AC_DEFINE(OLD_FFMPEG_INCLUDES, 1,
872 [Define if avcodec.h instead of libavcodec/avcodec.h should be included]))
873 CPPCFLAGS=$old_CPPFLAGS
876 if test x$enable_ffmpeg = xyes; then
877 AC_DEFINE(HAVE_FFMPEG, 1, [Define for FFMPEG support])
880 AM_CONDITIONAL(HAVE_FFMPEG, test x$enable_ffmpeg = xyes)
882 dnl ----------------------------------- FLAC ----------------------------------
883 if test x$enable_flac = xyes; then
884 PKG_CHECK_MODULES(FLAC, [flac >= 1.1],
885 AC_DEFINE(HAVE_FLAC, 1, [Define for FLAC support]),
890 CFLAGS="$CFLAGS $FLAC_CFLAGS"
891 LIBS="$LIBS $FLAC_LIBS"
892 if test x$enable_flac = xyes && test x$enable_oggflac = xyes; then
893 AC_CHECK_DECL(FLAC_API_SUPPORTS_OGG_FLAC,
894 [enable_oggflac=flac], [],
895 [#include <FLAC/export.h>])
901 AM_CONDITIONAL(HAVE_FLAC, test x$enable_flac = xyes)
903 enable_flac_encoder=$enable_flac
905 dnl -------------------------------- FluidSynth -------------------------------
906 if test x$enable_fluidsynth = xyes; then
907 PKG_CHECK_MODULES(FLUIDSYNTH, [fluidsynth],
908 AC_DEFINE(ENABLE_FLUIDSYNTH, 1, [Define for fluidsynth support]),
909 enable_fluidsynth=no)
912 AM_CONDITIONAL(ENABLE_FLUIDSYNTH, test x$enable_fluidsynth = xyes)
914 dnl ---------------------------------- libgme ---------------------------------
915 MPD_AUTO_PKG(gme, GME, [libgme],
916 [gme decoder plugin], [libgme not found])
917 AM_CONDITIONAL(HAVE_GME, test x$enable_gme = xyes)
918 if test x$enable_gme = xyes; then
919 AC_DEFINE(HAVE_GME, 1, [Define for gme support])
922 dnl ---------------------------------- libmad ---------------------------------
923 MPD_AUTO_PKG(mad, MAD, [mad],
924 [libmad MP3 decoder plugin], [libmad not found])
925 if test x$enable_mad = xyes; then
926 AC_DEFINE(HAVE_MAD, 1, [Define to use libmad])
928 AM_CONDITIONAL(HAVE_MAD, test x$enable_mad = xyes)
930 enable_shout2="$enable_shout"
931 MPD_AUTO_PKG(shout, SHOUT, [shout],
932 [shout output plugin], [libshout not found])
933 if test x$enable_shout = xyes && test x$enable_shout2 = xauto; then
937 dnl -------------------------------- libmpg123 --------------------------------
938 MPD_AUTO_PKG(mpg123, MPG123, [libmpg123],
939 [libmpg123 decoder plugin], [libmpg123 not found])
940 if test x$enable_mpg123 = xyes; then
941 AC_DEFINE(HAVE_MPG123, 1, [Define to use libmpg123])
943 AM_CONDITIONAL(HAVE_MPG123, test x$enable_mpg123 = xyes)
945 dnl -------------------------------- libmikmod --------------------------------
946 if test x$enable_mikmod = xyes; then
947 AC_PATH_PROG(LIBMIKMOD_CONFIG, libmikmod-config)
948 if test x$LIBMIKMOD_CONFIG != x ; then
949 AC_SUBST(LIBMIKMOD_CFLAGS, `$LIBMIKMOD_CONFIG --cflags`)
950 AC_SUBST(LIBMIKMOD_LIBS, `$LIBMIKMOD_CONFIG --libs`)
951 AC_DEFINE(ENABLE_MIKMOD_DECODER, 1, [Define for mikmod support])
957 AM_CONDITIONAL(ENABLE_MIKMOD_DECODER, test x$enable_mikmod = xyes)
959 dnl -------------------------------- libmodplug -------------------------------
960 found_modplug=$HAVE_CXX
961 MPD_AUTO_PRE(modplug, [modplug decoder plugin], [No C++ compiler found])
963 MPD_AUTO_PKG(modplug, MODPLUG, [libmodplug],
964 [modplug decoder plugin], [libmodplug not found])
966 if test x$enable_modplug = xyes; then
967 AC_DEFINE(HAVE_MODPLUG, 1, [Define for modplug support])
969 AM_CONDITIONAL(HAVE_MODPLUG, test x$enable_modplug = xyes)
971 dnl --------------------------- sndfile/modplug test --------------------------
972 if test x$enable_sndfile = xauto && test x$enable_modplug = xyes; then
973 dnl If modplug is enabled, enable sndfile only if explicitly
974 dnl requested - modplug's modplug/sndfile.h is known to
975 dnl conflict with libsndfile's sndfile.h.
976 AC_MSG_NOTICE([disabling libsndfile auto-detection, because the modplug decoder is enabled])
980 dnl -------------------------------- libsndfile -------------------------------
981 MPD_AUTO_PKG(sndfile, SNDFILE, [sndfile],
982 [libsndfile decoder plugin], [libsndfile not found])
984 if test x$enable_sndfile = xyes; then
985 AC_DEFINE(ENABLE_SNDFILE, 1, [Define to enable the sndfile decoder plugin])
987 AM_CONDITIONAL(ENABLE_SNDFILE, test x$enable_sndfile = xyes)
989 dnl --------------------------------- musepack --------------------------------
990 if test x$enable_mpc = xyes; then
991 if test "x$mpcdec_libraries" != "x" ; then
992 MPCDEC_LIBS="-L$mpcdec_libraries"
993 elif test "x$mpcdec_prefix" != "x" ; then
994 MPCDEC_LIBS="-L$mpcdec_prefix/lib"
997 MPCDEC_LIBS="$MPCDEC_LIBS -lmpcdec"
999 if test "x$mpcdec_includes" != "x" ; then
1000 MPCDEC_CFLAGS="-I$mpcdec_includes"
1001 elif test "x$mpcdec_prefix" != "x" ; then
1002 MPCDEC_CFLAGS="-I$mpcdec_prefix/include"
1007 oldcppflags=$CPPFLAGS
1008 CFLAGS="$CFLAGS $MPD_CFLAGS $MPCDEC_CFLAGS -I."
1009 LIBS="$LIBS $MPD_LIBS $MPCDEC_LIBS"
1011 AC_CHECK_HEADER(mpc/mpcdec.h,
1013 [AC_CHECK_HEADER(mpcdec/mpcdec.h,
1016 if test x$enable_mpc = xyes; then
1017 AC_CHECK_LIB(mpcdec,main,
1018 [MPD_LIBS="$MPD_LIBS $MPCDEC_LIBS";
1019 MPD_CFLAGS="$MPD_CFLAGS $MPCDEC_CFLAGS";],
1022 if test x$enable_mpc = xyes; then
1023 AC_DEFINE(HAVE_MPCDEC,1,
1024 [Define to use libmpcdec for MPC decoding])
1025 if test x$old_mpcdec = xyes; then
1026 AC_DEFINE(MPC_IS_OLD_API, 1,
1027 [Define if an old pre-SV8 libmpcdec is used])
1030 AC_MSG_WARN([mpcdec lib needed for MPC support -- disabling MPC support])
1034 CPPFLAGS=$oldcppflags
1037 AM_CONDITIONAL(HAVE_MPCDEC, test x$enable_mpc = xyes)
1039 dnl -------------------------------- Ogg Tremor -------------------------------
1040 if test x$with_tremor = xyes || test x$with_tremor = xno; then
1041 use_tremor="$with_tremor"
1043 tremor_prefix="$with_tremor"
1047 if test x$use_tremor = xyes; then
1048 if test "x$tremor_libraries" != "x" ; then
1049 TREMOR_LIBS="-L$tremor_libraries"
1050 elif test "x$tremor_prefix" != "x" ; then
1051 TREMOR_LIBS="-L$tremor_prefix/lib"
1053 TREMOR_LIBS="$TREMOR_LIBS -lvorbisidec"
1054 if test "x$tremor_includes" != "x" ; then
1055 TREMOR_CFLAGS="-I$tremor_includes"
1056 elif test "x$tremor_prefix" != "x" ; then
1057 TREMOR_CFLAGS="-I$tremor_prefix/include"
1059 ac_save_CFLAGS="$CFLAGS"
1060 ac_save_LIBS="$LIBS"
1061 CFLAGS="$CFLAGS $TREMOR_CFLAGS"
1062 LIBS="$LIBS $TREMOR_LIBS"
1063 AC_CHECK_LIB(vorbisidec,ov_read,enable_vorbis=yes,enable_vorbis=no;
1064 AC_MSG_WARN([vorbisidec lib needed for ogg support with tremor -- disabling ogg support]))
1065 CFLAGS="$ac_save_CFLAGS"
1066 LIBS="$ac_save_LIBS"
1069 if test x$use_tremor = xyes; then
1070 AC_DEFINE(HAVE_TREMOR,1,
1071 [Define to use tremor (libvorbisidec) for ogg support])
1074 AC_SUBST(TREMOR_CFLAGS)
1075 AC_SUBST(TREMOR_LIBS)
1077 dnl --------------------------------- OggFLAC ---------------------------------
1078 dnl OggFLAC must go after Ogg Tremor
1080 if test x$use_tremor = xyes -a test $xenable_oggflac = yes; then
1081 AC_MSG_WARN([disabling OggFLAC support because it is incompatible with tremor])
1085 if test x$enable_oggflac = xyes; then
1086 oldmpdcflags="$MPD_CFLAGS"
1087 oldmpdlibs="$MPD_LIBS"
1088 AM_PATH_LIBOGGFLAC(MPD_LIBS="$MPD_LIBS $LIBOGGFLAC_LIBS"
1089 MPD_CFLAGS="$MPD_CFLAGS $LIBOGGFLAC_CFLAGS",
1093 if test x$enable_oggflac = xyes; then
1094 AC_DEFINE(HAVE_OGGFLAC,1,[Define for OggFLAC support])
1097 AM_CONDITIONAL(HAVE_OGGFLAC, test x$enable_oggflac = xyes)
1099 dnl -------------------------------- Ogg Vorbis -------------------------------
1100 if test x$enable_tremor != xyes -a test x$enable_vorbis = xyes; then
1101 PKG_CHECK_MODULES(VORBIS, [ogg vorbis vorbisfile],
1105 if test x$enable_vorbis = xyes; then
1106 AC_DEFINE(ENABLE_VORBIS_DECODER, 1, [Define for Ogg Vorbis support]),
1110 AM_CONDITIONAL(ENABLE_VORBIS_DECODER, test x$enable_vorbis = xyes)
1112 dnl --------------------------------- sidplay ---------------------------------
1113 found_sidplay=$HAVE_CXX
1114 MPD_AUTO_PRE(sidplay, [sidplay decoder plugin], [No C++ compiler found])
1116 if test x$enable_sidplay != xno; then
1117 # we're not using pkg-config here
1118 # because libsidplay2's .pc file requires libtool
1119 AC_HAVE_LIBRARY(sidplay2, [found_sidplay=yes], [found_sidplay=no])
1120 MPD_AUTO_PRE(sidplay, [sidplay decoder plugin],
1121 [libsidplay2 not found])
1124 if test x$enable_sidplay != xno; then
1125 # can't use AC_HAVE_LIBRARY here, because the dash in the
1126 # library name triggers an autoconf bug
1127 AC_CHECK_LIB(resid-builder, main,
1128 [found_sidplay=yes], [found_sidplay=no])
1130 if test x$found_sidplay = xyes; then
1131 AC_HAVE_LIBRARY(sidutils,, [found_sidplay=no])
1134 MPD_AUTO_RESULT(sidplay, [sidplay decoder plugin],
1135 [libresid-builder or libsidutils not found])
1138 if test x$enable_sidplay = xyes; then
1139 AC_SUBST(SIDPLAY_LIBS,"-lsidplay2 -lresid-builder -lsidutils")
1140 AC_SUBST(SIDPLAY_CFLAGS,)
1142 AC_DEFINE(ENABLE_SIDPLAY, 1, [Define for libsidplay2 support])
1145 AM_CONDITIONAL(ENABLE_SIDPLAY, test x$enable_sidplay = xyes)
1147 dnl --------------------------------- wavpack ---------------------------------
1148 MPD_AUTO_PKG(wavpack, WAVPACK, [wavpack],
1149 [WavPack decoder plugin], [libwavpack not found])
1150 AM_CONDITIONAL(HAVE_WAVPACK, test x$enable_wavpack = xyes)
1151 if test x$enable_wavpack = xyes; then
1152 AC_DEFINE([HAVE_WAVPACK], 1, [Define to enable WavPack support])
1155 dnl --------------------------------- WildMidi --------------------------------
1156 if test x$enable_wildmidi = xyes; then
1159 oldcppflags=$CPPFLAGS
1161 AC_CHECK_LIB(WildMidi, WildMidi_Init,,
1162 AC_MSG_ERROR([libwildmidi not found]))
1166 CPPFLAGS=$oldcppflags
1168 AC_SUBST(WILDMIDI_LIBS,-lWildMidi)
1169 AC_SUBST(WILDMIDI_CFLAGS,)
1171 AC_DEFINE(ENABLE_WILDMIDI, 1, [Define for wildmidi support])
1174 AM_CONDITIONAL(ENABLE_WILDMIDI, test x$enable_wildmidi = xyes)
1176 dnl ------------------------ Post Decoder Plugins Tests -----------------------
1178 AM_CONDITIONAL(HAVE_OGG_COMMON,
1179 test x$enable_vorbis = xyes || test x$enable_oggflac = xyes || test x$enable_flac = xyes)
1181 AM_CONDITIONAL(HAVE_FLAC_COMMON,
1182 test x$enable_flac = xyes || test x$enable_oggflac = xyes)
1184 dnl ---------------------------------------------------------------------------
1185 dnl Encoders for Streaming Audio Output Plugins
1186 dnl ---------------------------------------------------------------------------
1188 dnl ------------------------------- Encoder API -------------------------------
1189 if test x$enable_shout = xyes || \
1190 test x$enable_recorder_output = xyes || \
1191 test x$enable_httpd_output = xyes; then
1192 # at least one output using encoders is explicitly enabled
1194 elif test x$enable_shout = xauto || \
1195 test x$enable_recorder_output = xauto || \
1196 test x$enable_httpd_output = xauto; then
1199 # all outputs using encoders are disabled
1202 # don't bother to check for encoder plugins
1203 enable_vorbis_encoder=no
1204 enable_lame_encoder=no
1205 enable_twolame_encoder=no
1206 enable_wave_encoder=no
1207 enable_flac_encoder=no
1210 dnl ------------------------------- FLAC Encoder ------------------------------
1211 if test x$enable_flac_encoder = xyes; then
1212 AC_DEFINE(ENABLE_FLAC_ENCODER, 1,
1213 [Define to enable the FLAC encoder plugin])
1215 AM_CONDITIONAL(ENABLE_FLAC_ENCODER, test x$enable_flac_encoder = xyes)
1217 dnl ---------------------------- Ogg Vorbis Encoder ---------------------------
1218 MPD_AUTO_PKG(vorbis_encoder, VORBISENC, [vorbisenc],
1219 [Ogg Vorbis encoder], [libvorbisenc not found])
1221 dnl ------------------------------- LAME Encoder ------------------------------
1222 if test x$enable_vorbis_encoder = xyes; then
1223 AC_DEFINE(ENABLE_VORBIS_ENCODER, 1,
1224 [Define to enable the vorbis encoder plugin])
1226 AM_CONDITIONAL(ENABLE_VORBIS_ENCODER, test x$enable_vorbis_encoder = xyes)
1228 if test x$enable_lame_encoder != xno; then
1229 AC_CHECK_HEADERS(lame/lame.h,,
1230 [AC_CHECK_HEADERS(lame.h,, using_lame=no)])
1231 AC_CHECK_LIB(mp3lame, lame_init,, using_lame=no)
1232 if test x$using_lame != xno; then
1233 AC_DEFINE(HAVE_LAME, 1, [Define to 1 if you have lame 3.98 or greater.])
1234 LAME_LIBS="-lmp3lame -lm"
1235 enable_lame_encoder=yes
1238 if test "$enable_lame_encoder" = "yes" -a "$using_lame" = "no"; then
1239 AC_MSG_ERROR([LAME libraries and development support files not found.])
1245 if test x$enable_lame_encoder = xyes; then
1246 AC_DEFINE(ENABLE_LAME_ENCODER, 1,
1247 [Define to enable the lame encoder plugin])
1249 AM_CONDITIONAL(ENABLE_LAME_ENCODER, test x$enable_lame_encoder = xyes)
1251 dnl ----------------------------- TwoLAME Encoder -----------------------------
1252 MPD_AUTO_PKG(twolame_encoder, TWOLAME, [twolame],
1253 [TwoLAME encoder], [libtwolame not found])
1255 if test x$enable_twolame_encoder = xyes; then
1256 AC_DEFINE(ENABLE_TWOLAME_ENCODER, 1,
1257 [Define to enable the TwoLAME encoder plugin])
1259 AM_CONDITIONAL(ENABLE_TWOLAME_ENCODER, test x$enable_twolame_encoder = xyes)
1261 dnl ------------------------------- WAVE Encoder ------------------------------
1262 AM_CONDITIONAL(ENABLE_WAVE_ENCODER, test x$enable_wave_encoder = xyes)
1263 if test x$enable_wave_encoder = xyes; then
1264 AC_DEFINE(ENABLE_WAVE_ENCODER, 1,
1265 [Define to enable the PCM wave encoder plugin])
1268 dnl --------------------------- encoder plugins test --------------------------
1269 if test x$enable_vorbis_encoder != xno ||
1270 test x$enable_lame_encoder != xno ||
1271 test x$enable_twolame_encoder != xno ||
1272 test x$enable_flac_encoder != xno ||
1273 test x$enable_wave_encoder != xno; then
1274 # at least one encoder plugin is enabled
1277 # no encoder plugin is enabled: disable the whole encoder API
1280 if test x$need_encoder = xyes; then
1281 AC_MSG_ERROR([No encoder plugin found])
1285 if test x$enable_encoder = xyes; then
1286 AC_DEFINE(ENABLE_ENCODER, 1,
1287 [Define to enable the encoder plugins])
1289 AM_CONDITIONAL(ENABLE_ENCODER, test x$enable_encoder = xyes)
1291 dnl ---------------------------------------------------------------------------
1292 dnl Audio Output Plugins (Streaming)
1293 dnl ---------------------------------------------------------------------------
1296 dnl ------------------------------- HTTPD Output ------------------------------
1297 if test x$enable_httpd_output = xauto; then
1298 # handle HTTPD auto-detection: disable if no encoder is
1300 if test x$enable_encoder = xyes; then
1301 enable_httpd_output=yes
1303 AC_MSG_WARN([No encoder plugin -- disabling the HTTP output plugin])
1304 enable_httpd_output=no
1308 if test x$enable_httpd_output = xyes; then
1309 AC_DEFINE(ENABLE_HTTPD_OUTPUT, 1, [Define to enable the HTTP server output])
1311 AM_CONDITIONAL(ENABLE_HTTPD_OUTPUT, test x$enable_httpd_output = xyes)
1313 if test x$enable_shout = xauto; then
1314 # handle shout auto-detection: disable if no encoder is
1316 if test x$enable_encoder = xyes; then
1319 AC_MSG_WARN([No encoder plugin -- disabling the shout output plugin])
1324 if test x$enable_recorder_output = xauto; then
1325 # handle recorder auto-detection: disable if no encoder is
1327 if test x$enable_encoder = xyes; then
1328 enable_recorder_output=yes
1330 AC_MSG_WARN([No encoder plugin -- disabling the recorder output plugin])
1331 enable_recorder_output=no
1335 AM_CONDITIONAL(HAVE_SHOUT, test x$enable_shout = xyes)
1336 if test x$enable_shout = xyes; then
1337 AC_DEFINE(HAVE_SHOUT, 1, [Define to enable the shoutcast output])
1340 AM_CONDITIONAL(ENABLE_RECORDER_OUTPUT, test x$enable_recorder_output = xyes)
1341 if test x$enable_recorder_output = xyes; then
1342 AC_DEFINE(ENABLE_RECORDER_OUTPUT, 1, [Define to enable the recorder output])
1346 dnl ---------------------------------------------------------------------------
1348 dnl ---------------------------------------------------------------------------
1351 if test x$enable_documentation = xyes; then
1352 AC_PATH_PROG(XMLTO, xmlto)
1354 AM_CONDITIONAL(HAVE_XMLTO, test x$XMLTO != x)
1356 AC_PATH_PROG(DOXYGEN, doxygen)
1357 if test x$DOXYGEN = x; then
1358 AC_MSG_ERROR([doxygen not found])
1363 AM_CONDITIONAL(HAVE_XMLTO, false)
1366 AM_CONDITIONAL(ENABLE_DOCUMENTATION, test x$enable_documentation = xyes)
1374 if test "x$enable_werror" = xyes; then
1375 AM_CFLAGS="$AM_CFLAGS -Werror -pedantic-errors"
1378 #if test "x$enable_debug" = xno; then
1379 # don't set NDEBUG for now, until MPD is stable
1380 #AM_CFLAGS="$AM_CFLAGS -DNDEBUG"
1383 if test "x$enable_gprof" = xyes; then
1384 MPD_CFLAGS="$MPD_CFLAGS -pg"
1385 MPD_LIBS="$MPD_LIBS -pg"
1388 dnl ---------------------------------------------------------------------------
1390 dnl ---------------------------------------------------------------------------
1391 AM_CONDITIONAL(ENABLE_TEST, test "x$enable_test" = xyes)
1393 dnl ---------------------------------------------------------------------------
1395 dnl ---------------------------------------------------------------------------
1396 if test x$GCC = xyes
1398 MPD_CHECK_FLAG([-Wall])
1399 MPD_CHECK_FLAG([-Wextra])
1400 MPD_CHECK_FLAG([-Wno-deprecated-declarations])
1401 MPD_CHECK_FLAG([-Wmissing-prototypes])
1402 MPD_CHECK_FLAG([-Wshadow])
1403 MPD_CHECK_FLAG([-Wpointer-arith])
1404 MPD_CHECK_FLAG([-Wstrict-prototypes])
1405 MPD_CHECK_FLAG([-Wcast-qual])
1406 MPD_CHECK_FLAG([-Wwrite-strings])
1407 MPD_CHECK_FLAG([-pedantic])
1410 dnl ---------------------------------------------------------------------------
1411 dnl Pretty-Print Results
1412 dnl ---------------------------------------------------------------------------
1414 echo "########### MPD CONFIGURATION ############"
1417 echo " Client Support:"
1418 if test x$enable_ipv6 = xyes; then
1419 echo " IPv6 support ..................enabled"
1421 echo " IPv6 support ..................disabled"
1424 if test x$enable_tcp = xyes; then
1425 echo " TCP support ...................enabled"
1427 echo " TCP support ...................disabled"
1430 if test x$enable_un = xyes; then
1431 echo " Unix domain socket support ....enabled"
1433 echo " Unix domain socket support ....disabled"
1439 test x$enable_tcp = xno &&
1440 test x$enable_un = xno; then
1441 AC_MSG_ERROR([No client interfaces configured!])
1444 echo " Playback Support:"
1445 if test x$enable_alsa = xyes; then
1446 echo " ALSA support ..................enabled"
1448 echo " ALSA support ..................disabled"
1451 if test x$enable_fifo = xyes; then
1452 echo " FIFO support ..................enabled"
1454 echo " FIFO support ..................disabled"
1457 if test x$enable_recorder_output = xyes; then
1458 echo " File Recorder support .........enabled"
1460 echo " File Recorder support .........disabled"
1463 if test x$enable_httpd_output = xyes; then
1464 echo " HTTP daemon support ...........enabled"
1466 echo " HTTP daemon support ...........disabled"
1469 if test x$enable_jack = xyes; then
1470 echo " JACK support ..................enabled"
1472 echo " JACK support ..................disabled"
1475 if test x$enable_ao = xyes; then
1476 echo " libao support .................enabled"
1478 echo " libao support .................disabled"
1481 if test x$enable_oss = xyes; then
1482 echo " OSS support ...................enabled"
1484 echo " OSS support ...................disabled"
1487 if test x$enable_openal = xyes; then
1488 echo " OpenAL support ................enabled"
1490 echo " OpenAL support ................disabled"
1493 if test x$enable_osx = xyes; then
1494 echo " OS X support ..................enabled"
1496 echo " OS X support ..................disabled"
1499 if test x$enable_pipe_output = xyes; then
1500 echo " Pipeline output support .......enabled"
1502 echo " Pipeline output support .......disabled"
1505 if test x$enable_pulse = xyes; then
1506 echo " PulseAudio support ............enabled"
1508 echo " PulseAudio support ............disabled"
1511 if test x$enable_mvp = xyes; then
1512 echo " Media MVP support .............enabled"
1514 echo " Media MVP support .............disabled"
1517 if test x$enable_shout = xyes; then
1518 echo " SHOUTcast support .............enabled"
1520 echo " SHOUTcast support .............disabled"
1523 if test x$enable_solaris_output = xyes; then
1524 echo " Solaris /dev/audio support ....enabled"
1526 echo " Solaris /dev/audio support ....disabled"
1532 test x$enable_ao = xno &&
1533 test x$enable_oss = xno &&
1534 test x$enable_openal = xno &&
1535 test x$enable_shout = xno &&
1536 test x$enable_recorder_output = xno &&
1537 test x$enable_httpd_output = xno &&
1538 test x$enable_solaris_output = xno &&
1539 test x$enable_alsa = xno &&
1540 test x$enable_osx = xno &&
1541 test x$enable_pulse = xno &&
1542 test x$enable_jack = xno &&
1543 test x$enable_fifo = xno &&
1544 test x$enable_pipe_output = xno &&
1545 test x$enable_mvp = xno; then
1546 AC_MSG_ERROR([No Audio Output types configured!])
1550 test x$enable_shout = xyes ||
1551 test x$enable_recorder = xyes ||
1552 test x$enable_httpd_output = xyes; then
1553 echo " Streaming Encoder Support:"
1554 if test x$enable_lame_encoder = xyes; then
1555 echo " LAME mp3 encoder ..............enabled"
1557 echo " LAME mp3 encoder ..............disabled"
1560 if test x$enable_vorbis_encoder = xyes; then
1561 echo " Ogg Vorbis encoder ............enabled"
1563 echo " Ogg Vorbis encoder ............disabled"
1566 if test x$enable_twolame_encoder = xyes; then
1567 echo " TwoLAME mp3 encoder ...........enabled"
1569 echo " TwoLAME mp3 encoder ...........disabled"
1572 if test x$enable_flac_encoder = xyes; then
1573 echo " FLAC encoder ..................enabled"
1575 echo " FLAC encoder ..................disabled"
1578 if test x$enable_wave_encoder = xyes; then
1579 echo " PCM wave encoder ..............enabled"
1581 echo " PCM wave encoder ..............disabled"
1587 echo " File Format Support:"
1589 if test x$enable_aac = xyes; then
1590 echo " AAC support ...................enabled"
1592 echo " AAC support ...................disabled"
1595 if test x$enable_sidplay = xyes; then
1596 echo " C64 SID support ...............enabled"
1598 echo " C64 SID support ...............disabled"
1601 if test x$enable_ffmpeg = xyes; then
1602 echo " FFMPEG support ................enabled"
1604 echo " FFMPEG support ................disabled"
1607 if test x$enable_flac = xyes; then
1608 echo " FLAC support ..................enabled"
1610 echo " FLAC support ..................disabled"
1613 if test x$enable_fluidsynth = xyes; then
1614 echo " fluidsynth MIDI support .......enabled"
1616 echo " fluidsynth MIDI support .......disabled"
1619 if test x$enable_mikmod = xyes; then
1620 echo " MikMod support ................enabled"
1622 echo " MikMod support ................disabled"
1625 if test x$enable_modplug = xyes; then
1626 echo " MODPLUG support ...............enabled"
1628 echo " MODPLUG support ...............disabled"
1631 if test x$enable_gme = xyes; then
1632 echo " GME support ....................enabled"
1634 echo " GME support ...................disabled"
1637 if test x$enable_mad = xyes; then
1638 echo " MAD mp3 decoder support .......enabled"
1640 echo " MAD mp3 decoder support .......disabled"
1643 if test x$enable_mpg123 = xyes; then
1644 echo " libmpg123 decoder support .....enabled"
1646 echo " libmpg123 decoder support .....disabled"
1649 if test x$enable_mp4 = xyes; then
1650 echo " MP4 support ...................enabled"
1652 echo " MP4 support ...................disabled"
1655 if test x$enable_mpc = xyes; then
1656 echo " Musepack (MPC) support ........enabled"
1658 echo " Musepack (MPC) support ........disabled"
1661 case $enable_oggflac in
1663 echo " OggFLAC support ...............enabled"
1666 echo " OggFLAC support ...............enabled(FLAC 1.1.3)"
1669 echo " OggFLAC support ...............disabled"
1673 if test x$enable_vorbis = xyes; then
1674 echo " Ogg Vorbis support ............enabled"
1675 if test x$use_tremor = xyes; then
1676 echo " using tremor.................yes"
1678 echo " using tremor.................no"
1681 echo " Ogg Vorbis support ............disabled"
1684 if test x$enable_sndfile = xyes; then
1685 echo " libsndfile ....................enabled"
1687 echo " libsndfile ....................disabled"
1690 if test x$enable_audiofile = xyes; then
1691 echo " Wave file support .............enabled"
1693 echo " Wave file support .............disabled"
1696 if test x$enable_wavpack = xyes; then
1697 echo " WavPack support ...............enabled"
1699 echo " WavPack support ...............disabled"
1702 if test x$enable_wildmidi = xyes; then
1703 echo " wildmidi MIDI support .........enabled"
1705 echo " wildmidi MIDI support .........disabled"
1711 test x$enable_mad = xno &&
1712 test x$enable_mpg123 = xno &&
1713 test x$enable_vorbis = xno &&
1714 test x$enable_flac = xno &&
1715 test x$enable_oggflac = xno &&
1716 test x$enable_audiofile = xno &&
1717 test x$enable_aac = xno &&
1718 test x$enable_mpc = xno &&
1719 test x$enable_wavpack = xno &&
1720 test x$enable_ffmpeg = xno &&
1721 test x$enable_modplug = xno &&
1722 test x$enable_sidplay = xno &&
1723 test x$enable_gme = xno &&
1724 test x$enable_fluidsynth = xno &&
1725 test x$enable_wildmidi = xno &&
1726 test x$enable_mp4 = xno &&
1727 test x$enable_mikmod = xno; then
1728 AC_MSG_ERROR([No input plugins supported!])
1732 echo " Archive support:"
1734 if test x$enable_bzip2 = xyes; then
1735 echo " BZ2 archives support ..........enabled"
1737 echo " BZ2 archives support ..........disabled"
1740 if test x$enable_iso9660 = xyes; then
1741 echo " ISO 9660 archives support .....enabled"
1743 echo " ISO 9660 archives support .....disabled"
1746 if test x$enable_zzip = xyes; then
1747 echo " ZIP archives support ..........enabled"
1749 echo " ZIP archives support ..........disabled"
1753 echo " Streaming support:"
1755 if test x$enable_lastfm = xyes; then
1756 echo " last.fm radio support .........enabled"
1758 echo " last.fm radio support .........disabled"
1761 if test x$enable_curl = xyes; then
1762 echo " libcurl support (streaming) ...enabled"
1764 echo " libcurl support (streaming) ...disabled"
1767 if test x$enable_mms = xyes; then
1768 echo " libmms support ................enabled"
1770 echo " libmms support ................disabled"
1774 echo " Other features:"
1776 if test x$enable_id3 = xyes; then
1777 echo " ID3 tag support ...............enabled"
1779 echo " ID3 tag support ...............disabled"
1782 if test x$enable_lsr = xyes; then
1783 echo " libsamplerate support .........enabled"
1785 echo " libsamplerate support .........disabled"
1788 if test x$with_zeroconf != xno; then
1789 echo " Zeroconf support ..............$with_zeroconf"
1791 echo " Zeroconf support ..............disabled"
1794 if test x$enable_cue = xyes; then
1795 echo " libcue support ................enabled"
1797 echo " libcue support ................disabled"
1800 if test x$enable_inotify = xyes; then
1801 echo " Inotify support (autoupdate) ..enabled"
1803 echo " Inotify support (autoupdate) ..disabled"
1807 echo "##########################################"
1810 if test x$enable_sndfile = xyes && test x$enable_modplug = xyes; then
1811 AC_MSG_WARN([compilation may fail, because libmodplug conflicts with libsndfile])
1812 AC_MSG_WARN([libmodplug ships modplug/sndfile.h, which hides libsndfile's sndfile.h])
1815 echo "Generating needed files for compilation"
1826 echo "You are now ready to compile MPD"
1827 echo "Type \"make\" to compile MPD"