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