0de4e51e98bd91b5e79f6e1ee6e7add7b8888619
[profile/ivi/ecore.git] / configure.ac
1 # get rid of that stupid cache mechanism
2 rm -f config.cache
3
4 AC_INIT([ecore], [0.9.9.063], [enlightenment-devel@lists.sourceforge.net])
5 release="ver-pre-svn-05"
6 AC_PREREQ([2.52])
7 AC_CONFIG_SRCDIR([configure.ac])
8 AC_CONFIG_MACRO_DIR([m4])
9 AC_CANONICAL_BUILD
10 AC_CANONICAL_HOST
11 AC_ISC_POSIX
12
13 AM_INIT_AUTOMAKE([1.6 dist-bzip2])
14 AM_CONFIG_HEADER([config.h])
15 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
16
17 AC_GNU_SOURCE
18
19 AC_LIBTOOL_WIN32_DLL
20 define([AC_LIBTOOL_LANG_F77_CONFIG], [:])dnl
21 AC_PROG_LIBTOOL
22
23 VMAJ=`echo $PACKAGE_VERSION | awk -F. '{printf("%s", $1);}'`
24 VMIN=`echo $PACKAGE_VERSION | awk -F. '{printf("%s", $2);}'`
25 VMIC=`echo $PACKAGE_VERSION | awk -F. '{printf("%s", $3);}'`
26 SNAP=`echo $PACKAGE_VERSION | awk -F. '{printf("%s", $4);}'`
27 version_info=`expr $VMAJ + $VMIN`":$VMIC:$VMIN"
28 AC_SUBST(version_info)
29
30 AM_GNU_GETTEXT_VERSION([0.12.1])
31 AM_GNU_GETTEXT([external])
32
33 EFL_CHECK_PATH_MAX
34
35 case "$host_os" in
36    mingw32ce* | cegcc*)
37       ;;
38    *)
39       ecore_config_release_info="-release $release"
40       ecore_con_release_info="-release $release"
41       ecore_data_release_info="-release $release"
42       ecore_directfb_release_info="-release $release"
43       ecore_evas_release_info="-release $release"
44       ecore_fb_release_info="-release $release"
45       ecore_file_release_info="-release $release"
46       ecore_imf_evas_release_info="-release $release"
47       ecore_imf_release_info="-release $release"
48       ecore_input_release_info="-release $release"
49       ecore_input_evas_release_info="-release $release"
50       ecore_ipc_release_info="-release $release"
51       ecore_quartz_release_info="-release $release"
52       ecore_release_info="-release $release"
53       ecore_sdl_release_info="-release $release"
54       ecore_txt_release_info="-release $release"
55       ecore_win32_release_info="-release $release"
56       ecore_x_release_info="-release $release"
57       ;;
58 esac
59 AC_SUBST(ecore_config_release_info)
60 AC_SUBST(ecore_con_release_info)
61 AC_SUBST(ecore_data_release_info)
62 AC_SUBST(ecore_directfb_release_info)
63 AC_SUBST(ecore_evas_release_info)
64 AC_SUBST(ecore_fb_release_info)
65 AC_SUBST(ecore_file_release_info)
66 AC_SUBST(ecore_imf_evas_release_info)
67 AC_SUBST(ecore_imf_release_info)
68 AC_SUBST(ecore_input_release_info)
69 AC_SUBST(ecore_input_evas_release_info)
70 AC_SUBST(ecore_ipc_release_info)
71 AC_SUBST(ecore_quartz_release_info)
72 AC_SUBST(ecore_release_info)
73 AC_SUBST(ecore_sdl_release_info)
74 AC_SUBST(ecore_txt_release_info)
75 AC_SUBST(ecore_win32_release_info)
76 AC_SUBST(ecore_wince_release_info)
77 AC_SUBST(ecore_x_release_info)
78
79 AC_DEFINE_UNQUOTED(SHARED_LIB_SUFFIX, "$shrext_cmds", [Suffix for shared objects])
80
81
82 ### Default options with respect to host
83
84 # dependencies and options
85 want_curl="no"
86 want_abstract_sockets="no"
87 want_gnutls="no"
88 want_openssl="no"
89 want_cares="no"
90 want_cipher="no"
91 want_signature="no"
92 want_poll="yes"
93 want_inotify="no"
94 want_notify_win32="no"
95 want_tslib="no"
96 want_glib="no"
97
98 # core modules
99 want_ecore_data="yes"
100 want_ecore_txt="no"
101 want_ecore_con="no"
102 want_ecore_ipc="no"
103 want_ecore_file="yes"
104 want_ecore_config="no"
105 want_ecore_imf="no"
106 want_ecore_input="yes"
107
108 # graphic system modules
109 want_evas_simple_x11="no"
110 want_ecore_x_xcb="no"
111 want_ecore_x="no"
112 want_ecore_win32="no"
113 want_ecore_quartz="no"
114 want_ecore_sdl="no"
115 want_ecore_fb="no"
116 want_ecore_directfb="no"
117 want_ecore_wince="no"
118
119 # ecore_x options (both xlib and xcb)
120 want_ecore_x_composite="yes"
121 want_ecore_x_damage="yes"
122 want_ecore_x_dpms="yes"
123 want_ecore_x_randr="yes"
124 want_ecore_x_render="yes"
125 want_ecore_x_screensaver="yes"
126 want_ecore_x_shape="yes"
127 want_ecore_x_sync="yes"
128 want_ecore_x_xfixes="yes"
129 want_ecore_x_xinerama="yes"
130 want_ecore_x_xprint="yes"
131 want_ecore_x_xtest="yes"
132 want_ecore_x_cursor="yes"
133 want_ecore_x_input="yes"
134
135 # ecore_evas modules
136 want_ecore_evas="yes"
137 want_ecore_evas_software_buffer="yes"
138 want_ecore_evas_software_x11="no"
139 want_ecore_evas_xrender_x11="no"
140 want_ecore_evas_opengl_x11="no"
141 want_ecore_evas_software_16_x11="no"
142 want_ecore_evas_software_xcb="no"
143 want_ecore_evas_xrender_xcb="no"
144 want_ecore_evas_software_gdi="no"
145 want_ecore_evas_software_ddraw="no"
146 want_ecore_evas_direct3d="no"
147 want_ecore_evas_opengl_glew="no"
148 want_ecore_evas_software_16_ddraw="no"
149 want_ecore_evas_quartz="no"
150 want_ecore_evas_software_sdl="no"
151 want_ecore_evas_gl_sdl="no"
152 want_ecore_evas_directfb="no"
153 want_ecore_evas_fb="no"
154 want_ecore_evas_software_16_wince="no"
155
156 case "$host_os" in
157    mingw32ce* | cegcc*)
158       want_ecore_wince="yes"
159       want_ecore_evas_software_16_wince="yes"
160       ;;
161    mingw*)
162       want_notify_win32="yes"
163       want_curl="yes"
164       want_glib="auto"
165       want_ecore_imf="yes"
166       want_ecore_win32="yes"
167       want_ecore_evas_software_gdi="yes"
168       want_ecore_evas_software_ddraw="yes"
169       want_ecore_evas_direct3d="yes"
170       want_ecore_evas_opengl_glew="yes"
171       want_ecore_evas_software_16_ddraw="auto"
172       want_ecore_evas_software_sdl="yes"
173       want_ecore_evas_gl_sdl="yes"
174       ;;
175    darwin*)
176       want_curl="yes"
177       want_glib="auto"
178       want_gnutls="auto"
179       want_openssl="auto"
180       want_ecore_con="yes"
181       want_ecore_ipc="yes"
182       want_ecore_config="yes"
183       want_ecore_imf="yes"
184       want_ecore_quartz="yes"
185       want_ecore_evas_quartz="yes"
186       want_ecore_evas_software_sdl="yes"
187       want_ecore_evas_gl_sdl="yes"
188       ;;
189    *)
190       want_curl="yes"
191       want_glib="auto"
192       want_abstract_sockets="yes"
193       want_gnutls="auto"
194       want_openssl="auto"
195       want_cipher="yes"
196       want_signature="yes"
197       want_inotify="yes"
198       want_tslib="yes"
199       want_ecore_con="yes"
200       want_ecore_ipc="yes"
201       want_ecore_config="yes"
202       want_ecore_imf="yes"
203       want_ecore_x="yes"
204       want_ecore_evas_software_x11="yes"
205       want_ecore_evas_xrender_x11="yes"
206       want_ecore_evas_opengl_x11="yes"
207       want_ecore_evas_software_16_x11="yes"
208       want_ecore_evas_software_xcb="yes"
209       want_ecore_evas_xrender_xcb="yes"
210       want_ecore_evas_software_sdl="yes"
211       want_ecore_evas_gl_sdl="yes"
212       want_ecore_evas_directfb="yes"
213       want_ecore_evas_fb="yes"
214       ;;
215 esac
216
217 requirements_ecore=""
218 requirements_ecore_con=""
219 requirements_ecore_config=""
220 requirements_ecore_data=""
221 requirements_ecore_directfb=""
222 requirements_ecore_evas=""
223 requirements_ecore_fb=""
224 requirements_ecore_file=""
225 requirements_ecore_imf=""
226 requirements_ecore_imf_evas=""
227 requirements_ecore_input=""
228 requirements_ecore_input_evas=""
229 requirements_ecore_ipc=""
230 requirements_ecore_quartz=""
231 requirements_ecore_sdl=""
232 requirements_ecore_txt=""
233 requirements_ecore_x=""
234 requirements_ecore_win32=""
235 requirements_ecore_wince=""
236
237 ### Additional options to configure
238
239 # abstract sockets (ecore_con.c)
240 AC_ARG_ENABLE([abstract-sockets],
241    [AC_HELP_STRING([--disable-abstract-sockets], [disable abstract sockets.])],
242    [
243     if test "x${enableval}" = "xyes" ; then
244        want_abstract_sockets="yes"
245     else
246        want_abstract_sockets="no"
247     fi
248    ],
249    [want_abstract_sockets="yes"])
250
251 if test "x${want_abstract_sockets}" = "xyes" ; then
252    AC_DEFINE([HAVE_ABSTRACT_SOCKETS], [1], [Have abstract sockets namespace])
253 fi
254
255 # Simple X11 build/link
256
257 AC_ARG_ENABLE(simple-x11,
258   AC_HELP_STRING([--enable-simple-x11], [enable simple x11 linking]),
259   [want_evas_simple_x11=$enableval])
260
261 # XIM
262 AC_ARG_ENABLE([xim],
263    [AC_HELP_STRING([--enable-xim], [enable X Input Method.])],
264    [
265     if test "x${enableval}" = "xyes" ; then
266        want_xim="yes"
267     else
268        want_xim="no"
269     fi
270    ],
271    [want_xim="no"])
272
273 if test "x${want_xim}" = "xyes" ; then
274    AC_DEFINE([ENABLE_XIM], [1], [Enable X Input Method])
275 fi
276
277
278 ### Checks for programs
279
280 m4_ifdef([AC_PROG_OBJC],
281    [
282     AC_PROG_OBJC
283     _AM_DEPENDENCIES(OBJC)
284    ],
285    [
286     AC_CHECK_TOOL([OBJC], [gcc])
287     AC_SUBST([OBJC])
288     AC_SUBST([OBJCFLAGS])
289    ])
290 AC_PROG_CXX
291 AC_PROG_CC
292
293 have_gnu_objc=${ac_cv_objc_compiler_gnu}
294
295 # doxygen program for documentation building
296
297 EFL_CHECK_DOXYGEN([build_doc="yes"], [build_doc="no"])
298
299 # The first call to PKG_CHECK_MODULES is done conditionally,
300 # so we should include this here:
301 PKG_PROG_PKG_CONFIG
302
303 # Check whether pkg-config supports Requires.private
304 if $PKG_CONFIG --atleast-pkgconfig-version 0.22; then
305    pkgconfig_requires_private="Requires.private"
306 else
307    pkgconfig_requires_private="Requires"
308 fi
309 AC_SUBST(pkgconfig_requires_private)
310
311
312 ### Checks for libraries
313
314 # Evil library for compilation on Windows
315
316 case "$host_os" in
317    mingw* | cegcc*)
318       PKG_CHECK_MODULES([EVIL], [evil])
319       AC_DEFINE(HAVE_EVIL, 1, [Set to 1 if Evil library is installed])
320       requirements_ecore="evil ${requirements_ecore}"
321       requirements_ecore_evas="evil ${requirements_ecore_evas}"
322       requirements_ecore_file="evil ${requirements_ecore_file}"
323       requirements_ecore_imf="evil ${requirements_ecore_imf}"
324       requirements_ecore_imf_evas="evil ${requirements_ecore_imf_evas}"
325       EFL_ECORE_BUILD="-DEFL_ECORE_BUILD"
326       EFL_ECORE_FILE_BUILD="-DEFL_ECORE_FILE_BUILD"
327       EFL_ECORE_EVAS_BUILD="-DEFL_ECORE_EVAS_BUILD"
328       EFL_ECORE_IMF_BUILD="-DEFL_ECORE_IMF_BUILD"
329       EFL_ECORE_INPUT_BUILD="-DEFL_ECORE_INPUT_BUILD"
330       ;;
331 esac
332
333 have_win32=""
334 have_wince=""
335 case "$host_os" in
336    mingw32ce* | cegcc*)
337       EFL_ECORE_WINCE_BUILD="-DEFL_ECORE_WINCE_BUILD"
338       requirements_ecore_wince="evil ${requirements_ecore_wince}"
339       have_wince="yes"
340       ;;
341    mingw*)
342       EFL_ECORE_WIN32_BUILD="-DEFL_ECORE_WIN32_BUILD"
343       EFL_ECORE_SDL_BUILD="-DEFL_ECORE_SDL_BUILD"
344       requirements_ecore_win32="evil ${requirements_ecore_win32}"
345       requirements_ecore_sdl="evil ${requirements_ecore_sdl}"
346       have_win32="yes"
347       ;;
348 esac
349
350 AC_SUBST(EFL_ECORE_BUILD)
351 AC_SUBST(EFL_ECORE_FILE_BUILD)
352 AC_SUBST(EFL_ECORE_EVAS_BUILD)
353 AC_SUBST(EFL_ECORE_IMF_BUILD)
354 AC_SUBST(EFL_ECORE_INPUT_BUILD)
355 AC_SUBST(EFL_ECORE_WINCE_BUILD)
356 AC_SUBST(EFL_ECORE_WIN32_BUILD)
357 AC_SUBST(EFL_ECORE_SDL_BUILD)
358
359 AM_CONDITIONAL(ECORE_HAVE_WINCE, test "x${have_wince}" = "xyes")
360 AM_CONDITIONAL(ECORE_HAVE_WIN32, test "x${have_win32}" = "xyes")
361
362 WIN32_LIBS=""
363 case "$host_os" in
364    mingw32ce* | cegcc*)
365       WIN32_LIBS="-lws2"
366       dlopen_libs="-ldl"
367       ;;
368    mingw*)
369       WIN32_LIBS="-lws2_32"
370       dlopen_libs="-ldl"
371       ;;
372    *)
373       AC_CHECK_LIB(dl, dlopen, dlopen_libs=-ldl)
374       ;;
375 esac
376 AC_SUBST(WIN32_LIBS)
377 AC_SUBST(dlopen_libs)
378
379 # Eina library
380
381 PKG_CHECK_MODULES(EINA, [eina-0])
382 #FIXME check all the requirements when the eina move will be finished
383 requirements_ecore="eina-0 ${requirements_ecore}"
384 requirements_ecore_con="ecore eina-0 ${requirements_ecore_con}"
385 requirements_ecore_config="ecore eina-0 ${requirements_ecore_config}"
386 requirements_ecore_data="ecore eina-0 ${requirements_ecore_data}"
387 requirements_ecore_directfb="ecore eina-0 ${requirements_ecore_directfb}"
388 requirements_ecore_evas="ecore eina-0 ${requirements_ecore_evas}"
389 requirements_ecore_fb="ecore eina-0 ${requirements_ecore_fb}"
390 requirements_ecore_file="ecore eina-0 ${requirements_ecore_file}"
391 requirements_ecore_imf="ecore eina-0 ${requirements_ecore_imf}"
392 requirements_ecore_imf_evas="ecore eina-0 ${requirements_ecore_imf_evas}"
393 requirements_ecore_input="ecore eina-0 ${requirements_ecore_input}"
394 requirements_ecore_input_evas="ecore eina-0 ${requirements_ecore_input_evas}"
395 requirements_ecore_ipc="ecore eina-0 ${requirements_ecore_ipc}"
396 requirements_ecore_quartz="ecore eina-0 ${requirements_ecore_quartz}"
397 requirements_ecore_sdl="ecore eina-0 ${requirements_ecore_sdl}"
398 requirements_ecore_win32="ecore eina-0 ${requirements_ecore_win32}"
399 requirements_ecore_wince="ecore eina-0 ${requirements_ecore_wince}"
400 requirements_ecore_x="ecore eina-0 ${requirements_ecore_x}"
401
402
403 # glib support (main loop integration)
404 AC_ARG_ENABLE([glib],
405    [AC_HELP_STRING([--disable-glib], [enable glib support. @<:@default=detect@:>@])],
406    [want_glib=$enableval], [])
407
408 if test "x$want_glib" != "xno"; then
409    PKG_CHECK_MODULES([GLIB], [glib-2.0], [have_glib="yes"], [have_glib="no"])
410 else
411    have_glib="no"
412 fi
413 if test "x$want_glib" = "xyes" -a "x$have_glib" = "xno"; then
414    AC_MSG_ERROR([GLib support requested, but no GLib found by pkg-config.])
415 elif test "x$have_glib" = "xyes"; then
416    AC_DEFINE(HAVE_GLIB, [1], [Have GLib])
417    requirements_ecore="glib-2.0 ${requirements_ecore}"
418 fi
419
420
421 # iconv library (ecore_txt)
422
423 iconv_cflags=""
424 iconv_libs=""
425 have_iconv="no"
426 AC_ARG_WITH([iconv-link],
427    AC_HELP_STRING([--with-iconv-link=ICONV_LINK], [explicitly specify an iconv link option]),
428    [
429     iconv_libs=$withval
430     have_iconv="yes"
431    ])
432
433 AC_MSG_CHECKING(for explicit iconv link options)
434 if test "x${iconv_libs}" = "x" ; then
435    AC_MSG_RESULT([no explicit iconv link option])
436 else
437    AC_MSG_RESULT([$iconv_libs])
438 fi
439
440 AM_ICONV
441
442 if test "x${have_iconv}" = "xno" && test "x${am_cv_func_iconv}" = "xyes" ; then
443    iconv_cflags=${LIBICONV}
444    iconv_libs=${LTLIBICONV}
445    have_iconv="yes"
446 fi
447
448 AC_SUBST(iconv_cflags)
449 AC_SUBST(iconv_libs)
450
451
452 # SDL library (ecore_sdl)
453
454 have_sdl="no"
455 SDL_CONFIG="sdl-config"
456 AC_ARG_WITH([sdl-config],
457    [AC_HELP_STRING([--with-sdl-config=PATH], [use sdl-config specified])],
458    [
459     SDL_CONFIG=$withval
460     AC_MSG_NOTICE([using ${SDL_CONFIG} for sdl-config])
461    ])
462
463 AC_PATH_PROG([SDL_CONFIG], ["sdl-config"], [""], [$PATH])
464
465 if test -z "$SDL_CONFIG" ; then
466    SDL_CFLAGS=`$SDL_CONFIG --cflags`
467    SDL_LIBS=`$SDL_CONFIG --libs`
468    AC_SUBST(SDL_CFLAGS)
469    AC_SUBST(SDL_LIBS)
470    have_sdl="no"
471 else
472    PKG_CHECK_MODULES([SDL], [sdl >= 1.2.0], [have_sdl="yes"], [have_sdl="no"])
473 fi
474
475 if test "x${have_sdl}" = "xyes" ; then
476    PKG_CHECK_EXISTS([sdl >= 1.3.0],
477       [AC_DEFINE(BUILD_ECORE_EVAS_SDL_130, 1, [Support for SVN SDL])])
478 fi
479
480
481 # DirectFB library (ecore_directfb)
482
483 PKG_CHECK_MODULES([DIRECTFB],
484    [directfb >= 0.9.16],
485    [have_directfb="yes"],
486    [have_directfb="no"])
487
488
489 # Eet library (ecore_config)
490
491 PKG_CHECK_MODULES([EET],
492    [eet >= 1.0.0],
493    [have_eet="yes"],
494    [have_eet="no"])
495
496
497 # Xlib and XCB (ecore_x)
498
499 have_x="no"
500 have_ecore_x="no"
501 have_ecore_x_xlib="no"
502 have_ecore_x_xcb="no"
503
504 x_dir="";
505 x_includes="";
506 x_cflags="";
507 x_libs="";
508
509 ecore_x_libs_private=""
510
511 AC_ARG_ENABLE(ecore-x-composite,
512    [AC_HELP_STRING([--disable-ecore-x-composite],
513        [disable the ecore_x support for Xcomposite extension.
514         @<:@default=detect@:>@])],
515    [want_ecore_x_composite=$enableval])
516
517 AC_ARG_ENABLE(ecore-x-damage,
518    [AC_HELP_STRING([--disable-ecore-x-damage],
519        [disable the ecore_x support for Xdamage extension.
520         @<:@default=detect@:>@])],
521    [want_ecore_x_damage=$enableval])
522
523 AC_ARG_ENABLE(ecore-x-dpms,
524    [AC_HELP_STRING([--disable-ecore-x-dpms],
525        [disable the ecore_x support for Xdpms extension.
526         @<:@default=detect@:>@])],
527    [want_ecore_x_dpms=$enableval])
528
529 AC_ARG_ENABLE(ecore-x-randr,
530    [AC_HELP_STRING([--disable-ecore-x-randr],
531        [disable the ecore_x support for Xrandr extension.
532         @<:@default=detect@:>@])],
533    [want_ecore_x_randr=$enableval])
534
535 AC_ARG_ENABLE(ecore-x-render,
536    [AC_HELP_STRING([--disable-ecore-x-render],
537        [disable the ecore_x support for Xrender extension.
538         @<:@default=detect@:>@])],
539    [want_ecore_x_render=$enableval])
540
541 AC_ARG_ENABLE(ecore-x-screensaver,
542    [AC_HELP_STRING([--disable-ecore-x-screensaver],
543        [disable the ecore_x support for Xscreensaver extension.
544         @<:@default=detect@:>@])],
545    [want_ecore_x_screensaver=$enableval])
546
547 AC_ARG_ENABLE(ecore-x-shape,
548    [AC_HELP_STRING([--disable-ecore-x-shape],
549        [disable the ecore_x support for Xshape extension.
550         @<:@default=detect@:>@])],
551    [want_ecore_x_shape=$enableval])
552
553 AC_ARG_ENABLE(ecore-x-sync,
554    [AC_HELP_STRING([--disable-ecore-x-sync],
555        [disable the ecore_x support for Xsync extension.
556         @<:@default=detect@:>@])],
557    [want_ecore_x_sync=$enableval])
558
559 AC_ARG_ENABLE(ecore-x-xfixes,
560    [AC_HELP_STRING([--disable-ecore-x-xfixes],
561        [disable the ecore_x support for Xfixes extension.
562         @<:@default=detect@:>@])],
563    [want_ecore_x_xfixes=$enableval])
564
565 AC_ARG_ENABLE(ecore-x-xinerama,
566    [AC_HELP_STRING([--disable-ecore-x-xinerama],
567        [disable the ecore_x support for Xinerama extension.
568         @<:@default=detect@:>@])],
569    [want_ecore_x_xinerama=$enableval])
570
571 AC_ARG_ENABLE(ecore-x-xprint,
572    [AC_HELP_STRING([--disable-ecore-x-xprint],
573        [disable the ecore_x support for Xprint extension.
574         @<:@default=detect@:>@])],
575    [want_ecore_x_xprint=$enableval])
576
577 AC_ARG_ENABLE(ecore-x-xtest,
578    [AC_HELP_STRING([--disable-ecore-x-xtest],
579        [disable the ecore_x support for Xtest extension.
580         @<:@default=detect@:>@])],
581    [want_ecore_x_xtest=$enableval])
582
583 AC_ARG_ENABLE(ecore-x-cursor,
584    [AC_HELP_STRING([--disable-ecore-x-cursor],
585        [disable the ecore_x support for Xcursor extension.
586         @<:@default=detect@:>@])],
587    [want_ecore_x_cursor=$enableval])
588
589 AC_ARG_ENABLE(ecore-x-input,
590    [AC_HELP_STRING([--disable-ecore-x-input],
591        [disable the ecore_x support for Xinput/Xinput2 extension.
592         @<:@default=detect@:>@])],
593    [want_ecore_x_input=$enableval])
594
595
596 AC_ARG_ENABLE(ecore-x-xcb,
597    [AC_HELP_STRING([--enable-ecore-x-xcb],
598        [enable the ecore_x module with XCB backend. @<:@default=disabled@:>@])],
599    [want_ecore_x_xcb=$enableval],
600    [want_ecore_x_xcb="no"])
601
602 AC_MSG_CHECKING(whether ecore_x with XCB backend is to be built)
603 AC_MSG_RESULT($want_ecore_x_xcb)
604
605 if test "x$want_ecore_x_xcb" = "xyes" ; then
606   PKG_CHECK_MODULES(XCB, xcb xcb-icccm xcb-image xcb-keysyms pixman-1,
607     [ have_ecore_x_xcb="yes"
608       requirements_ecore_x="xcb xcb-icccm xcb-image xcb-keysyms pixman-1 ${requirements_ecore_x}" ],
609     [ have_ecore_x_xcb="no" ])
610
611   if test "x$have_ecore_x_xcb" = "xyes" ; then
612     if test "x$want_ecore_x_composite" != "xno"; then
613       PKG_CHECK_MODULES(XCB_COMPOSITE, xcb-composite,
614         [ have_ecore_x_xcb_composite="yes"
615           requirements_ecore_x="xcb-composite ${requirements_ecore_x}"
616           AC_DEFINE(ECORE_XCB_COMPOSITE, 1, [Build support for XCB composite]) ],
617         [ have_ecore_x_xcb_composite="no" ])
618     else
619       have_ecore_x_xcb_composite="no"
620       AC_MSG_NOTICE("composite extension explicitly disabled")
621     fi
622
623     if test "x$want_ecore_x_damage" != "xno"; then
624       PKG_CHECK_MODULES(XCB_DAMAGE, xcb-damage,
625         [ have_ecore_x_xcb_damage="yes"
626           requirements_ecore_x="xcb-damage ${requirements_ecore_x}"
627           AC_DEFINE(ECORE_XCB_DAMAGE, 1, [Build support for XCB damage]) ],
628         [ have_ecore_x_xcb_damage="no" ])
629     else
630       have_ecore_x_xcb_damage="no"
631       AC_MSG_NOTICE("damage extension explicitly disabled")
632     fi
633
634     if test "x$want_ecore_x_dpms" != "xno"; then
635       PKG_CHECK_MODULES(XCB_DPMS, xcb-dpms,
636         [ have_ecore_x_xcb_dpms="yes"
637           requirements_ecore_x="xcb-dpms ${requirements_ecore_x}"
638           AC_DEFINE(ECORE_XCB_DPMS, 1, [Build support for XCB dpms]) ],
639         [ have_ecore_x_xcb_dpms="no" ])
640     else
641       have_ecore_x_xcb_dpms="no"
642       AC_MSG_NOTICE("dpms extension explicitly disabled")
643     fi
644
645     if test "x$want_ecore_x_randr" != "xno"; then
646       PKG_CHECK_MODULES(XCB_RANDR, xcb-randr,
647         [ have_ecore_x_xcb_randr="yes"
648           requirements_ecore_x="xcb-randr ${requirements_ecore_x}"
649           AC_DEFINE(ECORE_XCB_RANDR, 1, [Build support for XCB randr]) ],
650         [ have_ecore_x_xcb_randr="no" ])
651     else
652       have_ecore_x_xcb_randr="no"
653       AC_MSG_NOTICE("randr extension explicitly disabled")
654     fi
655
656     if test "x$want_ecore_x_render" != "xno"; then
657       PKG_CHECK_MODULES(XCB_RENDER, xcb-render,
658         [ have_ecore_x_xcb_render="yes"
659           requirements_ecore_x="xcb-render ${requirements_ecore_x}"
660           AC_DEFINE(ECORE_XCB_RENDER, 1, [Build support for XCB render]) ],
661         [ have_ecore_x_xcb_render="no" ])
662     else
663       have_ecore_x_xcb_render="no"
664       AC_MSG_NOTICE("render extension explicitly disabled")
665     fi
666
667     if test "x$want_ecore_x_screensaver" != "xno"; then
668       PKG_CHECK_MODULES(XCB_SCREENSAVER, xcb-screensaver,
669         [ have_ecore_x_xcb_screensaver="yes"
670           requirements_ecore_x="xcb-screensaver ${requirements_ecore_x}"
671           AC_DEFINE(ECORE_XCB_SCREENSAVER, 1, [Build support for XCB screensaver]) ],
672         [ have_ecore_x_xcb_screensaver="no" ])
673     else
674       have_ecore_x_xcb_screensaver="no"
675       AC_MSG_NOTICE("screensaver extension explicitly disabled")
676     fi
677
678     if test "x$want_ecore_x_shape" != "xno"; then
679       PKG_CHECK_MODULES(XCB_SHAPE, xcb-shape,
680         [ have_ecore_x_xcb_shape="yes"
681           requirements_ecore_x="xcb-shape ${requirements_ecore_x}"
682           AC_DEFINE(ECORE_XCB_SHAPE, 1, [Build support for XCB shape]) ],
683         [ have_ecore_x_xcb_shape="no" ])
684     else
685       have_ecore_x_xcb_shape="no"
686       AC_MSG_NOTICE("shape extension explicitly disabled")
687     fi
688
689     if test "x$want_ecore_x_sync" != "xno"; then
690       PKG_CHECK_MODULES(XCB_SYNC, xcb-sync,
691         [ have_ecore_x_xcb_sync="yes"
692           requirements_ecore_x="xcb-sync ${requirements_ecore_x}"
693           AC_DEFINE(ECORE_XCB_SYNC, 1, [Build support for XCB sync]) ],
694         [ have_ecore_x_xcb_sync="no" ])
695     else
696       have_ecore_x_xcb_sync="no"
697       AC_MSG_NOTICE("sync extension explicitly disabled")
698     fi
699
700     if test "x$want_ecore_x_xfixes" != "xno"; then
701       PKG_CHECK_MODULES(XCB_XFIXES, xcb-xfixes,
702         [ have_ecore_x_xcb_xfixes="yes"
703           requirements_ecore_x="xcb-xfixes ${requirements_ecore_x}"
704           AC_DEFINE(ECORE_XCB_FIXES, 1, [Build support for XCB xfixes]) ],
705         [ have_ecore_x_xcb_xfixes="no" ])
706     else
707       have_ecore_x_xcb_xfixes="no"
708       AC_MSG_NOTICE("xfixes extension explicitly disabled")
709     fi
710
711     if test "x$want_ecore_x_xinerama" != "xno"; then
712       PKG_CHECK_MODULES(XCB_XINERAMA, xcb-xinerama,
713         [ have_ecore_x_xcb_xinerama="yes"
714           requirements_ecore_x="xcb-xinerama ${requirements_ecore_x}"
715           AC_DEFINE(ECORE_XCB_XINERAMA, 1, [Build support for XCB xinerama]) ],
716         [ have_ecore_x_xcb_xinerama="no" ])
717     else
718       have_ecore_x_xcb_xinerama="no"
719       AC_MSG_NOTICE("xinerama extension explicitly disabled")
720     fi
721
722     if test "x$want_ecore_x_xprint" != "xno"; then
723       PKG_CHECK_MODULES(XCB_XPRINT, xcb-xprint,
724         [ have_ecore_x_xcb_xprint="yes"
725           requirements_ecore_x="xcb-xprint ${requirements_ecore_x}"
726           AC_DEFINE(ECORE_XCB_XPRINT, 1, [Build support for XCB xprint]) ],
727         [ have_ecore_x_xcb_xprint="no" ])
728     else
729       have_ecore_x_xcb_xprint="no"
730       AC_MSG_NOTICE("xprint extension explicitly disabled")
731     fi
732
733     if test "x$want_ecore_x_xtest" != "xno"; then
734       PKG_CHECK_MODULES(XCB_XTEST, xcb-xtest,
735         [ have_ecore_x_xcb_xtest="yes"
736           requirements_ecore_x="xcb-xtest ${requirements_ecore_x}"
737           AC_DEFINE(ECORE_XCB_XTEST, 1, [Build support for XCB xtest]) ],
738         [ have_ecore_x_xcb_xtest="no" ])
739     else
740       have_ecore_x_xcb_xtest="no"
741       AC_MSG_NOTICE("xtest extension explicitly disabled")
742     fi
743
744     AC_DEFINE(HAVE_ECORE_X_XCB, 1, [Defined to 1 if XCB is enabled.])
745
746     x_cflags=$XCB_CFLAGS
747     x_libs=$XCB_LIBS
748     have_x="yes"
749
750     have_ecore_x_xcb_define="-DHAVE_ECORE_X_XCB"
751     AC_SUBST(have_ecore_x_xcb_define)
752   fi
753 fi
754
755 if ! test "x$have_ecore_x_xcb" = "xyes" ; then
756   AC_PATH_XTRA
757   AC_CHECK_HEADER(X11/X.h,
758     [
759      if test "x$want_evas_simple_x11" = "xyes"; then
760        x_libs="${x_libs} -lX11 -lXext"
761      else
762        x_dir=${x_dir:-/usr/X11R6}
763        x_cflags=${x_cflags:--I${x_includes:-$x_dir/include}}
764        x_libs="${x_libs:--L${x_libraries:-$x_dir/lib}} -lX11 -lXext"
765      fi
766      have_ecore_x_xlib="yes"
767     ]
768   )
769
770   if test "x$have_ecore_x_xlib" = "xyes"; then
771     Xcursor_libs=""
772     Xcursor_cflags=""
773     use_Xcursor="no"
774     PCFLAGS=$CFLAGS
775     CFLAGS="$x_cflags $x_includes"
776
777     if test "x$want_ecore_x_cursor" = "xyes"; then
778       AC_CHECK_HEADER(X11/Xcursor/Xcursor.h,
779         [
780           AC_CHECK_LIB(Xcursor, XcursorImageLoadCursor,
781             [
782               AC_DEFINE(ECORE_XCURSOR, 1, [Build support for Xcursor])
783               Xcursor_cflags=""
784               Xcursor_libs="-lXcursor"
785               use_Xcursor="yes"
786             ], [
787               Xcursor_cflags=""
788               Xcursor_libs=""
789               use_Xcursor="no"
790             ], [
791               $x_libs -lXrender
792             ]
793           )
794         ], [
795           Xcursor_cflags=""
796           Xcursor_libs=""
797           use_Xcursor="no"
798         ], [
799           #include <X11/Xlib.h>
800         ]
801       )
802       CFLAGS=$PCFLAGS
803     else
804       Xcursor_cflags=""
805       Xcursor_libs=""
806       use_Xcursor="no"
807       AC_MSG_NOTICE("Xcursor explicitly disabled")
808     fi
809
810     AC_SUBST(Xcursor_cflags)
811     AC_SUBST(Xcursor_libs)
812
813     ECORE_CHECK_X_EXTENSION([Xkb], [XKB.h], [X11], [XkbSetDetectableAutoRepeat], [$want_ecore_x_xkb])
814     ECORE_CHECK_X_EXTENSION([Xcomposite], [Xcomposite.h], [Xcomposite], [XCompositeQueryExtension], [$want_ecore_x_composite])
815     ECORE_CHECK_X_EXTENSION([Xdamage], [Xdamage.h], [Xdamage], [XDamageSubtract], [$want_ecore_x_damage])
816     ECORE_CHECK_X_EXTENSION([Xdpms], [dpms.h], [Xdpms], [DPMSQueryExtension], [$want_ecore_x_dpms])
817     if test "x$use_xdpms" = "xno" ; then
818       ECORE_CHECK_X_EXTENSION([Xdpms], [dpms.h], [Xext], [DPMSQueryExtension], [$want_ecore_x_dpms])
819     fi
820     ECORE_CHECK_X_EXTENSION([Xfixes], [Xfixes.h], [Xfixes], [XFixesExpandRegion], [$want_ecore_x_xfixes])
821     ECORE_CHECK_X_EXTENSION([Xinerama], [Xinerama.h], [Xinerama], [XineramaQueryScreens], [$want_ecore_x_xinerama])
822     ECORE_CHECK_X_EXTENSION([Xprint], [Print.h], [Xp], [XpQueryScreens], [$want_ecore_x_xprint])
823     ECORE_CHECK_X_EXTENSION([Xrandr], [Xrandr.h], [Xrandr], [XRRGetScreenResourcesCurrent], [$want_ecore_x_randr])
824     ECORE_CHECK_X_EXTENSION([Xrender], [Xrender.h], [Xrender], [XRenderFindVisualFormat], [$want_ecore_x_render])
825     ECORE_CHECK_X_EXTENSION([Xtest], [XTest.h], [Xtst], [XTestFakeKeyEvent], [$want_ecore_x_xtest])
826     ECORE_CHECK_X_EXTENSION([Xss], [scrnsaver.h], [Xss], [XScreenSaverSelectInput], [$want_ecore_x_screensaver])
827     ECORE_CHECK_X_EXTENSION([Xi2], [XInput2.h], [Xi], [XIQueryDevice], [$want_ecore_x_input])
828
829     ecore_x_libs_private="${Xcursor_libs} ${XKB_LIBS} ${XCOMPOSITE_LIBS} ${XDAMAGE_LIBS} ${XDPMS_LIBS} ${XFIXES_LIBS} ${XINERAMA_LIBS} ${XPRINT_LIBS} ${XRANDR_LIBS} ${XRENDER_LIBS} ${XTEST_LIBS} ${XSS_LIBS} ${XI2_LIBS}"
830
831     AC_DEFINE(HAVE_ECORE_X_XLIB, 1, [Defined to 1 if Xlib is enabled.])
832     have_x="yes"
833
834     have_ecore_x_xlib="yes"
835   fi
836 fi
837
838 AC_SUBST(x_cflags)
839 AC_SUBST(x_includes)
840 AC_SUBST(x_libs)
841 AC_SUBST(ecore_x_libs_private)
842
843 AM_CONDITIONAL(BUILD_ECORE_X_XLIB, test $have_ecore_x_xlib = yes)
844 AM_CONDITIONAL(BUILD_ECORE_X_XCB, test $have_ecore_x_xcb = yes)
845
846
847 # Evas library (ecore_config, ecore_input_evas, ecore_imf_evas and ecore_evas)
848
849 PKG_CHECK_MODULES([EVAS], [evas >= 0.9.9],
850    [have_evas="yes"],
851    [have_evas="no"])
852
853
854 ### Checks for header files
855
856 AC_HEADER_SYS_WAIT
857
858 case "$host_os" in
859    mingw* | cegcc*)
860       AC_DEFINE(HAVE_DLFCN_H, 1, [Define to 1 if you have the <dlfcn.h> header file.])
861       AC_DEFINE(HAVE_SYS_MMAN_H, 1, [Define to 1 if you have the <sys/mman.h> header file.])
862       AC_DEFINE(HAVE_SYS_TIME_H, 1, [Define to 1 if you have the <sys/time.h> header file.])
863       ;;
864    *)
865       AC_CHECK_HEADERS([dlfcn.h features.h langinfo.h locale.h netdb.h netinet/in.h sys/time.h sys/mman.h signal.h sys/resource.h])
866       ;;
867 esac
868
869 # Framebuffer (ecore_fb)
870 have_fb="no"
871 AC_CHECK_HEADER([linux/fb.h],
872    [AC_CHECK_HEADER([linux/input.h], [have_fb="yes"])])
873
874 # Quartz header files (ecore_quartz)
875
876 quartz_ldflags="";
877 have_quartz="no"
878
879 if test "x${have_gnu_objc}" = "xyes" ; then
880    AC_LANG_PUSH([Objective C])
881    AC_CHECK_HEADER([Cocoa/Cocoa.h],
882       [
883        have_quartz="yes"
884        quartz_ldflags="-framework Cocoa"
885       ],
886       [have_quartz="no"])
887    AC_LANG_POP([Objective C])
888 fi
889
890 AC_SUBST(quartz_ldflags)
891
892 # basic pthread support
893
894 EFL_CHECK_PTHREAD([have_pthread="yes"], [have_pthread="no"])
895
896 ### Checks for types
897 AC_CHECK_SIZEOF(int, 4)
898 AC_CHECK_SIZEOF(long, 4)
899
900
901 ### Checks for structures
902
903
904 ### Checks for compiler characteristics
905 AM_PROG_CC_STDC
906 AC_C_CONST
907 AC_C_BIGENDIAN
908 AC_HEADER_STDC
909 AC_C___ATTRIBUTE__
910
911 WIN32_CPPFLAGS=""
912 WIN32_CFLAGS=""
913 case "$host_os" in
914    mingw32ce*)
915       WIN32_CPPFLAGS="-D_WIN32_WCE=0x0420"
916       ;;
917    cegcc*)
918       WIN32_CPPFLAGS="-D_WIN32_WCE=0x0420"
919       WIN32_CFLAGS="-mwin32"
920       ;;
921    mingw*)
922       WIN32_CPPFLAGS="-D_WIN32_WINNT=0x0500"
923       ;;
924 esac
925 AC_SUBST(WIN32_CPPFLAGS)
926 AC_SUBST(WIN32_CFLAGS)
927
928
929 ### Checks for linker characteristics
930
931 # use --enable-auto-import on Windows
932
933 lt_enable_auto_import=""
934 case "$host_os" in
935    mingw* | cegcc*)
936       lt_enable_auto_import="-Wl,--enable-auto-import"
937       ;;
938 esac
939 AC_SUBST(lt_enable_auto_import)
940
941 ### Checks for library functions
942 AC_FUNC_ALLOCA
943 AC_CHECK_FUNCS(gettimeofday strlcpy)
944
945 have_atfile_source=auto
946 AC_ARG_ENABLE(atfile-source,
947         AC_HELP_STRING([--disable-atfile-source],
948                        [disable use of atfile source functions as openat and mkdirat @<:@default=detect@:>@]),
949         [have_atfile_source=$enableval], [have_atfile_source=auto])
950
951 if test "x$have_atfile_source" != "xno"; then
952         AC_CHECK_FUNCS(mkdirat,
953                 [
954                 have_atfile_source=yes
955                 AC_DEFINE(HAVE_ATFILE_SOURCE, 1, [mkdirat exists])
956                 ],
957                 [
958                 if test "x$have_atfile_source" = "xyes"; then
959                         AC_MSG_ERROR([required atfile-source but no mkdirat()])
960                 fi
961                 have_atfile_source=no
962                 ])
963 fi
964
965 ### Ecore modules
966
967 ## Core modules
968
969 # ecore_data
970 ECORE_CHECK_MODULE([data], [${want_ecore_data}], [Data])
971
972 # ecore_txt
973 ECORE_CHECK_MODULE([txt], [${want_ecore_txt}], [Txt], [$have_iconv])
974
975 # ecore_con
976 ECORE_CHECK_MODULE([con], [${want_ecore_con}], [Con])
977
978 have_curl="no"
979 have_gnutls="no"
980 have_openssl="no"
981 have_cares="no"
982 if test "x${have_ecore_con}" = "xyes" ; then
983
984    ECORE_CHECK_CURL([${want_curl}],
985       [
986        have_curl="yes"
987        requirements_ecore_con="libcurl ${requirements_ecore_con}"
988       ],
989       [have_curl="no"])
990
991    ECORE_CHECK_GNUTLS([${want_gnutls}],
992       [have_gnutls="yes"],
993       [have_gnutls="no"])
994
995    ECORE_CHECK_OPENSSL([${want_openssl}],
996       [have_openssl="yes"],
997       [have_openssl="no"])
998
999    if test "x${have_gnutls}" = "xyes" ; then
1000       requirements_ecore_con="gnutls ${requirements_ecore_con}"
1001       # no need to add it to req_ecore_ipc, since they
1002       # depends on ecore_con anyway.
1003    else
1004       if test "x${have_openssl}" = "xyes" ; then
1005          requirements_ecore_con="openssl ${requirements_ecore_con}"
1006          # no need to add it to req_ecore_ipc, since they
1007          # depends on ecore_con anyway.
1008       fi
1009    fi
1010
1011    ECORE_CHECK_CARES([${want_cares}],
1012       [
1013        have_cares="yes"
1014        requirements_ecore_con="libcares ${requirements_ecore_con}"
1015       ],
1016       [have_cares="no"])
1017
1018 fi
1019
1020 AM_CONDITIONAL([HAVE_CARES], [test "x${have_cares}" = "xyes"])
1021
1022 # ecore_ipc
1023 ECORE_CHECK_MODULE([ipc], [${want_ecore_ipc}], [Ipc], [${have_ecore_con}],
1024    [requirements_ecore_ipc="ecore-con ${requirements_ecore_ipc}"])
1025
1026 # ecore_file
1027 ECORE_CHECK_MODULE([file], [${want_ecore_file}], [File])
1028
1029 have_poll="no"
1030 have_inotify="no"
1031 have_notify_win32="no"
1032 if test "x${have_ecore_file}" = "xyes" ; then
1033    ECORE_CHECK_POLL([${want_poll}], [have_poll="yes"], [have_poll="no"])
1034    ECORE_CHECK_INOTIFY([${want_inotify}], [have_inotify="yes"], [have_inotify="no"])
1035    ECORE_CHECK_NOTIFY_WIN32([${want_notify_win32}], [have_notify_win32="yes"], [have_notify_win32="no"])
1036
1037    if test "x${have_ecore_con}" = "xyes" ; then
1038       requirements_ecore_file="ecore-con ${requirements_ecore_file}"
1039    fi
1040 fi
1041
1042 # ecore_config
1043 ecore_config_deps="no"
1044 if test "x${have_eet}" = "xyes" -a "x${have_evas}"  -a "x${have_ecore_ipc}" ; then
1045    ecore_config_deps="yes"
1046 fi
1047
1048 ECORE_CHECK_MODULE([config], [${want_ecore_config}], [Config], [${ecore_config_deps}],
1049    [requirements_ecore_config="ecore-ipc evas eet ${requirements_ecore_config}"])
1050
1051 # ecore_imf
1052
1053 ECORE_CHECK_MODULE([imf], [${want_ecore_imf}], [Imf])
1054
1055 # ecore_imf_evas
1056
1057 ecore_imf_evas_deps="no"
1058 if test "x${have_ecore_imf}" = "xyes" -a "x${have_evas}" = "xyes" ; then
1059    ecore_imf_evas_deps="yes"
1060 fi
1061
1062 ECORE_CHECK_MODULE([imf-evas], [${want_ecore_imf}], [Imf_Evas], [${ecore_imf_evas_deps}],
1063    [requirements_ecore_imf_evas="ecore-imf evas ${requirements_ecore_imf_evas}"])
1064
1065 # ecore_input{_evas}
1066 ECORE_CHECK_MODULE([input], [${want_ecore_input}], [Input])
1067 ECORE_CHECK_MODULE([input-evas], [${want_ecore_input}], [Input_Evas], [${have_evas}],
1068    [requirements_ecore_input_evas="ecore-input evas ${requirements_ecore_input}"])
1069
1070 ## Graphic systems
1071
1072 # ecore_x{cb}
1073
1074 ecore_x_deps="no"
1075 if test "x${have_x}" = "xyes" -a \
1076         "x${have_ecore_input}" = "xyes" ; then
1077    ecore_x_deps="yes"
1078 fi
1079
1080 ECORE_CHECK_MODULE([x], [${want_ecore_x}], [X], [${ecore_x_deps}],
1081   [
1082    ecore_x_libs="$ecore_x_libs $x_libs"
1083    requirements_ecore_x="ecore-input ${requirements_ecore_x}"
1084   ])
1085
1086 # ecore_win32
1087
1088 ECORE_CHECK_MODULE([win32], [${want_ecore_win32}], [Win32], [${have_ecore_input}],
1089    [
1090     ecore_win32_libs="-lole32 -lgdi32"
1091     requirements_ecore_win32="ecore-input ${requirements_ecore_win32}"
1092    ])
1093 AC_SUBST(ecore_win32_libs)
1094
1095 # ecore_quartz
1096
1097 ecore_quartz_deps="no"
1098 if test "x${have_ecore_input}" = "xyes" -a "x${have_quartz}" = "xyes" ; then
1099    ecore_quartz_deps="yes"
1100 fi
1101
1102 ECORE_CHECK_MODULE([quartz], [${want_ecore_quartz}], [Quartz], [${ecore_quartz_deps}],
1103    [requirements_ecore_quartz="ecore-input ${requirements_ecore_quartz}"])
1104
1105 # ecore_sdl
1106
1107 ecore_sdl_deps="no"
1108 if test "x${have_sdl}" = "xyes" -a "x${have_ecore_input}" = "xyes" ; then
1109    ecore_sdl_deps="yes"
1110 fi
1111
1112 ECORE_CHECK_MODULE([sdl], [${want_ecore_sdl}], [Sdl], [${ecore_sdl_deps}],
1113    [requirements_ecore_sdl="ecore-input ${requirements_ecore_sdl}"])
1114
1115 # ecore_fb
1116 ECORE_CHECK_MODULE([fb], [${want_ecore_fb}], [FB], [$have_fb])
1117
1118 if test "x${have_ecore_fb}" = "xyes" ; then
1119    ECORE_CHECK_TSLIB([${want_tslib}],
1120       [
1121        have_tslib="yes"
1122        requirements_ecore_fb="${_tslib_requirement} ${requirements_ecore_fb}"
1123       ],
1124       [have_tslib="no"])
1125 fi
1126
1127 # ecore_directfb
1128
1129 ECORE_CHECK_MODULE([directfb], [${want_ecore_directfb}], [DirectFB], [${have_directfb}],
1130    [requirements_ecore_directfb="directfb ${requirements_ecore_directfb}"])
1131
1132 # ecore_wince
1133
1134 ECORE_CHECK_MODULE([wince], [${want_ecore_wince}], [WinCE], [${have_ecore_input}],
1135    [requirements_ecore_win32="ecore-input ${requirements_ecore_win32}"])
1136
1137 ## Ecore Evas
1138
1139 # ecore_evas
1140
1141 ecore_evas_deps="no"
1142 if test "x${have_evas}" = "xyes" -a "x${have_ecore_input}" = "xyes" -a "x${have_ecore_input_evas}" = "xyes" ; then
1143    ecore_evas_deps="yes"
1144 fi
1145
1146 ECORE_CHECK_MODULE([evas], [${want_ecore_evas}], [Evas], [${ecore_evas_deps}],
1147   [requirements_ecore_evas="ecore-input ecore-input-evas evas ${requirements_ecore_evas}"])
1148
1149 # ecore_evas_buffer
1150
1151 ECORE_EVAS_CHECK_MODULE([software-buffer],
1152    [${want_ecore_evas_software_buffer}],
1153    [Software Buffer],
1154    [yes])
1155
1156 # ecore_evas_x11
1157
1158 # ecore_evas_software_x11
1159
1160 ECORE_EVAS_CHECK_MODULE([software-x11],
1161    [${want_ecore_evas_software_x11}],
1162    [Software X11],
1163    [${have_ecore_x}])
1164
1165 have_ecore_evas_software_xlib=no"
1166 have_ecore_evas_software_xcb=no"
1167 if test "x$have_ecore_evas_software_x11" = "xyes" ; then
1168    have_ecore_evas_software_xlib=`${PKG_CONFIG} --variable=Xlib evas-software-x11`
1169    if test "x${have_ecore_evas_software_xlib}" = "xyes" -a "x${have_ecore_x_xlib}" = "xyes" ; then
1170       AC_DEFINE(BUILD_ECORE_EVAS_SOFTWARE_XLIB, 1, [Evas Software Xlib Engine Support])
1171    fi
1172    have_ecore_evas_software_xcb=`${PKG_CONFIG} --variable=XCB evas-software-x11`
1173    if test "x$have_ecore_evas_software_xcb" = "xyes" -a "x${have_ecore_x_xcb}" = "xyes" ; then
1174       AC_DEFINE(BUILD_ECORE_EVAS_SOFTWARE_XCB, 1, [Evas Software XCB Engine Support])
1175    fi
1176 fi
1177
1178 # ecore_evas_xrender_x11
1179
1180 ECORE_EVAS_CHECK_MODULE([xrender-x11],
1181    [${want_ecore_evas_xrender_x11}],
1182    [XRender Xlib],
1183    [${have_ecore_x_xlib}])
1184
1185 # ecore_evas_opengl_x11
1186
1187 ECORE_EVAS_CHECK_MODULE([opengl-x11],
1188    [${want_ecore_evas_opengl_x11}],
1189    [OpenGL Xlib],
1190    [${have_ecore_x_xlib}])
1191
1192 # ecore_evas_software_x11 16 bits
1193
1194 ECORE_EVAS_CHECK_MODULE([software-16-x11],
1195    [${want_ecore_evas_software_16_x11}],
1196    [Software Xlib 16 bits],
1197    [${have_ecore_x_xlib}])
1198
1199 # ecore_evas_xrender_xcb
1200
1201 ECORE_EVAS_CHECK_MODULE([xrender-xcb],
1202    [${want_ecore_evas_xrender_xcb}],
1203    [XRender XCB],
1204    [${ecore_evas_xcb_deps}])
1205
1206 if test "x$have_ecore_evas_software_x11" = "xyes" -o \
1207         "x$have_ecore_evas_xrender_x11" = "xyes" -o \
1208         "x$have_ecore_evas_opengl_x11" = "xyes" -o \
1209         "x$have_ecore_evas_software_16_x11" = "xyes" -o \
1210         "x$have_ecore_evas_software_xcb" = "xyes" -o \
1211         "x$have_ecore_evas_xrender_xcb" = "xyes"; then
1212    AC_DEFINE(BUILD_ECORE_EVAS_X11, 1, [Support for X Window Engines in Ecore_Evas])
1213    requirements_ecore_evas="ecore-x ${requirements_ecore_evas}"
1214 fi
1215
1216 # ecore_evas_win32
1217
1218 ECORE_EVAS_CHECK_MODULE([software-gdi],
1219    [${want_ecore_evas_software_gdi}],
1220    [Software GDI],
1221    [${have_ecore_win32}])
1222
1223 ECORE_EVAS_CHECK_MODULE([software-ddraw],
1224    [${want_ecore_evas_software_ddraw}],
1225    [Software DirectDraw],
1226    [${have_ecore_win32}])
1227
1228 ECORE_EVAS_CHECK_MODULE([direct3d],
1229    [${want_ecore_evas_direct3d}],
1230    [Direct3d],
1231    [${have_ecore_win32}])
1232
1233 ECORE_EVAS_CHECK_MODULE([opengl-glew],
1234    [${want_ecore_evas_opengl_glew}],
1235    [Glew OpenGL],
1236    [${have_ecore_win32}])
1237
1238 ECORE_EVAS_CHECK_MODULE([software-16-ddraw],
1239    [${want_ecore_evas_software_16_ddraw}],
1240    [16 bpp Software DirectDraw],
1241    [${have_ecore_win32}])
1242
1243 if test "x${have_ecore_evas_software_gdi}" = "xyes" -o \
1244         "x${have_ecore_evas_software_ddraw}" = "xyes" -o \
1245         "x${have_ecore_evas_direct3d}" = "xyes" -o \
1246         "x${have_ecore_evas_opengl_glew}" = "xyes" -o \
1247         "x${have_ecore_evas_software_16_ddraw}" = "xyes" ; then
1248    AC_DEFINE(BUILD_ECORE_EVAS_WIN32, 1, [Support for Win32 Engine in Ecore_Evas])
1249    requirements_ecore_evas="ecore-win32 ${requirements_ecore_evas}"
1250 fi
1251
1252 # ecore_evas_quartz
1253
1254 ECORE_EVAS_CHECK_MODULE([quartz],
1255    [${want_ecore_evas_quartz}],
1256    [Quartz],
1257    [${have_ecore_quartz}],
1258    [requirements_ecore_evas="ecore-quartz ${requirements_ecore_evas}"])
1259
1260 # ecore_evas_software_sdl
1261
1262 ECORE_EVAS_CHECK_MODULE([software-sdl],
1263    [${want_ecore_evas_software_sdl}],
1264    [Software SDL],
1265    [${have_ecore_sdl}],
1266    [requirements_ecore_evas="ecore-sdl ${requirements_ecore_evas}"])
1267
1268 # ecore_evas_gl_sdl
1269
1270 ECORE_EVAS_CHECK_MODULE([opengl-sdl],
1271    [${want_ecore_evas_gl_sdl}],
1272    [OpenGL SDL],
1273    [${have_ecore_sdl}],
1274    [requirements_ecore_evas="ecore-sdl ${requirements_ecore_evas}"])
1275
1276 # ecore_evas_directfb
1277
1278 ECORE_EVAS_CHECK_MODULE([directfb],
1279    [${want_ecore_evas_directfb}],
1280    [DirectFB],
1281    [${have_ecore_directfb}],
1282    [requirements_ecore_evas="ecore-directfb ${requirements_ecore_evas}"])
1283
1284 # ecore_evas_fb
1285
1286 ECORE_EVAS_CHECK_MODULE([fb],
1287    [${want_ecore_evas_fb}],
1288    [Linux Framebuffer],
1289    [${have_ecore_fb}],
1290    [requirements_ecore_evas="ecore-fb ${requirements_ecore_evas}"])
1291
1292 # ecore_evas_wince
1293
1294 ECORE_EVAS_CHECK_MODULE([software-16-wince],
1295    [${want_ecore_evas_software_16_wince}],
1296    [16 bpp Software Windows CE],
1297    [${have_ecore_wince}],
1298    [requirements_ecore_evas="ecore-wince ${requirements_ecore_evas}"])
1299
1300
1301
1302 ### requirements
1303
1304 AC_SUBST(requirements_ecore)
1305 AC_SUBST(requirements_ecore_con)
1306 AC_SUBST(requirements_ecore_config)
1307 AC_SUBST(requirements_ecore_data)
1308 AC_SUBST(requirements_ecore_directfb)
1309 AC_SUBST(requirements_ecore_evas)
1310 AC_SUBST(requirements_ecore_fb)
1311 AC_SUBST(requirements_ecore_file)
1312 AC_SUBST(requirements_ecore_imf)
1313 AC_SUBST(requirements_ecore_imf_evas)
1314 AC_SUBST(requirements_ecore_input)
1315 AC_SUBST(requirements_ecore_input_evas)
1316 AC_SUBST(requirements_ecore_ipc)
1317 AC_SUBST(requirements_ecore_quartz)
1318 AC_SUBST(requirements_ecore_sdl)
1319 AC_SUBST(requirements_ecore_txt)
1320 AC_SUBST(requirements_ecore_x)
1321 AC_SUBST(requirements_ecore_win32)
1322 AC_SUBST(requirements_ecore_wince)
1323
1324 AC_OUTPUT([
1325 Makefile
1326 ecore-con.pc
1327 ecore-config.pc
1328 ecore-data.pc
1329 ecore-directfb.pc
1330 ecore-evas.pc
1331 ecore-fb.pc
1332 ecore-file.pc
1333 ecore-quartz.pc
1334 ecore-imf.pc
1335 ecore-imf-evas.pc
1336 ecore-ipc.pc
1337 ecore-x.pc
1338 ecore-input.pc
1339 ecore-input-evas.pc
1340 ecore-win32.pc
1341 ecore-sdl.pc
1342 ecore-txt.pc
1343 ecore-wince.pc
1344 ecore.pc
1345 doc/ecore.dox
1346 doc/Makefile
1347 src/Makefile
1348 src/bin/Makefile
1349 src/lib/Makefile
1350 src/lib/ecore/Makefile
1351 src/lib/ecore_con/Makefile
1352 src/lib/ecore_config/Makefile
1353 src/lib/ecore_data/Makefile
1354 src/lib/ecore_directfb/Makefile
1355 src/lib/ecore_evas/Makefile
1356 src/lib/ecore_fb/Makefile
1357 src/lib/ecore_file/Makefile
1358 src/lib/ecore_quartz/Makefile
1359 src/lib/ecore_sdl/Makefile
1360 src/lib/ecore_imf/Makefile
1361 src/lib/ecore_imf_evas/Makefile
1362 src/lib/ecore_input/Makefile
1363 src/lib/ecore_input_evas/Makefile
1364 src/lib/ecore_ipc/Makefile
1365 src/lib/ecore_txt/Makefile
1366 src/lib/ecore_win32/Makefile
1367 src/lib/ecore_wince/Makefile
1368 src/lib/ecore_x/Makefile
1369 src/lib/ecore_x/xlib/Makefile
1370 src/lib/ecore_x/xcb/Makefile
1371 README
1372 ecore.spec
1373 po/Makefile.in
1374 ])
1375
1376 echo
1377 echo "$PACKAGE $VERSION"
1378 echo
1379 echo "Optional Modules:"
1380 echo
1381 echo " Core:"
1382 echo
1383 echo "  Ecore........................: always"
1384 echo "    Thread support.............: $have_pthread"
1385 echo "    GLib support...............: $have_glib"
1386 echo "  Ecore_Data...................: $have_ecore_data"
1387 echo "  Ecore_Txt....................: $have_ecore_txt"
1388 echo "  Ecore_Con....................: $have_ecore_con"
1389 if test "x$have_ecore_con" = "xyes" ; then
1390   echo $ECHO_N "    OpenSSL....................: $have_openssl $ECHO_C"
1391 if test "x$have_gnutls" = "xyes" ; then
1392   echo " (disabled)"
1393 else
1394   echo
1395 fi
1396   echo "    GnuTLS.....................: $have_gnutls"
1397   echo "    CURL.......................: $have_curl"
1398   echo "    Abstract Sockets...........: $want_abstract_sockets"
1399   echo "    c-ares.....................: $have_cares"
1400 fi
1401 echo "  Ecore_Ipc....................: $have_ecore_ipc"
1402 if test "x$have_ecore_ipc" = "xyes" ; then
1403   echo $ECHO_N "    OpenSSL....................: $have_openssl $ECHO_C"
1404 if test "x$have_gnutls" = "xyes" ; then
1405   echo " (disabled)"
1406 else
1407   echo
1408 fi
1409   echo "    GnuTLS.....................: $have_gnutls"
1410 fi
1411 echo "  Ecore_File...................: $have_ecore_file"
1412 if test "x$have_ecore_file" = "xyes" ; then
1413   echo "    Inotify....................: $have_inotify"
1414   echo "    Windows notification.......: $have_notify_win32"
1415   echo "    Poll.......................: $have_poll"
1416   echo "    CURL.......................: $have_curl"
1417 fi
1418 echo "  Ecore_Config.................: $have_ecore_config"
1419 echo "  Ecore_IMF....................: $have_ecore_imf"
1420 echo "  Ecore_IMF_Evas...............: $have_ecore_imf_evas"
1421 echo "  Ecore_Input..................: $have_ecore_input"
1422 echo "  Ecore_Input_Evas.............: $have_ecore_input_evas"
1423
1424 echo
1425 echo " Graphic systems:"
1426 echo
1427
1428 if test "x$have_ecore_x" = "xyes" ; then
1429   if test "x$have_ecore_x_xcb" = "xyes" ; then
1430     echo "  Ecore_X (XCB backend)........: $have_ecore_x_xcb"
1431     echo "    Xprint.....................: $have_ecore_x_xcb_xprint"
1432     echo "    Xinerama...................: $have_ecore_x_xcb_xinerama"
1433     echo "    Xrandr.....................: $have_ecore_x_xcb_randr"
1434     echo "    Xscreensaver...............: $have_ecore_x_xcb_screensaver"
1435     echo "    Xshape.....................: $have_ecore_x_xcb_shape"
1436     echo "    Xsync......................: $have_ecore_x_xcb_sync"
1437     echo "    Xrender....................: $have_ecore_x_xcb_render"
1438     echo "    Xcomposite.................: $have_ecore_x_xcb_composite"
1439     echo "    Xfixes.....................: $have_ecore_x_xcb_xfixes"
1440     echo "    Xdamage....................: $have_ecore_x_xcb_damage"
1441     echo "    Xdpms......................: $have_ecore_x_xcb_dpms"
1442     echo "    Xtest......................: $have_ecore_x_xcb_xtest"
1443   else
1444     echo "  Ecore_X (Xlib backend).......: $have_ecore_x"
1445     echo "    Xcursor....................: $use_Xcursor"
1446     echo "    Xkb........................: $use_xkb"
1447     echo "    Xprint.....................: $use_xprint"
1448     echo "    Xinerama...................: $use_xinerama"
1449     echo "    Xrandr.....................: $use_xrandr"
1450     echo "    Xscreensaver...............: $use_xss"
1451     echo "    Xrender....................: $use_xrender"
1452     echo "    Xcomposite.................: $use_xcomposite"
1453     echo "    Xfixes.....................: $use_xfixes"
1454     echo "    Xdamage....................: $use_xdamage"
1455     echo "    Xdpms......................: $use_xdpms"
1456     echo "    Xtest......................: $use_xtest"
1457     echo "    XIM........................: $want_xim"
1458     echo "    Xi2........................: $use_xi2"
1459   fi
1460 else
1461   echo "  Ecore_X......................: $have_ecore_x"
1462 fi
1463 echo "  Ecore_Win32..................: $have_ecore_win32"
1464 echo "  Ecore_Quartz.................: $have_ecore_quartz"
1465 echo "  Ecore_SDL....................: $have_ecore_sdl"
1466 echo "  Ecore_FB.....................: $have_ecore_fb"
1467 if test "x${have_ecore_fb}" = "xyes" ; then
1468   echo "    Touchscreen................: $have_tslib"
1469 fi
1470 echo "  Ecore_DirectFB...............: $have_ecore_directfb"
1471 echo "  Ecore_WinCE..................: $have_ecore_wince"
1472
1473 echo
1474 echo " Ecore Evas:"
1475 echo
1476
1477 echo "  Ecore_Evas...................: $have_ecore_evas"
1478 if test "x${have_ecore_evas}" = "xyes" ; then
1479   echo "    Software Memory Buffer.....: $have_ecore_evas_software_buffer"
1480   if test "x${have_ecore_evas_software_x11}" = "xyes" ; then
1481     echo "    Software X11...............: $have_ecore_evas_software_x11 (Xlib=${have_ecore_evas_software_xlib}) (XCB=${have_ecore_evas_software_xcb})"
1482   else
1483     echo "    Software X11...............: $have_ecore_evas_software_x11"
1484   fi
1485   echo "    XRender X11................: $have_ecore_evas_xrender_x11"
1486   echo "    OpenGL X11.................: $have_ecore_evas_opengl_x11"
1487   echo "    XRender XCB................: $have_ecore_evas_xrender_xcb"
1488   echo "    Software GDI...............: $have_ecore_evas_software_gdi"
1489   echo "    Software DirectDraw........: $have_ecore_evas_software_ddraw"
1490   echo "    Direct3D...................: $have_ecore_evas_direct3d"
1491   echo "    OpenGL Glew................: $have_ecore_evas_opengl_glew"
1492   echo "    Quartz.....................: $have_ecore_evas_quartz"
1493   echo "    Software SDL...............: $have_ecore_evas_software_sdl"
1494   echo "    OpenGL SDL.................: $have_ecore_evas_opengl_sdl"
1495   echo "    DirectFB...................: $have_ecore_evas_directfb"
1496   echo "    Software Framebuffer.......: $have_ecore_evas_fb"
1497   echo "    Software 16bit X11.........: $have_ecore_evas_software_16_x11"
1498   echo "    Software 16bit DirectDraw..: $have_ecore_evas_software_16_ddraw"
1499   echo "    Software 16bit WinCE.......: $have_ecore_evas_software_16_wince"
1500 fi
1501 echo
1502 echo "Documentation..........: ${build_doc}"
1503 if test "x${build_doc}" = "xyes" ; then
1504    echo "  Building.............: make doc"
1505 fi
1506 echo
1507 echo "Compilation............: make (or gmake)"
1508 echo "  CPPFLAGS.............: $CPPFLAGS"
1509 echo "  CFLAGS...............: $CFLAGS"
1510 echo "  CXXFLAGS.............: $CXXFLAGS"
1511 echo "  LDFLAGS..............: $LDFLAGS"
1512 echo
1513 echo "Installation...........: make install (as root if needed, with 'su' or 'sudo')"
1514 echo "  prefix...............: $prefix"
1515 echo