-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.in
648 lines (562 loc) · 17.1 KB
/
configure.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
AC_INIT([moc],[2.5.0-alpha4],[[email protected]])
AC_CONFIG_SRCDIR([main.c])
AC_CONFIG_HEADERS([config.h])
AM_INIT_AUTOMAKE
AC_PREREQ(2.60)
AC_CANONICAL_HOST
AC_PROG_CC
AC_PROG_CXX
AC_PROG_INSTALL
AC_PROG_AWK
AC_LIBTOOL_DLOPEN
AC_DISABLE_STATIC
AC_ENABLE_SHARED
AC_PROG_LIBTOOL
AC_LIB_LTDL
AC_SUBST([EXTRA_OBJS])
AC_SUBST([DECODER_PLUGINS])
plugindir=$libdir/moc
AC_SUBST([plugindir])
DECODER_PLUGIN_DIR=decoder_plugins
AC_SUBST([DECODER_PLUGIN_DIR])
PLUGIN_LDFLAGS='-module -avoid-version'
AC_SUBST([PLUGIN_LDFLAGS])
OS=`uname 2>/dev/null`
case "$OS" in
Linux)
AC_DEFINE([LINUX], 1, [Define if your system is GNU/Linux])
;;
OpenBSD)
AC_DEFINE([OPENBSD], 1, [Define if your system is OpenBSD])
;;
esac
AC_DEFINE([_FILE_OFFSET_BITS], 64, [Use 64bit IO])
LDFLAGS="$LDFLAGS -rdynamic"
AC_HEADER_STDC
AC_HEADER_STDBOOL
AC_CHECK_HEADERS([fcntl.h string.h strings.h sys/param.h unistd.h sys/un.h \
sys/socket.h sys/types.h signal.h sys/time.h \
sys/wait.h sys/ioctl.h \
time.h errno.h sys/stat.h assert.h locale.h wchar.h],,
AC_MSG_ERROR([Can't find required header files.]))
AC_CHECK_HEADERS([sys/select.h inttypes.h limits.h stdint.h])
AC_CHECK_FUNCS([sched_get_priority_max])
dnl langinfo
AC_CHECK_HEADERS([langinfo.h])
AC_CHECK_HEADERS([nl_types.h])
AC_CHECK_FUNCS([nl_langinfo])
dnl CODESET (taken from vim)
AC_MSG_CHECKING(for nl_langinfo(CODESET))
AC_TRY_LINK([
#ifdef HAVE_LANGINFO_H
# include <langinfo.h>
#endif
], [char *cs = nl_langinfo(CODESET);],
AC_MSG_RESULT(yes)
AC_DEFINE([HAVE_NL_LANGINFO_CODESET], 1,
[Define if you have CODESET constant]),
AC_MSG_RESULT(no))
AC_C_BIGENDIAN
AC_CHECK_HEADERS([iconv.h])
dnl iconv test taken from VIM:
dnl Link with iconv for charset translation, if not found without library.
dnl check for iconv() requires including iconv.h
dnl Add "-liconv" when possible; Solaris has iconv but use GNU iconv when it
dnl has been installed.
HAVE_ICONV=no
AC_MSG_CHECKING(for iconv_open())
save_LIBS="$LIBS"
LIBS="$LIBS -liconv"
AC_TRY_LINK([
#ifdef HAVE_ICONV_H
# include <iconv.h>
#endif
], [iconv_open("fr", "to");],
AC_MSG_RESULT(yes; with -liconv)
HAVE_ICONV=yes
EXTRA_LIBS="$EXTRA_LIBS -liconv"
LIBS="$save_LIBS",
LIBS="$save_LIBS"
AC_TRY_LINK([
#ifdef HAVE_ICONV_H
# include <iconv.h>
#endif
], [iconv_open("fr", "to");],
AC_MSG_RESULT(yes)
HAVE_ICONV=yes,
AC_MSG_RESULT(no))
)
if test "$HAVE_ICONV" != "yes"
then
AC_MSG_ERROR([No iconv library found.])
fi
AC_C_CONST
AC_C_INLINE
AC_TYPE_OFF_T
AC_TYPE_SIZE_T
AC_COMPILE_CHECK_SIZEOF(void *)
AC_C99_FUNC_LRINTF
AX_CFLAGS_GCC_OPTION(-Wall)
AX_CFLAGS_GCC_OPTION(-W)
if test "$ac_cv_c99_lrintf" = "yes"
then
AC_CHECK_FUNC([sin], ,
[AC_CHECK_LIB([m], [sin], , AC_MSG_ERROR([]))
EXTRA_LIBS="$EXTRA_LIBS -lm"])
fi
PKG_PROG_PKG_CONFIG([0.20])
if test "x$PKG_CONFIG" == "x"
then
AC_MSG_WARN([No pkg-config utility found or it's too old, I will have trouble finding installed libraries.])
fi
AX_PATH_BDB([4], [
LIBS="$BDB_LIBS $EXTRA_LIBS"
LDFLAGS="$BDB_LDFLAGS $LDFLAGS"
CPPFLAGS="$CPPFLAGS $BDB_CPPFLAGS"
],
AC_MSG_ERROR([BerkeleyDB (libdb) not found]))
AC_ARG_WITH(oss, AS_HELP_STRING(--without-oss, Compile without OSS support.))
if test "x$with_oss" != "xno"
then
AC_CHECK_HEADERS([sys/soundcard.h soundcard.h])
if test "$ac_cv_header_sys_soundcard_h" = "yes" \
-o "$ac_cv_header_soundcard_h" = "yes"
then
AC_DEFINE([HAVE_OSS], 1, [Define if you have OSS.])
EXTRA_OBJS="$EXTRA_OBJS oss.o"
COMPILE_OSS="yes"
AC_CHECK_LIB([ossaudio], [_oss_ioctl],
[EXTRA_LIBS="$EXTRA_LIBS -lossaudio"])
fi
else
COMPILE_OSS="no"
fi
AC_ARG_WITH(alsa, AS_HELP_STRING(--without-alsa, Compile without ALSA support.))
if test "x$with_alsa" != "xno"
then
PKG_CHECK_MODULES(ALSA, [alsa >= 0.9],
[COMPILE_ALSA="yes"
EXTRA_OBJS="$EXTRA_OBJS alsa.o"
AC_DEFINE([HAVE_ALSA], 1, [Define if you have ALSA.])
EXTRA_LIBS="$EXTRA_LIBS $ALSA_LIBS"
CFLAGS="$CFLAGS $ALSA_CFLAGS"],
[COMPILE_ALSA="no"])
else
COMPILE_ALSA="no"
fi
AC_ARG_WITH(jack, AS_HELP_STRING(--without-jack, Compile without JACK support.))
if test "x$with_jack" != "xno"
then
PKG_CHECK_MODULES(JACK, [jack >= 0.4],
[COMPILE_JACK="yes"
EXTRA_OBJS="$EXTRA_OBJS jack.o"
AC_DEFINE([HAVE_JACK], 1, [Define if you have JACK.])
EXTRA_LIBS="$EXTRA_LIBS $JACK_LIBS"
CFLAGS="$CFLAGS $JACK_CFLAGS"],
[COMPILE_JACK="no"])
else
COMPILE_JACK="no"
fi
AC_ARG_ENABLE(debug, AS_HELP_STRING(--disable-debug,Disable debug code))
if test "x$enable_debug" = "xno"
then
AC_DEFINE([NDEBUG], 1, [Define if you don't want debug code])
COMPILE_DEBUG='no'
else
AX_CFLAGS_GCC_OPTION(-g)
COMPILE_DEBUG='yes'
EXTRA_OBJS="$EXTRA_OBJS null_out.o"
fi
AC_FUNC_MALLOC
AC_FUNC_STAT
AC_CHECK_FUNCS([getcwd memmove strcasecmp strdup strerror strncasecmp strrchr \
socket gettimeofday getenv fork setsid kill bind listen \
accept time connect unlink send recv select strftime \
localtime_r mbsrtowcs mbstowcs execvp wcswidth strspn index],,
AC_MSG_ERROR([Required standard C/UNIX functions are not present.]))
dnl optional functions
AC_CHECK_FUNCS([strcasestr strerror_r])
dnl MIME magic
AC_ARG_WITH(magic, AS_HELP_STRING(--without-magic,
[Compile without MIME magic support.]))
COMPILE_MAGIC="no"
if test "x$with_magic" != "xno"
then
AC_CHECK_LIB(magic, magic_open,
[COMPILE_MAGIC="yes"
AC_DEFINE([HAVE_LIBMAGIC], 1, [Define if you have libmagic.])
EXTRA_LIBS="$EXTRA_LIBS -lmagic"])
fi
dnl FIXME: Support for this in the source code
AC_HEADER_DIRENT
ACX_PTHREAD
AC_FUNC_MMAP
if test "$acx_pthread_ok" != "yes"
then
AC_MSG_ERROR([[I don't know how to compile pthread code on this system]])
fi
CC="$PTHREAD_CC"
CFLAGS="$PTHREAD_CFLAGS $CFLAGS"
EXTRA_LIBS="$EXTRA_LIBS $PTHREAD_LIBS"
dnl __FUNCTION__
AC_TRY_COMPILE(,[printf(__FUNCTION__);], [AC_DEFINE([HAVE__FUNCTION__], 1,
[Define if we have __FUNCTION__ constant])])
dnl __attribute__
AC_TRY_COMPILE([#include <stdarg.h>],
[int f(const char *f, ...)
__attribute__((format (printf, 1, 2)))],
[AC_DEFINE([HAVE__ATTRIBUTE__], 1,
[Define if we have __attribute__ extension])])
dnl ncurses
MP_WITH_CURSES
if test -z "$CURSES_LIB"
then
AC_MSG_ERROR([You need curses/ncurses library and header files.])
fi
dnl getopt
AC_CHECK_FUNC(getopt_long,
[AC_CHECK_HEADERS([getopt.h],,[AC_MSG_ERROR([You need getopt.h])])],
[#FreeBSD has it there
AC_CHECK_LIB(gnugetopt,getopt_long,,
[AC_LIBOBJ(getopt)
AC_LIBOBJ(getopt1)
AC_CONFIG_LINKS([getopt.h:gnugetopt.h])]
)]
)
dnl libid3tag (with zlib)
AC_CHECK_LIB(z, gzopen, [HAVE_ZLIB=yes],)
AC_CHECK_LIB(id3tag, id3_file_open, [HAVE_LIBID3TAG=yes],)
AC_CHECK_HEADER([id3tag.h],[HAVE_LIBID3TAG_H=yes],)
if test "x$HAVE_ZLIB" = "xyes" -a "x$HAVE_LIBID3TAG" = "xyes" \
-a "x$HAVE_LIBID3TAG_H" = "xyes"
then
HAVE_ID3TAG=yes
else
HAVE_ID3TAG=no
fi
COMPILE_RCC=no
dnl libmad (mp3)
AC_ARG_WITH(mp3, AS_HELP_STRING(--without-mp3,Compile without mp3 support (libmad)))
if test "x$with_mp3" != "xno"
then
AC_CHECK_LIB(mad, mad_stream_init, [
AC_CHECK_HEADER([mad.h], ,)])
if test "$ac_cv_lib_mad_mad_stream_init" = "yes" -a "$HAVE_ID3TAG" = "yes"
then
dnl librcc
AC_ARG_WITH(rcc, AS_HELP_STRING(--without-rcc,
[Compile without LIBRCC support.]))
if test "x$with_rcc" != "xno"
then
AC_CHECK_HEADERS([librcc.h],
[AC_DEFINE([HAVE_RCC], 1, [Define if you have librcc.h])
AC_CHECK_LIB(rcc, rccInit,
[RCC_LIBS="-lrcc"
AC_SUBST([RCC_LIBS])
COMPILE_RCC=yes])
])
fi
DECODER_PLUGINS="$DECODER_PLUGINS mp3"
fi
fi
dnl libfaad2 (aac)
AC_ARG_WITH(aac, AS_HELP_STRING(--without-aac,Compile without AAC support (libfaad2)))
if test "x$with_aac" != "xno"
then
faad2_OK="no"
AC_CHECK_LIB(faad, faacDecInit, [faad2_OK="yes"], [
AC_CHECK_LIB(faad, NeAACDecInit, [faad2_OK="yes"], [])
])
if test "x$faad2_OK" = "xyes"; then
AC_CHECK_HEADER([faad.h], ,
AC_MSG_ERROR([You need libfaad2 header file (libfaad2 devel package).]))
fi
if test "x$faad2_OK" = "xyes" -a "$HAVE_ID3TAG" = "yes"
then
FAAD2_LIBS="-lfaad"
AC_SUBST([FAAD2_CFLAGS])
AC_SUBST([FAAD2_LIBS])
DECODER_PLUGINS="$DECODER_PLUGINS aac"
fi
fi
dnl libmpcdec
AC_ARG_WITH(musepack, AS_HELP_STRING(--without-musepack, [Compile without musepack (mpc) support]))
if test "x$with_musepack" != "xno"
then
dnl taken from gstreamer
AC_CHECK_HEADER([mpcdec/mpcdec.h], [
have_musepack="yes"
AC_DEFINE(MPC_IS_OLD_API, 1, [Define if the old MusePack API is used])
MUSEPACK_LIBS="-lmpcdec"
AC_SUBST(MUSEPACK_LIBS)
], [AC_CHECK_HEADER([mpc/mpcdec.h], [
have_musepack="yes"
MUSEPACK_LIBS="-lmpcdec"
AC_SUBST(MUSEPACK_LIBS)
], [HAVE_MUSEPACK="no"])
])
if test "x$have_musepack" = "xyes"
then
MUSEPACK_LIBS="-lmpcdec"
AC_SUBST([MUSEPACK_LIBS])
dnl taglib
AC_CHECK_PROG([TAGLIB_CONFIG], [taglib-config], [yes])
if test "x$TAGLIB_CONFIG" = "xyes"
then
AC_MSG_CHECKING([taglib version])
taglib_ver=`taglib-config --version`
taglib_ver_major=`echo "$taglib_ver" | awk -F. '{print $1}'`
taglib_ver_minor=`echo "$taglib_ver" | awk -F. '{print $2}'`
taglib_ver_extra=`echo "$taglib_ver" | awk -F. '{print $3}'`
if test -z "$taglib_ver_extra"
then
taglib_ver_extra="0"
fi
if test \( "$taglib_ver_major" = "1" -a "$taglib_ver_minor" -ge 4 \) \
-o \( "$taglib_ver_major" = "1" -a "$taglib_ver_minor" = "3" \
-a "$taglib_ver_extra" -ge 1 \)
then
AC_MSG_RESULT([$taglib_ver, OK])
TAGLIB_CFLAGS="`taglib-config --cflags`"
dnl TAGLIB_LIBS="`taglib-config --libs`"
TAGLIB_LIBS="-ltag_c"
AC_SUBST([TAGLIB_CFLAGS])
AC_SUBST([TAGLIB_LIBS])
dnl check for tag_c.h
old_cflags="$CFLAGS"
old_cppflags="$CPPFLAGS"
CFLAGS="$CFLAGS $TAGLIB_CFLAGS"
CPPFLAGS="$CPPFLAGS $TAGLIB_CFLAGS"
AC_CHECK_HEADER([tag_c.h], [
DECODER_PLUGINS="$DECODER_PLUGINS musepack"
])
CFLAGS="$old_cflags"
CPPFLAGS="$old_cppflags"
else
AC_MSG_RESULT([$taglib_ver, but minimum is 1.3.1 - required for musepack])
fi
fi
fi
fi
dnl vorbis
AC_ARG_WITH(vorbis, AS_HELP_STRING(--without-vorbis,
[Compile without Ogg Vorbis support.]))
if test "x$with_vorbis" != "xno"
then
PKG_CHECK_MODULES(OGG_VORBIS,
[ogg >= 1.0 vorbis >= 1.0 vorbisfile >= 1.0],
[AC_SUBST(OGG_VORBIS_LIBS)
AC_SUBST(OGG_VORBIS_CFLAGS)
DECODER_PLUGINS="$DECODER_PLUGINS vorbis"],
[true])
fi
dnl FLAC
AC_ARG_WITH(flac, AS_HELP_STRING(--without-flac,Compile without FLAC support.))
if test "x$with_flac" != "xno"
then
PKG_CHECK_MODULES(LIBFLAC, [flac >= 1.1],
[AC_SUBST(LIBFLAC_LIBS)
AC_SUBST(LIBFLAC_CFLAGS)
DECODER_PLUGINS="$DECODER_PLUGINS flac"],
[true])
fi
dnl wavpack
AC_ARG_WITH(wavpack, AS_HELP_STRING(--without-wavpack,Compile without WavPack support.))
if test "x$with_wavpack" != "xno"
then
PKG_CHECK_MODULES(WAVPACK, [wavpack >= 4.31],
[AC_SUBST(WAVPACK_LIBS)
AC_SUBST(WAVPACK_CFLAGS)
DECODER_PLUGINS="$DECODER_PLUGINS wavpack"],
[true])
fi
dnl libsndfile
AC_ARG_WITH(sndfile, AS_HELP_STRING(--without-sndfile,
Compile without libsndfile))
if test "x$with_sndfile" != "xno"
then
PKG_CHECK_MODULES(sndfile, sndfile >= 1.0.0,
[AC_SUBST(sndfile_LIBS)
AC_SUBST(sndfile_CFLAGS)
DECODER_PLUGINS="$DECODER_PLUGINS sndfile"],
[true])
fi
dnl libmodplug
AC_ARG_WITH(modplug, AS_HELP_STRING(--without-modplug,
Compile without libmodplug))
if test "x$with_modplug" != "xno"
then
PKG_CHECK_MODULES(modplug, libmodplug >= 0.7,
[AC_SUBST(modplug_LIBS)
AC_SUBST(modplug_CFLAGS)
DECODER_PLUGINS="$DECODER_PLUGINS modplug"],
[true])
fi
dnl libtimidity
AC_ARG_WITH(timidity, AS_HELP_STRING(--without-timidity,
Compile without libtimidity))
if test "x$with_timidity" != "xno"
then
PKG_CHECK_MODULES(timidity, libtimidity >= 0.1.0,
[AC_SUBST(timidity_LIBS)
AC_SUBST(timidity_CFLAGS)
DECODER_PLUGINS="$DECODER_PLUGINS timidity"],
[true])
fi
dnl libsidplay2
AC_ARG_WITH(sidplay2, AS_HELP_STRING(--without-sidplay2,
Compile without libsidplay2))
if test "x$with_sidplay2" != "xno"
then
PKG_CHECK_MODULES(sidplay2, libsidplay2 >= 2.1.1,
[sidplay2_OK="yes"],
[true])
PKG_CHECK_MODULES(sidutils, libsidutils >= 1.0.4,
[sidutils_OK="yes"],
[true])
dnl This is a rather ugly hack to find the builder
dnl as libsidplay2 works fine without it but the
dnl decoder uses it...
if test "x$sidplay2_OK" = "xyes"; then
if test "x$sidutils_OK" = "xyes"; then
s2lib=`dirname $sidplay2_LIBS`
resid_OK="no"
AC_CHECK_FILE([$s2lib/libresid-builder.la],
[resid_lib="$s2lib/libresid-builder.la"
resid_OK="yes"], [
resid_lib="$s2lib/sidplay/builders/libresid-builder.la"
AC_CHECK_FILE(
$resid_lib,
[resid_OK="yes"],)])
if test "x$resid_OK" = "xyes"; then
sidplay2_LDFLAGS="$resid_lib"
AC_SUBST(sidplay2_LDFLAGS)
AC_SUBST(sidplay2_LIBS)
AC_SUBST(sidplay2_CFLAGS)
AC_SUBST(sidutils_LIBS)
AC_SUBST(sidutils_CFLAGS)
DECODER_PLUGINS="$DECODER_PLUGINS sidplay2"
fi
fi
fi
fi
dnl ffmpeg
AC_ARG_WITH(ffmpeg, AS_HELP_STRING(--without-ffmpeg,
Compile without ffmpeg))
if test "x$with_ffmpeg" != "xno"
then
AC_CHECK_PROG([FFMPEG_CONFIG], [ffmpeg-config], [yes])
if test "x$FFMPEG_CONFIG" = "xyes"
then
libavformat_CFLAGAS=`ffmpeg-config --cflags`
libavformat_LIBS=`ffmpeg-config --plugin-libs avformat`
AC_SUBST(libavformat_CFLAGAS)
AC_SUBST(libavformat_LIBS)
DECODER_PLUGINS="$DECODER_PLUGINS ffmpeg"
else
PKG_CHECK_MODULES(libavformat, libavformat,
[AC_SUBST(libavformat_CFLAGS)
AC_SUBST(libavformat_LIBS)
DECODER_PLUGINS="$DECODER_PLUGINS ffmpeg"],
[true])
fi
AC_CHECK_HEADERS(ffmpeg/avformat.h libavformat/avformat.h)
fi
dnl speex
AC_ARG_WITH(speex, AS_HELP_STRING(--without-speex,
Compile without speex support))
if test "x$with_speex" != "xno"
then
PKG_CHECK_MODULES(speex, speex >= 1.0.0,
[AC_SUBST(speex_LIBS)
AC_SUBST(speex_CFLAGS)
DECODER_PLUGINS="$DECODER_PLUGINS speex"],
[true])
fi
dnl samplerate
AC_ARG_WITH(samplerate, AS_HELP_STRING(--without-samplerate,
Compile without libsamplerate))
COMPILE_SAMPLERATE="no"
if test "x$with_samplerate" != "xno"
then
PKG_CHECK_MODULES(samplerate, samplerate >= 0.1.0,
[EXTRA_LIBS="$EXTRA_LIBS $samplerate_LIBS"
CFLAGS="$CFLAGS $samplerate_CFLAGS"
AC_DEFINE([HAVE_SAMPLERATE], 1,
[Define if you have libsamplerate])
COMPILE_SAMPLERATE="yes"],
[true])
fi
dnl curl
COMPILE_CURL="no"
AC_ARG_WITH(curl, AS_HELP_STRING(--without-curl,
[Compile without curl (Internet streams support)]))
if test "x$with_curl" != "xno"
then
dnl FIXME: make a better curl test
AC_CHECK_PROG([CURL_CONFIG], [curl-config], [yes])
if test "x$CURL_CONFIG" = "xyes"
then
AC_MSG_CHECKING([libcurl version])
curl_ver=`curl-config --version | awk '{print $2}'`
curl_ver_major=`echo $curl_ver | awk -F. '{print $1}'`
curl_ver_minor=`echo $curl_ver | awk -F. '{print $2}'`
curl_ver_fix=`echo $curl_ver | awk -F. '{print $3}'`
# make 071201 from 7.12.1
curl_ver_number=`printf "%02d%02d%02d" $curl_ver_major \
$curl_ver_minor $curl_ver_fix`
if test "$curl_ver_number" -ge "071202"
then
AC_MSG_RESULT([$curl_ver, OK])
CFLAGS="$CFLAGS `curl-config --cflags`"
EXTRA_LIBS="$EXTRA_LIBS `curl-config --libs`"
EXTRA_OBJS="$EXTRA_OBJS io_curl.o"
AC_DEFINE([HAVE_CURL], 1, [Define if you have libcurl])
COMPILE_CURL="yes"
else
AC_MSG_RESULT([$curl_ver, but minimum is 7.12.2])
fi
fi
fi
EXTRA_LIBS="$EXTRA_LIBS $CURSES_LIB"
AC_SUBST(EXTRA_LIBS)
AC_OUTPUT([Makefile
themes/Makefile
decoder_plugins/Makefile
decoder_plugins/mp3/Makefile
decoder_plugins/vorbis/Makefile
decoder_plugins/flac/Makefile
decoder_plugins/sndfile/Makefile
decoder_plugins/speex/Makefile
decoder_plugins/musepack/Makefile
decoder_plugins/wavpack/Makefile
decoder_plugins/ffmpeg/Makefile
decoder_plugins/modplug/Makefile
decoder_plugins/timidity/Makefile
decoder_plugins/sidplay2/Makefile
decoder_plugins/aac/Makefile
moc.spec
])
echo
echo "----------------------------------------------------------------"
echo "MOC will be compiled with:"
echo "Decoder plugins: "$DECODER_PLUGINS
echo "OSS: "$COMPILE_OSS
echo "ALSA: "$COMPILE_ALSA
echo "JACK: "$COMPILE_JACK
echo "DEBUG: "$COMPILE_DEBUG
echo "RCC: "$COMPILE_RCC
echo "Network streams: "$COMPILE_CURL
echo "Resampling: "$COMPILE_SAMPLERATE
echo "MIME magic: "$COMPILE_MAGIC
echo "----------------------------------------------------------------"
echo
if test "$COMPILE_OSS" = "no" -a "$COMPILE_ALSA" = "no" \
-a "$COMPILE_JACK" = "no"
then
echo "WARNING: No sound output method is to be compiled; you will not hear any sound!"
echo
fi
echo "WARNING: Since MOC version 2 the executable file name has changed to mocp!"
echo " Please remove old moc binary if you have installed an older version."
echo