1 ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
2 ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
3 m4_define([v_maj], [0])
4 m4_define([v_min], [20])
5 m4_define([v_mic], [0])
6 m4_define([v_rev], m4_esyscmd([(git rev-list --count HEAD 2>/dev/null || echo 0) | tr -d '\n']))dnl
7 ##-- When released, remove the dnl on the below line
9 m4_define([relname], [0.20.0])
10 ##-- When doing snapshots - change soname. remove dnl on below line
11 m4_define([relname], [ver-autocannoli-0.20])
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])], [m4_define([v_ver], [v_maj.v_min.v_mic])])
15 m4_define([lt_cur], m4_eval(v_maj + v_min))
16 m4_define([lt_rev], v_mic)
17 m4_define([lt_age], v_min)
18 ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
19 ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
21 AC_INIT([enlightenment], [v_ver], [enlightenment-devel@lists.sourceforge.net])
23 AC_CONFIG_SRCDIR([configure.ac])
24 AC_CONFIG_MACRO_DIR([m4])
28 AC_CONFIG_HEADERS([config.h])
30 #ifndef EFL_CONFIG_H__
31 #define EFL_CONFIG_H__
34 #endif /* EFL_CONFIG_H__ */
37 AM_INIT_AUTOMAKE([1.11 dist-xz -Wno-portability])
38 AM_SILENT_RULES([yes])
40 AC_USE_SYSTEM_EXTENSIONS
48 LT_INIT([disable-static])
50 ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
51 ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
52 m4_ifdef([v_rev], , [m4_define([v_rev], [0])])
53 m4_ifdef([v_rel], , [m4_define([v_rel], [])])
54 AC_DEFINE_UNQUOTED(VMAJ, [v_maj], [Major version])
55 AC_DEFINE_UNQUOTED(VMIN, [v_min], [Minor version])
56 AC_DEFINE_UNQUOTED(VMIC, [v_mic], [Micro version])
57 AC_DEFINE_UNQUOTED(VREV, [v_rev], [Revison])
58 AC_DEFINE_UNQUOTED(E_RELEASE_BUILD, [1], [doin it])
59 version_info="lt_cur:lt_rev:lt_age"
61 AC_SUBST([version_info])
62 AC_SUBST([release_info])
63 ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
64 ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
66 AC_ARG_VAR([TIZEN_REL_VERSION], [Tizen release version])
67 if test x"${TIZEN_REL_VERSION}" != x""; then
68 AC_DEFINE_UNQUOTED([TIZEN_REL_VERSION], ["${TIZEN_REL_VERSION}"], [Tizen release version])
69 AC_SUBST(TIZEN_REL_VERSION)
71 echo "TIZEN_REL_VERSION is empty !"
81 AC_CHECK_FUNCS(setenv)
82 AC_CHECK_FUNCS(unsetenv)
83 AC_CHECK_FUNCS(clearenv)
84 AC_CHECK_HEADERS(features.h)
88 AC_DEFINE([environ], [(*_NSGetEnviron())],
89 ["apple doesn't follow POSIX in this case."])
98 extern char **environ;
100 AC_DEFINE(HAVE_ENVIRON, 1, [Have environ var])
104 AC_SUBST(efl_version)
106 AC_CHECK_HEADERS([sys/timerfd.h sys/ptrace.h arpa/inet.h netinet/in.h])
108 AC_CHECK_HEADERS(fnmatch.h,, AC_MSG_ERROR([Cannot find fnmatch.h. Make sure your CFLAGS environment variable contains include lines for the location of this file]))
110 AC_CHECK_FUNCS(fnmatch, res=yes, res=no)
111 if test "x$res" = "xno"; then
112 AC_CHECK_LIB(fnmatch, fnmatch, res=yes, res=no)
113 if test "x$res" = "xno"; then
114 AC_MSG_ERROR([Cannot find fnmatch() in neither libc nor libfnmatch])
116 fnmatch_libs="-lfnmatch"
120 AC_SUBST([fnmatch_libs])
122 dnl AC_E_CHECK_PKG(VALGRIND, [valgrind >= 2.4.0], [], [:])
123 AC_SUBST([VALGRIND_CFLAGS])
124 AC_SUBST([VALGRIND_LIBS])
126 MODULE_ARCH="$host_os-$host_cpu-relname"
127 AC_SUBST([MODULE_ARCH])
128 AC_DEFINE_UNQUOTED(MODULE_ARCH, "$MODULE_ARCH", "Module architecture")
130 if test "x${bindir}" = 'xNONE'; then
131 if test "x${prefix}" = "xNONE"; then
132 PACKAGE_BIN_DIR="${ac_default_prefix}/bin"
134 PACKAGE_BIN_DIR="${prefix}/bin"
137 PACKAGE_BIN_DIR="${bindir}"
139 AC_SUBST([PACKAGE_BIN_DIR])
141 if test "x${libdir}" = 'xNONE'; then
142 if test "x${prefix}" = "xNONE"; then
143 PACKAGE_LIB_DIR="${ac_default_prefix}/lib"
145 PACKAGE_LIB_DIR="${prefix}/lib"
148 PACKAGE_LIB_DIR="${libdir}"
150 AC_SUBST([PACKAGE_LIB_DIR])
152 if test "x${prefix}" = "xNONE"; then
153 PACKAGE_DATA_DIR="${ac_default_prefix}/share/${PACKAGE}"
154 LOCALE_DIR="${ac_default_prefix}/share/locale"
155 PACKAGE_SYSCONF_DIR="${ac_default_prefix}/etc"
157 PACKAGE_DATA_DIR="${prefix}/share/${PACKAGE}"
158 LOCALE_DIR="${prefix}/share/locale"
159 PACKAGE_SYSCONF_DIR="${sysconfdir}"
161 AC_SUBST([PACKAGE_DATA_DIR])
162 AC_SUBST([LOCALE_DIR])
163 AC_SUBST([PACKAGE_SYSCONF_DIR])
167 PCPPFLAGS="${CPPFLAGS}"
168 CPPFLAGS="${CPPFLAGS} -I /System/Library/Frameworks/CoreFoundation.framework/Headers"
169 AC_CHECK_HEADERS(CFBase.h,
171 cf_cflags="-I /System/Library/Frameworks/CoreFoundation.framework/Headers"
172 cf_cflags="${cf_cflags} -I /System/Library/Frameworks/IOKit.framework/Headers"
173 cf_libs="-framework 'CoreFoundation' -framework 'IOKit'"
176 CPPFLAGS="${PCPPFLAGS}"
177 AC_SUBST([cf_cflags])
181 AC_CHECK_HEADERS([execinfo.h], [have_execinfo="yes"], [have_execinfo="no"])
182 if test "x${have_execinfo}" = "xyes" ; then
183 AC_MSG_CHECKING([whether backtrace_symbols_fd() is in libc])
189 #include <execinfo.h>
192 backtrace_symbols_fd(NULL, 0, 0);
194 [link_execinfo="yes"],
195 [link_execinfo="no"])
197 AC_MSG_RESULT([${link_execinfo}])
200 if test "x${link_execinfo}" = "xno" ; then
201 AC_MSG_CHECKING([whether backtrace_symbols_fd() is in libexecinfo])
203 LDFLAGS_save="${LDFLAGS}"
204 LDFLAGS="${LDFLAGS} -lexecinfo"
209 #include <execinfo.h>
212 backtrace_symbols_fd(NULL, 0, 0);
216 execinfo_libs="-lexecinfo"
218 [link_execinfo="no"])
219 LDFLAGS="${LDFLAGS_save}"
221 AC_MSG_RESULT([${link_execinfo}])
224 AC_CHECK_LIB(dl, dlopen, dlopen_libs=-ldl)
225 AC_SUBST([dlopen_libs])
227 AC_MSG_CHECKING([whether to enable Files menu item])
228 AC_ARG_ENABLE([files],
229 AS_HELP_STRING([--disable-files],[disable Files menu item @<:@default=enabled@:>@]),
230 [e_cv_enable_files=$enableval],
231 AC_CACHE_VAL([e_cv_enable_files], [e_cv_enable_files=yes]))
232 if test "[${e_cv_enable_files}]" = yes; then
233 AC_DEFINE_UNQUOTED([ENABLE_FILES],[1],[enable Files menu item])
235 AC_MSG_RESULT([$e_cv_enable_files])
238 # verify "wayland-only" early to adapt dependencies
241 AC_ARG_ENABLE([wayland],
242 AS_HELP_STRING([--enable-wayland],[enable wayland support in enlightenment @<:@default=disabled@:>@]),
243 [e_cv_want_wayland_only=$enableval],
244 [e_cv_want_wayland_only=no])
245 AC_MSG_CHECKING([whether wayland support is enabled])
246 AC_MSG_RESULT([${e_cv_want_wayland_only}])
249 AC_ARG_ENABLE([quick-init],
250 AS_HELP_STRING([--enable-quick-init],[]),
253 AC_DEFINE_UNQUOTED([ENABLE_QUICK_INIT], [1], [enable quick init])
256 AC_MSG_CHECKING([whether enlightenment quick initialization is enabled])
257 AC_MSG_RESULT([${quick_init}])
260 AC_ARG_ENABLE([function-trace],
261 AS_HELP_STRING([--enable-function-trace],[]),
264 AC_DEFINE_UNQUOTED([ENABLE_FUNCTION_TRACE], [1], [enable function trace])
267 AC_MSG_CHECKING([whether enlightenment function trace is enabled])
268 AC_MSG_RESULT([${function_trace}])
271 evas >= $efl_version \
272 ecore >= $efl_version \
273 ecore-evas >= $efl_version \
274 ecore-input >= $efl_version \
275 ecore-input-evas >= $efl_version \
276 ecore-con >= $efl_version \
277 ecore-ipc >= $efl_version \
278 ecore-file >= $efl_version \
279 eet >= $efl_version \
280 edje >= $efl_version \
281 eina >= $efl_version \
282 eldbus >= $efl_version \
283 eio >= $efl_version \
285 eeze >= $efl_version \
291 PKG_CHECK_MODULES(E_INFO, [
292 eina >= ${efl_version}
293 ecore >= ${efl_version}
294 eldbus >= ${efl_version}
296 capi-media-streamrecorder
300 PKG_CHECK_EXISTS([xkeyboard-config],[
301 xkb_base=`$PKG_CONFIG --variable=xkb_base xkeyboard-config 2>/dev/null`
302 AC_DEFINE_UNQUOTED([XKB_BASE],["$xkb_base"],[Define to the base directory for X keyboard configuration data])
307 AS_HELP_STRING([--with-profile=TARGET_PROFILE],
308 [specify a target format profile of:
309 LOWRES_PDA, MEDIUMRES_PDA, HIRES_PDA, SLOW_PC, MEDIUM_PC, FAST_PC]),
311 AC_MSG_NOTICE([Enlightenment build profile set to $profile])
312 EDJE_DEF="-DLOWRES_PDA=1 -DMEDIUMRES_PDA=2 -DHIRES_PDA=3 -DSLOW_PC=4 -DMEDIUM_PC=5 -DFAST_PC=6"
313 EDJE_DEF=$EDJE_DEF" -DE_PROFILE"=$profile
316 PKG_CHECK_MODULES(EET, [eet >= ${efl_version}])
317 EFL_WITH_BIN([edje], [edje-cc], [edje_cc])
318 EFL_WITH_BIN([eet], [eet-eet], [eet])
319 EFL_WITH_BIN([eldbus], [eldbus_codegen], [eldbus-codegen])
321 AC_DEFINE(E_INTERNAL, 1, "This define can be used to wrap internal E stuff, as config.h isn't exported")
324 AM_CONDITIONAL([HAVE_ENOTIFY], [false])
325 AC_ARG_ENABLE([enotify],
326 AS_HELP_STRING([--disable-enotify], [disable Enotify support @<:@default=detect@:>@]),
327 [e_cv_want_enotify=$enableval],
328 AC_CACHE_VAL([e_cv_want_enotify], [e_cv_want_enotify=yes])
330 if test "x$e_cv_want_enotify" != "xno" ; then
331 AC_E_CHECK_PKG(ENOTIFY, [ eldbus >= $efl_version ],
333 AC_DEFINE_UNQUOTED([HAVE_ENOTIFY], [1], [enable enotify])
336 AC_MSG_NOTICE([enotify disabled])
340 AC_MSG_NOTICE([enotify disabled])
343 AC_SUBST([ENOTIFY_CFLAGS])
344 AC_SUBST([ENOTIFY_LIBS])
347 AC_MSG_CHECKING([whether shm_open() is present])
353 #include <sys/stat.h>
354 #include <sys/mman.h>
359 fd = shm_open("/", O_RDWR | O_CREAT, S_IRUSR |
365 AC_DEFINE(HAVE_SHM_OPEN, 1, [Have shm_open() call])
369 AC_MSG_RESULT([${have_shm_open}])
370 AC_SUBST(SHM_OPEN_LIBS)
372 if test "x${e_cv_want_wayland_only}" != "xno" || test "x${e_cv_want_wayland_clients}" != "xno";then
373 PKG_CHECK_MODULES([WAYLAND], [wayland-server >= 1.8.0 xkbcommon uuid xdg-shell-unstable-v5-server xdg-shell-unstable-v6-server tizen-remote-surface-server scaler-server screenshooter-server tizen-extension-server tizen-launch-server tizen-surface-server tizen-dpms-server eom-server presentation-time-server tizen-hwc-server linux-explicit-synchronization-unstable-v1-server wtz-foreign-server wtz-screen-server wtz-shell-server],
376 AC_DEFINE_UNQUOTED([HAVE_WAYLAND],[1],[enable wayland support])
382 if test "x${have_wayland}" = "xyes"; then
383 if test "x${e_cv_want_wayland_only}" != "xno"; then
384 have_wayland_only=yes
385 AC_DEFINE_UNQUOTED([HAVE_WAYLAND_ONLY],[1],[enable wayland-only version of enlightenment])
389 AC_ARG_ENABLE([wayland-tbm],
390 AS_HELP_STRING([--enable-wayland-tbm],[enable wayland-tbm @<:@default=enabled@:>@]),
391 [e_cv_want_wayland_tbm=$enableval],
392 [e_cv_want_wayland_tbm=yes])
393 AC_MSG_CHECKING([whether wayland TBM support is enabled])
394 AC_MSG_RESULT([${e_cv_want_wayland_tbm}])
396 if test "x$e_cv_want_wayland_tbm" != "xno";then
397 PKG_CHECK_MODULES([WAYLAND_TBM], [wayland-tbm-server],
400 AC_DEFINE_UNQUOTED([HAVE_WAYLAND_TBM],[1],[enable wayland-tbm support])
408 AS_HELP_STRING([--enable-hwc],[enable hwc @<:@default=enabled@:>@]),
409 [e_cv_want_hwc=$enableval],
411 AC_MSG_CHECKING([whether HWC support is enabled])
412 AC_MSG_RESULT([${e_cv_want_hwc}])
414 if test "x$e_cv_want_hwc" != "xno";then
415 PKG_CHECK_MODULES([HWC], [gbm],
418 AC_DEFINE_UNQUOTED([HAVE_HWC],[1],[enable hwc support])
425 # does this compiler support -fopenmp, does it have the include file
426 # <omp.h> and does it have libgomp ?
428 AC_MSG_CHECKING([for OpenMP])
431 CFLAGS="-fopenmp $mflag_primary -Werror"
433 AC_LINK_IFELSE([AC_LANG_SOURCE([
435 int main(int argc, char** argv)
450 if test "x$have_libgomp" != "xno"; then
451 AC_DEFINE([HAVE_LIBGOMP], [1], [Enable libgomp])
454 AC_DEFINE([HAVE_LIBGOMP], [0], [Disable libgomp])
457 AM_CONDITIONAL([HAVE_LIBGOMP], [test "x${have_libgomp}" = "xyes"])
459 # Check for ttrace header files
460 PKG_CHECK_MODULES(TTRACE,
462 [have_ttrace="yes"], [have_ttrace="no"])
464 if test "x$have_ttrace" = "xyes"; then
465 AC_DEFINE(ENABLE_TTRACE, 1, [ttrace available])
469 PKG_CHECK_EXISTS([dlog], [have_dlog="yes"], [have_dlog="no"])
470 AC_MSG_CHECKING([Have dlog logger])
471 AC_MSG_RESULT([${have_dlog}])
472 if test "x${have_dlog}" = "xyes"; then
473 AC_DEFINE([HAVE_DLOG], [1], [Define to 1 if you have dlog])
474 PKG_CHECK_MODULES(DLOG, dlog)
477 AM_CONDITIONAL([HAVE_DLOG], [test "x${have_dlog}" = "xyes"])
479 AM_CONDITIONAL([HAVE_WAYLAND], [test "x${have_wayland}" = "xyes"])
480 AM_CONDITIONAL([HAVE_WAYLAND_TBM], [test "x${have_wayland_tbm}" = "xyes"])
481 AM_CONDITIONAL([HAVE_HWC], [test "x${have_hwc}" = "xyes"])
484 PKG_CHECK_MODULES([PIXMAN], [pixman-1])
487 PKG_CHECK_MODULES([EGL], [egl])
491 AC_ARG_ENABLE([systemd],
492 [AS_HELP_STRING([--disable-systemd], [disable systemd @<:@default=enabled@:>@])],
494 if test "x${enableval}" = "xyes"; then
500 AC_MSG_CHECKING([whether systemd is enabled])
501 AC_MSG_RESULT([${want_systemd}])
504 if test "x$want_systemd" = "xyes"; then
505 PKG_CHECK_MODULES([SYSTEMD], [libsystemd >= 209],
508 AC_DEFINE_UNQUOTED([HAVE_SYSTEMD], [1], [enable systemd support])
514 AM_CONDITIONAL([HAVE_SYSTEMD], [test "x${have_systemd}" = "xyes"])
517 PKG_CHECK_MODULES([LIBINPUT], [libinput])
519 have_extra_touch_event="no"
520 AC_CHECK_LIB(input, libinput_event_touch_get_major, [have_extra_touch_event="yes"])
521 if test "x${have_extra_touch_event}" = "xyes";then
522 AC_DEFINE_UNQUOTED([LIBINPUT_SUPPORT_EXTRA_TOUCH_EVENT], [1], [libinput support extra touch event])
525 have_scroll_value_v120="no"
526 AC_CHECK_LIB(input, libinput_event_pointer_get_scroll_value_v120, [have_scroll_value_v120="yes"])
527 if test "x${have_scroll_value_v120}" = "xyes";then
528 AC_DEFINE_UNQUOTED([LIBINPUT_HAVE_SCROLL_VALUE_V120], [1], [libinput have get_scroll_value_v120])
532 PKG_CHECK_MODULES([CAPI_SYSTEM_DEVICE],
533 [capi-system-device])
535 PKG_CHECK_MODULES(CYNARA,
536 [cynara-client, cynara-creds-socket, cynara-session, libsmack],
537 [have_cynara="yes"], [have_cynara="no"])
538 if test "x${have_cynara}" = "xyes"; then
539 AC_DEFINE([HAVE_CYNARA], [1], [Define to 1 if you have cynara])
543 PKG_CHECK_MODULES(TZSH,
548 PKG_CHECK_MODULES(GMOCK,
552 POLICY_CFLAGS="${CAPI_SYSTEM_DEVICE_CFLAGS} ${CYNARA_CFLAGS} ${TZSH_CFLAGS}"
553 POLICY_LIBS="${CAPI_SYSTEM_DEVICE_LIBS} ${CYNARA_LIBS} ${TZSH_LIBS}"
554 AC_SUBST(POLICY_CFLAGS)
555 AC_SUBST(POLICY_LIBS)
557 define([CHECK_MODULE_BUFFERQUEUE],
559 if test "x${have_wayland_clients}" = "xyes" || test "x${e_cv_want_wayland_only}" = "xyes"; then
560 AC_E_CHECK_PKG(BUFFERQUEUE, [ ecore >= $efl_version eina >= $efl_version ], [BUFFERQUEUE=true], [BUFFERQUEUE=false])
565 AM_CONDITIONAL([HAVE_BUFFERQUEUE], [test "x${BUFFERQUEUE}" = "xtrue"])
567 AC_E_OPTIONAL_MODULE([bufferqueue], $have_wayland, [CHECK_MODULE_BUFFERQUEUE])
569 if test "x${have_wayland}" = "xyes"; then
570 AC_DEFINE_UNQUOTED([HAVE_WAYLAND_ONLY],[1],[enable wayland-only version of enlightenment])
571 have_wayland_only=yes
576 AM_CONDITIONAL([HAVE_WAYLAND_ONLY], [test "x${have_wayland_only}" = "xyes"])
578 PKG_CHECK_MODULES(E, [$e_requires])
580 evas >= ${efl_version} \
581 ecore >= ${efl_version} \
582 ecore-evas >= ${efl_version} \
583 ecore-con >= ${efl_version} \
584 ecore-ipc >= ${efl_version} \
585 ecore-file >= ${efl_version} \
586 eet >= ${efl_version} \
587 edje >= ${efl_version} \
588 eina >= ${efl_version} \
589 eldbus >= ${efl_version} \
590 eio >= ${efl_version} \
591 eo >= ${efl_version} \
592 eeze >= ${efl_version} \
595 e_libs="$E_LIBS $fnmatch_libs $execinfo_libs $DLOG_LIBS"
596 e_cflags="-DUSE_E_CONFIG_H $E_CFLAGS -D_F_ZONE_WINDOW_ROTATION_ -D_F_E_VIRTUAL_KEYBOARD_TYPE_ -D_F_E_CLIENT_NEW_CLIENT_POST_HOOK_ -D_F_E_COMP_OBJECT_INTERCEPT_HOOK_ -D_F_TRANSIENT_FOR_PATCH -D_F_DISABLE_BACKLIGHT_MOD_SUPPORT $DLOG_CFLAGS"
597 e_configflags="-DUSE_E_CONFIG_H -D_F_ZONE_WINDOW_ROTATION_ -D_F_E_VIRTUAL_KEYBOARD_TYPE_ -D_F_E_CLIENT_NEW_CLIENT_POST_HOOK_ -D_F_E_COMP_OBJECT_INTERCEPT_HOOK_ -D_F_TRANSIENT_FOR_PATCH -D_F_DISABLE_BACKLIGHT_MOD_SUPPORT"
601 AC_SUBST([e_configflags])
602 AC_SUBST([requirements_e])
606 EFL_COMPILER_FLAG([-Wshadow])
607 EFL_COMPILER_FLAG([-Wall])
608 EFL_COMPILER_FLAG([-Wpointer-arith])
609 EFL_COMPILER_FLAG([-W])
610 EFL_COMPILER_FLAG([-Wno-missing-field-initializers])
611 EFL_COMPILER_FLAG([-Wfloat-equal])
612 EFL_COMPILER_FLAG([-Wuninitialized])
613 EFL_COMPILER_FLAG([-Wundef])
614 EFL_COMPILER_FLAG([-Wcast-align])
615 EFL_COMPILER_FLAG([-Wformat=2])
626 AC_SUBST([SUID_CFLAGS])
627 AC_SUBST([SUID_LDFLAGS])
637 echo "[$]@" | sed -e 's/^[[ \t]]*\([[^ \t]]*\)[[ \t]]*$/\1/g'
643 * project.........: $PACKAGE $VERSION
644 * prefix..........: $(txt_strip $prefix)
645 * CFLAGS..........: $(txt_strip $CFLAGS)
646 * LDFLAGS.........: $(txt_strip $LDFLAGS)
647 * edje_cc.........: ${edje_cc}
648 * eet.............: ${eet_eet}
649 * eldbus-codegen..: ${eldbus_codegen}
655 for mod in $UNUSED_OPTIONAL_MODULES; do
656 UNUSED_MODS="$UNUSED_MODS${COLOR_HRED}$mod${COLOR_END} "
661 * disabled........: $(txt_strip $UNUSED_MODS)
666 Compilation........: make (or gmake)
671 Installation.......: make all install (as root if needed, with 'su' or 'sudo')