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