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