mpd version 0.15.8
[mpd-mk.git] / configure.ac
blob25a23064dbf4ee619d119d1e20d9d7c01599932f
1 AC_PREREQ(2.60)
2 AC_INIT(mpd, 0.15.8, musicpd-dev-team@lists.sourceforge.net)
3 AC_CONFIG_SRCDIR([src/main.c])
4 AM_INIT_AUTOMAKE([foreign 1.9 dist-bzip2])
5 AM_CONFIG_HEADER(config.h)
6 AC_CONFIG_MACRO_DIR([m4])
8 AC_DEFINE(PROTOCOL_VERSION, "0.15.0", [The mpd protocol version])
11 dnl
12 dnl programs
13 dnl
15 AC_PROG_CC_C99
16 AC_PROG_CXX
18 HAVE_CXX=yes
19 if test x$CXX = xg++; then
20         # CXX=g++ probably means that autoconf hasn't found any C++
21         # compiler; to be sure, we check again
22         AC_PATH_PROG(CXX, $CXX, no)
23         if test x$CXX = xno; then
24                 # no, we don't have C++ - the following hack is
25                 # required because automake insists on using $(CXX)
26                 # for linking the MPD binary
27                 AC_MSG_NOTICE([Disabling C++ support])
28                 CXX="$CC"
29                 HAVE_CXX=no
30         fi
33 AC_PROG_INSTALL
34 AC_PROG_MAKE_SET
35 PKG_PROG_PKG_CONFIG
38 dnl
39 dnl declare variables
40 dnl
42 AC_SUBST(AM_CFLAGS,"")
44 AC_SUBST(MPD_LIBS)
45 AC_SUBST(MPD_CFLAGS)
46 MPD_LIBS=""
47 MPD_CFLAGS=""
50 dnl
51 dnl OS specific defaults
52 dnl
54 AC_CANONICAL_HOST
56 case "$host_os" in
57 mingw32* | windows*)
58         MPD_LIBS="$MPD_LIBS -lws2_32"
59         ;;
60 esac
62 if test -z "$prefix" || test "x$prefix" = xNONE; then
63         local_lib=
64         local_include=
66         # aren't autotools supposed to be smart enough to figure this out?  oh
67         # well, the git-core Makefile managed to do some of the work for us :)
68         case "$host_os" in
69         darwin*)
70                 local_lib='/sw/lib /opt/local/lib'
71                 local_include='/sw/include /opt/local/include'
72                 ;;
73         freebsd* | openbsd*)
74                 local_lib=/usr/local/lib
75                 local_include=/usr/local/include
76                 ;;
77         netbsd*)
78                 local_lib=/usr/pkg/lib
79                 local_include=/usr/pkg/include
80                 LDFLAGS="$LDFLAGS -Wl,-rpath,/usr/pkg/lib"
81                 ;;
82         esac
84         for d in $local_lib; do
85                 if test -d "$d"; then
86                         LDFLAGS="$LDFLAGS -L$d"
87                         break
88                 fi
89         done
90         for d in $local_include; do
91                 if test -d "$d"; then
92                         CFLAGS="$CFLAGS -I$d"
93                         break
94                 fi
95         done
99 dnl
100 dnl libc features
103 AC_CHECK_FUNCS(syslog)
104 if test $ac_cv_func_syslog = no; then
105         # syslog is not in the default libraries.  See if it's in some other.
106         for lib in bsd socket inet; do
107                 AC_CHECK_LIB($lib, syslog,
108                         [AC_DEFINE(HAVE_SYSLOG)
109                         LIBS="$LIBS -l$lib"; break])
110         done
113 AC_CHECK_LIB(socket,socket,MPD_LIBS="$MPD_LIBS -lsocket",)
114 AC_CHECK_LIB(nsl,gethostbyname,MPD_LIBS="$MPD_LIBS -lnsl",)
116 AC_CHECK_LIB(m,exp,MPD_LIBS="$MPD_LIBS -lm",)
118 AC_CHECK_HEADERS(locale.h)
119 AC_CHECK_HEADERS(valgrind/memcheck.h)
123 dnl mandatory libraries
126 PKG_CHECK_MODULES([GLIB], [glib-2.0 >= 2.6 gthread-2.0],,
127                 [AC_MSG_ERROR([glib-2.6 is required])])
131 dnl protocol options
134 AC_ARG_ENABLE(tcp,
135         AS_HELP_STRING([--disable-tcp],
136                 [disable support for clients connecting via TCP (default: enable)]),,
137         [enable_tcp=yes])
139 AC_ARG_ENABLE(ipv6,
140         AS_HELP_STRING([--disable-ipv6],
141                 [disable IPv6 support (default: enable)]),,
142         [enable_ipv6=yes])
144 if test x$enable_tcp = xno; then
145         # if we don't support TCP, we don't need IPv6 either
146         enable_ipv6=no
149 if test x$enable_ipv6 = xyes; then
150         AC_MSG_CHECKING(for ipv6)
151         AC_EGREP_CPP([AP_maGiC_VALUE],
152         [
153 #include <sys/types.h>
154 #include <sys/socket.h>
155 #include <netdb.h>
156 #ifdef PF_INET6
157 #ifdef AF_INET6
158 AP_maGiC_VALUE
159 #endif
160 #endif
161         ],
162         AC_DEFINE(HAVE_IPV6, 1, [Define if IPv6 support present])
163         AC_MSG_RESULT([yes]),
164         AC_MSG_RESULT([no])
168 if test x$enable_tcp = xyes; then
169         AC_DEFINE(HAVE_TCP, 1, [Define if TCP socket support is enabled])
172 AC_ARG_ENABLE(un,
173         AS_HELP_STRING([--disable-un],
174                 [disable support for clients connecting via unix domain sockets (default: enable)]),,
175         [enable_un=yes])
177 if test x$enable_un = xyes; then
178         AC_DEFINE(HAVE_UN, 1, [Define if unix domain socket support is enabled])
179         STRUCT_UCRED
183 dnl ##
184 dnl misc libraries
185 dnl ##
187 AC_ARG_ENABLE(cue,
188         AS_HELP_STRING([--enable-cue],
189                 [enable support for libcue support]),,
190         enable_cue=auto)
192 MPD_AUTO_PKG(cue, CUE, [libcue],
193         [libcue parsing library], [libcue not found])
194 if test x$enable_cue = xyes; then
195         AC_DEFINE([HAVE_CUE], 1,
196                 [Define to enable libcue support])
199 AM_CONDITIONAL(HAVE_CUE, test x$enable_cue = xyes)
201 dnl ##
202 dnl Avahi / Zeroconf
203 dnl ##
204 AC_ARG_WITH(zeroconf,
205         AS_HELP_STRING([--with-zeroconf=@<:@auto|avahi|bonjour|no@:>@],
206                 [enable zeroconf backend (default=auto)]),,
207         with_zeroconf="auto")
209 case $with_zeroconf in
210 no|avahi|bonjour)
211         ;;
213         with_zeroconf=auto
214         ;;
215 esac
217 if test x$with_zeroconf != xno; then
218         if test x$with_zeroconf = xavahi || test x$with_zeroconf = xauto; then
219                 PKG_CHECK_MODULES([AVAHI], [avahi-client avahi-glib],
220                          [found_avahi=1;AC_DEFINE([HAVE_AVAHI], 1, [Define to enable Avahi Zeroconf support])]
221                          MPD_LIBS="$MPD_LIBS $AVAHI_LIBS" MPD_CFLAGS="$MPD_CFLAGS $AVAHI_CFLAGS",
222                          [found_avahi=0])
223         fi
225         if test x$found_avahi = x1; then
226                 with_zeroconf=avahi
227         elif test x$with_zeroconf = xavahi; then
228                 AC_MSG_ERROR([Avahi support requested but not found])
229         fi
231         if test x$with_zeroconf = xbonjour || test x$with_zeroconf = xauto; then
232                 AC_CHECK_HEADER(dns_sd.h,
233                         [found_bonjour=1;AC_DEFINE([HAVE_BONJOUR], 1, [Define to enable Bonjour Zeroconf support])],
234                         [found_bonjour=0])
235                 AC_CHECK_LIB(dns_sd, DNSServiceRegister,
236                         MPD_LIBS="$MPD_LIBS -ldns_sd")
237         fi
239         if test x$found_bonjour = x1; then
240                 with_zeroconf=bonjour
241         elif test x$with_zeroconf = xbonjour; then
242                 AC_MSG_ERROR([Bonjour support requested but not found])
243         fi
245         if test x$with_zeroconf = xauto; then
246                 AC_MSG_WARN([No supported Zeroconf backend found, disabling Zeroconf])
247                 with_zeroconf=no
248         else
249                 AC_DEFINE([HAVE_ZEROCONF], 1, [Define to enable Zeroconf support])
250         fi
253 AM_CONDITIONAL(HAVE_ZEROCONF, test x$with_zeroconf != xno)
254 AM_CONDITIONAL(HAVE_AVAHI, test x$with_zeroconf = xavahi)
255 AM_CONDITIONAL(HAVE_BONJOUR, test x$with_zeroconf = xbonjour)
257 AC_ARG_ENABLE(sqlite,
258         AS_HELP_STRING([--enable-sqlite],
259                 [enable support for the SQLite database]),,
260         [enable_sqlite=auto])
262 MPD_AUTO_PKG(sqlite, SQLITE, [sqlite3],
263         [SQLite database support], [sqlite not found])
264 if test x$enable_sqlite = xyes; then
265         AC_DEFINE([ENABLE_SQLITE], 1, [Define to enable sqlite database support])
268 AM_CONDITIONAL(ENABLE_SQLITE, test x$enable_sqlite = xyes)
272 dnl input plugins
275 AC_ARG_ENABLE(curl,
276         AS_HELP_STRING([--enable-curl],
277                 [enable support for libcurl HTTP streaming (default: auto)]),,
278         [enable_curl=auto])
280 MPD_AUTO_PKG(curl, CURL, [libcurl],
281         [libcurl HTTP streaming], [libcurl not found])
282 if test x$enable_curl = xyes; then
283         AC_DEFINE(HAVE_CURL, 1, [Define when libcurl is used for HTTP streaming])
285 AM_CONDITIONAL(HAVE_CURL, test x$enable_curl = xyes)
287 AC_ARG_ENABLE(lastfm,
288         AS_HELP_STRING([--enable-lastfm],
289                 [enable support for last.fm radio (default: disable)]),,
290         [enable_lastfm=no])
292 if test x$enable_lastfm = xyes; then
293         if test x$enable_curl != xyes; then
294                 AC_MSG_ERROR([Cannot enable last.fm radio without curl])
295         fi
297         AC_DEFINE(ENABLE_LASTFM, 1, [Define when last.fm radio is enabled])
299 AM_CONDITIONAL(ENABLE_LASTFM, test x$enable_lastfm = xyes)
301 AC_ARG_ENABLE(mms,
302         AS_HELP_STRING([--enable-mms],
303                 [enable the MMS protocol with libmms]),,
304         [enable_mms=auto])
306 MPD_AUTO_PKG(mms, MMS, [libmms >= 0.4],
307         [libmms mms:// protocol support], [libmms not found])
308 if test x$enable_mms = xyes; then
309         AC_DEFINE(ENABLE_MMS, 1,
310                 [Define when libmms is used for the MMS protocol])
312 AM_CONDITIONAL(ENABLE_MMS, test x$enable_mms = xyes)
316 dnl archive plugins
319 dnl bzip2
320 AC_ARG_ENABLE(bzip2,
321         AS_HELP_STRING([--enable-bzip2],
322                 [enable bzip2 archive support (default: disabled)]),,
323         enable_bzip2=no)
325 if test x$enable_bzip2 = xyes; then
326         AC_CHECK_LIB(bz2, BZ2_bzDecompressInit,
327                 [MPD_LIBS="$MPD_LIBS -lbz2"],
328                 [AC_MSG_ERROR([libbz2 not found])])
331 AM_CONDITIONAL(HAVE_BZ2, test x$enable_bzip2 = xyes)
332 if test x$enable_bzip2 = xyes; then
333         AC_DEFINE(HAVE_BZ2, 1, [Define to have bz2 archive support])
336 dnl zip
337 AC_ARG_ENABLE(zip,
338         AS_HELP_STRING([--enable-zip],
339                 [enable zip archive support (default: disabled)]),,
340         enable_zip=no)
342 MPD_AUTO_PKG(zip, ZZIP, [zziplib >= 0.13],
343         [libzzip archive library], [libzzip not found])
345 AM_CONDITIONAL(HAVE_ZIP, test x$enable_zip = xyes)
346 if test x$enable_zip = xyes; then
347         AC_DEFINE(HAVE_ZIP, 1, [Define to have zip archive support])
350 dnl iso9660
351 AC_ARG_ENABLE(iso9660,
352         AS_HELP_STRING([--enable-iso9660],
353                 [enable iso9660 archive support (default: disabled)]),,
354         enable_iso9660=no)
356 MPD_AUTO_PKG(iso9660, ISO9660, [libiso9660],
357         [libiso9660 archive library], [libiso9660 not found])
359 AM_CONDITIONAL(HAVE_ISO, test x$enable_iso9660 = xyes)
360 if test x$enable_iso9660 = xyes; then
361         AC_DEFINE(HAVE_ISO, 1, [Define to have iso archive support])
364 dnl archive API
366         test x$enable_bzip2 = xyes ||
367         test x$enable_zip = xyes ||
368         test x$enable_iso9660 = xyes; then
369                 enable_archive=yes
370                 AC_DEFINE(ENABLE_ARCHIVE, 1, [The archive API is available])
371 else
372         enable_archive=no
375 AM_CONDITIONAL(ENABLE_ARCHIVE, test x$enable_archive = xyes)
379 dnl metadata
382 AC_ARG_ENABLE(id3,
383         AS_HELP_STRING([--disable-id3],
384                 [disable id3 support (default: enable)]),,
385         enable_id3=yes)
389 dnl decoder plugins
394 AC_ARG_ENABLE(audiofile,
395         AS_HELP_STRING([--disable-audiofile],
396                 [disable audiofile support, disables wave support (default: enable)]),,
397         enable_audiofile=yes)
399 AC_ARG_ENABLE(ffmpeg,
400         AS_HELP_STRING([--enable-ffmpeg],
401                 [enable FFMPEG support]),,
402         enable_ffmpeg=auto)
404 AC_ARG_ENABLE(flac,
405         AS_HELP_STRING([--disable-flac],
406                 [disable flac support (default: enable)]),,
407         enable_flac=yes)
409 dnl ###
410 dnl MAD mp3 decoder
411 dnl ###
413 AC_ARG_ENABLE(mad,
414         AS_HELP_STRING([--enable-mad],
415                 [enable libmad mp3 decoder plugin]),,
416         enable_mad=auto)
418 MPD_AUTO_PKG(mad, MAD, [mad],
419         [libmad MP3 decoder plugin], [libmad not found])
420 if test x$enable_mad = xyes; then
421         AC_DEFINE(HAVE_MAD, 1, [Define to use libmad])
423 AM_CONDITIONAL(HAVE_MAD, test x$enable_mad = xyes)
425 AC_ARG_ENABLE(mikmod,
426         AS_HELP_STRING([--enable-mikmod],
427                 [enable the mikmod decoder (default: disable)]),,
428         enable_mikmod=no)
430 if test x$enable_mikmod = xyes; then
431         AC_PATH_PROG(LIBMIKMOD_CONFIG, libmikmod-config)
432         if test x$LIBMIKMOD_CONFIG != x ; then
433                 AC_SUBST(LIBMIKMOD_CFLAGS, `$LIBMIKMOD_CONFIG --cflags`)
434                 AC_SUBST(LIBMIKMOD_LIBS, `$LIBMIKMOD_CONFIG --libs`)
435                 AC_DEFINE(ENABLE_MIKMOD_DECODER, 1, [Define for mikmod support])
436         else
437                 enable_mikmod=no
438         fi
441 AM_CONDITIONAL(ENABLE_MIKMOD_DECODER, test x$enable_mikmod = xyes)
443 AC_ARG_ENABLE(modplug,
444         AS_HELP_STRING([--enable-modplug],
445                 [enable modplug decoder plugin]),,
446         enable_modplug=auto)
448 found_modplug=$HAVE_CXX
449 MPD_AUTO_PRE(modplug, [modplug decoder plugin], [No C++ compiler found])
451 MPD_AUTO_PKG(modplug, MODPLUG, [libmodplug],
452         [modplug decoder plugin], [libmodplug not found])
453 AM_CONDITIONAL(HAVE_MODPLUG, test x$enable_modplug = xyes)
454 if test x$enable_modplug = xyes; then
455         AC_DEFINE(HAVE_MODPLUG, 1, [Define for modplug support])
458 AC_ARG_ENABLE(mpc,
459         AS_HELP_STRING([--disable-mpc],
460                 [disable musepack (MPC) support (default: enable)]),,
461         enable_mpc=yes)
463 AC_ARG_ENABLE(oggflac,
464         AS_HELP_STRING([--disable-oggflac],
465                 [disable OggFLAC support (default: enable)]),,
466         enable_oggflac=yes)
468 AC_ARG_ENABLE(vorbis,
469         AS_HELP_STRING([--disable-vorbis],
470                 [disable Ogg Vorbis support (default: enable)]),,
471         enable_vorbis=yes)
473 dnl ###
474 dnl Ogg Tremor
475 dnl ###
476 AC_ARG_WITH(tremor,
477         AS_HELP_STRING([--with-tremor=PFX],
478                 [use Tremor (vorbisidec) integer Ogg Vorbis decoder (with optional prefix)]),,
479         with_tremor=no)
481 if test x$with_tremor = xyes || test x$with_tremor = xno; then
482         use_tremor="$with_tremor"
483 else
484         tremor_prefix="$with_tremor"
485         use_tremor=yes
488 AC_ARG_WITH(tremor-libraries,
489         AS_HELP_STRING([--with-tremor-libraries=DIR],
490                 [directory where Tremor library is installed (optional)]),,
491         tremor_libraries="")
493 AC_ARG_WITH(tremor-includes,
494         AS_HELP_STRING([--with-tremor-includes=DIR],
495                 [directory where Tremor header files are installed (optional)]),,
496         tremor_includes="")
498 AC_ARG_ENABLE(sidplay,
499         AS_HELP_STRING([--enable-sidplay],
500                 [enable C64 SID support via libsidplay2]),,
501         enable_sidplay=auto)
503 found_sidplay=$HAVE_CXX
504 MPD_AUTO_PRE(sidplay, [sidplay decoder plugin], [No C++ compiler found])
506 if test x$enable_sidplay != xno; then
507         # we're not using pkg-config here
508         # because libsidplay2's .pc file requires libtool
509         AC_HAVE_LIBRARY(sidplay2, [found_sidplay=yes], [found_sidplay=no])
510         MPD_AUTO_PRE(sidplay, [sidplay decoder plugin],
511                 [libsidplay2 not found])
514 if test x$enable_sidplay != xno; then
515         # can't use AC_HAVE_LIBRARY here, because the dash in the
516         # library name triggers an autoconf bug
517         AC_CHECK_LIB(resid-builder, main,
518                 [found_sidplay=yes], [found_sidplay=no])
519         MPD_AUTO_RESULT(sidplay, [sidplay decoder plugin],
520                 [libresid-builder not found])
523 if test x$enable_sidplay = xyes; then
524         AC_SUBST(SIDPLAY_LIBS,"-lsidplay2 -lresid-builder")
525         AC_SUBST(SIDPLAY_CFLAGS,)
527         AC_DEFINE(ENABLE_SIDPLAY, 1, [Define for libsidplay2 support])
530 AM_CONDITIONAL(ENABLE_SIDPLAY, test x$enable_sidplay = xyes)
532 AC_ARG_ENABLE(fluidsynth,
533         AS_HELP_STRING([--enable-fluidsynth],
534                 [enable MIDI support via fluidsynth (default: disable)]),,
535         enable_fluidsynth=no)
537 AC_ARG_ENABLE(wildmidi,
538         AS_HELP_STRING([--enable-wildmidi],
539                 [enable MIDI support via wildmidi (default: disable)]),,
540         enable_wildmidi=no)
542 AC_ARG_ENABLE(wavpack,
543         AS_HELP_STRING([--disable-wavpack],
544                 [disable WavPack support (default: enable)]),,
545         enable_wavpack=yes)
549 dnl converters
552 AC_ARG_ENABLE(lsr,
553         AS_HELP_STRING([--enable-lsr],
554                 [enable libsamplerate support]),,
555         enable_lsr=auto)
557 MPD_AUTO_PKG(lsr, SAMPLERATE, [samplerate >= 0.0.15],
558         [libsamplerate resampling], [libsamplerate not found])
559 if test x$enable_lsr = xyes; then
560         AC_DEFINE([HAVE_LIBSAMPLERATE], 1,
561                 [Define to enable libsamplerate])
564 if test x$enable_lsr = xyes; then
565         PKG_CHECK_MODULES([SAMPLERATE_013],
566                 [samplerate >= 0.1.3],,
567                 [AC_DEFINE([HAVE_LIBSAMPLERATE_NOINT], 1,
568                 [libsamplerate doesn't provide src_int_to_float_array() (<0.1.3)])])
571 AM_CONDITIONAL(HAVE_LIBSAMPLERATE, test x$enable_lsr = xyes)
575 dnl encoder plugins
578 AC_ARG_ENABLE(vorbis-encoder,
579         AS_HELP_STRING([--enable-vorbis-encoder],
580                 [enable the Ogg Vorbis encoder]),,
581         [enable_vorbis_encoder=auto])
583 AC_ARG_ENABLE(lame-encoder,
584         AS_HELP_STRING([--enable-lame-encoder],
585                 [enable the LAME mp3 encoder]),,
586         enable_lame_encoder=auto)
590 dnl audio output plugins
593 AC_ARG_ENABLE(alsa,
594         AS_HELP_STRING([--enable-alsa], [enable ALSA support]),,
595         enable_alsa=auto)
597 AC_ARG_ENABLE(ao,
598         AS_HELP_STRING([--enable-ao],
599                 [enable support for libao]),,
600         enable_ao=auto)
602 MPD_AUTO_PKG(ao, AO, [ao],
603         [libao output plugin], [libao not found])
604 if test x$enable_ao = xyes; then
605         AC_DEFINE(HAVE_AO, 1, [Define to play with ao])
608 AM_CONDITIONAL(HAVE_AO, test x$enable_ao = xyes)
610 AC_ARG_ENABLE(fifo,
611         AS_HELP_STRING([--disable-fifo],
612                 [disable support for writing audio to a FIFO (default: enable)]),,
613         enable_fifo=yes)
615 AC_ARG_ENABLE(pipe-output,
616         AS_HELP_STRING([--enable-pipe-output],
617                 [enable support for writing audio to a pipe (default: disable)]),,
618         enable_pipe_output=no)
620 if test x$enable_pipe_output = xyes; then
621         AC_DEFINE([ENABLE_PIPE_OUTPUT], 1,
622                 [Define to enable support for writing audio to a pipe])
624 AM_CONDITIONAL(ENABLE_PIPE_OUTPUT, test x$enable_pipe_output = xyes)
626 AC_ARG_ENABLE(jack,
627         AS_HELP_STRING([--enable-jack],
628                 [enable jack support]),,
629         enable_jack=auto)
631 MPD_AUTO_PKG(jack, JACK, [jack >= 0.4],
632         [JACK output plugin], [libjack not found])
633 if test x$enable_jack = xyes; then
634         AC_DEFINE([HAVE_JACK], 1, [Define to enable JACK support])
637 if test x$enable_jack = xyes; then
638         # check whether jack_set_info_function() is available
639         old_LIBS=$LIBS
640         LIBS="$LIBS $JACK_LIBS"
642         AC_CHECK_FUNCS(jack_set_info_function)
644         LIBS=$old_LIBS
647 AM_CONDITIONAL(HAVE_JACK, test x$enable_jack = xyes)
649 AC_ARG_ENABLE(mvp,
650         AS_HELP_STRING([--enable-mvp],
651                 [enable support for Hauppauge Media MVP (default: disable)]),,
652         enable_mvp=no)
654 AC_ARG_ENABLE(oss,
655         AS_HELP_STRING([--disable-oss],
656                 [disable OSS support (default: enable)]),,
657         enable_oss=yes)
659 AC_ARG_ENABLE(pulse,
660         AS_HELP_STRING([--enable-pulse],
661                 [enable support for the PulseAudio sound server]),,
662         enable_pulse=auto)
664 MPD_AUTO_PKG(pulse, PULSE, [libpulse-simple],
665         [PulseAudio output plugin], [libpulse not found])
666 if test x$enable_pulse = xyes; then
667         AC_DEFINE([HAVE_PULSE], 1,
668                 [Define to enable PulseAudio support])
671 AM_CONDITIONAL(HAVE_PULSE, test x$enable_pulse = xyes)
673 AC_ARG_ENABLE(httpd-output,
674         AS_HELP_STRING([--enable-httpd-output],
675                 [enables the HTTP server output]),,
676         [enable_httpd_output=auto])
678 enable_osx=no
679 case "$host_os" in
680         darwin*)
681                 AC_DEFINE(HAVE_OSX, 1, [Define for compiling OS X support])
682                 MPD_LIBS="$MPD_LIBS -framework AudioUnit -framework CoreServices"
683                 enable_osx=yes ;;
684 esac
686 AM_CONDITIONAL(HAVE_OSX, test x$enable_osx = xyes)
688 AC_ARG_ENABLE(shout,
689         AS_HELP_STRING([--enable-shout],
690                 [enables the shoutcast streaming output]),,
691         [enable_shout=auto])
693 enable_shout2="$enable_shout"
694 MPD_AUTO_PKG(shout, SHOUT, [shout],
695         [shout output plugin], [libshout not found])
696 if test x$enable_shout = xyes && test x$enable_shout2 = xauto; then
697         enable_shout=auto
700 case "$host_os" in
701         solaris*)
702                 AC_DEFINE(ENABLE_SOLARIS_OUTPUT, 1, [Define to enable Solaris /dev/audio support])
703                 enable_solaris_output=yes
704                 ;;
706         *)
707                 enable_solaris_output=no
708                 ;;
709 esac
711 AM_CONDITIONAL(ENABLE_SOLARIS_OUTPUT, test x$enable_solaris_output = xyes)
713 if test x$enable_oss = xyes; then
714         AC_CHECK_HEADER(sys/soundcard.h,
715                 [enable_oss=yes;AC_DEFINE(HAVE_OSS,1,[Define to enable OSS])],
716                 [AC_MSG_WARN(Soundcard headers not found -- disabling OSS support);
717                         enable_oss=no])
720 AM_CONDITIONAL(HAVE_OSS, test x$enable_oss = xyes)
722 if test x$enable_fifo = xyes; then
723         AC_CHECK_FUNC([mkfifo],
724                 [enable_fifo=yes;AC_DEFINE([HAVE_FIFO], 1,
725                         [Define to enable support for writing audio to a FIFO])],
726                 [enable_fifo=no;AC_MSG_WARN([mkfifo not found -- disabling support for writing audio to a FIFO])])
729 AM_CONDITIONAL(HAVE_FIFO, test x$enable_fifo = xyes)
731 if test x$enable_mvp = xyes; then
732    AC_DEFINE(HAVE_MVP,1,[Define to enable Hauppauge Media MVP support])
735 AM_CONDITIONAL(HAVE_MVP, test x$enable_mvp = xyes)
737 MPD_AUTO_PKG(alsa, ALSA, [alsa >= 0.9.0],
738         [ALSA output plugin], [libasound not found])
740 if test x$enable_alsa = xyes; then
741         AC_DEFINE(HAVE_ALSA, 1, [Define to enable ALSA support])
744 AM_CONDITIONAL(HAVE_ALSA, test x$enable_alsa = xyes)
746 if test x$enable_id3 = xyes; then
747         PKG_CHECK_MODULES([ID3TAG], [id3tag],,
748                 AC_CHECK_LIB(id3tag, id3_file_open,
749                         [ID3TAG_LIBS="-lid3tag -lz" ID3TAG_CFLAGS=""],
750                         enable_id3=no))
753 if test x$enable_id3 = xyes; then
754         AC_DEFINE(HAVE_ID3TAG, 1, [Define to use id3tag])
757 AM_CONDITIONAL(HAVE_ID3TAG, test x$enable_id3 = xyes)
759 if test x$enable_mpc = xyes; then
760         if test "x$mpcdec_libraries" != "x" ; then
761                 MPCDEC_LIBS="-L$mpcdec_libraries"
762         elif test "x$mpcdec_prefix" != "x" ; then
763                 MPCDEC_LIBS="-L$mpcdec_prefix/lib"
764         fi
766         MPCDEC_LIBS="$MPCDEC_LIBS -lmpcdec"
768         if test "x$mpcdec_includes" != "x" ; then
769                 MPCDEC_CFLAGS="-I$mpcdec_includes"
770         elif test "x$mpcdec_prefix" != "x" ; then
771                 MPCDEC_CFLAGS="-I$mpcdec_prefix/include"
772         fi
774         oldcflags=$CFLAGS
775         oldlibs=$LIBS
776         oldcppflags=$CPPFLAGS
777         CFLAGS="$CFLAGS $MPD_CFLAGS $MPCDEC_CFLAGS -I."
778         LIBS="$LIBS $MPD_LIBS $MPCDEC_LIBS"
779         CPPFLAGS=$CFLAGS
780         AC_CHECK_HEADER(mpc/mpcdec.h,
781                 old_mpcdec=no,
782                 [AC_CHECK_HEADER(mpcdec/mpcdec.h,
783                         old_mpcdec=yes,
784                         enable_mpc=no)])
785         if test x$enable_mpc = xyes; then
786                 AC_CHECK_LIB(mpcdec,main,
787                         [MPD_LIBS="$MPD_LIBS $MPCDEC_LIBS";
788                         MPD_CFLAGS="$MPD_CFLAGS $MPCDEC_CFLAGS";],
789                         enable_mpc=no)
790         fi
791         if test x$enable_mpc = xyes; then
792                 AC_DEFINE(HAVE_MPCDEC,1,
793                         [Define to use libmpcdec for MPC decoding])
794                 if test x$old_mpcdec = xyes; then
795                         AC_DEFINE(MPC_IS_OLD_API, 1,
796                                 [Define if an old pre-SV8 libmpcdec is used])
797                 fi
798         else
799                 AC_MSG_WARN([mpcdec lib needed for MPC support -- disabling MPC support])
800         fi
801         CFLAGS=$oldcflags
802         LIBS=$oldlibs
803         CPPFLAGS=$oldcppflags
806 AM_CONDITIONAL(HAVE_MPCDEC, test x$enable_mpc = xyes)
808 if test x$enable_wavpack = xyes; then
809         PKG_CHECK_MODULES([WAVPACK], [wavpack],
810                 [enable_wavpack=yes;
811                         AC_DEFINE([HAVE_WAVPACK], 1,
812                                 [Define to enable WavPack support])]
813                 MPD_LIBS="$MPD_LIBS $WAVPACK_LIBS"
814                 MPD_CFLAGS="$MPD_CFLAGS $WAVPACK_CFLAGS",
815                 enable_wavpack=no)
818 AM_CONDITIONAL(HAVE_WAVPACK, test x$enable_wavpack = xyes)
820 AM_PATH_FAAD()
822 AM_CONDITIONAL(HAVE_FAAD, test x$enable_aac = xyes)
824 AM_CONDITIONAL(HAVE_MP4, test x$enable_mp4 = xyes)
826 if test x$use_tremor = xyes; then
827         if test "x$tremor_libraries" != "x" ; then
828                 TREMOR_LIBS="-L$tremor_libraries"
829         elif test "x$tremor_prefix" != "x" ; then
830                 TREMOR_LIBS="-L$tremor_prefix/lib"
831         fi
832         TREMOR_LIBS="$TREMOR_LIBS -lvorbisidec"
833         if test "x$tremor_includes" != "x" ; then
834                 TREMOR_CFLAGS="-I$tremor_includes"
835         elif test "x$tremor_prefix" != "x" ; then
836                 TREMOR_CFLAGS="-I$tremor_prefix/include"
837         fi
838         ac_save_CFLAGS="$CFLAGS"
839         ac_save_LIBS="$LIBS"
840         CFLAGS="$CFLAGS $TREMOR_CFLAGS"
841         LIBS="$LIBS $TREMOR_LIBS"
842         AC_CHECK_LIB(vorbisidec,ov_read,enable_vorbis=yes,enable_vorbis=no;
843                 AC_MSG_WARN([vorbisidec lib needed for ogg support with tremor -- disabling ogg support]))
844         CFLAGS="$ac_save_CFLAGS"
845         LIBS="$ac_save_LIBS"
846         if test x$enable_vorbis = xyes; then
847                 AC_DEFINE(ENABLE_VORBIS_DECODER, 1, [Define for Ogg Vorbis support])
848         fi
849 elif test x$enable_vorbis = xyes; then
850         PKG_CHECK_MODULES(VORBIS, [ogg vorbis vorbisfile],
851                 AC_DEFINE(ENABLE_VORBIS_DECODER, 1, [Define for Ogg Vorbis support]),
852                 enable_vorbis=no)
855 AM_CONDITIONAL(ENABLE_VORBIS_DECODER, test x$enable_vorbis = xyes)
857 if test x$use_tremor = xyes; then
858         AC_DEFINE(HAVE_TREMOR,1,
859                 [Define to use tremor (libvorbisidec) for ogg support])
860         if test x$enable_oggflac = xyes; then
861                 AC_MSG_WARN([disabling OggFLAC support because it is incompatible with tremor])
862                 enable_oggflac=no
863         fi
866 AC_SUBST(TREMOR_CFLAGS)
867 AC_SUBST(TREMOR_LIBS)
869 if test x$enable_flac = xyes; then
870         PKG_CHECK_MODULES(FLAC, [flac >= 1.1],
871                 AC_DEFINE(HAVE_FLAC, 1, [Define for FLAC support]),
872                 enable_flac=no)
874         oldcflags="$CFLAGS"
875         oldlibs="$LIBS"
876         CFLAGS="$CFLAGS $FLAC_CFLAGS"
877         LIBS="$LIBS $FLAC_LIBS"
878         if test x$enable_flac = xyes && test x$enable_oggflac = xyes; then
879                 AC_CHECK_DECL(FLAC_API_SUPPORTS_OGG_FLAC,
880                         [enable_oggflac=flac], [],
881                         [#include <FLAC/export.h>])
882         fi
883         CFLAGS="$oldcflags"
884         LIBS="$oldlibs"
887 AM_CONDITIONAL(HAVE_FLAC, test x$enable_flac = xyes)
889 if test x$enable_oggflac = xyes; then
890         oldmpdcflags="$MPD_CFLAGS"
891         oldmpdlibs="$MPD_LIBS"
892         AM_PATH_LIBOGGFLAC(MPD_LIBS="$MPD_LIBS $LIBOGGFLAC_LIBS"
893                                 MPD_CFLAGS="$MPD_CFLAGS $LIBOGGFLAC_CFLAGS",
894                            enable_oggflac=no)
897 if test x$enable_oggflac = xyes; then
898         AC_DEFINE(HAVE_OGGFLAC,1,[Define for OggFLAC support])
901 AM_CONDITIONAL(HAVE_OGGFLAC, test x$enable_oggflac = xyes)
903 AM_CONDITIONAL(HAVE_FLAC_COMMON,
904           test x$enable_flac = xyes || test x$enable_oggflac = xyes)
905 AM_CONDITIONAL(HAVE_OGG_COMMON,
906           test x$enable_vorbis = xyes || test x$enable_oggflac = xyes || test x$enable_flac = xyes)
908 if test x$enable_audiofile = xyes; then
909         PKG_CHECK_MODULES(AUDIOFILE, [audiofile >= 0.1.7],
910                 AC_DEFINE(HAVE_AUDIOFILE, 1, [Define for audiofile support]),
911                 enable_audiofile=no)
914 AM_CONDITIONAL(HAVE_AUDIOFILE, test x$enable_audiofile = xyes)
916 MPD_AUTO_PKG(ffmpeg, FFMPEG, [libavformat libavcodec libavutil],
917         [ffmpeg decoder library], [libavformat+libavcodec+libavutil not found])
919 if test x$enable_ffmpeg = xyes; then
920         old_LIBS=$LIBS
921         LIBS="$LIBS $FFMPEG_LIBS"
922         AC_CHECK_LIB(avcodec, avcodec_decode_audio2,,
923                 enable_ffmpeg=no)
924         LIBS=$old_LIBS
927 if test x$enable_ffmpeg = xyes; then
928         # prior to ffmpeg svn12865, you had to specify include files
929         # without path prefix
930         old_CPPCFLAGS=$CPPFLAGS
931         CPPFLAGS="$CPPFLAGS $FFMPEG_CFLAGS"
932         AC_CHECK_HEADER(libavcodec/avcodec.h,,
933                 AC_DEFINE(OLD_FFMPEG_INCLUDES, 1,
934                         [Define if avcodec.h instead of libavcodec/avcodec.h should be included]))
935         CPPCFLAGS=$old_CPPFLAGS
938 if test x$enable_ffmpeg = xyes; then
939         AC_DEFINE(HAVE_FFMPEG, 1, [Define for FFMPEG support])
942 AM_CONDITIONAL(HAVE_FFMPEG, test x$enable_ffmpeg = xyes)
944 if test x$enable_fluidsynth = xyes; then
945         PKG_CHECK_MODULES(FLUIDSYNTH, [fluidsynth],
946                 AC_DEFINE(ENABLE_FLUIDSYNTH, 1, [Define for fluidsynth support]),
947                 enable_fluidsynth=no)
950 AM_CONDITIONAL(ENABLE_FLUIDSYNTH, test x$enable_fluidsynth = xyes)
952 if test x$enable_wildmidi = xyes; then
953         oldcflags=$CFLAGS
954         oldlibs=$LIBS
955         oldcppflags=$CPPFLAGS
957         AC_CHECK_LIB(WildMidi, WildMidi_Init,,
958                 AC_MSG_ERROR([libwildmidi not found]))
960         CFLAGS=$oldcflags
961         LIBS=$oldlibs
962         CPPFLAGS=$oldcppflags
964         AC_SUBST(WILDMIDI_LIBS,-lWildMidi)
965         AC_SUBST(WILDMIDI_CFLAGS,)
967         AC_DEFINE(ENABLE_WILDMIDI, 1, [Define for wildmidi support])
970 AM_CONDITIONAL(ENABLE_WILDMIDI, test x$enable_wildmidi = xyes)
974 dnl Encoder API and shout/httpd output plugin
977 if test x$enable_shout = xyes || test x$enable_httpd_output = xyes; then
978         # at least one output using encoders is explicitly enabled
979         need_encoder=yes
980 elif test x$enable_shout = xauto || test x$enable_httpd_output = xauto; then
981         need_encoder=auto
982 else
983         # all outputs using encoders are disabled
984         need_encoder=no
986         # don't bother to check for encoder plugins
987         enable_vorbis_encoder=no
988         enable_lame_encoder=no
991 MPD_AUTO_PKG(vorbis_encoder, VORBISENC, [vorbisenc],
992         [Ogg Vorbis encoder], [libvorbisenc not found])
994 if test x$enable_lame_encoder != xno; then
995         AM_PATH_LAME([found_lame_encoder=yes], [found_lame_encoder=no])
996         MPD_AUTO_RESULT(lame_encoder, [LAME encoder plugin],
997                 [LAME not found])
1000 AC_SUBST(LAME_CFLAGS)
1001 AC_SUBST(LAME_LIBS)
1003 if test x$enable_vorbis_encoder != xno ||
1004         test x$enable_lame_encoder != xno; then
1005         # at least one encoder plugin is enabled
1006         enable_encoder=yes
1007 else
1008         # no encoder plugin is enabled: disable the whole encoder API
1009         enable_encoder=no
1011         if test x$need_encoder = xyes; then
1012                 AC_MSG_ERROR([No encoder plugin found])
1013         fi
1017 if test x$enable_shout = xauto; then
1018         # handle shout auto-detection: disable if no encoder is
1019         # available
1020         if test x$enable_encoder = xyes; then
1021                 enable_shout=yes
1022         else
1023                 AC_MSG_WARN([No encoder plugin -- disabling the shout output plugin])
1024                 enable_shout=no
1025         fi
1028 if test x$enable_httpd_output = xauto; then
1029         # handle HTTPD auto-detection: disable if no encoder is
1030         # available
1031         if test x$enable_encoder = xyes; then
1032                 enable_httpd_output=yes
1033         else
1034                 AC_MSG_WARN([No encoder plugin -- disabling the HTTP output plugin])
1035                 enable_httpd_output=no
1036         fi
1039 AM_CONDITIONAL(HAVE_SHOUT, test x$enable_shout = xyes)
1040 if test x$enable_shout = xyes; then
1041         AC_DEFINE(HAVE_SHOUT, 1, [Define to enable the shoutcast output])
1044 AM_CONDITIONAL(ENABLE_HTTPD_OUTPUT, test x$enable_httpd_output = xyes)
1045 if test x$enable_httpd_output = xyes; then
1046         AC_DEFINE(ENABLE_HTTPD_OUTPUT, 1, [Define to enable the HTTP server output])
1049 AM_CONDITIONAL(ENABLE_ENCODER, test x$enable_encoder = xyes)
1051 AM_CONDITIONAL(ENABLE_VORBIS_ENCODER, test x$enable_vorbis_encoder = xyes)
1052 if test x$enable_vorbis_encoder = xyes; then
1053         AC_DEFINE(ENABLE_VORBIS_ENCODER, 1,
1054                 [Define to enable the vorbis encoder plugin])
1057 AM_CONDITIONAL(ENABLE_LAME_ENCODER, test x$enable_lame_encoder = xyes)
1058 if test x$enable_lame_encoder = xyes; then
1059         AC_DEFINE(ENABLE_LAME_ENCODER, 1,
1060                 [Define to enable the lame encoder plugin])
1065 dnl Documentation
1068 AC_ARG_ENABLE(documentation,
1069         AS_HELP_STRING([--enable-documentation],
1070                 [build documentation (default: disable)]),,
1071         [enable_documentation=no])
1073 if test x$enable_documentation = xyes; then
1074         AC_PATH_PROG(XMLTO, xmlto)
1075         AC_SUBST(XMLTO)
1076         AM_CONDITIONAL(HAVE_XMLTO, test x$XMLTO != x)
1078         AC_PATH_PROG(DOXYGEN, doxygen)
1079         if test x$DOXYGEN = x; then
1080                 AC_MSG_ERROR([doxygen not found])
1081         fi
1083         AC_SUBST(DOXYGEN)
1084 else
1085         AM_CONDITIONAL(HAVE_XMLTO, false)
1088 AM_CONDITIONAL(ENABLE_DOCUMENTATION, test x$enable_documentation = xyes)
1092 dnl build options
1095 AC_ARG_ENABLE(werror,
1096         AS_HELP_STRING([--enable-werror],
1097                 [treat warnings as errors (default: disabled)]),,
1098         enable_werror=no)
1100 if test "x$enable_werror" = xyes; then
1101         AM_CFLAGS="$AM_CFLAGS -Werror -pedantic-errors"
1104 AC_ARG_ENABLE(debug,
1105         AS_HELP_STRING([--enable-debug],
1106                 [enable debugging (default: disabled)]),,
1107         enable_debug=no)
1109 #if test "x$enable_debug" = xno; then
1110         # don't set NDEBUG for now, until MPD is stable
1111         #AM_CFLAGS="$AM_CFLAGS -DNDEBUG"
1114 AC_ARG_ENABLE(gprof,
1115         AS_HELP_STRING([--enable-gprof],
1116                 [enable profiling via gprof (default: disabled)]),,
1117         enable_gprof=no)
1119 if test "x$enable_gprof" = xyes; then
1120         MPD_CFLAGS="$MPD_CFLAGS -pg"
1121         MPD_LIBS="$MPD_LIBS -pg"
1124 AC_ARG_ENABLE(test,
1125         AS_HELP_STRING([--enable-test],
1126                 [build the test programs (default: disabled)]),,
1127         enable_test=no)
1129 AM_CONDITIONAL(ENABLE_TEST, test "x$enable_test" = xyes)
1133 dnl CFLAGS
1136 if test x$GCC = xyes
1137 then
1138         MPD_CHECK_FLAG([-Wall])
1139         MPD_CHECK_FLAG([-Wextra])
1140         MPD_CHECK_FLAG([-Wno-deprecated-declarations])
1141         MPD_CHECK_FLAG([-Wmissing-prototypes])
1142         MPD_CHECK_FLAG([-Wshadow])
1143         MPD_CHECK_FLAG([-Wpointer-arith])
1144         MPD_CHECK_FLAG([-Wstrict-prototypes])
1145         MPD_CHECK_FLAG([-Wcast-qual])
1146         MPD_CHECK_FLAG([-Wwrite-strings])
1147         MPD_CHECK_FLAG([-pedantic])
1151 dnl pretty-print result
1154 echo ""
1155 echo "########### MPD CONFIGURATION ############"
1156 echo ""
1158 echo " Client Support:"
1159 if test x$enable_ipv6 = xyes; then
1160         echo " IPv6 support ..................enabled"
1161 else
1162         echo " IPv6 support ..................disabled"
1165 if test x$enable_tcp = xyes; then
1166         echo " TCP support ...................enabled"
1167 else
1168         echo " TCP support ...................disabled"
1171 if test x$enable_un = xyes; then
1172         echo " Unix domain socket support ....enabled"
1173 else
1174         echo " Unix domain socket support ....disabled"
1177 echo ""
1180         test x$enable_tcp = xno &&
1181         test x$enable_un = xno; then
1182         AC_MSG_ERROR([No client interfaces configured!])
1185 echo " Playback Support:"
1186 if test x$enable_alsa = xyes; then
1187         echo " ALSA support ..................enabled"
1188 else
1189         echo " ALSA support ..................disabled"
1192 if test x$enable_fifo = xyes; then
1193         echo " FIFO support ..................enabled"
1194 else
1195         echo " FIFO support ..................disabled"
1198 if test x$enable_httpd_output = xyes; then
1199         echo " HTTP daemon support ...........enabled"
1200 else
1201         echo " HTTP daemon support ...........disabled"
1204 if test x$enable_jack = xyes; then
1205         echo " JACK support ..................enabled"
1206 else
1207         echo " JACK support ..................disabled"
1210 if test x$enable_ao = xyes; then
1211         echo " libao support .................enabled"
1212 else
1213         echo " libao support .................disabled"
1216 if test x$enable_oss = xyes; then
1217         echo " OSS support ...................enabled"
1218 else
1219         echo " OSS support ...................disabled"
1222 if test x$enable_osx = xyes; then
1223         echo " OS X support ..................enabled"
1224 else
1225         echo " OS X support ..................disabled"
1228 if test x$enable_pipe_output = xyes; then
1229         echo " Pipeline output support .......enabled"
1230 else
1231         echo " Pipeline output support .......disabled"
1234 if test x$enable_pulse = xyes; then
1235         echo " PulseAudio support ............enabled"
1236 else
1237         echo " PulseAudio support ............disabled"
1240 if test x$enable_mvp = xyes; then
1241         echo " Media MVP support .............enabled"
1242 else
1243         echo " Media MVP support .............disabled"
1246 if test x$enable_shout = xyes; then
1247         echo " SHOUTcast support .............enabled"
1248 else
1249         echo " SHOUTcast support .............disabled"
1252 if test x$enable_solaris_output = xyes; then
1253         echo " Solaris /dev/audio support ....enabled"
1254 else
1255         echo " Solaris /dev/audio support ....disabled"
1258 echo ""
1261         test x$enable_ao = xno &&
1262         test x$enable_oss = xno &&
1263         test x$enable_shout = xno &&
1264         test x$enable_httpd_output = xno &&
1265         test x$enable_solaris_output = xno &&
1266         test x$enable_alsa = xno &&
1267         test x$enable_osx = xno &&
1268         test x$enable_pulse = xno &&
1269         test x$enable_jack = xno &&
1270         test x$enable_fifo = xno &&
1271         test x$enable_pipe_output = xno &&
1272         test x$enable_mvp = xno; then
1273                 AC_MSG_ERROR([No Audio Output types configured!])
1277         test x$enable_shout = xyes ||
1278         test x$enable_httpd_output = xyes; then
1279                 echo " Streaming Encoder Support:"
1280                 if test x$enable_lame_encoder = xyes; then
1281                         echo " LAME mp3 encoder ..............enabled"
1282                 else
1283                         echo " LAME mp3 encoder ..............disabled"
1284                 fi
1286                 if test x$enable_vorbis_encoder = xyes; then
1287                         echo " Ogg Vorbis encoder ............enabled"
1288                 else
1289                         echo " Ogg Vorbis encoder ............disabled"
1290                 fi
1291                 echo ""
1294 echo " File Format Support:"
1296 if test x$enable_aac = xyes; then
1297         echo " AAC support ...................enabled"
1298 else
1299         echo " AAC support ...................disabled"
1302 if test x$enable_sidplay = xyes; then
1303         echo " C64 SID support ...............enabled"
1304 else
1305         echo " C64 SID support ...............disabled"
1308 if test x$enable_ffmpeg = xyes; then
1309         echo " FFMPEG support ................enabled"
1310 else
1311         echo " FFMPEG support ................disabled"
1314 if test x$enable_flac = xyes; then
1315         echo " FLAC support ..................enabled"
1316 else
1317         echo " FLAC support ..................disabled"
1320 if test x$enable_fluidsynth = xyes; then
1321         echo " fluidsynth MIDI support .......enabled"
1322 else
1323         echo " fluidsynth MIDI support .......disabled"
1326 if test x$enable_mikmod = xyes; then
1327         echo " MikMod support ................enabled"
1328 else
1329         echo " MikMod support ................disabled"
1332 if test x$enable_modplug = xyes; then
1333         echo " MODPLUG support ...............enabled"
1334 else
1335         echo " MODPLUG support ...............disabled"
1338 if test x$enable_mad = xyes; then
1339         echo " MAD mp3 decoder support .......enabled"
1340 else
1341         echo " MAD mp3 decoder support .......disabled"
1344 if test x$enable_mp4 = xyes; then
1345         echo " MP4 support ...................enabled"
1346 else
1347         echo " MP4 support ...................disabled"
1350 if test x$enable_mpc = xyes; then
1351         echo " Musepack (MPC) support ........enabled"
1352 else
1353         echo " Musepack (MPC) support ........disabled"
1356 case $enable_oggflac in
1357 yes)
1358         echo " OggFLAC support ...............enabled"
1359         ;;
1360 flac)
1361         echo " OggFLAC support ...............enabled(FLAC 1.1.3)"
1362         ;;
1364         echo " OggFLAC support ...............disabled"
1365         ;;
1366 esac
1368 if test x$enable_vorbis = xyes; then
1369         echo " Ogg Vorbis support ............enabled"
1370         if test x$use_tremor = xyes; then
1371                 echo "   using tremor.................yes"
1372         else
1373                 echo "   using tremor.................no"
1374         fi
1375 else
1376         echo " Ogg Vorbis support ............disabled"
1379 if test x$enable_audiofile = xyes; then
1380         echo " Wave file support .............enabled"
1381 else
1382         echo " Wave file support .............disabled"
1385 if test x$enable_wavpack = xyes; then
1386         echo " WavPack support ...............enabled"
1387 else
1388         echo " WavPack support ...............disabled"
1391 if test x$enable_wildmidi = xyes; then
1392         echo " wildmidi MIDI support .........enabled"
1393 else
1394         echo " wildmidi MIDI support .........disabled"
1400         test x$enable_mad = xno &&
1401         test x$enable_vorbis = xno &&
1402         test x$enable_flac = xno && 
1403         test x$enable_oggflac = xno &&
1404         test x$enable_audiofile = xno && 
1405         test x$enable_aac = xno &&
1406         test x$enable_mpc = xno &&
1407         test x$enable_wavpack = xno &&
1408         test x$enable_ffmpeg = xno &&
1409         test x$enable_modplug = xno &&
1410         test x$enable_sidplay = xno &&
1411         test x$enable_fluidsynth = xno &&
1412         test x$enable_wildmidi = xno &&
1413         test x$enable_mp4 = xno &&
1414         test x$enable_mikmod = xno; then
1415                 AC_MSG_ERROR([No input plugins supported!])
1418 echo ""
1419 echo " Archive support:"
1421 if test x$enable_bzip2 = xyes; then
1422         echo " BZ2 archives support ..........enabled"
1423 else
1424         echo " BZ2 archives support ..........disabled"
1427 if test x$enable_iso9660 = xyes; then
1428         echo " ISO 9660 archives support .....enabled"
1429 else
1430         echo " ISO 9660 archives support .....disabled"
1433 if test x$enable_zip = xyes; then
1434         echo " ZIP archives support ..........enabled"
1435 else
1436         echo " ZIP archives support ..........disabled"
1439 echo ""
1440 echo " Streaming support:"
1442 if test x$enable_lastfm = xyes; then
1443         echo " last.fm radio support .........enabled"
1444 else
1445         echo " last.fm radio support .........disabled"
1448 if test x$enable_curl = xyes; then
1449         echo " libcurl support (streaming) ...enabled"
1450 else
1451         echo " libcurl support (streaming) ...disabled"
1454 if test x$enable_mms = xyes; then
1455         echo " libmms support ................enabled"
1456 else
1457         echo " libmms support ................disabled"
1460 echo ""
1461 echo " Other features:"
1463 if test x$enable_id3 = xyes; then
1464         echo " ID3 tag support ...............enabled"
1465 else
1466         echo " ID3 tag support ...............disabled"
1469 if test x$enable_lsr = xyes; then
1470         echo " libsamplerate support .........enabled"
1471 else
1472         echo " libsamplerate support .........disabled"
1475 if test x$with_zeroconf != xno; then
1476         echo " Zeroconf support ..............$with_zeroconf"
1477 else
1478         echo " Zeroconf support ..............disabled"
1481 if test x$enable_cue = xyes; then
1482         echo " libcue support ................enabled"
1483 else
1484         echo " libcue support ................disabled"
1487 echo ""
1488 echo "##########################################"
1489 echo ""
1491 echo "Generating needed files for compilation"
1492 echo ""
1495 dnl generate files
1498 AC_OUTPUT(Makefile)
1500 echo ""
1502 echo "You are now ready to compile MPD"
1503 echo "Type \"make\" to compile MPD"