Evas: Remove 'double =' signs from configure --help output.
[profile/ivi/evas.git] / configure.ac
1 ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
2 ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
3 m4_define([v_maj], [1])
4 m4_define([v_min], [0])
5 m4_define([v_mic], [999])
6 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']))
7 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']))])
8 ##--   When released, remove the dnl on the below line
9 dnl m4_undefine([v_rev])
10 ##--   When doing snapshots - change soname. remove dnl on below line
11 dnl m4_define([relname], [ver-pre-svn-07])
12 dnl m4_define([v_rel], [-release relname])
13 ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
14 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])])
15 m4_define([lt_cur], m4_eval(v_maj + v_min))
16 m4_define([lt_rev], v_mic)
17 m4_define([lt_age], v_min)
18 ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
19 ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
20
21 # rw_PROG_OBJC_WORKS
22 # Check whether the Objective C compiler works.
23 AC_DEFUN([rw_PROG_OBJC_WORKS],
24 [m4_ifdef([AC_PROG_OBJC], [AC_REQUIRE([AC_PROG_OBJC])dnl
25 AC_CACHE_CHECK([whether the Objective C compiler works],
26                [rw_cv_prog_objc_works],
27                [AC_LANG_PUSH([Objective C])
28                 AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])],
29                                [rw_cv_prog_objc_works=yes],
30                                [rw_cv_prog_objc_works=no])
31                 AC_LANG_POP([Objective C])])], [rw_cv_prog_objc_works=no])
32 ])
33
34 AC_INIT([evas], [v_ver], [enlightenment-devel@lists.sourceforge.net])
35 AC_PREREQ([2.52])
36 AC_CONFIG_SRCDIR([configure.ac])
37 AC_CONFIG_MACRO_DIR([m4])
38
39 AC_CONFIG_HEADERS([config.h])
40 AH_TOP([
41 #ifndef EFL_CONFIG_H__
42 #define EFL_CONFIG_H__
43 ])
44 AH_BOTTOM([
45 #endif /* EFL_CONFIG_H__ */
46 ])
47
48 AM_INIT_AUTOMAKE([1.6 dist-bzip2])
49 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
50
51 AC_GNU_SOURCE
52
53 AC_LIBTOOL_WIN32_DLL
54 define([AC_LIBTOOL_LANG_F77_CONFIG], [:])dnl
55 AC_PROG_LIBTOOL
56
57 ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
58 ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
59 m4_ifdef([v_rev], , [m4_define([v_rev], [0])])
60 m4_ifdef([v_rel], , [m4_define([v_rel], [])])
61 AC_DEFINE_UNQUOTED(VMAJ, [v_maj], [Major version])
62 AC_DEFINE_UNQUOTED(VMIN, [v_min], [Minor version])
63 AC_DEFINE_UNQUOTED(VMIC, [v_mic], [Micro version])
64 AC_DEFINE_UNQUOTED(VREV, [v_rev], [Revison])
65 version_info="lt_cur:lt_rev:lt_age"
66 release_info="v_rel"
67 AC_SUBST(version_info)
68 AC_SUBST(release_info)
69 ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
70 ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
71 VMAJ=v_maj
72 AC_SUBST(VMAJ)
73
74 ### Needed information
75
76 AC_CANONICAL_BUILD
77 AC_CANONICAL_HOST
78
79 case "$host_os" in
80    mingw32ce* | cegcc*)
81       MODULE_ARCH="$host_os-$host_cpu"
82       ;;
83    *)
84       MODULE_ARCH="$host_os-$host_cpu-v_maj.v_min.v_mic"
85       ;;
86 esac
87 AC_SUBST(MODULE_ARCH)
88 AC_DEFINE_UNQUOTED(MODULE_ARCH, "$MODULE_ARCH", "Module architecture")
89
90 want_fontconfig="auto"
91 want_fribidi="auto"
92 want_harfbuzz="auto"
93 want_pixman="no"
94 want_evas_cserve="yes"
95
96 want_evas_engine_buffer="yes"
97 want_evas_engine_software_xlib="no"
98 want_evas_engine_software_xcb="no"
99 want_evas_engine_software_gdi="no"
100 want_evas_engine_software_ddraw="no"
101 want_evas_engine_software_sdl="no"
102 want_evas_engine_software_8_x11="no"
103 want_evas_engine_software_16_x11="no"
104 want_evas_engine_software_16_ddraw="no"
105 want_evas_engine_software_16_wince="no"
106 want_evas_engine_gl_xlib="no"
107 want_evas_engine_gl_xcb="no"
108 want_evas_engine_gl_sdl="no"
109 want_evas_engine_direct3d="no"
110 want_evas_engine_fb="no"
111 want_evas_engine_directfb="no"
112
113 want_evas_image_loader_edb="yes"
114 want_evas_image_loader_eet="yes"
115 want_evas_image_loader_gif="yes"
116 want_evas_image_loader_jpeg="yes"
117 want_evas_image_loader_pmaps="yes"
118 want_evas_image_loader_png="yes"
119 want_evas_image_loader_svg="yes"
120 want_evas_image_loader_tiff="yes"
121 want_evas_image_loader_xpm="yes"
122 want_evas_image_loader_bmp="yes"
123 want_evas_image_loader_tga="yes"
124 want_evas_image_loader_wbmp="yes"
125 want_evas_image_loader_ico="yes"
126 want_evas_image_loader_psd="yes"
127 want_evas_image_loader_generic="yes"
128
129 want_evas_font_loader_eet="yes"
130
131 case "$host_os" in
132    mingw32ce* | cegcc*)
133       want_fontconfig="no"
134       want_evas_engine_software_16_wince="yes"
135       want_evas_image_loader_edb="no"
136       want_evas_image_loader_gif="no"
137       want_evas_image_loader_svg="no"
138       want_evas_image_loader_tiff="no"
139       ;;
140    mingw*)
141       want_evas_engine_software_gdi="yes"
142       want_evas_engine_software_ddraw="yes"
143       want_evas_engine_direct3d="yes"
144       want_evas_engine_software_16_ddraw="yes"
145       want_evas_image_loader_edb="no"
146       want_evas_image_loader_svg="no"
147       ;;
148    darwin*)
149       want_evas_engine_software_xlib="auto"
150       ;;
151    *)
152       want_evas_engine_software_xlib="auto"
153       want_evas_engine_gl_xlib="auto"
154       want_evas_engine_software_xcb="no"
155       want_evas_engine_gl_xcb="no"
156       want_evas_engine_fb="auto"
157 ### no - not ready/usable/complete
158 #      want_evas_engine_software_8_x11="auto"
159 #      want_evas_engine_software_16_x11="auto"
160       ;;
161 esac
162
163 requirement_evas=""
164
165
166 ### Additional options to configure
167
168 # when used, that option makes configure script fails when
169 # a requirement is selected, but not met.
170 use_strict="no"
171 AC_ARG_ENABLE([strict],
172    AC_HELP_STRING([--enable-strict], [enable strict checking mode. @<:@default==disabled@:>@]),
173    [use_strict="yes"],
174    [use_strict="no"])
175
176 # Simple X11 build/link
177 AC_ARG_ENABLE([simple-x11],
178    AC_HELP_STRING([--enable-simple-x11], [enable simple x11 linking]),
179    [
180     if test "x${enableval}" = "xyes" ; then
181        want_evas_simple_x11="yes"
182     else
183        want_evas_simple_x11="no"
184     fi
185    ])
186
187
188 ### Checks for programs
189
190 m4_ifdef([AC_PROG_OBJC],
191    [
192     AC_PROG_OBJC
193     _AM_DEPENDENCIES(OBJC)
194    ],
195    [
196     dnl#AC_CHECK_TOOL([OBJC], [gcc])
197     dnl#AC_SUBST([OBJC])
198     dnl#AC_SUBST([OBJCFLAGS])
199    ])
200
201 rw_PROG_OBJC_WORKS
202
203 AC_PROG_CXX
204 AC_PROG_CC
205
206 # pkg-config
207 PKG_PROG_PKG_CONFIG
208
209 # Check whether pkg-config supports Requires.private
210 if $PKG_CONFIG --atleast-pkgconfig-version 0.22; then
211    pkgconfig_requires_private="Requires.private"
212 else
213    pkgconfig_requires_private="Requires"
214 fi
215 AC_SUBST(pkgconfig_requires_private)
216
217 # doxygen program for documentation building
218 EFL_CHECK_DOXYGEN([build_doc="yes"], [build_doc="no"])
219
220
221 ### Checks for libraries
222
223 # Evil library for compilation on Windows CE
224
225 case "$host_os" in
226    mingw* | cegcc*)
227       PKG_CHECK_MODULES([EVIL], [evil])
228       AC_DEFINE(HAVE_EVIL, 1, [Set to 1 if evil package is installed])
229       requirement_evas="evil ${requirement_evas}"
230    ;;
231 esac
232
233 ## strong dependencies
234
235 # Eina
236 PKG_CHECK_MODULES([EINA], [eina >= 1.0.0])
237 CPPFLAGS_SAVE="$CPPFLAGS"
238 CPPFLAGS="$CPPFLAGS $EINA_CFLAGS"
239 AC_CHECK_SIZEOF(Eina_Unicode,, [#include <Eina.h>])
240 CPPFLAGS="$CPPFLAGS_SAVE"
241
242 # Freetype
243 PKG_CHECK_MODULES([FREETYPE], [freetype2 >= 9.3.0])
244
245 requirement_evas="freetype2 eina >= 1.0.0 ${requirement_evas}"
246
247 ## optional dependencies
248
249 # FontConfig
250 have_fontconfig="no"
251 AC_ARG_ENABLE([fontconfig],
252    AC_HELP_STRING([--disable-fontconfig],
253       [disable fontconfig for finding fonts. @<:@default=enabled@:>@]),
254    [
255     if test "x${enableval}" = "xyes" ; then
256        want_fontconfig="yes"
257     else
258        want_fontconfig="no"
259     fi
260    ])
261
262
263 if test "x${want_fontconfig}" = "xyes" -o "x${want_fontconfig}" = "xauto" ; then
264    PKG_CHECK_MODULES([FONTCONFIG],
265       [fontconfig],
266       [
267        have_fontconfig="yes"
268        AC_DEFINE(HAVE_FONTCONFIG, 1, [have fontconfig searching capabilities])
269        requirement_evas="fontconfig ${requirement_evas}"
270       ],
271       [
272        if test "x${want_fontconfig}" = "xyes" -a "x${use_strict}" = "xyes" ; then
273           AC_MSG_ERROR([Fontconfig not found (strict dependencies checking)])
274        fi
275       ])
276 fi
277
278 # linebreak
279 have_linebreak="no"
280 want_linebreak="yes"
281 AC_ARG_ENABLE([liblinebreak],
282    AC_HELP_STRING([--disable-liblinebreak],
283       [disable linking against liblinebreak. @<:@default=enabled@:>@]),
284    [
285     if test "x${enableval}" = "xyes" ; then
286        want_linebreak="yes"
287     else
288        want_linebreak="no"
289     fi
290    ])
291
292
293 AM_CONDITIONAL(EVAS_USE_LINEBREAK, test "x${want_linebreak}" = "xyes")
294 if test "x${want_linebreak}" = "xyes" ; then
295    have_linebreak="yes"
296    LINEBREAK_CFLAGS='-I$(top_srcdir)/src/static_deps/liblinebreak'
297    LINEBREAK_LIBS='$(top_builddir)/src/static_deps/liblinebreak/liblinebreak.la'
298    AC_SUBST(LINEBREAK_CFLAGS)
299    AC_SUBST(LINEBREAK_LIBS)
300    AC_DEFINE(HAVE_LINEBREAK, 1, [have liblinebreak support])
301 else
302    have_linebreak="no"
303 fi
304
305 # fribidi support
306 have_fribidi="no"
307 AC_ARG_ENABLE([fribidi],
308    AC_HELP_STRING([--disable-fribidi],
309       [disable bidirectional text support. @<:@default=enabled@:>@]),
310    [
311     if test "x${enableval}" = "xyes" ; then
312        want_fribidi="yes"
313     else
314        want_fribidi="no"
315     fi
316    ])
317
318 if test "x${want_fribidi}" = "xyes" -o "x${want_fribidi}" = "xauto" ; then
319    PKG_CHECK_MODULES([FRIBIDI],
320       [fribidi >= 0.19.2],
321       [
322        have_fribidi="yes"
323        AC_DEFINE(HAVE_FRIBIDI, 1, [have fribidi support])
324        requirement_evas="fribidi ${requirement_evas}"
325        CPPFLAGS_SAVE="$CPPFLAGS"
326        CPPFLAGS="$CPPFLAGS $FRIBIDI_CFLAGS"
327        AC_CHECK_SIZEOF(FriBidiChar,, [#include <fribidi/fribidi.h>])
328        CPPFLAGS="$CPPFLAGS_SAVE"
329       ],
330       [
331        if test "x$want_fribidi" = "xyes" -a "x$use_strict" = "xyes" ; then
332           AC_MSG_ERROR([Fribidi not found (strict dependencies checking)])
333        fi
334       ])
335 fi
336
337 if test "x${have_fribidi}" = "xno"; then
338   HAS_BIDI=0
339 fi
340
341 # harfbuzz support
342 have_harfbuzz="no"
343 have_harfbuzz_ft="no"
344 AC_ARG_ENABLE([harfbuzz],
345    AC_HELP_STRING([--disable-harfbuzz],
346       [disable complex text shaping and layouting support. @<:@default=enabled@:>@]),
347    [
348     if test "x${enableval}" = "xyes" ; then
349        want_harfbuzz="yes"
350     else
351        want_harfbuzz="no"
352     fi
353    ])
354
355 if test "x${want_harfbuzz}" = "xyes" -o "x${want_harfbuzz}" = "xauto" ; then
356    PKG_CHECK_MODULES([HARFBUZZ],
357       [harfbuzz >= 0.6.0],
358       [
359        have_harfbuzz="yes"
360        requirement_evas="harfbuzz ${requirement_evas}"
361       ],
362       [
363        if test "x$want_harfbuzz" = "xyes" -a "x$use_strict" = "xyes" ; then
364           AC_MSG_ERROR([Harfbuzz not found (strict dependencies checking)])
365        fi
366       ])
367    if test "x$have_harfbuzz" = "xyes" ; then
368
369       CPPFLAGS_SAVE="$CPPFLAGS"
370       CPPFLAGS="$CPPFLAGS $HARFBUZZ_CFLAGS $FREETYPE_CFLAGS"
371 # must have for usage with harfbuzz although harfbuzz may not have it.
372
373       AC_CHECK_HEADER(hb-ft.h,
374           [
375            have_harfbuzz_ft="yes"
376            #Depend on harfbuzz ft for harfbuzz support
377            AC_DEFINE(HAVE_HARFBUZZ, 1, [have harfbuzz support])
378           ],
379           [
380            if test "x$want_harfbuzz" = "xyes" -a "x$use_strict" = "xyes" ; then
381               AC_MSG_ERROR([Harfbuzz-ft not found (strict dependencies checking)])
382            fi
383            have_harfbuzz="no"
384           ])
385       CPPFLAGS="$CPPFLAGS_SAVE"
386    fi
387 fi
388
389 if test "x${have_harfbuzz}" = "xno"; then
390   HAS_HARFBUZZ=0
391 fi
392
393 # Pixman
394 have_pixman="no"
395 AC_ARG_ENABLE([pixman],
396    AC_HELP_STRING([--disable-pixman],
397       [disable pixman for software rendering. @<:@default=enabled@:>@]),
398    [
399     if test "x${enableval}" = "xyes" ; then
400        want_pixman="yes"
401     else
402        want_pixman="no"
403     fi
404    ])
405
406
407 if test "x${want_pixman}" = "xyes" -o "x${want_pixman}" = "xauto" ; then
408    PKG_CHECK_MODULES([PIXMAN],
409       [pixman-1],
410       [
411        have_pixman="yes"
412        AC_DEFINE(HAVE_PIXMAN, 1, [have pixman for rendering])
413        requirement_evas="pixman-1 ${requirement_evas}"
414       ],
415       [
416        if test "x${want_pixman}" = "xyes" -a "x${use_strict}" = "xyes" ; then
417           AC_MSG_ERROR([Pixman not found (strict dependencies checking)])
418        fi
419       ])
420 fi
421
422 ### Checks for header files
423 AC_HEADER_STDC
424 AC_CHECK_HEADERS([unistd.h stdint.h sys/param.h netinet/in.h])
425
426 EFL_CHECK_PATH_MAX
427
428
429 ### Checks for types
430
431
432 ### Checks for structures
433
434
435 ### Checks for compiler characteristics
436 AC_C_CONST
437 AC_C_BIGENDIAN
438 AC_C___ATTRIBUTE__
439 AM_PROG_CC_STDC
440
441 WIN32_CPPFLAGS=""
442 case "$host_os" in
443    mingw32ce* | cegcc*)
444       WIN32_CPPFLAGS="-D_WIN32_WCE=0x0420"
445       ;;
446    mingw*)
447       WIN32_CPPFLAGS="-D_WIN32_WINNT=0x0500"
448       ;;
449 esac
450 AC_SUBST(WIN32_CPPFLAGS)
451
452 WIN32_CFLAGS=""
453 case "${host_os}" in
454    cegcc*)
455       WIN32_CFLAGS="-mwin32"
456    ;;
457 esac
458 AC_SUBST(WIN32_CFLAGS)
459
460
461 ### Checks for linker characteristics
462 lt_enable_auto_import=""
463 case "${host_os}" in
464    mingw* | cegcc*)
465       AC_DEFINE(EFL_EVAS_BUILD, 1, [Define to mention that evas is built])
466       lt_enable_auto_import="-Wl,--enable-auto-import"
467    ;;
468 esac
469 AC_SUBST(lt_enable_auto_import)
470
471
472 ### Checks for library functions
473
474 AC_ISC_POSIX
475
476 # alloca
477 AC_FUNC_ALLOCA
478
479 # fnmatch
480 EFL_CHECK_FNMATCH([], [AC_MSG_ERROR([Cannot find fnmatch()])])
481
482 # dlopen
483 dlopen_libs=""
484 case "$host_os" in
485   mingw32ce* | cegcc*)
486 # managed by evil
487     AC_DEFINE(HAVE_DLADDR)
488   ;;
489   mingw*)
490 # nothing on mingw platform
491   ;;
492   *)
493     AC_CHECK_FUNCS(dlopen, res=yes, res=no)
494     if test "x$res" = "xyes"; then
495       AC_CHECK_FUNCS(dladdr, AC_DEFINE(HAVE_DLADDR))
496     else
497       AC_CHECK_LIB(dl, dlopen, res=yes, res=no)
498       if test "x$res" = "xyes"; then
499         AC_CHECK_LIB(dl, dladdr, AC_DEFINE(HAVE_DLADDR))
500         dlopen_libs=-ldl
501       else
502         AC_MSG_ERROR(Cannot find dlopen)
503       fi
504     fi
505 esac
506 AC_SUBST(dlopen_libs)
507
508 SHM_OPEN_LINK=""
509 AC_MSG_CHECKING([whether shm_open() is present])
510 LIBS_save=${LIBS}
511 LIBS="${LIBS} -lrt"
512 AC_LINK_IFELSE(
513    [AC_LANG_PROGRAM(
514       [[
515 #include <sys/stat.h>
516 #include <sys/mman.h>
517 #include <fcntl.h>
518       ]],
519       [[
520 int fd;
521 fd = shm_open("/", O_RDWR | O_CREAT, S_IRUSR | S_IWUSR);
522 shm_unlink("/");
523       ]])],
524    [
525     have_shm_open="yes"
526     AC_DEFINE(HAVE_SHM_OPEN, 1, [Have shm_open() call])
527     SHM_OPEN_LINK="-lrt"
528    ],
529    [have_shm_open="no"])
530 LIBS=${LIBS_save}
531 AC_MSG_RESULT([${have_shm_open}])
532 AC_SUBST(SHM_OPEN_LINK)
533
534 # (shm_open (for cache server)
535 AC_ARG_ENABLE([evas-cserve],
536    AC_HELP_STRING([--disable-evas-cserve],
537       [disable shared cache server support. @<:@default=enabled@:>@]),
538    [
539     if test "x${enableval}" = "xyes" ; then
540        want_evas_cserve="yes"
541     else
542        want_evas_cserve="no"
543     fi
544    ])
545 AC_MSG_CHECKING(whether to build shared cache server and support)
546 AC_MSG_RESULT(${want_evas_cserve})
547
548 if test "x${want_evas_cserve}" = "xyes" ; then
549    AC_MSG_CHECKING([whether shm_open() is present])
550    LIBS_save=${LIBS}
551    LIBS="${LIBS} -lrt"
552    AC_LINK_IFELSE(
553       [AC_LANG_PROGRAM(
554          [[
555 #include <sys/types.h>
556 #include <sys/mman.h>
557 #include <fcntl.h>
558          ]],
559          [[
560 int fd;
561 fd = shm_open("/", O_RDWR | O_CREAT, S_IRUSR | S_IWUSR);
562 shm_unlink("/");
563          ]])],
564       [want_evas_cserve="yes"],
565       [want_evas_cserve="no"])
566    LIBS=${LIBS_save}
567    AC_MSG_RESULT([${want_evas_cserve}])
568 fi
569
570 if test "x${want_evas_cserve}" = "xyes" ; then
571   AC_DEFINE(EVAS_CSERVE, 1, [Shared caceh server.])
572 fi
573
574 AM_CONDITIONAL([EVAS_CSERVE], [test "x${want_evas_cserve}" = "xyes"])
575
576
577
578 #######################################
579 ## GL force flavor gles
580 gl_flavor_gles="no"
581 AC_MSG_CHECKING(whether to build GLES flavor of GL)
582 AC_ARG_ENABLE(gl-flavor-gles,
583   AC_HELP_STRING([--enable-gl-flavor-gles], [enable gles falvor of gl instead of standard]),
584   [
585       if test "x$enableval" = "xyes" ; then
586         AC_MSG_RESULT(yes)
587         gl_flavor_gles="yes"
588       else
589         AC_MSG_RESULT(no)
590         gl_flavor_gles="no"
591       fi
592   ], [
593       AC_MSG_RESULT(no)
594       gl_flavor_gles="no"
595   ]
596 )
597
598 #######################################
599 ## GLES variety sgx
600 gles_variety_sgx="no"
601 AC_MSG_CHECKING(whether to build GLES variety for SGX)
602 AC_ARG_ENABLE(gles-variety-sgx,
603   AC_HELP_STRING([--enable-gles-variety-sgx], [GLES variety SGX 3D unit]),
604   [
605       if test "x$enableval" = "xyes" ; then
606         AC_MSG_RESULT(yes)
607         AC_DEFINE(GLES_VARIETY_SGX, 1, [Imagination SGX GLES2 support])
608         gles_variety_sgx="yes"
609       else
610         AC_MSG_RESULT(no)
611         gles_variety_sgx="no"
612       fi
613   ], [
614       AC_MSG_RESULT(no)
615       gles_variety_sgx="no"
616   ]
617 )
618
619 #######################################
620 ## GLES variety s3c6410
621 gles_variety_s3c6410="no"
622 AC_MSG_CHECKING(whether to build GLES variety for s3c6410)
623 AC_ARG_ENABLE(gles-variety-s3c6410,
624   AC_HELP_STRING([--enable-gles-variety-s3c6410], [GLES variety s3c6410 3D unit]),
625   [
626       if test "x$enableval" = "xyes" ; then
627         AC_MSG_RESULT(yes)
628         AC_DEFINE(GLES_VARIETY_S3C6410, 1, [Samsung S3c6410 GLES2 support])
629         gles_variety_s3c6410="yes"
630       else
631         AC_MSG_RESULT(no)
632         gles_variety_s3c6410="no"
633       fi
634   ], [
635       AC_MSG_RESULT(no)
636       gles_variety_s3c6410="no"
637   ]
638 )
639
640 if test "x$gl_flavor_gles" = "xyes"; then
641   eng=""
642   if test "x$gles_variety_sgx" = "xyes"; then eng="x"$eng; fi
643   if test "x$gles_variety_s3c6410" = "xyes"; then eng="x"$eng; fi
644   if test "x$eng" = "xx"; then
645     eng=""
646   else
647      AC_MSG_ERROR(
648        [Please enable just 1 OpenGL-ES flavor. Choices are:
649           --enable-gles-variety-sgx (Most GL-ES2 GPUs with shader compiler)
650           --enable-gles-variety-s3c6410 (s3c6410 with offline shader compiler)
651         You will also need to enable the OpenGL engine for X11 with:
652           --enable-gl-xlib or --enable-gl-xcb
653        ])
654   fi
655 fi
656
657 #####################################################################
658 ## Engines
659
660 EVAS_CHECK_ENGINE([buffer], [${want_evas_engine_buffer}], [yes], [Buffer])
661
662 EVAS_CHECK_ENGINE([software-gdi], [${want_evas_engine_software_gdi}], [no], [Software GDI])
663
664 EVAS_CHECK_ENGINE([software-ddraw], [${want_evas_engine_software_ddraw}], [no], [Software DirectDraw])
665
666 EVAS_CHECK_ENGINE([direct3d], [${want_evas_engine_direct3d}], [no], [Direct3D])
667
668 EVAS_CHECK_ENGINE([software-sdl], [${want_evas_engine_software_sdl}], [no], [Software SDL])
669
670 EVAS_CHECK_ENGINE([gl-sdl], [${want_evas_engine_gl_sdl}], [no], [OpenGL SDL])
671
672 EVAS_CHECK_ENGINE([fb], [${want_evas_engine_fb}], [no], [Framebuffer])
673
674 EVAS_CHECK_ENGINE([directfb], [${want_evas_engine_directfb}], [no], [DirectFB])
675
676 EVAS_CHECK_ENGINE([software-8-x11], [${want_evas_engine_software_8_x11}], [no], [Software X11 8 bits grayscale])
677
678 EVAS_CHECK_ENGINE([software-16-x11], [${want_evas_engine_software_16_x11}], [no], [Software X11 16 bits])
679
680 EVAS_CHECK_ENGINE([software-16-ddraw], [${want_evas_engine_software_16_ddraw}], [no], [Software DirectDraw 16 bits])
681
682 EVAS_CHECK_ENGINE([software-16-wince], [${want_evas_engine_software_16_wince}], [no], [Software Windows CE 16 bits])
683
684 # SDL primitive
685 sdl_primitive="no"
686
687 AC_ARG_ENABLE([sdl-primitive],
688    [AC_HELP_STRING([--enable-sdl-primitive], [])],
689    [sdl_primitive=${enableval}]
690 )
691 AC_MSG_CHECKING([whether to use SDL primitive when possible])
692 AC_MSG_RESULT([${sdl_primitive}])
693
694 if test "x${sdl_primitive}" = "xyes" ; then
695    AC_DEFINE([ENGINE_SDL_PRIMITIVE], [1], [Use SDL primitive when possible])
696 fi
697
698 # if software generic need to be build as part of libevas.so
699 have_static_software_generic="no"
700 AC_ARG_ENABLE([static-software-generic],
701    [AC_HELP_STRING([--enable-static-software-generic], [Build software generic engine as part of libevas])],
702    [have_static_software_generic=${enableval}]
703 )
704 AC_MSG_CHECKING([Whether to build software generic engine as part of libevas])
705 AC_MSG_RESULT([${have_static_software_generic}])
706
707 if test "x${have_static_module}" = "xyes" -a "x${have_static_software_generic}" = "xno"; then
708    AC_MSG_WARN([Forcing --enable-static-software-generic as engines must be compiled statically])
709    have_static_software_generic="yes"
710 fi
711
712 AM_CONDITIONAL(EVAS_STATIC_BUILD_SOFTWARE_GENERIC, test "x${have_static_software_generic}" = "xyes")
713 if test "x${have_static_software_generic}" = "xyes"; then
714    AC_DEFINE(EVAS_STATIC_BUILD_SOFTWARE_GENERIC, [1], [Build software generic engine as part of libevas])
715 fi
716
717
718 ######## Software Engine ########
719 have_evas_engine_software_x11="no"
720 have_evas_engine_software_xcb="no"
721 have_evas_engine_software_xlib="no"
722 build_software_xcb=
723
724 ## XCB Checks ##
725 want_xcb=
726 AC_MSG_CHECKING(whether to build Software XCB Engine)
727 AC_ARG_ENABLE(software-xcb,
728   AC_HELP_STRING([--enable-software-xcb], [enable Software XCB Engine. @<:@default=disabled@:>@]), [want_xcb=$enableval]
729 )
730 if test "x$want_xcb" = "xyes" ; then
731   EVAS_CHECK_ENGINE([software-xcb], [${want_evas_engine_software_xcb}], [no], [Software XCB])
732   if test "x$have_evas_engine_software_xcb" != "xno" ; then
733     build_software_xcb="yes"
734     have_evas_engine_software_x11="yes"
735     AC_DEFINE_UNQUOTED(BUILD_ENGINE_SOFTWARE_X11, [1], [Build software X11 engine])
736     AC_DEFINE_UNQUOTED(BUILD_ENGINE_SOFTWARE_XCB, [1], [Build software XCB backend])
737     if test "x$have_evas_engine_software_xcb" = "xstatic" ; then
738       AC_DEFINE_UNQUOTED(EVAS_STATIC_BUILD_SOFTWARE_XCB, [1], [Build software X11 engine as part of libevas])
739     fi
740   fi
741 else
742   AC_MSG_RESULT(no)
743   build_software_xcb="no"
744 fi
745
746 ## If we are not building XCB, then we can build XLib ##
747
748 if test "x$build_software_xcb" = "xno" ; then
749   EVAS_CHECK_ENGINE([software-xlib], [${want_evas_engine_software_xlib}], [no], [Software Xlib])
750   # if software_x11 is available, define everything needed for X11
751   if test "x$have_evas_engine_software_xlib" != "xno" ; then
752     have_evas_engine_software_x11="yes"
753     AC_DEFINE_UNQUOTED(BUILD_ENGINE_SOFTWARE_X11, [1], [Build software X11 engine])
754     AC_DEFINE_UNQUOTED(BUILD_ENGINE_SOFTWARE_XLIB, [1], [Build software Xlib backend])
755     if test "x$have_evas_engine_software_xlib" = "xstatic" ; then
756       AC_DEFINE_UNQUOTED(EVAS_STATIC_BUILD_SOFTWARE_XLIB, [1], [Build software X11 engine as part of libevas])
757     fi
758   fi
759 else
760   have_evas_engine_software_xlib="no"
761 fi
762
763 if test "x$have_evas_engine_software_xlib" = "xstatic" ; then
764    have_evas_engine_software_xlib="yes"
765 fi
766
767 if test "x$have_evas_engine_software_xcb" = "xstatic" ; then
768    have_evas_engine_software_xcb="yes"
769 fi
770
771 AC_SUBST(have_evas_engine_software_xcb)
772 AC_SUBST(have_evas_engine_software_xlib)
773
774 AM_CONDITIONAL([BUILD_ENGINE_SOFTWARE_XLIB], [test "x${have_evas_engine_software_xlib}" != "xno"])
775 AM_CONDITIONAL([BUILD_ENGINE_SOFTWARE_XCB], [test "x${have_evas_engine_software_xcb}" != "xno"])
776 AM_CONDITIONAL([BUILD_ENGINE_SOFTWARE_X11], [test "x${have_evas_engine_software_x11}" != "xno"])
777
778 AM_CONDITIONAL([EVAS_STATIC_BUILD_SOFTWARE_X11], [test "x${have_evas_engine_software_xcb}" = "xstatic" -o "x${have_evas_engine_software_xlib}" = "xstatic"])
779 AM_CONDITIONAL([EVAS_STATIC_BUILD_SOFTWARE_XLIB], [test "x${have_evas_engine_software_xlib}" = "xstatic"])
780 AM_CONDITIONAL([EVAS_STATIC_BUILD_SOFTWARE_XCB], [test "x${have_evas_engine_software_xcb}" = "xstatic"])
781
782 AC_SUBST(have_evas_engine_software_x11)
783
784
785 ######## OpenGL Engine ########
786 have_evas_engine_gl_x11="no"
787 build_gl_xcb=
788
789 ## XCB Checks ##
790 want_gl_xcb=
791 AC_MSG_CHECKING(whether to build OpenGL XCB Engine)
792 AC_ARG_ENABLE(gl-xcb,
793   AC_HELP_STRING([--enable-gl-xcb], [enable OpenGL XCB Engine. @<:@default=disabled@:>@]), [want_gl_xcb=$enableval]
794 )
795 if test "x$want_gl_xcb" = "xyes" ; then
796   EVAS_CHECK_ENGINE([gl-xcb], [${want_evas_engine_gl_xcb}], [no], [OpenGL XCB])
797   if test "x$have_evas_engine_gl_xcb" != "xno" ; then
798     build_gl_xcb="yes"
799     have_evas_engine_gl_x11="yes"
800    AC_DEFINE(BUILD_ENGINE_GL_X11, [1], [Build GL X11 engine])
801    AC_DEFINE(BUILD_ENGINE_GL_XCB, [1], [Build GL Xcb backend])
802     if test "x$have_evas_engine_gl_xcb" = "xstatic" ; then
803       AC_DEFINE(EVAS_STATIC_BUILD_GL_X11, [1], [Build GL X11 engine as part of libevas])
804     fi
805   fi
806   AC_SUBST(have_evas_engine_gl_xcb)
807 else
808   AC_MSG_RESULT(no)
809   build_gl_xcb="no"
810 fi
811
812 ## If we are not building XCB, then we can build XLib ##
813
814 if test "x$build_gl_xcb" = "xno" ; then
815   EVAS_CHECK_ENGINE([gl-xlib], [${want_evas_engine_gl_xlib}], [no], [OpenGL XLib])
816   if test "x$have_evas_engine_gl_xlib" != "xno" ; then
817     have_evas_engine_gl_x11="yes"
818     AC_DEFINE_UNQUOTED(BUILD_ENGINE_GL_X11, [1], [Build OpenGL X11 engine])
819     AC_DEFINE_UNQUOTED(BUILD_ENGINE_GL_XLIB, [1], [Build OpenGL Xlib backend])
820     if test "x$have_evas_engine_gl_xlib" = "xstatic" ; then
821       AC_DEFINE_UNQUOTED(EVAS_STATIC_BUILD_GL_XLIB, [1], [Build OpenGL X11 engine as part of libevas])
822     fi
823   fi
824 else
825   have_evas_engine_gl_xlib="no"
826 fi
827 AC_SUBST(have_evas_engine_gl_xlib)
828
829 AM_CONDITIONAL([BUILD_ENGINE_GL_XLIB], [test "x${have_evas_engine_gl_xlib}" != "xno"])
830 AM_CONDITIONAL([BUILD_ENGINE_GL_XCB], [test "x${have_evas_engine_gl_xcb}" != "xno"])
831 AM_CONDITIONAL([BUILD_ENGINE_GL_X11], [test "x${have_evas_engine_gl_x11}" != "xno"])
832
833 AM_CONDITIONAL([EVAS_STATIC_BUILD_GL_X11], [test "x${have_evas_engine_gl_xcb}" = "xstatic" -o "x${have_evas_engine_gl_xlib}" = "xstatic"])
834 AM_CONDITIONAL([EVAS_STATIC_BUILD_GL_XLIB], [test "x${have_evas_engine_gl_xlib}" = "xstatic"])
835 AM_CONDITIONAL([EVAS_STATIC_BUILD_GL_XCB], [test "x${have_evas_engine_gl_xcb}" = "xstatic"])
836
837 AC_SUBST(have_evas_engine_gl_x11)
838
839 # common gl
840 have_evas_engine_gl_common="no"
841 have_static_evas_engine_gl_common="no"
842 if test "x$have_evas_engine_gl_xlib" = "xyes" \
843    || test "x$have_evas_engine_gl_xcb" = "xyes" \
844    || test "x$have_evas_engine_gl_sdl" = "xyes"; then
845    have_evas_engine_gl_common="yes"
846 fi
847 if test "x$have_evas_engine_gl_xlib" = "xstatic" \
848    || test "x$have_evas_engine_gl_xcb" = "xstatic" \
849    || test "x$have_evas_engine_gl_sdl" = "xstatic"; then
850    have_evas_engine_gl_common="yes"
851    have_static_evas_engine_gl_common="yes"
852 fi
853
854 if test "x$have_evas_engine_gl_common" = "xyes"; then
855    evas_engine_gl_common_libs=""
856    AC_DEFINE(BUILD_ENGINE_GL_COMMON, [1], [Generic OpenGL Rendering Support])
857 fi
858
859 AC_SUBST([evas_engine_gl_common_libs])
860
861 AM_CONDITIONAL(BUILD_ENGINE_GL_COMMON, [test "x$have_evas_engine_gl_common" = "xyes"])
862
863 AM_CONDITIONAL(EVAS_STATIC_BUILD_GL_COMMON, test "x${have_static_evas_engine_gl_common}" = "xyes")
864 if test "x${have_static_evas_engine_gl_common}" = "xyes"; then
865    AC_DEFINE(EVAS_STATIC_BUILD_GL_COMMON, [1], [Build GL generic engine as part of libevas])
866 fi
867
868 # gl_sdl
869 if test "x$have_evas_engine_gl_sdl" = "xyes" || test "x$have_evas_engine_gl_sdl" = "xstatic" ; then
870    AC_CHECK_DECL(SDL_GL_CONTEXT_MAJOR_VERSION,
871       [AC_DEFINE(HAVE_SDL_GL_CONTEXT_VERSION, [1], [SDL_GL version attributes present])],,
872       [#include <SDL/SDL_video.h>])
873 fi
874
875 if test "x$gl_flavor_gles" = "xyes"; then
876    AC_CHECK_DECL(SDL_OPENGLES,
877       [AC_DEFINE(HAVE_SDL_FLAG_OPENGLES, [1], [SDL_OPENGLES flag is present])],,
878       [#include <SDL/SDL_video.h>])
879 fi
880
881 # if software 16 x11 is enabled - build software_16 (the generic 16bit
882 # engine). later enable it fb_16 or other "16" bit engines are enabled.
883 have_evas_engine_software_16="no"
884 if test "x$have_evas_engine_software_16_x11" = "xyes" -o "x$have_evas_engine_software_16_x11" = "xstatic"; then
885    have_evas_engine_software_16="yes"
886 fi
887 if test "x$have_evas_engine_software_sdl" = "xyes" -o "x$have_evas_engine_software_sdl" = "xstatic"; then
888    have_evas_engine_software_16="yes"
889 fi
890 if test "x$have_evas_engine_software_16_ddraw" = "xyes" -o "x$have_evas_engine_software_16_ddraw" = "xstatic"; then
891    have_evas_engine_software_16="yes"
892 fi
893 if test "x$have_evas_engine_software_16_wince" = "xyes" -o "x$have_evas_engine_software_16_wince" = "xstatic"; then
894    have_evas_engine_software_16="yes"
895 fi
896 AM_CONDITIONAL(BUILD_ENGINE_SOFTWARE_16, test "x$have_evas_engine_software_16" = "xyes")
897
898 # if software 16 need to be build as part of libevas.so
899 have_static_software_16="no"
900 AC_ARG_ENABLE([static-software-16],
901    [AC_HELP_STRING([--enable-static-software-16], [Build software 16 engine as part of libevas])],
902    [have_static_software_16=${enableval}]
903 )
904 AC_MSG_CHECKING([Whether to build software 16 engine as part of libevas])
905 AC_MSG_RESULT([${have_static_software_16}])
906
907 AM_CONDITIONAL(EVAS_STATIC_BUILD_SOFTWARE_16, test "x${have_static_software_16}" = "xyes")
908 if test "x${have_static_software_16}" = "xyes"; then
909    AC_DEFINE(EVAS_STATIC_BUILD_SOFTWARE_16, [1], [Build software 16 engine as part of libevas])
910 fi
911
912 # if software 8 x11 is enabled - build software_8 (the generic 8bit
913 # engine).
914 have_evas_engine_software_8="no"
915 if test "x$have_evas_engine_software_8_x11" = "xyes" -o "x$have_evas_engine_software_8_x11" = "xstatic"; then
916    have_evas_engine_software_8="yes"
917 fi
918 AM_CONDITIONAL(BUILD_ENGINE_SOFTWARE_8, test "x$have_evas_engine_software_8" = "xyes")
919
920 # if software 8 need to be build as part of libevas.so
921 have_static_software_8="no"
922 AC_ARG_ENABLE([static-software-8],
923    [AC_HELP_STRING([--enable-static-software-8], [Build software 8 engine as part of libevas])],
924    [have_static_software_8=${enableval}]
925 )
926 AC_MSG_CHECKING([Whether to build software 8 engine as part of libevas])
927 AC_MSG_RESULT([${have_static_software_8}])
928
929 AM_CONDITIONAL(EVAS_STATIC_BUILD_SOFTWARE_8, test "x${have_static_software_8}" = "xyes")
930 if test "x${have_static_software_8}" = "xyes"; then
931    AC_DEFINE(EVAS_STATIC_BUILD_SOFTWARE_8, [1], [Build software 8 engine as part of libevas])
932 fi
933
934 #####################################################################
935 ## Image loaders
936
937 EVAS_CHECK_IMAGE_LOADER([Edb], [${want_evas_image_loader_edb}])
938
939 EVAS_CHECK_IMAGE_LOADER([Eet], [${want_evas_image_loader_eet}])
940 EVAS_CHECK_FONT_LOADER([${want_evas_font_loader_eet}])
941
942 EVAS_CHECK_IMAGE_LOADER([Gif], [${want_evas_image_loader_gif}])
943
944 have_evas_image_saver_jpeg="no"
945 EVAS_CHECK_IMAGE_LOADER([Jpeg], [${want_evas_image_loader_jpeg}])
946
947 dnl Windows has no sigsetjmp function, nor equivalent.
948 dnl So we disable the jpeg saver.
949 dnl TODO: must find a workaround
950 case "$host_os" in
951    mingw* | cegcc*)
952       ;;
953    *)
954       if test "x${have_evas_image_loader_jpeg}" = "xyes" ; then
955          AC_DEFINE(EVAS_BUILD_SAVER_JPEG, [1], [Build JPEG saver])
956          have_evas_image_saver_jpeg="yes"
957       fi
958       ;;
959 esac
960 AM_CONDITIONAL([BUILD_SAVER_JPEG], [test "x${have_evas_image_saver_jpeg}" = "xyes"])
961
962 EVAS_CHECK_IMAGE_LOADER([PMAPS], [${want_evas_image_loader_pmaps}])
963
964 EVAS_CHECK_IMAGE_LOADER([PNG], [${want_evas_image_loader_png}])
965
966 EVAS_CHECK_IMAGE_LOADER([SVG], [${want_evas_image_loader_svg}])
967
968 EVAS_CHECK_IMAGE_LOADER([Tiff], [${want_evas_image_loader_tiff}])
969
970 EVAS_CHECK_IMAGE_LOADER([XPM], [${want_evas_image_loader_xpm}])
971
972 EVAS_CHECK_IMAGE_LOADER([BMP], [${want_evas_image_loader_bmp}])
973
974 EVAS_CHECK_IMAGE_LOADER([TGA], [${want_evas_image_loader_tga}])
975
976 EVAS_CHECK_IMAGE_LOADER([WBMP], [${want_evas_image_loader_wbmp}])
977
978 EVAS_CHECK_IMAGE_LOADER([ICO], [${want_evas_image_loader_ico}])
979
980 EVAS_CHECK_IMAGE_LOADER([PSD], [${want_evas_image_loader_psd}])
981
982 EVAS_CHECK_IMAGE_LOADER([GENERIC], [${want_evas_image_loader_generic}])
983
984 #####################################################################
985 ## Cpu based optimizations
986
987 #######################################
988 ## PTHREADS
989 pthread_cflags=""
990 pthread_libs=""
991 build_pthreads="no"
992 has_pthreads="no"
993 need_pthreads="no"
994 # basic pthread support
995 AC_CHECK_HEADER(pthread.h,
996   [
997    has_pthreads="yes"
998   ],
999   [
1000    has_pthreads="no"
1001   ]
1002 )
1003
1004 # sched_getaffinity pthread_attr_setaffinity_np
1005 AC_CHECK_HEADERS(pthread.h sched.h,
1006   [
1007     AC_CHECK_LIB(pthread, pthread_attr_setaffinity_np,
1008       [
1009         AC_CHECK_LIB(pthread, pthread_barrier_wait,
1010           [ build_pthreads="yes" ],
1011           [ build_pthreads="no" ]
1012         )
1013       ],
1014       [ build_pthreads="no" ]
1015     )
1016   ],
1017   [ build_pthreads="no" ]
1018 )
1019
1020 #######################################
1021 ## Pthread
1022 AC_MSG_CHECKING(whether to build pthread code)
1023 AC_ARG_ENABLE(pthreads,
1024   AC_HELP_STRING([--enable-pthreads], [enable threaded rendering]),
1025   [
1026     if test "x$enableval" = "xyes" ; then
1027       if test "x$build_pthreads" = "xyes"; then
1028         AC_MSG_RESULT(yes)
1029         AC_DEFINE(BUILD_PTHREAD, 1, [Build Threaded Rendering])
1030         build_pthreads="yes"
1031         need_pthreads="yes"
1032       else
1033         if "x$use_strict" = "xyes"; then
1034           AC_MSG_ERROR(pthreads headers or functions not found (strict dependencies checking))
1035         else
1036           AC_MSG_RESULT(no: pthread headers or functions not found)
1037         fi
1038       fi
1039     else
1040       AC_MSG_RESULT(no)
1041       build_pthreads="no"
1042     fi
1043   ],
1044   [
1045     AC_MSG_RESULT($build_pthreads)
1046     if test "x$build_pthreads" = "xyes" ; then
1047       AC_DEFINE(BUILD_PTHREAD, 1, [Build Threaded Rendering])
1048       need_pthreads="yes"
1049     fi
1050   ]
1051 )
1052
1053 #######################################
1054 ## Pipe Renderer
1055 build_pipe_render="no"
1056
1057 AC_MSG_CHECKING(whether to build Threaded Pipe Rendering support)
1058 AC_ARG_ENABLE(pipe-render,
1059   AC_HELP_STRING([--enable-pipe-render], [enable threaded pipe rendering support]),
1060   [ build_pipe_render=$enableval ]
1061 )
1062 AC_MSG_RESULT($build_pipe_render)
1063
1064 AC_MSG_CHECKING(whether we can build Threaded Pipe Rendering support)
1065 if test \( "x$build_pipe_render" = "xyes" -o "x$build_pipe_render" = "xauto" \); then
1066   AC_MSG_RESULT(yes)
1067   AC_DEFINE(BUILD_PIPE_RENDER, 1, [Build pipe render support])
1068   build_pipe_render="yes"
1069   need_pthreads="yes"
1070 else
1071   AC_MSG_RESULT(no)
1072   build_pipe_render="no"
1073 fi
1074
1075 #######################################
1076 ## Async Renderer
1077 build_async_render="no"
1078
1079 AC_MSG_CHECKING(whether to build Asynchronously Threaded Pipe Rendering support)
1080 AC_ARG_ENABLE(async-render,
1081  AC_HELP_STRING([--enable-async-render], [enable asynchronously threaded pipe rendering support]),
1082  [ build_async_render=$enableval ]
1083 )
1084 AC_MSG_RESULT($build_async_render)
1085
1086 AC_MSG_CHECKING(whether we can build Asynchronously Threaded Pipe Rendering support)
1087 if test \( "x$build_async_render" = "xyes" \); then
1088   AC_MSG_RESULT(yes)
1089   AC_DEFINE(EVAS_FRAME_QUEUING, 1, [Build async render support])
1090   build_async_render="yes"
1091   AC_DEFINE(BUILD_PIPE_RENDER, 1, [Build pipe render support])
1092   build_pipe_render="yes"
1093   need_pthreads="yes"
1094
1095   PKG_CHECK_MODULES([XEXT],
1096     [xext < 1.1.1],
1097     [ build_avoid_libXext_bug=yes ],
1098     [ build_avoid_libXext_bug=no ]
1099   )
1100   if test \( "x$build_avoid_libXext_bug" = "xyes" \); then
1101     AC_DEFINE(LIBXEXT_VERSION_LOW, 1, [To avoid bug on old libXext version])
1102   fi
1103 else
1104   AC_MSG_RESULT(no)
1105   build_async_render="no"
1106 fi
1107
1108 #######################################
1109 ## Async events
1110 build_async_events="auto"
1111 AC_MSG_CHECKING(whether to build Async Events support)
1112 AC_ARG_ENABLE(async-events,
1113   AC_HELP_STRING([--enable-async-events], [enable async events support]),
1114   [ build_async_events=$enableval ]
1115 )
1116 AC_MSG_RESULT($build_async_events)
1117
1118 AC_MSG_CHECKING(whether we can build Async Events support)
1119 if test "x$build_async_events" = "xyes" || test "x$build_async_events" = "xauto" ; then
1120   AC_MSG_RESULT(yes)
1121   AC_DEFINE(BUILD_ASYNC_EVENTS, 1, [Build async events support])
1122   build_async_events="yes"
1123 else
1124   AC_MSG_RESULT(no)
1125   build_async_events="no"
1126 fi
1127
1128 #######################################
1129 ## Async image preload
1130 build_async_preload="auto"
1131 AC_MSG_CHECKING(whether to build Async Image Preload support)
1132 AC_ARG_ENABLE(async-preload,
1133   AC_HELP_STRING([--enable-async-preload], [enable async image preloading support]),
1134   [ build_async_preload=$enableval ]
1135 )
1136 AC_MSG_RESULT($build_async_preload)
1137
1138 AC_MSG_CHECKING(whether we can build Async Image Preload support)
1139 if test \( "x$build_async_preload" = "xyes" -o "x$build_async_preload" = "xauto" \) -a "x$build_async_events" = "xyes"; then
1140   AC_MSG_RESULT(yes)
1141   AC_DEFINE(BUILD_ASYNC_PRELOAD, 1, [Build async image preload support])
1142   build_async_preload="yes"
1143   need_pthreads="yes"
1144 else
1145   AC_MSG_RESULT(no)
1146   build_async_preload="no"
1147 fi
1148
1149 #######################################
1150 ## Link with pthread if needed
1151 AC_MSG_CHECKING(whether we should link with pthread)
1152 if test "x$need_pthreads" = "xyes"; then
1153   AC_MSG_RESULT(yes)
1154   pthread_cflags=""
1155   pthread_libs="-lpthread"
1156 else
1157   AC_MSG_RESULT(no)
1158 fi
1159
1160 #######################################
1161 ## MMX
1162 build_cpu_mmx="no"
1163 case $host_cpu in
1164   i*86)
1165     build_cpu_mmx="yes"
1166     ;;
1167   x86_64)
1168     build_cpu_mmx="yes"
1169     ;;
1170   amd64)
1171     build_cpu_mmx="yes"
1172     ;;
1173 esac
1174 AC_MSG_CHECKING(whether to build mmx code)
1175 AC_ARG_ENABLE(cpu-mmx,
1176   AC_HELP_STRING([--enable-cpu-mmx], [enable mmx code]),
1177   [
1178       if test "x$enableval" = "xyes" ; then
1179         AC_MSG_RESULT(yes)
1180         AC_DEFINE(BUILD_MMX, 1, [Build MMX Code])
1181         build_cpu_mmx="yes"
1182       else
1183         AC_MSG_RESULT(no)
1184         build_cpu_mmx="no"
1185       fi
1186   ],
1187   [
1188     AC_MSG_RESULT($build_cpu_mmx)
1189     if test "x$build_cpu_mmx" = "xyes" ; then
1190       AC_DEFINE(BUILD_MMX, 1, [Build MMX Code])
1191     fi
1192   ]
1193 )
1194
1195 #######################################
1196 ## SSE
1197 build_cpu_sse="no"
1198 case $host_cpu in
1199   i*86)
1200     build_cpu_sse="yes"
1201     ;;
1202   x86_64)
1203     build_cpu_sse="yes"
1204     ;;
1205   amd64)
1206     build_cpu_sse="yes"
1207     ;;
1208 esac
1209 AC_MSG_CHECKING(whether to build sse code)
1210 AC_ARG_ENABLE(cpu-sse,
1211   AC_HELP_STRING([--enable-cpu-sse], [enable sse code]),
1212   [
1213       if test "x$enableval" = "xyes" ; then
1214         AC_MSG_RESULT(yes)
1215         AC_DEFINE(BUILD_SSE, 1, [Build SSE Code])
1216         build_cpu_sse="yes"
1217       else
1218         AC_MSG_RESULT(no)
1219         build_cpu_sse="no"
1220       fi
1221   ],
1222   [
1223     AC_MSG_RESULT($build_cpu_sse)
1224     if test "x$build_cpu_sse" = "xyes" ; then
1225       AC_DEFINE(BUILD_SSE, 1, [Build SSE Code])
1226     fi
1227   ]
1228 )
1229
1230 #######################################
1231 ## ALTIVEC
1232 build_cpu_altivec="no"
1233 case $host_cpu in
1234   *power* | *ppc*)
1235     build_cpu_altivec="auto"
1236     ;;
1237 esac
1238 altivec_cflags=""
1239 AC_MSG_CHECKING(whether to build altivec code)
1240 AC_ARG_ENABLE(cpu-altivec,
1241   AC_HELP_STRING([--enable-cpu-altivec], [enable altivec code]),
1242   [ build_cpu_altivec=$enableval ],
1243   [
1244     if test ! "x$build_cpu_altivec" = "xauto"; then
1245       build_cpu_altivec="no"
1246     fi
1247   ]
1248 )
1249 AC_MSG_RESULT($build_cpu_altivec)
1250
1251 if test "x$build_cpu_altivec" = "xyes"; then
1252    AC_CHECK_HEADER(altivec.h,
1253      [
1254         AC_DEFINE(BUILD_ALTIVEC, 1, [Build Altivec Code])
1255         AC_DEFINE(HAVE_ALTIVEC_H, 1, [Have altivec.h header file])
1256         build_cpu_altivec="yes"
1257      ],
1258      [
1259        save_CFLAGS=$CFLAGS
1260        save_CPPFLAGS=$CPPFLAGS
1261        CFLAGS=$CFLAGS" -maltivec"
1262        CPPFLAGS=$CPPFLAGS" -maltivec"
1263        unset ac_cv_header_altivec_h
1264        AC_CHECK_HEADER(altivec.h,
1265          [
1266             AC_DEFINE(BUILD_ALTIVEC, 1, [Build Altivec Code])
1267             AC_DEFINE(HAVE_ALTIVEC_H, 1, [Have altivec.h header file])
1268             build_cpu_altivec="yes"
1269          ],
1270          [
1271             if test "x$build_cpu_altivec" = "xyes" -a "x$use_strict" = "xyes" ; then
1272               AC_MSG_ERROR(Altivec not found (strict dependencies checking))
1273             fi
1274             build_cpu_altivec="no"
1275          ]
1276        )
1277        CFLAGS=$save_CFLAGS
1278        CPPFLAGS=$save_CPPFLAGS
1279      ]
1280    )
1281 fi
1282
1283 if test "x$build_cpu_altivec" = "xyes"; then
1284    AC_MSG_CHECKING(whether to use altivec compiler flag)
1285    if test "x$GCC" = "xyes"; then
1286       if echo "int main(){return 0;}" | ${CPP} -faltivec - > /dev/null 2>&1; then
1287          altivec_cflags="-faltivec"
1288          AC_DEFINE(BUILD_ALTIVEC, 1, [Build Altivec Code])
1289       elif echo "int main(){return 0;}" | ${CPP} -maltivec - > /dev/null 2>&1; then
1290          altivec_cflags="-maltivec"
1291          AC_DEFINE(BUILD_ALTIVEC, 1, [Build Altivec Code])
1292       fi
1293    fi
1294   AC_MSG_RESULT($altivec_cflags)
1295    CFLAGS="$CFLAGS $altivec_cflags"
1296 fi
1297
1298 #######################################
1299 ## NEON
1300 build_cpu_neon="no"
1301 case $host_cpu in
1302   arm*)
1303     build_cpu_neon="yes"
1304     ;;
1305 esac
1306 AC_MSG_CHECKING(whether to build neon code)
1307 AC_ARG_ENABLE(cpu-neon,
1308   AC_HELP_STRING([--enable-cpu-neon], [build neon code, the code will be
1309           checked at run time to see if the CPU supports it]),
1310   [
1311      if test "x$enableval" = "xyes" ; then
1312        AC_TRY_COMPILE([],
1313         [asm volatile (".fpu neon\nvqadd.u8 d0, d1, d0\n")],
1314         [
1315           AC_MSG_RESULT(yes)
1316           AC_DEFINE(BUILD_NEON, 1, [Build NEON Code])
1317           build_cpu_neon="yes"
1318         ],[
1319           AC_MSG_RESULT(no)
1320           build_cpu_neon="no"
1321         ])
1322       else
1323         AC_MSG_RESULT(no)
1324         build_cpu_neon="no"
1325       fi
1326   ],
1327   [
1328     if test "x$build_cpu_neon" = "xyes" ; then
1329        AC_TRY_COMPILE([#include <arm_neon.h>],
1330         [asm volatile ("vqadd.u8 d0, d1, d0\n")],
1331         [
1332           AC_MSG_RESULT(yes)
1333           AC_DEFINE(BUILD_NEON, 1, [Build NEON Code])
1334           build_cpu_neon="yes"
1335         ],[
1336           AC_MSG_RESULT(no)
1337           build_cpu_neon="no"
1338         ])
1339     fi
1340   ]
1341 )
1342      
1343 #######################################
1344 ## C
1345 build_cpu_c="yes"
1346 AC_MSG_CHECKING(whether to build c code)
1347 AC_ARG_ENABLE(cpu-c,
1348   AC_HELP_STRING([--enable-cpu-c], [enable C code]),
1349   [
1350       if test "x$enableval" = "xyes" ; then
1351         AC_MSG_RESULT(yes)
1352         AC_DEFINE(BUILD_C, 1, [Build plain C code])
1353         build_cpu_c="yes"
1354       else
1355         AC_MSG_RESULT(no)
1356         build_cpu_c="no"
1357       fi
1358   ], [
1359       AC_MSG_RESULT($build_cpu_c)
1360       if test "x$build_cpu_c" = "xyes" ; then
1361         AC_DEFINE(BUILD_C, 1, [Build plain C code])
1362       fi
1363   ]
1364 )
1365
1366 #######################################
1367 ## MAGIC_DEBUG
1368 want_evas_magic_debug="yes"
1369 AC_MSG_CHECKING(whether to check magic for evas object)
1370 AC_ARG_ENABLE(evas-magic-debug,
1371   AC_HELP_STRING(
1372     [--disable-evas-magic-debug],
1373     [disable MAGIC_DEBUG check when people pass in wrong object type. [[default=enabled]]]
1374   ),
1375   [ want_evas_magic_debug="$enableval" ]
1376 )
1377 AC_MSG_RESULT($want_evas_magic_debug)
1378
1379 AM_CONDITIONAL(EVAS_MAGIC_DEBUG, test "x$want_evas_magic_debug" = "xyes")
1380 if test "x$want_evas_magic_debug" = "xyes"; then
1381   AC_DEFINE(EVAS_MAGIC_DEBUG, 1, [complain when people pass in wrong object types etc.])
1382 fi
1383
1384
1385 #######################################
1386 ## Word Caching
1387 want_word_cache="no"
1388 AC_MSG_CHECKING(whether to enable caching of rendered words)
1389 AC_ARG_ENABLE(word-cache,
1390   AC_HELP_STRING(
1391     [--enable-word-cache],
1392     [Enable experimental word caching to speed up rendering [[default=disabled]]]
1393   ),
1394   [ want_word_cache="$enableval" ]
1395 )
1396 AC_MSG_RESULT($want_word_cache)
1397
1398 AM_CONDITIONAL(WORD_CACHE, test "x$want_word_cache" = "xyes")
1399 if test "x$want_word_cache" = "xyes"; then
1400   AC_DEFINE(WORD_CACHE, 1, [Experimental word caching to speed up text rendering.])
1401 fi
1402
1403 #######################################
1404 ## Metric Caching
1405 want_metric_cache="no"
1406 AC_MSG_CHECKING(whether to enable caching of rendered metrics)
1407 AC_ARG_ENABLE(metric-cache,
1408   AC_HELP_STRING(
1409     [--enable-metric-cache],
1410     [Enable experimental metric caching to speed up rendering [[default=disabled]]]
1411   ),
1412   [ want_metric_cache="$enableval" ]
1413 )
1414 AC_MSG_RESULT($want_metric_cache)
1415
1416 AM_CONDITIONAL(METRIC_CACHE, test "x$want_metric_cache" = "xyes")
1417 if test "x$want_metric_cache" = "xyes"; then
1418   AC_DEFINE(METRIC_CACHE, 1, [Experimental metric caching to speed up text rendering.])
1419 fi
1420
1421
1422
1423 #####################################################################
1424 ## ARGB engine options
1425
1426 #######################################
1427 ## Nearest sampling scaler
1428 EVAS_CHECK_SCALER([scale-sample], [sampling scaler], [scaler_sample="yes"], [scaler_sample="no"])
1429 ## Smooth super and sub sampling scaler
1430 EVAS_CHECK_SCALER([scale-smooth], [smooth scaler], [scaler_smooth="yes"], [scaler_smooth="no"])
1431
1432 #######################################
1433 ## YUV -> ARGB converter
1434 conv_yuv="no"
1435 conv_yuv="yes"
1436 AC_MSG_CHECKING(whether to build yuv converter code)
1437 AC_ARG_ENABLE(convert-yuv,
1438   AC_HELP_STRING([--enable-convert-yuv], [enable yuv converter code]),
1439   [
1440       if test "x$enableval" = "xyes" ; then
1441         AC_MSG_RESULT(yes)
1442         AC_DEFINE(BUILD_CONVERT_YUV, 1, [YUV Converter Support])
1443         conv_yuv="yes"
1444       else
1445         AC_MSG_RESULT(no)
1446         conv_yuv="no"
1447       fi
1448   ], [
1449       AC_MSG_RESULT($conv_yuv)
1450       if test "x$conv_yuv" = "xyes" ; then
1451         AC_DEFINE(BUILD_CONVERT_YUV, 1, [YUV Converter Support])
1452       fi
1453   ]
1454 )
1455
1456 #####################################################################
1457 ## Output rendering features
1458
1459 #######################################
1460 ## Small dither mask instead of big one (lower quality)
1461 EVAS_CHECK_DITHER([small-dither-mask], [small dither mask], [conv_small_dither="yes"], [conv_small_dither="no"])
1462 ## Alternate Line dither mask instead of big one (lower quality - but fastest)
1463 EVAS_CHECK_DITHER([line-dither-mask], [line dither mask], [conv_line_dither="yes"], [conv_line_dither="no"])
1464 ## No dither mask at all for 16bpp
1465 EVAS_CHECK_DITHER([no-dither-mask], [conversion to 16bpp without dither mask], [conv_no_dither="yes"], [conv_no_dither="no"])
1466
1467 #######################################
1468 ## Convert to 8bpp RGB 332
1469 EVAS_CONVERT_COLOR(8, RGB, 332, [yes])
1470 ## Convert to 8bpp RGB 666
1471 EVAS_CONVERT_COLOR(8, RGB, 666, [yes])
1472 ## Convert to 8bpp RGB 232
1473 EVAS_CONVERT_COLOR(8, RGB, 232, [yes])
1474 ## Convert to 8bpp RGB 222
1475 EVAS_CONVERT_COLOR(8, RGB, 222, [yes])
1476 ## Convert to 8bpp RGB 221
1477 EVAS_CONVERT_COLOR(8, RGB, 221, [yes])
1478 ## Convert to 8bpp RGB 121
1479 EVAS_CONVERT_COLOR(8, RGB, 121, [yes])
1480 ## Convert to 8bpp RGB 111
1481 EVAS_CONVERT_COLOR(8, RGB, 111, [yes])
1482 ## Convert to 16bpp RGB 565
1483 EVAS_CONVERT_COLOR(16, RGB, 565)
1484 ## Convert to 16bpp BGR 565
1485 EVAS_CONVERT_COLOR(16, BGR, 565)
1486 ## Convert to 16bpp RGB 555
1487 EVAS_CONVERT_COLOR(16, RGB, 555)
1488 ## Convert to 16bpp RGB 444
1489 EVAS_CONVERT_COLOR(16, RGB, 444)
1490
1491 #######################################
1492 ## Convert to 16bpp RGB 565 (444 ipaq)
1493 conv_16_rgb_ipq="yes"
1494 AC_MSG_CHECKING(whether to build 16bpp 565 (444 ipaq) converter code)
1495 AC_ARG_ENABLE(convert-16-rgb-ipq,
1496   AC_HELP_STRING([--disable-convert-16-rgb-ipq], [disable 16bpp 565 (444 ipaq) converter code]),
1497   [
1498       if test "x$enableval" = "xyes" ; then
1499         AC_DEFINE(BUILD_CONVERT_16_RGB_454645, 1, [16bpp 565 (444 ipaq) Converter Support])
1500         conv_16_rgb_ipq="yes"
1501       else
1502         conv_16_rgb_ipq="no"
1503       fi
1504   ], [
1505       if test "x$conv_16_rgb_ipq" = "xyes" ; then
1506         AC_DEFINE(BUILD_CONVERT_16_RGB_454645, 1, [16bpp 565 (444 ipaq) Converter Support])
1507       fi
1508   ]
1509 )
1510 AC_MSG_RESULT($conv_16_rgb_ipq)
1511
1512 #######################################
1513 ## Convert to 16bpp RGB with rotation of 0
1514 EVAS_CONVERT_ROT(16, RGB, 0)
1515 ## Convert to 16bpp RGB with rotation of 180
1516 EVAS_CONVERT_ROT(16, RGB, 180)
1517 ## Convert to 16bpp RGB with rotation of 270
1518 EVAS_CONVERT_ROT(16, RGB, 270)
1519 ## Convert to 16bpp RGB with rotation of 90
1520 EVAS_CONVERT_ROT(16, RGB, 90)
1521
1522 #######################################
1523 ## Convert to 24bpp RGB 888
1524 EVAS_CONVERT_COLOR(24, RGB, 888)
1525 ## Convert to 24bpp BGR 888
1526 EVAS_CONVERT_COLOR(24, BGR, 888)
1527 ## Convert to 32bpp RGB 8888
1528 EVAS_CONVERT_COLOR(32, RGB, 8888)
1529 ## Convert to 32bpp RGBX 8888
1530 EVAS_CONVERT_COLOR(32, RGBX, 8888)
1531 ## Convert to 32bpp BGR 8888
1532 EVAS_CONVERT_COLOR(32, BGR, 8888)
1533 ## Convert to 32bpp BGRX 8888
1534 EVAS_CONVERT_COLOR(32, BGRX, 8888)
1535
1536 #######################################
1537 ## Convert to 24bpp RGB 666 (666 ezx)
1538 conv_24_rgb_ezx="yes"
1539 AC_MSG_CHECKING(whether to build 24bpp 666 (666 ezx) converter code)
1540 AC_ARG_ENABLE(convert-24-rgb-ezx,
1541   AC_HELP_STRING([--disable-convert-24-rgb-ezx], [disable 24bpp 666 (666 ezx) converter code]),
1542   [
1543       if test "x$enableval" = "xyes" ; then
1544         AC_DEFINE(BUILD_CONVERT_24_RGB_666, 1, [24bpp 666 (666 ezx) Converter Support])
1545         conv_24_rgb_ezx="yes"
1546       else
1547         conv_24_rgb_ezx="no"
1548       fi
1549   ], [
1550       if test "x$conv_24_rgb_ezx" = "xyes" ; then
1551         AC_DEFINE(BUILD_CONVERT_24_RGB_666, 1, [24bpp 666 (666 ezx) Converter Support])
1552       fi
1553   ]
1554 )
1555 AC_MSG_RESULT($conv_24_rgb_ezx)
1556
1557 #######################################
1558 ## Convert to 32bpp RGB 666 (666 ezx)
1559 conv_32_rgb_ezx="yes"
1560 AC_MSG_CHECKING(whether to build 32bpp 666 (666 ezx) converter code)
1561 AC_ARG_ENABLE(convert-32-rgb-ezx,
1562   AC_HELP_STRING([--disable-convert-32-rgb-ezx], [disable 32bpp 666 (666 ezx) converter code]),
1563   [
1564       if test "x$enableval" = "xyes" ; then
1565         AC_DEFINE(BUILD_CONVERT_32_RGB_666, 1, [32bpp 666 (666 ezx) Converter Support])
1566         conv_32_rgb_ezx="yes"
1567       else
1568         conv_32_rgb_ezx="no"
1569       fi
1570   ], [
1571       if test "x$conv_32_rgb_ezx" = "xyes" ; then
1572         AC_DEFINE(BUILD_CONVERT_32_RGB_666, 1, [32bpp 666 (666 ezx) Converter Support])
1573       fi
1574   ]
1575 )
1576 AC_MSG_RESULT($conv_32_rgb_ezx)
1577
1578 #######################################
1579 ## Convert to 32bpp RGB with rotation of 0
1580 EVAS_CONVERT_ROT(32, RGB, 0)
1581 ## Convert to 32bpp RGB with rotation of 180
1582 EVAS_CONVERT_ROT(32, RGB, 180)
1583 ## Convert to 32bpp RGB with rotation of 270
1584 EVAS_CONVERT_ROT(32, RGB, 270)
1585 ## Convert to 32bpp RGB with rotation of 90
1586 EVAS_CONVERT_ROT(32, RGB, 90)
1587
1588 #######################################
1589 ## Convert to 8bpp grayscale with 256 value, no palette
1590 EVAS_CONVERT_COLOR(8, GRY, 1)
1591 ## Convert to 8bpp grayscale with 16 value, no palette
1592 EVAS_CONVERT_COLOR(8, GRY, 16)
1593
1594 #######################################
1595 ## Convert to 8bpp grayscale, 64-palette
1596 conv_8_grayscale_64="yes"
1597 AC_MSG_CHECKING(whether to build 8bpp grayscale 64-palette converter code)
1598 AC_ARG_ENABLE(convert-8-grayscale-64,
1599   AC_HELP_STRING([--disable-convert-8-grayscale-64], [disable 8bpp grayscale 64-palette converter code]),
1600   [
1601      if test "x$enableval" = "xyes"; then
1602        AC_DEFINE(BUILD_CONVERT_8_GRAYSCALE_64, 1, [8bpp Grayscale 64-palette Converter Support])
1603        conv_8_grayscale_64="yes"
1604      else
1605        conv_8_grayscale_64="no"
1606      fi
1607   ], [
1608      if test "x$conv_8_grayscale_64" = "xyes"; then
1609        AC_DEFINE(BUILD_CONVERT_8_GRAYSCALE_64, 1, [32bpp Grayscale 64-palette Converter Support])
1610      fi
1611   ]
1612 )
1613 AC_MSG_RESULT($conv_8_grayscale_64)
1614
1615 ## valgrind
1616 want_valgrind="no"
1617 have_valgrind="no"
1618
1619 AC_MSG_CHECKING(whether to enable build with valgrind)
1620 AC_ARG_ENABLE(valgrind,
1621   AC_HELP_STRING([--enable-valgrind], [enable valgrind fixes to stop false reports]),
1622   [ want_valgrind=$enableval ]
1623 )
1624 AC_MSG_RESULT($want_valgrind)
1625
1626 if test x$want_valgrind = "xyes"; then
1627   PKG_CHECK_MODULES(VALGRIND, valgrind >= 2.4.0,
1628     [
1629       AC_DEFINE(HAVE_VALGRIND, 1, [Valgrind support])
1630       have_valgrind=yes
1631       requirement_evas="valgrind ${requirement_evas}"
1632     ],
1633     [
1634       if test "x$want_valgrind" = "xyes" -a "x$use_strict" = "xyes" ; then
1635         AC_MSG_ERROR([Valgrind not found (strict dependencies checking)])
1636       fi
1637     ]
1638   )
1639 fi
1640
1641 ## Examples
1642
1643 install_examples="yes"
1644 AC_ARG_ENABLE([install-examples],
1645    AC_HELP_STRING([--disable-install-examples],
1646                   [disable installing examples (compiled or just source).
1647                    @<:@default==enabled@:>@]),
1648    [
1649     if test "x${enableval}" = "xyes" ; then
1650        install_examples="yes"
1651     else
1652        install_examples="no"
1653     fi
1654    ],
1655    [install_examples="yes"])
1656 AM_CONDITIONAL([INSTALL_EXAMPLES], [test "x${install_examples}" = "xyes"])
1657
1658 build_examples="no"
1659 AC_ARG_ENABLE([build-examples],
1660    AC_HELP_STRING([--enable-build-examples],
1661                   [enable building examples (this requires extra denpendencies. if you don't have them installed yet, don't build with this option or it will fail. build again when you have it, overriding the previous installation). @<:@default==disabled@:>@]),
1662    [
1663     if test "x${enableval}" = "xyes" ; then
1664        build_examples="yes"
1665        # put in here the dependencies for Evas' examples. they are
1666        # meant to be 'real world' usage examples, thus one will be
1667        # using higher level libraries on these programs
1668        PKG_CHECK_MODULES([ECORE_EVAS], [ecore-evas ecore], [], [build_examples="no"])
1669        PKG_CHECK_MODULES([EDJE], [edje],
1670         [edje_cc=$($PKG_CONFIG --variable=prefix edje)/bin/edje_cc],
1671         [build_examples="no"])
1672        AC_SUBST(edje_cc)
1673     else
1674        build_examples="no"
1675     fi
1676    ],
1677    [build_examples="no"])
1678 AM_CONDITIONAL([BUILD_EXAMPLES], [test "x${build_examples}" = "xyes"])
1679
1680 ## Unit tests, coverage
1681
1682 EFL_CHECK_TESTS([enable_tests="yes"], [enable_tests="no"])
1683
1684 EFL_CHECK_COVERAGE([${enable_tests}], [enable_coverage="yes"], [enable_coverage="no"])
1685 EVAS_CFLAGS="${EVAS_CFLAGS} ${EFL_COVERAGE_CFLAGS}"
1686 EVAS_LIBS="${EVAS_LIBS} ${EFL_COVERAGE_LIBS}"
1687 if test "x$enable_coverage" = "xyes" ; then
1688    EVAS_CFLAGS="${EVAS_CFLAGS} ${EFL_DEBUG_CFLAGS}"
1689 fi
1690
1691 AC_SUBST(EVAS_CFLAGS)
1692 AC_SUBST(EVAS_LIBS)
1693
1694 #####################################################################
1695 ## Fill in flags
1696
1697 AC_SUBST(altivec_cflags)
1698 AC_SUBST(pthread_cflags)
1699 AC_SUBST(pthread_libs)
1700 AC_SUBST(requirement_evas)
1701
1702
1703 #####################################################################
1704 ## Output
1705
1706 AC_OUTPUT([
1707 Makefile
1708 evas-directfb.pc
1709 evas-fb.pc
1710 evas-opengl-x11.pc
1711 evas-opengl-sdl.pc
1712 evas-software-buffer.pc
1713 evas-software-x11.pc
1714 evas-software-8-x11.pc
1715 evas-software-16-x11.pc
1716 evas-software-gdi.pc
1717 evas-software-ddraw.pc
1718 evas-software-16-ddraw.pc
1719 evas-direct3d.pc
1720 evas-software-16-wince.pc
1721 evas-software-sdl.pc
1722 evas.pc
1723 doc/evas.dox
1724 doc/Makefile
1725 doc/Doxyfile
1726 src/Makefile
1727 src/bin/Makefile
1728 src/lib/Makefile
1729 src/lib/canvas/Makefile
1730 src/lib/file/Makefile
1731 src/lib/cache/Makefile
1732 src/lib/cserve/Makefile
1733 src/lib/engines/Makefile
1734 src/lib/engines/common/Makefile
1735 src/lib/engines/common/evas_op_add/Makefile
1736 src/lib/engines/common/evas_op_blend/Makefile
1737 src/lib/engines/common/evas_op_copy/Makefile
1738 src/lib/engines/common/evas_op_mask/Makefile
1739 src/lib/engines/common/evas_op_mul/Makefile
1740 src/lib/engines/common/evas_op_sub/Makefile
1741 src/lib/engines/common_8/Makefile
1742 src/lib/engines/common_16/Makefile
1743 src/modules/Makefile
1744 src/modules/engines/Makefile
1745 src/modules/engines/software_generic/Makefile
1746 src/modules/engines/software_gdi/Makefile
1747 src/modules/engines/software_ddraw/Makefile
1748 src/modules/engines/direct3d/Makefile
1749 src/modules/engines/software_16_wince/Makefile
1750 src/modules/engines/software_x11/Makefile
1751 src/modules/engines/fb/Makefile
1752 src/modules/engines/buffer/Makefile
1753 src/modules/engines/directfb/Makefile
1754 src/modules/engines/gl_common/Makefile
1755 src/modules/engines/gl_x11/Makefile
1756 src/modules/engines/gl_sdl/Makefile
1757 src/modules/engines/software_sdl/Makefile
1758 src/modules/engines/software_8/Makefile
1759 src/modules/engines/software_8_x11/Makefile
1760 src/modules/engines/software_16/Makefile
1761 src/modules/engines/software_16_x11/Makefile
1762 src/modules/engines/software_16_ddraw/Makefile
1763 src/modules/engines/software_16_sdl/Makefile
1764 src/modules/loaders/Makefile
1765 src/modules/loaders/edb/Makefile
1766 src/modules/loaders/eet/Makefile
1767 src/modules/loaders/gif/Makefile
1768 src/modules/loaders/jpeg/Makefile
1769 src/modules/loaders/png/Makefile
1770 src/modules/loaders/tiff/Makefile
1771 src/modules/loaders/xpm/Makefile
1772 src/modules/loaders/bmp/Makefile
1773 src/modules/loaders/ico/Makefile
1774 src/modules/loaders/tga/Makefile
1775 src/modules/loaders/svg/Makefile
1776 src/modules/loaders/pmaps/Makefile
1777 src/modules/loaders/wbmp/Makefile
1778 src/modules/loaders/psd/Makefile
1779 src/modules/loaders/generic/Makefile
1780 src/modules/savers/Makefile
1781 src/modules/savers/edb/Makefile
1782 src/modules/savers/eet/Makefile
1783 src/modules/savers/jpeg/Makefile
1784 src/modules/savers/png/Makefile
1785 src/modules/savers/tiff/Makefile
1786 src/static_deps/Makefile
1787 src/static_deps/liblinebreak/Makefile
1788 src/lib/include/Makefile
1789 src/examples/Makefile
1790 src/tests/Makefile
1791 README
1792 evas.spec
1793 ])
1794
1795 #####################################################################
1796 ## Sanity Checks
1797
1798 if test "x$build_pthreads" = "xno" ; then
1799   if test "x$build_async_render" = "xyes" ; then
1800     echo "ERROR: PThreads off, but async rendering on. Async rendering"
1801     echo "  needs thread support."
1802     exit 1
1803   fi
1804   if test "x$build_pipe_render" = "xyes" ; then
1805     echo "ERROR: PThreads off, but pipe rendering on. Pipe rendering"
1806     echo "  needs thread support."
1807     exit 1
1808   fi
1809 fi
1810
1811 if test "x${has_pthreads}" = "xno" ; then
1812   if test "x$build_async_preload" = "xyes" ; then
1813     echo "ERROR: PThreads off, but Async Preload on. Async Preload"
1814     echo "  needs thread support."
1815     exit 1
1816   fi
1817 fi
1818
1819 #####################################################################
1820 ## Info
1821
1822 echo
1823 echo
1824 echo
1825 echo "------------------------------------------------------------------------"
1826 echo "$PACKAGE $VERSION"
1827 echo "------------------------------------------------------------------------"
1828 echo
1829 echo "Configuration Options Summary:"
1830 echo
1831 echo "Engines:"
1832 echo "  Software Memory Buffer.....: $have_evas_engine_buffer"
1833 echo "  Software X11...............: $have_evas_engine_software_x11 (Xlib: $have_evas_engine_software_xlib) (XCB: $have_evas_engine_software_xcb)"
1834 echo $ECHO_N "  OpenGL X11.................: $have_evas_engine_gl_x11 (Xlib: $have_evas_engine_gl_xlib) (XCB: $have_evas_engine_gl_xcb) $ECHO_C"
1835 if test "x$have_evas_engine_gl_x11" = "xyes"; then
1836   echo "(GLES: $gl_flavor_gles) (SGX: $gles_variety_sgx) (s3c6410: $gles_variety_s3c6410)"
1837 else
1838   echo
1839 fi
1840 echo "  Software GDI...............: $have_evas_engine_software_gdi"
1841 echo "  Software DirectDraw........: $have_evas_engine_software_ddraw"
1842 echo "  Direct3d...................: $have_evas_engine_direct3d"
1843 echo "  Software SDL...............: $have_evas_engine_software_sdl (primitive: $sdl_primitive)"
1844 echo $ECHO_N "  OpenGL SDL.................: $have_evas_engine_gl_sdl $ECHO_C"
1845 if test "x$have_evas_engine_gl_sdl" = "xyes"; then
1846   echo "(GLES: $gl_flavor_gles) (SGX: $gles_variety_sgx) (s3c6410: $gles_variety_s3c6410)"
1847 else
1848   echo
1849 fi
1850 echo "  Software Framebuffer.......: $have_evas_engine_fb"
1851 echo "  DirectFB...................: $have_evas_engine_directfb"
1852 echo "  Software 8bit grayscale....: $have_evas_engine_software_8"
1853 # FIXME: kill software 16bit
1854 echo "  Software 16bit ............: $have_evas_engine_software_16"
1855 echo "  Software 16bit X11.........: $have_evas_engine_software_16_x11"
1856 echo "  Software 16bit Directdraw..: $have_evas_engine_software_16_ddraw"
1857 echo "  Software 16bit WinCE.......: $have_evas_engine_software_16_wince"
1858 echo "  Software 16bit SDL.........: $have_evas_engine_software_sdl (primitive: $sdl_primitive)"
1859 echo
1860 echo "Image Loaders:"
1861 echo "  BMP.....................: $have_evas_image_loader_bmp"
1862 echo "  EDB.....................: $have_evas_image_loader_edb"
1863 echo "  EET.....................: $have_evas_image_loader_eet"
1864 echo "  GENERIC.................: $have_evas_image_loader_generic"
1865 echo "  GIF.....................: $have_evas_image_loader_gif"
1866 echo "  ICO.....................: $have_evas_image_loader_ico"
1867 echo "  JPEG....................: $have_evas_image_loader_jpeg (region: $have_jpeg_region)"
1868 echo "  PMAPS...................: $have_evas_image_loader_pmaps"
1869 echo "  PNG.....................: $have_evas_image_loader_png"
1870 echo "  PSD.....................: $have_evas_image_loader_psd"
1871 echo "  SVG.....................: $have_evas_image_loader_svg"
1872 echo "  TGA.....................: $have_evas_image_loader_tga"
1873 echo "  TIFF....................: $have_evas_image_loader_tiff"
1874 echo "  WBMP....................: $have_evas_image_loader_wbmp"
1875 echo "  XPM.....................: $have_evas_image_loader_xpm"
1876 echo
1877 echo "Font Sourcing Systems:"
1878 echo "  EET.....................: $have_evas_font_loader_eet"
1879 echo
1880 echo "Font Searching Systems:"
1881 echo "  Fontconfig..............: $have_fontconfig"
1882 echo
1883 echo "Font Rendering Helpers:"
1884 echo "  Fribidi.................: $have_fribidi"
1885 echo "  Harfbuzz................: $have_harfbuzz"
1886 echo "  liblinebreak............: $have_linebreak"
1887 # FIXME: add non freetype2 font engine support
1888 # FIXME: make freetype2 optional
1889 echo
1890 echo "CPU Specific Extensions:"
1891 echo "  Fallback C Code.........: $build_cpu_c"
1892 echo "  MMX.....................: $build_cpu_mmx"
1893 echo "  SSE.....................: $build_cpu_sse"
1894 echo "  ALTIVEC.................: $build_cpu_altivec"
1895 echo "  NEON....................: $build_cpu_neon"
1896 echo "  Thread Support..........: $build_pthreads"
1897 echo
1898 echo "Features:"
1899 echo "  MAGIC_DEBUG.............: $want_evas_magic_debug"
1900 echo "  Cache Server............: $want_evas_cserve"
1901 echo
1902 dnl
1903 dnl ... DISABLED! some testing has shown that this seems to have some
1904 dnl nasty bugs on both x86 and arm (tegra2 dual core tested), so just
1905 dnl disabling this for now until it can be fixed
1906 dnl 
1907 echo "  Threaded Pipe Rendering.: $build_pipe_render"
1908 echo "  Async Pipe Rendering....: $build_async_render"
1909 echo "  Async Events............: $build_async_events"
1910 echo "  Async Image Preload.....: $build_async_preload"
1911 echo
1912 echo "  Word Cache..............: $want_word_cache"
1913 echo "  Metric Cache............: $want_metric_cache"
1914 echo
1915 echo "ARGB Software Engine Options:"
1916 echo "  Sampling Scaler.........: $scaler_sample"
1917 echo "  Smooth Scaler...........: $scaler_smooth"
1918 # FIXME: add an mmx scaler routine
1919 echo "  YUV Converter...........: $conv_yuv"
1920 # FIXME: add more YUV format and colorvariant support
1921 echo
1922 echo "ARGB Conversion Options:"
1923 echo "  Smaller Dither Mask.....: $conv_small_dither"
1924 echo "  Line Dither Mask........: $conv_line_dither"
1925 echo "  No Dither Mask for 16bpp: $conv_no_dither"
1926 echo "  8bpp RGB 332............: $conv_8_rgb_332"
1927 echo "  8bpp RGB 666............: $conv_8_rgb_666"
1928 echo "  8bpp RGB 232............: $conv_8_rgb_232"
1929 echo "  8bpp RGB 222............: $conv_8_rgb_222"
1930 echo "  8bpp RGB 221............: $conv_8_rgb_221"
1931 echo "  8bpp RGB 121............: $conv_8_rgb_121"
1932 echo "  8bpp RGB 111............: $conv_8_rgb_111"
1933 echo "  8bpp Grayscale (256)....: $conv_8_gry_1"
1934 echo "  8bpp Grayscale (16).....: $conv_8_gry_16"
1935 echo "  8bpp Grayscale 64-pal...: $conv_8_grayscale_64"
1936 # FIXME: add grayscale and B&W support to standard x converters
1937 echo "  16bpp RGB 565...........: $conv_16_rgb_565"
1938 echo "  16bpp BGR 565...........: $conv_16_bgr_565"
1939 echo "  16bpp RGB 555...........: $conv_16_rgb_555"
1940 echo "  16bpp RGB 444...........: $conv_16_rgb_444"
1941 echo "  16bpp RGB 565 (444 ipaq): $conv_16_rgb_ipq"
1942 # FIXME: add 555 (444 ipaq) support
1943 # FIXME: add 30bpp support
1944 # FIXME: add palletted support (ugh!)
1945 # FIXME: add 8bpp and below rotation
1946 echo "  16bpp Rotation 0........: $conv_16_rgb_rot_0"
1947 echo "  16bpp Rotation 90.......: $conv_16_rgb_rot_90"
1948 echo "  16bpp Rotation 180......: $conv_16_rgb_rot_180"
1949 echo "  16bpp Rotation 270......: $conv_16_rgb_rot_270"
1950 echo "  24bpp RGB 888...........: $conv_24_rgb_888"
1951 echo "  24bpp BGR 888...........: $conv_24_bgr_888"
1952 echo "  24bpp RGB 666 (666 ezx).: $conv_24_rgb_ezx"
1953 # FIXME: add 24bpp rotation
1954 echo "  32bpp RGB 8888..........: $conv_32_rgb_8888"
1955 echo "  32bpp RGBX 8888.........: $conv_32_rgbx_8888"
1956 echo "  32bpp BGR 8888..........: $conv_32_bgr_8888"
1957 echo "  32bpp BGRX 8888.........: $conv_32_bgrx_8888"
1958 echo "  32bpp RGB 666 (666 ezx).: $conv_32_rgb_ezx"
1959 echo "  32bpp Rotation 0........: $conv_32_rgb_rot_0"
1960 echo "  32bpp Rotation 90.......: $conv_32_rgb_rot_90"
1961 echo "  32bpp Rotation 180......: $conv_32_rgb_rot_180"
1962 echo "  32bpp Rotation 270......: $conv_32_rgb_rot_270"
1963 echo
1964 echo "Documentation.............: ${build_doc}"
1965 echo "Examples..................: install:${install_examples} build:${build_examples}"
1966 if test "x${enable_tests}" = "xyes" ; then
1967    echo "Tests.....................: ${enable_tests} (make check)"
1968 else
1969    echo "Tests.....................: ${enable_tests}"
1970 fi
1971 if test "x${enable_coverage}" = "xyes" ; then
1972    echo "Coverage..................: ${enable_coverage} (make coverage)"
1973 else
1974    echo "Coverage..................: ${enable_coverage}"
1975 fi
1976 echo
1977 echo "Compilation............: make (or gmake)"
1978 echo "  CPPFLAGS.............: $CPPFLAGS"
1979 echo "  CFLAGS...............: $CFLAGS"
1980 echo "  CXXFLAGS.............: $CXXFLAGS"
1981 echo "  LDFLAGS..............: $LDFLAGS"
1982 echo
1983 echo "Installation...........: make install (as root if needed, with 'su' or 'sudo')"
1984 echo "  prefix...............: $prefix"
1985 echo
1986 if test "x${have_static_module}" = "xyes" ; then
1987 echo -e "\0033\01331;31mWarning\0033\01331;0m: You are trying to link statically one or more modules to Evas."
1988 echo "         You must know what you are doing, or else you will have a lot of"
1989 echo "         problems. And Kenny will be killed."
1990 echo "         Think about that."
1991 echo
1992 fi