1dnl Process this file with autoconf to produce a configure script.
2AC_INIT([deadbeef], [0.7.2])
3
4AC_CONFIG_HEADER(config.h)
5
6AM_INIT_AUTOMAKE([1.11 dist-bzip2 tar-ustar silent-rules])
7AM_SILENT_RULES([yes])
8AM_MAINTAINER_MODE()
9
10AC_USE_SYSTEM_EXTENSIONS
11LT_INIT([disable-static])
12AC_PROG_CC
13AC_PROG_CXX
14AC_PROG_OBJC
15AC_STDC_HEADERS
16AC_PROG_INSTALL
17dnl AC_PROG_LIBTOOL
18AC_CONFIG_MACRO_DIR([m4])
19AC_C_BIGENDIAN
20AM_GNU_GETTEXT
21PKG_PROG_PKG_CONFIG
22AM_PROG_CC_C_O
23
24IT_PROG_INTLTOOL([0.40.0])
25GETTEXT_PACKAGE=deadbeef
26AC_SUBST(GETTEXT_PACKAGE)
27
28test "$prefix" = NONE && prefix=/usr/local
29AC_DEFINE_UNQUOTED(LOCALEDIR, "${prefix}/${DATADIRNAME}/locale", [Name of gettext locale directory])
30
31case "$host" in
32  i686-apple-*)
33    AC_DEFINE(ARCH_X86_32, 1, [architecture is x86 on OSX])
34    LIB="static-deps/lib-x86-32-apple"
35    YASM_FLAGS="-f macho32 -D ARCH_X86_32 -m x86 -DPREFIX"
36    APE_USE_YASM=yes
37    OS_OSX=yes
38    ;;
39  x86_64-apple-*)
40    AC_DEFINE(ARCH_X86_64, 1, [architecture is x86_64 on OSX])
41    LIB="static-deps/lib-x86-64-apple"
42    YASM_FLAGS="-f macho64 -D ARCH_X86_64 -m amd64 -DPIC -DPREFIX"
43    APE_USE_YASM=yes
44    OS_OSX=yes
45    ;;
46  i386-*-* | i486-*-* | i586-*-* | i686-*-* | i86pc-*-*)
47    AC_DEFINE(ARCH_X86_32, 1, [architecture is x86])
48    LIB="static-deps/lib-x86-32"
49    YASM_FLAGS="-f elf -D ARCH_X86_32 -m x86"
50    APE_USE_YASM=yes
51    ;;
52  x86_64-*-* | amd64-*-*)
53    AC_DEFINE(ARCH_X86_64, 1, [architecture is x86_64])
54    LIB="static-deps/lib-x86-64"
55    YASM_FLAGS="-f elf -D ARCH_X86_64 -m amd64"
56    APE_USE_YASM=yes
57    ;;
58  powerpc-*-* )
59    AC_DEFINE(ARCH_PPC_32, 1, [architecture is ppc32])
60    LIB="static-deps/lib-ppc-32"
61    ;;
62  powerpc64-*-* )
63    AC_DEFINE(ARCH_PPC_64, 1, [architecture is ppc64])
64    LIB="static-deps/lib-ppc-64"
65    ;;
66  *)
67    AC_DEFINE(ARCH_UNKNOWN, 1, [architecture is unknown])
68    ;;
69esac
70AC_SUBST(LIB)
71AC_SUBST(YASM_FLAGS)
72
73test "x$prefix" = xNONE && prefix=$ac_default_prefix
74
75dnl INSANE_CFLAGS="-Wformat -Wdisabled-optimization -Wcomment -Wchar-subscripts -Wunused-function -Wunused-value -Wuninitialized -Wtype-limits -Wbad-function-cast"
76dnl INSANE_CXXFLAGS="-Wcomment -Wchar-subscripts -Wunused-function -Wunused-value -Wuninitialized -Wtype-limits"
77
78AC_SUBST(INSANE_CFLAGS)
79AC_SUBST(INSANE_CXXFLAGS)
80
81AC_ARG_ENABLE(nullout,  [AS_HELP_STRING([--disable-nullout ], [disable NULL output plugin (default: enabled)])], [enable_nullout=$enableval], [enable_nullout=yes])
82AC_ARG_ENABLE(alsa,     [AS_HELP_STRING([--disable-alsa    ], [disable ALSA output plugin (default: enabled)])], [enable_alsa=$enableval], [enable_alsa=yes])
83AC_ARG_ENABLE(oss,      [AS_HELP_STRING([--disable-oss     ], [disable Open Sound System output plugin (default: enabled)])], [enable_oss=$enableval], [enable_oss=yes])
84AC_ARG_ENABLE(pulse,    [AS_HELP_STRING([--disable-pulse   ], [disable PulseAudio output plugin (default: enabled)])], [enable_pulse=$enableval], [enable_pulse=yes])
85AC_ARG_ENABLE(coreaudio,[AS_HELP_STRING([--disable-coreaudio], [disable CoreAudio output plugin (default: enabled)])], [enable_coreaudio=$enableval], [enable_coreaudio=yes])
86AC_ARG_ENABLE(gtk3,     [AS_HELP_STRING([--disable-gtk3     ], [disable GTK3 version of gtkui plugin (default: enabled)])], [enable_gtk3=$enableval], [enable_gtk3=yes])
87AC_ARG_ENABLE(gtk2,     [AS_HELP_STRING([--disable-gtk2     ], [disable GTK2 version of gtkui plugin (default: enabled)])], [enable_gtk2=$enableval], [enable_gtk2=yes])
88AC_ARG_ENABLE(vfs_curl, [AS_HELP_STRING([--disable-vfs-curl], [disable HTTP streaming vfs plugin (default: enabled)])], [enable_vfs_curl=$enableval], [enable_vfs_curl=yes])
89AC_ARG_ENABLE(lfm,      [AS_HELP_STRING([--disable-lfm     ], [disable last.fm/libre.fm scrobbler plugin (default: enabled)])], [enable_lfm=$enableval], [enable_lfm=yes])
90AC_ARG_ENABLE(artwork,  [AS_HELP_STRING([--disable-artwork ], [disable album art loader plugin (default: enabled)])], [enable_artwork=$enableval], [enable_artwork=yes])
91AC_ARG_ENABLE(artwork-network,  [AS_HELP_STRING([--disable-artwork-network ], [disable album art network loading support (default: enabled)])], [enable_artwork_network=$enableval], [enable_artwork_network=yes])
92AC_ARG_ENABLE(supereq,  [AS_HELP_STRING([--disable-supereq ], [disable SuperEQ DSP plugin (default: enabled)])], [enable_supereq=$enableval], [enable_supereq=yes])
93AC_ARG_ENABLE(sid,      [AS_HELP_STRING([--disable-sid     ], [disable commodore64 SID music player plugin (default: enabled)])], [enable_sid=$enableval], [enable_sid=yes])
94AC_ARG_ENABLE(mp3,      [AS_HELP_STRING([--disable-mp3     ], [disable mp3 plugin (default: enabled)])], [enable_mp3=$enableval], [enable_mp3=yes])
95AC_ARG_ENABLE(libmad,   [AS_HELP_STRING([--disable-libmad     ], [disable libmad support in mp3 plugin (default: auto)])], [enable_libmad=$enableval], [enable_libmad=yes])
96AC_ARG_ENABLE(libmpg123,[AS_HELP_STRING([--disable-libmpg123     ], [disable libmpg123 support in mp3 plugin (default: auto)])], [enable_libmpg123=$enableval], [enable_libmpg123=yes])
97AC_ARG_ENABLE(ffap,     [AS_HELP_STRING([--disable-ffap    ], [disable Monkey's Audio plugin (default: enabled)])], [enable_ffap=$enableval], [enable_ffap=yes])
98AC_ARG_ENABLE(vtx,      [AS_HELP_STRING([--disable-vtx     ], [disable libayemy VTX ZX-Spectrum music player plugin (default: enabled)])], [enable_vtx=$enableval], [enable_vtx=yes])
99AC_ARG_ENABLE(adplug,   [AS_HELP_STRING([--disable-adplug  ], [disable adplug plugin (default: enabled)])], [enable_adplug=$enableval], [enable_adplug=yes])
100AC_ARG_ENABLE(hotkeys,  [AS_HELP_STRING([--disable-hotkeys ], [disable global hotkeys plugin (default: enabled)])], [enable_hotkeys=$enableval], [enable_hotkeys=yes])
101AC_ARG_ENABLE(vorbis,   [AS_HELP_STRING([--disable-vorbis  ], [disable Ogg Vorbis player plugin (default: enabled)])], [enable_vorbis=$enableval], [enable_vorbis=yes])
102AC_ARG_ENABLE(ffmpeg,   [AS_HELP_STRING([--disable-ffmpeg  ], [disable FFMPEG plugin for WMA, AMR, etc (default: enabled)])], [enable_ffmpeg=$enableval], [enable_ffmpeg=yes])
103AC_ARG_ENABLE(flac,     [AS_HELP_STRING([--disable-flac    ], [disable FLAC player plugin (default: enabled)])], [enable_flac=$enableval], [enable_flac=yes])
104AC_ARG_ENABLE(sndfile,  [AS_HELP_STRING([--disable-sndfile ], [disable libsndfile plugin for PCM wave files (default: enabled)])], [enable_sndfile=$enableval], [enable_sndfile=yes])
105AC_ARG_ENABLE(wavpack,  [AS_HELP_STRING([--disable-wavpack ], [disable wavpack plugin (default: enabled)])], [enable_wavpack=$enableval], [enable_wavpack=yes])
106AC_ARG_ENABLE(cdda,     [AS_HELP_STRING([--disable-cdda    ], [disable CD-Audio plugin (default: enabled)])], [enable_cdda=$enableval], [enable_cdda=yes])
107AC_ARG_ENABLE(cdda-paranoia,     [AS_HELP_STRING([--disable-cdda-paranoia    ], [disable CD-Audio error correction during ripping (default: enabled)])], [enable_cdda_paranoia=$enableval], [enable_cdda_paranoia=yes])
108AC_ARG_ENABLE(gme,      [AS_HELP_STRING([--disable-gme     ], [disable Game Music Emu plugin for NSF, AY, etc (default: enabled)])], [enable_gme=$enableval], [enable_gme=yes])
109AC_ARG_ENABLE(notify,   [AS_HELP_STRING([--disable-notify  ], [disable notification-daemon support plugin (default: enabled)])], [enable_notify=$enableval], [enable_notify=yes])
110AC_ARG_ENABLE(shellexec, [AS_HELP_STRING([--disable-shellexec], [disable shell commands plugin (default: enabled)])], [enable_shellexec=$enableval], [enable_shellexec=yes])
111AC_ARG_ENABLE(musepack, [AS_HELP_STRING([--disable-musepack], [disable musepack plugin (default: enabled)])], [enable_musepack=$enableval], [enable_musepack=yes])
112AC_ARG_ENABLE(wildmidi, [AS_HELP_STRING([--disable-wildmidi], [disable wildmidi plugin (default: enabled)])], [enable_wildmidi=$enableval], [enable_wildmidi=yes])
113AC_ARG_ENABLE(tta,      [AS_HELP_STRING([--disable-tta     ], [disable tta plugin (default: enabled)])], [enable_tta=$enableval], [enable_tta=yes])
114AC_ARG_ENABLE(dca,      [AS_HELP_STRING([--disable-dca     ], [disable dca (DTS audio)  plugin (default: enabled)])], [enable_dca=$enableval], [enable_dca=yes])
115AC_ARG_ENABLE(aac,      [AS_HELP_STRING([--disable-aac     ], [disable AAC decoder based on FAAD2 (default: enabled)])], [enable_aac=$enableval], [enable_aac=yes])
116AC_ARG_ENABLE(mms,      [AS_HELP_STRING([--disable-mms     ], [disable MMS streaming vfs plugin (default: enabled)])], [enable_mms=$enableval], [enable_mms=yes])
117AC_ARG_ENABLE(staticlink, [AS_HELP_STRING([--enable-staticlink], [link everything statically (default: disabled)])], [enable_staticlink=$enableval], [enable_staticlink=no])
118AC_ARG_ENABLE(portable, [AS_HELP_STRING([--enable-portable ], [make portable build (default: disabled, opts: yes,no,full)])], [enable_portable=$enableval], [enable_portable=no])
119AC_ARG_ENABLE(src,      [AS_HELP_STRING([--enable-src      ], [build libsamplerate (SRC) plugin (default: auto)])], [enable_src=$enableval], [enable_src=yes])
120AC_ARG_ENABLE(m3u,      [AS_HELP_STRING([--enable-m3u      ], [build m3u plugin (default: auto)])], [enable_m3u=$enableval], [enable_m3u=yes])
121AC_ARG_ENABLE(vfs-zip,      [AS_HELP_STRING([--enable-vfs-zip      ], [build vfs_zip plugin (default: auto)])], [enable_vfs_zip=$enableval], [enable_vfs_zip=yes])
122AC_ARG_ENABLE(converter,      [AS_HELP_STRING([--enable-converter      ], [build converter plugin (default: auto)])], [enable_converter=$enableval], [enable_converter=yes])
123AC_ARG_ENABLE(artwork-imlib2, [AS_HELP_STRING([--enable-artwork-imlib2      ], [use imlib2 in artwork plugin (default: auto)])], [enable_artwork_imlib2=$enableval], [enable_artwork_imlib2=yes])
124dnl AC_ARG_ENABLE(medialib, [AS_HELP_STRING([--enable-medialib      ], [build medialibrary plugin (default: auto)])], [enable_medialib=$enableval], [enable_medialib=no])
125AC_ARG_ENABLE(dumb,      [AS_HELP_STRING([--enable-dumb      ], [build DUMB plugin (default: auto)])], [enable_dumb=$enableval], [enable_dumb=yes])
126AC_ARG_ENABLE(shn,      [AS_HELP_STRING([--enable-shn      ], [build SHN plugin (default: auto)])], [enable_shn=$enableval], [enable_shn=yes])
127AC_ARG_ENABLE(psf,      [AS_HELP_STRING([--enable-psf      ], [build AOSDK-based PSF(,QSF,SSF,DSF) plugin (default: auto)])], [enable_psf=$enableval], [enable_psf=yes])
128AC_ARG_ENABLE(mono2stereo,      [AS_HELP_STRING([--enable-mono2stereo      ], [build mono2stereo DSP plugin (default: auto)])], [enable_mono2stereo=$enableval], [enable_mono2stereo=yes])
129AC_ARG_ENABLE(shellexecui, [AS_HELP_STRING([--enable-shellexecui      ], [build shellexec GTK UI plugin (default: auto)])], [enable_shellexecui=$enableval], [enable_shellexecui=yes])
130AC_ARG_ENABLE(alac, [AS_HELP_STRING([--enable-alac      ], [build ALAC plugin (default: auto)])], [enable_alac=$enableval], [enable_alac=yes])
131AC_ARG_ENABLE(wma, [AS_HELP_STRING([--enable-wma      ], [build WMA plugin (default: auto)])], [enable_wma=$enableval], [enable_wma=yes])
132AC_ARG_ENABLE(pltbrowser, [AS_HELP_STRING([--enable-pltbrowser      ], [build playlist browser gui plugin (default: auto)])], [enable_pltbrowser=$enableval], [enable_pltbrowser=yes])
133AC_ARG_ENABLE(sc68, [AS_HELP_STRING([--enable-sc68     ], [build sc68 Atari ST and Amiga music player (default: auto)])], [enable_sc68=$enableval], [enable_sc68=yes])
134AC_ARG_ENABLE(abstract_socket, [AS_HELP_STRING([--enable-abstract-socket      ], [use abstract UNIX socket for IPC (default: disabled)])], [enable_abstract_socket=$enableval], [enable_abstract_socket=no])
135
136AS_IF([test "${enable_staticlink}" != "no"], [
137    AC_DEFINE_UNQUOTED([STATICLINK], [1], [Define if building static version])
138    STATICLINK=yes
139])
140
141AS_IF([test "${enable_abstract_socket}" != "no"], [
142    AC_DEFINE_UNQUOTED([USE_ABSTRACT_SOCKET_NAME], [1], [Define to use abstract socket name, without file])
143    USE_ABSTRACT_SOCKET_NAME=yes
144])
145
146case "$host" in
147  *-*-gnu )
148    AS_IF([test "${enable_staticlink}" != "no"], [
149        NOCPPLIB="-nostdlib ../../$LIB/lib/libsupc++.a"
150    ], [
151        NOCPPLIB=""
152    ])
153    AC_SUBST(NOCPPLIB)
154    ;;
155esac
156
157AC_CHECK_LIB([intl], [main], [INTL_LIBS="-lintl";AC_SUBST(INTL_LIBS)])
158
159dnl check for yasm
160AC_CHECK_PROG(HAVE_YASM, yasm, yes, no)
161
162dnl check for log2
163AC_CHECK_LIB([m], [log2], AC_DEFINE([HAVE_LOG2], [], [Define to 1 if the system has log2 in libm]))
164
165dnl check for libdl
166AC_CHECK_LIB([dl], [main], [HAVE_DL=yes;DL_LIBS="-ldl";AC_SUBST(DL_LIBS)])
167
168dnl check libsocket (OpenIndiana)
169AC_CHECK_LIB([socket], [main], [HAVE_SOCKET=yes;DL_LIBS="-lsocket";AC_SUBST(DL_LIBS)])
170dnl check for seperate alloca.h (OpenIndiana)
171AC_CHECK_HEADER([alloca.h],[],[alloca.h not found.])
172dnl check for syslimits.h (BSD)
173AC_CHECK_HEADERS([sys/syslimits.h])
174AC_CHECK_HEADERS([sys/cdefs.h])
175
176AS_IF([test "${enable_portable}" != "no" -a "${enable_staticlink}" != "no"], [
177    AC_DEFINE_UNQUOTED([PORTABLE], [1], [Define if building portable version])
178    PORTABLE=yes
179
180
181    AS_IF([test "${enable_portable}" = "full"], [
182        AC_DEFINE_UNQUOTED([PORTABLE_FULL], [1], [Define if portable version should keep configs in app folder])
183        PORTABLE_FULL=yes
184    ])
185
186    PREFIXFLAGS="-DPREFIX=donotuse -DLIBDIR=donotuse -DDOCDIR=donotuse -I./$LIB/include -I../../$LIB/include"
187], [
188    PREFIXFLAGS=" -DLIBDIR=\\\"$libdir\\\" -DPREFIX=\\\"$prefix\\\" -DDOCDIR=\\\"$docdir\\\""
189])
190
191CXXFLAGS="$CXXFLAGS $INSANE_CXXFLAGS -D_GNU_SOURCE $PREFIXFLAGS -DDDB_WARN_DEPRECATED=1"
192CFLAGS="$CFLAGS $INSANE_CFLAGS -D_GNU_SOURCE $PREFIXFLAGS -DDDB_WARN_DEPRECATED=1"
193
194AS_IF([test "${enable_staticlink}" != "no"], [
195    HAVE_ZLIB=yes
196    ZLIB_CFLAGS="-I../../$LIB/include"
197    ZLIB_LIBS="../../$LIB/lib/libz.a"
198    AC_SUBST(ZLIB_CFLAGS)
199    AC_SUBST(ZLIB_LIBS)
200], [
201    AC_CHECK_LIB([z], [main], [HAVE_ZLIB=yes])
202    ZLIB_LIBS="-lz"
203    AC_SUBST(ZLIB_LIBS)
204])
205
206AS_IF([test "${enable_staticlink}" != "no"], [
207    HAVE_ZIP=yes
208    ZIP_CFLAGS="-I../../$LIB/include"
209    ZIP_LIBS="../../$LIB/lib/libzip.a ../../$LIB/lib/libz.a"
210    AC_SUBST(ZIP_CFLAGS)
211    AC_SUBST(ZIP_LIBS)
212], [
213    PKG_CHECK_MODULES(ZIP, libzip, HAVE_ZIP=yes, HAVE_ZIP=no)
214])
215
216AS_IF([test "${enable_gtk3}" = "yes"], [
217    AS_IF([test "${enable_staticlink}" != "no"], [
218        GTK3_DEPS_CFLAGS="-I../../${LIB}/gtk-3.0.0/include/gtk-3.0 -I../../${LIB}/gtk-3.0.0/include/pango-1.0 -I../../${LIB}/gtk-3.0.0/include/gio-unix-2.0/ -I../../${LIB}/gtk-3.0.0/include/atk-1.0 -I../../${LIB}/gtk-3.0.0/include/cairo -I../../${LIB}/gtk-3.0.0/include/gdk-pixbuf-2.0 -I../../${LIB}/gtk-3.0.0/include/freetype2 -I../../${LIB}/gtk-3.0.0/include/glib-2.0 -I../../${LIB}/gtk-3.0.0/lib/glib-2.0/include"
219        GTK3_DEPS_LIBS="-L${GTK_ROOT_300}/lib -lgtk-3 -lpango-1.0 -lcairo -lgobject-2.0 -lgthread-2.0 -lglib-2.0"
220        AC_SUBST(GTK3_DEPS_CFLAGS)
221        AC_SUBST(GTK3_DEPS_LIBS)
222        HAVE_GTK3=yes
223    ], [
224       PKG_CHECK_MODULES(GTK3_DEPS, gtk+-3.0 >= 3.0 gthread-2.0 glib-2.0, HAVE_GTK3=yes, HAVE_GTK3=no)
225    ])
226dnl    AC_CHECK_LIB([SM], [main], [HAVE_SM=yes;SM_LIBS="-lSM";AC_SUBST(SM_LIBS)])
227dnl    AC_CHECK_LIB([ICE], [main], [HAVE_ICE=yes;ICE_LIBS="-lICE";AC_SUBST(ICE_LIBS)])
228    if test "$OS_OSX" = "yes"; then
229        PKG_CHECK_MODULES(GTK_MAC, gtk-mac-integration)
230        AC_SUBST(GTK_MAC_LIBS)
231        AC_SUBST(GTK_MAC_CFLAGS)
232    fi
233
234    ], [
235    HAVE_GTK3=no
236])
237AM_CONDITIONAL(OS_OSX, test "x$OS_OSX" = "xyes")
238
239
240AS_IF([test "${enable_gtk2}" = "yes" -o "${enable_gtk3}" = "yes"], [
241    AS_IF([test "${enable_staticlink}" != "no"], [
242        JANSSON_CFLAGS="-I../../$LIB/include"
243        JANSSON_LIBS=-ljansson
244        AC_SUBST(JANSSON_CFLAGS)
245        AC_SUBST(JANSSON_LIBS)
246    ], [
247        PKG_CHECK_MODULES(JANSSON, jansson)
248    ])
249])
250
251AS_IF([test "${enable_gtk2}" = "yes"], [
252    AS_IF([test "${enable_staticlink}" != "no"], [
253        GTK2_DEPS_CFLAGS="-I${GTK_ROOT_216}/include/gtk-2.0 -I${GTK_ROOT_216}/lib/gtk-2.0/include -I${GTK_ROOT_216}/include/atk-1.0 -I${GTK_ROOT_216}/include/cairo -I${GTK_ROOT_216}/include/pango-1.0 -I${GTK_ROOT_216}/include -I${GTK_ROOT_216}/include/glib-2.0 -I${GTK_ROOT_216}/lib/glib-2.0/include"
254        GTK2_DEPS_LIBS="-L${GTK_ROOT_216}/lib -lgtk-x11-2.0 -lpango-1.0 -lcairo -lgdk-x11-2.0 -lgdk_pixbuf-2.0 -lgobject-2.0 -lgthread-2.0 -lglib-2.0"
255        AC_SUBST(GTK2_DEPS_CFLAGS)
256        AC_SUBST(GTK2_DEPS_LIBS)
257        HAVE_GTK2=yes
258    ], [
259        PKG_CHECK_MODULES(GTK2_DEPS, gtk+-2.0 >= 2.12 gthread-2.0 glib-2.0, HAVE_GTK2=yes, HAVE_GTK2=no)
260    ])
261dnl    AC_CHECK_LIB([SM], [main], [HAVE_SM=yes;SM_LIBS="-lSM";AC_SUBST(SM_LIBS)])
262dnl    AC_CHECK_LIB([ICE], [main], [HAVE_ICE=yes;ICE_LIBS="-lICE";AC_SUBST(ICE_LIBS)])
263], [
264    HAVE_GTK2=no
265])
266
267AS_IF([test "${enable_alsa}" != "no"], [
268    AS_IF([test "${enable_staticlink}" != "no"], [
269        HAVE_ALSA=yes
270        ALSA_DEPS_CFLAGS="-I../../$LIB/include"
271        ALSA_DEPS_LIBS="-lasound"
272        AC_SUBST(ALSA_DEPS_CFLAGS)
273        AC_SUBST(ALSA_DEPS_LIBS)
274    ],
275    [
276        PKG_CHECK_MODULES(ALSA_DEPS, alsa, HAVE_ALSA=yes, HAVE_ALSA=no)
277    ])
278])
279
280AC_CHECK_HEADER([CoreAudio/AudioHardware.h], [found_coreaudio_h=yes], [found_coreaudio_h=no])
281
282AS_IF([test "${enable_coreaudio}" != "no" -a "${found_coreaudio_h}" != "no"], [
283  AC_DEFINE(HAVE_COREAUDIO, 1, [Build coreaudio support])
284  HAVE_COREAUDIO=yes
285  COREAUDIO_LIBS="-Wl,-framework,CoreAudio -Wl,-framework,AudioUnit"
286])
287
288AC_SUBST(COREAUDIO_LIBS)
289
290AS_IF([test "${enable_ffmpeg}" != "no"], [
291    AS_IF([test "${enable_staticlink}" != "no"], [
292        FFMPEG_DEPS_CFLAGS="-I../../$LIB/include"
293        FFMPEG_DEPS_LIBS="../../$LIB/lib/libavcodec.a -lpthread ../../$LIB/lib/libavformat.a ../../$LIB/lib/libavcodec.a ../../$LIB/lib/libavutil.a -lm ../../$LIB/lib/libz.a ../../$LIB/lib/libopencore-amrnb.a ../../$LIB/lib/libopencore-amrwb.a ../../$LIB/lib/libopus.a"
294        AC_SUBST(FFMPEG_DEPS_CFLAGS)
295        AC_SUBST(FFMPEG_DEPS_LIBS)
296        HAVE_FFMPEG=yes
297    ], [
298        PKG_CHECK_MODULES(FFMPEG_DEPS, libavcodec >= 51.0.0 libavutil libavformat >= 52.0.0, HAVE_FFMPEG=yes, HAVE_FFMPEG=no)
299    ])
300])
301
302AS_IF([test "${enable_staticlink}" != "no"], [
303    HAVE_DBUS=yes
304    DBUS_DEPS_LIBS="../../$LIB/lib/libdbus-1.a ../../$LIB/lib/libexpat.a -lrt"
305    DBUS_DEPS_CFLAGS="-I../../$LIB/include/dbus-1"
306    AC_SUBST(DBUS_DEPS_LIBS)
307], [
308    PKG_CHECK_MODULES(DBUS_DEPS, dbus-1, HAVE_DBUS=yes, HAVE_DBUS=no)
309])
310
311AS_IF([test "${enable_pulse}" != "no"], [
312    AS_IF([test "${enable_staticlink}" != "no"], [
313        HAVE_PULSE=yes
314        PULSE_DEPS_LIBS="-lpulse-simple"
315        PULSE_DEPS_CFLAGS="-I../../$LIB/include/"
316        AC_SUBST(DBUS_DEPS_CFLAGS)
317        AC_SUBST(DBUS_DEPS_LIBS)
318    ], [
319        PKG_CHECK_MODULES(PULSE_DEPS, libpulse-simple, HAVE_PULSE=yes, HAVE_PULSE=no)
320    ])
321])
322
323AC_CHECK_HEADER([iconv.h],[],[iconv.h not found.])
324
325AC_CHECK_LIB([iconv], [main], [have_iconv=yes], [have_iconv=no])
326AS_IF([test "${have_iconv}" = "yes"], [
327    ICONV_LIB="-liconv"
328    AC_SUBST(ICONV_LIB)
329    AC_DEFINE(HAVE_LIBICONV,1,[Use libiconv instead of glibc iconv])
330])
331
332AX_CHECK_COMPILER_FLAGS(-msse2, HAVE_SSE2=1, [])
333AS_IF([test "${HAVE_SSE2}"], [
334    AC_DEFINE(HAVE_SSE2,1,[Support SSE2 instructions])
335])
336
337dnl curl lib
338AS_IF([test "${enable_staticlink}" != "no"], [
339    HAVE_CURL=yes
340    CURL_LIBS="../../$LIB/lib/libcurl.a -lrt"
341    CURL_CFLAGS="-I../../$LIB/include"
342    AC_SUBST(CURL_LIBS)
343    AC_SUBST(CURL_CFLAGS)
344], [
345    AC_CHECK_LIB([curl], [main], [HAVE_CURL=yes])
346    CURL_LIBS="-lcurl"
347    AC_SUBST(CURL_LIBS)
348])
349
350dnl mpg3 plugin
351
352AS_IF([test "${enable_mp3}" != "no"], [
353    AS_IF([test "${enable_staticlink}" != "no"], [
354        HAVE_MP3=yes
355        HAVE_LIBMAD=yes
356        MAD_CFLAGS="-I../../$LIB/include"
357        MAD_LIBS="../../$LIB/lib/libmad.a"
358        AC_SUBST(MAD_CFLAGS)
359        AC_SUBST(MAD_LIBS)
360        HAVE_LIBMPG123=yes
361        MPG123_CFLAGS="-I../../$LIB/include"
362        MPG123_LIBS="../../$LIB/lib/libmpg123.a"
363        AC_SUBST(MPG123_CFLAGS)
364        AC_SUBST(MPG123_LIBS)
365    ], [
366        AS_IF([test "${enable_libmad}" != "no"], [
367            AC_CHECK_LIB([mad], [main], [HAVE_LIBMAD=yes])
368        ])
369        AS_IF([test "${enable_libmpg123}" != "no"], [
370            AC_CHECK_LIB([mpg123], [main], [HAVE_LIBMPG123=yes])
371        ])
372        HAVE_MP3=yes
373        AS_IF([test "${HAVE_LIBMAD}" = "yes"], [
374            MAD_LIBS="-lmad"
375            AC_SUBST(MAD_LIBS)
376        ])
377        AS_IF([test "${HAVE_LIBMPG123}" = "yes"], [
378            MPG123_LIBS="-lmpg123"
379            AC_SUBST(MPG123_LIBS)
380        ])
381        AS_IF([test "${HAVE_LIBMAD}" != "yes" -a "${HAVE_LIBMPG123}" != "yes"], [
382            echo "MP3 plugin is disabled: can't find either libmad of libmpg123"
383            HAVE_MP3=no
384        ])
385    ])
386])
387
388dnl vorbis plugin
389AS_IF([test "${enable_vorbis}" != "no"], [
390    AS_IF([test "${enable_staticlink}" != "no"], [
391        HAVE_VORBISPLUGIN=yes
392        VORBIS_LIBS="-lvorbisfile -lvorbis -lm -logg"
393        VORBIS_CFLAGS="-I../../$LIB/include"
394        AC_SUBST(VORBIS_LIBS)
395        AC_SUBST(VORBIS_CFLAGS)
396    ], [
397        AC_CHECK_LIB([vorbis], [main], [HAVE_VORBIS=yes])
398        AC_CHECK_LIB([vorbisfile], [main], [HAVE_VORBISFILE=yes])
399        AS_IF([test "$HAVE_VORBIS" = "yes" -a "${HAVE_VORBISFILE}" = "yes"], [
400            HAVE_VORBISPLUGIN=yes
401            VORBIS_LIBS="-lvorbis -lvorbisfile"
402            AC_SUBST(VORBIS_LIBS)
403        ])
404    ])
405])
406
407dnl libogg for oggedit
408AS_IF([test "${enable_staticlink}" != "no"], [
409    HAVE_OGG=yes
410    OGG_LIBS="-logg"
411    OGG_CFLAGS="-I../../$LIB/include"
412    AC_SUBST(OGG_LIBS)
413    AC_SUBST(OGG_CFLAGS)
414], [
415    AC_CHECK_LIB([ogg], [main], [HAVE_OGG=yes])
416    AS_IF([test "$HAVE_OGG" = "yes"], [
417        OGG_LIBS="-logg"
418        AC_SUBST(OGG_LIBS)
419    ])
420])
421
422AC_CHECK_LIB([ogg], [ogg_stream_flush_fill], [HAVE_OGG_STREAM_FLUSH_FILL=yes])
423
424dnl flac plugin
425AS_IF([test "${enable_flac}" != "no"], [
426    AS_IF([test "${enable_staticlink}" != "no"], [
427        HAVE_FLACPLUGIN=yes
428        FLAC_CFLAGS="-I../../$LIB/include"
429        FLAC_LIBS="-lFLAC"
430        AC_SUBST(FLAC_CFLAGS)
431        AC_SUBST(FLAC_LIBS)
432    ], [
433        AC_CHECK_LIB([FLAC], [main], [HAVE_FLAC=yes])
434        AS_IF([test "${HAVE_FLAC}" = "yes"], [
435            HAVE_FLACPLUGIN=yes
436            FLAC_LIBS="-lFLAC"
437            AC_SUBST(FLAC_LIBS)
438        ])
439    ])
440])
441
442dnl wavpack plugin
443AS_IF([test "${enable_wavpack}" != "no"], [
444    AS_IF([test "${enable_staticlink}" != "no"], [
445        HAVE_WAVPACKPLUGIN=yes
446        WAVPACK_CFLAGS="-I../../$LIB/include"
447        WAVPACK_LIBS="../../$LIB/lib/libwavpack.a"
448        AC_SUBST(WAVPACK_CFLAGS)
449        AC_SUBST(WAVPACK_LIBS)
450    ], [
451        AC_CHECK_LIB([wavpack], [main], [HAVE_WAVPACK=yes])
452        AS_IF([test "${HAVE_WAVPACK}" = "yes"], [
453            HAVE_WAVPACKPLUGIN=yes
454            WAVPACK_LIBS="-lwavpack"
455            AC_SUBST(WAVPACK_LIBS)
456        ])
457    ])
458])
459
460dnl libsndfile plugin
461AS_IF([test "${enable_sndfile}" != "no"], [
462    AS_IF([test "${enable_staticlink}" != "no"], [
463        HAVE_SNDFILEPLUGIN=yes
464        SNDFILE_CFLAGS="-I../../$LIB/include"
465        SNDFILE_LIBS="../../$LIB/lib/libsndfile.a"
466        AC_SUBST(SNDFILE_CFLAGS)
467        AC_SUBST(SNDFILE_LIBS)
468    ], [
469        AC_CHECK_LIB([sndfile], [main], [HAVE_SNDFILE=yes])
470        AS_IF([test "${HAVE_SNDFILE}" = "yes"], [
471            HAVE_SNDFILEPLUGIN=yes
472            SNDFILE_LIBS="-lsndfile"
473            AC_SUBST(SNDFILE_LIBS)
474        ])
475    ])
476])
477
478dnl vfs_curl plugin
479AS_IF([test "${enable_vfs_curl}" != "no"], [
480    AS_IF([test "${HAVE_CURL}" = "yes"], [
481        HAVE_VFS_CURL=yes
482        VFS_CURL_LIBS="$CURL_LIBS"
483        AC_SUBST(VFS_CURL_LIBS)
484        VFS_CURL_CFLAGS="$CURL_CFLAGS"
485        AC_SUBST(VFS_CURL_CFLAGS)
486    ])
487])
488
489dnl cdda plugin
490AS_IF([test "${enable_cdda}" != "no"], [
491    AS_IF([test "${enable_staticlink}" != "no"], [
492        HAVE_CDDAPLUGIN=yes
493        CDDA_LIBS="../../$LIB/lib/libcdio.a ../../$LIB/lib/libcdio_cdda.a ../../$LIB/lib/libcdio_paranoia.a ../../$LIB/lib/libudf.a ../../$LIB/lib/libiso9660.a ../../$LIB/lib/libcddb.a"
494        CDDA_CFLAGS="-I../../$LIB/include -DUSE_PARANOIA -DUSE_PARANOIA_10_2"
495        AC_SUBST(CDDA_LIBS)
496        AC_SUBST(CDDA_CFLAGS)
497    ], [
498        AC_CHECK_LIB([cdio], [main], [HAVE_CDIO=yes])
499        AC_CHECK_LIB([cddb], [main], [HAVE_CDDB=yes])
500        AS_IF([test "${HAVE_CDIO}" = "yes" -a "${HAVE_CDDB}" = "yes"], [
501            HAVE_CDDAPLUGIN=yes
502            AC_CHECK_LIB([cdda_interface], [main], [HAVE_CDDA_INTERFACE=yes])
503            AC_CHECK_LIB([cdda_paranoia], [main], [HAVE_CDDA_PARANOIA=yes])
504            AS_IF([test "${enable_cdda_paranoia}" != "no" -a "${HAVE_CDDA_INTERFACE}" = "yes" -a "${HAVE_CDDA_PARANOIA}" = "yes"], [
505                CDDA_CFLAGS="-DUSE_PARANOIA"
506                AC_CHECK_HEADER([cdda/cdda_interface.h], [CDDA_CFLAGS="-DUSE_CDDA_SUBDIR $CDDA_CFLAGS"])
507                AC_SUBST(CDDA_CFLAGS)
508                CDDA_LIBS="-lcdio -lcdda_interface -lcdda_paranoia -lcddb"
509            ] , [
510                CDDA_LIBS="-lcdio -lcddb"
511            ])
512            AC_SUBST(CDDA_LIBS)
513        ])
514    ])
515])
516
517AS_IF([test "${enable_alsa}" != "no" -a "${HAVE_ALSA}" = "yes"], [
518    HAVE_ALSAPLUGIN=yes
519])
520
521AS_IF([test "${enable_ffmpeg}" != "no"], [
522    AS_IF([test "${enable_staticlink}" = "no"], [
523        AS_IF([test "${HAVE_FFMPEG}" = "yes"], [
524            HAVE_FFMPEGPLUGIN=yes
525            AC_CHECK_HEADER([ffmpeg/avformat.h], FFMPEG_DEPS_CFLAGS="$FFMPEG_DEPS_CFLAGS -D FFMPEG_OLD")
526        ])
527    ], [
528        HAVE_FFMPEGPLUGIN=yes
529    ])
530])
531
532AS_IF([test "${enable_hotkeys}" != "no"], [
533    AS_IF([test "${enable_staticlink}" != "no"], [
534        HOTKEYS_CFLAGS="-I../../$LIB/include"
535        HOTKEYS_LIBS="-lX11"
536        AC_SUBST(HOTKEYS_CFLAGS)
537        AC_SUBST(HOTKEYS_LIBS)
538        HAVE_HOTKEYS=yes
539    ],
540    [
541        AC_CHECK_HEADER([X11/Xlib.h], HAVE_XLIB_H=yes)
542        AS_IF([test "${HAVE_XLIB_H}" = "yes"], [
543            AS_IF([test "${HAVE_XLIB_H}" = "yes"], [
544                HOTKEYS_LIBS="-lX11"
545                AC_SUBST(HOTKEYS_LIBS)
546                HAVE_HOTKEYS=yes
547            ])
548        ])
549    ])
550])
551
552dnl no support for global hotkeys on osx, but plugin will work anyway
553AS_IF([test "${OS_OSX}" = "yes"], [
554    HAVE_HOTKEYS=yes
555])
556
557dnl *** OSS output (partly stolen from audacious)
558AS_IF([test "${enable_oss}" != "no"], [
559    have_oss=no
560
561    AC_MSG_CHECKING(for OSS include dir)
562    OSS_CFLAGS=""
563    AS_IF([test -f "/etc/oss.conf"], [
564        for i in `cat /etc/oss.conf`; do
565            t=`echo $i | sed -e 's/OSSLIBDIR=//'`
566            AS_IF([test "${i}" != "${t}"], [
567                AS_IF([test -f "${t}/include/sys/soundcard.h" -o -f "${i}/include/soundcard.h"], [
568                    OSS_CFLAGS="-I$t/include/sys"
569                    AC_MSG_RESULT([$OSS_CFLAGS])
570                    have_oss=yes
571                ])
572            ])
573        done
574    ], [
575        AC_MSG_RESULT([not found])
576    ])
577
578    AS_IF([test "${have_oss}" != "yes"], [
579        AC_MSG_CHECKING(for sys/soundcard.h)
580        AC_CHECK_HEADERS(sys/soundcard.h)
581        AS_IF([test "${ac_cv_header_sys_soundcard_h}" = "yes"], [
582            have_oss=yes
583            AC_MSG_RESULT([found])
584        ], [
585            AC_MSG_RESULT([not found])
586        ])
587    ])
588
589
590    AS_IF([test "${have_oss}" = "yes"], [
591        HAVE_OSS=yes
592        AC_SUBST(OSS_CFLAGS)
593    ])
594])
595
596AS_IF([test "${enable_pulseaudio}" != "no"], [
597    AS_IF([test "${HAVE_PULSE}" = "yes"], [
598        HAVE_PULSEPLUGIN=yes
599    ])
600])
601
602dnl lastfm plugin
603AS_IF([test "${enable_lfm}" != "no"], [
604    AS_IF([test "${HAVE_CURL}" = "yes" -a "${enable_lastfm}" != "no"], [
605        HAVE_LASTFM=yes
606    ])
607])
608
609dnl shellexec plugin
610AS_IF([test "${enable_shellexec}" != "no"], [
611    HAVE_SHELLEXEC=yes
612])
613
614AS_IF([test "${enable_shellexecui}" != "no" -a "${enable_shellexec}" != "no"], [
615    AS_IF([test "${HAVE_GTK2}" = "yes" -o "${HAVE_GTK3}" = "yes"], [
616        HAVE_SHELLEXECUI=yes
617    ])
618])
619
620AS_IF([test "${enable_artwork}" != "no"], [
621    AS_IF([test "${enable_staticlink}" != "no"], [
622        HAVE_JPEG=yes
623        JPEG_DEPS_LIBS="../../$LIB/lib/libjpeg.a"
624        JPEG_DEPS_CFLAGS="-I../../$LIB/include"
625        AC_SUBST(JPEG_DEPS_CFLAGS)
626        AC_SUBST(JPEG_DEPS_LIBS)
627        HAVE_PNG=yes
628        PNG_DEPS_CFLAGS="-I../../$LIB/include/libpng15"
629        PNG_DEPS_LIBS="../../$LIB/lib/libpng.a ../../$LIB/lib/libz.a"
630        AC_SUBST(PNG_DEPS_CFLAGS)
631        AC_SUBST(PNG_DEPS_LIBS)
632        HAVE_IMLIB2=no
633    ], [
634        AS_IF([test "${enable_artwork_imlib2}" != "no"], [
635            PKG_CHECK_MODULES(IMLIB2_DEPS, imlib2, HAVE_IMLIB2=yes, HAVE_IMLIB2=no)
636        ])
637
638        AS_IF([test "${enable_artwork_imlib2}" = "no" -o "${HAVE_IMLIB2}" = "no"], [
639            AC_CHECK_LIB([jpeg], [main], [HAVE_JPEG=yes;JPEG_DEPS_LIBS="-ljpeg";AC_SUBST(JPEG_DEPS_LIBS)])
640            AC_CHECK_LIB([png], [main], [HAVE_PNG=yes;PNG_DEPS_LIBS="-lpng -lz";AC_SUBST(PNG_DEPS_LIBS)])
641        ])
642    ])
643
644    AS_IF([test "${enable_artwork_network}" = "yes"], [
645        ARTWORK_USE_VFS_CURL=yes
646    ])
647
648    AS_IF([test "${HAVE_VFS_CURL}" = "yes" -o "${enable_artwork_network}" = "no" ], [
649        AS_IF([test "${HAVE_JPEG}" = "yes" -o "${HAVE_IMLIB2}" = "yes"], [
650            HAVE_ARTWORK=yes
651        ])
652    ])
653])
654
655AS_IF([test "${enable_adplug}" != "no"], [
656    HAVE_ADPLUG=yes
657])
658
659AS_IF([test "${enable_ffap}" != "no"], [
660    AS_IF([test "${HAVE_YASM}" = "yes" -o "${APE_USE_YASM}" != "yes"], [
661        HAVE_FFAP=yes
662    ])
663])
664
665AS_IF([test "${enable_sid}" != "no"], [
666    HAVE_SID=yes
667])
668
669AS_IF([test "${enable_nullout}" != "no"], [
670    HAVE_NULLOUT=yes
671])
672
673AS_IF([test "${enable_src}" != "no"], [
674    AS_IF([test "${enable_staticlink}" != "no"], [
675        LIBSAMPLERATE_DEPS_CFLAGS="-I../../$LIB/include"
676        LIBSAMPLERATE_DEPS_LIBS="../../$LIB/lib/libsamplerate.a -lpthread ${DL_LIBS}"
677        AC_SUBST(LIBSAMPLERATE_DEPS_CFLAGS)
678        AC_SUBST(LIBSAMPLERATE_DEPS_LIBS)
679        HAVE_DSP_SRC=yes
680    ], [
681        PKG_CHECK_MODULES(LIBSAMPLERATE_DEPS, samplerate, HAVE_LIBSAMPLERATE=yes, HAVE_LIBSAMPLERATE=no)
682        AS_IF([test "${HAVE_LIBSAMPLERATE}" = "yes"], [
683            HAVE_DSP_SRC=yes
684        ])
685    ])
686])
687
688AS_IF([test "${enable_supereq}" != "no"], [
689    HAVE_SUPEREQ=yes
690])
691
692AS_IF([test "${enable_vtx}" != "no"], [
693    HAVE_VTX=yes
694])
695
696AS_IF([test "${enable_gme}" != "no"], [
697    HAVE_GME=yes
698])
699
700AS_IF([test "${HAVE_DBUS}" = "yes" -a "${enable_notify}" != "no"], [
701    HAVE_NOTIFY=yes
702    NOTIFY_LIBS="$DBUS_DEPS_LIBS"
703    NOTIFY_CFLAGS="$DBUS_DEPS_CFLAGS"
704    AC_SUBST(NOTIFY_LIBS)
705    AC_SUBST(NOTIFY_CFLAGS)
706])
707
708AS_IF([test "${enable_musepack}" != "no"], [
709    HAVE_MUSEPACK=yes
710])
711
712AS_IF([test "${enable_wildmidi}" != "no"], [
713    HAVE_WILDMIDI=yes
714])
715
716AS_IF([test "${enable_tta}" != "no"], [
717    HAVE_TTA=yes
718])
719
720AS_IF([test "${enable_dca}" != "no"], [
721    HAVE_DCA=yes
722])
723
724AS_IF([test "${enable_aac}" != "no"], [
725    AS_IF([test "${enable_staticlink}" != "no"], [
726        FAAD2_CFLAGS="-I../../$LIB/include"
727        FAAD2_LIBS="../../$LIB/lib/libfaad.a"
728        AC_SUBST(FAAD2_CFLAGS)
729        AC_SUBST(FAAD2_LIBS)
730        HAVE_AAC=yes
731    ], [
732        AC_CHECK_LIB([faad], [main], [HAVE_FAAD=1])
733        AS_IF([test "${HAVE_FAAD}"], [
734            FAAD2_LIBS="-lfaad"
735            AC_SUBST(FAAD2_LIBS)
736            HAVE_AAC=yes
737        ])
738    ])
739])
740
741AS_IF([test "${enable_mms}" != "no"], [
742    LIBMMS_LIBS=""
743    AC_SUBST(LIBMMS_LIBS)
744    HAVE_MMS=yes
745])
746
747AS_IF([test "${enable_m3u}" != "no"], [
748    HAVE_M3U=yes
749])
750
751AS_IF([test "${enable_vfs_zip}" != "no"], [
752    AS_IF([test "${HAVE_ZLIB}" = "yes" -a "${HAVE_ZIP}" = "yes"], [
753        HAVE_VFS_ZIP=yes
754    ])
755])
756
757AS_IF([test "${enable_converter}" != "no"], [
758    AS_IF([test "${HAVE_GTK2}" = "yes" -o "${HAVE_GTK3}" = "yes"], [
759        HAVE_CONVERTER=yes
760    ])
761])
762
763dnl AS_IF([test "${enable_medialib}" != "no"], [
764dnl     HAVE_MEDIALIB=yes
765dnl ])
766
767AS_IF([test "${enable_dumb}" != "no"], [
768    HAVE_DUMB=yes
769])
770
771AS_IF([test "${enable_shn}" != "no"], [
772    HAVE_SHN=yes
773])
774
775AS_IF([test "${enable_psf}" != "no"], [
776    HAVE_PSF=yes
777])
778
779AS_IF([test "${enable_mono2stereo}" != "no"], [
780    HAVE_MONO2STEREO=yes
781])
782
783AS_IF([test "${enable_alac}" != "no"], [
784    HAVE_ALAC=yes
785])
786
787AS_IF([test "${enable_wma}" != "no"], [
788    HAVE_WMA=yes
789])
790
791AS_IF([test "${enable_pltbrowser}" != "no"], [
792    HAVE_PLTBROWSER=yes
793])
794
795AS_IF([test "${enable_sc68}" != "no"], [
796    HAVE_SC68=yes
797])
798
799PLUGINS_DIRS="plugins/liboggedit plugins/libmp4ff plugins/libparser plugins/lastfm plugins/mp3 plugins/vorbis plugins/flac plugins/wavpack plugins/sndfile plugins/vfs_curl plugins/cdda plugins/gtkui plugins/alsa plugins/ffmpeg plugins/hotkeys plugins/oss plugins/artwork plugins/adplug plugins/ffap plugins/sid plugins/nullout plugins/supereq plugins/vtx plugins/gme plugins/pulse plugins/notify plugins/musepack plugins/wildmidi plugins/tta plugins/dca plugins/aac plugins/mms plugins/shellexec plugins/shellexecui plugins/dsp_libsrc plugins/m3u plugins/vfs_zip plugins/converter plugins/dumb plugins/shn plugins/ao plugins/mono2stereo plugins/alac plugins/wma plugins/pltbrowser plugins/coreaudio plugins/sc68"
800
801AM_CONDITIONAL(APE_USE_YASM, test "x$APE_USE_YASM" = "xyes")
802AM_CONDITIONAL(HAVE_VORBIS, test "x$HAVE_VORBISPLUGIN" = "xyes")
803AM_CONDITIONAL(HAVE_OGG, test "x$HAVE_OGG" = "xyes")
804AM_CONDITIONAL(HAVE_OGG_STREAM_FLUSH_FILL, test "x$HAVE_OGG_STREAM_FLUSH_FILL" = "xyes")
805AM_CONDITIONAL(HAVE_FLAC, test "x$HAVE_FLACPLUGIN" = "xyes")
806AM_CONDITIONAL(HAVE_WAVPACK, test "x$HAVE_WAVPACKPLUGIN" = "xyes")
807AM_CONDITIONAL(HAVE_SNDFILE, test "x$HAVE_SNDFILEPLUGIN" = "xyes")
808AM_CONDITIONAL(HAVE_CDDA, test "x$HAVE_CDDAPLUGIN" = "xyes")
809AM_CONDITIONAL(USE_CDPARANOIA, test "x$HAVE_CDDAPLUGIN" = "xyes")
810AM_CONDITIONAL(HAVE_GTK2, test "x$HAVE_GTK2" = "xyes")
811AM_CONDITIONAL(HAVE_GTK3, test "x$HAVE_GTK3" = "xyes")
812AM_CONDITIONAL(HAVE_ALSA, test "x$HAVE_ALSAPLUGIN" = "xyes")
813AM_CONDITIONAL(HAVE_COREAUDIO, test "x$HAVE_COREAUDIO" = "xyes")
814AM_CONDITIONAL(HAVE_FFMPEG, test "x$HAVE_FFMPEGPLUGIN" = "xyes")
815AM_CONDITIONAL(HAVE_PULSE, test "x$HAVE_PULSEPLUGIN" = "xyes")
816AM_CONDITIONAL(HAVE_ARTWORK, test "x$HAVE_ARTWORK" = "xyes")
817AM_CONDITIONAL(ARTWORK_USE_VFS_CURL, test "x$ARTWORK_USE_VFS_CURL" = "xyes")
818AM_CONDITIONAL(HAVE_ADPLUG, test "x$HAVE_ADPLUG" = "xyes")
819AM_CONDITIONAL(HAVE_FFAP, test "x$HAVE_FFAP" = "xyes")
820AM_CONDITIONAL(HAVE_SID, test "x$HAVE_SID" = "xyes")
821AM_CONDITIONAL(HAVE_NULLOUT, test "x$HAVE_NULLOUT" = "xyes")
822AM_CONDITIONAL(HAVE_VTX, test "x$HAVE_VTX" = "xyes")
823AM_CONDITIONAL(HAVE_GME, test "x$HAVE_GME" = "xyes")
824AM_CONDITIONAL(HAVE_LASTFM, test "x$HAVE_LASTFM" = "xyes")
825AM_CONDITIONAL(HAVE_VFS_CURL, test "x$HAVE_VFS_CURL" = "xyes")
826AM_CONDITIONAL(HAVE_HOTKEYS, test "x$HAVE_HOTKEYS" = "xyes")
827AM_CONDITIONAL(HAVE_MP3, test "x$HAVE_MP3" = "xyes")
828AM_CONDITIONAL(HAVE_LIBMAD, test "x$HAVE_LIBMAD" = "xyes")
829AM_CONDITIONAL(HAVE_LIBMPG123, test "x$HAVE_LIBMPG123" = "xyes")
830AM_CONDITIONAL(HAVE_OSS, test "x$HAVE_OSS" = "xyes")
831AM_CONDITIONAL(HAVE_SUPEREQ, test "x$HAVE_SUPEREQ" = "xyes")
832AM_CONDITIONAL(HAVE_NOTIFY, test "x$HAVE_NOTIFY" = "xyes")
833AM_CONDITIONAL(HAVE_SHELLEXEC, test "x$HAVE_SHELLEXEC" = "xyes")
834AM_CONDITIONAL(HAVE_SHELLEXECUI, test "x$HAVE_SHELLEXECUI" = "xyes")
835AM_CONDITIONAL(HAVE_MUSEPACK, test "x$HAVE_MUSEPACK" = "xyes")
836AM_CONDITIONAL(HAVE_WILDMIDI, test "x$HAVE_WILDMIDI" = "xyes")
837AM_CONDITIONAL(HAVE_TTA, test "x$HAVE_TTA" = "xyes")
838AM_CONDITIONAL(HAVE_DCA, test "x$HAVE_DCA" = "xyes")
839AM_CONDITIONAL(HAVE_AAC, test "x$HAVE_AAC" = "xyes")
840AM_CONDITIONAL(HAVE_MMS, test "x$HAVE_MMS" = "xyes")
841AM_CONDITIONAL(HAVE_DSP_SRC, test "x$HAVE_DSP_SRC" = "xyes")
842AM_CONDITIONAL(HAVE_M3U, test "x$HAVE_M3U" = "xyes")
843AM_CONDITIONAL(HAVE_VFS_ZIP, test "x$HAVE_VFS_ZIP" = "xyes")
844AM_CONDITIONAL(HAVE_CONVERTER, test "x$HAVE_CONVERTER" = "xyes")
845AM_CONDITIONAL(HAVE_IMLIB2, test "x$HAVE_IMLIB2" = "xyes")
846AM_CONDITIONAL(HAVE_JPEG, test "x$HAVE_JPEG" = "xyes")
847AM_CONDITIONAL(HAVE_PNG, test "x$HAVE_PNG" = "xyes")
848AM_CONDITIONAL(HAVE_YASM, test "x$HAVE_YASM" = "xyes")
849dnl AM_CONDITIONAL(HAVE_MEDIALIB, test "x$HAVE_MEDIALIB" = "xyes")
850AM_CONDITIONAL(HAVE_DUMB, test "x$HAVE_DUMB" = "xyes")
851AM_CONDITIONAL(HAVE_PSF, test "x$HAVE_PSF" = "xyes")
852AM_CONDITIONAL(HAVE_SHN, test "x$HAVE_SHN" = "xyes")
853AM_CONDITIONAL(HAVE_MONO2STEREO, test "x$HAVE_MONO2STEREO" = "xyes")
854dnl AM_CONDITIONAL(HAVE_SM, test "x$HAVE_SM" = "xyes")
855dnl AM_CONDITIONAL(HAVE_ICE, test "x$HAVE_ICE" = "xyes")
856AM_CONDITIONAL(HAVE_ALAC, test "x$HAVE_ALAC" = "xyes")
857AM_CONDITIONAL(HAVE_WMA, test "x$HAVE_WMA" = "xyes")
858AM_CONDITIONAL(HAVE_PLTBROWSER, test "x$HAVE_PLTBROWSER" = "xyes")
859AM_CONDITIONAL(HAVE_SC68, test "x$HAVE_SC68" = "xyes")
860AM_CONDITIONAL(STATICLINK, test "x$STATICLINK" = "xyes")
861AM_CONDITIONAL(PORTABLE, test "x$PORTABLE" = "xyes")
862AM_CONDITIONAL(PORTABLE_FULL, test "x$PORTABLE_FULL" = "xyes")
863AM_CONDITIONAL(USE_ABSTRACT_SOCKET_NAME, test "x$USE_ABSTRACT_SOCKET_NAME" = "xyes")
864AM_CONDITIONAL(HAVE_SSE2, test "${HAVE_SSE2}")
865
866AC_SUBST(PLUGINS_DIRS)
867
868AC_CONFIG_FILES([
869Makefile
870pixmaps/Makefile
871icons/Makefile
872plugins/liboggedit/Makefile
873plugins/libmp4ff/Makefile
874plugins/libparser/Makefile
875plugins/gme/Makefile
876plugins/alsa/Makefile
877plugins/hotkeys/Makefile
878plugins/lastfm/Makefile
879plugins/ffap/Makefile
880plugins/mp3/Makefile
881plugins/vorbis/Makefile
882plugins/flac/Makefile
883plugins/wavpack/Makefile
884plugins/sndfile/Makefile
885plugins/vfs_curl/Makefile
886plugins/cdda/Makefile
887plugins/gtkui/Makefile
888plugins/nullout/Makefile
889plugins/vtx/Makefile
890plugins/adplug/Makefile
891plugins/ffmpeg/Makefile
892plugins/sid/Makefile
893plugins/oss/Makefile
894plugins/pulse/Makefile
895plugins/artwork/Makefile
896plugins/supereq/Makefile
897plugins/notify/Makefile
898plugins/shellexec/Makefile
899plugins/musepack/Makefile
900plugins/wildmidi/Makefile
901plugins/tta/Makefile
902plugins/dca/Makefile
903plugins/aac/Makefile
904plugins/mms/Makefile
905plugins/dsp_libsrc/Makefile
906plugins/m3u/Makefile
907plugins/vfs_zip/Makefile
908plugins/converter/Makefile
909plugins/dumb/Makefile
910plugins/ao/Makefile
911plugins/shn/Makefile
912plugins/mono2stereo/Makefile
913plugins/shellexecui/Makefile
914plugins/alac/Makefile
915plugins/wma/Makefile
916plugins/pltbrowser/Makefile
917plugins/sc68/Makefile
918plugins/coreaudio/Makefile
919intl/Makefile
920po/Makefile.in
921deadbeef.desktop
922])
923
924AC_OUTPUT
925
926AS_IF([test "${USE_MAINTAINER_MODE}" = "yes"], [
927echo
928echo "Build Configuration:"
929echo
930echo "* Maintainer Mode:        $USE_MAINTAINER_MODE"
931])
932
933dnl print summary
934echo
935echo "Plugin Summary:"
936echo
937
938AC_DEFUN([PRINT_PLUGIN_INFO],
939    [
940        if $3 ; then
941            echo "    $1: yes - $2"
942        else
943            echo "    $1: no - $2"
944        fi
945    ]
946)
947
948PRINT_PLUGIN_INFO([stdio],[Standard IO plugin],[true])
949PRINT_PLUGIN_INFO([gme],[chiptune music player based on GME],[test "x$HAVE_GME" = "xyes"])
950PRINT_PLUGIN_INFO([nullout],[NULL output],[test "x$HAVE_NULLOUT" = "xyes"])
951PRINT_PLUGIN_INFO([alsa],[ALSA output],[test "x$HAVE_ALSA" = "xyes"])
952PRINT_PLUGIN_INFO([oss],[oss output plugin],[test "x$HAVE_OSS" = "xyes"])
953PRINT_PLUGIN_INFO([pulse],[PulseAudio output plugin],[test "x$HAVE_PULSEPLUGIN" = "xyes"])
954PRINT_PLUGIN_INFO([coreaudio],[CoreAudio output plugin],[test "x$HAVE_COREAUDIO" = "xyes"])
955PRINT_PLUGIN_INFO([sid],[SID player based on libsidplay2],[test "x$HAVE_SID" = "xyes"])
956PRINT_PLUGIN_INFO([ffap],[Monkey's audio (APE) decoder],[test "x$HAVE_FFAP" = "xyes"])
957PRINT_PLUGIN_INFO([lastfm],[last.fm scrobbler],[test "x$HAVE_LASTFM" = "xyes"])
958PRINT_PLUGIN_INFO([mp3],[mp3 plugin],[test "x$HAVE_MP3" = "xyes"])
959PRINT_PLUGIN_INFO([    libmad],[libmad backend for mp3 plugin],[test "x$HAVE_LIBMAD" = "xyes"])
960PRINT_PLUGIN_INFO([    libmpg123],[libmpg123 backend for mp3 plugin],[test "x$HAVE_LIBMPG123" = "xyes"])
961PRINT_PLUGIN_INFO([vorbis],[ogg vorbis player],[test "x$HAVE_VORBISPLUGIN" = "xyes"])
962PRINT_PLUGIN_INFO([flac],[flac player],[test "x$HAVE_FLACPLUGIN" = "xyes"])
963PRINT_PLUGIN_INFO([wavpack],[wavpack player],[test "x$HAVE_WAVPACKPLUGIN" = "xyes"])
964PRINT_PLUGIN_INFO([sndfile],[PCM (wav,aiff,etc) player based on libsndfile],[test "x$HAVE_SNDFILEPLUGIN" = "xyes"])
965PRINT_PLUGIN_INFO([vtx],[vtx file player (ay8910/12 emulation)],[test "x$HAVE_VTX" = "xyes"])
966PRINT_PLUGIN_INFO([adplug],[adplug player (OPL2/OPL3 emulation)],[test "x$HAVE_ADPLUG" = "xyes"])
967PRINT_PLUGIN_INFO([vfs_curl],[http/ftp streaming support],[test "x$HAVE_VFS_CURL" = "xyes"])
968PRINT_PLUGIN_INFO([cdda],[cd audio player],[test "x$HAVE_CDDAPLUGIN" = "xyes"])
969PRINT_PLUGIN_INFO([gtkui],[GTK2 user interface],[test "x$HAVE_GTK2" = "xyes"])
970PRINT_PLUGIN_INFO([gtkui3],[GTK3 user interface],[test "x$HAVE_GTK3" = "xyes"])
971PRINT_PLUGIN_INFO([hotkeys],[Local and global hotkeys support],[test "x$HAVE_HOTKEYS" = "xyes"])
972PRINT_PLUGIN_INFO([ffmpeg],[ffmpeg codecs],[test "x$HAVE_FFMPEGPLUGIN" = "xyes"])
973PRINT_PLUGIN_INFO([artwork],[Cover art plugin],[test "x$HAVE_ARTWORK" = "xyes"])
974PRINT_PLUGIN_INFO([supereq],[Equalizer based on Super EQ library by Naoki Shibata],[test "x$HAVE_SUPEREQ" = "xyes"])
975PRINT_PLUGIN_INFO([notify],[notification-daemon support plugin],[test "x$HAVE_NOTIFY" = "xyes"])
976PRINT_PLUGIN_INFO([shellexec],[shell commands plugin],[test "x$HAVE_SHELLEXEC" = "xyes"])
977PRINT_PLUGIN_INFO([shellexecui],[GTK user interface for setting up shellexec plugin],[test "x$HAVE_SHELLEXECUI" = "xyes"])
978PRINT_PLUGIN_INFO([musepack],[musepack player plugin],[test "x$HAVE_MUSEPACK" = "xyes"])
979PRINT_PLUGIN_INFO([wildmidi],[WildMidi player plugin],[test "x$HAVE_WILDMIDI" = "xyes"])
980PRINT_PLUGIN_INFO([tta],[TTA player plugin],[test "x$HAVE_TTA" = "xyes"])
981PRINT_PLUGIN_INFO([dca],[libdca (DTS Audio) player plugin],[test "x$HAVE_DCA" = "xyes"])
982PRINT_PLUGIN_INFO([aac],[AAC player (m4a, aac, mp4) based on FAAD2],[test "x$HAVE_AAC" = "xyes"])
983PRINT_PLUGIN_INFO([mms],[mms streaming support],[test "x$HAVE_MMS" = "xyes"])
984PRINT_PLUGIN_INFO([dsp_src],[High quality samplerate conversion using libsamplerate],[test "x$HAVE_DSP_SRC" = "xyes"])
985PRINT_PLUGIN_INFO([m3u],[M3U and PLS playlist support],[test "x$HAVE_M3U" = "xyes"])
986PRINT_PLUGIN_INFO([vfs_zip],[zip archive support],[test "x$HAVE_VFS_ZIP" = "xyes"])
987PRINT_PLUGIN_INFO([converter],[plugin for converting files to any formats],[test "x$HAVE_CONVERTER" = "xyes"])
988dnl PRINT_PLUGIN_INFO([medialib],[media library support plugin],[test "x$HAVE_MEDIALIB" = "xyes"])
989PRINT_PLUGIN_INFO([psf],[PSF format plugin, using AOSDK],[test "x$HAVE_PSF" = "xyes"])
990PRINT_PLUGIN_INFO([dumb],[DUMB module plugin, for MOD, S3M, etc],[test "x$HAVE_DUMB" = "xyes"])
991PRINT_PLUGIN_INFO([shn],[SHN plugin based on xmms-shn],[test "x$HAVE_SHN" = "xyes"])
992PRINT_PLUGIN_INFO([mono2stereo],[mono2stereo DSP plugin],[test "x$HAVE_MONO2STEREO" = "xyes"])
993PRINT_PLUGIN_INFO([alac],[ALAC plugin],[test "x$HAVE_ALAC" = "xyes"])
994PRINT_PLUGIN_INFO([wma],[WMA plugin],[test "x$HAVE_WMA" = "xyes"])
995PRINT_PLUGIN_INFO([pltbrowser],[playlist browser gui plugin],[test "x$HAVE_PLTBROWSER" = "xyes"])
996PRINT_PLUGIN_INFO([sc68],[sc68 Atari ST And Amiga player],[test "x$HAVE_SC68" = "xyes"])
997
998echo
999
1000