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 ----------------------------------- FLAC ----------------------------------
854 if test x$enable_flac = xyes; then
855 PKG_CHECK_MODULES(FLAC, [flac >= 1.1],
856 AC_DEFINE(HAVE_FLAC, 1, [Define for FLAC support]),
861 CFLAGS="$CFLAGS $FLAC_CFLAGS"
862 LIBS="$LIBS $FLAC_LIBS"
863 if test x$enable_flac = xyes && test x$enable_oggflac = xyes; then
864 AC_CHECK_DECL(FLAC_API_SUPPORTS_OGG_FLAC,
865 [enable_oggflac=flac], [],
866 [#include <FLAC/export.h>])
872 AM_CONDITIONAL(HAVE_FLAC, test x$enable_flac = xyes)
874 enable_flac_encoder=$enable_flac
876 dnl -------------------------------- FluidSynth -------------------------------
877 if test x$enable_fluidsynth = xyes; then
878 PKG_CHECK_MODULES(FLUIDSYNTH, [fluidsynth],
879 AC_DEFINE(ENABLE_FLUIDSYNTH, 1, [Define for fluidsynth support]),
880 enable_fluidsynth=no)
883 AM_CONDITIONAL(ENABLE_FLUIDSYNTH, test x$enable_fluidsynth = xyes)
885 dnl ---------------------------------- libgme ---------------------------------
886 MPD_AUTO_PKG(gme, GME, [libgme],
887 [gme decoder plugin], [libgme not found])
888 AM_CONDITIONAL(HAVE_GME, test x$enable_gme = xyes)
889 if test x$enable_gme = xyes; then
890 AC_DEFINE(HAVE_GME, 1, [Define for gme support])
893 dnl ---------------------------------- libmad ---------------------------------
894 MPD_AUTO_PKG(mad, MAD, [mad],
895 [libmad MP3 decoder plugin], [libmad not found])
896 if test x$enable_mad = xyes; then
897 AC_DEFINE(HAVE_MAD, 1, [Define to use libmad])
899 AM_CONDITIONAL(HAVE_MAD, test x$enable_mad = xyes)
901 enable_shout2="$enable_shout"
902 MPD_AUTO_PKG(shout, SHOUT, [shout],
903 [shout output plugin], [libshout not found])
904 if test x$enable_shout = xyes && test x$enable_shout2 = xauto; then
908 dnl -------------------------------- libmpg123 --------------------------------
909 MPD_AUTO_PKG(mpg123, MPG123, [libmpg123],
910 [libmpg123 decoder plugin], [libmpg123 not found])
911 if test x$enable_mpg123 = xyes; then
912 AC_DEFINE(HAVE_MPG123, 1, [Define to use libmpg123])
914 AM_CONDITIONAL(HAVE_MPG123, test x$enable_mpg123 = xyes)
916 dnl -------------------------------- libmikmod --------------------------------
917 if test x$enable_mikmod = xyes; then
918 AC_PATH_PROG(LIBMIKMOD_CONFIG, libmikmod-config)
919 if test x$LIBMIKMOD_CONFIG != x ; then
920 AC_SUBST(LIBMIKMOD_CFLAGS, `$LIBMIKMOD_CONFIG --cflags`)
921 AC_SUBST(LIBMIKMOD_LIBS, `$LIBMIKMOD_CONFIG --libs`)
922 AC_DEFINE(ENABLE_MIKMOD_DECODER, 1, [Define for mikmod support])
928 AM_CONDITIONAL(ENABLE_MIKMOD_DECODER, test x$enable_mikmod = xyes)
930 dnl -------------------------------- libmodplug -------------------------------
931 found_modplug=$HAVE_CXX
932 MPD_AUTO_PRE(modplug, [modplug decoder plugin], [No C++ compiler found])
934 MPD_AUTO_PKG(modplug, MODPLUG, [libmodplug],
935 [modplug decoder plugin], [libmodplug not found])
937 if test x$enable_modplug = xyes; then
938 AC_DEFINE(HAVE_MODPLUG, 1, [Define for modplug support])
940 AM_CONDITIONAL(HAVE_MODPLUG, test x$enable_modplug = xyes)
942 dnl --------------------------- sndfile/modplug test --------------------------
943 if test x$enable_sndfile = xauto && test x$enable_modplug = xyes; then
944 dnl If modplug is enabled, enable sndfile only if explicitly
945 dnl requested - modplug's modplug/sndfile.h is known to
946 dnl conflict with libsndfile's sndfile.h.
947 AC_MSG_NOTICE([disabling libsndfile auto-detection, because the modplug decoder is enabled])
951 dnl -------------------------------- libsndfile -------------------------------
952 MPD_AUTO_PKG(sndfile, SNDFILE, [sndfile],
953 [libsndfile decoder plugin], [libsndfile not found])
955 if test x$enable_sndfile = xyes; then
956 AC_DEFINE(ENABLE_SNDFILE, 1, [Define to enable the sndfile decoder plugin])
958 AM_CONDITIONAL(ENABLE_SNDFILE, test x$enable_sndfile = xyes)
960 dnl --------------------------------- musepack --------------------------------
961 if test x$enable_mpc = xyes; then
962 if test "x$mpcdec_libraries" != "x" ; then
963 MPCDEC_LIBS="-L$mpcdec_libraries"
964 elif test "x$mpcdec_prefix" != "x" ; then
965 MPCDEC_LIBS="-L$mpcdec_prefix/lib"
968 MPCDEC_LIBS="$MPCDEC_LIBS -lmpcdec"
970 if test "x$mpcdec_includes" != "x" ; then
971 MPCDEC_CFLAGS="-I$mpcdec_includes"
972 elif test "x$mpcdec_prefix" != "x" ; then
973 MPCDEC_CFLAGS="-I$mpcdec_prefix/include"
978 oldcppflags=$CPPFLAGS
979 CFLAGS="$CFLAGS $MPD_CFLAGS $MPCDEC_CFLAGS -I."
980 LIBS="$LIBS $MPD_LIBS $MPCDEC_LIBS"
982 AC_CHECK_HEADER(mpc/mpcdec.h,
984 [AC_CHECK_HEADER(mpcdec/mpcdec.h,
987 if test x$enable_mpc = xyes; then
988 AC_CHECK_LIB(mpcdec,main,
989 [MPD_LIBS="$MPD_LIBS $MPCDEC_LIBS";
990 MPD_CFLAGS="$MPD_CFLAGS $MPCDEC_CFLAGS";],
993 if test x$enable_mpc = xyes; then
994 AC_DEFINE(HAVE_MPCDEC,1,
995 [Define to use libmpcdec for MPC decoding])
996 if test x$old_mpcdec = xyes; then
997 AC_DEFINE(MPC_IS_OLD_API, 1,
998 [Define if an old pre-SV8 libmpcdec is used])
1001 AC_MSG_WARN([mpcdec lib needed for MPC support -- disabling MPC support])
1005 CPPFLAGS=$oldcppflags
1008 AM_CONDITIONAL(HAVE_MPCDEC, test x$enable_mpc = xyes)
1010 dnl -------------------------------- Ogg Tremor -------------------------------
1011 if test x$with_tremor = xyes || test x$with_tremor = xno; then
1012 use_tremor="$with_tremor"
1014 tremor_prefix="$with_tremor"
1018 if test x$use_tremor = xyes; then
1019 if test "x$tremor_libraries" != "x" ; then
1020 TREMOR_LIBS="-L$tremor_libraries"
1021 elif test "x$tremor_prefix" != "x" ; then
1022 TREMOR_LIBS="-L$tremor_prefix/lib"
1024 TREMOR_LIBS="$TREMOR_LIBS -lvorbisidec"
1025 if test "x$tremor_includes" != "x" ; then
1026 TREMOR_CFLAGS="-I$tremor_includes"
1027 elif test "x$tremor_prefix" != "x" ; then
1028 TREMOR_CFLAGS="-I$tremor_prefix/include"
1030 ac_save_CFLAGS="$CFLAGS"
1031 ac_save_LIBS="$LIBS"
1032 CFLAGS="$CFLAGS $TREMOR_CFLAGS"
1033 LIBS="$LIBS $TREMOR_LIBS"
1034 AC_CHECK_LIB(vorbisidec,ov_read,enable_vorbis=yes,enable_vorbis=no;
1035 AC_MSG_WARN([vorbisidec lib needed for ogg support with tremor -- disabling ogg support]))
1036 CFLAGS="$ac_save_CFLAGS"
1037 LIBS="$ac_save_LIBS"
1038 if test x$enable_vorbis = xyes; then
1039 AC_DEFINE(ENABLE_VORBIS_DECODER, 1, [Define for Ogg Vorbis support])
1043 if test x$use_tremor = xyes; then
1044 AC_DEFINE(HAVE_TREMOR,1,
1045 [Define to use tremor (libvorbisidec) for ogg support])
1046 if test x$enable_oggflac = xyes; then
1047 AC_MSG_WARN([disabling OggFLAC support because it is incompatible with tremor])
1052 AC_SUBST(TREMOR_CFLAGS)
1053 AC_SUBST(TREMOR_LIBS)
1055 dnl --------------------------------- OggFLAC ---------------------------------
1056 dnl OggFLAC must go after Ogg Tremor
1057 if test x$enable_oggflac = xyes; then
1058 oldmpdcflags="$MPD_CFLAGS"
1059 oldmpdlibs="$MPD_LIBS"
1060 AM_PATH_LIBOGGFLAC(MPD_LIBS="$MPD_LIBS $LIBOGGFLAC_LIBS"
1061 MPD_CFLAGS="$MPD_CFLAGS $LIBOGGFLAC_CFLAGS",
1065 if test x$enable_oggflac = xyes; then
1066 AC_DEFINE(HAVE_OGGFLAC,1,[Define for OggFLAC support])
1069 AM_CONDITIONAL(HAVE_OGGFLAC, test x$enable_oggflac = xyes)
1071 AM_CONDITIONAL(HAVE_FLAC_COMMON,
1072 test x$enable_flac = xyes || test x$enable_oggflac = xyes)
1074 dnl -------------------------------- Ogg Vorbis -------------------------------
1075 if test x$enable_tremor != xyes -a test x$enable_vorbis = xyes; then
1076 PKG_CHECK_MODULES(VORBIS, [ogg vorbis vorbisfile],
1077 AC_DEFINE(ENABLE_VORBIS_DECODER, 1, [Define for Ogg Vorbis support]),
1081 AM_CONDITIONAL(ENABLE_VORBIS_DECODER, test x$enable_vorbis = xyes)
1083 AM_CONDITIONAL(HAVE_OGG_COMMON,
1084 test x$enable_vorbis = xyes || test x$enable_oggflac = xyes || test x$enable_flac = xyes)
1086 dnl --------------------------------- sidplay ---------------------------------
1087 found_sidplay=$HAVE_CXX
1088 MPD_AUTO_PRE(sidplay, [sidplay decoder plugin], [No C++ compiler found])
1090 if test x$enable_sidplay != xno; then
1091 # we're not using pkg-config here
1092 # because libsidplay2's .pc file requires libtool
1093 AC_HAVE_LIBRARY(sidplay2, [found_sidplay=yes], [found_sidplay=no])
1094 MPD_AUTO_PRE(sidplay, [sidplay decoder plugin],
1095 [libsidplay2 not found])
1098 if test x$enable_sidplay != xno; then
1099 # can't use AC_HAVE_LIBRARY here, because the dash in the
1100 # library name triggers an autoconf bug
1101 AC_CHECK_LIB(resid-builder, main,
1102 [found_sidplay=yes], [found_sidplay=no])
1104 if test x$found_sidplay = xyes; then
1105 AC_HAVE_LIBRARY(sidutils,, [found_sidplay=no])
1108 MPD_AUTO_RESULT(sidplay, [sidplay decoder plugin],
1109 [libresid-builder or libsidutils not found])
1112 if test x$enable_sidplay = xyes; then
1113 AC_SUBST(SIDPLAY_LIBS,"-lsidplay2 -lresid-builder -lsidutils")
1114 AC_SUBST(SIDPLAY_CFLAGS,)
1116 AC_DEFINE(ENABLE_SIDPLAY, 1, [Define for libsidplay2 support])
1119 AM_CONDITIONAL(ENABLE_SIDPLAY, test x$enable_sidplay = xyes)
1121 dnl --------------------------------- wavpack ---------------------------------
1122 MPD_AUTO_PKG(wavpack, WAVPACK, [wavpack],
1123 [WavPack decoder plugin], [libwavpack not found])
1124 AM_CONDITIONAL(HAVE_WAVPACK, test x$enable_wavpack = xyes)
1125 if test x$enable_wavpack = xyes; then
1126 AC_DEFINE([HAVE_WAVPACK], 1, [Define to enable WavPack support])
1132 MPD_AUTO_PKG(ffmpeg, FFMPEG, [libavformat libavcodec libavutil],
1133 [ffmpeg decoder library], [libavformat+libavcodec+libavutil not found])
1135 if test x$enable_ffmpeg = xyes; then
1137 LIBS="$LIBS $FFMPEG_LIBS"
1138 AC_CHECK_LIB(avcodec, avcodec_decode_audio2,,
1143 if test x$enable_ffmpeg = xyes; then
1144 # prior to ffmpeg svn12865, you had to specify include files
1145 # without path prefix
1146 old_CPPCFLAGS=$CPPFLAGS
1147 CPPFLAGS="$CPPFLAGS $FFMPEG_CFLAGS"
1148 AC_CHECK_HEADER(libavcodec/avcodec.h,,
1149 AC_DEFINE(OLD_FFMPEG_INCLUDES, 1,
1150 [Define if avcodec.h instead of libavcodec/avcodec.h should be included]))
1151 CPPCFLAGS=$old_CPPFLAGS
1154 if test x$enable_ffmpeg = xyes; then
1155 AC_DEFINE(HAVE_FFMPEG, 1, [Define for FFMPEG support])
1158 AM_CONDITIONAL(HAVE_FFMPEG, test x$enable_ffmpeg = xyes)
1162 if test x$enable_wildmidi = xyes; then
1165 oldcppflags=$CPPFLAGS
1167 AC_CHECK_LIB(WildMidi, WildMidi_Init,,
1168 AC_MSG_ERROR([libwildmidi not found]))
1172 CPPFLAGS=$oldcppflags
1174 AC_SUBST(WILDMIDI_LIBS,-lWildMidi)
1175 AC_SUBST(WILDMIDI_CFLAGS,)
1177 AC_DEFINE(ENABLE_WILDMIDI, 1, [Define for wildmidi support])
1180 AM_CONDITIONAL(ENABLE_WILDMIDI, test x$enable_wildmidi = xyes)
1184 dnl Encoder API and shout/httpd output plugin
1187 if test x$enable_shout = xyes || \
1188 test x$enable_recorder_output = xyes || \
1189 test x$enable_httpd_output = xyes; then
1190 # at least one output using encoders is explicitly enabled
1192 elif test x$enable_shout = xauto || \
1193 test x$enable_recorder_output = xauto || \
1194 test x$enable_httpd_output = xauto; then
1197 # all outputs using encoders are disabled
1200 # don't bother to check for encoder plugins
1201 enable_vorbis_encoder=no
1202 enable_lame_encoder=no
1203 enable_twolame_encoder=no
1204 enable_wave_encoder=no
1205 enable_flac_encoder=no
1208 MPD_AUTO_PKG(vorbis_encoder, VORBISENC, [vorbisenc],
1209 [Ogg Vorbis encoder], [libvorbisenc not found])
1211 if test x$enable_lame_encoder != xno; then
1212 AC_CHECK_HEADERS(lame/lame.h,,
1213 [AC_CHECK_HEADERS(lame.h,, using_lame=no)])
1214 AC_CHECK_LIB(mp3lame, lame_init,, using_lame=no)
1215 if test x$using_lame != xno; then
1216 AC_DEFINE(HAVE_LAME, 1, [Define to 1 if you have lame 3.98 or greater.])
1217 LAME_LIBS="-lmp3lame -lm"
1218 enable_lame_encoder=yes
1221 if test "$enable_lame_encoder" = "yes" -a "$using_lame" = "no"; then
1222 AC_MSG_ERROR([LAME libraries and development support files not found.])
1228 MPD_AUTO_PKG(twolame_encoder, TWOLAME, [twolame],
1229 [TwoLAME encoder], [libtwolame not found])
1231 if test x$enable_vorbis_encoder != xno ||
1232 test x$enable_lame_encoder != xno ||
1233 test x$enable_twolame_encoder != xno ||
1234 test x$enable_flac_encoder != xno ||
1235 test x$enable_wave_encoder != xno; then
1236 # at least one encoder plugin is enabled
1239 # no encoder plugin is enabled: disable the whole encoder API
1242 if test x$need_encoder = xyes; then
1243 AC_MSG_ERROR([No encoder plugin found])
1248 if test x$enable_shout = xauto; then
1249 # handle shout auto-detection: disable if no encoder is
1251 if test x$enable_encoder = xyes; then
1254 AC_MSG_WARN([No encoder plugin -- disabling the shout output plugin])
1259 if test x$enable_recorder_output = xauto; then
1260 # handle recorder auto-detection: disable if no encoder is
1262 if test x$enable_encoder = xyes; then
1263 enable_recorder_output=yes
1265 AC_MSG_WARN([No encoder plugin -- disabling the recorder output plugin])
1266 enable_recorder_output=no
1270 if test x$enable_httpd_output = xauto; then
1271 # handle HTTPD auto-detection: disable if no encoder is
1273 if test x$enable_encoder = xyes; then
1274 enable_httpd_output=yes
1276 AC_MSG_WARN([No encoder plugin -- disabling the HTTP output plugin])
1277 enable_httpd_output=no
1281 AM_CONDITIONAL(HAVE_SHOUT, test x$enable_shout = xyes)
1282 if test x$enable_shout = xyes; then
1283 AC_DEFINE(HAVE_SHOUT, 1, [Define to enable the shoutcast output])
1286 AM_CONDITIONAL(ENABLE_RECORDER_OUTPUT, test x$enable_recorder_output = xyes)
1287 if test x$enable_recorder_output = xyes; then
1288 AC_DEFINE(ENABLE_RECORDER_OUTPUT, 1, [Define to enable the recorder output])
1291 AM_CONDITIONAL(ENABLE_HTTPD_OUTPUT, test x$enable_httpd_output = xyes)
1292 if test x$enable_httpd_output = xyes; then
1293 AC_DEFINE(ENABLE_HTTPD_OUTPUT, 1, [Define to enable the HTTP server output])
1296 AM_CONDITIONAL(ENABLE_ENCODER, test x$enable_encoder = xyes)
1297 if test x$enable_encoder = xyes; then
1298 AC_DEFINE(ENABLE_ENCODER, 1,
1299 [Define to enable the encoder plugins])
1302 AM_CONDITIONAL(ENABLE_VORBIS_ENCODER, test x$enable_vorbis_encoder = xyes)
1303 if test x$enable_vorbis_encoder = xyes; then
1304 AC_DEFINE(ENABLE_VORBIS_ENCODER, 1,
1305 [Define to enable the vorbis encoder plugin])
1308 AM_CONDITIONAL(ENABLE_LAME_ENCODER, test x$enable_lame_encoder = xyes)
1309 if test x$enable_lame_encoder = xyes; then
1310 AC_DEFINE(ENABLE_LAME_ENCODER, 1,
1311 [Define to enable the lame encoder plugin])
1314 AM_CONDITIONAL(ENABLE_TWOLAME_ENCODER, test x$enable_twolame_encoder = xyes)
1315 if test x$enable_twolame_encoder = xyes; then
1316 AC_DEFINE(ENABLE_TWOLAME_ENCODER, 1,
1317 [Define to enable the TwoLAME encoder plugin])
1320 AM_CONDITIONAL(ENABLE_WAVE_ENCODER, test x$enable_wave_encoder = xyes)
1321 if test x$enable_wave_encoder = xyes; then
1322 AC_DEFINE(ENABLE_WAVE_ENCODER, 1,
1323 [Define to enable the PCM wave encoder plugin])
1326 AM_CONDITIONAL(ENABLE_FLAC_ENCODER, test x$enable_flac_encoder = xyes)
1327 if test x$enable_flac_encoder = xyes; then
1328 AC_DEFINE(ENABLE_FLAC_ENCODER, 1,
1329 [Define to enable the FLAC encoder plugin])
1332 dnl ---------------------------------------------------------------------------
1334 dnl ---------------------------------------------------------------------------
1337 if test x$enable_documentation = xyes; then
1338 AC_PATH_PROG(XMLTO, xmlto)
1340 AM_CONDITIONAL(HAVE_XMLTO, test x$XMLTO != x)
1342 AC_PATH_PROG(DOXYGEN, doxygen)
1343 if test x$DOXYGEN = x; then
1344 AC_MSG_ERROR([doxygen not found])
1349 AM_CONDITIONAL(HAVE_XMLTO, false)
1352 AM_CONDITIONAL(ENABLE_DOCUMENTATION, test x$enable_documentation = xyes)
1360 if test "x$enable_werror" = xyes; then
1361 AM_CFLAGS="$AM_CFLAGS -Werror -pedantic-errors"
1364 #if test "x$enable_debug" = xno; then
1365 # don't set NDEBUG for now, until MPD is stable
1366 #AM_CFLAGS="$AM_CFLAGS -DNDEBUG"
1369 if test "x$enable_gprof" = xyes; then
1370 MPD_CFLAGS="$MPD_CFLAGS -pg"
1371 MPD_LIBS="$MPD_LIBS -pg"
1374 dnl ---------------------------------------------------------------------------
1376 dnl ---------------------------------------------------------------------------
1377 AM_CONDITIONAL(ENABLE_TEST, test "x$enable_test" = xyes)
1379 dnl ---------------------------------------------------------------------------
1381 dnl ---------------------------------------------------------------------------
1382 if test x$GCC = xyes
1384 MPD_CHECK_FLAG([-Wall])
1385 MPD_CHECK_FLAG([-Wextra])
1386 MPD_CHECK_FLAG([-Wno-deprecated-declarations])
1387 MPD_CHECK_FLAG([-Wmissing-prototypes])
1388 MPD_CHECK_FLAG([-Wshadow])
1389 MPD_CHECK_FLAG([-Wpointer-arith])
1390 MPD_CHECK_FLAG([-Wstrict-prototypes])
1391 MPD_CHECK_FLAG([-Wcast-qual])
1392 MPD_CHECK_FLAG([-Wwrite-strings])
1393 MPD_CHECK_FLAG([-pedantic])
1396 dnl ---------------------------------------------------------------------------
1397 dnl Pretty-Print Results
1398 dnl ---------------------------------------------------------------------------
1400 echo "########### MPD CONFIGURATION ############"
1403 echo " Client Support:"
1404 if test x$enable_ipv6 = xyes; then
1405 echo " IPv6 support ..................enabled"
1407 echo " IPv6 support ..................disabled"
1410 if test x$enable_tcp = xyes; then
1411 echo " TCP support ...................enabled"
1413 echo " TCP support ...................disabled"
1416 if test x$enable_un = xyes; then
1417 echo " Unix domain socket support ....enabled"
1419 echo " Unix domain socket support ....disabled"
1425 test x$enable_tcp = xno &&
1426 test x$enable_un = xno; then
1427 AC_MSG_ERROR([No client interfaces configured!])
1430 echo " Playback Support:"
1431 if test x$enable_alsa = xyes; then
1432 echo " ALSA support ..................enabled"
1434 echo " ALSA support ..................disabled"
1437 if test x$enable_fifo = xyes; then
1438 echo " FIFO support ..................enabled"
1440 echo " FIFO support ..................disabled"
1443 if test x$enable_recorder_output = xyes; then
1444 echo " File Recorder support .........enabled"
1446 echo " File Recorder support .........disabled"
1449 if test x$enable_httpd_output = xyes; then
1450 echo " HTTP daemon support ...........enabled"
1452 echo " HTTP daemon support ...........disabled"
1455 if test x$enable_jack = xyes; then
1456 echo " JACK support ..................enabled"
1458 echo " JACK support ..................disabled"
1461 if test x$enable_ao = xyes; then
1462 echo " libao support .................enabled"
1464 echo " libao support .................disabled"
1467 if test x$enable_oss = xyes; then
1468 echo " OSS support ...................enabled"
1470 echo " OSS support ...................disabled"
1473 if test x$enable_openal = xyes; then
1474 echo " OpenAL support ................enabled"
1476 echo " OpenAL support ................disabled"
1479 if test x$enable_osx = xyes; then
1480 echo " OS X support ..................enabled"
1482 echo " OS X support ..................disabled"
1485 if test x$enable_pipe_output = xyes; then
1486 echo " Pipeline output support .......enabled"
1488 echo " Pipeline output support .......disabled"
1491 if test x$enable_pulse = xyes; then
1492 echo " PulseAudio support ............enabled"
1494 echo " PulseAudio support ............disabled"
1497 if test x$enable_mvp = xyes; then
1498 echo " Media MVP support .............enabled"
1500 echo " Media MVP support .............disabled"
1503 if test x$enable_shout = xyes; then
1504 echo " SHOUTcast support .............enabled"
1506 echo " SHOUTcast support .............disabled"
1509 if test x$enable_solaris_output = xyes; then
1510 echo " Solaris /dev/audio support ....enabled"
1512 echo " Solaris /dev/audio support ....disabled"
1518 test x$enable_ao = xno &&
1519 test x$enable_oss = xno &&
1520 test x$enable_openal = xno &&
1521 test x$enable_shout = xno &&
1522 test x$enable_recorder_output = xno &&
1523 test x$enable_httpd_output = xno &&
1524 test x$enable_solaris_output = xno &&
1525 test x$enable_alsa = xno &&
1526 test x$enable_osx = xno &&
1527 test x$enable_pulse = xno &&
1528 test x$enable_jack = xno &&
1529 test x$enable_fifo = xno &&
1530 test x$enable_pipe_output = xno &&
1531 test x$enable_mvp = xno; then
1532 AC_MSG_ERROR([No Audio Output types configured!])
1536 test x$enable_shout = xyes ||
1537 test x$enable_recorder = xyes ||
1538 test x$enable_httpd_output = xyes; then
1539 echo " Streaming Encoder Support:"
1540 if test x$enable_lame_encoder = xyes; then
1541 echo " LAME mp3 encoder ..............enabled"
1543 echo " LAME mp3 encoder ..............disabled"
1546 if test x$enable_vorbis_encoder = xyes; then
1547 echo " Ogg Vorbis encoder ............enabled"
1549 echo " Ogg Vorbis encoder ............disabled"
1552 if test x$enable_twolame_encoder = xyes; then
1553 echo " TwoLAME mp3 encoder ...........enabled"
1555 echo " TwoLAME mp3 encoder ...........disabled"
1558 if test x$enable_flac_encoder = xyes; then
1559 echo " FLAC encoder ..................enabled"
1561 echo " FLAC encoder ..................disabled"
1564 if test x$enable_wave_encoder = xyes; then
1565 echo " PCM wave encoder ..............enabled"
1567 echo " PCM wave encoder ..............disabled"
1573 echo " File Format Support:"
1575 if test x$enable_aac = xyes; then
1576 echo " AAC support ...................enabled"
1578 echo " AAC support ...................disabled"
1581 if test x$enable_sidplay = xyes; then
1582 echo " C64 SID support ...............enabled"
1584 echo " C64 SID support ...............disabled"
1587 if test x$enable_ffmpeg = xyes; then
1588 echo " FFMPEG support ................enabled"
1590 echo " FFMPEG support ................disabled"
1593 if test x$enable_flac = xyes; then
1594 echo " FLAC support ..................enabled"
1596 echo " FLAC support ..................disabled"
1599 if test x$enable_fluidsynth = xyes; then
1600 echo " fluidsynth MIDI support .......enabled"
1602 echo " fluidsynth MIDI support .......disabled"
1605 if test x$enable_mikmod = xyes; then
1606 echo " MikMod support ................enabled"
1608 echo " MikMod support ................disabled"
1611 if test x$enable_modplug = xyes; then
1612 echo " MODPLUG support ...............enabled"
1614 echo " MODPLUG support ...............disabled"
1617 if test x$enable_gme = xyes; then
1618 echo " GME support ....................enabled"
1620 echo " GME support ...................disabled"
1623 if test x$enable_mad = xyes; then
1624 echo " MAD mp3 decoder support .......enabled"
1626 echo " MAD mp3 decoder support .......disabled"
1629 if test x$enable_mpg123 = xyes; then
1630 echo " libmpg123 decoder support .....enabled"
1632 echo " libmpg123 decoder support .....disabled"
1635 if test x$enable_mp4 = xyes; then
1636 echo " MP4 support ...................enabled"
1638 echo " MP4 support ...................disabled"
1641 if test x$enable_mpc = xyes; then
1642 echo " Musepack (MPC) support ........enabled"
1644 echo " Musepack (MPC) support ........disabled"
1647 case $enable_oggflac in
1649 echo " OggFLAC support ...............enabled"
1652 echo " OggFLAC support ...............enabled(FLAC 1.1.3)"
1655 echo " OggFLAC support ...............disabled"
1659 if test x$enable_vorbis = xyes; then
1660 echo " Ogg Vorbis support ............enabled"
1661 if test x$use_tremor = xyes; then
1662 echo " using tremor.................yes"
1664 echo " using tremor.................no"
1667 echo " Ogg Vorbis support ............disabled"
1670 if test x$enable_sndfile = xyes; then
1671 echo " libsndfile ....................enabled"
1673 echo " libsndfile ....................disabled"
1676 if test x$enable_audiofile = xyes; then
1677 echo " Wave file support .............enabled"
1679 echo " Wave file support .............disabled"
1682 if test x$enable_wavpack = xyes; then
1683 echo " WavPack support ...............enabled"
1685 echo " WavPack support ...............disabled"
1688 if test x$enable_wildmidi = xyes; then
1689 echo " wildmidi MIDI support .........enabled"
1691 echo " wildmidi MIDI support .........disabled"
1697 test x$enable_mad = xno &&
1698 test x$enable_mpg123 = xno &&
1699 test x$enable_vorbis = xno &&
1700 test x$enable_flac = xno &&
1701 test x$enable_oggflac = xno &&
1702 test x$enable_audiofile = xno &&
1703 test x$enable_aac = xno &&
1704 test x$enable_mpc = xno &&
1705 test x$enable_wavpack = xno &&
1706 test x$enable_ffmpeg = xno &&
1707 test x$enable_modplug = xno &&
1708 test x$enable_sidplay = xno &&
1709 test x$enable_gme = xno &&
1710 test x$enable_fluidsynth = xno &&
1711 test x$enable_wildmidi = xno &&
1712 test x$enable_mp4 = xno &&
1713 test x$enable_mikmod = xno; then
1714 AC_MSG_ERROR([No input plugins supported!])
1718 echo " Archive support:"
1720 if test x$enable_bzip2 = xyes; then
1721 echo " BZ2 archives support ..........enabled"
1723 echo " BZ2 archives support ..........disabled"
1726 if test x$enable_iso9660 = xyes; then
1727 echo " ISO 9660 archives support .....enabled"
1729 echo " ISO 9660 archives support .....disabled"
1732 if test x$enable_zzip = xyes; then
1733 echo " ZIP archives support ..........enabled"
1735 echo " ZIP archives support ..........disabled"
1739 echo " Streaming support:"
1741 if test x$enable_lastfm = xyes; then
1742 echo " last.fm radio support .........enabled"
1744 echo " last.fm radio support .........disabled"
1747 if test x$enable_curl = xyes; then
1748 echo " libcurl support (streaming) ...enabled"
1750 echo " libcurl support (streaming) ...disabled"
1753 if test x$enable_mms = xyes; then
1754 echo " libmms support ................enabled"
1756 echo " libmms support ................disabled"
1760 echo " Other features:"
1762 if test x$enable_id3 = xyes; then
1763 echo " ID3 tag support ...............enabled"
1765 echo " ID3 tag support ...............disabled"
1768 if test x$enable_lsr = xyes; then
1769 echo " libsamplerate support .........enabled"
1771 echo " libsamplerate support .........disabled"
1774 if test x$with_zeroconf != xno; then
1775 echo " Zeroconf support ..............$with_zeroconf"
1777 echo " Zeroconf support ..............disabled"
1780 if test x$enable_cue = xyes; then
1781 echo " libcue support ................enabled"
1783 echo " libcue support ................disabled"
1786 if test x$enable_inotify = xyes; then
1787 echo " Inotify support (autoupdate) ..enabled"
1789 echo " Inotify support (autoupdate) ..disabled"
1793 echo "##########################################"
1796 if test x$enable_sndfile = xyes && test x$enable_modplug = xyes; then
1797 AC_MSG_WARN([compilation may fail, because libmodplug conflicts with libsndfile])
1798 AC_MSG_WARN([libmodplug ships modplug/sndfile.h, which hides libsndfile's sndfile.h])
1801 echo "Generating needed files for compilation"
1812 echo "You are now ready to compile MPD"
1813 echo "Type \"make\" to compile MPD"