1. if software-x11 not enabled.. still build... but.....
[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="yes"
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_TXT_BUILD="-DEFL_ECORE_TXT_BUILD"
327       EFL_ECORE_FILE_BUILD="-DEFL_ECORE_FILE_BUILD"
328       EFL_ECORE_EVAS_BUILD="-DEFL_ECORE_EVAS_BUILD"
329       EFL_ECORE_IMF_BUILD="-DEFL_ECORE_IMF_BUILD"
330       EFL_ECORE_INPUT_BUILD="-DEFL_ECORE_INPUT_BUILD"
331       ;;
332 esac
333
334 have_win32=""
335 have_wince=""
336 case "$host_os" in
337    mingw32ce* | cegcc*)
338       EFL_ECORE_WINCE_BUILD="-DEFL_ECORE_WINCE_BUILD"
339       requirements_ecore_wince="evil ${requirements_ecore_wince}"
340       have_wince="yes"
341       ;;
342    mingw*)
343       EFL_ECORE_WIN32_BUILD="-DEFL_ECORE_WIN32_BUILD"
344       EFL_ECORE_SDL_BUILD="-DEFL_ECORE_SDL_BUILD"
345       requirements_ecore_win32="evil ${requirements_ecore_win32}"
346       requirements_ecore_sdl="evil ${requirements_ecore_sdl}"
347       have_win32="yes"
348       ;;
349 esac
350
351 AC_SUBST(EFL_ECORE_BUILD)
352 AC_SUBST(EFL_ECORE_TXT_BUILD)
353 AC_SUBST(EFL_ECORE_FILE_BUILD)
354 AC_SUBST(EFL_ECORE_EVAS_BUILD)
355 AC_SUBST(EFL_ECORE_IMF_BUILD)
356 AC_SUBST(EFL_ECORE_INPUT_BUILD)
357 AC_SUBST(EFL_ECORE_WINCE_BUILD)
358 AC_SUBST(EFL_ECORE_WIN32_BUILD)
359 AC_SUBST(EFL_ECORE_SDL_BUILD)
360
361 AM_CONDITIONAL(ECORE_HAVE_WINCE, test "x${have_wince}" = "xyes")
362 AM_CONDITIONAL(ECORE_HAVE_WIN32, test "x${have_win32}" = "xyes")
363
364 WIN32_LIBS=""
365 case "$host_os" in
366    mingw32ce* | cegcc*)
367       WIN32_LIBS="-lws2"
368       dlopen_libs="-ldl"
369       ;;
370    mingw*)
371       WIN32_LIBS="-lws2_32"
372       dlopen_libs="-ldl"
373       ;;
374    *)
375       AC_CHECK_LIB(dl, dlopen, dlopen_libs=-ldl)
376       ;;
377 esac
378 AC_SUBST(WIN32_LIBS)
379 AC_SUBST(dlopen_libs)
380
381 # Eina library
382
383 PKG_CHECK_MODULES(EINA, [eina-0])
384 #FIXME check all the requirements when the eina move will be finished
385 requirements_ecore="eina-0 ${requirements_ecore}"
386 requirements_ecore_con="ecore eina-0 ${requirements_ecore_con}"
387 requirements_ecore_config="ecore eina-0 ${requirements_ecore_config}"
388 requirements_ecore_data="ecore eina-0 ${requirements_ecore_data}"
389 requirements_ecore_directfb="ecore eina-0 ${requirements_ecore_directfb}"
390 requirements_ecore_evas="ecore eina-0 ${requirements_ecore_evas}"
391 requirements_ecore_fb="ecore eina-0 ${requirements_ecore_fb}"
392 requirements_ecore_file="ecore eina-0 ${requirements_ecore_file}"
393 requirements_ecore_imf="ecore eina-0 ${requirements_ecore_imf}"
394 requirements_ecore_imf_evas="ecore eina-0 ${requirements_ecore_imf_evas}"
395 requirements_ecore_input="ecore eina-0 ${requirements_ecore_input}"
396 requirements_ecore_input_evas="ecore eina-0 ${requirements_ecore_input_evas}"
397 requirements_ecore_ipc="ecore eina-0 ${requirements_ecore_ipc}"
398 requirements_ecore_quartz="ecore eina-0 ${requirements_ecore_quartz}"
399 requirements_ecore_sdl="ecore eina-0 ${requirements_ecore_sdl}"
400 requirements_ecore_win32="ecore eina-0 ${requirements_ecore_win32}"
401 requirements_ecore_wince="ecore eina-0 ${requirements_ecore_wince}"
402 requirements_ecore_x="ecore eina-0 ${requirements_ecore_x}"
403
404
405 # glib support (main loop integration)
406 AC_ARG_ENABLE([glib],
407    [AC_HELP_STRING([--disable-glib], [enable glib support. @<:@default=detect@:>@])],
408    [want_glib=$enableval], [])
409
410 if test "x$want_glib" != "xno"; then
411    PKG_CHECK_MODULES([GLIB], [glib-2.0], [have_glib="yes"], [have_glib="no"])
412 else
413    have_glib="no"
414 fi
415 if test "x$want_glib" = "xyes" -a "x$have_glib" = "xno"; then
416    AC_MSG_ERROR([GLib support requested, but no GLib found by pkg-config.])
417 elif test "x$have_glib" = "xyes"; then
418    AC_DEFINE(HAVE_GLIB, [1], [Have GLib])
419    requirements_ecore="glib-2.0 ${requirements_ecore}"
420 fi
421
422
423 # iconv library (ecore_txt)
424
425 iconv_cflags=""
426 iconv_libs=""
427 have_iconv="no"
428 AC_ARG_WITH([iconv-link],
429    AC_HELP_STRING([--with-iconv-link=ICONV_LINK], [explicitly specify an iconv link option]),
430    [
431     iconv_libs=$withval
432     have_iconv="yes"
433    ])
434
435 AC_MSG_CHECKING(for explicit iconv link options)
436 if test "x${iconv_libs}" = "x" ; then
437    AC_MSG_RESULT([no explicit iconv link option])
438 else
439    AC_MSG_RESULT([$iconv_libs])
440 fi
441
442 AM_ICONV
443
444 if test "x${have_iconv}" = "xno" && test "x${am_cv_func_iconv}" = "xyes" ; then
445    iconv_cflags=${LIBICONV}
446    iconv_libs=${LTLIBICONV}
447    have_iconv="yes"
448 fi
449
450 AC_SUBST(iconv_cflags)
451 AC_SUBST(iconv_libs)
452
453
454 # SDL library (ecore_sdl)
455
456 have_sdl="no"
457 SDL_CONFIG="sdl-config"
458 AC_ARG_WITH([sdl-config],
459    [AC_HELP_STRING([--with-sdl-config=PATH], [use sdl-config specified])],
460    [
461     SDL_CONFIG=$withval
462     AC_MSG_NOTICE([using ${SDL_CONFIG} for sdl-config])
463    ])
464
465 AC_PATH_PROG([SDL_CONFIG], ["sdl-config"], [""], [$PATH])
466
467 if test -z "$SDL_CONFIG" ; then
468    SDL_CFLAGS=`$SDL_CONFIG --cflags`
469    SDL_LIBS=`$SDL_CONFIG --libs`
470    AC_SUBST(SDL_CFLAGS)
471    AC_SUBST(SDL_LIBS)
472    have_sdl="no"
473 else
474    PKG_CHECK_MODULES([SDL], [sdl >= 1.2.0], [have_sdl="yes"], [have_sdl="no"])
475 fi
476
477 if test "x${have_sdl}" = "xyes" ; then
478    PKG_CHECK_EXISTS([sdl >= 1.3.0],
479       [AC_DEFINE(BUILD_ECORE_EVAS_SDL_130, 1, [Support for SVN SDL])])
480 fi
481
482
483 # DirectFB library (ecore_directfb)
484
485 PKG_CHECK_MODULES([DIRECTFB],
486    [directfb >= 0.9.16],
487    [have_directfb="yes"],
488    [have_directfb="no"])
489
490
491 # Eet library (ecore_config)
492
493 PKG_CHECK_MODULES([EET],
494    [eet >= 1.0.0],
495    [have_eet="yes"],
496    [have_eet="no"])
497
498
499 # Xlib and XCB (ecore_x)
500
501 have_x="no"
502 have_ecore_x="no"
503 have_ecore_x_xlib="no"
504 have_ecore_x_xcb="no"
505
506 x_dir="";
507 x_includes="";
508 x_cflags="";
509 x_libs="";
510
511 ecore_x_libs_private=""
512
513 AC_ARG_ENABLE(ecore-x-composite,
514    [AC_HELP_STRING([--disable-ecore-x-composite],
515        [disable the ecore_x support for Xcomposite extension.
516         @<:@default=detect@:>@])],
517    [want_ecore_x_composite=$enableval])
518
519 AC_ARG_ENABLE(ecore-x-damage,
520    [AC_HELP_STRING([--disable-ecore-x-damage],
521        [disable the ecore_x support for Xdamage extension.
522         @<:@default=detect@:>@])],
523    [want_ecore_x_damage=$enableval])
524
525 AC_ARG_ENABLE(ecore-x-dpms,
526    [AC_HELP_STRING([--disable-ecore-x-dpms],
527        [disable the ecore_x support for Xdpms extension.
528         @<:@default=detect@:>@])],
529    [want_ecore_x_dpms=$enableval])
530
531 AC_ARG_ENABLE(ecore-x-randr,
532    [AC_HELP_STRING([--disable-ecore-x-randr],
533        [disable the ecore_x support for Xrandr extension.
534         @<:@default=detect@:>@])],
535    [want_ecore_x_randr=$enableval])
536
537 AC_ARG_ENABLE(ecore-x-render,
538    [AC_HELP_STRING([--disable-ecore-x-render],
539        [disable the ecore_x support for Xrender extension.
540         @<:@default=detect@:>@])],
541    [want_ecore_x_render=$enableval])
542
543 AC_ARG_ENABLE(ecore-x-screensaver,
544    [AC_HELP_STRING([--disable-ecore-x-screensaver],
545        [disable the ecore_x support for Xscreensaver extension.
546         @<:@default=detect@:>@])],
547    [want_ecore_x_screensaver=$enableval])
548
549 AC_ARG_ENABLE(ecore-x-shape,
550    [AC_HELP_STRING([--disable-ecore-x-shape],
551        [disable the ecore_x support for Xshape extension.
552         @<:@default=detect@:>@])],
553    [want_ecore_x_shape=$enableval])
554
555 AC_ARG_ENABLE(ecore-x-sync,
556    [AC_HELP_STRING([--disable-ecore-x-sync],
557        [disable the ecore_x support for Xsync extension.
558         @<:@default=detect@:>@])],
559    [want_ecore_x_sync=$enableval])
560
561 AC_ARG_ENABLE(ecore-x-xfixes,
562    [AC_HELP_STRING([--disable-ecore-x-xfixes],
563        [disable the ecore_x support for Xfixes extension.
564         @<:@default=detect@:>@])],
565    [want_ecore_x_xfixes=$enableval])
566
567 AC_ARG_ENABLE(ecore-x-xinerama,
568    [AC_HELP_STRING([--disable-ecore-x-xinerama],
569        [disable the ecore_x support for Xinerama extension.
570         @<:@default=detect@:>@])],
571    [want_ecore_x_xinerama=$enableval])
572
573 AC_ARG_ENABLE(ecore-x-xprint,
574    [AC_HELP_STRING([--disable-ecore-x-xprint],
575        [disable the ecore_x support for Xprint extension.
576         @<:@default=detect@:>@])],
577    [want_ecore_x_xprint=$enableval])
578
579 AC_ARG_ENABLE(ecore-x-xtest,
580    [AC_HELP_STRING([--disable-ecore-x-xtest],
581        [disable the ecore_x support for Xtest extension.
582         @<:@default=detect@:>@])],
583    [want_ecore_x_xtest=$enableval])
584
585 AC_ARG_ENABLE(ecore-x-cursor,
586    [AC_HELP_STRING([--disable-ecore-x-cursor],
587        [disable the ecore_x support for Xcursor extension.
588         @<:@default=detect@:>@])],
589    [want_ecore_x_cursor=$enableval])
590
591 AC_ARG_ENABLE(ecore-x-input,
592    [AC_HELP_STRING([--disable-ecore-x-input],
593        [disable the ecore_x support for Xinput/Xinput2 extension.
594         @<:@default=detect@:>@])],
595    [want_ecore_x_input=$enableval])
596
597
598 AC_ARG_ENABLE(ecore-x-xcb,
599    [AC_HELP_STRING([--enable-ecore-x-xcb],
600        [enable the ecore_x module with XCB backend. @<:@default=disabled@:>@])],
601    [want_ecore_x_xcb=$enableval],
602    [want_ecore_x_xcb="no"])
603
604 AC_MSG_CHECKING(whether ecore_x with XCB backend is to be built)
605 AC_MSG_RESULT($want_ecore_x_xcb)
606
607 if test "x$want_ecore_x_xcb" = "xyes" ; then
608   PKG_CHECK_MODULES(XCB, xcb xcb-icccm xcb-image xcb-keysyms pixman-1,
609     [ have_ecore_x_xcb="yes"
610       requirements_ecore_x="xcb xcb-icccm xcb-image xcb-keysyms pixman-1 ${requirements_ecore_x}" ],
611     [ have_ecore_x_xcb="no" ])
612
613   if test "x$have_ecore_x_xcb" = "xyes" ; then
614     if test "x$want_ecore_x_composite" != "xno"; then
615       PKG_CHECK_MODULES(XCB_COMPOSITE, xcb-composite,
616         [ have_ecore_x_xcb_composite="yes"
617           requirements_ecore_x="xcb-composite ${requirements_ecore_x}"
618           AC_DEFINE(ECORE_XCB_COMPOSITE, 1, [Build support for XCB composite]) ],
619         [ have_ecore_x_xcb_composite="no" ])
620     else
621       have_ecore_x_xcb_composite="no"
622       AC_MSG_NOTICE("composite extension explicitly disabled")
623     fi
624
625     if test "x$want_ecore_x_damage" != "xno"; then
626       PKG_CHECK_MODULES(XCB_DAMAGE, xcb-damage,
627         [ have_ecore_x_xcb_damage="yes"
628           requirements_ecore_x="xcb-damage ${requirements_ecore_x}"
629           AC_DEFINE(ECORE_XCB_DAMAGE, 1, [Build support for XCB damage]) ],
630         [ have_ecore_x_xcb_damage="no" ])
631     else
632       have_ecore_x_xcb_damage="no"
633       AC_MSG_NOTICE("damage extension explicitly disabled")
634     fi
635
636     if test "x$want_ecore_x_dpms" != "xno"; then
637       PKG_CHECK_MODULES(XCB_DPMS, xcb-dpms,
638         [ have_ecore_x_xcb_dpms="yes"
639           requirements_ecore_x="xcb-dpms ${requirements_ecore_x}"
640           AC_DEFINE(ECORE_XCB_DPMS, 1, [Build support for XCB dpms]) ],
641         [ have_ecore_x_xcb_dpms="no" ])
642     else
643       have_ecore_x_xcb_dpms="no"
644       AC_MSG_NOTICE("dpms extension explicitly disabled")
645     fi
646
647     if test "x$want_ecore_x_randr" != "xno"; then
648       PKG_CHECK_MODULES(XCB_RANDR, xcb-randr,
649         [ have_ecore_x_xcb_randr="yes"
650           requirements_ecore_x="xcb-randr ${requirements_ecore_x}"
651           AC_DEFINE(ECORE_XCB_RANDR, 1, [Build support for XCB randr]) ],
652         [ have_ecore_x_xcb_randr="no" ])
653     else
654       have_ecore_x_xcb_randr="no"
655       AC_MSG_NOTICE("randr extension explicitly disabled")
656     fi
657
658     if test "x$want_ecore_x_render" != "xno"; then
659       PKG_CHECK_MODULES(XCB_RENDER, xcb-render,
660         [ have_ecore_x_xcb_render="yes"
661           requirements_ecore_x="xcb-render ${requirements_ecore_x}"
662           AC_DEFINE(ECORE_XCB_RENDER, 1, [Build support for XCB render]) ],
663         [ have_ecore_x_xcb_render="no" ])
664     else
665       have_ecore_x_xcb_render="no"
666       AC_MSG_NOTICE("render extension explicitly disabled")
667     fi
668
669     if test "x$want_ecore_x_screensaver" != "xno"; then
670       PKG_CHECK_MODULES(XCB_SCREENSAVER, xcb-screensaver,
671         [ have_ecore_x_xcb_screensaver="yes"
672           requirements_ecore_x="xcb-screensaver ${requirements_ecore_x}"
673           AC_DEFINE(ECORE_XCB_SCREENSAVER, 1, [Build support for XCB screensaver]) ],
674         [ have_ecore_x_xcb_screensaver="no" ])
675     else
676       have_ecore_x_xcb_screensaver="no"
677       AC_MSG_NOTICE("screensaver extension explicitly disabled")
678     fi
679
680     if test "x$want_ecore_x_shape" != "xno"; then
681       PKG_CHECK_MODULES(XCB_SHAPE, xcb-shape,
682         [ have_ecore_x_xcb_shape="yes"
683           requirements_ecore_x="xcb-shape ${requirements_ecore_x}"
684           AC_DEFINE(ECORE_XCB_SHAPE, 1, [Build support for XCB shape]) ],
685         [ have_ecore_x_xcb_shape="no" ])
686     else
687       have_ecore_x_xcb_shape="no"
688       AC_MSG_NOTICE("shape extension explicitly disabled")
689     fi
690
691     if test "x$want_ecore_x_sync" != "xno"; then
692       PKG_CHECK_MODULES(XCB_SYNC, xcb-sync,
693         [ have_ecore_x_xcb_sync="yes"
694           requirements_ecore_x="xcb-sync ${requirements_ecore_x}"
695           AC_DEFINE(ECORE_XCB_SYNC, 1, [Build support for XCB sync]) ],
696         [ have_ecore_x_xcb_sync="no" ])
697     else
698       have_ecore_x_xcb_sync="no"
699       AC_MSG_NOTICE("sync extension explicitly disabled")
700     fi
701
702     if test "x$want_ecore_x_xfixes" != "xno"; then
703       PKG_CHECK_MODULES(XCB_XFIXES, xcb-xfixes,
704         [ have_ecore_x_xcb_xfixes="yes"
705           requirements_ecore_x="xcb-xfixes ${requirements_ecore_x}"
706           AC_DEFINE(ECORE_XCB_FIXES, 1, [Build support for XCB xfixes]) ],
707         [ have_ecore_x_xcb_xfixes="no" ])
708     else
709       have_ecore_x_xcb_xfixes="no"
710       AC_MSG_NOTICE("xfixes extension explicitly disabled")
711     fi
712
713     if test "x$want_ecore_x_xinerama" != "xno"; then
714       PKG_CHECK_MODULES(XCB_XINERAMA, xcb-xinerama,
715         [ have_ecore_x_xcb_xinerama="yes"
716           requirements_ecore_x="xcb-xinerama ${requirements_ecore_x}"
717           AC_DEFINE(ECORE_XCB_XINERAMA, 1, [Build support for XCB xinerama]) ],
718         [ have_ecore_x_xcb_xinerama="no" ])
719     else
720       have_ecore_x_xcb_xinerama="no"
721       AC_MSG_NOTICE("xinerama extension explicitly disabled")
722     fi
723
724     if test "x$want_ecore_x_xprint" != "xno"; then
725       PKG_CHECK_MODULES(XCB_XPRINT, xcb-xprint,
726         [ have_ecore_x_xcb_xprint="yes"
727           requirements_ecore_x="xcb-xprint ${requirements_ecore_x}"
728           AC_DEFINE(ECORE_XCB_XPRINT, 1, [Build support for XCB xprint]) ],
729         [ have_ecore_x_xcb_xprint="no" ])
730     else
731       have_ecore_x_xcb_xprint="no"
732       AC_MSG_NOTICE("xprint extension explicitly disabled")
733     fi
734
735     if test "x$want_ecore_x_xtest" != "xno"; then
736       PKG_CHECK_MODULES(XCB_XTEST, xcb-xtest,
737         [ have_ecore_x_xcb_xtest="yes"
738           requirements_ecore_x="xcb-xtest ${requirements_ecore_x}"
739           AC_DEFINE(ECORE_XCB_XTEST, 1, [Build support for XCB xtest]) ],
740         [ have_ecore_x_xcb_xtest="no" ])
741     else
742       have_ecore_x_xcb_xtest="no"
743       AC_MSG_NOTICE("xtest extension explicitly disabled")
744     fi
745
746     AC_DEFINE(HAVE_ECORE_X_XCB, 1, [Defined to 1 if XCB is enabled.])
747
748     x_cflags=$XCB_CFLAGS
749     x_libs=$XCB_LIBS
750     have_x="yes"
751
752     have_ecore_x_xcb_define="-DHAVE_ECORE_X_XCB"
753     AC_SUBST(have_ecore_x_xcb_define)
754   fi
755 fi
756
757 if ! test "x$have_ecore_x_xcb" = "xyes" ; then
758   AC_PATH_XTRA
759   AC_CHECK_HEADER(X11/X.h,
760     [
761      if test "x$want_evas_simple_x11" = "xyes"; then
762        x_libs="${x_libs} -lX11 -lXext"
763      else
764        x_dir=${x_dir:-/usr/X11R6}
765        x_cflags=${x_cflags:--I${x_includes:-$x_dir/include}}
766        x_libs="${x_libs:--L${x_libraries:-$x_dir/lib}} -lX11 -lXext"
767      fi
768      have_ecore_x_xlib="yes"
769     ]
770   )
771
772   if test "x$have_ecore_x_xlib" = "xyes"; then
773     Xcursor_libs=""
774     Xcursor_cflags=""
775     use_Xcursor="no"
776     PCFLAGS=$CFLAGS
777     CFLAGS="$x_cflags $x_includes"
778
779     if test "x$want_ecore_x_cursor" = "xyes"; then
780       AC_CHECK_HEADER(X11/Xcursor/Xcursor.h,
781         [
782           AC_CHECK_LIB(Xcursor, XcursorImageLoadCursor,
783             [
784               AC_DEFINE(ECORE_XCURSOR, 1, [Build support for Xcursor])
785               Xcursor_cflags=""
786               Xcursor_libs="-lXcursor"
787               use_Xcursor="yes"
788             ], [
789               Xcursor_cflags=""
790               Xcursor_libs=""
791               use_Xcursor="no"
792             ], [
793               $x_libs -lXrender
794             ]
795           )
796         ], [
797           Xcursor_cflags=""
798           Xcursor_libs=""
799           use_Xcursor="no"
800         ], [
801           #include <X11/Xlib.h>
802         ]
803       )
804       CFLAGS=$PCFLAGS
805     else
806       Xcursor_cflags=""
807       Xcursor_libs=""
808       use_Xcursor="no"
809       AC_MSG_NOTICE("Xcursor explicitly disabled")
810     fi
811
812     AC_SUBST(Xcursor_cflags)
813     AC_SUBST(Xcursor_libs)
814
815     ECORE_CHECK_X_EXTENSION([Xkb], [XKB.h], [X11], [XkbSetDetectableAutoRepeat], [$want_ecore_x_xkb])
816     ECORE_CHECK_X_EXTENSION([Xcomposite], [Xcomposite.h], [Xcomposite], [XCompositeQueryExtension], [$want_ecore_x_composite])
817     ECORE_CHECK_X_EXTENSION([Xdamage], [Xdamage.h], [Xdamage], [XDamageSubtract], [$want_ecore_x_damage])
818     ECORE_CHECK_X_EXTENSION([Xdpms], [dpms.h], [Xdpms], [DPMSQueryExtension], [$want_ecore_x_dpms])
819     if test "x$use_xdpms" = "xno" ; then
820       ECORE_CHECK_X_EXTENSION([Xdpms], [dpms.h], [Xext], [DPMSQueryExtension], [$want_ecore_x_dpms])
821     fi
822     ECORE_CHECK_X_EXTENSION([Xfixes], [Xfixes.h], [Xfixes], [XFixesExpandRegion], [$want_ecore_x_xfixes])
823     ECORE_CHECK_X_EXTENSION([Xinerama], [Xinerama.h], [Xinerama], [XineramaQueryScreens], [$want_ecore_x_xinerama])
824     ECORE_CHECK_X_EXTENSION([Xprint], [Print.h], [Xp], [XpQueryScreens], [$want_ecore_x_xprint])
825     ECORE_CHECK_X_EXTENSION([Xrandr], [Xrandr.h], [Xrandr], [XRRGetScreenResourcesCurrent], [$want_ecore_x_randr])
826     ECORE_CHECK_X_EXTENSION([Xrender], [Xrender.h], [Xrender], [XRenderFindVisualFormat], [$want_ecore_x_render])
827     ECORE_CHECK_X_EXTENSION([Xtest], [XTest.h], [Xtst], [XTestFakeKeyEvent], [$want_ecore_x_xtest])
828     ECORE_CHECK_X_EXTENSION([Xss], [scrnsaver.h], [Xss], [XScreenSaverSelectInput], [$want_ecore_x_screensaver])
829     ECORE_CHECK_X_EXTENSION([Xi2], [XInput2.h], [Xi], [XIQueryDevice], [$want_ecore_x_input])
830
831     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}"
832
833     AC_DEFINE(HAVE_ECORE_X_XLIB, 1, [Defined to 1 if Xlib is enabled.])
834     have_x="yes"
835
836     have_ecore_x_xlib="yes"
837   fi
838 fi
839
840 AC_SUBST(x_cflags)
841 AC_SUBST(x_includes)
842 AC_SUBST(x_libs)
843 AC_SUBST(ecore_x_libs_private)
844
845 AM_CONDITIONAL(BUILD_ECORE_X_XLIB, test $have_ecore_x_xlib = yes)
846 AM_CONDITIONAL(BUILD_ECORE_X_XCB, test $have_ecore_x_xcb = yes)
847
848
849 # Evas library (ecore_config, ecore_input_evas, ecore_imf_evas and ecore_evas)
850
851 PKG_CHECK_MODULES([EVAS], [evas >= 0.9.9],
852    [have_evas="yes"],
853    [have_evas="no"])
854
855
856 ### Checks for header files
857
858 AC_HEADER_SYS_WAIT
859
860 case "$host_os" in
861    mingw* | cegcc*)
862       AC_DEFINE(HAVE_DLFCN_H, 1, [Define to 1 if you have the <dlfcn.h> header file.])
863       AC_DEFINE(HAVE_SYS_MMAN_H, 1, [Define to 1 if you have the <sys/mman.h> header file.])
864       AC_DEFINE(HAVE_SYS_TIME_H, 1, [Define to 1 if you have the <sys/time.h> header file.])
865       ;;
866    *)
867       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])
868       ;;
869 esac
870
871 # Framebuffer (ecore_fb)
872 have_fb="no"
873 AC_CHECK_HEADER([linux/fb.h],
874    [AC_CHECK_HEADER([linux/input.h], [have_fb="yes"])])
875
876 # Quartz header files (ecore_quartz)
877
878 quartz_ldflags="";
879 have_quartz="no"
880
881 if test "x${have_gnu_objc}" = "xyes" ; then
882    AC_LANG_PUSH([Objective C])
883    AC_CHECK_HEADER([Cocoa/Cocoa.h],
884       [
885        have_quartz="yes"
886        quartz_ldflags="-framework Cocoa"
887       ],
888       [have_quartz="no"])
889    AC_LANG_POP([Objective C])
890 fi
891
892 AC_SUBST(quartz_ldflags)
893
894 # basic pthread support
895
896 EFL_CHECK_PTHREAD([have_pthread="yes"], [have_pthread="no"])
897
898 ### Checks for types
899 AC_CHECK_SIZEOF(int, 4)
900 AC_CHECK_SIZEOF(long, 4)
901
902
903 ### Checks for structures
904
905
906 ### Checks for compiler characteristics
907 AM_PROG_CC_STDC
908 AC_C_CONST
909 AC_C_BIGENDIAN
910 AC_HEADER_STDC
911 AC_C___ATTRIBUTE__
912
913 WIN32_CPPFLAGS=""
914 WIN32_CFLAGS=""
915 case "$host_os" in
916    mingw32ce*)
917       WIN32_CPPFLAGS="-D_WIN32_WCE=0x0420"
918       ;;
919    cegcc*)
920       WIN32_CPPFLAGS="-D_WIN32_WCE=0x0420"
921       WIN32_CFLAGS="-mwin32"
922       ;;
923    mingw*)
924       WIN32_CPPFLAGS="-D_WIN32_WINNT=0x0500"
925       ;;
926 esac
927 AC_SUBST(WIN32_CPPFLAGS)
928 AC_SUBST(WIN32_CFLAGS)
929
930
931 ### Checks for linker characteristics
932
933 # use --enable-auto-import on Windows
934
935 lt_enable_auto_import=""
936 case "$host_os" in
937    mingw* | cegcc*)
938       lt_enable_auto_import="-Wl,--enable-auto-import"
939       ;;
940 esac
941 AC_SUBST(lt_enable_auto_import)
942
943 ### Checks for library functions
944 AC_FUNC_ALLOCA
945 AC_CHECK_FUNCS(gettimeofday strlcpy)
946
947 have_atfile_source=auto
948 AC_ARG_ENABLE(atfile-source,
949         AC_HELP_STRING([--disable-atfile-source],
950                        [disable use of atfile source functions as openat and mkdirat @<:@default=detect@:>@]),
951         [have_atfile_source=$enableval], [have_atfile_source=auto])
952
953 if test "x$have_atfile_source" != "xno"; then
954         AC_CHECK_FUNCS(mkdirat,
955                 [
956                 have_atfile_source=yes
957                 AC_DEFINE(HAVE_ATFILE_SOURCE, 1, [mkdirat exists])
958                 ],
959                 [
960                 if test "x$have_atfile_source" = "xyes"; then
961                         AC_MSG_ERROR([required atfile-source but no mkdirat()])
962                 fi
963                 have_atfile_source=no
964                 ])
965 fi
966
967 ### Ecore modules
968
969 ## Core modules
970
971 # ecore_data
972 ECORE_CHECK_MODULE([data], [${want_ecore_data}], [Data])
973
974 # ecore_txt
975 ECORE_CHECK_MODULE([txt], [${want_ecore_txt}], [Txt], [$have_iconv])
976
977 # ecore_con
978 ECORE_CHECK_MODULE([con], [${want_ecore_con}], [Con])
979
980 have_curl="no"
981 have_gnutls="no"
982 have_openssl="no"
983 have_cares="no"
984 if test "x${have_ecore_con}" = "xyes" ; then
985
986    ECORE_CHECK_CURL([${want_curl}],
987       [
988        have_curl="yes"
989        requirements_ecore_con="libcurl ${requirements_ecore_con}"
990       ],
991       [have_curl="no"])
992
993    ECORE_CHECK_GNUTLS([${want_gnutls}],
994       [have_gnutls="yes"],
995       [have_gnutls="no"])
996
997    ECORE_CHECK_OPENSSL([${want_openssl}],
998       [have_openssl="yes"],
999       [have_openssl="no"])
1000
1001    if test "x${have_gnutls}" = "xyes" ; then
1002       requirements_ecore_con="gnutls ${requirements_ecore_con}"
1003       # no need to add it to req_ecore_ipc, since they
1004       # depends on ecore_con anyway.
1005    else
1006       if test "x${have_openssl}" = "xyes" ; then
1007          requirements_ecore_con="openssl ${requirements_ecore_con}"
1008          # no need to add it to req_ecore_ipc, since they
1009          # depends on ecore_con anyway.
1010       fi
1011    fi
1012
1013    ECORE_CHECK_CARES([${want_cares}],
1014       [
1015        have_cares="yes"
1016        requirements_ecore_con="libcares ${requirements_ecore_con}"
1017       ],
1018       [have_cares="no"])
1019
1020 fi
1021
1022 AM_CONDITIONAL([HAVE_CARES], [test "x${have_cares}" = "xyes"])
1023
1024 # ecore_ipc
1025 ECORE_CHECK_MODULE([ipc], [${want_ecore_ipc}], [Ipc], [${have_ecore_con}],
1026    [requirements_ecore_ipc="ecore-con ${requirements_ecore_ipc}"])
1027
1028 # ecore_file
1029 ECORE_CHECK_MODULE([file], [${want_ecore_file}], [File])
1030
1031 have_poll="no"
1032 have_inotify="no"
1033 have_notify_win32="no"
1034 if test "x${have_ecore_file}" = "xyes" ; then
1035    ECORE_CHECK_POLL([${want_poll}], [have_poll="yes"], [have_poll="no"])
1036    ECORE_CHECK_INOTIFY([${want_inotify}], [have_inotify="yes"], [have_inotify="no"])
1037    ECORE_CHECK_NOTIFY_WIN32([${want_notify_win32}], [have_notify_win32="yes"], [have_notify_win32="no"])
1038
1039    if test "x${have_ecore_con}" = "xyes" ; then
1040       requirements_ecore_file="ecore-con ${requirements_ecore_file}"
1041    fi
1042 fi
1043
1044 # ecore_config
1045 ecore_config_deps="no"
1046 if test "x${have_eet}" = "xyes" -a "x${have_evas}"  -a "x${have_ecore_ipc}" ; then
1047    ecore_config_deps="yes"
1048 fi
1049
1050 ECORE_CHECK_MODULE([config], [${want_ecore_config}], [Config], [${ecore_config_deps}],
1051    [requirements_ecore_config="ecore-ipc evas eet ${requirements_ecore_config}"])
1052
1053 # ecore_imf
1054
1055 ECORE_CHECK_MODULE([imf], [${want_ecore_imf}], [Imf])
1056
1057 # ecore_imf_evas
1058
1059 ecore_imf_evas_deps="no"
1060 if test "x${have_ecore_imf}" = "xyes" -a "x${have_evas}" = "xyes" ; then
1061    ecore_imf_evas_deps="yes"
1062 fi
1063
1064 ECORE_CHECK_MODULE([imf-evas], [${want_ecore_imf}], [Imf_Evas], [${ecore_imf_evas_deps}],
1065    [requirements_ecore_imf_evas="ecore-imf evas ${requirements_ecore_imf_evas}"])
1066
1067 # ecore_input{_evas}
1068 ECORE_CHECK_MODULE([input], [${want_ecore_input}], [Input])
1069 ECORE_CHECK_MODULE([input-evas], [${want_ecore_input}], [Input_Evas], [${have_evas}],
1070    [requirements_ecore_input_evas="ecore-input evas ${requirements_ecore_input}"])
1071
1072 ## Graphic systems
1073
1074 # ecore_x{cb}
1075
1076 ecore_x_deps="no"
1077 if test "x${have_x}" = "xyes" -a \
1078         "x${have_ecore_input}" = "xyes" -a \
1079         "x${have_ecore_txt}" = "xyes" ; then
1080    ecore_x_deps="yes"
1081 fi
1082
1083 ECORE_CHECK_MODULE([x], [${want_ecore_x}], [X], [${ecore_x_deps}],
1084   [
1085    ecore_x_libs="$ecore_x_libs $x_libs"
1086    requirements_ecore_x="ecore-input ecore-txt ${requirements_ecore_x}"
1087   ])
1088
1089 # ecore_win32
1090
1091 ECORE_CHECK_MODULE([win32], [${want_ecore_win32}], [Win32], [${have_ecore_input}],
1092    [
1093     ecore_win32_libs="-lole32 -lgdi32"
1094     requirements_ecore_win32="ecore-input ${requirements_ecore_win32}"
1095    ])
1096 AC_SUBST(ecore_win32_libs)
1097
1098 # ecore_quartz
1099
1100 ecore_quartz_deps="no"
1101 if test "x${have_ecore_input}" = "xyes" -a "x${have_quartz}" = "xyes" ; then
1102    ecore_quartz_deps="yes"
1103 fi
1104
1105 ECORE_CHECK_MODULE([quartz], [${want_ecore_quartz}], [Quartz], [${ecore_quartz_deps}],
1106    [requirements_ecore_quartz="ecore-input ${requirements_ecore_quartz}"])
1107
1108 # ecore_sdl
1109
1110 ecore_sdl_deps="no"
1111 if test "x${have_sdl}" = "xyes" -a "x${have_ecore_input}" = "xyes" ; then
1112    ecore_sdl_deps="yes"
1113 fi
1114
1115 ECORE_CHECK_MODULE([sdl], [${want_ecore_sdl}], [Sdl], [${ecore_sdl_deps}],
1116    [requirements_ecore_sdl="ecore-input ${requirements_ecore_sdl}"])
1117
1118 # ecore_fb
1119 ECORE_CHECK_MODULE([fb], [${want_ecore_fb}], [FB], [$have_fb])
1120
1121 if test "x${have_ecore_fb}" = "xyes" ; then
1122    ECORE_CHECK_TSLIB([${want_tslib}],
1123       [
1124        have_tslib="yes"
1125        requirements_ecore_fb="${_tslib_requirement} ${requirements_ecore_fb}"
1126       ],
1127       [have_tslib="no"])
1128 fi
1129
1130 # ecore_directfb
1131
1132 ECORE_CHECK_MODULE([directfb], [${want_ecore_directfb}], [DirectFB], [${have_directfb}],
1133    [requirements_ecore_directfb="directfb ${requirements_ecore_directfb}"])
1134
1135 # ecore_wince
1136
1137 ECORE_CHECK_MODULE([wince], [${want_ecore_wince}], [WinCE], [${have_ecore_input}],
1138    [requirements_ecore_win32="ecore-input ${requirements_ecore_win32}"])
1139
1140 ## Ecore Evas
1141
1142 # ecore_evas
1143
1144 ecore_evas_deps="no"
1145 if test "x${have_evas}" = "xyes" -a "x${have_ecore_input}" = "xyes" -a "x${have_ecore_input_evas}" = "xyes" ; then
1146    ecore_evas_deps="yes"
1147 fi
1148
1149 ECORE_CHECK_MODULE([evas], [${want_ecore_evas}], [Evas], [${ecore_evas_deps}],
1150   [requirements_ecore_evas="ecore-input ecore-input-evas evas ${requirements_ecore_evas}"])
1151
1152 # ecore_evas_buffer
1153
1154 ECORE_EVAS_CHECK_MODULE([software-buffer],
1155    [${want_ecore_evas_software_buffer}],
1156    [Software Buffer],
1157    [yes])
1158
1159 # ecore_evas_x11
1160
1161 # ecore_evas_software_x11
1162
1163 ECORE_EVAS_CHECK_MODULE([software-x11],
1164    [${want_ecore_evas_software_x11}],
1165    [Software X11],
1166    [${have_ecore_x}])
1167
1168 have_ecore_evas_software_xlib=no"
1169 have_ecore_evas_software_xcb=no"
1170 if test "x$have_ecore_evas_software_x11" = "xyes" ; then
1171    have_ecore_evas_software_xlib=`${PKG_CONFIG} --variable=Xlib evas-software-x11`
1172    if test "x${have_ecore_evas_software_xlib}" = "xyes" -a "x${have_ecore_x_xlib}" = "xyes" ; then
1173       AC_DEFINE(BUILD_ECORE_EVAS_SOFTWARE_XLIB, 1, [Evas Software Xlib Engine Support])
1174    fi
1175    have_ecore_evas_software_xcb=`${PKG_CONFIG} --variable=XCB evas-software-x11`
1176    if test "x$have_ecore_evas_software_xcb" = "xyes" -a "x${have_ecore_x_xcb}" = "xyes" ; then
1177       AC_DEFINE(BUILD_ECORE_EVAS_SOFTWARE_XCB, 1, [Evas Software XCB Engine Support])
1178    fi
1179 fi
1180
1181 # ecore_evas_xrender_x11
1182
1183 ECORE_EVAS_CHECK_MODULE([xrender-x11],
1184    [${want_ecore_evas_xrender_x11}],
1185    [XRender Xlib],
1186    [${have_ecore_x_xlib}])
1187
1188 # ecore_evas_opengl_x11
1189
1190 ECORE_EVAS_CHECK_MODULE([opengl-x11],
1191    [${want_ecore_evas_opengl_x11}],
1192    [OpenGL Xlib],
1193    [${have_ecore_x_xlib}])
1194
1195 # ecore_evas_software_x11 16 bits
1196
1197 ECORE_EVAS_CHECK_MODULE([software-16-x11],
1198    [${want_ecore_evas_software_16_x11}],
1199    [Software Xlib 16 bits],
1200    [${have_ecore_x_xlib}])
1201
1202 # ecore_evas_xrender_xcb
1203
1204 ECORE_EVAS_CHECK_MODULE([xrender-xcb],
1205    [${want_ecore_evas_xrender_xcb}],
1206    [XRender XCB],
1207    [${ecore_evas_xcb_deps}])
1208
1209 if test "x$have_ecore_evas_software_x11" = "xyes" -o \
1210         "x$have_ecore_evas_xrender_x11" = "xyes" -o \
1211         "x$have_ecore_evas_opengl_x11" = "xyes" -o \
1212         "x$have_ecore_evas_software_16_x11" = "xyes" -o \
1213         "x$have_ecore_evas_software_xcb" = "xyes" -o \
1214         "x$have_ecore_evas_xrender_xcb" = "xyes"; then
1215    AC_DEFINE(BUILD_ECORE_EVAS_X11, 1, [Support for X Window Engines in Ecore_Evas])
1216    requirements_ecore_evas="ecore-x ${requirements_ecore_evas}"
1217 fi
1218
1219 # ecore_evas_win32
1220
1221 ECORE_EVAS_CHECK_MODULE([software-gdi],
1222    [${want_ecore_evas_software_gdi}],
1223    [Software GDI],
1224    [${have_ecore_win32}])
1225
1226 ECORE_EVAS_CHECK_MODULE([software-ddraw],
1227    [${want_ecore_evas_software_ddraw}],
1228    [Software DirectDraw],
1229    [${have_ecore_win32}])
1230
1231 ECORE_EVAS_CHECK_MODULE([direct3d],
1232    [${want_ecore_evas_direct3d}],
1233    [Direct3d],
1234    [${have_ecore_win32}])
1235
1236 ECORE_EVAS_CHECK_MODULE([opengl-glew],
1237    [${want_ecore_evas_opengl_glew}],
1238    [Glew OpenGL],
1239    [${have_ecore_win32}])
1240
1241 ECORE_EVAS_CHECK_MODULE([software-16-ddraw],
1242    [${want_ecore_evas_software_16_ddraw}],
1243    [16 bpp Software DirectDraw],
1244    [${have_ecore_win32}])
1245
1246 if test "x${have_ecore_evas_software_gdi}" = "xyes" -o \
1247         "x${have_ecore_evas_software_ddraw}" = "xyes" -o \
1248         "x${have_ecore_evas_direct3d}" = "xyes" -o \
1249         "x${have_ecore_evas_opengl_glew}" = "xyes" -o \
1250         "x${have_ecore_evas_software_16_ddraw}" = "xyes" ; then
1251    AC_DEFINE(BUILD_ECORE_EVAS_WIN32, 1, [Support for Win32 Engine in Ecore_Evas])
1252    requirements_ecore_evas="ecore-win32 ${requirements_ecore_evas}"
1253 fi
1254
1255 # ecore_evas_quartz
1256
1257 ECORE_EVAS_CHECK_MODULE([quartz],
1258    [${want_ecore_evas_quartz}],
1259    [Quartz],
1260    [${have_ecore_quartz}],
1261    [requirements_ecore_evas="ecore-quartz ${requirements_ecore_evas}"])
1262
1263 # ecore_evas_software_sdl
1264
1265 ECORE_EVAS_CHECK_MODULE([software-sdl],
1266    [${want_ecore_evas_software_sdl}],
1267    [Software SDL],
1268    [${have_ecore_sdl}],
1269    [requirements_ecore_evas="ecore-sdl ${requirements_ecore_evas}"])
1270
1271 # ecore_evas_gl_sdl
1272
1273 ECORE_EVAS_CHECK_MODULE([opengl-sdl],
1274    [${want_ecore_evas_gl_sdl}],
1275    [OpenGL SDL],
1276    [${have_ecore_sdl}],
1277    [requirements_ecore_evas="ecore-sdl ${requirements_ecore_evas}"])
1278
1279 # ecore_evas_directfb
1280
1281 ECORE_EVAS_CHECK_MODULE([directfb],
1282    [${want_ecore_evas_directfb}],
1283    [DirectFB],
1284    [${have_ecore_directfb}],
1285    [requirements_ecore_evas="ecore-directfb ${requirements_ecore_evas}"])
1286
1287 # ecore_evas_fb
1288
1289 ECORE_EVAS_CHECK_MODULE([fb],
1290    [${want_ecore_evas_fb}],
1291    [Linux Framebuffer],
1292    [${have_ecore_fb}],
1293    [requirements_ecore_evas="ecore-fb ${requirements_ecore_evas}"])
1294
1295 # ecore_evas_wince
1296
1297 ECORE_EVAS_CHECK_MODULE([software-16-wince],
1298    [${want_ecore_evas_software_16_wince}],
1299    [16 bpp Software Windows CE],
1300    [${have_ecore_wince}],
1301    [requirements_ecore_evas="ecore-wince ${requirements_ecore_evas}"])
1302
1303
1304
1305 ### requirements
1306
1307 AC_SUBST(requirements_ecore)
1308 AC_SUBST(requirements_ecore_con)
1309 AC_SUBST(requirements_ecore_config)
1310 AC_SUBST(requirements_ecore_data)
1311 AC_SUBST(requirements_ecore_directfb)
1312 AC_SUBST(requirements_ecore_evas)
1313 AC_SUBST(requirements_ecore_fb)
1314 AC_SUBST(requirements_ecore_file)
1315 AC_SUBST(requirements_ecore_imf)
1316 AC_SUBST(requirements_ecore_imf_evas)
1317 AC_SUBST(requirements_ecore_input)
1318 AC_SUBST(requirements_ecore_input_evas)
1319 AC_SUBST(requirements_ecore_ipc)
1320 AC_SUBST(requirements_ecore_quartz)
1321 AC_SUBST(requirements_ecore_sdl)
1322 AC_SUBST(requirements_ecore_txt)
1323 AC_SUBST(requirements_ecore_x)
1324 AC_SUBST(requirements_ecore_win32)
1325 AC_SUBST(requirements_ecore_wince)
1326
1327 AC_OUTPUT([
1328 Makefile
1329 ecore-con.pc
1330 ecore-config.pc
1331 ecore-data.pc
1332 ecore-directfb.pc
1333 ecore-evas.pc
1334 ecore-fb.pc
1335 ecore-file.pc
1336 ecore-quartz.pc
1337 ecore-imf.pc
1338 ecore-imf-evas.pc
1339 ecore-ipc.pc
1340 ecore-x.pc
1341 ecore-input.pc
1342 ecore-input-evas.pc
1343 ecore-win32.pc
1344 ecore-sdl.pc
1345 ecore-txt.pc
1346 ecore-wince.pc
1347 ecore.pc
1348 doc/ecore.dox
1349 doc/Makefile
1350 src/Makefile
1351 src/bin/Makefile
1352 src/lib/Makefile
1353 src/lib/ecore/Makefile
1354 src/lib/ecore_con/Makefile
1355 src/lib/ecore_config/Makefile
1356 src/lib/ecore_data/Makefile
1357 src/lib/ecore_directfb/Makefile
1358 src/lib/ecore_evas/Makefile
1359 src/lib/ecore_fb/Makefile
1360 src/lib/ecore_file/Makefile
1361 src/lib/ecore_quartz/Makefile
1362 src/lib/ecore_sdl/Makefile
1363 src/lib/ecore_imf/Makefile
1364 src/lib/ecore_imf_evas/Makefile
1365 src/lib/ecore_input/Makefile
1366 src/lib/ecore_input_evas/Makefile
1367 src/lib/ecore_ipc/Makefile
1368 src/lib/ecore_txt/Makefile
1369 src/lib/ecore_win32/Makefile
1370 src/lib/ecore_wince/Makefile
1371 src/lib/ecore_x/Makefile
1372 src/lib/ecore_x/xlib/Makefile
1373 src/lib/ecore_x/xcb/Makefile
1374 README
1375 ecore.spec
1376 po/Makefile.in
1377 ])
1378
1379 echo
1380 echo "$PACKAGE $VERSION"
1381 echo
1382 echo "Optional Modules:"
1383 echo
1384 echo " Core:"
1385 echo
1386 echo "  Ecore........................: always"
1387 echo "    Thread support.............: $have_pthread"
1388 echo "    GLib support...............: $have_glib"
1389 echo "  Ecore_Data...................: $have_ecore_data"
1390 echo "  Ecore_Txt....................: $have_ecore_txt"
1391 echo "  Ecore_Con....................: $have_ecore_con"
1392 if test "x$have_ecore_con" = "xyes" ; then
1393   echo $ECHO_N "    OpenSSL....................: $have_openssl $ECHO_C"
1394 if test "x$have_gnutls" = "xyes" ; then
1395   echo " (disabled)"
1396 else
1397   echo
1398 fi
1399   echo "    GnuTLS.....................: $have_gnutls"
1400   echo "    CURL.......................: $have_curl"
1401   echo "    Abstract Sockets...........: $want_abstract_sockets"
1402   echo "    c-ares.....................: $have_cares"
1403 fi
1404 echo "  Ecore_Ipc....................: $have_ecore_ipc"
1405 if test "x$have_ecore_ipc" = "xyes" ; then
1406   echo $ECHO_N "    OpenSSL....................: $have_openssl $ECHO_C"
1407 if test "x$have_gnutls" = "xyes" ; then
1408   echo " (disabled)"
1409 else
1410   echo
1411 fi
1412   echo "    GnuTLS.....................: $have_gnutls"
1413 fi
1414 echo "  Ecore_File...................: $have_ecore_file"
1415 if test "x$have_ecore_file" = "xyes" ; then
1416   echo "    Inotify....................: $have_inotify"
1417   echo "    Windows notification.......: $have_notify_win32"
1418   echo "    Poll.......................: $have_poll"
1419   echo "    CURL.......................: $have_curl"
1420 fi
1421 echo "  Ecore_Config.................: $have_ecore_config"
1422 echo "  Ecore_IMF....................: $have_ecore_imf"
1423 echo "  Ecore_IMF_Evas...............: $have_ecore_imf_evas"
1424 echo "  Ecore_Input..................: $have_ecore_input"
1425 echo "  Ecore_Input_Evas.............: $have_ecore_input_evas"
1426
1427 echo
1428 echo " Graphic systems:"
1429 echo
1430
1431 if test "x$have_ecore_x" = "xyes" ; then
1432   if test "x$have_ecore_x_xcb" = "xyes" ; then
1433     echo "  Ecore_X (XCB backend)........: $have_ecore_x_xcb"
1434     echo "    Xprint.....................: $have_ecore_x_xcb_xprint"
1435     echo "    Xinerama...................: $have_ecore_x_xcb_xinerama"
1436     echo "    Xrandr.....................: $have_ecore_x_xcb_randr"
1437     echo "    Xscreensaver...............: $have_ecore_x_xcb_screensaver"
1438     echo "    Xshape.....................: $have_ecore_x_xcb_shape"
1439     echo "    Xsync......................: $have_ecore_x_xcb_sync"
1440     echo "    Xrender....................: $have_ecore_x_xcb_render"
1441     echo "    Xcomposite.................: $have_ecore_x_xcb_composite"
1442     echo "    Xfixes.....................: $have_ecore_x_xcb_xfixes"
1443     echo "    Xdamage....................: $have_ecore_x_xcb_damage"
1444     echo "    Xdpms......................: $have_ecore_x_xcb_dpms"
1445     echo "    Xtest......................: $have_ecore_x_xcb_xtest"
1446   else
1447     echo "  Ecore_X (Xlib backend).......: $have_ecore_x"
1448     echo "    Xcursor....................: $use_Xcursor"
1449     echo "    Xkb........................: $use_xkb"
1450     echo "    Xprint.....................: $use_xprint"
1451     echo "    Xinerama...................: $use_xinerama"
1452     echo "    Xrandr.....................: $use_xrandr"
1453     echo "    Xscreensaver...............: $use_xss"
1454     echo "    Xrender....................: $use_xrender"
1455     echo "    Xcomposite.................: $use_xcomposite"
1456     echo "    Xfixes.....................: $use_xfixes"
1457     echo "    Xdamage....................: $use_xdamage"
1458     echo "    Xdpms......................: $use_xdpms"
1459     echo "    Xtest......................: $use_xtest"
1460     echo "    XIM........................: $want_xim"
1461     echo "    Xi2........................: $use_xi2"
1462   fi
1463 else
1464   echo "  Ecore_X......................: $have_ecore_x"
1465 fi
1466 echo "  Ecore_Win32..................: $have_ecore_win32"
1467 echo "  Ecore_Quartz.................: $have_ecore_quartz"
1468 echo "  Ecore_SDL....................: $have_ecore_sdl"
1469 echo "  Ecore_FB.....................: $have_ecore_fb"
1470 if test "x${have_ecore_fb}" = "xyes" ; then
1471   echo "    Touchscreen................: $have_tslib"
1472 fi
1473 echo "  Ecore_DirectFB...............: $have_ecore_directfb"
1474 echo "  Ecore_WinCE..................: $have_ecore_wince"
1475
1476 echo
1477 echo " Ecore Evas:"
1478 echo
1479
1480 echo "  Ecore_Evas...................: $have_ecore_evas"
1481 if test "x${have_ecore_evas}" = "xyes" ; then
1482   echo "    Software Memory Buffer.....: $have_ecore_evas_software_buffer"
1483   if test "x${have_ecore_evas_software_x11}" = "xyes" ; then
1484     echo "    Software X11...............: $have_ecore_evas_software_x11 (Xlib=${have_ecore_evas_software_xlib}) (XCB=${have_ecore_evas_software_xcb})"
1485   else
1486     echo "    Software X11...............: $have_ecore_evas_software_x11"
1487   fi
1488   echo "    XRender X11................: $have_ecore_evas_xrender_x11"
1489   echo "    OpenGL X11.................: $have_ecore_evas_opengl_x11"
1490   echo "    XRender XCB................: $have_ecore_evas_xrender_xcb"
1491   echo "    Software GDI...............: $have_ecore_evas_software_gdi"
1492   echo "    Software DirectDraw........: $have_ecore_evas_software_ddraw"
1493   echo "    Direct3D...................: $have_ecore_evas_direct3d"
1494   echo "    OpenGL Glew................: $have_ecore_evas_opengl_glew"
1495   echo "    Quartz.....................: $have_ecore_evas_quartz"
1496   echo "    Software SDL...............: $have_ecore_evas_software_sdl"
1497   echo "    OpenGL SDL.................: $have_ecore_evas_opengl_sdl"
1498   echo "    DirectFB...................: $have_ecore_evas_directfb"
1499   echo "    Software Framebuffer.......: $have_ecore_evas_fb"
1500   echo "    Software 16bit X11.........: $have_ecore_evas_software_16_x11"
1501   echo "    Software 16bit DirectDraw..: $have_ecore_evas_software_16_ddraw"
1502   echo "    Software 16bit WinCE.......: $have_ecore_evas_software_16_wince"
1503 fi
1504 echo
1505 echo "Documentation..........: ${build_doc}"
1506 if test "x${build_doc}" = "xyes" ; then
1507    echo "  Building.............: make doc"
1508 fi
1509 echo
1510 echo "Compilation............: make (or gmake)"
1511 echo "  CPPFLAGS.............: $CPPFLAGS"
1512 echo "  CFLAGS...............: $CFLAGS"
1513 echo "  CXXFLAGS.............: $CXXFLAGS"
1514 echo "  LDFLAGS..............: $LDFLAGS"
1515 echo
1516 echo "Installation...........: make install (as root if needed, with 'su' or 'sudo')"
1517 echo "  prefix...............: $prefix"
1518 echo