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