-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfigure.ac
1664 lines (1476 loc) · 51.4 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
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
##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
m4_define([v_maj], [0])
m4_define([v_min], [9])
m4_define([v_mic], [9])
m4_define([v_rev], m4_esyscmd([(svnversion "${SVN_REPO_PATH:-.}" | grep -v export || echo 0) | awk -F : '{printf("%s\n", $1);}' | tr -d ' :MSP\n']))
m4_if(v_rev, [0], [m4_define([v_rev], m4_esyscmd([git log 2> /dev/null | (grep -m1 git-svn-id || echo 0) | sed -e 's/.*@\([0-9]*\).*/\1/' | tr -d '\n']))])
##-- When released, remove the dnl on the below line
dnl m4_undefine([v_rev])
##-- When doing snapshots - change soname. remove dnl on below line
m4_define([relname], [ver-svn-06])
m4_define([v_rel], [-release relname])
##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
m4_ifdef([v_rev], [m4_define([v_ver], [v_maj.v_min.v_mic.v_rev])],
[m4_define([v_ver], [v_maj.v_min.v_mic])])
m4_define([lt_rev], m4_eval(v_maj + v_min))
m4_define([lt_cur], v_mic)
m4_define([lt_age], v_min)
##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
# rw_PROG_OBJC_WORKS
# Check whether the Objective C compiler works.
AC_DEFUN([rw_PROG_OBJC_WORKS],
[AC_REQUIRE([AC_PROG_OBJC])dnl
AC_CACHE_CHECK([whether the Objective C compiler works],
[rw_cv_prog_objc_works],
[AC_LANG_PUSH([Objective C])
AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])],
[rw_cv_prog_objc_works=yes],
[rw_cv_prog_objc_works=no])
AC_LANG_POP([Objective C])])
])
AC_INIT([evas], [v_ver], [[email protected]])
AC_PREREQ([2.52])
AC_CONFIG_SRCDIR([configure.ac])
AC_CONFIG_MACRO_DIR([m4])
AC_CANONICAL_BUILD
AC_CANONICAL_HOST
AC_ISC_POSIX
AM_INIT_AUTOMAKE([1.6 dist-bzip2])
AM_CONFIG_HEADER([config.h])
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
AC_LIBTOOL_WIN32_DLL
define([AC_LIBTOOL_LANG_F77_CONFIG], [:])dnl
AC_PROG_LIBTOOL
##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
m4_ifdef([v_rev], , [m4_define([v_rev], [0])])
m4_ifdef([v_rel], , [m4_define([v_rel], [])])
AC_DEFINE_UNQUOTED(VMAJ, [v_maj], [Major version])
AC_DEFINE_UNQUOTED(VMIN, [v_min], [Minor version])
AC_DEFINE_UNQUOTED(VMIC, [v_mic], [Micro version])
AC_DEFINE_UNQUOTED(VREV, [v_rev], [Revison])
version_info="lt_rev:lt_cur:lt_age"
release_info="v_rel"
AC_SUBST(version_info)
AC_SUBST(release_info)
##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
EFL_CHECK_PATH_MAX
### Needed information
case "$host_os" in
mingw32ce* | cegcc*)
MODULE_ARCH="$host_os-$host_cpu"
;;
*)
MODULE_ARCH="$host_os-$host_cpu-relname"
;;
esac
AC_SUBST(MODULE_ARCH)
AC_DEFINE_UNQUOTED(MODULE_ARCH, "$MODULE_ARCH", "Module architecture")
# weird debian etch bug where pthread_barrier doesn't work without adding
# this.
CFLAGS="${CFLAGS=} -D_GNU_SOURCE"
AC_SUBST(CFLAGS)
want_fontconfig="auto"
want_fribidi="auto"
want_evas_cserve="yes"
want_evas_engine_buffer="yes"
want_evas_engine_software_xlib="no"
want_evas_engine_xrender_x11="no"
want_evas_engine_gl_x11="no"
want_evas_engine_gl_sdl="no"
want_evas_engine_cairo_x11="no"
want_evas_engine_software_xcb="no"
want_evas_engine_xrender_xcb="no"
want_evas_engine_software_gdi="no"
want_evas_engine_software_ddraw="no"
want_evas_engine_direct3d="no"
want_evas_engine_quartz="no"
want_evas_engine_gl_glew="no"
want_evas_engine_software_sdl="no"
want_evas_engine_fb="no"
want_evas_engine_directfb="no"
want_evas_engine_software_qtopia="no"
want_evas_engine_software_8_x11="no"
want_evas_engine_software_16_x11="no"
want_evas_engine_software_16_ddraw="no"
want_evas_engine_software_16_wince="no"
want_evas_image_loader_edb="yes"
want_evas_image_loader_eet="yes"
want_evas_image_loader_gif="yes"
want_evas_image_loader_jpeg="yes"
want_evas_image_loader_pmaps="yes"
want_evas_image_loader_png="yes"
want_evas_image_loader_svg="yes"
want_evas_image_loader_tiff="yes"
want_evas_image_loader_xpm="yes"
want_evas_image_loader_bmp="yes"
want_evas_image_loader_tga="yes"
want_evas_font_loader_eet="yes"
case "$host_os" in
mingw32ce* | cegcc*)
want_fontconfig="no"
want_evas_engine_software_16_wince="yes"
want_evas_image_loader_edb="no"
want_evas_image_loader_gif="no"
want_evas_image_loader_svg="no"
want_evas_image_loader_tiff="no"
;;
mingw*)
want_evas_engine_software_gdi="yes"
want_evas_engine_software_ddraw="yes"
want_evas_engine_direct3d="yes"
want_evas_engine_software_16_ddraw="yes"
want_evas_image_loader_edb="no"
want_evas_image_loader_svg="no"
;;
darwin*)
want_evas_engine_software_xlib="auto"
want_evas_engine_quartz="auto"
;;
*)
want_evas_engine_software_xlib="auto"
want_evas_engine_xrender_x11="auto"
want_evas_engine_software_8_x11="auto"
want_evas_engine_software_16_x11="auto"
;;
esac
requirement_evas=""
### Additional options to configure
# when used, that option makes configure script fails when
# a requirement is selected, but not met.
use_strict="no"
AC_ARG_ENABLE([strict],
AC_HELP_STRING([--enable-strict], [enable strict checking mode. @<:@default==disabled@:>@]),
[use_strict="yes"],
[use_strict="no"])
# Simple X11 build/link
AC_ARG_ENABLE([simple-x11],
AC_HELP_STRING([--enable-simple-x11], [enable simple x11 linking]),
[
if test "x${enableval}" = "xyes" ; then
want_evas_simple_x11="yes"
else
want_evas_simple_x11="no"
fi
])
### Checks for programs
m4_ifdef([AC_PROG_OBJC],
[
AC_PROG_OBJC
_AM_DEPENDENCIES(OBJC)
],
[
AC_CHECK_TOOL([OBJC], [gcc])
AC_SUBST([OBJC])
AC_SUBST([OBJCFLAGS])
])
rw_PROG_OBJC_WORKS
AC_PROG_CXX
AC_PROG_CC
# pkg-config
PKG_PROG_PKG_CONFIG
# Check whether pkg-config supports Requires.private
if $PKG_CONFIG --atleast-pkgconfig-version 0.22; then
pkgconfig_requires_private="Requires.private"
else
pkgconfig_requires_private="Requires"
fi
AC_SUBST(pkgconfig_requires_private)
# doxygen program for documentation building
EFL_CHECK_DOXYGEN([build_doc="yes"], [build_doc="no"])
### Checks for libraries
# Evil library for compilation on Windows CE
case "$host_os" in
mingw* | cegcc*)
PKG_CHECK_MODULES([EVIL], [evil])
AC_DEFINE(HAVE_EVIL, 1, [Set to 1 if evil package is installed])
requirement_evas="evil ${requirement_evas}"
;;
esac
## strong dependencies
# Eina
PKG_CHECK_MODULES([EINA], [eina-0])
# Freetype
PKG_CHECK_MODULES([FREETYPE], [freetype2 >= 9.3.0])
requirement_evas="freetype2 eina-0 ${requirement_evas}"
## optional dependencies
# FontConfig
have_fontconfig="no"
AC_ARG_ENABLE([fontconfig],
AC_HELP_STRING([--disable-fontconfig],
[disable fontconfig for finding fonts. @<:@default=enabled@:>@]),
[
if test "x${enableval}" = "xyes" ; then
want_fontconfig="yes"
else
want_fontconfig="no"
fi
])
if test "x${want_fontconfig}" = "xyes" -o "x${want_fontconfig}" = "xauto" ; then
PKG_CHECK_MODULES([FONTCONFIG],
[fontconfig],
[
have_fontconfig="yes"
AC_DEFINE(HAVE_FONTCONFIG, 1, [have fontconfig searching capabilities])
requirement_evas="fontconfig ${requirement_evas}"
],
[
if test "x${want_fontconfig}" = "xyes" -a "x${use_strict}" = "xyes" ; then
AC_MSG_ERROR([Fontconfig not found (strict dependencies checking)])
fi
])
fi
# fribidi support
have_fribidi="no"
AC_ARG_ENABLE([fribidi],
AC_HELP_STRING([--disable-fribidi],
[disable bidirectional text support. @<:@default=enabled@:>@]),
[
if test "x${enableval}" = "xyes" ; then
want_fribidi="yes"
else
want_fribidi="no"
fi
])
if test "x${want_fribidi}" = "xyes" -o "x${want_fribidi}" = "xauto" ; then
PKG_CHECK_MODULES([FRIBIDI],
[fribidi],
[
have_fribidi="yes"
AC_DEFINE(HAVE_FRIBIDI, 1, [have fribidi support])
requirement_evas="fribidi ${requirement_evas}"
],
[
if test "x$want_fribidi" = "xyes" -a "x$use_strict" = "xyes" ; then
AC_MSG_ERROR([Fribidi not found (strict dependencies checking)])
fi
])
fi
if test "x${have_fribidi}" = "xno"; then
HAS_BIDI=0
fi
### Checks for header files
AC_HEADER_STDC
### Checks for types
### Checks for structures
### Checks for compiler characteristics
AC_C_CONST
AC_C_BIGENDIAN
AC_C___ATTRIBUTE__
AM_PROG_CC_STDC
WIN32_CPPFLAGS=""
case "$host_os" in
mingw32ce* | cegcc*)
WIN32_CPPFLAGS="-D_WIN32_WCE=0x0420"
;;
mingw*)
WIN32_CPPFLAGS="-D_WIN32_WINNT=0x0500"
;;
esac
AC_SUBST(WIN32_CPPFLAGS)
WIN32_CFLAGS=""
case "${host_os}" in
cegcc*)
WIN32_CFLAGS="-mwin32"
;;
esac
AC_SUBST(WIN32_CFLAGS)
### Checks for linker characteristics
lt_enable_auto_import=""
case "${host_os}" in
mingw* | cegcc*)
AC_DEFINE(EFL_EVAS_BUILD, 1, [Define to mention that evas is built])
lt_enable_auto_import="-Wl,--enable-auto-import"
;;
esac
AC_SUBST(lt_enable_auto_import)
### Checks for library functions
# alloca
AC_FUNC_ALLOCA
# fnmatch
EFL_CHECK_FNMATCH([], [AC_MSG_ERROR([Cannot find fnmatch()])])
# dlopen
dlopen_libs=""
case "$host_os" in
mingw32ce* | cegcc*)
# managed by evil
AC_DEFINE(HAVE_DLADDR)
;;
mingw*)
# nothing on mingw platform
;;
*)
AC_CHECK_FUNCS(dlopen, res=yes, res=no)
if test "x$res" = "xyes"; then
AC_CHECK_FUNCS(dladdr, AC_DEFINE(HAVE_DLADDR))
else
AC_CHECK_LIB(dl, dlopen, res=yes, res=no)
if test "x$res" = "xyes"; then
AC_CHECK_LIB(dl, dladdr, AC_DEFINE(HAVE_DLADDR))
dlopen_libs=-ldl
else
AC_MSG_ERROR(Cannot find dlopen)
fi
fi
esac
AC_SUBST(dlopen_libs)
# (shm_open (for cache server)
AC_ARG_ENABLE([evas-cserve],
AC_HELP_STRING([--disable-evas-cserve],
[disable shared cache server support. @<:@default=enabled@:>@]),
[
if test "x${enableval}" = "xyes" ; then
want_evas_cserve="yes"
else
want_evas_cserve="no"
fi
])
AC_MSG_CHECKING(whether to build shared cache server and support)
AC_MSG_RESULT(${want_evas_cserve})
if test "x${want_evas_cserve}" = "xyes" ; then
AC_MSG_CHECKING([whether shm_open() is present])
LIBS_save=${LIBS}
LIBS="${LIBS} -lrt"
AC_LINK_IFELSE(
[AC_LANG_PROGRAM(
[[
#include <sys/types.h>
#include <sys/mman.h>
#include <fcntl.h>
]],
[[
int fd;
fd = shm_open("/", O_RDWR | O_CREAT, S_IRUSR | S_IWUSR);
shm_unlink("/");
]])],
[want_evas_cserve="yes"],
[want_evas_cserve="no"])
LIBS=${LIBS_save}
AC_MSG_RESULT([${want_evas_cserve}])
fi
if test "x${want_evas_cserve}" = "xyes" ; then
AC_DEFINE(EVAS_CSERVE, 1, [Shared caceh server.])
fi
AM_CONDITIONAL([EVAS_CSERVE], [test "x${want_evas_cserve}" = "xyes"])
#######################################
## GL force flavor gles
gl_flavor_gles="no"
AC_MSG_CHECKING(whether to build GLES flavor of GL)
AC_ARG_ENABLE(gl-flavor-gles,
AC_HELP_STRING([--enable-gl-flavor-gles], [enable gles falvor of gl instead of standard]),
[
if test "x$enableval" = "xyes" ; then
AC_MSG_RESULT(yes)
gl_flavor_gles="yes"
else
AC_MSG_RESULT(no)
gl_flavor_gles="no"
fi
], [
AC_MSG_RESULT(no)
gl_flavor_gles="no"
]
)
#######################################
## GLES variety sgx
gles_variety_sgx="no"
AC_MSG_CHECKING(whether to build GLES variety for SGX)
AC_ARG_ENABLE(gles-variety-sgx,
AC_HELP_STRING([--enable-gles-variety-sgx], [GLES variety SGX 3D unit]),
[
if test "x$enableval" = "xyes" ; then
AC_MSG_RESULT(yes)
AC_DEFINE(GLES_VARIETY_SGX, 1, [Imagination SGX GLES2 support])
gles_variety_sgx="yes"
else
AC_MSG_RESULT(no)
gles_variety_sgx="no"
fi
], [
AC_MSG_RESULT(no)
gles_variety_sgx="no"
]
)
#######################################
## GLES variety s3c6410
gles_variety_s3c6410="no"
AC_MSG_CHECKING(whether to build GLES variety for s3c6410)
AC_ARG_ENABLE(gles-variety-s3c6410,
AC_HELP_STRING([--enable-gles-variety-s3c6410], [GLES variety s3c6410 3D unit]),
[
if test "x$enableval" = "xyes" ; then
AC_MSG_RESULT(yes)
AC_DEFINE(GLES_VARIETY_S3C6410, 1, [Samsung S3c6410 GLES2 support])
gles_variety_s3c6410="yes"
else
AC_MSG_RESULT(no)
gles_variety_s3c6410="no"
fi
], [
AC_MSG_RESULT(no)
gles_variety_s3c6410="no"
]
)
#####################################################################
## Engines
EVAS_CHECK_ENGINE([buffer], [${want_evas_engine_buffer}], [no], [Buffer])
EVAS_CHECK_ENGINE([software-xlib], [${want_evas_engine_software_xlib}], [yes], [Software Xlib])
EVAS_CHECK_ENGINE([xrender-x11], [${want_evas_engine_xrender_x11}], [yes], [XRender X11])
EVAS_CHECK_ENGINE([gl-x11], [${want_evas_engine_gl_x11}], [yes], [OpenGL X11])
# disable cairo engine for the release
#EVAS_CHECK_ENGINE([cairo-x11], [${want_evas_engine_cairo_x11}], [yes], [Cairo X11])
EVAS_CHECK_ENGINE([software-xcb], [${want_evas_engine_software_xcb}], [no], [Software XCB])
EVAS_CHECK_ENGINE([xrender-xcb], [${want_evas_engine_xrender_xcb}], [no], [XRender XCB])
EVAS_CHECK_ENGINE([software-gdi], [${want_evas_engine_software_gdi}], [no], [Software GDI])
EVAS_CHECK_ENGINE([software-ddraw], [${want_evas_engine_software_ddraw}], [no], [Software DirectDraw])
EVAS_CHECK_ENGINE([direct3d], [${want_evas_engine_direct3d}], [no], [Direct3D])
EVAS_CHECK_ENGINE([quartz], [${want_evas_engine_quartz}], [no], [Quartz])
EVAS_CHECK_ENGINE([gl-glew], [${want_evas_engine_gl_glew}], [no], [OpenGL Glew])
EVAS_CHECK_ENGINE([software-sdl], [${want_evas_engine_software_sdl}], [no], [Software SDL])
EVAS_CHECK_ENGINE([gl-sdl], [${want_evas_engine_gl_sdl}], [yes], [OpenGL SDL])
EVAS_CHECK_ENGINE([fb], [${want_evas_engine_fb}], [no], [Framebuffer])
EVAS_CHECK_ENGINE([directfb], [${want_evas_engine_directfb}], [no], [DirectFB])
# disable cairo engine for the release
#EVAS_CHECK_ENGINE([software-qtopia], [${want_evas_engine_software_qtopia}], [no], [Qtopia])
EVAS_CHECK_ENGINE([software-8-x11], [${want_evas_engine_software_8_x11}], [yes], [Software X11 8 bits grayscale])
EVAS_CHECK_ENGINE([software-16-x11], [${want_evas_engine_software_16_x11}], [yes], [Software X11 16 bits])
EVAS_CHECK_ENGINE([software-16-ddraw], [${want_evas_engine_software_16_ddraw}], [no], [Software DirectDraw 16 bits])
EVAS_CHECK_ENGINE([software-16-wince], [${want_evas_engine_software_16_wince}], [no], [Software Windows CE 16 bits])
# common cairo
#have_evas_engine_cairo_common="no"
#if test "x${have_evas_engine_cairo_x11}" = "xyes" ; then
# have_evas_engine_cairo_common="yes"
# AC_DEFINE([BUILD_ENGINE_CAIRO_COMMON], [1], [Generic Cairo Rendering Support])
#fi
#AM_CONDITIONAL([BUILD_ENGINE_CAIRO_COMMON], [test "x$have_evas_engine_cairo_common" = "xyes"])
# common gl
have_evas_engine_gl_common="no"
if test "x$have_evas_engine_gl_x11" = "xyes" \
|| test "x$have_evas_engine_gl_x11" = "xstatic" \
|| test "x$have_evas_engine_gl_glew" = "xyes" \
|| test "x$have_evas_engine_gl_glew" = "xstatic" \
|| test "x$have_evas_engine_gl_sdl" = "xyes" \
|| test "x$have_evas_engine_gl_sdl" = "xstatic"; then
have_evas_engine_gl_common="yes"
fi
if test "x$have_evas_engine_gl_common" = "xyes"; then
evas_engine_gl_common_libs=""
AC_DEFINE(BUILD_ENGINE_GL_COMMON, [1], [Generic OpenGL Rendering Support])
fi
AC_SUBST([evas_engine_gl_common_libs])
AM_CONDITIONAL(BUILD_ENGINE_GL_COMMON, [test "x$have_evas_engine_gl_common" = "xyes"])
# gl_sdl
if test "x$have_evas_engine_gl_sdl" = "xyes" || test "x$have_evas_engine_gl_sdl" = "xstatic" ; then
AC_CHECK_DECL(SDL_GL_CONTEXT_MAJOR_VERSION,
[AC_DEFINE(HAVE_SDL_GL_CONTEXT_VERSION, [1], [SDL_GL version attributes present])],,
[#include <SDL/SDL_video.h>])
fi
if test "x$gl_flavor_gles" = "xyes"; then
AC_CHECK_DECL(SDL_OPENGLES,
[AC_DEFINE(HAVE_SDL_FLAG_OPENGLES, [1], [SDL_OPENGLES flag is present])],,
[#include <SDL/SDL_video.h>])
fi
# SDL primitive
sdl_primitive="no"
AC_ARG_ENABLE([sdl-primitive],
[AC_HELP_STRING([--enable-sdl-primitive], [])],
[sdl_primitive=${enableval}]
)
AC_MSG_CHECKING([whether to use SDL primitive when possible])
AC_MSG_RESULT([${sdl_primitive}])
if test "x${sdl_primitive}" = "xyes" ; then
AC_DEFINE([ENGINE_SDL_PRIMITIVE], [1], [Use SDL primitive when possible])
fi
# if software generic need to be build as part of libevas.so
have_static_software_generic="no"
AC_ARG_ENABLE([static-software-generic],
[AC_HELP_STRING([--enable-static-software-generic], [Build software generic engine as part of libevas])],
[have_static_software_generic=${enableval}]
)
AC_MSG_CHECKING([Whether to build software generic engine as part of libevas])
AC_MSG_RESULT([${have_static_software_generic}])
AM_CONDITIONAL(EVAS_STATIC_BUILD_SOFTWARE_GENERIC, test "x${have_static_software_generic}" = "xyes")
if test "x${have_static_software_generic}" = "xyes"; then
AC_DEFINE(EVAS_STATIC_BUILD_SOFTWARE_GENERIC, [1], [Build software generic engine as part of libevas])
fi
# if software_xlib or software_xcb are available, define everything needed for X11
have_evas_engine_software_x11="no"
if test "x$have_evas_engine_software_xlib" = "xstatic" -o "x$have_evas_engine_software_xcb" = "xstatic" ; then
have_evas_engine_software_x11="static"
else
if test "x$have_evas_engine_software_xlib" = "xyes" -o "x$have_evas_engine_software_xcb" = "xyes" ; then
have_evas_engine_software_x11="yes"
fi
fi
if test "x$have_evas_engine_software_xlib" = "xstatic" ; then
have_evas_engine_software_xlib="yes"
fi
if test "x$have_evas_engine_software_xcb" = "xstatic" ; then
have_evas_engine_software_xcb="yes"
fi
if test "x$have_evas_engine_software_x11" = "xyes" -o "x$have_evas_engine_software_x11" = "xstatic" ; then
AC_DEFINE(BUILD_ENGINE_SOFTWARE_X11, [1], [Build software X11 engines])
fi
if test "x$have_evas_engine_software_x11" = "xstatic" ; then
AC_DEFINE(EVAS_STATIC_BUILD_SOFTWARE_X11, [1], [Build software X11 engines as part of libevas])
fi
AM_CONDITIONAL([BUILD_ENGINE_SOFTWARE_X11], [test "x${have_evas_engine_software_x11}" = "xyes" -o "x${have_evas_engine_software_x11}" = "xstatic"])
AM_CONDITIONAL([EVAS_STATIC_BUILD_SOFTWARE_X11], [test "x${have_evas_engine_software_x11}" = "xstatic"])
AC_SUBST(have_evas_engine_software_xlib)
AC_SUBST(have_evas_engine_software_xcb)
# if software 16 x11 is enabled - build software_16 (the generic 16bit
# engine). later enable it fb_16 or other "16" bit engines are enabled.
have_evas_engine_software_16="no"
if test "x$have_evas_engine_software_16_x11" = "xyes" -o "x$have_evas_engine_software_16_x11" = "xstatic"; then
have_evas_engine_software_16="yes"
fi
if test "x$have_evas_engine_software_sdl" = "xyes" -o "x$have_evas_engine_software_sdl" = "xstatic"; then
have_evas_engine_software_16="yes"
fi
if test "x$have_evas_engine_software_16_ddraw" = "xyes" -o "x$have_evas_engine_software_16_ddraw" = "xstatic"; then
have_evas_engine_software_16="yes"
fi
if test "x$have_evas_engine_software_16_wince" = "xyes" -o "x$have_evas_engine_software_16_wince" = "xstatic"; then
have_evas_engine_software_16="yes"
fi
AM_CONDITIONAL(BUILD_ENGINE_SOFTWARE_16, test "x$have_evas_engine_software_16" = "xyes")
# if software 16 need to be build as part of libevas.so
have_static_software_16="no"
AC_ARG_ENABLE([static-software-16],
[AC_HELP_STRING([--enable-static-software-16], [Build software 16 engine as part of libevas])],
[have_static_software_16=${enableval}]
)
AC_MSG_CHECKING([Whether to build software 16 engine as part of libevas])
AC_MSG_RESULT([${have_static_software_16}])
AM_CONDITIONAL(EVAS_STATIC_BUILD_SOFTWARE_16, test "x${have_static_software_16}" = "xyes")
if test "x${have_static_software_16}" = "xyes"; then
AC_DEFINE(EVAS_STATIC_BUILD_SOFTWARE_16, [1], [Build software 16 engine as part of libevas])
fi
# if software 8 x11 is enabled - build software_8 (the generic 8bit
# engine).
have_evas_engine_software_8="no"
if test "x$have_evas_engine_software_8_x11" = "xyes" -o "x$have_evas_engine_software_8_x11" = "xstatic"; then
have_evas_engine_software_8="yes"
fi
AM_CONDITIONAL(BUILD_ENGINE_SOFTWARE_8, test "x$have_evas_engine_software_8" = "xyes")
# if software 8 need to be build as part of libevas.so
have_static_software_8="no"
AC_ARG_ENABLE([static-software-8],
[AC_HELP_STRING([--enable-static-software-8], [Build software 8 engine as part of libevas])],
[have_static_software_8=${enableval}]
)
AC_MSG_CHECKING([Whether to build software 8 engine as part of libevas])
AC_MSG_RESULT([${have_static_software_8}])
AM_CONDITIONAL(EVAS_STATIC_BUILD_SOFTWARE_8, test "x${have_static_software_8}" = "xyes")
if test "x${have_static_software_8}" = "xyes"; then
AC_DEFINE(EVAS_STATIC_BUILD_SOFTWARE_8, [1], [Build software 8 engine as part of libevas])
fi
#####################################################################
## Image loaders
EVAS_CHECK_IMAGE_LOADER([Edb], [${want_evas_image_loader_edb}])
EVAS_CHECK_IMAGE_LOADER([Eet], [${want_evas_image_loader_eet}])
EVAS_CHECK_FONT_LOADER([${want_evas_font_loader_eet}])
EVAS_CHECK_IMAGE_LOADER([Gif], [${want_evas_image_loader_gif}])
have_evas_image_saver_jpeg="no"
EVAS_CHECK_IMAGE_LOADER([Jpeg], [${want_evas_image_loader_jpeg}])
dnl Windows has no sigsetjmp function, nor equivalent.
dnl So we disable the jpeg saver.
dnl TODO: must find a workaround
case "$host_os" in
mingw* | cegcc*)
;;
*)
if test "x${have_evas_image_loader_jpeg}" = "xyes" ; then
have_evas_image_saver_jpeg="yes"
fi
;;
esac
AM_CONDITIONAL([BUILD_SAVER_JPEG], [test "x${have_evas_image_saver_jpeg}" = "xyes"])
EVAS_CHECK_IMAGE_LOADER([PMAPS], [${want_evas_image_loader_pmaps}])
EVAS_CHECK_IMAGE_LOADER([PNG], [${want_evas_image_loader_png}])
EVAS_CHECK_IMAGE_LOADER([SVG], [${want_evas_image_loader_svg}])
EVAS_CHECK_IMAGE_LOADER([Tiff], [${want_evas_image_loader_tiff}])
EVAS_CHECK_IMAGE_LOADER([XPM], [${want_evas_image_loader_xpm}])
EVAS_CHECK_IMAGE_LOADER([BMP], [${want_evas_image_loader_bmp}])
EVAS_CHECK_IMAGE_LOADER([TGA], [${want_evas_image_loader_tga}])
#####################################################################
## Cpu based optimizations
#######################################
## PTHREADS
pthread_cflags=""
pthread_libs=""
build_pthreads="no"
has_pthreads="no"
need_pthreads="no"
# basic pthread support
AC_CHECK_HEADER(pthread.h,
[
has_pthreads="yes"
],
[
has_pthreads="no"
]
)
# sched_getaffinity pthread_attr_setaffinity_np
AC_CHECK_HEADERS(pthread.h sched.h,
[
AC_CHECK_LIB(pthread, pthread_attr_setaffinity_np,
[
AC_CHECK_LIB(pthread, pthread_barrier_wait,
[ build_pthreads="yes" ],
[ build_pthreads="no" ]
)
],
[ build_pthreads="no" ]
)
],
[ build_pthreads="no" ]
)
#######################################
## Pthread
AC_MSG_CHECKING(whether to build pthread code)
AC_ARG_ENABLE(pthreads,
AC_HELP_STRING([--enable-pthreads], [enable threaded rendering]),
[
if test "x$enableval" = "xyes" ; then
if test "x$build_pthreads" = "xyes"; then
AC_MSG_RESULT(yes)
AC_DEFINE(BUILD_PTHREAD, 1, [Build Threaded Rendering])
build_pthreads="yes"
need_pthreads="yes"
else
if "x$use_strict" = "xyes"; then
AC_MSG_ERROR(pthreads headers or functions not found (strict dependencies checking))
else
AC_MSG_RESULT(no: pthread headers or functions not found)
fi
fi
else
AC_MSG_RESULT(no)
build_pthreads="no"
fi
],
[
AC_MSG_RESULT($build_pthreads)
if test "x$build_pthreads" = "xyes" ; then
AC_DEFINE(BUILD_PTHREAD, 1, [Build Threaded Rendering])
need_pthreads="yes"
fi
]
)
#######################################
## Pipe Renderer
build_pipe_render="no"
AC_MSG_CHECKING(whether to build Threaded Pipe Rendering support)
AC_ARG_ENABLE(pipe-render,
AC_HELP_STRING([--enable-pipe-render], [enable threaded pipe rendering support]),
[ build_pipe_render=$enableval ]
)
AC_MSG_RESULT($build_pipe_render)
AC_MSG_CHECKING(whether we can build Threaded Pipe Rendering support)
if test \( "x$build_pipe_render" = "xyes" -o "x$build_pipe_render" = "xauto" \); then
AC_MSG_RESULT(yes)
AC_DEFINE(BUILD_PIPE_RENDER, 1, [Build pipe render support])
build_pipe_render="yes"
need_pthreads="yes"
else
AC_MSG_RESULT(no)
build_pipe_render="no"
fi
#######################################
## Async Renderer
build_async_render="no"
AC_MSG_CHECKING(whether to build Asynchronously Threaded Pipe Rendering support)
AC_ARG_ENABLE(async-render,
AC_HELP_STRING([--enable-async-render], [enable asynchronously threaded pipe rendering support]),
[ build_async_render=$enableval ]
)
AC_MSG_RESULT($build_async_render)
AC_MSG_CHECKING(whether we can build Asynchronously Threaded Pipe Rendering support)
if test \( "x$build_async_render" = "xyes" \); then
AC_MSG_RESULT(yes)
AC_DEFINE(EVAS_FRAME_QUEUING, 1, [Build async render support])
build_async_render="yes"
AC_DEFINE(BUILD_PIPE_RENDER, 1, [Build pipe render support])
build_pipe_render="yes"
need_pthreads="yes"
PKG_CHECK_MODULES([XEXT],
[xext < 1.1.1],
[ build_avoid_libXext_bug=yes ],
[ build_avoid_libXext_bug=no ]
)
if test \( "x$build_avoid_libXext_bug" = "xyes" \); then
AC_DEFINE(LIBXEXT_VERSION_LOW, 1, [To avoid bug on old libXext version])
fi
else
AC_MSG_RESULT(no)
build_async_render="no"
fi
#######################################
## Async events
build_async_events="auto"
AC_MSG_CHECKING(whether to build Async Events support)
AC_ARG_ENABLE(async-events,
AC_HELP_STRING([--enable-async-events], [enable async events support]),
[ build_async_events=$enableval ]
)
AC_MSG_RESULT($build_async_events)
AC_MSG_CHECKING(whether we can build Async Events support)
if test "x$build_async_events" = "xyes" || test "x$build_async_events" = "xauto" ; then
AC_MSG_RESULT(yes)
AC_DEFINE(BUILD_ASYNC_EVENTS, 1, [Build async events support])
build_async_events="yes"
else
AC_MSG_RESULT(no)
build_async_events="no"
fi
#######################################
## Async image preload
build_async_preload="auto"
AC_MSG_CHECKING(whether to build Async Image Preload support)
AC_ARG_ENABLE(async-preload,
AC_HELP_STRING([--enable-async-preload], [enable async image preloading support]),
[ build_async_preload=$enableval ]
)
AC_MSG_RESULT($build_async_preload)
AC_MSG_CHECKING(whether we can build Async Image Preload support)
if test \( "x$build_async_preload" = "xyes" -o "x$build_async_preload" = "xauto" \) -a "x$build_async_events" = "xyes"; then
AC_MSG_RESULT(yes)
AC_DEFINE(BUILD_ASYNC_PRELOAD, 1, [Build async image preload support])
build_async_preload="yes"
need_pthreads="yes"
else
AC_MSG_RESULT(no)
build_async_preload="no"
fi
#######################################
## Link with pthread if needed
AC_MSG_CHECKING(whether we should link with pthread)
if test "x$need_pthreads" = "xyes"; then
AC_MSG_RESULT(yes)
pthread_cflags=""
pthread_libs="-lpthread"
else
AC_MSG_RESULT(no)
fi
#######################################
## MMX
build_cpu_mmx="no"
case $host_cpu in
i*86)
build_cpu_mmx="yes"
;;
x86_64)
build_cpu_mmx="yes"
;;
amd64)
build_cpu_mmx="yes"
;;
esac
AC_MSG_CHECKING(whether to build mmx code)
AC_ARG_ENABLE(cpu-mmx,
AC_HELP_STRING([--enable-cpu-mmx], [enable mmx code]),
[
if test "x$enableval" = "xyes" ; then
AC_MSG_RESULT(yes)
AC_DEFINE(BUILD_MMX, 1, [Build MMX Code])
build_cpu_mmx="yes"
else
AC_MSG_RESULT(no)
build_cpu_mmx="no"
fi
],
[
AC_MSG_RESULT($build_cpu_mmx)
if test "x$build_cpu_mmx" = "xyes" ; then
AC_DEFINE(BUILD_MMX, 1, [Build MMX Code])
fi
]
)
#######################################
## SSE
build_cpu_sse="no"
case $host_cpu in
i*86)
build_cpu_sse="yes"
;;
x86_64)
build_cpu_sse="yes"
;;
amd64)
build_cpu_sse="yes"
;;
esac
AC_MSG_CHECKING(whether to build sse code)
AC_ARG_ENABLE(cpu-sse,
AC_HELP_STRING([--enable-cpu-sse], [enable sse code]),
[
if test "x$enableval" = "xyes" ; then
AC_MSG_RESULT(yes)
AC_DEFINE(BUILD_SSE, 1, [Build SSE Code])
build_cpu_sse="yes"
else
AC_MSG_RESULT(no)
build_cpu_sse="no"
fi
],
[
AC_MSG_RESULT($build_cpu_sse)
if test "x$build_cpu_sse" = "xyes" ; then
AC_DEFINE(BUILD_SSE, 1, [Build SSE Code])
fi
]
)
#######################################
## ALTIVEC
build_cpu_altivec="no"
case $host_cpu in
*power* | *ppc*)
build_cpu_altivec="auto"
;;
esac
altivec_cflags=""
AC_MSG_CHECKING(whether to build altivec code)
AC_ARG_ENABLE(cpu-altivec,
AC_HELP_STRING([--enable-cpu-altivec], [enable altivec code]),
[ build_cpu_altivec=$enableval ],
[
if test ! "x$build_cpu_altivec" = "xauto"; then
build_cpu_altivec="no"
fi
]
)
AC_MSG_RESULT($build_cpu_altivec)
if test "x$build_cpu_altivec" = "xyes"; then
AC_CHECK_HEADER(altivec.h,
[
AC_DEFINE(BUILD_ALTIVEC, 1, [Build Altivec Code])
AC_DEFINE(HAVE_ALTIVEC_H, 1, [Have altivec.h header file])
build_cpu_altivec="yes"
],
[