-
Notifications
You must be signed in to change notification settings - Fork 4
/
configure.ac
913 lines (716 loc) · 23.1 KB
/
configure.ac
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
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
dnl Process this file with autoconf to produce a configure script.
dnl $Id: $
m4_include([m4/version.m4])
AC_INIT([fuppes], VERSION_NUMBER, [[email protected]])
AM_CONFIG_HEADER(src/config.h)
AM_INIT_AUTOMAKE([1.9])
AH_TEMPLATE([FUPPES_VERSION], [The Current Version Number of FUPPES])
AC_DEFINE([FUPPES_VERSION], "[VERSION_NUMBER]")
AC_CONFIG_MACRO_DIR([m4])
AC_PROG_CC
AC_PROG_CXX
AC_DISABLE_STATIC
#AC_DISABLE_SHARED
AC_LIBTOOL_WIN32_DLL
AC_LIBTOOL_DLOPEN
AC_PROG_LIBTOOL
AC_PROG_INSTALL
AM_PROG_INSTALL_STRIP
AC_FUNC_FSEEKO
AC_TYPE_OFF_T
AC_SYS_LARGEFILE
AC_C_BIGENDIAN
PKG_PROG_PKG_CONFIG
FUPPES_CFLAGS=""
FUPPES_LIBS=""
# CHECK HOST
is_windows=false
build_daemon=true
AC_MSG_CHECKING([whether we are building with mingw])
case $host in
*-*-mingw32*)
AC_MSG_RESULT([yes])
FUPPES_LIBS="$FUPPES_LIBS -lws2_32 -lole32"
LDFLAGS="$LDFLAGS -no-undefined"
AC_CHECK_TOOL(WINDRES, windres)
build_daemon=false
is_windows=true
;;
*)
AC_MSG_RESULT([no])
;;
esac
AM_CONDITIONAL([BUILD_DAEMON], [test x$build_daemon = xtrue])
AM_CONDITIONAL([WINDOWS_BUILD], [test x$is_windows = xtrue])
AM_CONDITIONAL([WIN32], [test x$is_windows = xtrue])
AC_ARG_ENABLE([windows-service], [AC_HELP_STRING([--enable-windows-service],
[build windows service [default=no]])],
[enable_windows_service=$enableval], [enable_windows_service='no'])
AM_CONDITIONAL([WINDOWS_SERVICE], [test "x$enable_windows_service" = "xyes" -a "x$is_windows" = "xtrue"])
dnl Checks for header files.
AC_HEADER_DIRENT
AC_HEADER_STDC
AC_CHECK_HEADERS([arpa/inet.h fcntl.h netdb.h netinet/in.h string.h sys/ioctl.h sys/param.h sys/socket.h unistd.h sys/utsname.h syslog.h])
AH_TEMPLATE([HAVE_SELECT], [])
if test x$is_windows = xfalse; then
AC_CHECK_FUNCS([select], [], AC_ERROR([select not found]))
else
AC_DEFINE([HAVE_SELECT], [1], [])
fi
dnl Checks for typedefs, structures, and compiler characteristics.
AC_CHECK_SIZEOF(off_t)
AC_CHECK_SIZEOF(long long int)
AC_CHECK_SIZEOF(unsigned long long int)
AC_CHECK_SIZEOF(long int)
AC_CHECK_SIZEOF(unsigned long int)
AC_CHECK_SIZEOF(int)
AC_CHECK_SIZEOF(unsigned int)
AC_CHECK_SIZEOF(short)
AC_CHECK_SIZEOF(unsigned short)
dnl expand paths and add them to config.h
#SYSCONFDIR=`eval echo $sysconfdir/fuppes`
#AH_TEMPLATE([FUPPES_SYSCONFDIR], [])
#AC_DEFINE_UNQUOTED([FUPPES_SYSCONFDIR], "[$SYSCONFDIR]", [])
#DATADIR=`eval echo $datadir/fuppes`
#AH_TEMPLATE([FUPPES_DATADIR], [])
#AC_DEFINE_UNQUOTED([FUPPES_DATADIR], "[$DATADIR]", [])
#PLUGINDIR=`eval echo $libdir/fuppes`
#AH_TEMPLATE([FUPPES_PLUGINDIR], [])
#AC_DEFINE_UNQUOTED([FUPPES_PLUGINDIR], "[$PLUGINDIR]", [])
dnl Checks for libraries.
echo ""
echo "check minimum dependencies"
echo ""
PKG_CHECK_MODULES(PCRE, libpcre >= 5.0)
PKG_CHECK_MODULES(LIBXML, libxml-2.0 >= 2.6.1)
PKG_CHECK_MODULES(SQLITE3, sqlite3 >= 3.2)
AC_CHECK_LIB(pthread, pthread_create, FUPPES_LIBS="$FUPPES_LIBS -lpthread")
have_clock_gettime=no
AH_TEMPLATE([HAVE_CLOCK_GETTIME], [])
AC_CHECK_LIB(rt, clock_gettime, have_clock_gettime=yes)
if test "x$have_clock_gettime" = "xyes"; then
FUPPES_LIBS="$FUPPES_LIBS -lrt"
AC_DEFINE([HAVE_CLOCK_GETTIME], [1], [])
fi
echo ""
echo "check recommended dependencies"
echo ""
# uuid
have_uuid=no
AH_TEMPLATE([HAVE_UUID], [])
PKG_CHECK_MODULES(UUID, uuid >= 0, have_uuid=yes, have_uuid=no)
if test "x$have_uuid" = "xyes"; then
AC_DEFINE([HAVE_UUID], [1], [])
fi
AC_SUBST(UUID_CFLAGS)
AC_SUBST(UUID_LIBS)
AM_ICONV
if test x$is_windows = xtrue; then
# the above iconv macro executes some tests that require a shared iconv lib.
# if we are crosscompiling we can use wine to execute the tests (wine-bin on debian)
# or we just set the LDFLAGS if at least the iconv function declaration is found
if test "x$am_cv_func_iconv" = "xyes"; then
am_func_iconv=yes
LIBICONV="-liconv"
AC_SUBST(LIBICONV)
AC_DEFINE(HAVE_ICONV, 1)
fi
fi
echo ""
echo "check optional stuff"
echo ""
#
# TAGLIB
#
have_taglib=no
AC_ARG_ENABLE([taglib], [AC_HELP_STRING([--enable-taglib],
[enable taglib metadata plugin [default=yes]])],
[enable_taglib=$enableval], [enable_taglib='yes'])
if test "x$enable_taglib" = "xyes" ; then
PKG_CHECK_MODULES(TAGLIB, taglib >= 1.6, have_taglib=yes, have_taglib=no)
fi
AM_CONDITIONAL(TAGLIB_METADATA_PLUGIN, test "x$have_taglib" = "xyes")
AC_SUBST(TAGLIB_CFLAGS)
AC_SUBST(TAGLIB_LIBS)
# END TAGLIB
#
# libffmpegthumbnailer
#
have_ffmpegthumbnailer=no
AC_ARG_ENABLE([ffmpegthumbnailer], [AC_HELP_STRING([--enable-ffmpegthumbnailer],
[enable ffmpegthumbnailer metadata plugin [default=yes]])],
[enable_ffmpegthumbnailer=$enableval], [enable_ffmpegthumbnailer='yes'])
if test "x$enable_ffmpegthumbnailer" = "xyes" ; then
PKG_CHECK_MODULES(FFMPEGTHUMBNAILER, libffmpegthumbnailer >= 2.0.0, have_ffmpegthumbnailer=yes, have_ffmpegthumbnailer=no)
fi
AM_CONDITIONAL(FFMPEGTHUMBNAILER_METADATA_PLUGIN, test "x$have_ffmpegthumbnailer" = "xyes")
AC_SUBST(FFMPEGTHUMBNAILER_CFLAGS)
AC_SUBST(FFMPEGTHUMBNAILER_LIBS)
#
# ImageMagick (MagickWand)
#
have_magickwand=no
AC_ARG_ENABLE([magickwand], [AC_HELP_STRING([--enable-magickwand],
[enable ImageMagick metadata/transcoder plugin [default=yes]])],
[enable_magickwand=$enableval], [enable_magickwand='yes'])
if test "x$enable_magickwand" = "xyes" ; then
PKG_CHECK_MODULES(IMAGEMAGICK_WAND, Wand >= 6.2.4, have_magickwand=yes, have_magickwand=no)
fi
AM_CONDITIONAL(MAGICK_WAND_METADATA_PLUGIN, test "x$have_magickwand" = "xyes")
AM_CONDITIONAL(MAGICK_WAND_TRANSCODER_PLUGIN, test "x$have_magickwand" = "xyes")
#end ImageMagick
#
# Exiv2
#
have_exiv2=no
AC_ARG_ENABLE([exiv2], [AC_HELP_STRING([--enable-exiv2],
[enable exiv2 metadata plugin [default=yes]])],
[enable_exiv2=$enableval], [enable_exiv2='yes'])
if test "x$enable_exiv2" = "xyes" ; then
PKG_CHECK_MODULES(EXIV2, exiv2 >= 0.16, have_exiv2=yes, have_exiv2=no)
fi
AM_CONDITIONAL(EXIV2_METADATA_PLUGIN, test "x$have_exiv2" = "xyes")
AC_SUBST(EXIV2_CFLAGS)
AC_SUBST(EXIV2_LIBS)
#
# libavformat
#
AH_TEMPLATE([HAVE_LIBAVFORMAT], [])
AH_TEMPLATE([HAVE_AVSTRING_H], [])
AH_TEMPLATE([HAVE_LIBSWSCALE], [])
AH_TEMPLATE([HAVE_AV_PARSE_VIDEO_FUNCTS], [])
AH_TEMPLATE([FFMPEG_VERSION], [])
use_libavformat=yes
have_avstring_h=no
AC_ARG_ENABLE(libavformat,
[ --disable-libavformat Do not use libavformat (from the FFmpeg package)],
[ use_libavformat=no; ] )
have_libavformat=no
have_libavformat52=no
have_libavformat51=no
have_libavformat50=no
ffmpeg_new_includes=no
have_libswscale=no
if test "x$use_libavformat" = "xyes"; then
LIBAVFORMAT_CFLAGS=""
LIBAVFORMAT_LIBS=""
PKG_CHECK_MODULES(LIBAVFORMAT, libavformat >= 52, [have_libavformat52=yes have_libavformat=yes], have_libavformat52=no)
if test "x$have_libavformat52" = "xno"; then
PKG_CHECK_MODULES(LIBAVFORMAT, libavformat >= 51, [have_libavformat51=yes have_libavformat=yes], have_libavformat51=no)
if test "x$have_libavformat51" = "xno"; then
PKG_CHECK_MODULES(LIBAVFORMAT, libavformat, [have_libavformat50=yes have_libavformat=yes], have_libavformat50=no)
fi
else
AC_CHECK_HEADERS(libavformat/avformat.h, ffmpeg_new_includes=yes, ffmpeg_new_includes=no)
if test "x$ffmpeg_new_includes" = "xno"; then
LIBAVFORMAT_CFLAGS="$LIBAVFORMAT_CFLAGS -DOLD_INCLUDES_PATH"
fi
fi
if test "x$have_libavformat" = "xyes"; then
AC_DEFINE([HAVE_LIBAVFORMAT], [1], [])
PKG_CHECK_MODULES(LIBSWSCALE, libswscale, have_libswscale=yes, have_libswscale=no)
if test "x$have_libswscale" = "xyes"; then
AC_DEFINE([HAVE_LIBSWSCALE], [1], [])
fi
if test "x$ffmpeg_new_includes" = "xyes"; then
AC_CHECK_HEADERS(libavutil/avstring.h, have_avstring_h=yes, have_avstring_h=no)
else
AC_CHECK_HEADERS(ffmpeg/avstring.h, have_avstring_h=yes, have_avstring_h=no)
fi
if test "x$have_avstring_h" = "xyes"; then
AC_DEFINE([HAVE_AVSTRING_H], [1], [])
fi
if test "x$have_libavformat52" = "xyes"; then
LIBAVFORMAT_CFLAGS="$LIBAVFORMAT_CFLAGS -DFFMPEG_VERSION=52"
AC_DEFINE([FFMPEG_VERSION], [52], [])
AC_DEFINE([HAVE_AV_PARSE_VIDEO_FUNCTS], [1], [])
elif test "x$have_libavformat51" = "xyes"; then
AC_DEFINE([FFMPEG_VERSION], [51], [])
#AC_DEFINE([HAVE_AV_PARSE_VIDEO_FUNCTS], [1], [])
elif test "x$have_libavformat50" = "xyes"; then
AC_DEFINE([FFMPEG_VERSION], [50], [])
fi
PKG_CHECK_MODULES(LIBAVCODEC, libavcodec, have_libavcodec=yes, have_libavcodec=no)
PKG_CHECK_MODULES(LIBAVUTIL, libavutil, have_libavutil=yes, have_libavutil=no)
else
AC_MSG_NOTICE([*** libavformat (FFmpeg) support disabled ***]);
fi
fi
AM_CONDITIONAL(LIBAVFORMAT_METADATA_PLUGIN, test "x$have_libavformat" = "xyes")
have_transcoder_ffmpeg=no
AC_ARG_ENABLE([transcoder-ffmpeg], [AC_HELP_STRING([--enable-transcoder-ffmpeg],
[enable ffmpeg video transcoder plugin [default=no]])],
[have_transcoder_ffmpeg=$enableval], [have_transcoder_ffmpeg='no'])
if test "x$have_libavformat" = "xno" ; then
have_transcoder_ffmpeg=no
fi
AM_CONDITIONAL(FFMPEG_TRANSCODER_PLUGIN, test "x$have_transcoder_ffmpeg" = "xyes")
# end libavformat
# check for mp4v2
have_mp4v2=no
AC_ARG_ENABLE([mp4v2], [AC_HELP_STRING([--enable-mp4v2],
[enable mp4v2 metadata plugin [default=yes]])],
[enable_mp4v2=$enableval], [enable_mp4v2='yes'])
if test "x$enable_mp4v2" = "xyes" ; then
AH_TEMPLATE([HAVE_LAME], [])
AC_CHECK_HEADERS([mp4v2/mp4v2.h], have_mp4v2=yes, have_mp4v2=no)
if test "x$have_mp4v2" = "xyes"; then
MP4V2_CFLAGS=""
MP4V2_LIBS="-lmp4v2"
fi
fi
AM_CONDITIONAL(MP4V2_METADATA_PLUGIN, test "x$have_mp4v2" = "xyes")
# check for LAME
have_lame=no
LAME_LIBS=""
AC_ARG_ENABLE([lame], [AC_HELP_STRING([--enable-lame],
[enable lame encoder plugin [default=no]])],
[enable_lame=$enableval], [enable_lame='no'])
AC_ARG_WITH(lame-dir, AC_HELP_STRING([--with-lame-dir=path],
[include path of lame/lame.h]),
[
if test "x$withval" != "x"; then
LAME_H_DIR="$withval/"
CXXFLAGS="$CXXFLAGS -I$withval"
fi
],
[LAME_H_DIR=""])
AC_SUBST(LAME_H_DIR)
if test "x$enable_lame" = "xyes" ; then
AH_TEMPLATE([HAVE_LAME], [])
AC_CHECK_HEADERS([${LAME_H_DIR}lame/lame.h], have_lame=yes, have_lame=no)
if test "x$have_lame" = "xyes"; then
LAME_LIBS="-lmp3lame"
AC_DEFINE([HAVE_LAME], [1], [])
fi
fi
# check for TwoLAME
have_twolame=no
TWOLAME_LIBS=""
AC_ARG_ENABLE([twolame], [AC_HELP_STRING([--enable-twolame],
[enable twolame encoder plugin [default=no]])],
[enable_twolame=$enableval], [enable_twolame='no'])
if test "x$enable_twolame" = "xyes" ; then
AH_TEMPLATE([HAVE_TWOLAME], [])
PKG_CHECK_MODULES(TWOLAME, twolame >= 0.3.8, have_twolame=yes, have_twolame=no)
if test "x$have_twolame" = "xyes"; then
AC_DEFINE([HAVE_TWOLAME], [1], [])
fi
fi
# vorbis decoder plugin
have_vorbis=no
have_tremor=no
AC_ARG_ENABLE([vorbis], [AC_HELP_STRING([--enable-vorbis],
[enable vorbis decoder plugin [default=yes]])],
[enable_vorbis=$enableval], [enable_vorbis='yes'])
AC_ARG_ENABLE([tremor], [AC_HELP_STRING([--enable-tremor],
[use tremor instead of libvorbisfile [default=no]])],
[enable_tremor=$enableval], [enable_tremor='no'])
if test "x$enable_vorbis" = "xyes" ; then
TREMOR_H_DIR=""
if test "x$enable_tremor" = "xyes"; then
AC_CHECK_HEADERS(${TREMOR_H_DIR}tremor/ivorbisfile.h, have_tremor=yes, have_tremor=no)
if test "x$have_tremor" = "xyes"; then
VORBISFILE_CFLAGS="-DTREMOR"
else
echo "Tremor not found. Checking for libvorbisfile instead."
fi
fi
if test "x$have_tremor" = "xno"; then
PKG_CHECK_MODULES(VORBISFILE, vorbisfile >= 1.0, have_vorbis=yes, have_vorbis=no)
fi
fi
# musepack decoder plugin
MUSEPACK_CFLAGS=""
MUSEPACK_LIBS=""
have_mpc=no
AC_ARG_ENABLE([musepack], [AC_HELP_STRING([--enable-musepack],
[enable musepack decoder plugin [default=yes]])],
[enable_musepack=$enableval], [enable_musepack='yes'])
AC_ARG_WITH(musepack-dir, AC_HELP_STRING([--with-musepack-dir=path],
[include path of mpcdec/mpcdec.h]),
[
if test "x$withval" != "x"; then
MPC_H_DIR="$withval/"
CXXFLAGS="$CXXFLAGS -I$withval"
fi
],
[MPC_H_DIR=""])
AC_SUBST(MPC_H_DIR)
if test "x$enable_musepack" = "xyes" ; then
AC_CHECK_HEADERS(${MPC_H_DIR}mpcdec/config_types.h, have_mpc=yes, have_mpc=no)
if test "x$have_mpc" = "xno"; then
AC_CHECK_HEADERS(${MPC_H_DIR}mpc/mpcdec.h, have_mpc=yes, have_mpc=no)
MUSEPACK_CFLAGS="-DMUSEPACK2"
fi
if test "x$have_mpc" = "xyes"; then
MUSEPACK_LIBS="-lmpcdec"
fi
fi
# flac decoder plugin
have_flac=no
FLAC_LIBS=""
AC_ARG_ENABLE([flac], [AC_HELP_STRING([--enable-flac],
[enable flac decoder plugin [default=yes]])],
[enable_flac=$enableval], [enable_flac='yes'])
AC_ARG_WITH(flac-dir, AC_HELP_STRING([--with-flac-dir=path],
[include path of FLAC/file_decoder.h (flac <= 1.1.2) or FLAC/stream_decoder.h (flac >= 1.1.3)]),
[
if test "x$withval" != "x"; then
FLAC_H_DIR="$withval/"
CXXFLAGS="$CXXFLAGS -I$withval"
fi
],
[FLAC_H_DIR=""])
AC_SUBST(FLAC_H_DIR)
if test "x$enable_flac" = "xyes" ; then
# flac <= 1.1.2
AC_CHECK_HEADERS(${FLAC_H_DIR}FLAC/file_decoder.h, have_flac=yes, have_flac=no)
if test "x$have_flac" = "xyes"; then
FLAC_LIBS="-lFLAC"
FLAC_CFLAGS="-DHAVE_FLAC_FILEDECODER"
fi
# flac >= 1.1.3
if test "x$have_flac" = "xno"; then
AC_CHECK_HEADERS(${FLAC_H_DIR}FLAC/stream_decoder.h, have_flac=yes, have_flac=no)
if test "x$have_flac" = "xyes"; then
FLAC_LIBS="-lFLAC"
fi
fi
fi
# libmad
have_mad=no
AC_ARG_ENABLE([mad], [AC_HELP_STRING([--enable-mad],
[enable mad support [default=no]])],
[enable_mad=$enableval], [enable_mad='no'])
if test "x$enable_mad" = "xyes" ; then
AH_TEMPLATE([HAVE_MAD], [])
PKG_CHECK_MODULES(MAD, mad >= 0.15, have_mad=yes, have_mad=no)
if test "x$have_mad" = "xyes"; then
have_decoder=yes
AC_DEFINE([HAVE_MAD], [1], [])
fi
fi
# faad
have_faad=no
have_mp4ff=no
AC_ARG_ENABLE([faad], [AC_HELP_STRING([--enable-faad],
[enable faad support [default=no]])],
[enable_faad=$enableval], [enable_faad='no'])
AC_ARG_WITH(faad-dir, AC_HELP_STRING([--with-faad-dir=path],
[include path of faad.h]),
[if test "x$withval" != "x"; then
FAAD_H_DIR="$withval/"
CXXFLAGS="$CXXFLAGS -I$withval"
fi], [FAAD_H_DIR=""])
if test "x$enable_faad" = "xyes" ; then
AH_TEMPLATE([HAVE_FAAD], [])
AH_TEMPLATE([HAVE_MP4FF_H], [])
AC_CHECK_HEADERS(${FAAD_H_DIR}faad.h, have_faad=yes, have_faad=no)
if test "x$have_faad" = "xyes"; then
AC_RUN_IFELSE(
[AC_LANG_PROGRAM(
[[#include <faad.h>]],
[[(void) faacDecOpen]])],
[have_decoder=yes
AC_DEFINE([HAVE_FAAD], [1], [])],
[have_faad=no])
AC_SUBST(FAAD_H_DIR)
AC_CHECK_HEADERS(${FAAD_H_DIR}mp4ff.h, have_mp4ff=yes, have_mp4ff=no)
if test "x$have_mp4ff" = "xyes"; then
AC_DEFINE([HAVE_MP4FF_H], [1], [])
else
echo "mp4ff.h not found. AAC decoder is build without MP4 support"
fi
fi
fi
# audio encoder
AM_CONDITIONAL(LAME_ENCODER_PLUGIN, test "x$have_lame" = "xyes")
#AC_SUBST(LAME_CFLAGS)
AC_SUBST(LAME_LIBS)
AM_CONDITIONAL(TWOLAME_ENCODER_PLUGIN, test "x$have_twolame" = "xyes")
AC_SUBST(TWOLAME_CFLAGS)
AC_SUBST(TWOLAME_LIBS)
# audio decoder
AM_CONDITIONAL(VORBIS_DECODER_PLUGIN, test "x$have_vorbis" = "xyes")
AC_SUBST(VORBISFILE_CFLAGS)
AC_SUBST(VORBISFILE_LIBS)
AM_CONDITIONAL(MUSEPACK_DECODER_PLUGIN, test "x$have_mpc" = "xyes")
AC_SUBST(MUSEPACK_CFLAGS)
AC_SUBST(MUSEPACK_LIBS)
AM_CONDITIONAL(FLAC_DECODER_PLUGIN, test "x$have_flac" = "xyes")
AC_SUBST(FLAC_CFLAGS)
AC_SUBST(FLAC_LIBS)
AM_CONDITIONAL(FAAD_DECODER_PLUGIN, test "x$have_faad" = "xyes")
AC_SUBST(FAAD_CFLAGS)
AC_SUBST(FAAD_LIBS)
AM_CONDITIONAL(MAD_DECODER_PLUGIN, test "x$have_mad" = "xyes")
AC_SUBST(MAD_CFLAGS)
AC_SUBST(MAD_LIBS)
if test "x$transcoding" = "xno"; then
ENABLE_TRANSCODING="false"
CXXFLAGS="$CXXFLAGS -DDISABLE_TRANSCODING"
AC_MSG_NOTICE("Transcoding disabled");
fi
AM_CONDITIONAL(DISABLE_TRANSCODING, test x$ENABLE_TRANSCODING = xfalse)
SIMAGE_CFLAGS=""
SIMAGE_LIBS=""
have_simage=no
if test -z "$SIMAGE_CONFIG"; then
AC_PATH_PROG(SIMAGE_CONFIG, simage-config, no, $prefix/bin/)
fi
if test "$SIMAGE_CONFIG" != "no" ; then
AC_MSG_CHECKING(SIMAGE_CFLAGS)
SIMAGE_CFLAGS=`$SIMAGE_CONFIG --cflags`
AC_MSG_RESULT($SIMAGE_CFLAGS)
AC_MSG_CHECKING(SIMAGE_LIBS)
SIMAGE_LIBS=`$SIMAGE_CONFIG --libs`
AC_MSG_RESULT($SIMAGE_LIBS)
have_simage=yes
fi
AM_CONDITIONAL(SIMAGE_METADATA_PLUGIN, test "x$have_simage" = "xyes")
AC_SUBST(SIMAGE_CFLAGS)
AC_SUBST(SIMAGE_LIBS)
MYSQL_CFLAGS=""
MYSQL_LIBS=""
have_mysql=no
#if test -z "$MYSQL_CONFIG"; then
# AC_PATH_PROG(MYSQL_CONFIG, mysql_config, no, $prefix/bin/)
#fi
#if test "$MYSQL_CONFIG" != "no" ; then
# AC_MSG_CHECKING(MYSQL_CFLAGS)
# MYSQL_CFLAGS=`$MYSQL_CONFIG --cflags`
# AC_MSG_RESULT($MYSQL_CFLAGS)
#
# AC_MSG_CHECKING(MYSQL_LIBS)
# MYSQL_LIBS=`$MYSQL_CONFIG --libs`
# AC_MSG_RESULT($MYSQL_LIBS)
# have_mysql=yes
#fi
AM_CONDITIONAL(MYSQL_DATABASE_PLUGIN, test "x$have_mysql" = "xyes")
AC_SUBST(MYSQL_CFLAGS)
AC_SUBST(MYSQL_LIBS)
dnl Checks for Additional stuffs.
# HTTP Port
AC_ARG_WITH([http-port],
[AC_HELP_STRING([--with-http-port=PORT],
[set the default HTTP port])],
[with_http_port=$withval], [with_http_port=''])
if test "x$with_http_port" != 'x'; then
CXXFLAGS="$CXXFLAGS -DDEFAULT_HTTP_PORT=$withval"
fi
# inotify (linux only)
have_inotify=no
AH_TEMPLATE([HAVE_INOTIFY], [inotify support])
AC_ARG_ENABLE([inotify], [AC_HELP_STRING([--enable-inotify],
[enable inotify support (Linux only) [default=yes]])],
[enable_inotify=$enableval], [enable_inotify='yes'])
if test "x$enable_inotify" = "xyes" ; then
AC_CHECK_HEADERS(sys/inotify.h,
have_inotify=yes
AC_DEFINE([HAVE_INOTIFY], [1], []),
have_inotify=no)
fi
AM_CONDITIONAL([HAVE_INOTIFY], [test "x$have_inotify" = "xyes"])
# kqueue (bsd, os x)
have_kqueue=no
AH_TEMPLATE([HAVE_KQUEUE], [kqueue support])
AC_ARG_ENABLE([kqueue], [AC_HELP_STRING([--enable-kqueue],
[enable kqueue support (bsd, os x) [default=yes]])],
[enable_kqueue=$enableval], [enable_kqueue='yes'])
if test "x$enable_kqueue" = "xyes" ; then
AC_CHECK_FUNC(kqueue,
have_kqueue=yes
AC_DEFINE([HAVE_KQUEUE], [1], []),
have_kqueue=no)
fi
AM_CONDITIONAL([HAVE_KQUEUE], [test "x$have_kqueue" = "xyes"])
# dbus (to detect device addition/removal)
have_dbus=no
AH_TEMPLATE([HAVE_DBUS], [dbus support])
AC_ARG_ENABLE([dbus], [AC_HELP_STRING([--enable-dbus],
[enable dbus [default=no]])],
[enable_dbus=$enableval], [enable_dbus='no'])
if test "x$enable_dbus" = "xyes" ; then
PKG_CHECK_MODULES(DBUS, dbus-1 >= 1.2,
have_dbus=yes
AC_DEFINE([HAVE_DBUS], [1], []),
have_dbus=no)
fi
AM_CONDITIONAL(HAVE_DBUS, test "x$have_dbus" = "xyes")
AC_SUBST(DBUS_CFLAGS)
AC_SUBST(DBUS_LIBS)
FUPPES_CFLAGS="$FUPPES_CFLAGS $DBUS_CFLAGS"
FUPPES_LIBS="$FUPPES_LIBS $DBUS_LIBS"
# build tests
AC_ARG_ENABLE([tests], [AC_HELP_STRING([--enable-tests],
[enable tests [default=no]])],
[enable_tests=$enableval], [enable_tests='no'])
AM_CONDITIONAL([BUILD_TESTS], [test "x$enable_tests" = "xyes"])
AC_SUBST(FUPPES_LIBS)
AC_SUBST(FUPPES_CFLAGS)
AC_OUTPUT([
Makefile
m4/Makefile
src/Makefile
src/plugins/Makefile
src/windows/Makefile
include/Makefile
resources/Makefile
config/Makefile
test/Makefile
])
dnl summary
echo ""
echo "CONFIGURATION SUMMARY"
echo ""
echo " audio transcoding plugins"
echo " encoder:"
if test "x$have_lame" = "xyes"; then
echo " lame : yes"
else
echo " lame : no"
fi
if test "x$have_twolame" = "xyes"; then
echo " twolame : yes"
else
echo " twolame : no"
fi
echo " pcm/wav : yes"
echo " decoder:"
if test "x$have_vorbis" = "xyes"; then
echo " vorbis : yes (libvorbisfile)"
else
if test "x$have_tremor" = "xyes"; then
echo " vorbis : yes (tremor)"
else
echo " vorbis : no"
fi
fi
if test "x$have_mpc" = "xyes"; then
echo " mpc : yes"
else
echo " mpc : no"
fi
if test "x$have_flac" = "xyes"; then
echo " flac : yes"
else
echo " flac : no"
fi
if test "x$have_faad" = "xyes"; then
if test "x$have_mp4ff" = "xyes"; then
echo " faad : yes (aac/mp4/m4a)"
else
echo " faad : yes (aac/NO mp4/m4a)"
fi
else
echo " faad : no (aac/mp4/m4a)"
fi
if test "x$have_mad" = "xyes"; then
echo " mad : yes (mpeg Layer I, II & III)"
else
echo " mad : no (mpeg Layer I, II & III)"
fi
echo ""
#end audio transcoding
echo " video transcoding plugins"
if test "x$have_transcoder_ffmpeg" = "xyes"; then
echo " ffmpeg : enabled"
else
echo " ffmpeg : disabled"
fi
echo ""
echo " image conversion/rescaling plugins"
if test "x$have_magickwand" = "xyes"; then
echo " ImageMagick : enabled (Wand C-API)"
else
echo " ImageMagick : disabled (Wand C-API)"
fi
echo ""
#end image conversion/rescaling
echo " audio metadata extraction plugins"
# taglib
if test "x$have_taglib" = "xyes"; then
echo " taglib : enabled (mp3, ogg, flac & mpc)"
else
echo " taglib : disabled (mp3, ogg, flac & mpc)"
fi
# mp4v2
if test "x$have_mp4v2" = "xyes"; then
echo " mpeg4ip/mp4v2 : enabled (mp4/m4a)"
else
echo " mpeg4ip/mp4v2 : disabled (mp4/m4a)"
fi
echo ""
echo " image metadata extraction plugins"
# Exiv2
if test "x$have_exiv2" = "xyes"; then
echo " Exiv2 : enabled"
else
echo " Exiv2 : disabled"
fi
# ImageMagick
if test "x$have_magickwand" = "xyes"; then
echo " ImageMagick : enabled (Wand C-API)"
else
echo " ImageMagick : disabled (Wand C-API)"
fi
# simage
if test "x$have_simage" = "xyes"; then
echo " simage : enabled (jpeg, png, gif, tiff, rgb, pic, tga, eps)"
else
echo " simage : disabled (jpeg, png, gif, tiff, rgb, pic, tga, eps)"
fi
echo ""
echo " video metadata extraction plugins"
# libavformat
if test "x$have_libavformat" = "xyes"; then
echo " libavformat : enabled"
else
echo " libavformat : disabled"
fi
# ffmpegthumbnailer
if test "x$have_ffmpegthumbnailer" = "xyes"; then
echo " ffmpegthumbnailer : enabled"
else
echo " ffmpegthumbnailer : disabled"
fi
echo ""
#end metadata
echo " database plugins"
# mysql
if test "x$have_mysql" = "xyes"; then
echo " mysql : enabled"
else
echo " mysql : disabled"
fi
echo ""
echo " miscellaneous"
# iconv
if test "x$am_func_iconv" = "xyes"; then
echo " iconv : enabled (charset conversion)"
else
echo " iconv : disabled (charset conversion)"
fi
# uuid
if test x$is_windows = xfalse; then
if test "x$have_uuid" = "xyes"; then
echo " uuid : enabled"
else
echo " uuid : disabled"
fi
fi
# inotify
if test "x$have_inotify" = "xyes"; then
echo " inotify : enabled"
else
echo " inotify : disabled"
fi
echo ""
echo " paths"
#echo " sysconfdir: $sysconfdir/fuppes"
echo " localstatedir: $localstatedir/lib/fuppes"
echo ""
echo "Thanks for using fuppes"
echo "please report bugs"
echo ""