1
AC_INIT([IMMS],[1.1],[mag@luminal.org])
1
AC_INIT([IMMS],[2.0.3],[mag@luminal.org])
5
5
AC_REVISION($Id: configure.ac,v 1.30 2003/10/23 23:53:20 mag Exp $)
7
AC_CONFIG_SRCDIR(imms.cc)
7
AC_CONFIG_SRCDIR(immscore/imms.cc)
9
AC_PREFIX_DEFAULT("/usr")
12
[if test -z "$$1"; then
11
19
AC_ARG_WITH(taglib,
12
20
AC_HELP_STRING([--with-taglib],
24
32
AC_HELP_STRING([--with-screensaver],
25
33
[Use MIT ScreenSaver extension]))
27
AC_ARG_WITH(queuecontrol,
28
AC_HELP_STRING([--with-queuecontrol],
29
[Use XMMS queue control functions (default)]))
31
35
AC_ARG_ENABLE(debug,
32
36
AC_HELP_STRING([--enable-debug],
33
37
[Extra debug output]),
34
[enable_debug='yes' XCPPFLAGS="-ggdb -O0 -DDEBUG"],
35
[enable_debug='no' XCPPFLAGS="-O3"])
38
[enable_debug=$enableval])
40
AC_ARG_ENABLE(queuecontrol,
41
AC_HELP_STRING([--disable-queuecontrol],
42
[Don't use XMMS queue control functions]),
43
[enable_queuecontrol=$enableval])
45
AC_ARG_ENABLE(analyzer,
46
AC_HELP_STRING([--disable-analyzer],
47
[Disable acoustic song similarity analyzer]),
48
[enable_analyzer=$enableval])
43
56
AC_MSG_CHECKING([for --enable-debug])
44
57
AC_MSG_RESULT([$enable_debug])
46
AC_CHECK_PROG(have_xmms_config, xmms-config, "yes", "no")
47
if test "$have_xmms_config" = "no"; then
48
AC_MSG_ERROR([xmms-config required and missing.])
50
CPPFLAGS=`xmms-config --cflags`
53
AC_CHECK_HEADERS(xmms/plugin.h,, [with_xmms=no])
54
AC_CHECK_HEADERS(xmms/xmmsctrl.h,, [with_xmms=no])
55
if test "$with_xmms" = "no"; then
56
AC_MSG_ERROR([xmms required and missing.])
60
if test "$with_queuecontrol" != "no"; then
61
AC_CHECK_LIB(xmms, xmms_remote_playqueue_add,,
62
[with_queuecontrol=no])
64
if test "$with_queuecontrol" != "no"; then
65
AC_DEFINE(HAVE_QUEUE_CONTROL,,
66
[XMMS provides functions to control the play queue])
59
XCPPFLAGS="-ggdb -O0 -DDEBUG"
60
if test "$enable_debug" != "yes"; then
70
64
AC_CHECK_LIB(z, compress,, [with_zlib=no])
73
67
AC_MSG_ERROR([zlib required and missing.])
76
AC_CHECK_LIB(sqlite, sqlite_open,, [with_sqlite=no])
77
AC_CHECK_HEADERS(sqlite.h,, [with_sqlite=no])
70
AC_CHECK_PROG(have_sqlites, sqlite, "yes", "no")
71
if test "$have_sqlites" = "yes"; then
72
AC_CHECK_PROG(have_sqlites, sqlite3, "yes", "no")
74
if test "$have_sqlites" = "no"; then
75
AC_MSG_WARN([******************************************************]);
76
AC_MSG_WARN([If you are upgrading from IMMS version <= 1.1]);
77
AC_MSG_WARN([You need both sqlite and sqlite3 executables installed]);
78
AC_MSG_WARN([******************************************************]);
81
AC_CHECK_LIB(sqlite3, sqlite3_open,, [with_sqlite=no])
82
AC_CHECK_HEADERS(sqlite3.h,, [with_sqlite=no])
78
83
if test "$with_sqlite" = "no"; then
79
AC_MSG_ERROR([sqlite required and missing.])
84
AC_MSG_ERROR([sqlite >= 3.0 required and missing.])
82
87
AC_CHECK_LIB(pcre, pcre_compile,, [with_pcre=no])
88
93
AC_MSG_ERROR([PCRE required and missing.])
96
if test "$enable_analyzer" != "no"; then
97
PKG_CHECK_MODULES([FFTW], [fftw3 >= 3.0],
99
if test "$have_fftw" = "no"; then
100
AC_MSG_WARN([******************************************************]);
101
AC_MSG_WARN("fftw3 >= 3.0 required for analyzer and missing");
102
AC_MSG_WARN("Acoustic analyzer will not be built");
103
AC_MSG_WARN([******************************************************]);
108
PKG_CHECK_MODULES([GLIB], [glib-2.0 >= 2.0],
109
[], [AC_MSG_ERROR([Required packages missing.])])
111
saved_cppflags="$CPPFLAGS"
114
if test "$enable_analyzer" != "no"; then
115
CPPFLAGS="`pkg-config fftw3 --cflags`"
116
LIBS="`pkg-config fftw3 --libs`"
117
AC_CHECK_HEADERS(fftw3.h,, [with_fftw=no])
118
AC_CHECK_LIB(fftw3, fftw_plan_dft_r2c_1d,, [with_fftw=no])
119
if test "$with_fftw" = "no"; then
120
AC_MSG_WARN([******************************************************]);
121
AC_MSG_WARN("fftw3 >= 3.0 required for analyzer and missing");
122
AC_MSG_WARN("Acoustic analyzer will not be built");
123
AC_MSG_WARN([******************************************************]);
128
CPPFLAGS="`pkg-config glib-2.0 --cflags`"
129
LIBS="`pkg-config glib-2.0 --libs`"
130
AC_CHECK_HEADERS(glib.h,, [with_glib=no])
131
AC_CHECK_LIB(glib-2.0, g_timeout_source_new,, [with_glib=no])
132
if test "$with_glib" = "no"; then
133
AC_MSG_ERROR([glib 2.0 required and missing.])
137
CPPFLAGS=$saved_cppflags
91
139
if test "$with_taglib" != "no"; then
92
140
AC_CHECK_PROG(with_taglib, taglib-config, "yes", "no")
183
if test "$enable_analyzer" != "no"; then
184
AC_CHECK_PROG(have_sox, sox, "yes", "no")
185
if test "$have_sox" = "no"; then
186
AC_MSG_WARN([******************************************************]);
187
AC_MSG_WARN([To benefit from acoustic analysis features of IMMS],);
188
AC_MSG_WARN([you need to install sox [http://sox.sourceforge.net/]]);
189
AC_MSG_WARN([******************************************************]);
135
193
if test "$with_screensaver" != "no"; then
136
194
LDFLAGS="-shared -L/usr/X11R6/lib"
195
AC_CHECK_LIB(X11, XFlush,, [with_screensaver=no])
137
196
AC_CHECK_LIB(Xext, XextFindDisplay,, [with_screensaver=no])
138
197
AC_CHECK_LIB(Xss, XScreenSaverQueryInfo,, [with_screensaver=no])
139
198
AC_CHECK_HEADERS(X11/extensions/scrnsaver.h,,
143
202
AC_MSG_WARN([XScreenSaver is missing.])
145
204
AC_DEFINE(WITH_XSCREENSAVER,, [XScreenSaver extension])
205
AC_APPEND(LIBS, -L/usr/X11R6/lib)
208
saved_cppflags="$CPPFLAGS"
212
AC_CHECK_PROG(with_xmms, xmms-config, "yes", "no")
213
if test "$xmms_config" != "no"; then
214
CPPFLAGS=`xmms-config --cflags`
215
AC_CHECK_HEADERS(glib.h,, [with_xmms=no]) # how to disable caching for this?
216
AC_CHECK_HEADERS(gtk/gtk.h,, [with_xmms=no])
217
AC_CHECK_HEADERS(xmms/plugin.h,, [with_xmms=no])
218
AC_CHECK_HEADERS(xmms/xmmsctrl.h,, [with_xmms=no])
221
xmms_enable_playqueue=$enable_queuecontrol
222
if test "$with_xmms" = "no"; then
223
AC_MSG_WARN([Not building XMMS plugin])
225
if test "$xmms_enable_playqueue" != "no"; then
226
AC_MSG_CHECKING([for xmms_remote_playqueue_add in -lxmms])
229
AC_TRY_LINK([#include <xmms/xmmsctrl.h>],
230
[xmms_remote_playqueue_add(0, 0)],
231
[AC_MSG_RESULT(yes)],
232
[xmms_enable_playqueue="no"
236
if test "$xmms_enable_playqueue" = "no"; then
237
AC_APPEND(PLUGINS, libxmmsimms.so)
239
AC_DEFINE(XMMS_HAVE_QUEUE_CONTROL,,
240
[XMMS provides functions to control the play queue])
241
AC_APPEND(PLUGINS, libxmmsimms2.so)
245
PKG_CHECK_MODULES(BMP, [bmp >= 0.9.7], [], [with_bmp=no])
250
AC_CHECK_HEADERS(bmp/plugin.h,, [with_bmp=no])
251
AC_CHECK_HEADERS(bmp/beepctrl.h,, [with_bmp=no])
253
bmp_enable_playqueue=$enable_queuecontrol
254
if test "$with_bmp" = "no"; then
255
AC_MSG_WARN([Not building BMP plugin])
257
if test "$bmp_enable_playqueue" != "no"; then
258
AC_MSG_CHECKING([for xmms_remote_playqueue_add in -lbeep])
259
AC_TRY_LINK([#include <bmp/beepctrl.h>],
260
[xmms_remote_playqueue_add(0, 0)],
261
[AC_MSG_RESULT(yes)],
262
[bmp_enable_playqueue="no"
265
if test "$bmp_enable_playqueue" = "no"; then
266
AC_APPEND(PLUGINS, libbmpimms.so)
268
AC_DEFINE(BMP_HAVE_QUEUE_CONTROL,,
269
[BMP provides functions to control the play queue])
270
AC_APPEND(PLUGINS, libbmpimms2.so)
274
if test "$enable_analyzer" != "no"; then
275
AC_APPEND(OPTIONAL, analyzer)
279
CPPFLAGS=$saved_cppflags
281
AC_MSG_CHECKING([which plugins to build])
282
AC_MSG_RESULT($PLUGINS)
284
AC_MSG_CHECKING([which optional packages to build])
285
AC_MSG_RESULT($OPTIONAL)
150
289
AC_SUBST(INSTALL)
151
290
AC_SUBST(XCPPFLAGS)
291
AC_SUBST(TAGCPPFLAGS)
155
296
AC_CONFIG_FILES(vars.mk)
156
297
AC_CONFIG_HEADERS(immsconf.h)