-
-
Notifications
You must be signed in to change notification settings - Fork 61
/
configure.in
3310 lines (2758 loc) · 90.6 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
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
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
dnl Process this file with autoconf to produce a configure script.
AC_INIT(include/directfb.h)
AC_PREREQ(2.52)
#
# Making releases:
# DIRECTFB_MICRO_VERSION += 1;
# DIRECTFB_INTERFACE_AGE += 1;
# DIRECTFB_BINARY_AGE += 1;
# if any functions have been added, set DIRECTFB_INTERFACE_AGE to 0.
# if backwards compatibility has been broken,
# set DIRECTFB_BINARY_AGE and DIRECTFB_INTERFACE_AGE to 0.
#
#
DIRECTFB_MAJOR_VERSION=1
DIRECTFB_MINOR_VERSION=8
DIRECTFB_MICRO_VERSION=0
DIRECTFB_INTERFACE_AGE=0
DIRECTFB_BINARY_AGE=0
DIRECTFB_VERSION=$DIRECTFB_MAJOR_VERSION.$DIRECTFB_MINOR_VERSION.$DIRECTFB_MICRO_VERSION
#fluxcomp 1.4.2
FLUXCOMP_REQUIRED_VERSIONCODE=1004002
AC_SUBST(DIRECTFB_MAJOR_VERSION)
AC_SUBST(DIRECTFB_MINOR_VERSION)
AC_SUBST(DIRECTFB_MICRO_VERSION)
AC_SUBST(DIRECTFB_INTERFACE_AGE)
AC_SUBST(DIRECTFB_BINARY_AGE)
AC_SUBST(DIRECTFB_VERSION)
AC_DEFINE_UNQUOTED(DIRECTFB_VERSION,"$DIRECTFB_VERSION",[The DirectFB version])
#
# DirectFB Vendor Version:
#
DIRECTFB_VERSION_VENDOR=$DIRECTFB_VERSION_VENDOR
AC_SUBST(DIRECTFB_VERSION_VENDOR)
AC_DEFINE_UNQUOTED(DIRECTFB_VERSION_VENDOR,"$DIRECTFB_VERSION_VENDOR",[Vendor specific version])
# libtool versioning
LT_RELEASE=$DIRECTFB_MAJOR_VERSION.$DIRECTFB_MINOR_VERSION
LT_CURRENT=`expr $DIRECTFB_MICRO_VERSION - $DIRECTFB_INTERFACE_AGE`
LT_BINARY=`expr $DIRECTFB_MICRO_VERSION - $DIRECTFB_BINARY_AGE`
LT_REVISION=$DIRECTFB_INTERFACE_AGE
LT_AGE=`expr $DIRECTFB_BINARY_AGE - $DIRECTFB_INTERFACE_AGE`
AC_SUBST(LT_RELEASE)
AC_SUBST(LT_CURRENT)
AC_SUBST(LT_BINARY)
AC_SUBST(LT_REVISION)
AC_SUBST(LT_AGE)
# The earliest version that this release has binary compatibility with.
# This is used for module locations.
BINARY_VERSION=$DIRECTFB_MAJOR_VERSION.$DIRECTFB_MINOR_VERSION-$LT_BINARY
VERSION=$DIRECTFB_VERSION
PACKAGE=DirectFB
AC_CANONICAL_HOST
AC_CANONICAL_TARGET
AM_INIT_AUTOMAKE($PACKAGE, $VERSION, no-define)
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
PKG_PROG_PKG_CONFIG
AC_CONFIG_HEADER([config.h])
AM_MAINTAINER_MODE
AC_DISABLE_STATIC
case x"$target" in
xNONE | x)
target_or_host="$host" ;;
*)
target_or_host="$target" ;;
esac
case "$target_or_host" in
*-cygwin)
dnl AC_ENABLE_STATIC
dnl AC_DISABLE_SHARED
;;
esac
AC_PROG_CC
AC_PROG_CXX
AM_PROG_CC_C_O
AC_PROG_CXX
ifdef([AM_PROG_AS],[AM_PROG_AS],[])
AM_PROG_LIBTOOL
AM_SANITY_CHECK
AC_SUBST(LD)
AC_ISC_POSIX
AC_PROG_INSTALL
AC_PROG_MAKE_SET
AC_HEADER_STDC
AC_C_BIGENDIAN
AC_CHECK_SIZEOF(int)
AC_CHECK_SIZEOF(long)
AC_CHECK_SIZEOF(long long)
AC_CHECK_FUNCS(fork)
## Work around libstuhl during cross build...
if test "$host" != "$build"; then
sys_lib_dlsearch_path_spec=""
sys_lib_search_path_spec=""
fi
AC_PATH_PROGS(PERL, perl5 perl)
AC_PATH_PROG(MAN2HTML, man2html, no)
AC_SUBST(MAN2HTML)
AM_CONDITIONAL(HAVE_MAN2HTML, test "$MAN2HTML" != "no")
AC_PATH_TOOL(FLUXCOMP, fluxcomp)
AC_SUBST(FLUXCOMP)
if test -z "$FLUXCOMP"; then
if ! test -e $srcdir/src/core/CoreDFB.cpp; then
AC_MSG_ERROR([
*** DirectFB compilation requires fluxcomp ***
Unless you are compiling from a distributed tarball you need fluxcomp
available from git://git.directfb.org/git/directfb/core/flux installed
in your PATH.
])
fi
else
FLUXCOMP_VERSIONCODE=`$FLUXCOMP -V`
if test $FLUXCOMP_VERSIONCODE -lt $FLUXCOMP_REQUIRED_VERSIONCODE ; then
AC_MSG_ERROR([
*** DirectFB compilation requires a newer fluxcomp ***
available from git://git.directfb.org/git/directfb/core/flux
])
fi
fi
AC_PATH_TOOL(WAYLAND_SCANNER, wayland-scanner)
AC_SUBST(WAYLAND_SCANNER)
if test "$enable_wayland" = "yes" && test -z "$WAYLAND_SCANNER"; then
if ! test -e $srcdir/lib/wayland-dfb/wayland-dfb-server-protocol.h; then
AC_MSG_ERROR([
*** DirectFB compilation requires wayland-scanner ***
Unless you are compiling from a distributed tarball you need wayland-scanner
available from git://anongit.freedesktop.org/wayland/wayland installed
in your PATH.
])
fi
fi
dnl Test for OSX
AC_ARG_ENABLE(osx,
AC_HELP_STRING([--enable-osx],
[build with Mac OS X support @<:@default=auto@:>@]),
[], [enable_osx=yes])
if test "$enable_osx" = "yes"; then
AC_CHECK_HEADER(Carbon/Carbon.h, osx_found=yes, osx_found=no)
if test "$osx_found" = no; then
enable_osx=no
AC_MSG_WARN([
*** no Carbon/Carbon.h found -- building without Mac OS X support.])
else
OSX_LIBS="-framework Carbon"
fi
fi
AM_CONDITIONAL(OSX_CORE, test "$enable_osx" = "yes")
dnl Test for X11
AC_ARG_ENABLE(x11,
AC_HELP_STRING([--enable-x11],
[build with X11 support @<:@default=auto@:>@]),
[], [enable_x11=yes])
if test "$enable_x11" = "yes"; then
PKG_CHECK_MODULES([X11], [xproto x11 xext], [enable_x11="yes"], [enable_x11="no"
AC_MSG_WARN([*** no X11 found -- building without X11 support])])
fi
AM_CONDITIONAL(X11_CORE, test "$enable_x11" = "yes")
dnl Test for X11VDPAU
AC_ARG_ENABLE(x11vdpau,
AC_HELP_STRING([--enable-x11vdpau],
[build with X11/VDPAU support @<:@default=auto@:>@]),
[], [enable_x11vdpau=yes])
if test "$enable_x11vdpau" = "yes"; then
PKG_CHECK_MODULES([X11VDPAU], [xproto x11 xext vdpau], [enable_x11vdpau="yes"], [enable_x11vdpau="no"
AC_MSG_WARN([*** no X11/VDPAU found -- building without X11/VDPAU support])])
fi
AM_CONDITIONAL(X11VDPAU_CORE, test "$enable_x11vdpau" = "yes")
AC_CHECK_HEADERS(linux/compiler.h linux/unistd.h asm/page.h signal.h execinfo.h)
dnl Clear default CFLAGS
if test x"$CFLAGS" = x"-g -O2"; then
CFLAGS=
fi
CFLAGS="-ffast-math -pipe $CFLAGS"
DFB_INTERNAL_CFLAGS="-D_GNU_SOURCE $DFB_INTERNAL_CFLAGS"
AC_ARG_ENABLE(extra-warnings,
AC_HELP_STRING([--enable-extra-warnings],
[enable extra warnings @<:@default=no@:>@]),
[], [enable_extra_warnings=no])
if test "$enable_extra_warnings" = "yes"; then
CFLAGS="-W -Wno-sign-compare -Wno-unused-parameter -Wundef -Wcast-qual -Wcast-align -Waggregate-return -Wmissing-declarations -Winline $CFLAGS"
fi
# FIXME
#if test "$GCC" = "yes"; then
# CFLAGS="-Wall -Wno-strict-aliasing $CFLAGS"
#fi
if test "$GCC" = "yes"; then
CFLAGS_STD="-std=gnu99"
fi
#
# check target architecture
#
have_x86=no
have_x86_64=no
have_arm=no
have_mips=no
have_ppc=no
have_sh=no
have_sh3=no
have_sh4=no
case "$target_or_host" in
i*86-*-*)
have_x86=yes
AC_DEFINE(ARCH_X86,1,[Define to 1 if you are compiling for ix86.])
;;
x86_64-*)
have_x86=yes
have_x86_64=yes
AC_DEFINE(ARCH_X86_64,1,[Define to 1 if you are compiling for AMD64.])
;;
*arm*)
have_arm=yes
AC_DEFINE(ARCH_ARM,1,[Define to 1 if you are compiling for ARM.])
if test -n "`echo $CFLAGS | grep 'march=armv7\-a'`"; then
AC_DEFINE(ARCH_ARMv7,1,[Define to 1 if you are compiling for ARMv7.])
fi
;;
*mips*)
have_mips=yes
AC_DEFINE(ARCH_MIPS,1,[Define to 1 if you are compiling for MIPS.])
;;
ppc-*-linux* | powerpc-*)
have_ppc=yes
AC_DEFINE(ARCH_PPC,1,[Define to 1 if you are compiling for PowerPC.])
;;
sh3-*)
have_sh=yes
have_sh3=yes
AC_DEFINE(ARCH_SH,1,[Define to 1 if you are compiling for SuperH.])
AC_DEFINE(ARCH_SH3,1,[Define to 1 if you are compiling for SH3.])
;;
sh4-* | sh-*)
have_sh=yes
have_sh4=yes
AC_DEFINE(ARCH_SH,1,[Define to 1 if you are compiling for SuperH.])
AC_DEFINE(ARCH_SH4,1,[Define to 1 if you are compiling for SH4.])
;;
*)
;;
esac
have_linux=no
have_cygwin=no
have_kos=no
need_libc_r=no
need_libdl=yes
need_librt=no
want_ppcasm=yes
want_armasm=yes
case "$target_or_host" in
*-*linux*)
have_linux=yes
need_librt=yes
;;
*-cygwin)
have_cygwin=yes
need_libdl=no
;;
*-freebsd*)
need_libc_r=yes
need_libdl=no
want_ppcasm=yes
want_armasm=yes
CPPFLAGS="$CPPFLAGS -I/usr/local/include"
LDFLAGS="$LDFLAGS -L/usr/local/lib"
;;
*-openbsd*)
need_libc_r=yes
need_libdl=no
want_ppcasm=no
want_armasm=no
CPPFLAGS="$CPPFLAGS -I/usr/local/include"
LDFLAGS="$LDFLAGS -L/usr/local/lib"
;;
*-netbsd*)
need_libc_r=no
need_libdl=no
want_ppcasm=yes
want_armasm=yes
CPPFLAGS="$CPPFLAGS -I/usr/pkg/include"
LDFLAGS="$LDFLAGS -L/usr/pkg/lib"
;;
*-darwin*)
need_libc_r=no
need_libdl=yes
want_ppcasm=no
want_armasm=no
CPPFLAGS="$CPPFLAGS -I/sw/include"
LDFLAGS="$LDFLAGS -L/sw/lib"
;;
sh-*-elf)
if test "$CC" = "kos-cc"; then
need_libc_r=no
need_libdl=no
have_kos=yes
fi
;;
esac
AM_CONDITIONAL(HAVE_LINUX, test "$have_linux" = "yes")
AM_CONDITIONAL(BUILDPPCASM, test "$have_ppc" = "yes" && test "$want_ppcasm" = "yes")
if test "$have_ppc" = "yes" && test "$want_ppcasm" = "yes"; then
AC_DEFINE(USE_PPCASM,1,[Define to 1 if ppc assembly is available.])
fi
AM_CONDITIONAL(BUILDARMASM, test "$have_arm" = "yes" && test "$want_armasm" = "yes")
if test "$have_arm" = "yes" && test "$want_armasm" = "yes"; then
AC_DEFINE(USE_ARMASM,1,[Define to 1 if arm assembly is available.])
fi
if test "$have_kos" = "yes"; then
AC_DEFINE(USE_KOS,1,[Define to 1 if compiling on KallistiOS.])
fi
dnl Threads
THREADFLAGS="-D_REENTRANT"
if test "$have_kos" = "no"; then
if test "$need_libc_r" = "yes"; then
AC_CHECK_LIB(c_r, pthread_attr_init, ,
AC_MSG_ERROR([
*** DirectFB requires phtreads in libc_r.]))
THREADLIB="-lc_r"
else
AC_CHECK_LIB(pthread, pthread_attr_init, ,
AC_MSG_ERROR([
*** DirectFB requires libpthread.]))
THREADLIB="-lpthread"
fi
fi
AC_CHECK_DECLS(PTHREAD_MUTEX_RECURSIVE,,
AC_MSG_WARN([
*** PTHREAD_MUTEX_RECURSIVE is not defined! Dead locks might occur!]), [
#define _GNU_SOURCE
#include <pthread.h>])
AC_CHECK_DECLS(PTHREAD_RECURSIVE_MUTEX_INITIALIZER,,
AC_MSG_WARN([
*** PTHREAD_RECURSIVE_MUTEX_INITIALIZER is not defined! Dead locks might occur!]), [
#define _GNU_SOURCE
#include <pthread.h>])
AC_SUBST(THREADFLAGS)
AC_SUBST(THREADLIB)
CPPFLAGS="$THREADFLAGS $CPPFLAGS"
dnl RT Library
RTLIB=""
if test "$need_librt" = "yes"; then
AC_CHECK_LIB(rt, clock_gettime, ,
AC_MSG_ERROR([
*** DirectFB requires librt.]))
RTLIB="-lrt"
fi
AC_SUBST(RTLIB)
dnl Dynamic Linker
DYNLIB=""
if test "$need_libdl" = "yes"; then
if test "$enable_shared" = "yes"; then
AC_CHECK_LIB(dl, dlopen, ,
AC_MSG_ERROR([
*** DirectFB requires libdl.]))
DYNLIB="-ldl"
fi
fi
AC_SUBST(DYNLIB)
if test "$have_x86" = "yes"; then
##
## HACK HACK HACK automake uses @AS@ like a gcc
##
AS=$CC
ASFLAGS=$CFLAGS
AC_SUBST(AS)
AC_SUBST(ASFLAGS)
AC_DEFINE(HAVE_INB_OUTB_IOPL,1,
[Define to 1 if inb, outb and iopl are available.])
AC_MSG_CHECKING([for sys/io.h])
AC_TRY_COMPILE([#include <sys/io.h>], [char x = inb(0); (void)x;],
AC_DEFINE(HAVE_SYSIO,1,
[Define to 1 if you have the <sys/io.h> header file.])
have_sysio=yes
AC_MSG_RESULT(yes),
AC_MSG_RESULT(no))
else
have_sysio=no
fi
AC_ARG_ENABLE(profiling,
AC_HELP_STRING([--enable-profiling],
[enable profiling support @<:@default=no@:>@]),
[], [enable_profiling=no])
if test "$enable_profiling" = "yes"; then
CFLAGS="$CFLAGS -pg -g3"
else
DFB_CFLAGS_OMIT_FRAME_POINTER="-fomit-frame-pointer"
fi
AC_ARG_ENABLE(debug,
AC_HELP_STRING([--enable-debug],
[enable debugging @<:@default=no@:>@]),
[], [enable_debug=no])
if test "$enable_debug" = "yes"; then
CFLAGS="-g3 -O0 -fno-inline -Wno-inline $CFLAGS"
DIRECT_BUILD_DEBUG=1
else
DIRECT_BUILD_DEBUG=0
fi
AM_CONDITIONAL(ENABLE_DEBUG, test "$enable_debug" = "yes")
AC_SUBST(DIRECT_BUILD_DEBUG)
AC_ARG_ENABLE(debug-support,
AC_HELP_STRING([--enable-debug-support],
[enable debugging support @<:@default=yes@:>@]),
[], [enable_debug_support=yes])
if test "$enable_debug_support" = "yes" || test "$enable_debug" = "yes"; then
enable_debug_support=yes
if test "$enable_debug" = "no"; then
CFLAGS="-g2 $CFLAGS"
fi
CFLAGS="-O3 $CFLAGS"
DIRECT_BUILD_DEBUGS=1
else
CFLAGS="-O3 -g0 $CFLAGS"
DIRECT_BUILD_DEBUGS=0
fi
AM_CONDITIONAL(ENABLE_DEBUGS, test "$enable_debug_support" = "yes")
AC_SUBST(DIRECT_BUILD_DEBUGS)
AC_ARG_ENABLE(trace,
AC_HELP_STRING([--enable-trace],
[enable call tracing @<:@default=no@:>@]),
[], [enable_trace=no])
if test "$enable_trace" = "yes"; then
DFB_INTERNAL_CFLAGS="$DFB_INTERNAL_CFLAGS -finstrument-functions"
DIRECT_BUILD_TRACE=1
else
DIRECT_BUILD_TRACE=0
fi
AM_CONDITIONAL(ENABLE_TRACE, test "$enable_trace" = "yes")
AC_SUBST(DIRECT_BUILD_TRACE)
AC_ARG_ENABLE(text,
AC_HELP_STRING([--enable-text],
[enable text output @<:@default=yes@:>@]),
[], [enable_text=yes])
if test "$enable_text" = "no"; then
DIRECT_BUILD_TEXT=0
else
DIRECT_BUILD_TEXT=1
fi
AC_SUBST(DIRECT_BUILD_TEXT)
AC_ARG_ENABLE(gettid,
AC_HELP_STRING([--enable-gettid],
[enable usage of gettid() @<:@default=yes@:>@]),
[], [enable_gettid=yes])
if test "$enable_gettid" = "no"; then
DIRECT_BUILD_GETTID=0
else
DIRECT_BUILD_GETTID=1
fi
AC_SUBST(DIRECT_BUILD_GETTID)
AC_ARG_ENABLE(network,
AC_HELP_STRING([--enable-network],
[enable network support @<:@default=yes@:>@]),
[], [enable_network=yes])
if test "$enable_network" = "no"; then
DIRECT_BUILD_NETWORK=0
else
DIRECT_BUILD_NETWORK=1
fi
AC_SUBST(DIRECT_BUILD_NETWORK)
AC_CHECK_HEADER(stdbool.h, DIRECT_BUILD_STDBOOL=1, DIRECT_BUILD_STDBOOL=0)
AC_SUBST(DIRECT_BUILD_STDBOOL)
AC_ARG_ENABLE(dynload,
AC_HELP_STRING([--enable-dynload],
[enable dynload support @<:@default=yes@:>@]),
[], [enable_dynload=yes])
if test "$enable_dynload" = "no"; then
DIRECT_BUILD_DYNLOAD=0
else
DIRECT_BUILD_DYNLOAD=1
fi
AC_SUBST(DIRECT_BUILD_DYNLOAD)
AC_ARG_ENABLE(multicore,
AC_HELP_STRING([--enable-multicore],
[enable multicore support @<:@default=yes@:>@]),
[],[enable_multicore=yes])
if test "$enable_multicore" = "no"; then
DIRECT_BUILD_MULTICORE=0
else
DIRECT_BUILD_MULTICORE=1
fi
AC_SUBST(DIRECT_BUILD_MULTICORE)
AC_ARG_ENABLE(gcc-atomics,
AC_HELP_STRING([--enable-gcc-atomics],
[force GCC atomics usage (prefer over arch specific) @<:@default=no@:>@]),
[],[enable_gcc_atomics=no])
if test "$enable_gcc_atomics" = "no"; then
DIRECT_BUILD_GCC_ATOMICS=0
else
DIRECT_BUILD_GCC_ATOMICS=1
fi
AC_SUBST(DIRECT_BUILD_GCC_ATOMICS)
DIRECT_BUILD_OSTYPE=DIRECT_OS_LINUX_GNU_LIBC
AC_SUBST(DIRECT_BUILD_OSTYPE)
AC_ARG_ENABLE(multi,
AC_HELP_STRING([--disable-multi],
[disable multi application core @<:@default=no@:>@]),
[], [enable_multi=no])
if test "$enable_multi" = "yes"; then
FUSION_BUILD_MULTI=1
else
FUSION_BUILD_MULTI=0
enable_multi=no
fi
AC_ARG_ENABLE(multi-kernel,
AC_HELP_STRING([--enable-multi-kernel],
[enable multi app linux fusion kernel device @<:@default=yes@:>@]),
[], [enable_multi_kernel=yes])
if test "$enable_multi" = "yes"; then
dnl Test for Fusion Kernel Device
if test "$enable_multi_kernel" = "yes"; then
AC_CHECK_HEADER( [linux/fusion.h], [], [enable_multi_kernel=no])
if test "$enable_multi_kernel" = "no"; then
AC_MSG_ERROR([
*** Linux-Fusion header not found. Required for --enable-multi-kernel option! *** ])
fi
fi
fi
if test "$enable_multi_kernel" = "yes"; then
FUSION_BUILD_KERNEL=1
else
FUSION_BUILD_KERNEL=0
enable_multi_kernel=no
fi
AC_ARG_ENABLE(one,
AC_HELP_STRING([--enable-one],
[enable One (IPC) @<:@default=no@:>@]),
[], [enable_one=no])
if test "$enable_one" = "yes"; then
DIRECTFB_BUILD_ONE=1
DEP_ONE=one
else
DIRECTFB_BUILD_ONE=0
enable_one=no
DEP_ONE=
fi
AC_ARG_ENABLE(voodoo,
AC_HELP_STRING([--enable-voodoo],
[enable Voodoo (network support) @<:@default=no@:>@]),
[], [enable_voodoo=no])
if test "$enable_voodoo" = "yes"; then
DIRECTFB_BUILD_VOODOO=1
DEP_VOODOO=voodoo
else
DIRECTFB_BUILD_VOODOO=0
enable_voodoo=no
DEP_VOODOO=
fi
AC_ARG_ENABLE(pure_voodoo,
AC_HELP_STRING([--enable-pure-voodoo],
[enable pure Voodoo mode @<:@default=no@:>@]),
[], [enable_pure_voodoo=no])
if test "$enable_pure_voodoo" = "yes"; then
enable_voodoo=yes
DIRECTFB_BUILD_VOODOO=1
DIRECTFB_BUILD_PURE_VOODOO=1
DEP_VOODOO=voodoo
enable_multi=no
DIRECTFB_BUILD_ONE=0
enable_one=no
FUSION_BUILD_MULTI=0
FUSION_BUILD_KERNEL=0
else
DIRECTFB_BUILD_PURE_VOODOO=0
enable_pure_voodoo=no
fi
AC_ARG_ENABLE(divine,
AC_HELP_STRING([--enable-divine],
[enable DiVine @<:@default=no@:>@]),
[], [enable_divine=no])
AC_ARG_ENABLE(sawman,
AC_HELP_STRING([--enable-sawman],
[enable SaWMan (window manager and application mananger) @<:@default=no@:>@]),
[], [enable_sawman=no])
AC_ARG_ENABLE(fusiondale,
AC_HELP_STRING([--enable-fusiondale],
[enable FusionDale @<:@default=no@:>@]),
[], [enable_fusiondale=no])
AC_ARG_ENABLE(fusionsound,
AC_HELP_STRING([--enable-fusionsound],
[enable FusionSound @<:@default=no@:>@]),
[], [enable_fusionsound=no])
if test "$enable_fusionsound" = "yes"; then
AC_DEFINE(HAVE_FUSIONSOUND,1,[Define to 1 if you want FusionSound support.])
fi
#
# fusionsound options
#
AC_ARG_ENABLE(fs-ieee-floats,
AC_HELP_STRING([--enable-fs-ieee-floats],
[enable using IEEE floats for internal mixing routines @<:@default=no@:>@]),
[], [enable_fs_ieee_floats=no])
if test "x$enable_fs_ieee_floats" = xyes; then
AC_DEFINE(FS_USE_IEEE_FLOATS,1,[Define to 1 to enable IEEE floats for mixing routines.])
fi
AC_ARG_ENABLE(fs-precision,
AC_HELP_STRING([--enable-fs-precision],
[privilege precision over speed @<:@default=auto@:>@]),
[], [enable_fs_precision=auto])
if test "x$enable_fs_precision" = xauto; then
if test "x$have_x86" = xyes || test "x$have_ppc" = xyes; then
enable_fs_precision=yes
else
enable_fs_precision=no
fi
fi
if test "x$enable_fs_precision" = xyes; then
AC_DEFINE(FS_ENABLE_PRECISION,1,[Define to 1 to enable precision.])
fi
AC_ARG_ENABLE(fs-linear-filter,
AC_HELP_STRING([--enable-fs-linear-filter],
[enable linear filtering @<:@default=yes@:>@]),
[], [enable_fs_linear_filter=yes])
if test "x$enable_fs_linear_filter" = xyes; then
AC_DEFINE(FS_ENABLE_LINEAR_FILTER,1,[Define to 1 to enable linear filter.])
fi
AC_ARG_ENABLE(fs-multichannel,
AC_HELP_STRING([--disable-fs-multichannel],
[disable support for more than 2 channels @<:@default=no@:>@]),
[], [enable_fs_multichannel=yes])
if test "x$enable_fs_multichannel" = xyes; then
FS_MAX_CHANNELS=6
else
FS_MAX_CHANNELS=2
fi
AC_SUBST(FS_MAX_CHANNELS)
# Check for fusionsound drivers
#
fsdriver_oss=no
fsdriver_alsa=no
fsdriver_wave=no
AC_MSG_CHECKING(which fusionsound drivers should be built)
AC_ARG_WITH(fs-drivers,
AC_HELP_STRING([--with-fs-drivers=LIST],
[LIST is a comma separated selection of fusionsound drivers]
[to build. Possible drivers are: all (builds all]
[drivers), none (builds none), oss, alsa, wave.]
[@<:@default=all@:>@]),
[fsdrivers="$withval"], [fsdrivers=all])
if test "$fsdrivers" = "all"; then
checkfor_oss=yes
checkfor_alsa=yes
checkfor_wave=yes
else
if test "$fsdrivers" != "none"; then
fsdrivers=`echo $fsdrivers | sed 's/,/ /g'`
for fsdriver in $fsdrivers
do
case "$fsdriver" in
oss)
checkfor_oss=yes
;;
alsa)
checkfor_alsa=yes
;;
wave)
checkfor_wave=yes
;;
*)
;;
esac
done
fi
fi
AC_MSG_RESULT($fsdrivers)
if test "x$checkfor_oss" = "xyes"; then
AC_CHECK_HEADER( [sys/soundcard.h], fsdriver_oss=yes, fsdriver_oss=no
AC_MSG_WARN([*** OSS driver will not be built.]))
fi
if test "x$checkfor_alsa" = "xyes"; then
AC_MSG_CHECKING(for alsa >= 0.9)
if $PKG_CONFIG --atleast-version 0.9 alsa; then
ALSA_CFLAGS=`$PKG_CONFIG --cflags alsa`
ALSA_LIBS=`$PKG_CONFIG --libs alsa`
fsdriver_alsa=yes
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
fi
fi
if test "x$checkfor_wave" = "xyes"; then
fsdriver_wave=yes
fi
AC_SUBST(ALSA_CFLAGS)
AC_SUBST(ALSA_LIBS)
AM_CONDITIONAL(BUILD_OSS, test "x$fsdriver_oss" = "xyes")
AM_CONDITIONAL(BUILD_ALSA, test "x$fsdriver_alsa" = "xyes")
AM_CONDITIONAL(BUILD_WAVE, test "x$fsdriver_wave" = "xyes")
# fusionsound music providers
#
# Check for Timidity
#
timidity="no"
AC_ARG_WITH(timidity,
AC_HELP_STRING([--with-timidity],
[build Timidity music provider @<:@default=yes@:>@]),
[], [with_timidity=yes])
if test "x$with_timidity" = "xyes"; then
AC_MSG_CHECKING([for libtimidity >= 0.1.0])
if $PKG_CONFIG --atleast-version=0.1.0 libtimidity; then
AC_MSG_RESULT(yes)
timidity="yes"
TIMIDITY_CFLAGS=`$PKG_CONFIG --cflags libtimidity`
TIMIDITY_LIBS=`$PKG_CONFIG --libs libtimidity`
else
AC_MSG_RESULT(no)
AC_MSG_WARN([
*** libtimidity is required - Timidity music provider will not be built.])
fi
fi
AC_SUBST(TIMIDITY_CFLAGS)
AC_SUBST(TIMIDITY_LIBS)
AM_CONDITIONAL(BUILD_TIMIDITY, test "x$timidity" = "xyes")
#
# Check for Wave
#
AC_ARG_WITH(wave,
AC_HELP_STRING([--with-wave],
[build Wave music provider @<:@default=yes@:>@]),
[if test $fsdriver_wave != yes ; then
with_wave="$withval"
else
with_wave=yes
fi], [with_wave=yes])
AM_CONDITIONAL(BUILD_WAVE, test "x$with_wave" = "xyes")
#
# Check for Vorbis
#
vorbis="no"
tremor="no"
AC_ARG_WITH(vorbis,
AC_HELP_STRING([--with-vorbis],
[build Ogg/Vorbis music provider @<:@default=yes@:>@]),
[], [with_vorbis=yes])
AC_ARG_WITH(tremor,
AC_HELP_STRING([--with-tremor],
[build Ogg/Vorbis music provider using Tremor @<:@default=no@:>@]),
[], [with_tremor=no])
if test "x$with_vorbis" = "xyes"; then
if test "x$with_tremor" = "xyes"; then
AC_CHECK_HEADER(tremor/ivorbiscodec.h,
AC_CHECK_LIB(vorbisidec, ov_clear, tremor="yes", ), )
if test "x$tremor" = "xyes"; then
vorbis="yes"
VORBISFILE_CFLAGS=""
VORBISFILE_LIBS="-lvorbisidec"
AC_DEFINE(USE_TREMOR,1,[Define to 1 to use Tremor Ogg/Vorbis decoder.])
else
AC_MSG_WARN([
*** Tremor is required - Ogg/Vorbis music provider will not be built.])
fi
else
VORBIS_REQUIRED_VERSION=1.0.0
AC_MSG_CHECKING(for vorbisfile >= $VORBIS_REQUIRED_VERSION)
if $PKG_CONFIG --atleast-version $VORBIS_REQUIRED_VERSION vorbisfile; then
vorbis="yes"
VORBISFILE_CFLAGS=`$PKG_CONFIG --cflags vorbisfile`
VORBISFILE_LIBS=`$PKG_CONFIG --libs vorbisfile`
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
AC_MSG_WARN([
*** vorbisfile $VORBIS_REQUIRED_VERSION or newer is required - Ogg/Vorbis music provider will not be built.])
fi
fi
fi
AC_SUBST(VORBISFILE_CFLAGS)
AC_SUBST(VORBISFILE_LIBS)
AM_CONDITIONAL(BUILD_VORBIS, test "x$vorbis" = "xyes")
#
# Check for MAD
#
mad="no"
AC_ARG_WITH(mad,
AC_HELP_STRING([--with-mad],
[build MAD MP3 music provider @<:@default=yes@:>@]),
[], [with_mad=yes])
if test "x$with_mad" = "xyes"; then
AC_CHECK_LIB(mad, mad_timer_add, mad="yes", mad="no")
if test "x$mad" = "xyes"; then
AC_CHECK_HEADER(mad.h, mad="yes", mad="no")
if test "x$mad" = "xno"; then
AC_MSG_WARN([
*** MAD header not found - MAD music provider will not be built.])
else
MAD_LIBS="-lmad"
fi
else
AC_MSG_WARN([
*** MAD library not found - MAD music provider will not be built.])
fi
fi
AC_SUBST(MAD_LIBS)
AM_CONDITIONAL(BUILD_MAD, test "x$mad" = "xyes")
#
# Check for CD-DA
#
cdda="no"
AC_ARG_WITH(cdda,
AC_HELP_STRING([--with-cdda],
[build CD-DA music provider @<:@default=yes@:>@]),
[], [with_cdda=yes])
if test "x$with_cdda" = "xyes"; then
cdda="yes"
if $PKG_CONFIG --atleast-version 1.0.0 libcddb; then
AC_DEFINE(HAVE_CDDB,1,[Define to 1 if you have libcddb.])
CDDB_CFLAGS=`$PKG_CONFIG --cflags libcddb`
CDDB_LIBS=`$PKG_CONFIG --libs libcddb`
else
AC_MSG_WARN([
*** libcddb 1.0.0 or newer not found - CD-DA Music Provider will be built without CDDB support.])
fi
fi
AC_SUBST(CDDB_CFLAGS)
AC_SUBST(CDDB_LIBS)
AM_CONDITIONAL(BUILD_CDDA, test "x$cdda" = "xyes")
#
# Check for Playlist
#
AC_ARG_WITH(playlist,
AC_HELP_STRING([--with-playlist],
[build Playlist music provider @<:@default=yes@:>@]),
[], [with_playlist=yes])
AM_CONDITIONAL(BUILD_PLAYLIST, test "x$with_playlist" = "xyes")