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