elementary: Add ecore_cocoa backend to elementary
[framework/uifw/elementary.git] / configure.ac
1 =-------##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
2 ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
3 m4_define([v_maj], [0])
4 m4_define([v_min], [8])
5 m4_define([v_mic], [0])
6 m4_define([v_rev], m4_esyscmd([(svnversion "${SVN_REPO_PATH:-.}" | grep -v export || echo 0) | awk -F : '{printf("%s\n", $1);}' | tr -d ' :MSP\n']))
7 m4_if(v_rev, [0], [m4_define([v_rev], m4_esyscmd([git log 2> /dev/null | (grep -m1 git-svn-id || echo 0) | sed -e 's/.*@\([0-9]*\).*/\1/' | tr -d '\n']))])
8 ##--   When released, remove the dnl on the below line
9 dnl m4_undefine([v_rev])
10 ##--   When doing snapshots - change soname. remove dnl on below line
11 m4_define([relname], [ver-pre-svn-09])
12 m4_define([v_rel], [-release relname])
13 ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
14 m4_ifdef([v_rev], [m4_define([v_ver], [v_maj.v_min.v_mic.v_rev])],
15 [m4_define([v_ver], [v_maj.v_min.v_mic])])
16 m4_define([lt_rev], m4_eval(v_maj + v_min))
17 m4_define([lt_cur], v_mic)
18 m4_define([lt_age], v_min)
19 ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
20 ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
21
22 AC_INIT([elementary], [v_ver], [enlightenment-devel@lists.sourceforge.net])
23 AC_PREREQ(2.52)
24 AC_CONFIG_SRCDIR([configure.ac])
25 AC_CONFIG_MACRO_DIR([m4])
26 AC_CANONICAL_BUILD
27 AC_CANONICAL_HOST
28
29 AC_CONFIG_HEADERS([elementary_config.h])
30 AH_TOP([
31 #ifndef EFL_CONFIG_H__
32 #define EFL_CONFIG_H__
33 ])
34 AH_BOTTOM([
35 #endif /* EFL_CONFIG_H__ */
36 ])
37
38 AM_INIT_AUTOMAKE([1.6 dist-bzip2])
39 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
40
41 AC_GNU_SOURCE
42
43 AC_C_BIGENDIAN
44 AC_ISC_POSIX
45 AC_PROG_CC
46 AM_PROG_CC_STDC
47 AC_HEADER_STDC
48 AC_C_CONST
49 AC_C___ATTRIBUTE__
50 AC_FUNC_ALLOCA
51
52 AC_LIBTOOL_WIN32_DLL
53 define([AC_LIBTOOL_LANG_CXX_CONFIG], [:])dnl
54 define([AC_LIBTOOL_LANG_F77_CONFIG], [:])dnl
55 AC_PROG_LIBTOOL
56
57 ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
58 ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
59 m4_ifdef([v_rev], , [m4_define([v_rev], [0])])
60 m4_ifdef([v_rel], , [m4_define([v_rel], [])])
61 AC_DEFINE_UNQUOTED(VMAJ, [v_maj], [Major version])
62 AC_DEFINE_UNQUOTED(VMIN, [v_min], [Minor version])
63 AC_DEFINE_UNQUOTED(VMIC, [v_mic], [Micro version])
64 AC_DEFINE_UNQUOTED(VREV, [v_rev], [Revison])
65 version_info="lt_rev:lt_cur:lt_age"
66 release_info="v_rel"
67 AC_SUBST(version_info)
68 AC_SUBST(release_info)
69 ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
70 ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
71 VMAJ=v_maj
72 VMIN=v_min
73 AC_SUBST(VMAJ)
74 AC_SUBST(VMIN)
75
76 # pkg-config
77 PKG_PROG_PKG_CONFIG
78 EDJE_VERSION=`$PKG_CONFIG edje --modversion | awk -F . '{printf("%s.0.0", $1);}'`
79
80 case "$host_os" in
81   mingw32ce* | cegcc*)
82     MODULE_ARCH="$host_os-$host_cpu"
83     MODULE_EDJE="$host_os-$host_cpu"
84     ;;
85   *)
86     MODULE_ARCH="$host_os-$host_cpu-v_maj.v_min.v_mic"
87     MODULE_EDJE="$host_os-$host_cpu-${EDJE_VERSION}"
88     ;;
89 esac
90 AC_SUBST(release_info)
91 AC_SUBST(MODULE_ARCH)
92 AC_DEFINE_UNQUOTED(MODULE_ARCH, "$MODULE_ARCH", "Module architecture")
93 AC_SUBST(MODULE_EDJE)
94 AC_DEFINE_UNQUOTED(MODULE_EDJE, "$MODULE_EDJE", "Edje module architecture")
95
96 EFL_SHARED_EXTENSION="${shrext_cmds}"
97 AC_DEFINE_UNQUOTED(EFL_SHARED_EXTENSION, "${EFL_SHARED_EXTENSION}", "Shared extension")
98
99 requirement_elm=""
100
101 PKG_PROG_PKG_CONFIG
102
103 # Check whether pkg-config supports Requires.private
104 if $PKG_CONFIG --atleast-pkgconfig-version 0.22; then
105    pkgconfig_requires_private="Requires.private"
106 else
107    pkgconfig_requires_private="Requires"
108 fi
109 AC_SUBST(pkgconfig_requires_private)
110
111 #================================================
112 if test "x${prefix}" = "xNONE"; then
113   LOCALE_DIR="${ac_default_prefix}/share/locale"
114 else
115   LOCALE_DIR="${prefix}/share/locale"
116 fi
117 AC_SUBST(LOCALE_DIR)
118 #================================================
119
120 lt_enable_auto_import=""
121 ELM_UNIX_DEF="#undef"
122 ELM_WIN32_DEF="#undef"
123 ELM_WINCE_DEF="#undef"
124 have_windows="no"
125 have_dlopen="no"
126 case "$host_os" in
127    mingw32ce* | cegcc*)
128       PKG_CHECK_MODULES([EVIL], [evil])
129       AC_DEFINE(HAVE_EVIL, 1, [Set to 1 if evil package is installed.])
130       lt_enable_auto_import="-Wl,--enable-auto-import"
131       ELM_WINCE_DEF="#define"
132       have_windows="yes"
133 dnl managed by evil
134       AC_DEFINE(HAVE_DLADDR)
135       have_dlopen="yes"
136       dlopen_libs=-ldl
137       requirement_elm="evil"
138       have_socket="no"
139     ;;
140    mingw*)
141       PKG_CHECK_MODULES([EVIL], [evil])
142       AC_DEFINE(HAVE_EVIL, 1, [Set to 1 if evil package is installed.])
143       lt_enable_auto_import="-Wl,--enable-auto-import"
144       ELM_WIN32_DEF="#define"
145       have_windows="yes"
146 dnl managed by evil
147       AC_DEFINE(HAVE_DLADDR)
148       have_dlopen="yes"
149       dlopen_libs=-ldl
150       requirement_elm="evil"
151       have_socket="no"
152       ;;
153    *solaris*)
154       ELM_UNIX_DEF="#define"
155       have_socket="yes"
156       have_dlopen="yes"
157       AC_CHECK_LIB([socket], [connect], [], [have_socket="no"])
158       ;;
159    darwin*)
160       ELM_UNIX_DEF="#define"
161       have_socket="yes"
162       have_dlopen="yes"
163       AC_CHECK_HEADERS([crt_externs.h])
164       AC_DEFINE([environ], [(*_NSGetEnviron())], ["apple doesn't follow POSIX in this case."])
165       ;;
166    *)
167       ELM_UNIX_DEF="#define"
168       AC_CHECK_FUNCS(dlopen, res=yes, res=no)
169       if test "x$res" = "xyes"; then
170         AC_CHECK_FUNCS(dladdr, AC_DEFINE(HAVE_DLADDR))
171         have_dlopen="yes"
172       else
173         AC_CHECK_LIB(dl, dlopen, res=yes, res=no)
174         if test "x$res" = "xyes"; then
175           AC_CHECK_LIB(dl, dladdr, AC_DEFINE(HAVE_DLADDR))
176           dlopen_libs=-ldl
177           have_dlopen="yes"
178         fi
179       fi
180       have_socket="yes"
181       ;;
182 esac
183 AC_CHECK_FUNCS(strcasestr, AC_DEFINE(HAVE_STRCASESTR))
184 AM_CONDITIONAL([BUILD_RUN], [test "x$have_socket" = "xyes"])
185 AM_CONDITIONAL([BUILD_MODULES], [test "x$have_dlopen" = "xyes"])
186
187 m4_ifdef([v_mic],
188    [
189     EFL_COMPILER_FLAG([-Wall])
190    ])
191
192 have_fork="no"
193 want_quicklaunch="auto"
194 AC_ARG_ENABLE([quick-launch],
195         [AC_HELP_STRING([--disable-quick-launch], [disable quick-launch support, @<:@default=detect@:>@])],
196         [want_quicklaunch=$enableval], [])
197
198 if test "x$want_quicklaunch" != "xno"; then
199    AC_CHECK_FUNCS(fork, [
200         have_fork="yes"
201         AC_DEFINE(HAVE_FORK)
202    ])
203 fi
204 AM_CONDITIONAL([BUILD_QUICKLAUNCH], [test "x$have_fork" = "xyes" && test "x$have_dlopen" = "xyes"])
205
206 AC_SUBST(dlopen_libs)
207 AC_SUBST(lt_enable_auto_import)
208 AC_SUBST(ELM_UNIX_DEF)
209 AC_SUBST(ELM_WIN32_DEF)
210 AC_SUBST(ELM_WINCE_DEF)
211
212 AM_CONDITIONAL([ELEMENTARY_WINDOWS_BUILD], [test "x${have_windows}" = "xyes"])
213
214 PKG_CHECK_MODULES([ELEMENTARY],
215    [
216     eina >= 1.0.999
217     eet >= 1.4.0
218     evas >= 1.0.999
219     ecore >= 1.0.999
220     ecore-evas >= 1.0.999
221     ecore-file >= 1.0.999
222     ecore-imf >= 1.0.999
223     ecore-con >= 1.0.999
224     edje >= 1.0.999
225    ]
226 )
227
228 PKG_CHECK_MODULES([EIO],
229         [eio],
230         [
231          have_eio="yes"
232          AC_DEFINE(HAVE_EIO, 1, [Use EIO for asynchronous file access])
233          requirement_elm="eio ${requirement_elm}"
234         ],
235         [have_eio="no"])
236
237 AM_CONDITIONAL([HAVE_EIO], [test "x${have_eio}" = "xyes"])
238
239 have_emotion="no"
240 want_elementary_emotion="yes"
241 AC_ARG_ENABLE([emotion],
242    [AC_HELP_STRING([--disable-emotion], [disable emotion support. @<:@default=enabled@:>@])],
243    [want_elementary_emotion=$enableval], [])
244
245 if test "x$want_elementary_emotion" != "xno"; then
246    PKG_CHECK_MODULES([EMOTION],
247         [emotion],
248         [
249          have_emotion="yes"
250          AC_DEFINE(HAVE_EMOTION, 1, [Use Emotion for asynchronous file access])
251          requirement_elm="emotion ${requirement_elm}"
252         ],
253         [have_emotion="no"])
254 fi
255
256 AM_CONDITIONAL([HAVE_EMOTION], [test "x${have_emotion}" = "xyes"])
257
258 requirement_elm="edje >= 1.0.0 ecore-file >= 1.0.0 ecore-evas >= 1.0.0 ecore >= 1.0.0 evas >= 1.0.0 eet >= 1.4.0 eina >= 1.0.0 ${requirement_elm}"
259
260 have_elementary_x="no"
261 want_elementary_x="auto"
262 AC_ARG_ENABLE([ecore-x],
263    [AC_HELP_STRING([--disable-ecore-x], [disable ecore-x support. @<:@default=detect@:>@])],
264    [want_elementary_x=$enableval], [])
265
266 if test "x$want_elementary_x" != "xno"; then
267    PKG_CHECK_MODULES([ELEMENTARY_X],
268       [ecore-x >= 1.0.0],
269       [
270        AC_DEFINE(HAVE_ELEMENTARY_X, 1, [X11 support for Elementary])
271        have_elementary_x="yes"
272        requirement_elm="ecore-x >= 1.0.0 ${requirement_elm}"
273       ],
274       [have_elementary_x="no"]
275    )
276 else
277     have_elementary_x="no"
278 fi
279 if test "x$want_elementary_x" = "xyes" -a "x$have_elementary_x" = "xno"; then
280     AC_MSG_ERROR([ecore-x support requested, but not found by pkg-config.])
281 fi
282
283 have_conformant_autoscroll="no"
284 want_conformant_autoscroll="yes"
285 AC_ARG_ENABLE([ecore-x],
286    [AC_HELP_STRING([--disable-ecore-x], [disable ecore-x support. @<:@default=detect@:>@])],
287    [want_conformant_autoscroll=$enableval], [])
288
289 if test "x$want_conformant_autoscroll" != "xno"; then
290    PKG_CHECK_MODULES([ELEMENTARY_X],
291       [ecore-x >= 1.0.0],
292       [
293        AC_DEFINE(HAVE_CONFORMANT_AUTOSCROLL, 1, [autoscroll with conformant])
294        have_conformant_autoscroll="yes"
295        requirement_elm="ecore-x >= 1.0.0 ${requirement_elm}"
296       ],
297       [have_conformant_autoscroll="no"]
298    )
299 else
300     have_conformant_autoscroll="no"
301 fi
302 if test "x$want_conformant_autoscroll" = "xyes" -a "x$have_conformant_autoscroll" = "xno"; then
303     AC_MSG_ERROR([ecore-x support requested, but not found by pkg-config.])
304 fi
305
306 have_elementary_fb="no"
307 want_elementary_fb="auto"
308 AC_ARG_ENABLE([ecore-fb],
309    [AC_HELP_STRING([--disable-ecore-fb], [disable ecore-fb support. @<:@default=detect@:>@])],
310    [want_elementary_fb=$enableval], [])
311
312 if test "x$want_elementary_fb" != "xno"; then
313    PKG_CHECK_MODULES([ELEMENTARY_FB],
314       [ecore-fb >= 1.0.0],
315       [
316        AC_DEFINE(HAVE_ELEMENTARY_FB, 1, [FB support for Elementary])
317        have_elementary_fb="yes"
318        requirement_elm="ecore-fb >= 1.0.0 ${requirement_elm}"
319       ],
320       [have_elementary_fb="no"]
321    )
322 else
323     have_elementary_fb="no"
324 fi
325 if test "x$want_elementary_fb" = "xyes" -a "x$have_elementary_fb" = "xno"; then
326     AC_MSG_ERROR([ecore-fb support requested, but not found by pkg-config.])
327 fi
328
329 have_elementary_sdl="no"
330 want_elementary_sdl="auto"
331 AC_ARG_ENABLE([ecore-sdl],
332    [AC_HELP_STRING([--disable-ecore-sdl], [disable ecore-sdl support. @<:@default=detect@:>@])],
333    [want_elementary_sdl=$enableval], [])
334
335 if test "x$want_elementary_sdl" != "xno"; then
336    PKG_CHECK_MODULES([ELEMENTARY_SDL],
337       [ecore-sdl >= 1.0.0],
338       [
339        AC_DEFINE(HAVE_ELEMENTARY_SDL, 1, [SDL support for Elementary])
340        have_elementary_sdl="yes"
341        requirement_elm="ecore-sdl >= 1.0.0 ${requirement_elm}"
342       ],
343       [have_elementary_sdl="no"]
344    )
345 else
346     have_elementary_sdl="no"
347 fi
348 if test "x$want_elementary_sdl" = "xyes" -a "x$have_elementary_sdl" = "xno"; then
349     AC_MSG_ERROR([ecore-sdl support requested, but not found by pkg-config.])
350 fi
351
352 have_elementary_cocoa="no"
353 want_elementary_cocoa="auto"
354 AC_ARG_ENABLE([ecore-cocoa],
355    [AC_HELP_STRING([--disable-ecore-cocoa], [disable ecore-cocoa support. @<:@default=detect@:>@])],
356    [want_elementary_cocoa=$enableval], [])
357
358 if test "x$want_elementary_cocoa" != "xno"; then
359    PKG_CHECK_MODULES([ELEMENTARY_COCOA],
360       [ecore-cocoa >= 1.0.0],
361       [
362        AC_DEFINE(HAVE_ELEMENTARY_COCOA, 1, [COCOA support for Elementary])
363        have_elementary_cocoa="yes"
364        requirement_elm="ecore-cocoa >= 1.0.0 ${requirement_elm}"
365       ],
366       [have_elementary_cocoa="no"]
367    )
368 else
369     have_elementary_cocoa="no"
370 fi
371 if test "x$want_elementary_cocoa" = "xyes" -a "x$have_elementary_cocoa" = "xno"; then
372     AC_MSG_ERROR([ecore-cocoa support requested, but not found by pkg-config.])
373 fi
374
375 have_elementary_win32="no"
376 want_elementary_win32="auto"
377 AC_ARG_ENABLE([ecore-win32],
378    [AC_HELP_STRING([--disable-ecore-win32], [disable ecore-win32 support. @<:@default=detect@:>@])],
379    [want_elementary_win32=$enableval], [])
380
381 if test "x$want_elementary_win32" != "xno"; then
382    PKG_CHECK_MODULES([ELEMENTARY_WIN32],
383       [ecore-win32 >= 1.0.0],
384       [
385        AC_DEFINE(HAVE_ELEMENTARY_WIN32, 1, [Windows XP support for Elementary])
386        have_elementary_win32="yes"
387        requirement_elm="ecore-win32 >= 1.0.0 ${requirement_elm}"
388       ],
389       [have_elementary_win32="no"]
390    )
391 else
392     have_elementary_win32="no"
393 fi
394 if test "x$want_elementary_win32" = "xyes" -a "x$have_elementary_win32" = "xno"; then
395     AC_MSG_ERROR([ecore-win32 support requested, but not found by pkg-config.])
396 fi
397
398 have_elementary_wince="no"
399 want_elementary_wince="auto"
400 AC_ARG_ENABLE([ecore-wince],
401    [AC_HELP_STRING([--disable-ecore-wince], [disable ecore-wince support. @<:@default=detect@:>@])],
402    [want_elementary_wince=$enableval], [])
403
404 if test "x$want_elementary_wince" != "xno"; then
405    PKG_CHECK_MODULES([ELEMENTARY_WINCE],
406       [ecore-wince >= 1.0.0],
407       [
408        AC_DEFINE(HAVE_ELEMENTARY_WINCE, 1, [Windows CE support for Elementary])
409        have_elementary_wince="yes"
410        requirement_elm="ecore-wince >= 1.0.0 ${requirement_elm}"
411       ],
412       [have_elementary_wince="no"]
413    )
414 else
415     have_elementary_wince="no"
416 fi
417 if test "x$want_elementary_wince" = "xyes" -a "x$have_elementary_wince" = "xno"; then
418     AC_MSG_ERROR([ecore-wince support requested, but not found by pkg-config.])
419 fi
420
421 ELM_EDBUS_DEF="#undef"
422 have_elementary_edbus="no"
423 want_elementary_edbus="auto"
424 AC_ARG_ENABLE([edbus],
425    [AC_HELP_STRING([--disable-edbus], [disable edbus support. @<:@default=detect@:>@])],
426    [want_elementary_edbus=$enableval], [])
427
428 if test "x$want_elementary_edbus" != "xno"; then
429     PKG_CHECK_MODULES([ELEMENTARY_EDBUS],
430        [
431         edbus >= 1.0.0
432        ],
433        [
434         AC_DEFINE(HAVE_ELEMENTARY_EDBUS, 1, [EDBus support for Elementary])
435         have_elementary_edbus="yes"
436         ELM_EDBUS_DEF="#define"
437         requirement_elm="edbus >= 1.0.0 ${requirement_elm}"
438        ],
439        [have_elementary_edbus="no"]
440     )
441 else
442     have_elementary_edbus="no"
443 fi
444 if test "x$want_elementary_edbus" = "xyes" -a "x$have_elementary_edbus" = "xno"; then
445     AC_MSG_ERROR([E_DBus support requested, but no e_dbus found by pkg-config.])
446 fi
447 AC_SUBST(ELM_EDBUS_DEF)
448
449 ELM_EFREET_DEF="#undef"
450 have_elementary_efreet="no"
451 want_elementary_efreet="auto"
452 AC_ARG_ENABLE([efreet],
453    [AC_HELP_STRING([--disable-efreet], [disable efreet support. @<:@default=detect@:>@])],
454    [want_elementary_efreet=$enableval], [])
455
456 if test "x$want_elementary_efreet" != "xno"; then
457     PKG_CHECK_MODULES([ELEMENTARY_EFREET],
458        [
459         efreet >= 1.0.0
460         efreet-mime >= 1.0.0
461         efreet-trash >= 1.0.0
462        ],
463        [
464         AC_DEFINE(HAVE_ELEMENTARY_EFREET, 1, [Efreet support for Elementary])
465         have_elementary_efreet="yes"
466         ELM_EFREET_DEF="#define"
467         requirement_elm="efreet >= 1.0.0 efreet-mime >= 1.0.0 efreet-trash >= 1.0.0 ${requirement_elm}"
468        ],
469        [have_elementary_efreet="no"]
470     )
471 else
472     have_elementary_efreet="no"
473 fi
474 if test "x$want_elementary_efreet" = "xyes" -a "x$have_elementary_efreet" = "xno"; then
475     AC_MSG_ERROR([Efreet support requested, but no efreet/efreet-mime/efreet-trash found by pkg-config.])
476 fi
477 AC_SUBST(ELM_EFREET_DEF)
478
479 ELM_EWEATHER_DEF="#undef"
480 have_elementary_eweather="no"
481 want_elementary_eweather="auto"
482 AC_ARG_ENABLE([eweather],
483    [AC_HELP_STRING([--disable-eweather], [disable eweather support. @<:@default=detect@:>@])],
484    [want_elementary_eweather=$enableval], [])
485
486 if test "x$want_elementary_eweather" != "xno"; then
487     PKG_CHECK_MODULES([ELEMENTARY_EWEATHER],
488        [
489         eweather
490        ],
491        [
492         AC_DEFINE(HAVE_ELEMENTARY_EWEATHER, 1, [EWeather support for Elementary])
493         have_elementary_eweather="yes"
494         ELM_EWEATHER_DEF="#define"
495         requirement_elm="eweather ${requirement_elm}"
496        ],
497        [have_elementary_eweather="no"]
498     )
499 else
500     have_elementary_eweather="no"
501 fi
502 if test "x$want_elementary_eweather" = "xyes" -a "x$have_elementary_eweather" = "xno"; then
503     AC_MSG_ERROR([Eweather support requested, but no eweather found by pkg-config.])
504 fi
505 AC_SUBST(ELM_EWEATHER_DEF)
506
507 ELM_EMAP_DEF="#undef"
508 have_elementary_emap="no"
509 want_elementary_emap="auto"
510 AC_ARG_ENABLE([emap],
511    [AC_HELP_STRING([--disable-emap], [disable emap support. @<:@default=detect@:>@])],
512    [want_elementary_emap=$enableval], [])
513
514 if test "x$want_elementary_emap" != "xno"; then
515     PKG_CHECK_MODULES([ELEMENTARY_EMAP],
516        [
517         emap
518        ],
519        [
520         AC_DEFINE(HAVE_ELEMENTARY_EMAP, 1, [EMap support for Elementary])
521         have_elementary_emap="yes"
522         ELM_EMAP_DEF="#define"
523         requirement_elm="emap ${requirement_elm}"
524        ],
525        [have_elementary_emap="no"]
526     )
527 else
528     have_elementary_emap="no"
529 fi
530 if test "x$want_elementary_emap" = "xyes" -a "x$have_elementary_emap" = "xno"; then
531     AC_MSG_ERROR([Emap support requested, but no emap found by pkg-config.])
532 fi
533 AC_SUBST(ELM_EMAP_DEF)
534
535
536
537 ELM_ETHUMB_DEF="#undef"
538 have_elementary_ethumb="no"
539 want_elementary_ethumb="auto"
540 AC_ARG_ENABLE([ethumb],
541    [AC_HELP_STRING([--disable-ethumb], [disable ethumb support. @<:@default=detect@:>@])],
542    [want_elementary_ethumb=$enableval], [])
543
544 if test "x$want_elementary_ethumb" != "xno"; then
545     PKG_CHECK_MODULES([ELEMENTARY_ETHUMB],
546        [
547         ethumb_client
548        ],
549        [
550         AC_DEFINE(HAVE_ELEMENTARY_ETHUMB, 1, [Ethumb support for Elementary])
551         have_elementary_ethumb="yes"
552         ELM_ETHUMB_DEF="#define"
553         requirement_elm="ethumb_client ${requirement_elm}"
554        ],
555        [have_elementary_ethumb="no"]
556     )
557 else
558     have_elementary_ethumb="no"
559 fi
560 if test "x$want_elementary_ethumb" = "xyes" -a "x$have_elementary_ethumb" = "xno"; then
561     AC_MSG_ERROR([Ethumb support requested, but no ethumb found by pkg-config.])
562 fi
563 AC_SUBST(ELM_ETHUMB_DEF)
564
565 ELM_WEB_DEF="#undef"
566 have_elementary_web="no"
567 want_elementary_web="auto"
568 AC_ARG_ENABLE([web],
569    [AC_HELP_STRING([--disable-web], [disable web (WebKit) support. @<:@default=detect@:>@])],
570    [want_elementary_web=$enableval], [])
571
572 if test "x$want_elementary_web" != "xno"; then
573     PKG_CHECK_MODULES([ELEMENTARY_WEB],
574        [
575         ewebkit
576        ],
577        [
578         AC_DEFINE(HAVE_ELEMENTARY_WEB, 1, [Web support for Elementary])
579         webkit_datadir=$($PKG_CONFIG ewebkit --variable=datadir)
580         AC_DEFINE_UNQUOTED(WEBKIT_DATADIR,
581                            "$webkit_datadir",
582                            "WebKit's data dir")
583         have_elementary_web="yes"
584         ELM_WEB_DEF="#define"
585 ## web_client? how about ewebkit? at least in current upstreak webkit
586 ## there is no web_client.pc        
587 #        requirement_elm="web_client ${requirement_elm}"
588         requirement_elm="ewebkit ${requirement_elm}"
589        ],
590        [have_elementary_web="no"]
591     )
592 else
593     have_elementary_web="no"
594 fi
595 if test "x$want_elementary_web" = "xyes" -a "x$have_elementary_web" = "xno"; then
596     AC_MSG_ERROR([Web support requested, but no ewebkit found by pkg-config.])
597 fi
598 AC_SUBST(ELM_WEB_DEF)
599
600 ELM_DEBUG_DEF="#undef"
601 want_elementary_debug="no"
602 AC_ARG_ENABLE([debug],
603    [AC_HELP_STRING([--enable-debug], [enable elementary debug support. @<:@default=disabled@:>@])],
604    [want_elementary_debug=$enableval], [])
605
606 if test "x$want_elementary_debug" = "xyes"; then
607         AC_DEFINE(HAVE_ELEMENTARY_DEBUG, 1, [Elementary debug.])
608         ELM_DEBUG_DEF="#define"
609 fi
610 AC_SUBST(ELM_DEBUG_DEF)
611
612 ELM_ALLOCA_H_DEF="#undef"
613 AC_CHECK_HEADER(alloca.h, [ELM_ALLOCA_H_DEF="#define"])
614 AC_SUBST(ELM_ALLOCA_H_DEF)
615
616 ELM_LIBINTL_H_DEF="#undef"
617 AC_CHECK_HEADER(libintl.h, [ELM_LIBINTL_H_DEF="#define"])
618 AC_SUBST(ELM_LIBINTL_H_DEF)
619
620 EFL_CHECK_THREADS([
621   TH=1
622 ] , [
623   AC_MSG_ERROR(no thread support found. required.)
624   exit 1
625 ])
626 AC_SUBST(EFL_PTHREAD_CFLAGS)
627 AC_SUBST(EFL_PTHREAD_LIBS)
628
629 my_libs="-lm"
630 AC_SUBST(my_libs)
631 AC_SUBST(requirement_elm)
632
633 EFL_WITH_BIN([eet], [eet-eet], [eet])
634 EFL_WITH_BIN([edje], [edje-cc], [edje_cc])
635
636 EFL_CHECK_DOXYGEN([build_doc="yes"], [build_doc="no"])
637
638 EFL_ENABLE_BIN([elementary-test])
639 EFL_ENABLE_BIN([elementary-config])
640
641 m4_ifdef([AM_GNU_GETTEXT_VERSION], [
642 AM_GNU_GETTEXT_VERSION([0.17])
643 ])
644
645 m4_ifdef([AM_GNU_GETTEXT], [
646 AM_GNU_GETTEXT([external])
647 po_makefile_in=po/Makefile.in
648 have_po="yes"
649 ],[
650 have_po="no"
651 ])
652 AC_SUBST(LTLIBINTL)
653
654 if test "x${POSUB}" = "x" ; then
655    have_po="no"
656 fi
657
658 AM_CONDITIONAL([HAVE_PO], [test "x${have_po}" = "xyes"])
659
660 EFL_CHECK_PATH_MAX
661
662
663 ### Build and install examples
664 EFL_CHECK_BUILD_EXAMPLES([enable_build_examples="yes"], [enable_build_examples="no"])
665 EFL_CHECK_INSTALL_EXAMPLES([enable_install_examples="yes"], [enable_install_examples="no"])
666
667
668 AC_OUTPUT([
669 Makefile
670 elementary.spec
671 elementary.pc
672 doc/Makefile
673 doc/Doxyfile
674 doc/widgets/Makefile
675 src/Makefile
676 src/lib/Makefile
677 src/lib/Elementary.h
678 src/bin/Makefile
679 src/modules/Makefile
680 src/modules/access_output/Makefile
681 src/modules/test_entry/Makefile
682 src/modules/test_map/Makefile
683 src/modules/ctxpopup_copypasteUI/Makefile
684 src/modules/ctxpopup_copypasteshareUI/Makefile
685 src/modules/popup_copypasteUI/Makefile
686 src/edje_externals/Makefile
687 src/examples/Makefile
688 data/Makefile
689 data/themes/Makefile
690 data/images/Makefile
691 data/objects/Makefile
692 data/desktop/Makefile
693 data/edje_externals/Makefile
694 config/Makefile
695 config/default/Makefile
696 config/standard/Makefile
697 config/illume/Makefile
698 config/slp/Makefile
699 $po_makefile_in
700 ])
701
702 #####################################################################
703 ## Info
704
705 echo
706 echo
707 echo
708 echo "------------------------------------------------------------------------"
709 echo "$PACKAGE $VERSION"
710 echo "------------------------------------------------------------------------"
711 echo
712 echo "Configuration Options Summary:"
713 echo
714 echo "  Engines:"
715 echo "    X11....................: ${have_elementary_x}"
716 echo "    Framebuffer............: ${have_elementary_fb}"
717 echo "    SDL....................: ${have_elementary_sdl}"
718 echo "    Cocoa..................: ${have_elementary_cocoa}"
719 echo "    Windows XP.............: ${have_elementary_win32}"
720 echo "    Windows CE.............: ${have_elementary_wince}"
721 echo
722 echo "  Features:"
723 echo "    EDBus..................: ${have_elementary_edbus}"
724 echo "    EFreet.................: ${have_elementary_efreet}"
725 echo "    EWeather...............: ${have_elementary_eweather}"
726 echo "    EMap...................: ${have_elementary_emap}"
727 echo "    Ethumb.................: ${have_elementary_ethumb}"
728 echo "    Web (WebKit)...........: ${have_elementary_web}"
729 echo "    Quick Launch...........: ${have_fork}"
730 echo "    EIO....................: ${have_eio}"
731 echo "    Emotion................: ${have_emotion}"
732 echo
733 echo "  eet......................: ${eet_eet}"
734 echo "  edje_cc..................: ${edje_cc}"
735 echo
736 echo "  Build elementary_test....: ${have_elementary_test}"
737 echo "  Examples.................: ${enable_build_examples}"
738 echo "  Examples installed.......: ${enable_install_examples}"
739 echo "  Build elementary_config..: ${have_elementary_config}"
740 echo
741 echo "Compilation................: make (or gmake)"
742 echo "  CPPFLAGS.................: $CPPFLAGS"
743 echo "  CFLAGS...................: $CFLAGS"
744 echo "  LDFLAGS..................: $LDFLAGS"
745 echo
746 echo "Installation...............: make install (as root if needed, with 'su' or 'sudo')"
747 echo "  prefix...................: $prefix"
748 echo