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