Gesture Layer: cancel timer on delete.
[framework/uifw/elementary.git] / configure.ac
1 ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
2 ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
3 m4_define([v_maj], [1])
4 m4_define([v_min], [7])
5 m4_define([v_mic], [99])
6 m4_define([v_rev], m4_esyscmd([(svnversion "${SVN_REPO_PATH:-.}" | grep -v '\(export\|Unversioned directory\)' || 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 dnl m4_define([relname], [ver-pre-svn-09])
12 dnl m4_define([v_rel], [-release relname])
13 ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
14 m4_ifdef([v_rev], [m4_define([v_ver], [v_maj.v_min.v_mic.v_rev])],
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 AC_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 AM_CONDITIONAL([BUILD_RUN], [test "x$have_socket" = "xyes"])
184 AM_CONDITIONAL([BUILD_MODULES], [test "x$have_dlopen" = "xyes"])
185
186 m4_ifdef([v_mic],
187    [
188     EFL_COMPILER_FLAG([-Wshadow])
189     EFL_COMPILER_FLAG([-Wall])
190     EFL_COMPILER_FLAG([-W])
191    ])
192
193 have_fork="no"
194 want_quicklaunch="auto"
195 AC_ARG_ENABLE([quick-launch],
196         [AC_HELP_STRING([--disable-quick-launch], [disable quick-launch support, @<:@default=detect@:>@])],
197         [want_quicklaunch=$enableval], [])
198
199 if test "x$want_quicklaunch" != "xno"; then
200    AC_CHECK_FUNCS(fork, [
201         have_fork="yes"
202         AC_DEFINE(HAVE_FORK)
203    ])
204    AC_CHECK_FUNCS([clearenv])
205 fi
206 AM_CONDITIONAL([BUILD_QUICKLAUNCH], [test "x$have_fork" = "xyes" && test "x$have_dlopen" = "xyes"])
207
208 AC_SUBST(dlopen_libs)
209 AC_SUBST(lt_enable_auto_import)
210 AC_SUBST(ELM_UNIX_DEF)
211 AC_SUBST(ELM_WIN32_DEF)
212 AC_SUBST(ELM_WINCE_DEF)
213
214 AM_CONDITIONAL([ELEMENTARY_WINDOWS_BUILD], [test "x${have_windows}" = "xyes"])
215
216 PKG_CHECK_MODULES([ELEMENTARY],
217    [
218     eina >= 1.6.99
219     eet >= 1.6.99
220     evas >= 1.6.99
221     ecore >= 1.7.99
222     ecore-evas >= 1.7.99
223     ecore-file >= 1.7.99
224     ecore-input >= 1.7.99
225     edje >= 1.6.99
226    ]
227 )
228
229 requirement_elm="edje >= 1.6.99 ecore-file >= 1.6.99 ecore-evas >= 1.6.99 ecore >= 1.6.99 evas >= 1.6.99 eet >= 1.6.99 eina >= 1.6.99 ${requirement_elm}"
230
231 PKG_CHECK_MODULES([ELEMENTARY_ECORE_IMF],
232    [ecore-imf >= 1.6.99],
233    [
234     ELEMENTARY_ECORE_IMF_INC="#include <Ecore_IMF.h>"
235     AC_DEFINE(HAVE_ELEMENTARY_ECORE_IMF, 1, [Have Ecore_IMF support])
236     have_ecore_imf="yes"
237     requirement_elm="ecore-imf >= 1.6.99 ${requirement_elm}"
238    ],
239    [have_ecore_imf="no"])
240 AC_SUBST(ELEMENTARY_ECORE_IMF_INC)
241
242 AM_CONDITIONAL([HAVE_ECORE_IMF], [test "x${have_ecore_imf}" = "xyes"])
243
244 PKG_CHECK_MODULES([ELEMENTARY_ECORE_CON],
245    [ecore-con >= 1.6.99],
246    [
247     ELEMENTARY_ECORE_CON_INC="#include <Ecore_Con.h>"
248     AC_DEFINE(HAVE_ELEMENTARY_ECORE_CON, 1, [Have Ecore_Con support])
249     have_ecore_con="yes"
250     requirement_elm="ecore-con >= 1.6.99 ${requirement_elm}"
251    ],
252    [have_ecore_con="no"])
253 AC_SUBST(ELEMENTARY_ECORE_CON_INC)
254
255 AM_CONDITIONAL([HAVE_ECORE_CON], [test "x${have_ecore_con}" = "xyes"])
256
257 PKG_CHECK_MODULES([EIO],
258         [eio],
259         [
260          have_eio="yes"
261          AC_DEFINE(HAVE_EIO, 1, [Use EIO for asynchronous file access])
262          requirement_elm="eio ${requirement_elm}"
263         ],
264         [have_eio="no"])
265
266 AM_CONDITIONAL([HAVE_EIO], [test "x${have_eio}" = "xyes"])
267
268 have_emotion="no"
269 want_elementary_emotion="yes"
270 AC_ARG_ENABLE([emotion],
271    [AC_HELP_STRING([--disable-emotion], [disable emotion support. @<:@default=enabled@:>@])],
272    [want_elementary_emotion=$enableval], [])
273
274 if test "x$want_elementary_emotion" != "xno"; then
275    PKG_CHECK_MODULES([EMOTION],
276         [emotion],
277         [
278          have_emotion="yes"
279          AC_DEFINE(HAVE_EMOTION, 1, [Use Emotion for asynchronous file access])
280          requirement_elm="emotion ${requirement_elm}"
281         ],
282         [have_emotion="no"])
283 fi
284
285 AM_CONDITIONAL([HAVE_EMOTION], [test "x${have_emotion}" = "xyes"])
286
287 have_elementary_x="no"
288 want_elementary_x="auto"
289 AC_ARG_ENABLE([ecore-x],
290    [AC_HELP_STRING([--disable-ecore-x], [disable ecore-x support. @<:@default=detect@:>@])],
291    [want_elementary_x=$enableval], [])
292
293 if test "x$want_elementary_x" != "xno"; then
294    PKG_CHECK_MODULES([ELEMENTARY_X],
295       [ecore-x >= 1.7.99],
296       [
297        AC_DEFINE(HAVE_ELEMENTARY_X, 1, [X11 support for Elementary])
298        have_elementary_x="yes"
299        requirement_elm="ecore-x >= 1.7.99 ${requirement_elm}"
300       ],
301       [have_elementary_x="no"]
302    )
303 else
304     have_elementary_x="no"
305 fi
306 if test "x$want_elementary_x" = "xyes" -a "x$have_elementary_x" = "xno"; then
307     AC_MSG_ERROR([ecore-x support requested, but not found by pkg-config.])
308 fi
309
310 have_elementary_fb="no"
311 want_elementary_fb="auto"
312 AC_ARG_ENABLE([ecore-fb],
313    [AC_HELP_STRING([--disable-ecore-fb], [disable ecore-fb support. @<:@default=detect@:>@])],
314    [want_elementary_fb=$enableval], [])
315
316 if test "x$want_elementary_fb" != "xno"; then
317    PKG_CHECK_MODULES([ELEMENTARY_FB],
318       [ecore-fb >= 1.6.99],
319       [
320        AC_DEFINE(HAVE_ELEMENTARY_FB, 1, [FB support for Elementary])
321        have_elementary_fb="yes"
322        requirement_elm="ecore-fb >= 1.6.99 ${requirement_elm}"
323       ],
324       [have_elementary_fb="no"]
325    )
326 else
327     have_elementary_fb="no"
328 fi
329 if test "x$want_elementary_fb" = "xyes" -a "x$have_elementary_fb" = "xno"; then
330     AC_MSG_ERROR([ecore-fb support requested, but not found by pkg-config.])
331 fi
332
333 have_elementary_psl1ght="no"
334 want_elementary_psl1ght="auto"
335 AC_ARG_ENABLE([ecore-psl1ght],
336    [AC_HELP_STRING([--disable-ecore-psl1ght], [disable ecore-psl1ght support. @<:@default=detect@:>@])],
337    [want_elementary_psl1ght=$enableval], [])
338
339 if test "x$want_elementary_psl1ght" != "xno"; then
340    PKG_CHECK_MODULES([ELEMENTARY_PSL1GHT],
341       [ecore-psl1ght >= 1.6.99],
342       [
343        AC_DEFINE(HAVE_ELEMENTARY_PSL1GHT, 1, [PSL1GHT support for Elementary])
344        have_elementary_psl1ght="yes"
345        requirement_elm="ecore-psl1ght >= 1.6.99 ${requirement_elm}"
346       ],
347       [have_elementary_psl1ght="no"]
348    )
349 else
350     have_elementary_psl1ght="no"
351 fi
352 if test "x$want_elementary_psl1ght" = "xyes" -a "x$have_elementary_psl1ght" = "xno"; then
353     AC_MSG_ERROR([ecore-psl1ght support requested, but not found by pkg-config.])
354 fi
355
356 have_elementary_sdl="no"
357 want_elementary_sdl="auto"
358 AC_ARG_ENABLE([ecore-sdl],
359    [AC_HELP_STRING([--disable-ecore-sdl], [disable ecore-sdl support. @<:@default=detect@:>@])],
360    [want_elementary_sdl=$enableval], [])
361
362 if test "x$want_elementary_sdl" != "xno"; then
363    PKG_CHECK_MODULES([ELEMENTARY_SDL],
364       [ecore-sdl >= 1.6.99],
365       [
366        AC_DEFINE(HAVE_ELEMENTARY_SDL, 1, [SDL support for Elementary])
367        have_elementary_sdl="yes"
368        requirement_elm="ecore-sdl >= 1.6.99 ${requirement_elm}"
369       ],
370       [have_elementary_sdl="no"]
371    )
372 else
373     have_elementary_sdl="no"
374 fi
375 if test "x$want_elementary_sdl" = "xyes" -a "x$have_elementary_sdl" = "xno"; then
376     AC_MSG_ERROR([ecore-sdl support requested, but not found by pkg-config.])
377 fi
378
379 have_elementary_cocoa="no"
380 want_elementary_cocoa="auto"
381 AC_ARG_ENABLE([ecore-cocoa],
382    [AC_HELP_STRING([--disable-ecore-cocoa], [disable ecore-cocoa support. @<:@default=detect@:>@])],
383    [want_elementary_cocoa=$enableval], [])
384
385 if test "x$want_elementary_cocoa" != "xno"; then
386    PKG_CHECK_MODULES([ELEMENTARY_COCOA],
387       [ecore-cocoa >= 1.6.99],
388       [
389        AC_DEFINE(HAVE_ELEMENTARY_COCOA, 1, [COCOA support for Elementary])
390        have_elementary_cocoa="yes"
391        requirement_elm="ecore-cocoa >= 1.6.99 ${requirement_elm}"
392       ],
393       [have_elementary_cocoa="no"]
394    )
395 else
396     have_elementary_cocoa="no"
397 fi
398 if test "x$want_elementary_cocoa" = "xyes" -a "x$have_elementary_cocoa" = "xno"; then
399     AC_MSG_ERROR([ecore-cocoa support requested, but not found by pkg-config.])
400 fi
401
402 have_elementary_win32="no"
403 want_elementary_win32="auto"
404 AC_ARG_ENABLE([ecore-win32],
405    [AC_HELP_STRING([--disable-ecore-win32], [disable ecore-win32 support. @<:@default=detect@:>@])],
406    [want_elementary_win32=$enableval], [])
407
408 if test "x$want_elementary_win32" != "xno"; then
409    PKG_CHECK_MODULES([ELEMENTARY_WIN32],
410       [ecore-win32 >= 1.6.99],
411       [
412        AC_DEFINE(HAVE_ELEMENTARY_WIN32, 1, [Windows XP support for Elementary])
413        have_elementary_win32="yes"
414        requirement_elm="ecore-win32 >= 1.6.99 ${requirement_elm}"
415       ],
416       [have_elementary_win32="no"]
417    )
418 else
419     have_elementary_win32="no"
420 fi
421 if test "x$want_elementary_win32" = "xyes" -a "x$have_elementary_win32" = "xno"; then
422     AC_MSG_ERROR([ecore-win32 support requested, but not found by pkg-config.])
423 fi
424
425 have_elementary_wince="no"
426 want_elementary_wince="auto"
427 AC_ARG_ENABLE([ecore-wince],
428    [AC_HELP_STRING([--disable-ecore-wince], [disable ecore-wince support. @<:@default=detect@:>@])],
429    [want_elementary_wince=$enableval], [])
430
431 if test "x$want_elementary_wince" != "xno"; then
432    PKG_CHECK_MODULES([ELEMENTARY_WINCE],
433       [ecore-wince >= 1.6.99],
434       [
435        AC_DEFINE(HAVE_ELEMENTARY_WINCE, 1, [Windows CE support for Elementary])
436        have_elementary_wince="yes"
437        requirement_elm="ecore-wince >= 1.6.99 ${requirement_elm}"
438       ],
439       [have_elementary_wince="no"]
440    )
441 else
442     have_elementary_wince="no"
443 fi
444 if test "x$want_elementary_wince" = "xyes" -a "x$have_elementary_wince" = "xno"; then
445     AC_MSG_ERROR([ecore-wince support requested, but not found by pkg-config.])
446 fi
447
448 have_elementary_wayland="no"
449 want_elementary_wayland="auto"
450 AC_ARG_ENABLE([ecore-wayland],
451    [AC_HELP_STRING([--disable-ecore-wayland], [disable ecore-wayland support. @<:@default=detect@:>@])],
452    [want_elementary_wayland=$enableval], [])
453
454 if test "x$want_elementary_wayland" != "xno"; then
455    PKG_CHECK_MODULES([ELEMENTARY_WAYLAND],
456       [ecore-wayland],
457       [
458        AC_DEFINE(HAVE_ELEMENTARY_WAYLAND, 1, [Wayland support for Elementary])
459        have_elementary_wayland="yes"
460        requirement_elm="ecore-wayland ${requirement_elm}"
461       ],
462       [have_elementary_wayland="no"]
463    )
464 else
465     have_elementary_wayland="no"
466 fi
467 if test "x$want_elementary_wayland" = "xyes" -a "x$have_elementary_wayland" = "xno"; then
468     AC_MSG_ERROR([ecore-wayland support requested, but not found by pkg-config.])
469 fi
470
471 ELM_EDBUS_DEF="#undef"
472 have_elementary_edbus="no"
473 want_elementary_edbus="auto"
474 AC_ARG_ENABLE([edbus],
475    [AC_HELP_STRING([--disable-edbus], [disable edbus support. @<:@default=detect@:>@])],
476    [want_elementary_edbus=$enableval], [])
477
478 if test "x$want_elementary_edbus" != "xno"; then
479     PKG_CHECK_MODULES([ELEMENTARY_EDBUS],
480        [
481         edbus >= 1.6.99
482        ],
483        [
484         AC_DEFINE(HAVE_ELEMENTARY_EDBUS, 1, [EDBus support for Elementary])
485         have_elementary_edbus="yes"
486         ELM_EDBUS_DEF="#define"
487         requirement_elm="edbus >= 1.6.99 ${requirement_elm}"
488        ],
489        [have_elementary_edbus="no"]
490     )
491 else
492     have_elementary_edbus="no"
493 fi
494 if test "x$want_elementary_edbus" = "xyes" -a "x$have_elementary_edbus" = "xno"; then
495     AC_MSG_ERROR([E_DBus support requested, but no e_dbus found by pkg-config.])
496 fi
497 AC_SUBST(ELM_EDBUS_DEF)
498
499 ELM_EFREET_DEF="#undef"
500 have_elementary_efreet="no"
501 want_elementary_efreet="auto"
502 AC_ARG_ENABLE([efreet],
503    [AC_HELP_STRING([--disable-efreet], [disable efreet support. @<:@default=detect@:>@])],
504    [want_elementary_efreet=$enableval], [])
505
506 if test "x$want_elementary_efreet" != "xno"; then
507     PKG_CHECK_MODULES([ELEMENTARY_EFREET],
508        [
509         efreet >= 1.6.99
510         efreet-mime >= 1.6.99
511         efreet-trash >= 1.6.99
512        ],
513        [
514         AC_DEFINE(HAVE_ELEMENTARY_EFREET, 1, [Efreet support for Elementary])
515         have_elementary_efreet="yes"
516         ELM_EFREET_DEF="#define"
517         requirement_elm="efreet >= 1.6.99 efreet-mime >= 1.6.99 efreet-trash >= 1.6.99 ${requirement_elm}"
518        ],
519        [have_elementary_efreet="no"]
520     )
521 else
522     have_elementary_efreet="no"
523 fi
524 if test "x$want_elementary_efreet" = "xyes" -a "x$have_elementary_efreet" = "xno"; then
525     AC_MSG_ERROR([Efreet support requested, but no efreet/efreet-mime/efreet-trash found by pkg-config.])
526 fi
527 AC_SUBST(ELM_EFREET_DEF)
528
529 ELM_EWEATHER_DEF="#undef"
530 have_elementary_eweather="no"
531 want_elementary_eweather="auto"
532 AC_ARG_ENABLE([eweather],
533    [AC_HELP_STRING([--disable-eweather], [disable eweather support. @<:@default=detect@:>@])],
534    [want_elementary_eweather=$enableval], [])
535
536 if test "x$want_elementary_eweather" != "xno"; then
537     PKG_CHECK_MODULES([ELEMENTARY_EWEATHER],
538        [
539         eweather
540        ],
541        [
542         AC_DEFINE(HAVE_ELEMENTARY_EWEATHER, 1, [EWeather support for Elementary])
543         have_elementary_eweather="yes"
544         ELM_EWEATHER_DEF="#define"
545         requirement_elm="eweather ${requirement_elm}"
546        ],
547        [have_elementary_eweather="no"]
548     )
549 else
550     have_elementary_eweather="no"
551 fi
552 if test "x$want_elementary_eweather" = "xyes" -a "x$have_elementary_eweather" = "xno"; then
553     AC_MSG_ERROR([Eweather support requested, but no eweather found by pkg-config.])
554 fi
555 AC_SUBST(ELM_EWEATHER_DEF)
556
557 ELM_EMAP_DEF="#undef"
558 have_elementary_emap="no"
559 want_elementary_emap="auto"
560 AC_ARG_ENABLE([emap],
561    [AC_HELP_STRING([--disable-emap], [disable emap support. @<:@default=detect@:>@])],
562    [want_elementary_emap=$enableval], [])
563
564 if test "x$want_elementary_emap" != "xno"; then
565     PKG_CHECK_MODULES([ELEMENTARY_EMAP],
566        [
567         emap
568        ],
569        [
570         AC_DEFINE(HAVE_ELEMENTARY_EMAP, 1, [EMap support for Elementary])
571         have_elementary_emap="yes"
572         ELM_EMAP_DEF="#define"
573         requirement_elm="emap ${requirement_elm}"
574        ],
575        [have_elementary_emap="no"]
576     )
577 else
578     have_elementary_emap="no"
579 fi
580 if test "x$want_elementary_emap" = "xyes" -a "x$have_elementary_emap" = "xno"; then
581     AC_MSG_ERROR([Emap support requested, but no emap found by pkg-config.])
582 fi
583 AC_SUBST(ELM_EMAP_DEF)
584
585
586
587 ELM_ETHUMB_DEF="#undef"
588 have_elementary_ethumb="no"
589 want_elementary_ethumb="auto"
590 AC_ARG_ENABLE([ethumb],
591    [AC_HELP_STRING([--disable-ethumb], [disable ethumb support. @<:@default=detect@:>@])],
592    [want_elementary_ethumb=$enableval], [])
593
594 if test "x$want_elementary_ethumb" != "xno"; then
595     PKG_CHECK_MODULES([ELEMENTARY_ETHUMB],
596        [
597         ethumb_client
598        ],
599        [
600         AC_DEFINE(HAVE_ELEMENTARY_ETHUMB, 1, [Ethumb support for Elementary])
601         have_elementary_ethumb="yes"
602         ELM_ETHUMB_DEF="#define"
603         requirement_elm="ethumb_client ${requirement_elm}"
604        ],
605        [have_elementary_ethumb="no"]
606     )
607 else
608     have_elementary_ethumb="no"
609 fi
610 if test "x$want_elementary_ethumb" = "xyes" -a "x$have_elementary_ethumb" = "xno"; then
611     AC_MSG_ERROR([Ethumb support requested, but no ethumb found by pkg-config.])
612 fi
613 AC_SUBST(ELM_ETHUMB_DEF)
614
615 ELM_WEB_DEF="#undef"
616
617 elementary_web_backend="detect"
618 elementary_web="none"
619 want_elementary_web=""
620 AC_ARG_WITH([elementary-web-backend],
621    [AC_HELP_STRING([--with-elementary-web-backend=@<:@ewebkit/ewebkit2/detect/none@:>@], [Select the WebKit backend for Elementary to support web @<:@default=detect@:>@])],
622    [
623     elementary_web_backend=${withval}
624    ],
625    [elementary_web_backend="detect"])
626
627 case "$elementary_web_backend" in
628     ewebkit|ewebkit2|detect|none) ;;
629     *) AC_MSG_ERROR([Invalid web backend: must be ewebkit, ewebkit2, detect or none]) ;;
630 esac
631
632 if test "x$elementary_web_backend" = "xdetect"; then
633     # FIXME : detect option should check both ewebkit and ewebkit2.
634     want_elementary_web="ewebkit"
635 else
636     want_elementary_web=$elementary_web_backend
637 fi
638
639 if test "x$want_elementary_web" != "xnone"; then
640     PKG_CHECK_MODULES([ELEMENTARY_WEB],
641        [$want_elementary_web],
642        [
643         AC_DEFINE(HAVE_ELEMENTARY_WEB, 1, [Web support for Elementary])
644         webkit_datadir=$($PKG_CONFIG $want_elementary_web --variable=datadir)
645         AC_DEFINE_UNQUOTED(WEBKIT_DATADIR,
646                            "$webkit_datadir",
647                            "WebKit's data dir")
648         if test "x$elementary_web_backend" = "xewebkit2"; then
649             AC_DEFINE(USE_WEBKIT2, 1, [Use ewebkit2 as Elementary web backend])
650         fi
651
652         elementary_web=$want_elementary_web
653         ELM_WEB_DEF="#define"
654         requirement_elm="${want_elementary_web} ${requirement_elm}"
655        ],
656        [elementary_web="none"]
657     )
658 else
659     elementary_web="none"
660 fi
661
662 if test "x$elementary_web_backend" = "xewebkit" -o "x$elementary_web_backend" = "xewebkit2"; then
663     if test "x$elementary_web" = "xnone"; then
664         AC_MSG_ERROR([Web support requested, but no $elementary_web_backend found by pkg-config.])
665     fi
666 fi
667 AC_SUBST(ELM_WEB_DEF)
668
669 ELM_DEBUG_DEF="#undef"
670 want_elementary_debug="no"
671 AC_ARG_ENABLE([debug],
672    [AC_HELP_STRING([--enable-debug], [enable elementary debug support. @<:@default=disabled@:>@])],
673    [want_elementary_debug=$enableval], [])
674
675 if test "x$want_elementary_debug" = "xyes"; then
676         AC_DEFINE(HAVE_ELEMENTARY_DEBUG, 1, [Elementary debug.])
677         ELM_DEBUG_DEF="#define"
678 fi
679 AC_SUBST(ELM_DEBUG_DEF)
680
681 ELM_ALLOCA_H_DEF="#undef"
682 AC_CHECK_HEADER(alloca.h, [ELM_ALLOCA_H_DEF="#define"])
683 AC_SUBST(ELM_ALLOCA_H_DEF)
684
685 ELM_LIBINTL_H_DEF="#undef"
686 AC_CHECK_HEADER(libintl.h, [ELM_LIBINTL_H_DEF="#define"])
687 AC_SUBST(ELM_LIBINTL_H_DEF)
688
689 ELM_DIRENT_H_DEF="#undef"
690 AC_CHECK_HEADER(dirent.h, [ELM_DIRENT_H_DEF="#define"])
691 AC_SUBST(ELM_DIRENT_H_DEF)
692
693 AC_CHECK_HEADER(sys/mman.h, [have_mman="yes"], [have_mman="no"])
694 if test "x${have_mman}" = "xyes"; then
695    AC_DEFINE(HAVE_MMAN_H, 1, [Have sys/mman.h header file])
696 fi
697
698 AC_CHECK_HEADERS([locale.h langinfo.h sys/times.h])
699
700 my_libs="-lm"
701 AC_SUBST(my_libs)
702 AC_SUBST(requirement_elm)
703
704 EFL_WITH_BIN([eet], [eet-eet], [eet])
705 EFL_WITH_BIN([edje], [edje-cc], [edje_cc])
706 EFL_WITH_BIN([elementary], [elementary-codegen], [elementary_codegen])
707
708 EFL_CHECK_DOXYGEN([build_doc="yes"], [build_doc="no"])
709
710 EFL_ENABLE_BIN([elementary-test])
711 EFL_ENABLE_BIN([elementary-codegen])
712 EFL_ENABLE_BIN([elementary-config])
713
714 m4_ifdef([AM_GNU_GETTEXT_VERSION], [
715 AM_GNU_GETTEXT_VERSION([0.17])
716 ])
717
718 m4_ifdef([AM_GNU_GETTEXT], [
719 AM_GNU_GETTEXT([external])
720 po_makefile_in=po/Makefile.in
721 have_po="yes"
722 ],[
723 have_po="no"
724 ])
725 AC_SUBST(LTLIBINTL)
726
727 if test "x${POSUB}" = "x" ; then
728    have_po="no"
729 fi
730
731 AM_CONDITIONAL([HAVE_PO], [test "x${have_po}" = "xyes"])
732
733 EFL_CHECK_PATH_MAX
734
735 elementary_base_dir=".elementary"
736 AC_ARG_WITH([elementary-base-dir],
737    [AC_HELP_STRING([--with-elementary-base-dir=PATH], [specify the subdirectory for all elementary data @<:@default=${elementary_base_dir}@:>@])],
738    [elementary_base_dir=${withval}],
739    [elementary_base_dir=".elementary"])
740
741 AC_MSG_NOTICE([ELEMENTARY_BASE_DIR set to ${elementary_base_dir}])
742 AC_DEFINE_UNQUOTED(ELEMENTARY_BASE_DIR, "${elementary_base_dir}", "subdirectory for all elementary data")
743
744 ### Build and install examples
745 EFL_CHECK_BUILD_EXAMPLES([enable_build_examples="yes"], [enable_build_examples="no"])
746 EFL_CHECK_INSTALL_EXAMPLES([enable_install_examples="yes"], [enable_install_examples="no"])
747
748 AC_TRY_COMPILE([
749 # define _GNU_SOURCE 1
750 #include <unistd.h>
751 ], [
752 extern char **environ;
753 ], [
754   AC_DEFINE(HAVE_ENVIRON, 1, [extern environ exists])
755 ])
756
757 AC_TRY_LINK([
758 #include <stdlib.h>
759 ], [
760 clearenv();
761 ], [
762   AC_DEFINE(HAVE_CLEARENV, 1, [extern environ exists])
763 ])
764
765 AC_OUTPUT([
766 Makefile
767 elementary.spec
768 elementary.pc
769 doc/Makefile
770 doc/Doxyfile
771 doc/widgets/Makefile
772 src/Makefile
773 src/lib/Makefile
774 src/lib/Elementary.h
775 src/bin/Makefile
776 src/modules/Makefile
777 src/modules/access_output/Makefile
778 src/modules/datetime_input_ctxpopup/Makefile
779 src/modules/datetime_input_popup/Makefile
780 src/modules/test_entry/Makefile
781 src/modules/test_map/Makefile
782 src/modules/test_map_engine/Makefile
783 src/modules/ctxpopup_copypasteUI/Makefile
784 src/edje_externals/Makefile
785 src/examples/Makefile
786 data/Makefile
787 data/themes/Makefile
788 data/images/Makefile
789 data/objects/Makefile
790 data/desktop/Makefile
791 data/edje_externals/Makefile
792 config/Makefile
793 config/default/Makefile
794 config/standard/Makefile
795 config/illume/Makefile
796 config/mobile/Makefile
797 config/desktop/Makefile
798 $po_makefile_in
799 ])
800
801 #####################################################################
802 ## Info
803
804 echo
805 echo
806 echo
807 echo "------------------------------------------------------------------------"
808 echo "$PACKAGE $VERSION"
809 echo "------------------------------------------------------------------------"
810 echo
811 echo "Configuration Options Summary:"
812 echo
813 echo "  Engines:"
814 echo "    X11....................: ${have_elementary_x}"
815 echo "    Framebuffer............: ${have_elementary_fb}"
816 echo "    PSL1GHT................: ${have_elementary_psl1ght}"
817 echo "    SDL....................: ${have_elementary_sdl}"
818 echo "    Cocoa..................: ${have_elementary_cocoa}"
819 echo "    Windows XP.............: ${have_elementary_win32}"
820 echo "    Windows CE.............: ${have_elementary_wince}"
821 echo "    Wayland...............:. ${have_elementary_wayland}"
822 echo
823 echo "  Features:"
824 echo "    Ecore_IMF..............: ${have_ecore_imf}"
825 echo "    Ecore_Con..............: ${have_ecore_con}"
826 echo "    EDBus..................: ${have_elementary_edbus}"
827 echo "    EFreet.................: ${have_elementary_efreet}"
828 echo "    EWeather...............: ${have_elementary_eweather}"
829 echo "    EMap...................: ${have_elementary_emap}"
830 echo "    Ethumb.................: ${have_elementary_ethumb}"
831 echo "    Web (WebKit)...........: ${elementary_web}"
832 echo "    Quick Launch...........: ${have_fork}"
833 echo "    EIO....................: ${have_eio}"
834 echo "    Emotion................: ${have_emotion}"
835 echo
836 echo "  eet......................: ${eet_eet}"
837 echo "  edje_cc..................: ${edje_cc}"
838 echo
839 echo "  Build elementary_test....: ${have_elementary_test}"
840 echo "  Build elementary_codegen.: ${have_elementary_codegen}"
841 echo "  Examples.................: ${enable_build_examples}"
842 echo "  Examples installed.......: ${enable_install_examples}"
843 echo "  Build elementary_config..: ${have_elementary_config}"
844 echo
845 echo "Compilation................: make (or gmake)"
846 echo "  CPPFLAGS.................: $CPPFLAGS"
847 echo "  CFLAGS...................: $CFLAGS"
848 echo "  LDFLAGS..................: $LDFLAGS"
849 echo
850 echo "Installation...............: make install (as root if needed, with 'su' or 'sudo')"
851 echo "  prefix...................: $prefix"
852 echo