Merge "[Copy&Paste] remove unused copy&paste files Change-Id: Ibca67535f552abfe1479da...
[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     edje >= 1.0.999
224    ]
225 )
226
227 PKG_CHECK_MODULES([ELEMENTARY_ECORE_CON],
228    [ecore-con >= 1.0.999],
229    [
230     ELEMENTARY_ECORE_CON_INC="#include <Ecore_Con.h>"
231     AC_DEFINE(HAVE_ELEMENTARY_ECORE_CON, 1, [Have Ecore_Con support])
232     have_ecore_con="yes"
233     requirement_elm="ecore-con >= 1.0.999 ${requirement_elm}"
234    ],
235    [have_ecore_con="no"])
236 AC_SUBST(ELEMENTARY_ECORE_CON_INC)
237
238 AM_CONDITIONAL([HAVE_ECORE_CON], [test "x${have_ecore_con}" = "xyes"])
239
240 PKG_CHECK_MODULES([EIO],
241         [eio],
242         [
243          have_eio="yes"
244          AC_DEFINE(HAVE_EIO, 1, [Use EIO for asynchronous file access])
245          requirement_elm="eio ${requirement_elm}"
246         ],
247         [have_eio="no"])
248
249 AM_CONDITIONAL([HAVE_EIO], [test "x${have_eio}" = "xyes"])
250
251 have_emotion="no"
252 want_elementary_emotion="yes"
253 AC_ARG_ENABLE([emotion],
254    [AC_HELP_STRING([--disable-emotion], [disable emotion support. @<:@default=enabled@:>@])],
255    [want_elementary_emotion=$enableval], [])
256
257 if test "x$want_elementary_emotion" != "xno"; then
258    PKG_CHECK_MODULES([EMOTION],
259         [emotion],
260         [
261          have_emotion="yes"
262          AC_DEFINE(HAVE_EMOTION, 1, [Use Emotion for asynchronous file access])
263          requirement_elm="emotion ${requirement_elm}"
264         ],
265         [have_emotion="no"])
266 fi
267
268 AM_CONDITIONAL([HAVE_EMOTION], [test "x${have_emotion}" = "xyes"])
269
270 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}"
271
272 have_elementary_x="no"
273 want_elementary_x="auto"
274 AC_ARG_ENABLE([ecore-x],
275    [AC_HELP_STRING([--disable-ecore-x], [disable ecore-x support. @<:@default=detect@:>@])],
276    [want_elementary_x=$enableval], [])
277
278 if test "x$want_elementary_x" != "xno"; then
279    PKG_CHECK_MODULES([ELEMENTARY_X],
280       [ecore-x >= 1.0.0],
281       [
282        AC_DEFINE(HAVE_ELEMENTARY_X, 1, [X11 support for Elementary])
283        have_elementary_x="yes"
284        requirement_elm="ecore-x >= 1.0.0 ${requirement_elm}"
285       ],
286       [have_elementary_x="no"]
287    )
288 else
289     have_elementary_x="no"
290 fi
291 if test "x$want_elementary_x" = "xyes" -a "x$have_elementary_x" = "xno"; then
292     AC_MSG_ERROR([ecore-x support requested, but not found by pkg-config.])
293 fi
294
295 have_conformant_autoscroll="no"
296 want_conformant_autoscroll="yes"
297 AC_ARG_ENABLE([ecore-x],
298    [AC_HELP_STRING([--disable-ecore-x], [disable ecore-x support. @<:@default=detect@:>@])],
299    [want_conformant_autoscroll=$enableval], [])
300
301 if test "x$want_conformant_autoscroll" != "xno"; then
302    PKG_CHECK_MODULES([ELEMENTARY_X],
303       [ecore-x >= 1.0.0],
304       [
305        AC_DEFINE(HAVE_CONFORMANT_AUTOSCROLL, 1, [autoscroll with conformant])
306        have_conformant_autoscroll="yes"
307        requirement_elm="ecore-x >= 1.0.0 ${requirement_elm}"
308       ],
309       [have_conformant_autoscroll="no"]
310    )
311 else
312     have_conformant_autoscroll="no"
313 fi
314 if test "x$want_conformant_autoscroll" = "xyes" -a "x$have_conformant_autoscroll" = "xno"; then
315     AC_MSG_ERROR([ecore-x support requested, but not found by pkg-config.])
316 fi
317
318 have_elementary_fb="no"
319 want_elementary_fb="auto"
320 AC_ARG_ENABLE([ecore-fb],
321    [AC_HELP_STRING([--disable-ecore-fb], [disable ecore-fb support. @<:@default=detect@:>@])],
322    [want_elementary_fb=$enableval], [])
323
324 if test "x$want_elementary_fb" != "xno"; then
325    PKG_CHECK_MODULES([ELEMENTARY_FB],
326       [ecore-fb >= 1.0.0],
327       [
328        AC_DEFINE(HAVE_ELEMENTARY_FB, 1, [FB support for Elementary])
329        have_elementary_fb="yes"
330        requirement_elm="ecore-fb >= 1.0.0 ${requirement_elm}"
331       ],
332       [have_elementary_fb="no"]
333    )
334 else
335     have_elementary_fb="no"
336 fi
337 if test "x$want_elementary_fb" = "xyes" -a "x$have_elementary_fb" = "xno"; then
338     AC_MSG_ERROR([ecore-fb support requested, but not found by pkg-config.])
339 fi
340
341 have_elementary_psl1ght="no"
342 want_elementary_psl1ght="auto"
343 AC_ARG_ENABLE([ecore-psl1ght],
344    [AC_HELP_STRING([--disable-ecore-psl1ght], [disable ecore-psl1ght support. @<:@default=detect@:>@])],
345    [want_elementary_psl1ght=$enableval], [])
346
347 if test "x$want_elementary_psl1ght" != "xno"; then
348    PKG_CHECK_MODULES([ELEMENTARY_PSL1GHT],
349       [ecore-psl1ght >= 1.0.0],
350       [
351        AC_DEFINE(HAVE_ELEMENTARY_PSL1GHT, 1, [PSL1GHT support for Elementary])
352        have_elementary_psl1ght="yes"
353        requirement_elm="ecore-psl1ght >= 1.0.0 ${requirement_elm}"
354       ],
355       [have_elementary_psl1ght="no"]
356    )
357 else
358     have_elementary_psl1ght="no"
359 fi
360 if test "x$want_elementary_psl1ght" = "xyes" -a "x$have_elementary_psl1ght" = "xno"; then
361     AC_MSG_ERROR([ecore-psl1ght support requested, but not found by pkg-config.])
362 fi
363
364 have_elementary_sdl="no"
365 want_elementary_sdl="auto"
366 AC_ARG_ENABLE([ecore-sdl],
367    [AC_HELP_STRING([--disable-ecore-sdl], [disable ecore-sdl support. @<:@default=detect@:>@])],
368    [want_elementary_sdl=$enableval], [])
369
370 if test "x$want_elementary_sdl" != "xno"; then
371    PKG_CHECK_MODULES([ELEMENTARY_SDL],
372       [ecore-sdl >= 1.0.0],
373       [
374        AC_DEFINE(HAVE_ELEMENTARY_SDL, 1, [SDL support for Elementary])
375        have_elementary_sdl="yes"
376        requirement_elm="ecore-sdl >= 1.0.0 ${requirement_elm}"
377       ],
378       [have_elementary_sdl="no"]
379    )
380 else
381     have_elementary_sdl="no"
382 fi
383 if test "x$want_elementary_sdl" = "xyes" -a "x$have_elementary_sdl" = "xno"; then
384     AC_MSG_ERROR([ecore-sdl support requested, but not found by pkg-config.])
385 fi
386
387 have_elementary_cocoa="no"
388 want_elementary_cocoa="auto"
389 AC_ARG_ENABLE([ecore-cocoa],
390    [AC_HELP_STRING([--disable-ecore-cocoa], [disable ecore-cocoa support. @<:@default=detect@:>@])],
391    [want_elementary_cocoa=$enableval], [])
392
393 if test "x$want_elementary_cocoa" != "xno"; then
394    PKG_CHECK_MODULES([ELEMENTARY_COCOA],
395       [ecore-cocoa >= 1.0.0],
396       [
397        AC_DEFINE(HAVE_ELEMENTARY_COCOA, 1, [COCOA support for Elementary])
398        have_elementary_cocoa="yes"
399        requirement_elm="ecore-cocoa >= 1.0.0 ${requirement_elm}"
400       ],
401       [have_elementary_cocoa="no"]
402    )
403 else
404     have_elementary_cocoa="no"
405 fi
406 if test "x$want_elementary_cocoa" = "xyes" -a "x$have_elementary_cocoa" = "xno"; then
407     AC_MSG_ERROR([ecore-cocoa support requested, but not found by pkg-config.])
408 fi
409
410 have_elementary_win32="no"
411 want_elementary_win32="auto"
412 AC_ARG_ENABLE([ecore-win32],
413    [AC_HELP_STRING([--disable-ecore-win32], [disable ecore-win32 support. @<:@default=detect@:>@])],
414    [want_elementary_win32=$enableval], [])
415
416 if test "x$want_elementary_win32" != "xno"; then
417    PKG_CHECK_MODULES([ELEMENTARY_WIN32],
418       [ecore-win32 >= 1.0.0],
419       [
420        AC_DEFINE(HAVE_ELEMENTARY_WIN32, 1, [Windows XP support for Elementary])
421        have_elementary_win32="yes"
422        requirement_elm="ecore-win32 >= 1.0.0 ${requirement_elm}"
423       ],
424       [have_elementary_win32="no"]
425    )
426 else
427     have_elementary_win32="no"
428 fi
429 if test "x$want_elementary_win32" = "xyes" -a "x$have_elementary_win32" = "xno"; then
430     AC_MSG_ERROR([ecore-win32 support requested, but not found by pkg-config.])
431 fi
432
433 have_elementary_wince="no"
434 want_elementary_wince="auto"
435 AC_ARG_ENABLE([ecore-wince],
436    [AC_HELP_STRING([--disable-ecore-wince], [disable ecore-wince support. @<:@default=detect@:>@])],
437    [want_elementary_wince=$enableval], [])
438
439 if test "x$want_elementary_wince" != "xno"; then
440    PKG_CHECK_MODULES([ELEMENTARY_WINCE],
441       [ecore-wince >= 1.0.0],
442       [
443        AC_DEFINE(HAVE_ELEMENTARY_WINCE, 1, [Windows CE support for Elementary])
444        have_elementary_wince="yes"
445        requirement_elm="ecore-wince >= 1.0.0 ${requirement_elm}"
446       ],
447       [have_elementary_wince="no"]
448    )
449 else
450     have_elementary_wince="no"
451 fi
452 if test "x$want_elementary_wince" = "xyes" -a "x$have_elementary_wince" = "xno"; then
453     AC_MSG_ERROR([ecore-wince support requested, but not found by pkg-config.])
454 fi
455
456 ELM_EDBUS_DEF="#undef"
457 have_elementary_edbus="no"
458 want_elementary_edbus="auto"
459 AC_ARG_ENABLE([edbus],
460    [AC_HELP_STRING([--disable-edbus], [disable edbus support. @<:@default=detect@:>@])],
461    [want_elementary_edbus=$enableval], [])
462
463 if test "x$want_elementary_edbus" != "xno"; then
464     PKG_CHECK_MODULES([ELEMENTARY_EDBUS],
465        [
466         edbus >= 1.0.0
467        ],
468        [
469         AC_DEFINE(HAVE_ELEMENTARY_EDBUS, 1, [EDBus support for Elementary])
470         have_elementary_edbus="yes"
471         ELM_EDBUS_DEF="#define"
472         requirement_elm="edbus >= 1.0.0 ${requirement_elm}"
473        ],
474        [have_elementary_edbus="no"]
475     )
476 else
477     have_elementary_edbus="no"
478 fi
479 if test "x$want_elementary_edbus" = "xyes" -a "x$have_elementary_edbus" = "xno"; then
480     AC_MSG_ERROR([E_DBus support requested, but no e_dbus found by pkg-config.])
481 fi
482 AC_SUBST(ELM_EDBUS_DEF)
483
484 ELM_EFREET_DEF="#undef"
485 have_elementary_efreet="no"
486 want_elementary_efreet="auto"
487 AC_ARG_ENABLE([efreet],
488    [AC_HELP_STRING([--disable-efreet], [disable efreet support. @<:@default=detect@:>@])],
489    [want_elementary_efreet=$enableval], [])
490
491 if test "x$want_elementary_efreet" != "xno"; then
492     PKG_CHECK_MODULES([ELEMENTARY_EFREET],
493        [
494         efreet >= 1.0.0
495         efreet-mime >= 1.0.0
496         efreet-trash >= 1.0.0
497        ],
498        [
499         AC_DEFINE(HAVE_ELEMENTARY_EFREET, 1, [Efreet support for Elementary])
500         have_elementary_efreet="yes"
501         ELM_EFREET_DEF="#define"
502         requirement_elm="efreet >= 1.0.0 efreet-mime >= 1.0.0 efreet-trash >= 1.0.0 ${requirement_elm}"
503        ],
504        [have_elementary_efreet="no"]
505     )
506 else
507     have_elementary_efreet="no"
508 fi
509 if test "x$want_elementary_efreet" = "xyes" -a "x$have_elementary_efreet" = "xno"; then
510     AC_MSG_ERROR([Efreet support requested, but no efreet/efreet-mime/efreet-trash found by pkg-config.])
511 fi
512 AC_SUBST(ELM_EFREET_DEF)
513
514 ELM_EWEATHER_DEF="#undef"
515 have_elementary_eweather="no"
516 want_elementary_eweather="auto"
517 AC_ARG_ENABLE([eweather],
518    [AC_HELP_STRING([--disable-eweather], [disable eweather support. @<:@default=detect@:>@])],
519    [want_elementary_eweather=$enableval], [])
520
521 if test "x$want_elementary_eweather" != "xno"; then
522     PKG_CHECK_MODULES([ELEMENTARY_EWEATHER],
523        [
524         eweather
525        ],
526        [
527         AC_DEFINE(HAVE_ELEMENTARY_EWEATHER, 1, [EWeather support for Elementary])
528         have_elementary_eweather="yes"
529         ELM_EWEATHER_DEF="#define"
530         requirement_elm="eweather ${requirement_elm}"
531        ],
532        [have_elementary_eweather="no"]
533     )
534 else
535     have_elementary_eweather="no"
536 fi
537 if test "x$want_elementary_eweather" = "xyes" -a "x$have_elementary_eweather" = "xno"; then
538     AC_MSG_ERROR([Eweather support requested, but no eweather found by pkg-config.])
539 fi
540 AC_SUBST(ELM_EWEATHER_DEF)
541
542 ELM_EMAP_DEF="#undef"
543 have_elementary_emap="no"
544 want_elementary_emap="auto"
545 AC_ARG_ENABLE([emap],
546    [AC_HELP_STRING([--disable-emap], [disable emap support. @<:@default=detect@:>@])],
547    [want_elementary_emap=$enableval], [])
548
549 if test "x$want_elementary_emap" != "xno"; then
550     PKG_CHECK_MODULES([ELEMENTARY_EMAP],
551        [
552         emap
553        ],
554        [
555         AC_DEFINE(HAVE_ELEMENTARY_EMAP, 1, [EMap support for Elementary])
556         have_elementary_emap="yes"
557         ELM_EMAP_DEF="#define"
558         requirement_elm="emap ${requirement_elm}"
559        ],
560        [have_elementary_emap="no"]
561     )
562 else
563     have_elementary_emap="no"
564 fi
565 if test "x$want_elementary_emap" = "xyes" -a "x$have_elementary_emap" = "xno"; then
566     AC_MSG_ERROR([Emap support requested, but no emap found by pkg-config.])
567 fi
568 AC_SUBST(ELM_EMAP_DEF)
569
570
571
572 ELM_ETHUMB_DEF="#undef"
573 have_elementary_ethumb="no"
574 want_elementary_ethumb="auto"
575 AC_ARG_ENABLE([ethumb],
576    [AC_HELP_STRING([--disable-ethumb], [disable ethumb support. @<:@default=detect@:>@])],
577    [want_elementary_ethumb=$enableval], [])
578
579 if test "x$want_elementary_ethumb" != "xno"; then
580     PKG_CHECK_MODULES([ELEMENTARY_ETHUMB],
581        [
582         ethumb_client
583        ],
584        [
585         AC_DEFINE(HAVE_ELEMENTARY_ETHUMB, 1, [Ethumb support for Elementary])
586         have_elementary_ethumb="yes"
587         ELM_ETHUMB_DEF="#define"
588         requirement_elm="ethumb_client ${requirement_elm}"
589        ],
590        [have_elementary_ethumb="no"]
591     )
592 else
593     have_elementary_ethumb="no"
594 fi
595 if test "x$want_elementary_ethumb" = "xyes" -a "x$have_elementary_ethumb" = "xno"; then
596     AC_MSG_ERROR([Ethumb support requested, but no ethumb found by pkg-config.])
597 fi
598 AC_SUBST(ELM_ETHUMB_DEF)
599
600 ELM_WEB_DEF="#undef"
601 have_elementary_web="no"
602 want_elementary_web="auto"
603 AC_ARG_ENABLE([web],
604    [AC_HELP_STRING([--disable-web], [disable web (WebKit) support. @<:@default=detect@:>@])],
605    [want_elementary_web=$enableval], [])
606
607 if test "x$want_elementary_web" != "xno"; then
608     PKG_CHECK_MODULES([ELEMENTARY_WEB],
609        [
610         ewebkit
611        ],
612        [
613         AC_DEFINE(HAVE_ELEMENTARY_WEB, 1, [Web support for Elementary])
614         webkit_datadir=$($PKG_CONFIG ewebkit --variable=datadir)
615         AC_DEFINE_UNQUOTED(WEBKIT_DATADIR,
616                            "$webkit_datadir",
617                            "WebKit's data dir")
618         have_elementary_web="yes"
619         ELM_WEB_DEF="#define"
620 ## web_client? how about ewebkit? at least in current upstreak webkit
621 ## there is no web_client.pc        
622 #        requirement_elm="web_client ${requirement_elm}"
623         requirement_elm="ewebkit ${requirement_elm}"
624        ],
625        [have_elementary_web="no"]
626     )
627 else
628     have_elementary_web="no"
629 fi
630 if test "x$want_elementary_web" = "xyes" -a "x$have_elementary_web" = "xno"; then
631     AC_MSG_ERROR([Web support requested, but no ewebkit found by pkg-config.])
632 fi
633 AC_SUBST(ELM_WEB_DEF)
634
635 ELM_DEBUG_DEF="#undef"
636 want_elementary_debug="no"
637 AC_ARG_ENABLE([debug],
638    [AC_HELP_STRING([--enable-debug], [enable elementary debug support. @<:@default=disabled@:>@])],
639    [want_elementary_debug=$enableval], [])
640
641 if test "x$want_elementary_debug" = "xyes"; then
642         AC_DEFINE(HAVE_ELEMENTARY_DEBUG, 1, [Elementary debug.])
643         ELM_DEBUG_DEF="#define"
644 fi
645 AC_SUBST(ELM_DEBUG_DEF)
646
647 ELM_ALLOCA_H_DEF="#undef"
648 AC_CHECK_HEADER(alloca.h, [ELM_ALLOCA_H_DEF="#define"])
649 AC_SUBST(ELM_ALLOCA_H_DEF)
650
651 ELM_LIBINTL_H_DEF="#undef"
652 AC_CHECK_HEADER(libintl.h, [ELM_LIBINTL_H_DEF="#define"])
653 AC_SUBST(ELM_LIBINTL_H_DEF)
654
655 my_libs="-lm"
656 AC_SUBST(my_libs)
657 AC_SUBST(requirement_elm)
658
659 EFL_WITH_BIN([eet], [eet-eet], [eet])
660 EFL_WITH_BIN([edje], [edje-cc], [edje_cc])
661
662 EFL_CHECK_DOXYGEN([build_doc="yes"], [build_doc="no"])
663
664 EFL_ENABLE_BIN([elementary-test])
665 EFL_ENABLE_BIN([elementary-config])
666
667 m4_ifdef([AM_GNU_GETTEXT_VERSION], [
668 AM_GNU_GETTEXT_VERSION([0.17])
669 ])
670
671 m4_ifdef([AM_GNU_GETTEXT], [
672 AM_GNU_GETTEXT([external])
673 po_makefile_in=po/Makefile.in
674 have_po="yes"
675 ],[
676 have_po="no"
677 ])
678 AC_SUBST(LTLIBINTL)
679
680 if test "x${POSUB}" = "x" ; then
681    have_po="no"
682 fi
683
684 AM_CONDITIONAL([HAVE_PO], [test "x${have_po}" = "xyes"])
685
686 EFL_CHECK_PATH_MAX
687
688
689 ### Build and install examples
690 EFL_CHECK_BUILD_EXAMPLES([enable_build_examples="yes"], [enable_build_examples="no"])
691 EFL_CHECK_INSTALL_EXAMPLES([enable_install_examples="yes"], [enable_install_examples="no"])
692
693
694 AC_OUTPUT([
695 Makefile
696 elementary.spec
697 elementary.pc
698 doc/Makefile
699 doc/Doxyfile
700 doc/widgets/Makefile
701 src/Makefile
702 src/lib/Makefile
703 src/lib/Elementary.h
704 src/bin/Makefile
705 src/modules/Makefile
706 src/modules/access_output/Makefile
707 src/modules/test_entry/Makefile
708 src/modules/test_map/Makefile
709 src/modules/ctxpopup_copypasteUI/Makefile
710 src/edje_externals/Makefile
711 src/examples/Makefile
712 data/Makefile
713 data/themes/Makefile
714 data/images/Makefile
715 data/objects/Makefile
716 data/desktop/Makefile
717 data/edje_externals/Makefile
718 config/Makefile
719 config/default/Makefile
720 config/standard/Makefile
721 config/illume/Makefile
722 config/slp/Makefile
723 $po_makefile_in
724 ])
725
726 #####################################################################
727 ## Info
728
729 echo
730 echo
731 echo
732 echo "------------------------------------------------------------------------"
733 echo "$PACKAGE $VERSION"
734 echo "------------------------------------------------------------------------"
735 echo
736 echo "Configuration Options Summary:"
737 echo
738 echo "  Engines:"
739 echo "    X11....................: ${have_elementary_x}"
740 echo "    Framebuffer............: ${have_elementary_fb}"
741 echo "    PSL1GHT................: ${have_elementary_psl1ght}"
742 echo "    SDL....................: ${have_elementary_sdl}"
743 echo "    Cocoa..................: ${have_elementary_cocoa}"
744 echo "    Windows XP.............: ${have_elementary_win32}"
745 echo "    Windows CE.............: ${have_elementary_wince}"
746 echo
747 echo "  Features:"
748 echo "    Ecore_Con..............: ${have_ecore_con}"
749 echo "    EDBus..................: ${have_elementary_edbus}"
750 echo "    EFreet.................: ${have_elementary_efreet}"
751 echo "    EWeather...............: ${have_elementary_eweather}"
752 echo "    EMap...................: ${have_elementary_emap}"
753 echo "    Ethumb.................: ${have_elementary_ethumb}"
754 echo "    Web (WebKit)...........: ${have_elementary_web}"
755 echo "    Quick Launch...........: ${have_fork}"
756 echo "    EIO....................: ${have_eio}"
757 echo "    Emotion................: ${have_emotion}"
758 echo
759 echo "  eet......................: ${eet_eet}"
760 echo "  edje_cc..................: ${edje_cc}"
761 echo
762 echo "  Build elementary_test....: ${have_elementary_test}"
763 echo "  Examples.................: ${enable_build_examples}"
764 echo "  Examples installed.......: ${enable_install_examples}"
765 echo "  Build elementary_config..: ${have_elementary_config}"
766 echo
767 echo "Compilation................: make (or gmake)"
768 echo "  CPPFLAGS.................: $CPPFLAGS"
769 echo "  CFLAGS...................: $CFLAGS"
770 echo "  LDFLAGS..................: $LDFLAGS"
771 echo
772 echo "Installation...............: make install (as root if needed, with 'su' or 'sudo')"
773 echo "  prefix...................: $prefix"
774 echo