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