mpd version 0.15.12
[mpd-mk.git] / configure.ac
blobb58508efcdbdd150c500dfa5cd9d90537a4711e6
1 AC_PREREQ(2.60)
2 AC_INIT(mpd, 0.15.12, 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
180         AC_CHECK_FUNCS(getpeereid)
184 dnl ##
185 dnl misc libraries
186 dnl ##
188 AC_ARG_ENABLE(cue,
189         AS_HELP_STRING([--enable-cue],
190                 [enable support for libcue support]),,
191         enable_cue=auto)
193 MPD_AUTO_PKG(cue, CUE, [libcue],
194         [libcue parsing library], [libcue not found])
195 if test x$enable_cue = xyes; then
196         AC_DEFINE([HAVE_CUE], 1,
197                 [Define to enable libcue support])
200 AM_CONDITIONAL(HAVE_CUE, test x$enable_cue = xyes)
202 dnl ##
203 dnl Avahi / Zeroconf
204 dnl ##
205 AC_ARG_WITH(zeroconf,
206         AS_HELP_STRING([--with-zeroconf=@<:@auto|avahi|bonjour|no@:>@],
207                 [enable zeroconf backend (default=auto)]),,
208         with_zeroconf="auto")
210 case $with_zeroconf in
211 no|avahi|bonjour)
212         ;;
214         with_zeroconf=auto
215         ;;
216 esac
218 if test x$with_zeroconf != xno; then
219         if test x$with_zeroconf = xavahi || test x$with_zeroconf = xauto; then
220                 PKG_CHECK_MODULES([AVAHI], [avahi-client avahi-glib],
221                          [found_avahi=1;AC_DEFINE([HAVE_AVAHI], 1, [Define to enable Avahi Zeroconf support])]
222                          MPD_LIBS="$MPD_LIBS $AVAHI_LIBS" MPD_CFLAGS="$MPD_CFLAGS $AVAHI_CFLAGS",
223                          [found_avahi=0])
224         fi
226         if test x$found_avahi = x1; then
227                 with_zeroconf=avahi
228         elif test x$with_zeroconf = xavahi; then
229                 AC_MSG_ERROR([Avahi support requested but not found])
230         fi
232         if test x$with_zeroconf = xbonjour || test x$with_zeroconf = xauto; then
233                 AC_CHECK_HEADER(dns_sd.h,
234                         [found_bonjour=1;AC_DEFINE([HAVE_BONJOUR], 1, [Define to enable Bonjour Zeroconf support])],
235                         [found_bonjour=0])
236                 AC_CHECK_LIB(dns_sd, DNSServiceRegister,
237                         MPD_LIBS="$MPD_LIBS -ldns_sd")
238         fi
240         if test x$found_bonjour = x1; then
241                 with_zeroconf=bonjour
242         elif test x$with_zeroconf = xbonjour; then
243                 AC_MSG_ERROR([Bonjour support requested but not found])
244         fi
246         if test x$with_zeroconf = xauto; then
247                 AC_MSG_WARN([No supported Zeroconf backend found, disabling Zeroconf])
248                 with_zeroconf=no
249         else
250                 AC_DEFINE([HAVE_ZEROCONF], 1, [Define to enable Zeroconf support])
251         fi
254 AM_CONDITIONAL(HAVE_ZEROCONF, test x$with_zeroconf != xno)
255 AM_CONDITIONAL(HAVE_AVAHI, test x$with_zeroconf = xavahi)
256 AM_CONDITIONAL(HAVE_BONJOUR, test x$with_zeroconf = xbonjour)
258 AC_ARG_ENABLE(sqlite,
259         AS_HELP_STRING([--enable-sqlite],
260                 [enable support for the SQLite database]),,
261         [enable_sqlite=auto])
263 MPD_AUTO_PKG(sqlite, SQLITE, [sqlite3],
264         [SQLite database support], [sqlite not found])
265 if test x$enable_sqlite = xyes; then
266         AC_DEFINE([ENABLE_SQLITE], 1, [Define to enable sqlite database support])
269 AM_CONDITIONAL(ENABLE_SQLITE, test x$enable_sqlite = xyes)
273 dnl input plugins
276 AC_ARG_ENABLE(curl,
277         AS_HELP_STRING([--enable-curl],
278                 [enable support for libcurl HTTP streaming (default: auto)]),,
279         [enable_curl=auto])
281 MPD_AUTO_PKG(curl, CURL, [libcurl],
282         [libcurl HTTP streaming], [libcurl not found])
283 if test x$enable_curl = xyes; then
284         AC_DEFINE(HAVE_CURL, 1, [Define when libcurl is used for HTTP streaming])
286 AM_CONDITIONAL(HAVE_CURL, test x$enable_curl = xyes)
288 AC_ARG_ENABLE(lastfm,
289         AS_HELP_STRING([--enable-lastfm],
290                 [enable support for last.fm radio (default: disable)]),,
291         [enable_lastfm=no])
293 if test x$enable_lastfm = xyes; then
294         if test x$enable_curl != xyes; then
295                 AC_MSG_ERROR([Cannot enable last.fm radio without curl])
296         fi
298         AC_DEFINE(ENABLE_LASTFM, 1, [Define when last.fm radio is enabled])
300 AM_CONDITIONAL(ENABLE_LASTFM, test x$enable_lastfm = xyes)
302 AC_ARG_ENABLE(mms,
303         AS_HELP_STRING([--enable-mms],
304                 [enable the MMS protocol with libmms]),,
305         [enable_mms=auto])
307 MPD_AUTO_PKG(mms, MMS, [libmms >= 0.4],
308         [libmms mms:// protocol support], [libmms not found])
309 if test x$enable_mms = xyes; then
310         AC_DEFINE(ENABLE_MMS, 1,
311                 [Define when libmms is used for the MMS protocol])
313 AM_CONDITIONAL(ENABLE_MMS, test x$enable_mms = xyes)
317 dnl archive plugins
320 dnl bzip2
321 AC_ARG_ENABLE(bzip2,
322         AS_HELP_STRING([--enable-bzip2],
323                 [enable bzip2 archive support (default: disabled)]),,
324         enable_bzip2=no)
326 if test x$enable_bzip2 = xyes; then
327         AC_CHECK_LIB(bz2, BZ2_bzDecompressInit,
328                 [MPD_LIBS="$MPD_LIBS -lbz2"],
329                 [AC_MSG_ERROR([libbz2 not found])])
332 AM_CONDITIONAL(HAVE_BZ2, test x$enable_bzip2 = xyes)
333 if test x$enable_bzip2 = xyes; then
334         AC_DEFINE(HAVE_BZ2, 1, [Define to have bz2 archive support])
337 dnl zip
338 AC_ARG_ENABLE(zip,
339         AS_HELP_STRING([--enable-zip],
340                 [enable zip archive support (default: disabled)]),,
341         enable_zip=no)
343 MPD_AUTO_PKG(zip, ZZIP, [zziplib >= 0.13],
344         [libzzip archive library], [libzzip not found])
346 AM_CONDITIONAL(HAVE_ZIP, test x$enable_zip = xyes)
347 if test x$enable_zip = xyes; then
348         AC_DEFINE(HAVE_ZIP, 1, [Define to have zip archive support])
351 dnl iso9660
352 AC_ARG_ENABLE(iso9660,
353         AS_HELP_STRING([--enable-iso9660],
354                 [enable iso9660 archive support (default: disabled)]),,
355         enable_iso9660=no)
357 MPD_AUTO_PKG(iso9660, ISO9660, [libiso9660],
358         [libiso9660 archive library], [libiso9660 not found])
360 AM_CONDITIONAL(HAVE_ISO, test x$enable_iso9660 = xyes)
361 if test x$enable_iso9660 = xyes; then
362         AC_DEFINE(HAVE_ISO, 1, [Define to have iso archive support])
365 dnl archive API
367         test x$enable_bzip2 = xyes ||
368         test x$enable_zip = xyes ||
369         test x$enable_iso9660 = xyes; then
370                 enable_archive=yes
371                 AC_DEFINE(ENABLE_ARCHIVE, 1, [The archive API is available])
372 else
373         enable_archive=no
376 AM_CONDITIONAL(ENABLE_ARCHIVE, test x$enable_archive = xyes)
380 dnl metadata
383 AC_ARG_ENABLE(id3,
384         AS_HELP_STRING([--disable-id3],
385                 [disable id3 support (default: enable)]),,
386         enable_id3=yes)
390 dnl decoder plugins
395 AC_ARG_ENABLE(audiofile,
396         AS_HELP_STRING([--disable-audiofile],
397                 [disable audiofile support, disables wave support (default: enable)]),,
398         enable_audiofile=yes)
400 AC_ARG_ENABLE(ffmpeg,
401         AS_HELP_STRING([--enable-ffmpeg],
402                 [enable FFMPEG support]),,
403         enable_ffmpeg=auto)
405 AC_ARG_ENABLE(flac,
406         AS_HELP_STRING([--disable-flac],
407                 [disable flac support (default: enable)]),,
408         enable_flac=yes)
410 dnl ###
411 dnl MAD mp3 decoder
412 dnl ###
414 AC_ARG_ENABLE(mad,
415         AS_HELP_STRING([--enable-mad],
416                 [enable libmad mp3 decoder plugin]),,
417         enable_mad=auto)
419 MPD_AUTO_PKG(mad, MAD, [mad],
420         [libmad MP3 decoder plugin], [libmad not found])
421 if test x$enable_mad = xyes; then
422         AC_DEFINE(HAVE_MAD, 1, [Define to use libmad])
424 AM_CONDITIONAL(HAVE_MAD, test x$enable_mad = xyes)
426 AC_ARG_ENABLE(mikmod,
427         AS_HELP_STRING([--enable-mikmod],
428                 [enable the mikmod decoder (default: disable)]),,
429         enable_mikmod=no)
431 if test x$enable_mikmod = xyes; then
432         AC_PATH_PROG(LIBMIKMOD_CONFIG, libmikmod-config)
433         if test x$LIBMIKMOD_CONFIG != x ; then
434                 AC_SUBST(LIBMIKMOD_CFLAGS, `$LIBMIKMOD_CONFIG --cflags`)
435                 AC_SUBST(LIBMIKMOD_LIBS, `$LIBMIKMOD_CONFIG --libs`)
436                 AC_DEFINE(ENABLE_MIKMOD_DECODER, 1, [Define for mikmod support])
437         else
438                 enable_mikmod=no
439         fi
442 AM_CONDITIONAL(ENABLE_MIKMOD_DECODER, test x$enable_mikmod = xyes)
444 AC_ARG_ENABLE(modplug,
445         AS_HELP_STRING([--enable-modplug],
446                 [enable modplug decoder plugin]),,
447         enable_modplug=auto)
449 found_modplug=$HAVE_CXX
450 MPD_AUTO_PRE(modplug, [modplug decoder plugin], [No C++ compiler found])
452 MPD_AUTO_PKG(modplug, MODPLUG, [libmodplug],
453         [modplug decoder plugin], [libmodplug not found])
454 AM_CONDITIONAL(HAVE_MODPLUG, test x$enable_modplug = xyes)
455 if test x$enable_modplug = xyes; then
456         AC_DEFINE(HAVE_MODPLUG, 1, [Define for modplug support])
459 AC_ARG_ENABLE(mpc,
460         AS_HELP_STRING([--disable-mpc],
461                 [disable musepack (MPC) support (default: enable)]),,
462         enable_mpc=yes)
464 AC_ARG_ENABLE(oggflac,
465         AS_HELP_STRING([--disable-oggflac],
466                 [disable OggFLAC support (default: enable)]),,
467         enable_oggflac=yes)
469 AC_ARG_ENABLE(vorbis,
470         AS_HELP_STRING([--disable-vorbis],
471                 [disable Ogg Vorbis support (default: enable)]),,
472         enable_vorbis=yes)
474 dnl ###
475 dnl Ogg Tremor
476 dnl ###
477 AC_ARG_WITH(tremor,
478         AS_HELP_STRING([--with-tremor=PFX],
479                 [use Tremor (vorbisidec) integer Ogg Vorbis decoder (with optional prefix)]),,
480         with_tremor=no)
482 if test x$with_tremor = xyes || test x$with_tremor = xno; then
483         use_tremor="$with_tremor"
484 else
485         tremor_prefix="$with_tremor"
486         use_tremor=yes
489 AC_ARG_WITH(tremor-libraries,
490         AS_HELP_STRING([--with-tremor-libraries=DIR],
491                 [directory where Tremor library is installed (optional)]),,
492         tremor_libraries="")
494 AC_ARG_WITH(tremor-includes,
495         AS_HELP_STRING([--with-tremor-includes=DIR],
496                 [directory where Tremor header files are installed (optional)]),,
497         tremor_includes="")
499 AC_ARG_ENABLE(sidplay,
500         AS_HELP_STRING([--enable-sidplay],
501                 [enable C64 SID support via libsidplay2]),,
502         enable_sidplay=auto)
504 found_sidplay=$HAVE_CXX
505 MPD_AUTO_PRE(sidplay, [sidplay decoder plugin], [No C++ compiler found])
507 if test x$enable_sidplay != xno; then
508         # we're not using pkg-config here
509         # because libsidplay2's .pc file requires libtool
510         AC_HAVE_LIBRARY(sidplay2, [found_sidplay=yes], [found_sidplay=no])
511         MPD_AUTO_PRE(sidplay, [sidplay decoder plugin],
512                 [libsidplay2 not found])
515 if test x$enable_sidplay != xno; then
516         # can't use AC_HAVE_LIBRARY here, because the dash in the
517         # library name triggers an autoconf bug
518         AC_CHECK_LIB(resid-builder, main,
519                 [found_sidplay=yes], [found_sidplay=no])
520         MPD_AUTO_RESULT(sidplay, [sidplay decoder plugin],
521                 [libresid-builder not found])
524 if test x$enable_sidplay = xyes; then
525         AC_SUBST(SIDPLAY_LIBS,"-lsidplay2 -lresid-builder")
526         AC_SUBST(SIDPLAY_CFLAGS,)
528         AC_DEFINE(ENABLE_SIDPLAY, 1, [Define for libsidplay2 support])
531 AM_CONDITIONAL(ENABLE_SIDPLAY, test x$enable_sidplay = xyes)
533 AC_ARG_ENABLE(fluidsynth,
534         AS_HELP_STRING([--enable-fluidsynth],
535                 [enable MIDI support via fluidsynth (default: disable)]),,
536         enable_fluidsynth=no)
538 AC_ARG_ENABLE(wildmidi,
539         AS_HELP_STRING([--enable-wildmidi],
540                 [enable MIDI support via wildmidi (default: disable)]),,
541         enable_wildmidi=no)
543 AC_ARG_ENABLE(wavpack,
544         AS_HELP_STRING([--disable-wavpack],
545                 [disable WavPack support (default: enable)]),,
546         enable_wavpack=yes)
550 dnl converters
553 AC_ARG_ENABLE(lsr,
554         AS_HELP_STRING([--enable-lsr],
555                 [enable libsamplerate support]),,
556         enable_lsr=auto)
558 MPD_AUTO_PKG(lsr, SAMPLERATE, [samplerate >= 0.0.15],
559         [libsamplerate resampling], [libsamplerate not found])
560 if test x$enable_lsr = xyes; then
561         AC_DEFINE([HAVE_LIBSAMPLERATE], 1,
562                 [Define to enable libsamplerate])
565 if test x$enable_lsr = xyes; then
566         PKG_CHECK_MODULES([SAMPLERATE_013],
567                 [samplerate >= 0.1.3],,
568                 [AC_DEFINE([HAVE_LIBSAMPLERATE_NOINT], 1,
569                 [libsamplerate doesn't provide src_int_to_float_array() (<0.1.3)])])
572 AM_CONDITIONAL(HAVE_LIBSAMPLERATE, test x$enable_lsr = xyes)
576 dnl encoder plugins
579 AC_ARG_ENABLE(vorbis-encoder,
580         AS_HELP_STRING([--enable-vorbis-encoder],
581                 [enable the Ogg Vorbis encoder]),,
582         [enable_vorbis_encoder=auto])
584 AC_ARG_ENABLE(lame-encoder,
585         AS_HELP_STRING([--enable-lame-encoder],
586                 [enable the LAME mp3 encoder]),,
587         enable_lame_encoder=auto)
591 dnl audio output plugins
594 AC_ARG_ENABLE(alsa,
595         AS_HELP_STRING([--enable-alsa], [enable ALSA support]),,
596         enable_alsa=auto)
598 AC_ARG_ENABLE(ao,
599         AS_HELP_STRING([--enable-ao],
600                 [enable support for libao]),,
601         enable_ao=auto)
603 MPD_AUTO_PKG(ao, AO, [ao],
604         [libao output plugin], [libao not found])
605 if test x$enable_ao = xyes; then
606         AC_DEFINE(HAVE_AO, 1, [Define to play with ao])
609 AM_CONDITIONAL(HAVE_AO, test x$enable_ao = xyes)
611 AC_ARG_ENABLE(fifo,
612         AS_HELP_STRING([--disable-fifo],
613                 [disable support for writing audio to a FIFO (default: enable)]),,
614         enable_fifo=yes)
616 AC_ARG_ENABLE(pipe-output,
617         AS_HELP_STRING([--enable-pipe-output],
618                 [enable support for writing audio to a pipe (default: disable)]),,
619         enable_pipe_output=no)
621 if test x$enable_pipe_output = xyes; then
622         AC_DEFINE([ENABLE_PIPE_OUTPUT], 1,
623                 [Define to enable support for writing audio to a pipe])
625 AM_CONDITIONAL(ENABLE_PIPE_OUTPUT, test x$enable_pipe_output = xyes)
627 AC_ARG_ENABLE(jack,
628         AS_HELP_STRING([--enable-jack],
629                 [enable jack support]),,
630         enable_jack=auto)
632 MPD_AUTO_PKG(jack, JACK, [jack >= 0.4],
633         [JACK output plugin], [libjack not found])
634 if test x$enable_jack = xyes; then
635         AC_DEFINE([HAVE_JACK], 1, [Define to enable JACK support])
638 if test x$enable_jack = xyes; then
639         # check whether jack_set_info_function() is available
640         old_LIBS=$LIBS
641         LIBS="$LIBS $JACK_LIBS"
643         AC_CHECK_FUNCS(jack_set_info_function)
645         LIBS=$old_LIBS
648 AM_CONDITIONAL(HAVE_JACK, test x$enable_jack = xyes)
650 AC_ARG_ENABLE(mvp,
651         AS_HELP_STRING([--enable-mvp],
652                 [enable support for Hauppauge Media MVP (default: disable)]),,
653         enable_mvp=no)
655 AC_ARG_ENABLE(oss,
656         AS_HELP_STRING([--disable-oss],
657                 [disable OSS support (default: enable)]),,
658         enable_oss=yes)
660 AC_ARG_ENABLE(pulse,
661         AS_HELP_STRING([--enable-pulse],
662                 [enable support for the PulseAudio sound server]),,
663         enable_pulse=auto)
665 MPD_AUTO_PKG(pulse, PULSE, [libpulse-simple],
666         [PulseAudio output plugin], [libpulse not found])
667 if test x$enable_pulse = xyes; then
668         AC_DEFINE([HAVE_PULSE], 1,
669                 [Define to enable PulseAudio support])
672 AM_CONDITIONAL(HAVE_PULSE, test x$enable_pulse = xyes)
674 AC_ARG_ENABLE(httpd-output,
675         AS_HELP_STRING([--enable-httpd-output],
676                 [enables the HTTP server output]),,
677         [enable_httpd_output=auto])
679 enable_osx=no
680 case "$host_os" in
681         darwin*)
682                 AC_DEFINE(HAVE_OSX, 1, [Define for compiling OS X support])
683                 MPD_LIBS="$MPD_LIBS -framework AudioUnit -framework CoreServices"
684                 enable_osx=yes ;;
685 esac
687 AM_CONDITIONAL(HAVE_OSX, test x$enable_osx = xyes)
689 AC_ARG_ENABLE(shout,
690         AS_HELP_STRING([--enable-shout],
691                 [enables the shoutcast streaming output]),,
692         [enable_shout=auto])
694 enable_shout2="$enable_shout"
695 MPD_AUTO_PKG(shout, SHOUT, [shout],
696         [shout output plugin], [libshout not found])
697 if test x$enable_shout = xyes && test x$enable_shout2 = xauto; then
698         enable_shout=auto
701 case "$host_os" in
702         solaris*)
703                 AC_DEFINE(ENABLE_SOLARIS_OUTPUT, 1, [Define to enable Solaris /dev/audio support])
704                 enable_solaris_output=yes
705                 ;;
707         *)
708                 enable_solaris_output=no
709                 ;;
710 esac
712 AM_CONDITIONAL(ENABLE_SOLARIS_OUTPUT, test x$enable_solaris_output = xyes)
714 if test x$enable_oss = xyes; then
715         AC_CHECK_HEADER(sys/soundcard.h,
716                 [enable_oss=yes;AC_DEFINE(HAVE_OSS,1,[Define to enable OSS])],
717                 [AC_MSG_WARN(Soundcard headers not found -- disabling OSS support);
718                         enable_oss=no])
721 AM_CONDITIONAL(HAVE_OSS, test x$enable_oss = xyes)
723 if test x$enable_fifo = xyes; then
724         AC_CHECK_FUNC([mkfifo],
725                 [enable_fifo=yes;AC_DEFINE([HAVE_FIFO], 1,
726                         [Define to enable support for writing audio to a FIFO])],
727                 [enable_fifo=no;AC_MSG_WARN([mkfifo not found -- disabling support for writing audio to a FIFO])])
730 AM_CONDITIONAL(HAVE_FIFO, test x$enable_fifo = xyes)
732 if test x$enable_mvp = xyes; then
733    AC_DEFINE(HAVE_MVP,1,[Define to enable Hauppauge Media MVP support])
736 AM_CONDITIONAL(HAVE_MVP, test x$enable_mvp = xyes)
738 MPD_AUTO_PKG(alsa, ALSA, [alsa >= 0.9.0],
739         [ALSA output plugin], [libasound not found])
741 if test x$enable_alsa = xyes; then
742         AC_DEFINE(HAVE_ALSA, 1, [Define to enable ALSA support])
745 AM_CONDITIONAL(HAVE_ALSA, test x$enable_alsa = xyes)
747 if test x$enable_id3 = xyes; then
748         PKG_CHECK_MODULES([ID3TAG], [id3tag],,
749                 AC_CHECK_LIB(id3tag, id3_file_open,
750                         [ID3TAG_LIBS="-lid3tag -lz" ID3TAG_CFLAGS=""],
751                         enable_id3=no))
754 if test x$enable_id3 = xyes; then
755         AC_DEFINE(HAVE_ID3TAG, 1, [Define to use id3tag])
758 AM_CONDITIONAL(HAVE_ID3TAG, test x$enable_id3 = xyes)
760 if test x$enable_mpc = xyes; then
761         if test "x$mpcdec_libraries" != "x" ; then
762                 MPCDEC_LIBS="-L$mpcdec_libraries"
763         elif test "x$mpcdec_prefix" != "x" ; then
764                 MPCDEC_LIBS="-L$mpcdec_prefix/lib"
765         fi
767         MPCDEC_LIBS="$MPCDEC_LIBS -lmpcdec"
769         if test "x$mpcdec_includes" != "x" ; then
770                 MPCDEC_CFLAGS="-I$mpcdec_includes"
771         elif test "x$mpcdec_prefix" != "x" ; then
772                 MPCDEC_CFLAGS="-I$mpcdec_prefix/include"
773         fi
775         oldcflags=$CFLAGS
776         oldlibs=$LIBS
777         oldcppflags=$CPPFLAGS
778         CFLAGS="$CFLAGS $MPD_CFLAGS $MPCDEC_CFLAGS -I."
779         LIBS="$LIBS $MPD_LIBS $MPCDEC_LIBS"
780         CPPFLAGS=$CFLAGS
781         AC_CHECK_HEADER(mpc/mpcdec.h,
782                 old_mpcdec=no,
783                 [AC_CHECK_HEADER(mpcdec/mpcdec.h,
784                         old_mpcdec=yes,
785                         enable_mpc=no)])
786         if test x$enable_mpc = xyes; then
787                 AC_CHECK_LIB(mpcdec,main,
788                         [MPD_LIBS="$MPD_LIBS $MPCDEC_LIBS";
789                         MPD_CFLAGS="$MPD_CFLAGS $MPCDEC_CFLAGS";],
790                         enable_mpc=no)
791         fi
792         if test x$enable_mpc = xyes; then
793                 AC_DEFINE(HAVE_MPCDEC,1,
794                         [Define to use libmpcdec for MPC decoding])
795                 if test x$old_mpcdec = xyes; then
796                         AC_DEFINE(MPC_IS_OLD_API, 1,
797                                 [Define if an old pre-SV8 libmpcdec is used])
798                 fi
799         else
800                 AC_MSG_WARN([mpcdec lib needed for MPC support -- disabling MPC support])
801         fi
802         CFLAGS=$oldcflags
803         LIBS=$oldlibs
804         CPPFLAGS=$oldcppflags
807 AM_CONDITIONAL(HAVE_MPCDEC, test x$enable_mpc = xyes)
809 if test x$enable_wavpack = xyes; then
810         PKG_CHECK_MODULES([WAVPACK], [wavpack],
811                 [enable_wavpack=yes;
812                         AC_DEFINE([HAVE_WAVPACK], 1,
813                                 [Define to enable WavPack support])]
814                 MPD_LIBS="$MPD_LIBS $WAVPACK_LIBS"
815                 MPD_CFLAGS="$MPD_CFLAGS $WAVPACK_CFLAGS",
816                 enable_wavpack=no)
819 AM_CONDITIONAL(HAVE_WAVPACK, test x$enable_wavpack = xyes)
821 AM_PATH_FAAD()
823 AM_CONDITIONAL(HAVE_FAAD, test x$enable_aac = xyes)
825 AM_CONDITIONAL(HAVE_MP4, test x$enable_mp4 = xyes)
827 if test x$use_tremor = xyes; then
828         if test "x$tremor_libraries" != "x" ; then
829                 TREMOR_LIBS="-L$tremor_libraries"
830         elif test "x$tremor_prefix" != "x" ; then
831                 TREMOR_LIBS="-L$tremor_prefix/lib"
832         fi
833         TREMOR_LIBS="$TREMOR_LIBS -lvorbisidec"
834         if test "x$tremor_includes" != "x" ; then
835                 TREMOR_CFLAGS="-I$tremor_includes"
836         elif test "x$tremor_prefix" != "x" ; then
837                 TREMOR_CFLAGS="-I$tremor_prefix/include"
838         fi
839         ac_save_CFLAGS="$CFLAGS"
840         ac_save_LIBS="$LIBS"
841         CFLAGS="$CFLAGS $TREMOR_CFLAGS"
842         LIBS="$LIBS $TREMOR_LIBS"
843         AC_CHECK_LIB(vorbisidec,ov_read,enable_vorbis=yes,enable_vorbis=no;
844                 AC_MSG_WARN([vorbisidec lib needed for ogg support with tremor -- disabling ogg support]))
845         CFLAGS="$ac_save_CFLAGS"
846         LIBS="$ac_save_LIBS"
847         if test x$enable_vorbis = xyes; then
848                 AC_DEFINE(ENABLE_VORBIS_DECODER, 1, [Define for Ogg Vorbis support])
849         fi
850 elif test x$enable_vorbis = xyes; then
851         PKG_CHECK_MODULES(VORBIS, [ogg vorbis vorbisfile],
852                 AC_DEFINE(ENABLE_VORBIS_DECODER, 1, [Define for Ogg Vorbis support]),
853                 enable_vorbis=no)
856 AM_CONDITIONAL(ENABLE_VORBIS_DECODER, test x$enable_vorbis = xyes)
858 if test x$use_tremor = xyes; then
859         AC_DEFINE(HAVE_TREMOR,1,
860                 [Define to use tremor (libvorbisidec) for ogg support])
861         if test x$enable_oggflac = xyes; then
862                 AC_MSG_WARN([disabling OggFLAC support because it is incompatible with tremor])
863                 enable_oggflac=no
864         fi
867 AC_SUBST(TREMOR_CFLAGS)
868 AC_SUBST(TREMOR_LIBS)
870 if test x$enable_flac = xyes; then
871         PKG_CHECK_MODULES(FLAC, [flac >= 1.1],
872                 AC_DEFINE(HAVE_FLAC, 1, [Define for FLAC support]),
873                 enable_flac=no)
875         oldcflags="$CFLAGS"
876         oldlibs="$LIBS"
877         CFLAGS="$CFLAGS $FLAC_CFLAGS"
878         LIBS="$LIBS $FLAC_LIBS"
879         if test x$enable_flac = xyes && test x$enable_oggflac = xyes; then
880                 AC_CHECK_DECL(FLAC_API_SUPPORTS_OGG_FLAC,
881                         [enable_oggflac=flac], [],
882                         [#include <FLAC/export.h>])
883         fi
884         CFLAGS="$oldcflags"
885         LIBS="$oldlibs"
888 AM_CONDITIONAL(HAVE_FLAC, test x$enable_flac = xyes)
890 if test x$enable_oggflac = xyes; then
891         oldmpdcflags="$MPD_CFLAGS"
892         oldmpdlibs="$MPD_LIBS"
893         AM_PATH_LIBOGGFLAC(MPD_LIBS="$MPD_LIBS $LIBOGGFLAC_LIBS"
894                                 MPD_CFLAGS="$MPD_CFLAGS $LIBOGGFLAC_CFLAGS",
895                            enable_oggflac=no)
898 if test x$enable_oggflac = xyes; then
899         AC_DEFINE(HAVE_OGGFLAC,1,[Define for OggFLAC support])
902 AM_CONDITIONAL(HAVE_OGGFLAC, test x$enable_oggflac = xyes)
904 AM_CONDITIONAL(HAVE_FLAC_COMMON,
905           test x$enable_flac = xyes || test x$enable_oggflac = xyes)
906 AM_CONDITIONAL(HAVE_OGG_COMMON,
907           test x$enable_vorbis = xyes || test x$enable_oggflac = xyes || test x$enable_flac = xyes)
909 if test x$enable_audiofile = xyes; then
910         PKG_CHECK_MODULES(AUDIOFILE, [audiofile >= 0.1.7],
911                 AC_DEFINE(HAVE_AUDIOFILE, 1, [Define for audiofile support]),
912                 enable_audiofile=no)
915 AM_CONDITIONAL(HAVE_AUDIOFILE, test x$enable_audiofile = xyes)
917 MPD_AUTO_PKG(ffmpeg, FFMPEG, [libavformat >= 52 libavcodec >= 51 libavutil >= 49],
918         [ffmpeg decoder library], [libavformat+libavcodec+libavutil not found])
920 if test x$enable_ffmpeg = xyes; then
921         # prior to ffmpeg svn12865, you had to specify include files
922         # without path prefix
923         old_CPPCFLAGS=$CPPFLAGS
924         CPPFLAGS="$CPPFLAGS $FFMPEG_CFLAGS"
925         AC_CHECK_HEADER(libavcodec/avcodec.h,,
926                 AC_DEFINE(OLD_FFMPEG_INCLUDES, 1,
927                         [Define if avcodec.h instead of libavcodec/avcodec.h should be included]))
928         CPPCFLAGS=$old_CPPFLAGS
931 if test x$enable_ffmpeg = xyes; then
932         AC_DEFINE(HAVE_FFMPEG, 1, [Define for FFMPEG support])
935 AM_CONDITIONAL(HAVE_FFMPEG, test x$enable_ffmpeg = xyes)
937 if test x$enable_fluidsynth = xyes; then
938         PKG_CHECK_MODULES(FLUIDSYNTH, [fluidsynth],
939                 AC_DEFINE(ENABLE_FLUIDSYNTH, 1, [Define for fluidsynth support]),
940                 enable_fluidsynth=no)
943 AM_CONDITIONAL(ENABLE_FLUIDSYNTH, test x$enable_fluidsynth = xyes)
945 if test x$enable_wildmidi = xyes; then
946         oldcflags=$CFLAGS
947         oldlibs=$LIBS
948         oldcppflags=$CPPFLAGS
950         AC_CHECK_LIB(WildMidi, WildMidi_Init,,
951                 AC_MSG_ERROR([libwildmidi not found]))
953         AC_CHECK_LIB(WildMidi, WildMidi_SampledSeek,
954                 [AC_DEFINE(HAVE_WILDMIDI_SAMPLED_SEEK, 1,
955                         [Defined if WildMidi_SampledSeek() is available (libwildmidi <= 0.2.2)])])
957         CFLAGS=$oldcflags
958         LIBS=$oldlibs
959         CPPFLAGS=$oldcppflags
961         AC_SUBST(WILDMIDI_LIBS,-lWildMidi)
962         AC_SUBST(WILDMIDI_CFLAGS,)
964         AC_DEFINE(ENABLE_WILDMIDI, 1, [Define for wildmidi support])
967 AM_CONDITIONAL(ENABLE_WILDMIDI, test x$enable_wildmidi = xyes)
971 dnl Encoder API and shout/httpd output plugin
974 if test x$enable_shout = xyes || test x$enable_httpd_output = xyes; then
975         # at least one output using encoders is explicitly enabled
976         need_encoder=yes
977 elif test x$enable_shout = xauto || test x$enable_httpd_output = xauto; then
978         need_encoder=auto
979 else
980         # all outputs using encoders are disabled
981         need_encoder=no
983         # don't bother to check for encoder plugins
984         enable_vorbis_encoder=no
985         enable_lame_encoder=no
988 MPD_AUTO_PKG(vorbis_encoder, VORBISENC, [vorbisenc],
989         [Ogg Vorbis encoder], [libvorbisenc not found])
991 if test x$enable_lame_encoder != xno; then
992         AM_PATH_LAME([found_lame_encoder=yes], [found_lame_encoder=no])
993         MPD_AUTO_RESULT(lame_encoder, [LAME encoder plugin],
994                 [LAME not found])
997 AC_SUBST(LAME_CFLAGS)
998 AC_SUBST(LAME_LIBS)
1000 if test x$enable_vorbis_encoder != xno ||
1001         test x$enable_lame_encoder != xno; then
1002         # at least one encoder plugin is enabled
1003         enable_encoder=yes
1004 else
1005         # no encoder plugin is enabled: disable the whole encoder API
1006         enable_encoder=no
1008         if test x$need_encoder = xyes; then
1009                 AC_MSG_ERROR([No encoder plugin found])
1010         fi
1014 if test x$enable_shout = xauto; then
1015         # handle shout auto-detection: disable if no encoder is
1016         # available
1017         if test x$enable_encoder = xyes; then
1018                 enable_shout=yes
1019         else
1020                 AC_MSG_WARN([No encoder plugin -- disabling the shout output plugin])
1021                 enable_shout=no
1022         fi
1025 if test x$enable_httpd_output = xauto; then
1026         # handle HTTPD auto-detection: disable if no encoder is
1027         # available
1028         if test x$enable_encoder = xyes; then
1029                 enable_httpd_output=yes
1030         else
1031                 AC_MSG_WARN([No encoder plugin -- disabling the HTTP output plugin])
1032                 enable_httpd_output=no
1033         fi
1036 AM_CONDITIONAL(HAVE_SHOUT, test x$enable_shout = xyes)
1037 if test x$enable_shout = xyes; then
1038         AC_DEFINE(HAVE_SHOUT, 1, [Define to enable the shoutcast output])
1041 AM_CONDITIONAL(ENABLE_HTTPD_OUTPUT, test x$enable_httpd_output = xyes)
1042 if test x$enable_httpd_output = xyes; then
1043         AC_DEFINE(ENABLE_HTTPD_OUTPUT, 1, [Define to enable the HTTP server output])
1046 AM_CONDITIONAL(ENABLE_ENCODER, test x$enable_encoder = xyes)
1048 AM_CONDITIONAL(ENABLE_VORBIS_ENCODER, test x$enable_vorbis_encoder = xyes)
1049 if test x$enable_vorbis_encoder = xyes; then
1050         AC_DEFINE(ENABLE_VORBIS_ENCODER, 1,
1051                 [Define to enable the vorbis encoder plugin])
1054 AM_CONDITIONAL(ENABLE_LAME_ENCODER, test x$enable_lame_encoder = xyes)
1055 if test x$enable_lame_encoder = xyes; then
1056         AC_DEFINE(ENABLE_LAME_ENCODER, 1,
1057                 [Define to enable the lame encoder plugin])
1062 dnl Documentation
1065 AC_ARG_ENABLE(documentation,
1066         AS_HELP_STRING([--enable-documentation],
1067                 [build documentation (default: disable)]),,
1068         [enable_documentation=no])
1070 if test x$enable_documentation = xyes; then
1071         AC_PATH_PROG(XMLTO, xmlto)
1072         AC_SUBST(XMLTO)
1073         AM_CONDITIONAL(HAVE_XMLTO, test x$XMLTO != x)
1075         AC_PATH_PROG(DOXYGEN, doxygen)
1076         if test x$DOXYGEN = x; then
1077                 AC_MSG_ERROR([doxygen not found])
1078         fi
1080         AC_SUBST(DOXYGEN)
1081 else
1082         AM_CONDITIONAL(HAVE_XMLTO, false)
1085 AM_CONDITIONAL(ENABLE_DOCUMENTATION, test x$enable_documentation = xyes)
1089 dnl build options
1092 AC_ARG_ENABLE(werror,
1093         AS_HELP_STRING([--enable-werror],
1094                 [treat warnings as errors (default: disabled)]),,
1095         enable_werror=no)
1097 if test "x$enable_werror" = xyes; then
1098         AM_CFLAGS="$AM_CFLAGS -Werror -pedantic-errors"
1101 AC_ARG_ENABLE(debug,
1102         AS_HELP_STRING([--enable-debug],
1103                 [enable debugging (default: disabled)]),,
1104         enable_debug=no)
1106 #if test "x$enable_debug" = xno; then
1107         # don't set NDEBUG for now, until MPD is stable
1108         #AM_CFLAGS="$AM_CFLAGS -DNDEBUG"
1111 AC_ARG_ENABLE(gprof,
1112         AS_HELP_STRING([--enable-gprof],
1113                 [enable profiling via gprof (default: disabled)]),,
1114         enable_gprof=no)
1116 if test "x$enable_gprof" = xyes; then
1117         MPD_CFLAGS="$MPD_CFLAGS -pg"
1118         MPD_LIBS="$MPD_LIBS -pg"
1121 AC_ARG_ENABLE(test,
1122         AS_HELP_STRING([--enable-test],
1123                 [build the test programs (default: disabled)]),,
1124         enable_test=no)
1126 AM_CONDITIONAL(ENABLE_TEST, test "x$enable_test" = xyes)
1130 dnl CFLAGS
1133 if test x$GCC = xyes
1134 then
1135         MPD_CHECK_FLAG([-Wall])
1136         MPD_CHECK_FLAG([-Wextra])
1137         MPD_CHECK_FLAG([-Wno-deprecated-declarations])
1138         MPD_CHECK_FLAG([-Wmissing-prototypes])
1139         MPD_CHECK_FLAG([-Wshadow])
1140         MPD_CHECK_FLAG([-Wpointer-arith])
1141         MPD_CHECK_FLAG([-Wstrict-prototypes])
1142         MPD_CHECK_FLAG([-Wcast-qual])
1143         MPD_CHECK_FLAG([-Wwrite-strings])
1144         MPD_CHECK_FLAG([-pedantic])
1148 dnl pretty-print result
1151 echo ""
1152 echo "########### MPD CONFIGURATION ############"
1153 echo ""
1155 echo " Client Support:"
1156 if test x$enable_ipv6 = xyes; then
1157         echo " IPv6 support ..................enabled"
1158 else
1159         echo " IPv6 support ..................disabled"
1162 if test x$enable_tcp = xyes; then
1163         echo " TCP support ...................enabled"
1164 else
1165         echo " TCP support ...................disabled"
1168 if test x$enable_un = xyes; then
1169         echo " Unix domain socket support ....enabled"
1170 else
1171         echo " Unix domain socket support ....disabled"
1174 echo ""
1177         test x$enable_tcp = xno &&
1178         test x$enable_un = xno; then
1179         AC_MSG_ERROR([No client interfaces configured!])
1182 echo " Playback Support:"
1183 if test x$enable_alsa = xyes; then
1184         echo " ALSA support ..................enabled"
1185 else
1186         echo " ALSA support ..................disabled"
1189 if test x$enable_fifo = xyes; then
1190         echo " FIFO support ..................enabled"
1191 else
1192         echo " FIFO support ..................disabled"
1195 if test x$enable_httpd_output = xyes; then
1196         echo " HTTP daemon support ...........enabled"
1197 else
1198         echo " HTTP daemon support ...........disabled"
1201 if test x$enable_jack = xyes; then
1202         echo " JACK support ..................enabled"
1203 else
1204         echo " JACK support ..................disabled"
1207 if test x$enable_ao = xyes; then
1208         echo " libao support .................enabled"
1209 else
1210         echo " libao support .................disabled"
1213 if test x$enable_oss = xyes; then
1214         echo " OSS support ...................enabled"
1215 else
1216         echo " OSS support ...................disabled"
1219 if test x$enable_osx = xyes; then
1220         echo " OS X support ..................enabled"
1221 else
1222         echo " OS X support ..................disabled"
1225 if test x$enable_pipe_output = xyes; then
1226         echo " Pipeline output support .......enabled"
1227 else
1228         echo " Pipeline output support .......disabled"
1231 if test x$enable_pulse = xyes; then
1232         echo " PulseAudio support ............enabled"
1233 else
1234         echo " PulseAudio support ............disabled"
1237 if test x$enable_mvp = xyes; then
1238         echo " Media MVP support .............enabled"
1239 else
1240         echo " Media MVP support .............disabled"
1243 if test x$enable_shout = xyes; then
1244         echo " SHOUTcast support .............enabled"
1245 else
1246         echo " SHOUTcast support .............disabled"
1249 if test x$enable_solaris_output = xyes; then
1250         echo " Solaris /dev/audio support ....enabled"
1251 else
1252         echo " Solaris /dev/audio support ....disabled"
1255 echo ""
1258         test x$enable_ao = xno &&
1259         test x$enable_oss = xno &&
1260         test x$enable_shout = xno &&
1261         test x$enable_httpd_output = xno &&
1262         test x$enable_solaris_output = xno &&
1263         test x$enable_alsa = xno &&
1264         test x$enable_osx = xno &&
1265         test x$enable_pulse = xno &&
1266         test x$enable_jack = xno &&
1267         test x$enable_fifo = xno &&
1268         test x$enable_pipe_output = xno &&
1269         test x$enable_mvp = xno; then
1270                 AC_MSG_ERROR([No Audio Output types configured!])
1274         test x$enable_shout = xyes ||
1275         test x$enable_httpd_output = xyes; then
1276                 echo " Streaming Encoder Support:"
1277                 if test x$enable_lame_encoder = xyes; then
1278                         echo " LAME mp3 encoder ..............enabled"
1279                 else
1280                         echo " LAME mp3 encoder ..............disabled"
1281                 fi
1283                 if test x$enable_vorbis_encoder = xyes; then
1284                         echo " Ogg Vorbis encoder ............enabled"
1285                 else
1286                         echo " Ogg Vorbis encoder ............disabled"
1287                 fi
1288                 echo ""
1291 echo " File Format Support:"
1293 if test x$enable_aac = xyes; then
1294         echo " AAC support ...................enabled"
1295 else
1296         echo " AAC support ...................disabled"
1299 if test x$enable_sidplay = xyes; then
1300         echo " C64 SID support ...............enabled"
1301 else
1302         echo " C64 SID support ...............disabled"
1305 if test x$enable_ffmpeg = xyes; then
1306         echo " FFMPEG support ................enabled"
1307 else
1308         echo " FFMPEG support ................disabled"
1311 if test x$enable_flac = xyes; then
1312         echo " FLAC support ..................enabled"
1313 else
1314         echo " FLAC support ..................disabled"
1317 if test x$enable_fluidsynth = xyes; then
1318         echo " fluidsynth MIDI support .......enabled"
1319 else
1320         echo " fluidsynth MIDI support .......disabled"
1323 if test x$enable_mikmod = xyes; then
1324         echo " MikMod support ................enabled"
1325 else
1326         echo " MikMod support ................disabled"
1329 if test x$enable_modplug = xyes; then
1330         echo " MODPLUG support ...............enabled"
1331 else
1332         echo " MODPLUG support ...............disabled"
1335 if test x$enable_mad = xyes; then
1336         echo " MAD mp3 decoder support .......enabled"
1337 else
1338         echo " MAD mp3 decoder support .......disabled"
1341 if test x$enable_mp4 = xyes; then
1342         echo " MP4 support ...................enabled"
1343 else
1344         echo " MP4 support ...................disabled"
1347 if test x$enable_mpc = xyes; then
1348         echo " Musepack (MPC) support ........enabled"
1349 else
1350         echo " Musepack (MPC) support ........disabled"
1353 case $enable_oggflac in
1354 yes)
1355         echo " OggFLAC support ...............enabled"
1356         ;;
1357 flac)
1358         echo " OggFLAC support ...............enabled(FLAC 1.1.3)"
1359         ;;
1361         echo " OggFLAC support ...............disabled"
1362         ;;
1363 esac
1365 if test x$enable_vorbis = xyes; then
1366         echo " Ogg Vorbis support ............enabled"
1367         if test x$use_tremor = xyes; then
1368                 echo "   using tremor.................yes"
1369         else
1370                 echo "   using tremor.................no"
1371         fi
1372 else
1373         echo " Ogg Vorbis support ............disabled"
1376 if test x$enable_audiofile = xyes; then
1377         echo " Wave file support .............enabled"
1378 else
1379         echo " Wave file support .............disabled"
1382 if test x$enable_wavpack = xyes; then
1383         echo " WavPack support ...............enabled"
1384 else
1385         echo " WavPack support ...............disabled"
1388 if test x$enable_wildmidi = xyes; then
1389         echo " wildmidi MIDI support .........enabled"
1390 else
1391         echo " wildmidi MIDI support .........disabled"
1397         test x$enable_mad = xno &&
1398         test x$enable_vorbis = xno &&
1399         test x$enable_flac = xno && 
1400         test x$enable_oggflac = xno &&
1401         test x$enable_audiofile = xno && 
1402         test x$enable_aac = xno &&
1403         test x$enable_mpc = xno &&
1404         test x$enable_wavpack = xno &&
1405         test x$enable_ffmpeg = xno &&
1406         test x$enable_modplug = xno &&
1407         test x$enable_sidplay = xno &&
1408         test x$enable_fluidsynth = xno &&
1409         test x$enable_wildmidi = xno &&
1410         test x$enable_mp4 = xno &&
1411         test x$enable_mikmod = xno; then
1412                 AC_MSG_ERROR([No input plugins supported!])
1415 echo ""
1416 echo " Archive support:"
1418 if test x$enable_bzip2 = xyes; then
1419         echo " BZ2 archives support ..........enabled"
1420 else
1421         echo " BZ2 archives support ..........disabled"
1424 if test x$enable_iso9660 = xyes; then
1425         echo " ISO 9660 archives support .....enabled"
1426 else
1427         echo " ISO 9660 archives support .....disabled"
1430 if test x$enable_zip = xyes; then
1431         echo " ZIP archives support ..........enabled"
1432 else
1433         echo " ZIP archives support ..........disabled"
1436 echo ""
1437 echo " Streaming support:"
1439 if test x$enable_lastfm = xyes; then
1440         echo " last.fm radio support .........enabled"
1441 else
1442         echo " last.fm radio support .........disabled"
1445 if test x$enable_curl = xyes; then
1446         echo " libcurl support (streaming) ...enabled"
1447 else
1448         echo " libcurl support (streaming) ...disabled"
1451 if test x$enable_mms = xyes; then
1452         echo " libmms support ................enabled"
1453 else
1454         echo " libmms support ................disabled"
1457 echo ""
1458 echo " Other features:"
1460 if test x$enable_id3 = xyes; then
1461         echo " ID3 tag support ...............enabled"
1462 else
1463         echo " ID3 tag support ...............disabled"
1466 if test x$enable_lsr = xyes; then
1467         echo " libsamplerate support .........enabled"
1468 else
1469         echo " libsamplerate support .........disabled"
1472 if test x$with_zeroconf != xno; then
1473         echo " Zeroconf support ..............$with_zeroconf"
1474 else
1475         echo " Zeroconf support ..............disabled"
1478 if test x$enable_cue = xyes; then
1479         echo " libcue support ................enabled"
1480 else
1481         echo " libcue support ................disabled"
1484 echo ""
1485 echo "##########################################"
1486 echo ""
1488 echo "Generating needed files for compilation"
1489 echo ""
1492 dnl generate files
1495 AC_OUTPUT(Makefile)
1497 echo ""
1499 echo "You are now ready to compile MPD"
1500 echo "Type \"make\" to compile MPD"