eina: add test case for eina_crc function in eina module.
[platform/upstream/efl.git] / configure.ac
1 EFL_VERSION([1], [14], [99], [dev])
2 AC_INIT([efl], [efl_version], [enlightenment-devel@lists.sourceforge.net])
3
4 AC_PREREQ([2.60])
5 AC_CONFIG_SRCDIR([configure.ac])
6 AC_CONFIG_MACRO_DIR([m4])
7
8 AC_CONFIG_HEADERS([config.h])
9 AH_TOP([
10 #ifndef EFL_CONFIG_H__
11 #define EFL_CONFIG_H__
12 ])
13 AH_BOTTOM([
14 #endif /* EFL_CONFIG_H__ */
15 ])
16
17
18 AM_INIT_AUTOMAKE([1.6 dist-xz -Wall color-tests subdir-objects])
19 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
20
21 # Due to a bug in automake 1.14 we need to use this after AM_INIT_AUTOMAKE
22 # http://debbugs.gnu.org/cgi/bugreport.cgi?bug=15981
23 AC_USE_SYSTEM_EXTENSIONS
24
25 CFOPT_WARNING=""
26
27 #### Apply configuring with legacy api's only, eo api's or both.
28
29 EFL_API_LEGACY_DEF="#define EFL_NOLEGACY_API_SUPPORT"
30 EFL_API_EO_DEF="#define EFL_EO_API_SUPPORT"
31 efl_api="both"
32
33 #### For the moment the Eo EFL API is not ready you need to explicitely optin.
34 EFL_ENABLE_EO_API_SUPPORT
35 EFL_ENABLE_BETA_API_SUPPORT
36
37 AC_ARG_WITH([api],
38    [AS_HELP_STRING([--with-api=@<:@eo/legacy/both@:>@],[Select the EFL API Model @<:@default=both@:>@])],
39    [efl_api=${withval}],
40    [efl_api="both"])
41
42 case "$efl_api" in
43     eo)
44         EFL_API_LEGACY_DEF="#define EFL_NOLEGACY_API_SUPPORT"
45         EFL_API_EO_DEF="#define EFL_EO_API_SUPPORT"
46         CFOPT_WARNING="xyes"
47         ;;
48     legacy)
49         EFL_API_LEGACY_DEF=""
50         EFL_API_EO_DEF=""
51         ;;
52     both)
53         EFL_API_LEGACY_DEF=""
54         EFL_API_EO_DEF="#define EFL_EO_API_SUPPORT"
55         ;;
56     *) AC_MSG_ERROR([Invalid api (${efl_api}): must be eo, legacy or both]) ;;
57 esac
58
59 AC_SUBST(EFL_API_LEGACY_DEF)
60 AC_SUBST(EFL_API_EO_DEF)
61
62 #### Additional options to configure
63
64 # string to identify the build
65 AC_ARG_WITH([id],
66    [AS_HELP_STRING([--with-id=BUILD_ID],[Specify a string to identify the build (vendor, maintainer, etc).
67                      @<:@default=none@:>@])],
68    [EFL_BUILD_ID="${withval}"],
69    [EFL_BUILD_ID="none"])
70 AC_SUBST(EFL_BUILD_ID)
71
72 # profile
73 AC_ARG_WITH([profile],
74    [AS_HELP_STRING([--with-profile=PROFILE],[use the predefined build profile, one of: dev, debug and release.
75                     @<:@default=dev@:>@])],
76    [build_profile=${withval}],
77    [build_profile=def_build_profile])
78
79 case "${build_profile}" in
80    dev|debug|release)
81      ;;
82    *)
83      AC_MSG_ERROR([Unknown build profile --with-profile=${build_profile}])
84      ;;
85 esac
86
87 prefer_assert="no"
88 case "${build_profile}" in
89    dev|debug)
90      prefer_assert="yes"
91      ;;
92 esac
93
94 # TODO: add some build "profile" (server, full, etc...)
95
96 AC_ARG_WITH([crypto],
97    [AS_HELP_STRING([--with-crypto=CRYPTO],[use the predefined build crypto, one of:
98                     openssl, gnutls or none.
99                     @<:@default=openssl@:>@])],
100    [build_crypto=${withval}],
101    [build_crypto=openssl])
102
103 case "${build_crypto}" in
104    openssl|gnutls|none)
105      ;;
106    *)
107      AC_MSG_ERROR([Unknown build crypto option: --with-crypto=${build_crypto}])
108      ;;
109 esac
110
111 AC_ARG_WITH([tests],
112    [AS_HELP_STRING([--with-tests=none|regular|coverage],[choose testing method: regular, coverage or none.
113                     @<:@default=none@:>@])],
114    [build_tests=${withval}],
115    [build_tests=auto])
116
117 want_coverage="no"
118 want_tests="no"
119 case "${build_tests}" in
120    auto)
121      if test "${build_profile}" = "dev"; then
122         want_tests="yes"
123      fi
124      ;;
125    regular)
126      want_tests="yes"
127      ;;
128    coverage)
129      want_tests="yes"
130      want_coverage="yes"
131      ;;
132    no*)
133      ;;
134    *)
135      AC_MSG_ERROR([Unknown build tests option: --with-tests=${build_tests}])
136      ;;
137 esac
138
139 AC_ARG_WITH([ecore-con-http-test-url],
140    [AS_HELP_STRING([--with-ecore-con-http-test-url=http://username:password@example.com],[Url of http server for testing with username and password])],[ECORE_CON_HTTP_TEST_URL=${withval}][AC_DEFINE_UNQUOTED([ECORE_CON_HTTP_TEST_URL],["$withval"],[Http url for testing])])
141
142 AC_ARG_WITH([ecore-con-ftp-test-url],
143    [AS_HELP_STRING([--with-ecore-con-ftp-test-url=ftp://username:password@ftp.example.com?file=filename&directory=dir],[Url of ftp server for testing with username, password, complete filepath for upload with optional directory])],[ECORE_CON_FTP_TEST_URL=${withval}][AC_DEFINE_UNQUOTED([ECORE_CON_FTP_TEST_URL],["$withval"],[Ftp url for testing])])
144
145 dbusservicedir="${datadir}/dbus-1/services"
146 AC_ARG_WITH([dbus-services],
147    [AS_HELP_STRING([--with-dbus-services=DBUS_SERVICES],[specify a directory to store dbus service files.])],
148    [dbusservicedir=$withval])
149 AC_SUBST(dbusservicedir)
150
151 efl_deprecated_option="no"
152 EFL_WITH_BIN([edje], [edje-cc])
153 EFL_WITH_BIN([eolian], [eolian-gen])
154 EFL_WITH_BIN([eolian_cxx], [eolian-cxx])
155 EFL_WITH_BIN_SUFFIX([elua], [elua], [_bin])
156
157 #### Default values
158
159 requirements_pc_eflall=""
160 requirements_pc_deps_eflall=""
161 requirements_libs_eflall=""
162 requirements_cflags_eflall=""
163
164 requirements_pc_crypto=""
165 requirements_pc_deps_crypto=""
166 requirements_libs_crypto=""
167 requirements_cflags_crypto=""
168
169 AC_CANONICAL_HOST
170
171 # TODO: move me to m4 file that setups module/so related variables
172 case "$host_os" in
173    cegcc*|mingw32ce*)
174       AC_MSG_ERROR([ceGCC compiler is not supported anymore. Exiting...])
175    ;;
176    mingw*)
177       have_win32="yes"
178       have_windows="yes"
179       MODULE_ARCH="v-v_maj.v_min"
180       MODULE_EXT=".dll"
181    ;;
182    cygwin*)
183       MODULE_ARCH="v-v_maj.v_min"
184       MODULE_EXT=".dll"
185    ;;
186    *)
187       MODULE_ARCH="v-v_maj.v_min"
188       MODULE_EXT=".so"
189    ;;
190 esac
191
192 EFL_VERSION_MAJOR="v_maj"
193 EFL_VERSION_MINOR="v_min"
194 AC_SUBST(EFL_VERSION_MAJOR)
195 AC_SUBST(EFL_VERSION_MINOR)
196
197 have_systemd_pkg="no"
198 have_win32="no"
199 have_windows="no"
200 have_freebsd="no"
201 have_darwin="no"
202 have_linux="no"
203 have_ps3="no"
204 case "$host_os" in
205    mingw*|cygwin*)
206       # TODO: check cygwin* here
207       have_win32="yes"
208       have_windows="yes"
209       EFLALL_CFLAGS="${EFLALL_CFLAGS} -D__USE_MINGW_ANSI_STDIO"
210    ;;
211    freebsd*)
212       have_freebsd="yes"
213    ;;
214    darwin*)
215       have_darwin="yes"
216    ;;
217    linux*)
218       have_linux="yes"
219       have_systemd_pkg="auto"
220    ;;
221 esac
222
223 case "$host_vendor" in
224    ps3*)
225       have_ps3="yes"
226    ;;
227 esac
228
229 AC_SUBST([MODULE_ARCH])
230 AC_DEFINE_UNQUOTED([MODULE_ARCH], ["${MODULE_ARCH}"], ["Module architecture"])
231 AC_DEFINE_UNQUOTED([SHARED_LIB_SUFFIX], ["${MODULE_EXT}"], [Suffix for shared objects])
232 AC_DEFINE_UNQUOTED([EXEEXT], ["${EXEEXT}"], [Suffix for binary objects])
233
234 # TODO: move me to m4 file that setups the windows related variables
235 AM_CONDITIONAL([HAVE_WIN32], [test "x${have_win32}" = "xyes"])
236 AM_CONDITIONAL([HAVE_WINDOWS], [test "x${have_windows}" = "xyes"])
237 AM_CONDITIONAL([HAVE_PS3], [test "x${have_ps3}" = "xyes"])
238
239 AM_CONDITIONAL([HAVE_FREEBSD], [test "x${have_freebsd}" = "xyes"])
240 AM_CONDITIONAL([HAVE_OSX], [test "x${have_darwin}" = "xyes"])
241 AM_CONDITIONAL([HAVE_X86_64], [test "x${host_cpu}" = "xx86_64"])
242
243 #### Checks for programs
244
245 ### libtool
246
247 if test "x${have_windows}" = "xyes" ; then
248    lt_cv_deplibs_check_method='pass_all'
249 fi
250 m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
251 LT_INIT([win32-dll disable-static pic-only])
252 EFL_INIT
253
254 ### gettext
255
256 AM_GNU_GETTEXT_VERSION([0.18])
257
258 m4_ifdef([AC_GNU_GETTEXT], [
259 AC_GNU_GETTEXT([external])
260 po_makefile_in=po/Makefile.in
261 have_po="yes"
262 ],
263 [
264 m4_ifdef([AM_GNU_GETTEXT], [
265 AM_GNU_GETTEXT([external])
266 po_makefile_in=po/Makefile.in
267 have_po="yes"
268 ],
269 [
270 have_po="no"
271 ])
272 ])
273 AC_SUBST([LTLIBINTL])
274 LOCALE_DIR="${localedir}"
275 AC_SUBST(LOCALE_DIR)
276
277 if test "x${POSUB}" = "x" ; then
278    have_po="no"
279 fi
280
281 AM_CONDITIONAL([HAVE_PO], [test "x${have_po}" = "xyes"])
282
283 ### compilers
284
285 AC_PROG_MKDIR_P
286 AM_PROG_AS
287 AC_PROG_CXX
288 AC_PROG_OBJC
289 AC_LANG(C)
290 AC_PROG_CC_C99
291 AM_PROG_CC_C_O
292 AC_PROG_SED
293
294 AM_CONDITIONAL([BUILD_EFL_NATIVE], [test "x${cross_compiling}" = "xno"])
295
296 if test "x${ac_cv_prog_cc_c99}" = "xno" ; then
297    AC_MSG_ERROR([efl requires a c99-capable compiler])
298 fi
299 # We should be using ${CXX} here, but there is a bug in
300 # autotools macro and CXX is always set to g++ even if
301 # it's not found. So we are using an internal variable
302 # that does the work for now, may get broken in the future.
303 if test "x${ac_ct_CXX}" = "x" -a "x${CXX}" = "xg++"; then
304    AC_MSG_ERROR([efl requires a C++ compiler got ${ac_ct_CXX} and ${CXX}.])
305 fi
306
307 AC_SYS_LARGEFILE
308
309 # pkg-config
310
311 PKG_PROG_PKG_CONFIG
312 if test "x${PKG_CONFIG}" = "x" ; then
313    AC_MSG_ERROR([pkg-config tool not found. Install it or set PKG_CONFIG environment variable to that path tool. Exiting...])
314 fi
315
316 # doxygen program for documentation building
317
318 EFL_CHECK_DOXYGEN([build_doc="yes"], [build_doc="no"])
319
320 # lcov
321
322 if test "${want_coverage}" = "yes" ; then
323    AC_CHECK_PROG([have_lcov], [lcov], [yes], [no])
324    if test "x${have_lcov}" = "xyes" ; then
325       EFLALL_COV_CFLAGS="${EFLALL_COV_CFLAGS} -fprofile-arcs -ftest-coverage"
326       EFLALL_COV_LIBS="${EFLALL_COV_LIBS} -lgcov"
327       if test "x${prefer_assert}" = "xno"; then
328          EFLALL_COV_CFLAGS="${EFLALL_COV_CFLAGS} -DNDEBUG"
329       else
330          EFLALL_COV_CFLAGS="${EFLALL_COV_CFLAGS} -g -O0 -DDEBUG"
331       fi
332    else
333       AC_MSG_ERROR([lcov is not found])
334    fi
335 fi
336
337 AM_CONDITIONAL([EFL_ENABLE_COVERAGE], [test "${want_coverage}" = "yes"])
338
339 #### Checks for libraries
340
341 # check unit testing library
342
343 if test "${want_tests}" = "yes"; then
344    PKG_CHECK_MODULES([CHECK], [check >= 0.9.5])
345 fi
346 AM_CONDITIONAL([EFL_ENABLE_TESTS], [test "${want_tests}" = "yes"])
347
348
349 # check for crypto/tls library to use
350 case "$build_crypto" in
351    gnutls)
352       EFL_DEPEND_PKG([crypto], [GNUTLS], [gnutls >= 2.12.16])
353
354       AM_PATH_LIBGCRYPT([], [:],
355          [AC_MSG_ERROR([libgcrypt required but not found])])
356       requirements_libs_crypto="${LIBGCRYPT_LIBS} ${requirements_libs_crypto}"
357       requirements_cflags_crypto="${LIBGCRYPT_CFLAGS} ${requirements_cflags_crypto}"
358       ;;
359
360    openssl)
361       EFL_DEPEND_PKG([crypto], [OPENSSL], [openssl])
362       ;;
363 esac
364 AM_CONDITIONAL([HAVE_CRYPTO_GNUTLS], [test "${build_crypto}" = "gnutls"])
365 AM_CONDITIONAL([HAVE_CRYPTO_OPENSSL], [test "${build_crypto}" = "openssl"])
366
367 # check for lua old
368 want_lua_old="no"
369 AC_ARG_ENABLE([lua-old],
370    [AS_HELP_STRING([--enable-lua-old],[Enable interpreted Lua support (5.1 or 5.2). @<:@default=disabled@:>@])],
371    [
372     if test "x${enableval}" = "xyes" ; then
373        want_lua_old="yes"
374     else
375        want_lua_old="no"
376     fi
377    ],
378    [want_lua_old="no"])
379
380 AM_CONDITIONAL([ENABLE_LUA_OLD], [test "${want_lua_old}" = "yes"])
381 AC_DEFINE_IF([ENABLE_LUA_OLD], [test "${want_lua_old}" = "yes"],
382   [1], [Use interpreted Lua (5.1 or 5.2)])
383 AC_SUBST([want_lua_old])
384
385
386 want_liblz4="no"
387 AC_ARG_ENABLE([liblz4],
388    [AS_HELP_STRING([--enable-liblz4],[Enable usage of liblz4 instead of our embedded copy. @<:@default=disabled@:>@])],
389    [
390     if test "x${enableval}" = "xyes" ; then
391         # Only ships pc file since r120
392         PKG_CHECK_MODULES([LIBLZ4], [liblz4])
393         EFL_DEPEND_PKG([EET], [LIBLZ4], [liblz4])
394         EFL_DEPEND_PKG([EVAS], [LIBLZ4], [liblz4])
395        want_liblz4="yes"
396     else
397        want_liblz4="no"
398     fi
399    ],
400    [want_liblz4="no"])
401
402 AM_CONDITIONAL([ENABLE_LIBLZ4], [test "${want_liblz4}" = "yes"])
403 AC_DEFINE_IF([ENABLE_LIBLZ4], [test "${want_liblz4}" = "yes"], [1], [Use liblz4 external library instead of embedded copy])
404 AC_SUBST([want_liblz4])
405 AC_SUBST([ENABLE_LIBLZ4])
406
407 #### Checks for header files
408
409 # Common Checks (keep names sorted for ease of use):
410 AC_HEADER_DIRENT
411 AC_HEADER_TIME
412
413 AC_CHECK_HEADERS([ \
414 execinfo.h \
415 mcheck.h \
416 sys/epoll.h \
417 sys/inotify.h \
418 sys/signalfd.h \
419 sys/types.h \
420 sys/param.h \
421 sys/mman.h \
422 netinet/in.h \
423 ])
424
425 EFL_CHECK_PATH_MAX
426
427 #### Checks for types
428
429 # wchar_t
430 AC_CHECK_SIZEOF([wchar_t])
431 EINA_SIZEOF_WCHAR_T=$ac_cv_sizeof_wchar_t
432 AC_SUBST([EINA_SIZEOF_WCHAR_T])
433
434 AC_CHECK_SIZEOF(int, 4)
435 AC_CHECK_SIZEOF(long, 4)
436
437 AC_CHECK_SIZEOF([uintptr_t])
438
439 AC_CHECK_TYPES([siginfo_t], [], [],
440    [[
441 #include <signal.h>
442 #if HAVE_SIGINFO_H
443 # include <siginfo.h>
444 #endif
445    ]])
446
447 #### Checks for structures
448
449
450 #### Checks for compiler characteristics
451
452 AC_C_BIGENDIAN
453 AC_C_INLINE
454 EFL_CHECK_COMPILER_FLAGS([EFLALL], [-Wall -Wextra -Wpointer-arith -Wno-missing-field-initializers -fvisibility=hidden -fdata-sections -ffunction-sections])
455 EFL_CHECK_LINKER_FLAGS([EFLALL], [-fvisibility=hidden -fdata-sections -ffunction-sections -Wl,--gc-sections -fno-strict-aliasing -Wl,--as-needed -Wl,--no-copy-dt-needed-entries])
456 case "${build_profile}" in
457    dev)
458      dnl Check if compiler has a dodgy -Wshadow that emits errors when shadowing a global
459      AC_MSG_CHECKING([whether -Wshadow generates spurious warnings])
460      CFLAGS_save="${CFLAGS}"
461      CFLAGS="${CFLAGS} -Werror -Wshadow"
462      AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[int x;]], [[int x = 0; (void)x;]])],[AC_MSG_RESULT([no])
463         EFL_CHECK_COMPILER_FLAGS([EFLALL], [-Wshadow])],[AC_MSG_RESULT([yes])])
464      CFLAGS="${CFLAGS_save}"
465      ;;
466
467    debug)
468      ;;
469
470    release)
471      ;;
472 esac
473
474 EFL_ATTRIBUTE_VECTOR
475 EFL_ATTRIBUTE_ALWAYS_INLINE
476
477 EFLALL_LIBS="${EFLALL_LIBS}"
478 EFLALL_CFLAGS="${EFLALL_CFLAGS}"
479
480 ## CPU architecture specific assembly
481
482 build_cpu_mmx="no"
483 build_cpu_sse3="no"
484 build_cpu_altivec="no"
485 build_cpu_neon="no"
486
487 want_neon="yes"
488 AC_ARG_ENABLE([neon],
489    [AS_HELP_STRING([--disable-neon],[disable neon support @<:@default=enable@:>@])],
490    [
491     if test "x${enableval}" = "xyes"; then
492        want_neon="yes"
493     else
494        want_neon="no"
495     fi
496    ])
497
498 SSE3_CFLAGS=""
499 ALTIVEC_CFLAGS=""
500 NEON_CFLAGS=""
501
502 case $host_cpu in
503   i*86|x86_64|amd64)
504     AC_DEFINE([BUILD_MMX], [1], [Build MMX Code])
505     build_cpu_mmx="yes"
506     AC_CHECK_HEADER([immintrin.h],
507        [
508         AC_DEFINE(BUILD_SSE3, 1, [Build SSE3 Code])
509         build_cpu_sse3="yes"
510        ],
511        [build_cpu_sse3="no"])
512     AC_MSG_CHECKING([whether to build SSE3 code])
513     AC_MSG_RESULT([${build_cpu_sse3}])
514
515     if test "x$build_cpu_sse3" = "xyes" ; then
516        SSE3_CFLAGS="-msse3"
517     fi
518     ;;
519   *power* | *ppc*)
520     build_cpu_altivec="yes"
521     AC_CHECK_HEADER([altivec.h],
522        [
523         AC_DEFINE([BUILD_ALTIVEC], [1], [Build Altivec Code])
524         AC_DEFINE([HAVE_ALTIVEC_H], [1], [Have altivec.h header file])
525         build_cpu_altivec="yes"
526        ],
527        [
528         save_CFLAGS=$CFLAGS
529         save_CPPFLAGS=$CPPFLAGS
530         CFLAGS=$CFLAGS" -maltivec"
531         CPPFLAGS=$CPPFLAGS" -maltivec"
532         unset ac_cv_header_altivec_h
533         AC_CHECK_HEADER([altivec.h],
534           [
535             AC_DEFINE([BUILD_ALTIVEC], [1], [Build Altivec Code])
536             AC_DEFINE([HAVE_ALTIVEC_H], [1], [Have altivec.h header file])
537             build_cpu_altivec="yes"
538           ],
539           [build_cpu_altivec="no"]
540         )
541         CFLAGS=$save_CFLAGS
542         CPPFLAGS=$save_CPPFLAGS
543        ]
544     )
545     if test "x${build_cpu_altivec}" = "xyes"; then
546        AC_MSG_CHECKING([whether to use altivec compiler flag])
547        if test "x$GCC" = "xyes"; then
548           if echo "int main(){return 0;}" | ${CPP} -faltivec - > /dev/null 2>&1; then
549              altivec_cflags="-faltivec"
550              AC_DEFINE([BUILD_ALTIVEC], [1], [Build Altivec Code])
551           elif echo "int main(){return 0;}" | ${CPP} -maltivec - > /dev/null 2>&1; then
552              altivec_cflags="-maltivec"
553              AC_DEFINE([BUILD_ALTIVEC], [1], [Build Altivec Code])
554           fi
555        fi
556        AC_MSG_RESULT([${altivec_cflags}])
557        CFLAGS="$CFLAGS ${altivec_cflags}"
558        ALTIVEC_CFLAGS="-maltivec"
559     fi
560     ;;
561   arm*)
562     if test "x${want_neon}" = "xyes"; then
563        build_cpu_neon="yes"
564        AC_MSG_CHECKING([whether to use NEON instructions])
565        CFLAGS_save="${CFLAGS}"
566        CFLAGS="${CFLAGS} -mfpu=neon -ftree-vectorize"
567        AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <arm_neon.h>]], [[asm volatile ("vqadd.u8 d0, d1, d0\n")]])],[
568            AC_MSG_RESULT([yes])
569            AC_DEFINE([BUILD_NEON], [1], [Build NEON Code])
570            build_cpu_neon="yes"
571            NEON_CFLAGS="-mfpu=neon"
572          ],[
573            AC_MSG_RESULT([no])
574            build_cpu_neon="no"
575          ])
576        CFLAGS="${CFLAGS_save}"
577     fi
578     ;;
579   aarch64*)
580     if test "x${want_neon}" = "xyes"; then
581        build_cpu_neon="yes"
582        AC_MSG_CHECKING([whether to use NEON instructions])
583        AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <arm_neon.h>]], [[volatile uint32x4_t test = vdupq_n_u32(0x1);]])],[
584            AC_MSG_RESULT([yes])
585            AC_DEFINE([BUILD_NEON], [1], [Build NEON Code])
586            AC_DEFINE([BUILD_NEON_INTRINSICS], [1], [Build NEON Intrinsics])
587            build_cpu_neon="yes"
588          ],[
589            AC_MSG_RESULT([no])
590            build_cpu_neon="no"
591          ])
592     fi
593     ;;
594 esac
595
596 AC_SUBST([ALTIVEC_CFLAGS])
597 AC_SUBST([SSE3_CFLAGS])
598 AC_SUBST([NEON_CFLAGS])
599
600 #### Checks for linker characteristics
601
602
603 #### Checks for library functions
604
605 AC_CHECK_FUNCS([\
606 backtrace \
607 backtrace_symbols \
608 execvp \
609 fpathconf \
610 fstatat \
611 malloc_usable_size \
612 mkdirat \
613 mtrace \
614 realpath \
615 strlcpy \
616 geteuid \
617 getuid \
618 pause \
619 ])
620
621 AC_FUNC_ALLOCA
622 AC_FUNC_MMAP
623
624 EFL_CHECK_FUNCS([EFLALL], [fnmatch gettimeofday dirfd fcntl])
625
626 have_atfile_source="${ac_cv_func_fstatat}"
627 AC_DEFINE_IF([HAVE_ATFILE_SOURCE],
628    [test "x${have_atfile_source}" = "xyes"],
629    [1], [Use fstatat and other -at file functions])
630
631
632
633 ######################  EFL  ######################
634
635 want_libeeze="yes"
636 AC_ARG_ENABLE([libeeze],
637    [AS_HELP_STRING([--disable-libeeze],[disable Eeze device library @<:@default=enable@:>@])],
638    [
639     if test "x${enableval}" = "xyes"; then
640        want_libeeze="yes"
641     else
642        want_libeeze="no"
643        CFOPT_WARNING="yes"
644     fi
645    ])
646
647 build_libeeze="yes"
648 if test "x${want_libeeze}" = "xyes" ; then
649     if test "x${have_linux}" = "xyes" ; then
650         build_libeeze="yes"
651     else
652         build_libeeze="no"
653         want_libeeze="no"
654         CFOPT_WARNING="yes"
655     fi
656 else
657     build_libeeze="no"
658 fi
659
660 AC_ARG_ENABLE([systemd],
661    [AS_HELP_STRING([--enable-systemd],[Enable systemd support. @<:@default=disabled@:>@])],
662    [
663     if test "x${enableval}" = "xyes" ; then
664        want_systemd="yes"
665     else
666        want_systemd="no"
667     fi
668    ], [
669     want_systemd="no"
670    ])
671
672 systemd_dbus_prefix="# "
673 if test "${want_systemd}" = "yes"; then
674    systemd_dbus_prefix=""
675 fi
676 AC_SUBST(systemd_dbus_prefix)
677
678 AC_ARG_WITH([systemdunitdir],
679          AS_HELP_STRING([--with-systemdunitdir=DIR],[path to systemd user services directory]),
680          [USER_SESSION_DIR=${withval}])
681 if test "$want_systemd" == "no"; then
682   have_systemd_user_session="no"
683 elif test -n "${USER_SESSION_DIR}"; then
684   have_systemd_user_session="yes"
685   AC_MSG_NOTICE([Using systemd user services directory as ${USER_SESSION_DIR}])
686 else
687   # Detect systemd user session directory properly
688   EFL_PKG_CHECK_VAR([USER_SESSION_DIR], [systemd >= 192], [systemduserunitdir],
689         [have_systemd_user_session="yes"], [have_systemd_user_session="no"])
690
691   if test "$want_systemd" = "yes" -a "$have_systemd_user_session" = "no"; then
692      AC_MSG_ERROR([systemd support wanted, but systemd was not found.])
693   fi
694 fi
695
696 AM_CONDITIONAL([HAVE_SYSTEMD_USER_SESSION], [test "x${have_systemd_user_session}" = "xyes"])
697 AC_SUBST([USER_SESSION_DIR])
698
699 if test "x${have_systemd_pkg}" = "xauto" -o "x${have_systemd_pkg}" = "xyes"; then
700    PKG_CHECK_MODULES([SYSTEMD], [libsystemd-daemon >= 192 libsystemd-journal >= 192],
701    [have_systemd_pkg="yes"],
702    [have_systemd_pkg="no"])
703 fi
704
705 PKG_CHECK_MODULES(SYSTEMD_LOGIN, [libsystemd-login >= 198],
706                   [have_systemd_login=yes], [have_systemd_login=no])
707 AS_IF([test "x$have_systemd_login" = "xyes"],
708       [AC_DEFINE([HAVE_SYSTEMD_LOGIN], [1], [Have systemd-login])])
709 AM_CONDITIONAL(HAVE_SYSTEMD_LOGIN, test "x$have_systemd_login" = "xyes")
710
711 # check for systemd library if requested
712 if test "x${want_systemd}" = "xyes" -a "x${have_systemd_pkg}" = "xno"; then
713    AC_MSG_ERROR([Systemd dependency requested but not found])
714 fi
715
716 AM_CONDITIONAL([WANT_SYSTEMD], [test "${want_systemd}" = "yes"])
717
718 #### Platform-dependent
719 DL_LIBS=""
720 DL_INTERNAL_LIBS=""
721
722 #### Evil
723 EFL_LIB_START_OPTIONAL([Evil], [test "${have_windows}" = "yes"])
724
725 ### Default values
726
727 ### Additional options to configure
728 EFL_SELECT_WINDOWS_VERSION
729
730 ### Checks for programs
731
732 ### Checks for libraries
733
734 EFL_ADD_LIBS([EVIL], [-lole32 -lws2_32 -lsecur32 -luuid])
735 EVIL_DLFCN_LIBS="-lpsapi"
736
737 AC_SUBST([EVIL_DLFCN_LIBS])
738
739 ### Checks for header files
740
741 ### Checks for types
742
743 ### Checks for structures
744
745 ### Checks for compiler characteristics
746
747 EVIL_DLFCN_CPPFLAGS="-DEFL_EVIL_DLFCN_BUILD -DPSAPI_VERSION=1"
748 # TODO: should we have these at EFL (global?)
749 # Note: these warnings should not be used with C++ code
750 EVIL_CFLAGS_WRN="-Wdeclaration-after-statement -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls"
751 EVIL_CXXFLAGS="${EVIL_CXXFLAGS}"
752
753 if test "x${have_win32}" = "xyes" ; then
754    EVIL_CFLAGS="-DSECURITY_WIN32 ${EVIL_CFLAGS}"
755    EVIL_CXXFLAGS="-fno-rtti -fno-exceptions -DSECURITY_WIN32 ${EVIL_CXXFLAGS}"
756 fi
757
758 AC_SUBST([EVIL_DLFCN_CPPFLAGS])
759 AC_SUBST([EVIL_CFLAGS_WRN])
760 AC_SUBST([EVIL_CXXFLAGS])
761
762 ### Checks for linker characteristics
763
764 ### Checks for library functions
765
766 DL_LIBS="lib/evil/libdl.la"
767 DL_INTERNAL_LIBS="lib/evil/libdl.la"
768
769 EFL_LIB_END_OPTIONAL([Evil])
770
771 AC_SUBST([USE_EVIL_CFLAGS])
772 AC_SUBST([USE_EVIL_LIBS])
773 #### End of Evil
774
775
776 #### Escape
777 EFL_LIB_START_OPTIONAL([Escape], [test "${have_ps3}" = "yes"])
778
779 ### Additional options to configure
780
781 ### Default values
782
783 ### Checks for programs
784
785 ### Checks for libraries
786 EFL_ADD_LIBS([ESCAPE], [-llv2 -lm -lnet -lsysmodule -liberty])
787
788 ### Checks for header files
789
790 ### Checks for types
791
792 ### Checks for structures
793
794 ### Checks for compiler characteristics
795
796 ### Checks for linker characteristics
797
798 ### Checks for library functions
799
800 EFL_LIB_END_OPTIONAL([Escape])
801 #### End of Escape
802
803 EFL_CHECK_FUNC([SHM], [shm_open])
804 SHM_LIBS="${requirements_libs_shm}"
805 AC_SUBST([SHM_LIBS])
806
807 AC_SUBST([DL_LIBS])
808 AC_SUBST([DL_INTERNAL_LIBS])
809 #### End of Platform-dependent
810
811
812 #### Eina
813
814 EFL_LIB_START([Eina])
815
816 ### Default values
817
818 have_safety_checks="yes"
819 want_log="yes"
820 case "${build_profile}" in
821    dev)
822      with_max_log_level=""
823      have_stringshare_usage="no"
824      want_valgrind="auto"
825      want_debug_malloc="no"
826      want_debug_threads="no"
827      want_default_mempool="no"
828      want_cow_magic="no"
829      ;;
830
831    debug)
832      with_max_log_level=""
833      have_stringshare_usage="yes"
834      want_valgrind="auto"
835      want_debug_malloc="yes"
836      want_debug_threads="yes"
837      want_default_mempool="yes"
838      want_cow_magic="yes"
839      ;;
840
841    release)
842      with_max_log_level="3"
843      have_stringshare_usage="no"
844      want_valgrind="no"
845      want_debug_malloc="no"
846      want_debug_threads="no"
847      want_default_mempool="no"
848      want_cow_magic="no"
849      ;;
850 esac
851
852 EINA_CONFIG([HAVE_ALLOCA_H], [test "x${ac_cv_working_alloca_h}" = "xyes"])
853 EINA_CONFIG([SAFETY_CHECKS], [test "x${have_safety_checks}" = "xyes"])
854 EINA_CONFIG([DEFAULT_MEMPOOL], [test "x${want_default_mempool}" = "xyes"])
855
856 if test -n "${with_max_log_level}"; then
857    AC_MSG_NOTICE([ignoring any EINA_LOG() with level greater than ${with_max_log_level}])
858    AC_DEFINE_UNQUOTED([EINA_LOG_LEVEL_MAXIMUM], [${with_max_log_level}], [if set, logging is limited to this amount.])
859 fi
860
861 AC_DEFINE_IF([EINA_STRINGSHARE_USAGE],
862    [test "x${have_stringshare_usage}" = "xyes"],
863    [1], [Report Eina stringshare usage pattern])
864
865 ### Additional options to configure
866 AC_ARG_ENABLE([magic-debug],
867    [AS_HELP_STRING([--disable-magic-debug],[disable magic debug of eina structure @<:@default=enabled@:>@])],
868    [
869     if test "x${enableval}" = "xyes" ; then
870        have_magic_debug="yes"
871     else
872        have_magic_debug="no"
873     fi
874    ],
875    [have_magic_debug="yes"])
876
877 EINA_CONFIG([MAGIC_DEBUG], [test "x${have_magic_debug}" = "xyes"])
878
879 AC_ARG_WITH([xattr-tests-path],
880    [AS_HELP_STRING([--with-xattr-tests-path=DIR],[path of xattr enabled directory to create test files])],[XATTR_TEST_DIR=${withval}][AC_DEFINE_UNQUOTED([XATTR_TEST_DIR],["$withval"], [xattr enabled directory])])
881
882 ### Checks for programs
883
884 ### Checks for libraries
885 EFL_PLATFORM_DEPEND([EINA], [all])
886
887 EFL_ADD_LIBS([EINA], [-lm])
888
889 ## Options
890
891 # Valgrind
892 AC_ARG_ENABLE([valgrind],
893    [AS_HELP_STRING([--disable-valgrind],[enable valgrind mempool declaration. @<:@default=disabled@:>@])],
894    [
895     if test "x${enableval}" = "xyes" ; then
896        want_valgrind="yes"
897     else
898        want_valgrind="no"
899     fi
900    ])
901
902 if test "${want_valgrind}" = "auto"; then
903    PKG_CHECK_EXISTS([valgrind >= 2.4.0], [want_valgrind="yes"],
904       [want_valgrind="no"
905        AC_MSG_WARN([valgrind support desired by --with-profile=${build_profile} but not found. If your platform supports it, install valgrind.])])
906 fi
907
908 if test "${want_valgrind}" = "no"; then
909     AC_DEFINE([NVALGRIND], [1], [Valgrind support disabled])
910 else
911     PKG_CHECK_MODULES([VALGRIND], [valgrind >= 2.4.0])
912     AC_DEFINE([HAVE_VALGRIND], [1], [Valgrind support enabled])
913 fi
914
915 AC_DEFINE_IF([EINA_DEBUG_MALLOC],
916    [test "x${ac_cv_func_malloc_usable_size}" = "xyes" && test "x${want_debug_malloc}" = "xyes"],
917    [1], [Turn on debugging overhead in mempool])
918
919 AC_DEFINE_IF([EINA_COW_MAGIC_ON],
920    [test "x${want_cow_magic}" = "xyes" ],
921    [1], [Turn on Eina_Magic in Eina_Cow])
922
923 EFL_OPTIONAL_DEPEND_PKG([EINA], [${want_systemd}], [SYSTEMD], [libsystemd-journal])
924
925 EFL_EVAL_PKGS([EINA])
926
927 ## Examples
928
929 ## Benchmarks
930
931 PKG_CHECK_MODULES([GLIB],
932    [glib-2.0],
933    [have_glib="yes"],
934    [have_glib="no"])
935
936 if test "x${have_glib}" = "xyes" ; then
937    GLIB_CFLAGS="${GLIB_CFLAGS} -DEINA_BENCH_HAVE_GLIB"
938 fi
939
940 ### Checks for header files
941
942 # sys/mman.h could be provided by evil/escape/exotic so we need to set CFLAGS accordingly
943 CFLAGS_save="${CFLAGS}"
944 CFLAGS="${CFLAGS} ${EINA_CFLAGS}"
945 AC_CHECK_HEADERS([sys/mman.h])
946 CFLAGS="${CFLAGS_save}"
947
948 AC_CHECK_HEADER([byteswap.h], [have_byteswap="yes"], [have_byteswap="no"])
949
950 ### Checks for types
951
952 EINA_CONFIG([HAVE_DIRENT_H], [test "x${have_dirent}" = "xyes"])
953 AC_DEFINE_IF([HAVE_DIRENT_H], [test "x${have_dirent}" = "xyes"],
954    [1], [Define to 1 if you have a valid <dirent.h> header file.])
955
956 ### Checks for structures
957
958 ### Checks for compiler characteristics
959 EINA_CONFIG([HAVE_BYTESWAP_H], [test "x${have_byteswap}" = "xyes"])
960
961 EFL_CHECK_GCC_BUILTIN([bswap16], [HAVE_BSWAP16])
962 EFL_CHECK_GCC_BUILTIN([bswap32], [HAVE_BSWAP32])
963 EFL_CHECK_GCC_BUILTIN([bswap64], [HAVE_BSWAP64])
964
965 ### Checks for linker characteristics
966
967 ### Checks for library functions
968
969 AC_CHECK_FUNCS([fchmod])
970
971 EFL_CHECK_FUNCS([EINA], [dlopen dladdr iconv shm_open splice setxattr getpagesize])
972
973 enable_log="no"
974 if test "x${efl_func_fnmatch}" = "xyes" && test "x${want_log}" = "xyes" ; then
975    enable_log="yes"
976 fi
977
978 AC_MSG_CHECKING([wether to build Eina_Log infrastructure])
979 AC_MSG_RESULT([${enable_log}])
980
981 EINA_CONFIG([ENABLE_LOG], [test "x${enable_log}" = "xyes"])
982
983 EFL_CHECK_THREADS
984 if test "x${efl_have_threads}" = "xno"; then
985    CFOPT_WARNING="xyes"
986 fi
987
988 EFL_ADD_PUBLIC_LIBS([EINA], [${EFL_PTHREAD_LIBS}])
989 EFL_ADD_CFLAGS([EINA], [${EFL_PTHREAD_CFLAGS}])
990
991 EINA_CONFIG([HAVE_PTHREAD_BARRIER], [test "x${efl_have_pthread_barrier}" = "xyes"])
992 EINA_CONFIG([HAVE_PTHREAD_AFFINITY], [test "x${efl_have_setaffinity}" = "xyes"])
993 EINA_CONFIG([HAVE_DEBUG_THREADS], [test "x${want_debug_threads}" = "xyes"])
994 EINA_CONFIG([HAVE_POSIX_SPINLOCK], [test "x${efl_have_posix_threads_spinlock}" = "xyes"])
995 EINA_CONFIG([HAVE_OSX_SPINLOCK], [test "x${efl_have_osx_spinlock}" = "xyes"])
996 EINA_CONFIG([HAVE_OSX_SEMAPHORE], [test "x${have_darwin}" = "xyes"])
997
998 ### Modules
999
1000 EINA_CHECK_MODULE([chained-pool], [static], [chained pool])
1001 EINA_CHECK_MODULE([pass-through], [static], [pass through])
1002 EINA_CHECK_MODULE([one-big],      [static], [one big])
1003
1004 EFL_ADD_FEATURE([EINA], [systemd-journal], [${want_systemd}])
1005
1006 EFL_LIB_END([Eina])
1007 #### End of Eina
1008
1009 #### Eina CXX
1010 EFL_LIB_START([Eina_Cxx])
1011
1012 EFL_CXX_COMPILE_STDCXX_11([ext])
1013 AC_ARG_ENABLE([cxx-bindings],
1014    [AS_HELP_STRING([--disable-cxx-bindings],[disable C++11 bindings. @<:@default=enabled@:>@])],
1015    [want_cxx11="${enableval}"], [want_cxx11="yes"])
1016
1017 if test "x${HAVE_CXX11}" = "x1" -a "x${want_cxx11}" = "xyes"; then
1018   have_cxx11="yes"
1019 else
1020   have_cxx11="no"
1021 fi
1022
1023 AM_CONDITIONAL([HAVE_CXX11], [test "x${have_cxx11}" = "xyes"])
1024
1025 EFL_INTERNAL_DEPEND_PKG([EINA_CXX], [Eina])
1026 EFL_ADD_CFLAGS([EINA_CXX], [${EFL_PTHREAD_CFLAGS}])
1027 EFL_EVAL_PKGS([EINA_CXX])
1028
1029 EFL_LIB_END([Eina_Cxx])
1030 #### End of Eina CXX
1031
1032 #### Eo
1033
1034 EFL_LIB_START([Eo])
1035
1036 ### Default values
1037
1038 ### Additional options to configure
1039
1040 ### Checks for programs
1041
1042 ## Compatibility layers
1043 EFL_PLATFORM_DEPEND([EO], [evil])
1044
1045 ### Checks for libraries
1046 EFL_INTERNAL_DEPEND_PKG([EO], [eina])
1047
1048 # Example (evas one)
1049
1050 # TODO: add once elementary is merged
1051 #PKG_CHECK_MODULES([ELM], [elementary >= 1.7.0], [have_elm="yes"], [have_elm="no"])
1052 AM_CONDITIONAL([EO_BUILD_EXAMPLE_EVAS], [test "x${have_elm}" = "xyes"])
1053
1054 ### Checks for header files
1055
1056 ### Checks for types
1057
1058 ### Checks for structures
1059
1060 ### Checks for compiler characteristics
1061
1062 ### Checks for linker characteristics
1063
1064 ### Checks for library functions
1065 EFL_CHECK_FUNCS([EO], [dladdr])
1066
1067 ### Check availability
1068
1069 EFL_LIB_END([Eo])
1070 #### End of Eo
1071
1072 #### Eet CXX
1073 EFL_LIB_START([Eet_Cxx])
1074
1075 EFL_INTERNAL_DEPEND_PKG([EET_CXX], [Eina_Cxx])
1076 EFL_INTERNAL_DEPEND_PKG([EET_CXX], [Eet])
1077
1078 EFL_EVAL_PKGS([EET_CXX])
1079
1080 EFL_LIB_END([Eet_Cxx])
1081 #### End of Eet CXX
1082
1083 #### Emile
1084
1085 EFL_LIB_START([Emile])
1086
1087 ### Default values
1088
1089 ### Additional options to configure
1090
1091 ### Checks for programs
1092
1093 ### Checks for libraries
1094
1095 EFL_CHECK_LIBS([EMILE], [libjpeg])
1096
1097 ## Compatibility layers
1098 EFL_PLATFORM_DEPEND([EMILE], [evil])
1099
1100 EFL_ADD_LIBS([EMILE], [-lm])
1101
1102 # Cryptography support
1103 if test "$build_crypto" != "none" ; then
1104    AC_DEFINE([HAVE_CIPHER], [1], [Have cipher support built in emile])
1105    AC_DEFINE([HAVE_SIGNATURE], [1], [Have signature support in emile])
1106    EFL_CRYPTO_DEPEND([EMILE])
1107 fi
1108
1109 EFL_CHECK_LIBS([EMILE], [zlib])
1110
1111 EFL_INTERNAL_DEPEND_PKG([EMILE], [eina])
1112
1113 EFL_EVAL_PKGS([EMILE])
1114
1115 ### Checks for header files
1116
1117 ### Checks for types
1118
1119 ### Checks for structures
1120
1121 ### Checks for compiler characteristics
1122
1123 ### Checks for linker characteristics
1124
1125 ### Checks for library functions
1126
1127 ### Check availability
1128
1129 EFL_ADD_FEATURE([EMILE], [crypto], [${build_crypto}])
1130
1131 EFL_LIB_END([Emile])
1132 #### End of Emile
1133
1134
1135 #### Eet
1136
1137 EFL_LIB_START([Eet])
1138
1139 ### Default values
1140
1141 ### Additional options to configure
1142
1143 ### Checks for programs
1144
1145 ### Checks for libraries
1146
1147 EFL_CHECK_LIBS([EET], [libjpeg])
1148
1149 ## Compatibility layers
1150 EFL_PLATFORM_DEPEND([EET], [evil])
1151
1152 EFL_ADD_LIBS([EET], [-lm])
1153
1154 # Cryptography support
1155 if test "$build_crypto" != "none" ; then
1156    AC_DEFINE([HAVE_CIPHER], [1], [Have cipher support built in eet])
1157    AC_DEFINE([HAVE_SIGNATURE], [1], [Have signature support for eet file])
1158    EFL_CRYPTO_DEPEND([EET])
1159 fi
1160
1161 EFL_INTERNAL_DEPEND_PKG([EET], [eina])
1162 EFL_INTERNAL_DEPEND_PKG([EET], [emile])
1163
1164 EFL_EVAL_PKGS([EET])
1165
1166 ### Checks for header files
1167
1168 ### Checks for types
1169
1170 ### Checks for structures
1171
1172 ### Checks for compiler characteristics
1173
1174 ### Checks for linker characteristics
1175
1176 ### Checks for library functions
1177
1178 ### Check availability
1179
1180 EFL_LIB_END([Eet])
1181 #### End of Eet
1182
1183 #### Eo CXX
1184 EFL_LIB_START([Eo_Cxx])
1185
1186 EFL_EVAL_PKGS([EO_CXX])
1187
1188 EFL_LIB_END([Eo_Cxx])
1189 #### End of Eo CXX
1190
1191 #### Eolian
1192
1193 EFL_LIB_START([Eolian])
1194
1195 ### Default values
1196
1197 ### Additional options to configure
1198 EFL_ADD_FEATURE([EOLIAN], [cxx], [${have_cxx11}])
1199
1200 ### Checks for programs
1201
1202 ## Compatibility layers
1203 EFL_PLATFORM_DEPEND([EOLIAN], [evil])
1204
1205 ### Checks for libraries
1206 EFL_INTERNAL_DEPEND_PKG([EOLIAN], [eina])
1207
1208 ### Checks for header files
1209
1210 ### Checks for types
1211
1212 ### Checks for structures
1213
1214 ### Checks for compiler characteristics
1215
1216 ### Checks for linker characteristics
1217
1218 ### Checks for library functions
1219
1220 ### Check availability
1221
1222 EFL_LIB_END([Eolian])
1223 #### End of Eolian
1224
1225 EFL_LIB_START([Eolian_Cxx])
1226 ### Default values
1227
1228 ### Additional options to configure
1229
1230 ### Checks for programs
1231
1232 ## Compatibility layers
1233
1234 ### Checks for libraries
1235 EFL_INTERNAL_DEPEND_PKG([EOLIAN_CXX], [eina])
1236 EFL_INTERNAL_DEPEND_PKG([EOLIAN_CXX], [eo])
1237
1238 ### Checks for header files
1239
1240 ### Checks for types
1241
1242 ### Checks for structures
1243
1244 ### Checks for compiler characteristics
1245
1246 ### Checks for linker characteristics
1247
1248 ### Checks for library functions
1249
1250 ### Check availability
1251 EFL_LIB_END([Eolian_Cxx])
1252
1253 #### Efl
1254
1255 EFL_LIB_START([Efl])
1256
1257 EFL_PLATFORM_DEPEND([EFL], [evil])
1258 EFL_INTERNAL_DEPEND_PKG([EFL], [eina])
1259 EFL_INTERNAL_DEPEND_PKG([EFL], [eo])
1260
1261 EFL_ADD_LIBS([EFL], [-lm])
1262
1263 EFL_LIB_END([Efl])
1264 #### End of Efl
1265
1266 #### Ector
1267
1268 EFL_LIB_START([Ector])
1269
1270
1271 ### Default values
1272
1273 ### Additional options to configure
1274
1275 ### Checks for programs
1276
1277 ### Checks for libraries
1278
1279 ## Compatibility layers
1280
1281 EFL_PLATFORM_DEPEND([ECTOR], [evil])
1282
1283 EFL_INTERNAL_DEPEND_PKG([ECTOR], [eina])
1284 EFL_INTERNAL_DEPEND_PKG([ECTOR], [eo])
1285 EFL_INTERNAL_DEPEND_PKG([ECTOR], [efl])
1286
1287 EFL_ADD_LIBS([ECTOR], [-lm])
1288
1289 EFL_EVAL_PKGS([ECTOR])
1290
1291 ### Checks for header files
1292
1293 ### Checks for types
1294
1295 ### Checks for structures
1296
1297 ### Checks for compiler characteristics
1298
1299 ### Checks for linker characteristics
1300
1301 ### Checks for library functions
1302
1303 ### Check availability
1304
1305 EFL_LIB_END([ECTOR])
1306
1307 #### End of Ector
1308
1309 #### Evas
1310
1311 EFL_LIB_START([Evas])
1312
1313 ### Additional options to configure
1314
1315 # X11
1316 AC_ARG_WITH([x11],
1317    [AS_HELP_STRING([--with-x11=xlib|xcb|none],[X11 method to use: xlib, xcb or none])])
1318
1319 if test "x${have_windows}" = "xyes" || test "x${have_ps3}" = "xyes"; then
1320    with_x11="none"
1321 elif test "x${with_x11}" = "x"; then
1322    with_x11="xlib"
1323 fi
1324
1325 want_x11_xlib="no"
1326 want_x11_xcb="no"
1327 want_x11_none="no"
1328 want_x11_any="no"
1329 case "${with_x11}" in
1330    xlib)
1331      want_x11_xlib="yes"
1332      want_x11_any="yes"
1333      ;;
1334    xcb)
1335      want_x11_xcb="yes"
1336      want_x11_any="yes"
1337      CFOPT_WARNING="xyes"
1338      ;;
1339    none)
1340      want_x11_none="yes"
1341      ;;
1342    *)
1343      AC_MSG_ERROR([Unknown build x11 --with-x11=${with_x11}])
1344      ;;
1345 esac
1346
1347 # OpenGL
1348 AC_ARG_WITH([opengl],
1349    [AS_HELP_STRING([--with-opengl=full|es|none],[OpenGL method to use: full, es or none])])
1350
1351 if test "x${have_windows}" = "xyes" || test "x${have_ps3}" = "xyes"; then
1352    with_opengl="none"
1353 elif test "x${with_opengl}" = "x"; then
1354    with_opengl="full"
1355 fi
1356
1357 case "${with_opengl}" in
1358    full|es|none)
1359      ;;
1360    *)
1361      AC_MSG_ERROR([Unknown build opengl --with-opengl=${with_opengl}])
1362      ;;
1363 esac
1364
1365 want_x11_xlib_opengl="no"
1366 want_x11_xcb_opengl="no"
1367 if test "${with_opengl}" != "none"; then
1368    want_x11_xlib_opengl="${want_x11_xlib}"
1369    want_x11_xcb_opengl="${want_x11_xcb}"
1370    want_x11_any_opengl="${want_x11_any}"
1371 fi
1372
1373 # Wayland
1374 AC_ARG_ENABLE([wayland],
1375    [AS_HELP_STRING([--enable-wayland],[enable wayland display server. @<:@default=disabled@:>@])],
1376    [
1377     if test "x${enableval}" = "xyes" ; then
1378        want_wayland="yes"
1379     else
1380        want_wayland="no"
1381     fi
1382    ],
1383    [want_wayland="no"])
1384
1385 if test "${want_wayland}" = "yes"; then
1386    EFL_PKG_CHECK_STRICT([wayland-client >= 1.3.0])
1387 fi
1388
1389 # Wayland IVI-Shell
1390 AC_ARG_ENABLE([wayland-ivi-shell],
1391    [AS_HELP_STRING([--enable-wayland-ivi-shell],[enable ivi-shell support. @<:@default=disabled@:>@])],
1392    [
1393     if test "x${enableval}" = "xyes" ; then
1394        want_wayland_ivi_shell="yes"
1395     else
1396        want_wayland_ivi_shell="no"
1397     fi
1398    ],
1399    [want_wayland_ivi_shell="no"])
1400
1401 # Fb
1402 AC_ARG_ENABLE([fb],
1403    [AS_HELP_STRING([--enable-fb],[enable raw Framebuffer access. @<:@default=disabled@:>@])],
1404    [
1405     if test "x${enableval}" = "xyes" ; then
1406        want_fb="yes"
1407     else
1408        want_fb="no"
1409     fi
1410    ],
1411    [want_fb="no"])
1412
1413 # SDL
1414 AC_ARG_ENABLE([sdl],
1415    [AS_HELP_STRING([--enable-sdl],[enable SDL support. @<:@default=disabled@:>@])],
1416    [
1417     if test "x${enableval}" = "xyes" ; then
1418        want_sdl="yes"
1419     else
1420        want_sdl="no"
1421     fi
1422    ],
1423    [want_sdl="no"])
1424
1425 if test "${want_sdl}" = "yes"; then
1426    EFL_PKG_CHECK_STRICT([sdl2 >= 2.0.0])
1427 fi
1428
1429 # We only enable SDL with opengl if it is not the full version and not ES
1430 # This can be changed if we ported our SDL code over to SDL 2.0. For older
1431 # versions the SDL_opengles.h has never been released.
1432 want_gl_sdl="no"
1433 if test "${want_sdl}" = "yes" && test "${with_opengl}" = "es"; then
1434    AC_MSG_ERROR([We currently do not support SDL with OpenGL ES. Please consider full OpenGL if you want to use it with SDL.])
1435 fi
1436 if test "${want_sdl}" = "yes" && test "${with_opengl}" = "full"; then
1437    want_gl_sdl="yes"
1438 fi
1439
1440 # Cocoa
1441 AC_ARG_ENABLE([cocoa],
1442     [AS_HELP_STRING([--enable-cocoa],[enable MacOS X Cocoa . @<:@default=disabled@:>@])],
1443     [
1444      if test "x${enableval}" = "xyes" ; then
1445         want_cocoa="yes"
1446      else
1447         want_cocoa="no"
1448      fi
1449     ],
1450     [want_cocoa="no"])
1451
1452 if test "${want_cocoa}" = "yes"; then
1453    #test cocoa requirements (objc and Cocoa/Cocoa.h)
1454     cocoa_ldflags=""
1455     have_cocoa="no"
1456     m4_ifdef([AC_PROG_OBJC],
1457       [
1458        if test "x${have_gnu_objc}" = "xyes" ; then
1459           AC_LANG_PUSH([Objective C])
1460           LIBS_save="$LIBS"
1461           LIBS="$LIBS -framework Cocoa"
1462           AC_LINK_IFELSE(
1463              [AC_LANG_PROGRAM(
1464                  [[
1465 #include <Cocoa/Cocoa.h>
1466                  ]],
1467                  [[
1468 NSWindow *window;
1469 window = [[NSWindow alloc]
1470            initWithContentRect:NSMakeRect(0, 0, 1, 1)
1471            styleMask:(NSTitledWindowMask)
1472            backing:NSBackingStoreBuffered
1473            defer:NO
1474            screen:nil
1475          ];
1476                  ]])],
1477              [
1478               have_cocoa="yes"
1479               cocoa_ldflags="-framework Cocoa"
1480              ],
1481              [have_cocoa="no"])
1482           LIBS="$LIBS_save"
1483           AC_MSG_CHECKING([whether Cocoa framework is supported])
1484           AC_MSG_RESULT([${have_cocoa}])
1485           AC_LANG_POP([Objective C])
1486        fi
1487    ])
1488 fi
1489 AC_SUBST(cocoa_ldflags)
1490
1491 if test "x${want_cocoa}" = "xyes"; then
1492     #test cocoa requirements (objc and Cocoa/Cocoa.h)
1493     cocoa_coreservices_ldflags=""
1494     have_cocoa_coreservices="no"
1495     m4_ifdef([AC_PROG_OBJC],
1496       [
1497        if test "x${have_gnu_objc}" = "xyes" ; then
1498           AC_LANG_PUSH([Objective C])
1499           LIBS_save="$LIBS"
1500           LIBS="$LIBS -framework CoreServices"
1501           AC_LINK_IFELSE(
1502              [AC_LANG_PROGRAM(
1503                  [[
1504 #include <CoreServices/CoreServices.h>
1505                  ]],
1506                  [[
1507 //test function here
1508                  ]])],
1509              [
1510               have_cocoa_coreservices="yes"
1511               cocoa_coreservices_ldflags="-framework CoreServices"
1512              ],
1513              [have_cocoa_coreservices="no"])
1514           LIBS="$LIBS_save"
1515           AC_MSG_CHECKING([whether Cocoa CoreServices framework is supported])
1516           AC_MSG_RESULT([${have_cocoa_coreservices}])
1517           AC_LANG_POP([Objective C])
1518        fi
1519    ])
1520 fi
1521 AC_SUBST(cocoa_coreservices_ldflags)
1522
1523 # Drm
1524 AC_ARG_ENABLE([drm],
1525    [AS_HELP_STRING([--enable-drm],[enable drm engine. @<:@default=disabled@:>@])],
1526    [
1527     if test "x${enableval}" = "xyes" ; then
1528        want_drm="yes"
1529     else
1530        want_drm="no"
1531     fi
1532    ],
1533    [want_drm="no"])
1534
1535
1536 AC_ARG_ENABLE([gl-drm],
1537    [AC_HELP_STRING([--enable-gl-drm],
1538        [enable gl drm engine. @<:@default=disabled@:>@])],
1539    [
1540     if test "x${enableval}" = "xyes" ; then
1541        want_gl_drm="yes"
1542     else
1543        want_gl_drm="no"
1544     fi
1545    ],
1546    [want_gl_drm="no"])
1547 # Fontconfig
1548 AC_ARG_ENABLE([fontconfig],
1549    [AS_HELP_STRING([--disable-fontconfig],[disable fontconfig for finding fonts. @<:@default=enabled@:>@])],
1550    [
1551     if test "x${enableval}" = "xyes" ; then
1552        want_fontconfig="yes"
1553     else
1554        want_fontconfig="no"
1555        CFOPT_WARNING="xyes"
1556     fi
1557    ],
1558    [want_fontconfig="yes"])
1559
1560 # Fribidi
1561 AC_ARG_ENABLE([fribidi],
1562    [AS_HELP_STRING([--disable-fribidi],[disable bidirectional text support. @<:@default=enabled@:>@])],
1563    [
1564     if test "x${enableval}" = "xyes" ; then
1565        want_fribidi="yes"
1566     else
1567        want_fribidi="no"
1568        CFOPT_WARNING="xyes"
1569     fi
1570    ],
1571    [want_fribidi="yes"])
1572
1573 # Eo Id
1574 AC_ARG_ENABLE([eo_id],
1575    [AS_HELP_STRING([--disable-eo-id],[disable Eo indirection. @<:@default=enabled@:>@])],
1576    [
1577     if test "x${enableval}" = "xyes" ; then
1578        want_eo_id="yes"
1579     else
1580        want_eo_id="no"
1581        CFOPT_WARNING="xyes"
1582     fi
1583    ],
1584    [want_eo_id="yes"])
1585
1586 # Harfbuzz
1587 AC_ARG_ENABLE([harfbuzz],
1588    [AS_HELP_STRING([--enable-harfbuzz],[enable complex text shaping and layouting support. @<:@default=disabled@:>@])],
1589    [
1590     if test "x${enableval}" = "xyes" ; then
1591        want_harfbuzz="yes"
1592     else
1593        want_harfbuzz="no"
1594     fi
1595    ],
1596    [want_harfbuzz="no"])
1597
1598 # Egl
1599 AC_ARG_ENABLE([egl],
1600    [AS_HELP_STRING([--enable-egl],[enable EGL rendering. @<:@default=disabled@:>@])],
1601    [
1602     if test "x${enableval}" = "xyes" ; then
1603        want_egl="yes"
1604     else
1605        want_egl="no"
1606     fi
1607    ],
1608    [want_egl="no"])
1609
1610 # Pixman
1611 AC_ARG_ENABLE([pixman],
1612    [AS_HELP_STRING([--enable-pixman],[enable pixman for software rendering. @<:@default=disabled@:>@])],
1613    [
1614     if test "x${enableval}" = "xyes" ; then
1615        want_pixman="yes"
1616        CFOPT_WARNING="xyes"
1617     else
1618        want_pixman="no"
1619     fi
1620    ],
1621    [want_pixman="no"])
1622
1623 AC_ARG_ENABLE([pixman-font],
1624    [AS_HELP_STRING([--enable-pixman-font],[Allow pixman to render fonts. @<:@default=disabled@:>@])],
1625    [
1626     if test "x${enableval}" = "xyes" ; then
1627        have_pixman_font="yes"
1628     else
1629        have_pixman_font="no"
1630     fi
1631    ],
1632    [have_pixman_font="no"])
1633
1634 AC_ARG_ENABLE([pixman-rect],
1635    [AS_HELP_STRING([--enable-pixman-rect],[Allow pixman to render rects. @<:@default=disabled@:>@])],
1636    [
1637     if test "x${enableval}" = "xyes" ; then
1638        have_pixman_rect="yes"
1639     else
1640        have_pixman_rect="no"
1641     fi
1642    ],
1643    [have_pixman_rect="no"])
1644
1645 AC_ARG_ENABLE([pixman-line],
1646    [AS_HELP_STRING([--enable-pixman-line],[Allow pixman to render lines. @<:@default=disabled@:>@])],
1647    [
1648     if test "x${enableval}" = "xyes" ; then
1649        have_pixman_line="yes"
1650     else
1651        have_pixman_line="no"
1652     fi
1653    ],
1654    [have_pixman_line="no"])
1655
1656 AC_ARG_ENABLE(pixman-poly,
1657    AS_HELP_STRING([--enable-pixman-poly],[Allow pixman to render polys. @<:@default=disabled@:>@]),
1658    [
1659     if test "x${enableval}" = "xyes" ; then
1660        have_pixman_poly="yes"
1661     else
1662        have_pixman_poly="no"
1663     fi
1664    ],
1665    [have_pixman_poly="no"])
1666
1667 AC_ARG_ENABLE([pixman-image],
1668    [AS_HELP_STRING([--enable-pixman-image],[Allow pixman to render images. @<:@default=disabled@:>@])],
1669    [
1670     if test "x${enableval}" = "xyes" ; then
1671        have_pixman_image="yes"
1672     else
1673        have_pixman_image="no"
1674     fi
1675    ],
1676    [have_pixman_image="no"])
1677
1678 AC_ARG_ENABLE([pixman-image-scale-sample],
1679    [AS_HELP_STRING([--enable-pixman-image-scale-sample],[Allow pixman to render sampled scaled images. @<:@default=disabled@:>@])],
1680    [
1681     if test "x${enableval}" = "xyes" ; then
1682        have_pixman_image_scale_sample="yes"
1683     else
1684        have_pixman_image_scale_sample="no"
1685     fi
1686    ],
1687    [have_pixman_image_scale_sample="no"])
1688
1689 # Tile rotate
1690 AC_ARG_ENABLE([tile-rotate],
1691    [AS_HELP_STRING([--enable-tile-rotate],[Enable tiled rotate algorithm. @<:@default=disabled@:>@])],
1692    [
1693     if test "x${enableval}" = "xyes" ; then
1694        have_tile_rotate="yes"
1695        CFOPT_WARNING="xyes"
1696     else
1697        have_tile_rotate="no"
1698     fi
1699   ],
1700   [have_tile_rotate="no"])
1701
1702
1703 # Image Loaders
1704
1705 ARG_ENABLE_EVAS_IMAGE_LOADER(BMP, static)
1706 ARG_ENABLE_EVAS_IMAGE_LOADER(Eet, static)
1707 ARG_ENABLE_EVAS_IMAGE_LOADER(Generic, static)
1708 ARG_ENABLE_EVAS_IMAGE_LOADER(Gif, yes)
1709 ARG_ENABLE_EVAS_IMAGE_LOADER(ICO, static)
1710 ARG_ENABLE_EVAS_IMAGE_LOADER(JPEG, static)
1711 ARG_ENABLE_EVAS_IMAGE_LOADER(JP2K, auto)
1712 ARG_ENABLE_EVAS_IMAGE_LOADER(PMAPS, static)
1713 ARG_ENABLE_EVAS_IMAGE_LOADER(PNG, static)
1714 ARG_ENABLE_EVAS_IMAGE_LOADER(PSD, static)
1715 ARG_ENABLE_EVAS_IMAGE_LOADER(Tga, static)
1716 ARG_ENABLE_EVAS_IMAGE_LOADER(Tiff, yes)
1717 ARG_ENABLE_EVAS_IMAGE_LOADER(WBMP, static)
1718 ARG_ENABLE_EVAS_IMAGE_LOADER(WEBP, no)
1719 ARG_ENABLE_EVAS_IMAGE_LOADER(XPM, static)
1720 ARG_ENABLE_EVAS_IMAGE_LOADER(TGV, static)
1721 ARG_ENABLE_EVAS_IMAGE_LOADER(DDS, static)
1722
1723 ### Default values
1724
1725 want_evas_engine_software_gdi="${have_win32}"
1726 want_evas_engine_software_ddraw="${have_win32}"
1727 want_evas_engine_gl_cocoa="${want_cocoa}"
1728 want_evas_engine_wayland_egl="no"
1729 if test "${want_wayland}" = "yes" && test "${want_egl}" = "yes" && test "${with_opengl}" = "es"; then
1730    want_evas_engine_wayland_egl="yes"
1731 fi
1732
1733 if test "${want_lua_old}" = "yes"; then
1734    EFL_CHECK_LUA_OLD([EVAS])
1735 else
1736    EFL_DEPEND_PKG([EVAS], [LUAJIT], [luajit >= 2.0.0])
1737 fi
1738
1739 EFL_ADD_FEATURE([EVAS], [lua-old])
1740
1741 EFL_CHECK_FUNC([EVAS], [dlsym])
1742
1743 if test "x${efl_func_dlsym}" = "xno" && test "${with_opengl}" != "none"; then
1744    AC_MSG_ERROR([OpenGL cannot work without dlsym()])
1745 fi
1746
1747 ### Checks for programs
1748
1749 ### Checks for libraries
1750
1751 ## Compatibility layers
1752 EFL_PLATFORM_DEPEND([EVAS], [all])
1753 EFL_INTERNAL_DEPEND_PKG([EVAS], [eo])
1754 EFL_INTERNAL_DEPEND_PKG([EVAS], [eet])
1755 EFL_INTERNAL_DEPEND_PKG([EVAS], [eina])
1756 EFL_INTERNAL_DEPEND_PKG([EVAS], [efl])
1757 EFL_INTERNAL_DEPEND_PKG([EVAS], [emile])
1758 EFL_INTERNAL_DEPEND_PKG([EVAS], [ector])
1759
1760 EFL_ADD_LIBS([EVAS], [-lm])
1761
1762 # Freetype
1763 EFL_DEPEND_PKG([EVAS], [FREETYPE], [freetype2 >= 9.3.0])
1764
1765 ## optional dependencies
1766
1767 # FontConfig
1768 EFL_OPTIONAL_DEPEND_PKG([EVAS], [${want_fontconfig}],
1769    [FONTCONFIG], [fontconfig >= 2.5.0])
1770
1771 # fribidi support
1772 EFL_OPTIONAL_DEPEND_PKG([EVAS], [${want_fribidi}],
1773    [FRIBIDI], [fribidi >= 0.19.2])
1774
1775 # harfbuzz support
1776 have_harfbuzz_ft="no"
1777 EFL_OPTIONAL_DEPEND_PKG([EVAS], [${want_harfbuzz}],
1778    [HARFBUZZ], [harfbuzz >= 0.9.0])
1779
1780 # Pixman
1781 EFL_OPTIONAL_DEPEND_PKG([EVAS], [${want_pixman}], [PIXMAN], [pixman-1])
1782
1783 if test "x${have_pixman}" = "xyes" ; then
1784    if test "x${have_pixman_font}" = "xyes" ; then
1785       AC_DEFINE(PIXMAN_FONT, 1, [Allow pixman to render fonts])
1786    fi
1787    EFL_ADD_FEATURE([EVAS_PIXMAN], [font], [${have_pixman_font}])
1788
1789    if test "x${have_pixman_rect}" = "xyes" ; then
1790       AC_DEFINE(PIXMAN_RECT, 1, [Allow pixman to render rects])
1791    fi
1792    EFL_ADD_FEATURE([EVAS_PIXMAN], [rect], [${have_pixman_rect}])
1793
1794    if test "x${have_pixman_line}" = "xyes" ; then
1795       AC_DEFINE(PIXMAN_LINE, 1, [Allow pixman to render lines])
1796    fi
1797    EFL_ADD_FEATURE([EVAS_PIXMAN], [line], [${have_pixman_line}])
1798
1799    if test "x${have_pixman_poly}" = "xyes" ; then
1800       AC_DEFINE(PIXMAN_POLY, 1, [Allow pixman to render polys])
1801    fi
1802    EFL_ADD_FEATURE([EVAS_PIXMAN], [poly], [${have_pixman_poly}])
1803
1804    if test "x${have_pixman_image}" = "xyes" ; then
1805       AC_DEFINE(PIXMAN_IMAGE, 1, [Allow pixman to render images])
1806    fi
1807    EFL_ADD_FEATURE([EVAS_PIXMAN], [image], [${have_pixman_image}])
1808
1809    if test "x${have_pixman_image_scale_sample}" = "xyes" ; then
1810       AC_DEFINE(PIXMAN_IMAGE_SCALE_SAMPLE, 1, [Allow pixman to render image sampled scaling])
1811    fi
1812    EFL_ADD_FEATURE([EVAS_PIXMAN], [scale_sample], [${have_pixman_scale_sample}])
1813 fi
1814
1815 ## Engines
1816
1817 define([EVAS_ENGINE_DEP_CHECK_FB], [
1818 AC_CHECK_HEADER([linux/fb.h], [:], [AC_MSG_ERROR([Missing linux/fb.h])])
1819 ])
1820
1821 define([EVAS_ENGINE_DEP_CHECK_PSL1GHT], [
1822 AC_CHECK_HEADER([rsx/rsx.h], [:], [AC_MSG_ERROR([Missing rsx/rsx.h])])
1823 ])
1824
1825 EVAS_ENGINE([buffer], [static])
1826 EVAS_ENGINE([fb], [${want_fb}], [EVAS_ENGINE_DEP_CHECK_FB])
1827 EVAS_ENGINE([psl1ght], [${have_ps3}], [EVAS_ENGINE_DEP_CHECK_PSL1GHT])
1828
1829 # XXX TODO:
1830 EVAS_CHECK_ENGINE([gl-cocoa], [${want_evas_engine_gl_cocoa}], [no], [OpenGL Cocoa])
1831 EVAS_CHECK_ENGINE([gl-sdl], [${want_gl_sdl}], [no], [OpenGL SDL])
1832 EVAS_CHECK_ENGINE([software-gdi], [${want_evas_engine_software_gdi}], [no], [Software GDI])
1833 EVAS_CHECK_ENGINE([software-ddraw], [${want_evas_engine_software_ddraw}], [no], [Software DirectDraw])
1834 EVAS_CHECK_ENGINE([wayland-egl], [${want_evas_engine_wayland_egl}], [no], [Wayland Egl])
1835 EVAS_CHECK_ENGINE([wayland-shm], [${want_wayland}], [no], [Wayland Shm])
1836 EVAS_CHECK_ENGINE([drm], [${want_drm}], [no], [Drm])
1837 EVAS_CHECK_ENGINE([gl-drm], [${want_gl_drm}], [no], [OpenGL Drm])
1838
1839
1840 # Software XCB
1841
1842 have_evas_engine_software_xcb="no"
1843 if test "${with_x11}" = "xcb" ; then
1844    EVAS_CHECK_ENGINE([software-xcb], [${want_x11_xcb}], [no], [Software XCB])
1845 else
1846    AM_CONDITIONAL([BUILD_ENGINE_SOFTWARE_XCB], [false])
1847    AM_CONDITIONAL([EVAS_STATIC_BUILD_SOFTWARE_XCB], [false])
1848 fi
1849
1850 AC_MSG_CHECKING([whether to build Software XCB Engine])
1851 AC_MSG_RESULT([${have_evas_engine_software_xcb}])
1852
1853 # No Software XCB ? Then try Software Xlib
1854
1855 have_evas_engine_software_xlib="no"
1856 if test "x${want_x11_xcb}" = "xno" ; then
1857    EVAS_CHECK_ENGINE([software-xlib], [${want_x11_xlib}], [no], [Software Xlib])
1858 else
1859    AM_CONDITIONAL([BUILD_ENGINE_SOFTWARE_XLIB], [false])
1860    AM_CONDITIONAL([EVAS_STATIC_BUILD_SOFTWARE_XLIB], [false])
1861 fi
1862
1863 AC_MSG_CHECKING([whether to build Software Xlib Engine])
1864 AC_MSG_RESULT([${have_evas_engine_software_xlib}])
1865
1866 # If software_x11 is available, define everything needed for X11
1867
1868 have_evas_engine_software_x11="no"
1869 if test "x${have_evas_engine_software_xlib}" = "xyes" || test "x${have_evas_engine_software_xlib}" = "xstatic" || test "x${have_evas_engine_software_xcb}" = "xyes" || test "x${have_evas_engine_software_xcb}" = "xstatic" ; then
1870    have_evas_engine_software_x11="yes"
1871    AC_DEFINE_UNQUOTED([BUILD_ENGINE_SOFTWARE_X11], [1], [Build software X11 engine])
1872 fi
1873 AM_CONDITIONAL([BUILD_ENGINE_SOFTWARE_X11], [test "x${have_evas_engine_software_x11}" = "xyes"])
1874
1875 if test "x${have_evas_engine_software_xlib}" = "xstatic" || test "x${have_evas_engine_software_xcb}" = "xstatic"; then
1876    AC_DEFINE_UNQUOTED([EVAS_STATIC_BUILD_SOFTWARE_X11], [1], [Build software X11 engine as part of libevas])
1877 fi
1878 AM_CONDITIONAL([EVAS_STATIC_BUILD_SOFTWARE_X11], [test "x${have_evas_engine_software_xcb}" = "xstatic" || test "x${have_evas_engine_software_xlib}" = "xstatic"])
1879
1880 # Needed for evas-software-x11.pc
1881
1882 AC_SUBST([have_evas_engine_software_xlib])
1883 AC_SUBST([have_evas_engine_software_xcb])
1884
1885 # Software generic
1886 AC_DEFINE([EVAS_STATIC_BUILD_SOFTWARE_GENERIC], [1], [Build software generic engine as part of libevas])
1887 AM_CONDITIONAL([EVAS_STATIC_BUILD_SOFTWARE_GENERIC], [true])
1888
1889 # OpenGL
1890
1891 if test "${with_opengl}" = "es" ; then
1892    AC_DEFINE(GL_GLES, 1, [GLSL runtime shader GLES2 support])
1893 fi
1894
1895 # OpenGL XCB
1896
1897 have_evas_engine_gl_xcb="no"
1898 if test "${want_x11_xcb_opengl}" = "yes"; then
1899    EVAS_CHECK_ENGINE([gl-xcb], [${want_x11_xcb_opengl}], [no], [OpenGL XCB])
1900 else
1901    AM_CONDITIONAL([BUILD_ENGINE_GL_XCB], [false])
1902    AM_CONDITIONAL([EVAS_STATIC_BUILD_GL_XCB], [false])
1903 fi
1904
1905 AC_MSG_CHECKING([whether to build OpenGL XCB Engine])
1906 AC_MSG_RESULT([${have_evas_engine_gl_xcb}])
1907
1908 # No openGL XCB ? Then try OpenGL Xlib
1909
1910 have_evas_engine_gl_xlib="no"
1911 if test "x${have_evas_engine_gl_xcb}" = "xno" ; then
1912    EVAS_CHECK_ENGINE([gl-xlib], [${want_x11_xlib_opengl}], [no], [OpenGL XLib])
1913 else
1914    AM_CONDITIONAL([BUILD_ENGINE_GL_XLIB], [false])
1915    AM_CONDITIONAL([EVAS_STATIC_BUILD_GL_XLIB], [false])
1916 fi
1917
1918 AC_MSG_CHECKING([whether to build OpenGL Xlib Engine])
1919 AC_MSG_RESULT([${have_evas_engine_gl_xlib}])
1920
1921 # If opengl_x11 is available, define everything needed for X11
1922
1923 have_evas_engine_gl_x11="no"
1924 if test "x${have_evas_engine_gl_xlib}" = "xyes" || test "x${have_evas_engine_gl_xlib}" = "xstatic" || test "x${have_evas_engine_gl_xcb}" = "xyes" || test "x${have_evas_engine_gl_xcb}" = "xstatic" ; then
1925    have_evas_engine_gl_x11="yes"
1926    AC_DEFINE_UNQUOTED([BUILD_ENGINE_GL_X11], [1], [Build OpenGL X11 engine])
1927 fi
1928 AM_CONDITIONAL([BUILD_ENGINE_GL_X11], [test "x${have_evas_engine_gl_x11}" = "xyes"])
1929
1930 if test "x${have_evas_engine_gl_xlib}" = "xstatic" || test "x${have_evas_engine_gl_xcb}" = "xstatic"; then
1931    AC_DEFINE_UNQUOTED([EVAS_STATIC_BUILD_GL_X11], [1], [Build OpenGL X11 engine as part of libevas])
1932 fi
1933 AM_CONDITIONAL([EVAS_STATIC_BUILD_GL_X11], [test "x${have_evas_engine_gl_xcb}" = "xstatic" || test "x${have_evas_engine_gl_xlib}" = "xstatic"])
1934
1935 # Needed for evas-opengl-x11.pc
1936
1937 AC_SUBST([have_evas_engine_gl_xlib])
1938 AC_SUBST([have_evas_engine_gl_xcb])
1939
1940 # OpenGL SDL
1941
1942 if test "x$have_evas_engine_gl_sdl" = "xyes" || test "x$have_evas_engine_gl_sdl" = "xstatic" ; then
1943    AC_CHECK_DECL([SDL_GL_CONTEXT_MAJOR_VERSION],
1944       [AC_DEFINE([HAVE_SDL_GL_CONTEXT_VERSION], [1], [SDL_GL version attributes present])],,
1945       [#include <SDL/SDL_video.h>])
1946 fi
1947
1948 if test "${with_opengl}" = "es"; then
1949    AC_CHECK_DECL([SDL_OPENGLES],
1950       [AC_DEFINE([HAVE_SDL_FLAG_OPENGLES], [1], [SDL_OPENGLES flag is present])],,
1951       [#include <SDL/SDL_video.h>])
1952 fi
1953
1954 # OpenGL common
1955 evas_engine_gl_common_cflags=""
1956 if test "x${have_egl}" = "xyes"; then
1957    evas_engine_gl_common_libs="-lEGL"
1958 else
1959    evas_engine_gl_common_libs="-lGL"
1960 fi
1961
1962 # The lines below fix compiling/linking of gl_generic on OSX
1963 if test "x${have_darwin}" = "xyes"; then
1964    if test "x${have_evas_engine_gl_cocoa}" = "xyes"; then
1965       # If gl_cocoa is enabled, Apple's Core OpenGL (CGL) should be the default OpenGL.
1966       # CFLAGS and LIBS are determined by evas-gl_cocoa.
1967       evas_engine_gl_common_libs="${evas_engine_gl_cocoa_libs}"
1968       evas_engine_gl_common_cflags="${evas_engine_gl_cocoa_cflags}"
1969    else
1970       # If evas-gl_cocoa is disabled, the only supported OpenGL engine on OSX (for now)
1971       # is evas-gl_x11. Without its CFLAGS and LIBS explicitely set, gl_generic
1972       # cannot compile (nor link).
1973       evas_engine_gl_common_libs=""
1974       evas_engine_gl_common_cflags=""
1975
1976       if test "x${have_evas_engine_gl_xlib}" = "xyes"; then
1977          evas_engine_gl_common_libs="${evas_engine_gl_xlib_libs}"
1978          evas_engine_gl_common_cflags="${evas_engine_gl_xlib_cflags}"
1979       fi
1980       ### XXX Check for other supported engines supported on OSX (dec. 2014: NONE)
1981    fi
1982 fi
1983
1984 AC_SUBST([evas_engine_gl_common_cflags])
1985 AC_SUBST([evas_engine_gl_common_libs])
1986
1987 have_evas_engine_gl_common="no"
1988 have_static_evas_engine_gl_common="no"
1989 if test "x$have_evas_engine_gl_xlib" = "xyes" || \
1990    test "x$have_evas_engine_gl_xcb" = "xyes" || \
1991    test "x$have_evas_engine_gl_sdl" = "xyes" || \
1992    test "x$have_evas_engine_gl_cocoa" = "xyes" || \
1993    test "x$have_evas_engine_gl_drm" = "xyes" || \
1994    test "x$have_evas_engine_wayland_egl" = "xyes"; then
1995    have_evas_engine_gl_common="yes"
1996 fi
1997 if test "x$have_evas_engine_gl_xlib" = "xstatic" || \
1998    test "x$have_evas_engine_gl_xcb" = "xstatic" || \
1999    test "x$have_evas_engine_gl_sdl" = "xstatic" || \
2000    test "x$have_evas_engine_gl_cocoa" = "xstatic" || \
2001    test "x$have_evas_engine_gl_drm" = "xstatic" || \
2002    test "x$have_evas_engine_wayland_egl" = "xstatic"; then
2003    have_evas_engine_gl_common="yes"
2004    have_static_evas_engine_gl_common="yes"
2005 fi
2006
2007 if test "x${have_evas_engine_gl_common}" = "xyes"; then
2008    AC_DEFINE([BUILD_ENGINE_GL_COMMON], [1], [Generic OpenGL Rendering Support])
2009 fi
2010
2011 AM_CONDITIONAL([BUILD_ENGINE_GL_COMMON], [test "x$have_evas_engine_gl_common" = "xyes"])
2012
2013 if test "x${have_static_evas_engine_gl_common}" = "xyes"; then
2014    AC_DEFINE([EVAS_STATIC_BUILD_GL_COMMON], [1], [Build GL generic engine as part of libevas])
2015 fi
2016
2017 AM_CONDITIONAL([EVAS_STATIC_BUILD_GL_COMMON], [test "x${have_static_evas_engine_gl_common}" = "xyes"])
2018
2019
2020 ## Image Loaders
2021
2022 EVAS_CHECK_IMAGE_LOADER([BMP],     [${want_evas_image_loader_bmp}])
2023 EVAS_CHECK_IMAGE_LOADER([Eet],     [${want_evas_image_loader_eet}])
2024 EVAS_CHECK_IMAGE_LOADER([Generic], [${want_evas_image_loader_generic}])
2025 EVAS_CHECK_IMAGE_LOADER([Gif],     [${want_evas_image_loader_gif}])
2026 EVAS_CHECK_IMAGE_LOADER([ICO],     [${want_evas_image_loader_ico}])
2027 EVAS_CHECK_IMAGE_LOADER([JPEG],    [${want_evas_image_loader_jpeg}])
2028 EVAS_CHECK_IMAGE_LOADER([JP2K],    [${want_evas_image_loader_jp2k}])
2029 EVAS_CHECK_IMAGE_LOADER([PMAPS],   [${want_evas_image_loader_pmaps}])
2030 EVAS_CHECK_IMAGE_LOADER([PNG],     [${want_evas_image_loader_png}])
2031 EVAS_CHECK_IMAGE_LOADER([PSD],     [${want_evas_image_loader_psd}])
2032 EVAS_CHECK_IMAGE_LOADER([Tga],     [${want_evas_image_loader_tga}])
2033 EVAS_CHECK_IMAGE_LOADER([Tiff],    [${want_evas_image_loader_tiff}])
2034 EVAS_CHECK_IMAGE_LOADER([WBMP],    [${want_evas_image_loader_wbmp}])
2035 EVAS_CHECK_IMAGE_LOADER([WEBP],    [${want_evas_image_loader_webp}])
2036 EVAS_CHECK_IMAGE_LOADER([XPM],     [${want_evas_image_loader_xpm}])
2037 EVAS_CHECK_IMAGE_LOADER([TGV],     [${want_evas_image_loader_tgv}])
2038 EVAS_CHECK_IMAGE_LOADER([DDS],     [${want_evas_image_loader_dds}])
2039
2040 EFL_EVAL_PKGS([EVAS])
2041
2042 ### Checks for header files
2043
2044 if test "x$have_harfbuzz" = "xyes" ; then
2045
2046    CPPFLAGS_SAVE="$CPPFLAGS"
2047    CPPFLAGS="$CPPFLAGS $EVAS_CFLAGS"
2048 # must have for usage with harfbuzz although harfbuzz may not have it.
2049
2050    AC_CHECK_HEADER([hb-ft.h],
2051       [
2052        have_harfbuzz_ft="yes"
2053        #Depend on harfbuzz ft for harfbuzz support
2054        AC_DEFINE([HAVE_HARFBUZZ], [1], [have harfbuzz support])
2055       ],
2056       [AC_MSG_ERROR([Harfbuzz-ft (hb-ft.h) not found])])
2057
2058    CPPFLAGS="$CPPFLAGS_SAVE"
2059 fi
2060
2061 ### Checks for types
2062
2063 CPPFLAGS_SAVE="$CPPFLAGS"
2064 CPPFLAGS="$CPPFLAGS $EVAS_CFLAGS -Isrc/lib/eina"
2065 AC_CHECK_SIZEOF([Eina_Unicode], [], [#include <Eina.h>])
2066 CPPFLAGS="$CPPFLAGS_SAVE"
2067
2068
2069 if test "x$have_fribidi" = "xyes" ; then
2070    CPPFLAGS_SAVE="$CPPFLAGS"
2071    CPPFLAGS="$CPPFLAGS $EVAS_CFLAGS"
2072    AC_CHECK_SIZEOF([FriBidiChar], [], [#include <fribidi.h>])
2073    CPPFLAGS="$CPPFLAGS_SAVE"
2074 fi
2075
2076 ### Checks for structures
2077
2078 AC_CHECK_TYPES([struct sigaction], [], [],
2079                [[#include <signal.h>]])
2080
2081 ### Checks for compiler characteristics
2082
2083 ### Checks for linker characteristics
2084
2085 ### Checks for library functions
2086
2087 AC_CHECK_FUNCS([siglongjmp])
2088
2089 AC_CHECK_LIB([m], [lround],
2090 [AC_DEFINE([HAVE_LROUND], [1], [C99 lround function exists])],
2091 [EFL_CHECK_GCC_BUILTIN([lround], [HAVE_LROUND])]
2092 )
2093
2094
2095 # Evas cserve2
2096
2097 AC_ARG_ENABLE([cserve],
2098    [AS_HELP_STRING([--enable-cserve],[enable shared cache server (cserve2). @<:@default=enabled@:>@])],
2099    [
2100     if test "x${enableval}" = "xyes" ; then
2101        want_evas_cserve2="yes"
2102     else
2103        want_evas_cserve2="no"
2104        CFOPT_WARNING="xyes"
2105     fi
2106    ],
2107    [want_evas_cserve2="yes"])
2108
2109 if test "x${want_evas_image_loader_generic}" = "xyes" || test "x${want_evas_cserve2}" = "xyes" ; then
2110    EFL_ADD_LIBS([EVAS], [${requirements_libs_shm}])
2111 fi
2112
2113 # cserve2 only works on Linux so far.
2114
2115 if test "x${efl_func_shm_open}" = "xno" ; then
2116    want_evas_cserve2="no"
2117 fi
2118
2119 if test "x${want_evas_cserve2}" = "xyes"; then
2120    if test "x${ac_cv_header_sys_epoll_h}" = "xno" || test "x${ac_cv_header_sys_inotify_h}" = "xno" || test "x${ac_cv_header_sys_signalfd_h}" = "xno"; then
2121       want_evas_cserve2="no"
2122    else
2123       EVAS_CSERVE2_SLAVE_LIBS="${EFLALL_COV_LIBS} ${EFL_LIBS} ${requirements_libs_shm}"
2124       AC_SUBST([EVAS_CSERVE2_SLAVE_LIBS])
2125    fi
2126 fi
2127
2128 AC_DEFINE_IF([EVAS_CSERVE2],
2129    [test "x${want_evas_cserve2}" = "xyes"],
2130    [1], [Shared cache server.])
2131 AM_CONDITIONAL([EVAS_CSERVE2], [test "x${want_evas_cserve2}" = "xyes"])
2132
2133 ### Configuration
2134
2135 ## Tile rotation
2136
2137 if test "x${have_tile_rotate}" = "xyes" ; then
2138    AC_DEFINE(TILE_ROTATE, 1, [Enable tiled rotate algorithm])
2139 fi
2140
2141
2142 ## dither options
2143
2144 AC_ARG_WITH([evas-dither-mask],
2145    [AS_HELP_STRING([--with-evas-dither-mask=TYPE],[use the specified dither mask to convert bitdepths in Evas, one of: big, small, line or none.
2146                     @<:@default=big@:>@])],
2147    [build_evas_dither_mask=${withval}],
2148    [build_evas_dither_mask=big])
2149
2150 case "${build_evas_dither_mask}" in
2151    big)
2152      AC_DEFINE([BUILD_BIG_DITHER_MASK], [1], [Use biggest dither mask while converting in Evas])
2153      ;;
2154    small)
2155      AC_DEFINE([BUILD_SMALL_DITHER_MASK], [1], [Use smaller dither mask while converting in Evas])
2156      ;;
2157    line)
2158      AC_DEFINE([BUILD_LINE_DITHER_MASK], [1], [Use simpler line-only dither mask while converting in Evas])
2159      ;;
2160    none)
2161      AC_DEFINE([BUILD_NO_DITHER_MASK], [1], [Do not use dither masks while converting in Evas])
2162      ;;
2163    *)
2164      AC_MSG_ERROR([Unknown Evas dither mask --with-evas-dither-mask=${build_evas_dither_mask}])
2165      ;;
2166 esac
2167 EFL_ADD_FEATURE([EVAS], [fontconfig])
2168 EFL_ADD_FEATURE([EVAS], [fribidi])
2169 EFL_ADD_FEATURE([EVAS], [harfbuzz])
2170 EFL_ADD_FEATURE([EVAS], [cserve], [${want_evas_cserve2}])
2171 EFL_ADD_FEATURE([EVAS], [tile-rotate])
2172 EFL_ADD_FEATURE([EVAS], [dither-mask], [${build_evas_dither_mask}])
2173
2174 EFL_LIB_END([Evas])
2175 #### End of Evas
2176
2177 #### Edje CXX
2178 EFL_LIB_START([Evas_Cxx])
2179
2180 EFL_EVAL_PKGS([EVAS_CXX])
2181
2182 EFL_LIB_END([Evas_Cxx])
2183 #### End of Edje CXX
2184
2185 #### Embryo
2186
2187 EFL_LIB_START([Embryo])
2188
2189 ### Default values
2190
2191 ### Additional options to configure
2192
2193 ### Checks for programs
2194
2195 ### Checks for libraries
2196 EFL_PLATFORM_DEPEND([EMBRYO], [all])
2197 EFL_INTERNAL_DEPEND_PKG([EMBRYO], [eina])
2198
2199 EFL_ADD_LIBS([EMBRYO], [-lm])
2200
2201 ### Checks for header files
2202
2203 ### Checks for types
2204
2205 ### Checks for structures
2206
2207 ### Checks for compiler characteristics
2208
2209 ### Checks for linker characteristics
2210
2211 ### Checks for library functions
2212
2213 if ! test "x${efl_func_fnmatch}" = "xyes" ; then
2214    AC_MSG_ERROR([Cannot find fnmatch()])
2215 fi
2216
2217 if ! test "x${efl_func_gettimeofday}" = "xyes" ; then
2218    AC_MSG_ERROR([Cannot find gettimeofday()])
2219 fi
2220
2221 ### Check availability
2222
2223 EFL_LIB_END([Embryo])
2224 #### End of Embryo
2225
2226
2227 #### Ecore
2228
2229 EFL_LIB_START([Ecore])
2230
2231 ### Additional options to configure
2232
2233 # glib
2234
2235 AC_ARG_WITH([glib],
2236    [AS_HELP_STRING([--with-glib=yes|no|always],[add glib support. @<:@default=enabled@:>@])],
2237    [
2238     if test "x${withval}" = "xyes" ; then
2239        with_glib="yes"
2240     else
2241        if test "x${withval}" = "xalways" ; then
2242           with_glib="always"
2243        else
2244           with_glib="no"
2245        fi
2246     fi
2247    ],
2248    [with_glib="yes"])
2249
2250 AC_ARG_ENABLE([g-main-loop],
2251    [AS_HELP_STRING([--enable-g-main-loop],[enable ecore_main_loop based on g_main_loop. @<:@default=disabled@:>@])],
2252    [
2253     if test "x${enableval}" = "xyes" ; then
2254        want_g_main_loop="yes"
2255        CFOPT_WARNING="xyes"
2256     else
2257        want_g_main_loop="no"
2258     fi
2259    ],
2260    [want_g_main_loop="no"])
2261
2262 AC_ARG_ENABLE([gstreamer],
2263    [AS_HELP_STRING([--enable-gstreamer],[enable gstreamer 0.10 support. @<:@default=disabled@:>@])],
2264    [
2265     if test "x${enableval}" = "xyes" ; then
2266        want_gstreamer="yes"
2267        CFOPT_WARNING="xyes"
2268     else
2269        want_gstreamer="no"
2270     fi
2271    ],
2272    [want_gstreamer="no"])
2273
2274 AC_ARG_ENABLE([gstreamer1],
2275    [AS_HELP_STRING([--disable-gstreamer1],[disable gstreamer 1.0 support. @<:@default=enabled@:>@])],
2276    [
2277     if test "x${enableval}" = "xyes" ; then
2278        want_gstreamer1="yes"
2279     else
2280        want_gstreamer1="no"
2281        CFOPT_WARNING="xyes"
2282     fi
2283    ],
2284    [want_gstreamer1="yes"])
2285
2286 AC_ARG_ENABLE([tizen],
2287    [AS_HELP_STRING([--enable-tizen],[enable tizen support. @<:@default=disabled@:>@])],
2288    [
2289     if test "x${enableval}" = "xyes" ; then
2290        want_tizen="yes"
2291     else
2292        want_tizen="no"
2293     fi
2294    ],
2295    [want_tizen="no"])
2296
2297 if test "${want_tizen}" = "yes"; then
2298      PKG_CHECK_MODULES([TIZEN_CONFIGURATION_MANAGER],
2299       [vconf],
2300       [have_tizen_vconf="yes"],
2301       [have_tizen_vconf="no"])
2302   PKG_CHECK_MODULES([TIZEN_CONFIGURATION_MANAGER], [vconf])
2303 fi
2304
2305 AM_CONDITIONAL([HAVE_TIZEN_CONFIGURATION_MANAGER], [test "${have_tizen_vconf}" = "yes"])
2306 if test "${have_tizen_vconf}"  = "yes"; then
2307   AC_DEFINE(HAVE_TIZEN_CONFIGURATION_MANAGER, 1, [Define to 1 if you have Tizen configuration manager(vconf).])
2308 fi
2309
2310 ### Default values
2311
2312 if test "${have_windows}" = "yes"; then
2313    with_glib="no"
2314 fi
2315
2316 want_glib="no"
2317 if test "x${with_glib}" = "xyes" || test "x${with_glib}" = "xalways" ; then
2318    want_glib="yes"
2319 fi
2320
2321 want_ecore_timer_dump="no"
2322 if test "x${build_profile}" = "xdebug" && test "x${ac_cv_func_backtrace}" = "xyes"; then
2323    want_ecore_timer_dump="yes"
2324    AC_DEFINE([WANT_ECORE_TIMER_DUMP], [1], [Want Ecore_Timer dump infrastructure])
2325 fi
2326
2327 ### Checks for programs
2328
2329 ### Checks for libraries
2330 EFL_PLATFORM_DEPEND([ECORE], [all])
2331 EFL_INTERNAL_DEPEND_PKG([ECORE], [eo])
2332 EFL_INTERNAL_DEPEND_PKG([ECORE], [eina])
2333 EFL_INTERNAL_DEPEND_PKG([ECORE], [efl])
2334
2335 EFL_ADD_LIBS([ECORE], [-lm])
2336
2337 # glib
2338
2339 EFL_OPTIONAL_DEPEND_PKG([ECORE], [${want_glib}], [GLIB], [glib-2.0 gthread-2.0])
2340 if test "x${have_glib}" = "xno"; then
2341    want_g_main_loop="no"
2342 fi
2343
2344 EFL_OPTIONAL_DEPEND_PKG([ECORE], [${want_systemd}], [SYSTEMD], [libsystemd-daemon])
2345
2346 EFL_ADD_FEATURE([ECORE], [systemd-daemon], [${want_systemd}])
2347 EFL_ADD_FEATURE([ECORE], [glib])
2348 EFL_ADD_FEATURE([ECORE], [g-main-loop])
2349
2350 want_glib_integration_always=no
2351 if test "x${with_glib}" = "xalways" ; then
2352   want_glib_integration_always="yes"
2353   AC_DEFINE([GLIB_INTEGRATION_ALWAYS], [1], [Always integrate glib if support compiled])
2354 fi
2355
2356 if test "x${want_g_main_loop}" = "xyes" ; then
2357   AC_DEFINE([USE_G_MAIN_LOOP], [1], [Use g_main_loop in ecore])
2358 fi
2359
2360 # not EFL_OPTIONAL_DEPEND_PKG() because it's only used for ecore examples
2361 if test "${want_gstreamer1}" = "yes" -a "${want_gstreamer}" = "yes"; then
2362    AC_MSG_ERROR([You can only enable either GStreamer 1.0 or GStreamer 0.10 support])
2363 fi
2364
2365 if test "${want_gstreamer1}" = "yes"; then
2366   PKG_CHECK_MODULES([GSTREAMER], [gstreamer-1.0])
2367 fi
2368 if test "${want_gstreamer}" = "yes"; then
2369   PKG_CHECK_MODULES([GSTREAMER], [gstreamer-0.10])
2370 fi
2371 AM_CONDITIONAL([HAVE_GSTREAMER], [test "${want_gstreamer}" = "yes" -o "${want_gstreamer1}" = "yes"])
2372
2373 EFL_EVAL_PKGS([ECORE])
2374
2375 ### Checks for header files
2376
2377 AC_HEADER_SYS_WAIT
2378
2379 AC_CHECK_HEADERS([sys/socket.h])
2380
2381 AC_CHECK_HEADERS([ \
2382 arpa/inet.h \
2383 langinfo.h \
2384 features.h \
2385 netinet/in.h \
2386 netinet/tcp.h \
2387 sys/prctl.h \
2388 sys/resource.h \
2389 sys/timerfd.h \
2390 sys/un.h \
2391 ],[],[],
2392 [
2393  #ifdef HAVE_SYS_SOCKET_H
2394  # include <sys/socket.h>
2395  #endif
2396 ])
2397
2398 AC_CHECK_HEADERS([net/if.h], [], [],
2399 [#include <stdio.h>
2400 #if STDC_HEADERS
2401 # include <stdlib.h>
2402 # include <stddef.h>
2403 #else
2404 # if HAVE_STDLIB_H
2405 #  include <stdlib.h>
2406 # endif
2407 #endif
2408 #if HAVE_SYS_SOCKET_H
2409 # include <sys/socket.h>
2410 #endif
2411 ])
2412
2413 ### Checks for types
2414
2415 ### Checks for structures
2416
2417 ### Checks for compiler characteristics
2418
2419 ### Checks for linker characteristics
2420
2421 ### Checks for library functions
2422
2423 ## ecore
2424
2425 # isfinite
2426
2427 AC_COMPILE_IFELSE(
2428    [AC_LANG_PROGRAM(
2429        [[
2430 #include <math.h>
2431        ]],
2432        [[
2433 int i = isfinite(0);
2434        ]])],
2435    [
2436     AC_DEFINE(HAVE_ISFINITE, 1, [Define to 1 if you have `isfinite', as a function or macro.])
2437     have_isfinite="yes"
2438    ],
2439    [have_isfinite="no"])
2440
2441 AC_MSG_CHECKING([for isfinite])
2442 AC_MSG_RESULT([${have_isfinite}])
2443
2444 # mallinfo, timerfd_create, clock_gettime
2445
2446 AC_CHECK_FUNCS_ONCE([mallinfo timerfd_create clock_gettime malloc_info])
2447
2448 if ! test "x${ac_cv_func_clock_gettime}" = "xyes" ; then
2449    AC_CHECK_LIB([rt], [clock_gettime],
2450       [
2451         EFL_ADD_LIBS([ECORE], [-lrt])
2452         AC_DEFINE([HAVE_CLOCK_GETTIME], [1], [Have clock_gettime()])
2453        ])
2454 fi
2455
2456 EFL_ADD_LIBS([ECORE], [${LTLIBINTL}])
2457
2458 # coroutine function specific
2459
2460 AC_COMPILE_IFELSE(
2461    [AC_LANG_PROGRAM(
2462        [[
2463 #include <ucontext.h>
2464        ]],
2465        [[
2466 ucontext_t test;
2467 getcontext(&test);
2468        ]])],
2469    [have_ucontext="yes"],
2470    [have_ucontext="no"])
2471
2472 AC_MSG_CHECKING([for ucontext])
2473 AC_MSG_RESULT([${have_ucontext}])
2474
2475 AC_COMPILE_IFELSE(
2476    [AC_LANG_PROGRAM(
2477        [[
2478 #include <setjmp.h>
2479        ]],
2480        [[
2481 jmp_buf context;
2482 setjmp(&context);
2483        ]])],
2484    [have_setjmp="yes"],
2485    [have_setjmp="no"])
2486
2487 AC_MSG_CHECKING([for setjmp])
2488 AC_MSG_RESULT([${have_setjmp}])
2489
2490 if test "X${have_windows}" = "xyes"; then
2491    AC_DEFINE(USE_FIBER, 1, [Define to 1 if you have Windows Fiber support.])
2492    EFL_ADD_FEATURE([system], [coroutine], [fiber])
2493 elif test "x${have_ucontext}" = "xyes"; then
2494    AC_DEFINE(USE_UCONTEXT, 1, [Define to 1 if you have posix ucontext functions.])
2495    EFL_ADD_FEATURE([system], [coroutine], [ucontext])
2496 elif test "x${have_setjmp}" = "xyes"; then
2497    AC_DEFINE(USE_SETJMP, 1, [Define to 1 if you have setjmp/longjmp functions.])
2498    EFL_ADD_FEATURE([system], [coroutine], [setjmp])
2499 else
2500    AC_MSG_ERROR([You don't have a working way to implement coroutine. Exiting...])
2501 fi
2502
2503 ### Check availability
2504
2505 EFL_LIB_END([Ecore])
2506 #### End of Ecore
2507
2508 #### Ecore CXX
2509 EFL_LIB_START([Ecore_Cxx])
2510
2511 EFL_INTERNAL_DEPEND_PKG([ECORE_CXX], [Eina_Cxx])
2512 EFL_INTERNAL_DEPEND_PKG([ECORE_CXX], [Ecore])
2513 EFL_INTERNAL_DEPEND_PKG([ECORE_CXX], [Eina])
2514 EFL_INTERNAL_DEPEND_PKG([ECORE_CXX], [Eo])
2515
2516 EFL_EVAL_PKGS([ECORE_CXX])
2517
2518 EFL_LIB_END([Ecore_Cxx])
2519 #### End of Ecore CXX
2520
2521 #### Ecore_Con
2522
2523 EFL_LIB_START([Ecore_Con])
2524
2525 ### Default values
2526
2527 want_ecore_con_local_sockets="yes"
2528 want_ecore_con_abstract_sockets="yes"
2529
2530 if test "${have_win32}" = "yes"; then
2531    want_cares="yes"
2532    want_ecore_con_abstract_sockets="no"
2533 elif test "${have_darwin}" = "yes"; then
2534    want_cares="no"
2535    want_ecore_con_abstract_sockets="yes"
2536 elif test "${have_ps3}" = "yes"; then
2537    want_cares="no"
2538    want_ecore_con_local_sockets="no"
2539    want_ecore_con_abstract_sockets="no"
2540 else
2541    want_cares="no"
2542 fi
2543
2544 AC_DEFINE_IF([HAVE_LOCAL_SOCKETS],
2545    [test "x${want_ecore_con_local_sockets}" = "xyes"],
2546    [1], [Have local sockets support])
2547 AC_DEFINE_IF([HAVE_ABSTRACT_SOCKETS],
2548    [test "x${want_ecore_con_abstract_sockets}" = "xyes"],
2549    [1], [Have abstract sockets namespace])
2550
2551 ### Checks for programs
2552
2553 ### Checks for libraries
2554 EFL_PLATFORM_DEPEND([ECORE_CON], [all])
2555 if test "$build_crypto" != "none" ; then
2556    EFL_CRYPTO_DEPEND([ECORE_CON])
2557 fi
2558 EFL_INTERNAL_DEPEND_PKG([ECORE_CON], [eo])
2559 EFL_INTERNAL_DEPEND_PKG([ECORE_CON], [eet])
2560 EFL_INTERNAL_DEPEND_PKG([ECORE_CON], [eina])
2561 EFL_INTERNAL_DEPEND_PKG([ECORE_CON], [ecore])
2562 EFL_INTERNAL_DEPEND_PKG([ECORE_CON], [emile])
2563
2564 EFL_ADD_LIBS([ECORE_CON], [-lm])
2565
2566 EFL_OPTIONAL_DEPEND_PKG([ECORE_CON], [${want_cares}],
2567    [CARES], [libcares >= 1.6.1])
2568 AM_CONDITIONAL([HAVE_CARES], [test "x${have_cares}" = "xyes"])
2569
2570 if test "x$have_cares" = "xyes" ; then
2571    ecore_con_resolver="cares"
2572 elif test "x$ac_cv_prog_cc_c99" != "xno" ; then
2573    ecore_con_resolver="dns.c"
2574 else
2575    ecore_con_resolver="fork"
2576 fi
2577
2578 EFL_OPTIONAL_DEPEND_PKG([ECORE_CON], [${want_systemd}], [SYSTEMD], [libsystemd-daemon])
2579
2580 EFL_ADD_FEATURE([ECORE_CON], [cares])
2581 EFL_ADD_FEATURE([ECORE_CON], [local-sockets], [${want_ecore_con_local_sockets}])
2582 EFL_ADD_FEATURE([ECORE_CON], [abstract-sockets], [${want_ecore_con_abstract_sockets}])
2583 EFL_ADD_FEATURE([ECORE_CON], [resolver], [${ecore_con_resolver}])
2584 EFL_ADD_FEATURE([ECORE_CON], [systemd-daemon], [${want_systemd}])
2585
2586 EFL_EVAL_PKGS([ECORE_CON])
2587
2588 ### Checks for header files
2589
2590 AC_CHECK_HEADERS([ws2tcpip.h netdb.h])
2591
2592 if test "x${ac_cv_header_netdb_h}" = "xno" && test "x${have_windows}" = "xno"; then
2593    AC_MSG_ERROR([netdb.h is requested to have Ecore_Con. Exiting...])
2594 fi
2595
2596 ### Checks for types
2597
2598 have_ipv6="no"
2599 AC_CHECK_TYPES([struct ipv6_mreq],
2600    [have_ipv6="yes"],
2601    [have_ipv6="no"],
2602    [[
2603 #include <netinet/in.h>
2604 #ifdef HAVE_WS2TCPIP_H
2605 # include <ws2tcpip.h>
2606 #endif
2607 ]])
2608
2609 AC_DEFINE_IF([HAVE_IPV6],
2610    [test "x${have_ipv6}" = "xyes"],
2611    [1], [Define if IPV6 is supported])
2612 AM_CONDITIONAL([HAVE_IPV6], [test "x${have_ipv6}" = "xyes"])
2613
2614 ### Checks for structures
2615
2616 ### Checks for compiler characteristics
2617
2618 ### Checks for linker characteristics
2619
2620 ### Checks for library functions
2621
2622 EFL_LIB_END([Ecore_Con])
2623 #### End of Ecore_Con
2624
2625
2626 #### Ecore_Ipc
2627
2628 EFL_LIB_START([Ecore_Ipc])
2629
2630 ### Default values
2631
2632 ### Additional options to configure
2633
2634 ### Checks for programs
2635
2636 ## Compatibility layers
2637 EFL_PLATFORM_DEPEND([ECORE_IPC], [evil])
2638
2639 ### Checks for libraries
2640 EFL_INTERNAL_DEPEND_PKG([ECORE_IPC], [ecore-con])
2641 EFL_INTERNAL_DEPEND_PKG([ECORE_IPC], [ecore])
2642 EFL_INTERNAL_DEPEND_PKG([ECORE_IPC], [eo])
2643 EFL_INTERNAL_DEPEND_PKG([ECORE_IPC], [eina])
2644
2645 EFL_ADD_LIBS([ECORE_IPC], [-lm])
2646
2647 ### Checks for header files
2648
2649 AC_CHECK_HEADERS([winsock2.h])
2650
2651 ### Checks for types
2652
2653 ### Checks for structures
2654
2655 ### Checks for compiler characteristics
2656
2657 ### Checks for linker characteristics
2658
2659 ### Checks for library functions
2660
2661 EFL_LIB_END([Ecore_Ipc])
2662 #### End of Ecore_Ipc
2663
2664
2665 #### Ecore_File
2666
2667 EFL_LIB_START([Ecore_File])
2668
2669 ### Additional options to configure
2670
2671 ### Default values
2672
2673 ### Checks for programs
2674
2675 ## Compatibility layers
2676 EFL_PLATFORM_DEPEND([ECORE_FILE], [evil])
2677
2678 ### Checks for libraries
2679 EFL_PLATFORM_DEPEND([ECORE_FILE], [escape])
2680 EFL_INTERNAL_DEPEND_PKG([ECORE_FILE], [ecore-con])
2681 EFL_INTERNAL_DEPEND_PKG([ECORE_FILE], [ecore])
2682 EFL_INTERNAL_DEPEND_PKG([ECORE_FILE], [eo])
2683 EFL_INTERNAL_DEPEND_PKG([ECORE_FILE], [eina])
2684
2685 ### Checks for header files
2686
2687 ### Checks for types
2688
2689 ### Checks for structures
2690
2691 ### Checks for compiler characteristics
2692
2693 ### Checks for linker characteristics
2694
2695 ### Checks for library functions
2696
2697 EFL_LIB_END([Ecore_File])
2698 #### End of Ecore_File
2699
2700
2701 #### Ecore_Input
2702 EFL_LIB_START([Ecore_Input])
2703
2704 ### Additional options to configure
2705
2706 ### Default values
2707
2708 ### Checks for programs
2709
2710 ## Compatibility layers
2711 EFL_PLATFORM_DEPEND([ECORE_INPUT], [evil])
2712
2713 ### Checks for libraries
2714 EFL_INTERNAL_DEPEND_PKG([ECORE_INPUT], [ecore])
2715 EFL_INTERNAL_DEPEND_PKG([ECORE_INPUT], [eo])
2716 EFL_INTERNAL_DEPEND_PKG([ECORE_INPUT], [eina])
2717
2718 ### Checks for header files
2719
2720 ### Checks for types
2721
2722 ### Checks for structures
2723
2724 ### Checks for compiler characteristics
2725
2726 ### Checks for linker characteristics
2727
2728 ### Checks for library functions
2729
2730 EFL_LIB_END([Ecore_Input])
2731 #### End of Ecore_Input
2732
2733
2734 #### Ecore_Input_Evas
2735 EFL_LIB_START([Ecore_Input_Evas])
2736
2737 ### Additional options to configure
2738
2739 ### Default values
2740
2741 ### Checks for programs
2742
2743 ## Compatibility layers
2744 EFL_PLATFORM_DEPEND([ECORE_INPUT_EVAS], [evil])
2745
2746 ### Checks for libraries
2747 EFL_INTERNAL_DEPEND_PKG([ECORE_INPUT_EVAS], [ecore-input])
2748 EFL_INTERNAL_DEPEND_PKG([ECORE_INPUT_EVAS], [ecore])
2749 EFL_INTERNAL_DEPEND_PKG([ECORE_INPUT_EVAS], [evas])
2750 EFL_INTERNAL_DEPEND_PKG([ECORE_INPUT_EVAS], [efl])
2751 EFL_INTERNAL_DEPEND_PKG([ECORE_INPUT_EVAS], [eo])
2752 EFL_INTERNAL_DEPEND_PKG([ECORE_INPUT_EVAS], [eina])
2753 EFL_INTERNAL_DEPEND_PKG([ECORE_INPUT_EVAS], [emile])
2754
2755 ### Checks for header files
2756
2757 ### Checks for types
2758
2759 ### Checks for structures
2760
2761 ### Checks for compiler characteristics
2762
2763 ### Checks for linker characteristics
2764
2765 ### Checks for library functions
2766
2767 EFL_LIB_END([Ecore_Input_Evas])
2768 #### End of Ecore_Input_Evas
2769
2770
2771 #### Ecore_Cocoa
2772 EFL_LIB_START_OPTIONAL([Ecore_Cocoa], [test "${want_cocoa}" = "yes"])
2773
2774 ### Additional options to configure
2775
2776 ### Default values
2777
2778 ### Checks for programs
2779
2780 ### Checks for libraries
2781 EFL_INTERNAL_DEPEND_PKG([ECORE_COCOA], [ecore-input])
2782 EFL_INTERNAL_DEPEND_PKG([ECORE_COCOA], [ecore])
2783 EFL_INTERNAL_DEPEND_PKG([ECORE_COCOA], [eo])
2784 EFL_INTERNAL_DEPEND_PKG([ECORE_COCOA], [eina])
2785
2786 ### Checks for header files
2787
2788 EFL_ADD_LIBS([ECORE_COCOA], [-framework Cocoa])
2789
2790 ### Checks for types
2791
2792 ### Checks for structures
2793
2794 ### Checks for compiler characteristics
2795
2796 ### Checks for linker characteristics
2797
2798 ### Checks for library functions
2799
2800 EFL_LIB_END_OPTIONAL([Ecore_Cocoa])
2801 #### End of Ecore_Cocoa
2802
2803
2804 #### Ecore_FB
2805 EFL_LIB_START_OPTIONAL([Ecore_FB], [test "${want_fb}" = "yes"])
2806
2807 ### Additional options to configure
2808 AC_ARG_ENABLE([tslib],
2809    [AS_HELP_STRING([--disable-tslib],[disable tslib for touchscreen events.])],
2810    [
2811     if test "x${enableval}" = "xyes" ; then
2812        want_tslib="yes"
2813     else
2814        want_tslib="no"
2815     fi
2816    ], [want_tslib="yes"])
2817
2818 ### Default values
2819
2820 ### Checks for programs
2821
2822 ### Checks for libraries
2823 EFL_INTERNAL_DEPEND_PKG([ECORE_FB], [ecore])
2824 EFL_INTERNAL_DEPEND_PKG([ECORE_FB], [ecore-input])
2825 EFL_INTERNAL_DEPEND_PKG([ECORE_FB], [eo])
2826 EFL_INTERNAL_DEPEND_PKG([ECORE_FB], [eina])
2827
2828 EFL_OPTIONAL_DEPEND_PKG([ECORE_FB], [${want_tslib}], [TSLIB], [tslib])
2829 EFL_ADD_FEATURE([ECORE_FB], [tslib])
2830
2831 EFL_EVAL_PKGS([ECORE_FB])
2832
2833 ### Checks for header files
2834
2835 have_ecore_fb="no"
2836 AC_CHECK_HEADER([linux/fb.h],
2837    [AC_CHECK_HEADER([linux/input.h], [have_ecore_fb="yes"])])
2838 if test "${have_ecore_fb}" = "no"; then
2839    AC_MSG_ERROR([Missing linux/input.h or linux/fb.h])
2840 fi
2841
2842 ### Checks for types
2843
2844 ### Checks for structures
2845
2846 ### Checks for compiler characteristics
2847
2848 ### Checks for linker characteristics
2849
2850 ### Checks for library functions
2851
2852 EFL_LIB_END_OPTIONAL([Ecore_FB])
2853 #### End of Ecore_FB
2854
2855
2856 #### Ecore_Psl1ght
2857 EFL_LIB_START_OPTIONAL([Ecore_Psl1ght], [test "${have_ps3}" = "yes"])
2858
2859 ### Additional options to configure
2860
2861 ### Default values
2862
2863 ### Checks for programs
2864
2865 ### Checks for libraries
2866 EFL_PLATFORM_DEPEND([ECORE_PSL1GHT], [escape])
2867
2868 EFL_INTERNAL_DEPEND_PKG([ECORE_PSL1GHT], [ecore-input])
2869 EFL_INTERNAL_DEPEND_PKG([ECORE_PSL1GHT], [ecore])
2870 EFL_INTERNAL_DEPEND_PKG([ECORE_PSL1GHT], [eo])
2871 EFL_INTERNAL_DEPEND_PKG([ECORE_PSL1GHT], [eina])
2872
2873 EFL_ADD_LIBS([ECORE_PSL1GHT], [-lio -lsysutil -lgem -lcamera -lspurs])
2874
2875 ### Checks for header files
2876
2877 ### Checks for types
2878
2879 ### Checks for structures
2880
2881 ### Checks for compiler characteristics
2882
2883 ### Checks for linker characteristics
2884
2885 ### Checks for library functions
2886
2887 EFL_LIB_END_OPTIONAL([Ecore_Psl1ght])
2888 #### End of Ecore_Psl1ght
2889
2890
2891 #### Ecore_SDL
2892 EFL_LIB_START_OPTIONAL([Ecore_SDL], [test "${want_sdl}" = "yes"])
2893
2894 ### Additional options to configure
2895
2896 ### Default values
2897
2898 ### Checks for programs
2899
2900 ### Checks for libraries
2901 EFL_PLATFORM_DEPEND([ECORE_SDL], [all])
2902 EFL_INTERNAL_DEPEND_PKG([ECORE_SDL], [ecore-input])
2903 EFL_INTERNAL_DEPEND_PKG([ECORE_SDL], [ecore])
2904 EFL_INTERNAL_DEPEND_PKG([ECORE_SDL], [eo])
2905 EFL_INTERNAL_DEPEND_PKG([ECORE_SDL], [eina])
2906
2907 EFL_DEPEND_PKG([ECORE_SDL], [SDL], [sdl2 >= 2.0.0])
2908
2909 EFL_EVAL_PKGS([ECORE_SDL])
2910
2911 ### Checks for header files
2912
2913 ### Checks for types
2914
2915 ### Checks for structures
2916
2917 ### Checks for compiler characteristics
2918
2919 ### Checks for linker characteristics
2920
2921 ### Checks for library functions
2922
2923 EFL_LIB_END_OPTIONAL([Ecore_SDL])
2924 #### End of Ecore_SDL
2925
2926
2927 #### Ecore_Wayland
2928 EFL_LIB_START_OPTIONAL([Ecore_Wayland], [test "${want_wayland}" = "yes"])
2929
2930 if test "x${want_wayland_ivi_shell}" = "xyes" ; then
2931    AC_DEFINE(USE_IVI_SHELL, 1, [Ecore_Wayland IVI-Shell Support])
2932 fi
2933
2934 ### Additional options to configure
2935
2936 ### Default values
2937
2938 ### Checks for programs
2939
2940 ### Checks for libraries
2941 EFL_INTERNAL_DEPEND_PKG([ECORE_WAYLAND], [ecore-input])
2942 EFL_INTERNAL_DEPEND_PKG([ECORE_WAYLAND], [ecore])
2943 EFL_INTERNAL_DEPEND_PKG([ECORE_WAYLAND], [eo])
2944 EFL_INTERNAL_DEPEND_PKG([ECORE_WAYLAND], [eina])
2945
2946 EFL_DEPEND_PKG([ECORE_WAYLAND], [WAYLAND],
2947    [wayland-client >= 1.3.0 wayland-cursor >= 1.3.0 xkbcommon >= 0.3.0])
2948
2949 EFL_EVAL_PKGS([ECORE_WAYLAND])
2950
2951 ### Checks for header files
2952
2953 ### Checks for types
2954
2955 ### Checks for structures
2956
2957 ### Checks for compiler characteristics
2958
2959 ### Checks for linker characteristics
2960
2961 ### Checks for library functions
2962
2963 EFL_LIB_END_OPTIONAL([Ecore_Wayland])
2964 #### End of Ecore_Wayland
2965
2966 #### Eldbus
2967 EFL_LIB_START([Eldbus])
2968
2969 ### Additional options to configure
2970
2971 ### Default values
2972
2973 ### Checks for programs
2974
2975 ## Compatibility layers
2976 EFL_PLATFORM_DEPEND([ELDBUS], [evil])
2977
2978 ### Checks for libraries
2979 EFL_INTERNAL_DEPEND_PKG([ELDBUS], [ecore])
2980 EFL_INTERNAL_DEPEND_PKG([ELDBUS], [eo])
2981 EFL_INTERNAL_DEPEND_PKG([ELDBUS], [eina])
2982
2983 EFL_DEPEND_PKG([ELDBUS], [DBUS], [dbus-1])
2984
2985 EFL_EVAL_PKGS([ELDBUS])
2986
2987 ### Checks for header files
2988
2989 ### Checks for types
2990
2991 ### Checks for structures
2992
2993 ### Checks for compiler characteristics
2994
2995 ### Checks for linker characteristics
2996
2997 ### Checks for library functions
2998
2999 EFL_LIB_END([Eldbus])
3000 #### End of Eldbus
3001
3002
3003 #### Eeze
3004 have_libmount_new="no"
3005 have_libmount_old="no"
3006 have_eeze_mount="no"
3007
3008 EFL_LIB_START_OPTIONAL([Eeze], [test "x${build_libeeze}" = "xyes"])
3009
3010 ### Additional options to configure
3011 AC_ARG_WITH([mount],
3012   [AS_HELP_STRING([--with-mount], [specify mount bin @<:@default=detect@:>@])],
3013   [with_eeze_mount=$withval], [with_eeze_mount="detect"])
3014 AC_ARG_WITH([umount],
3015   [AS_HELP_STRING([--with-umount], [specify umount bin @<:@default=detect@:>@])],
3016   [with_eeze_umount=$withval], [with_eeze_umount="detect"])
3017 AC_ARG_WITH([eject],
3018   [AS_HELP_STRING([--with-eject], [specify eject bin @<:@default=detect@:>@])],
3019   [with_eeze_eject=$withval], [with_eeze_eject="detect"])
3020
3021 ### Default values
3022
3023 ### Checks for programs
3024
3025 ### Checks for libraries
3026 EFL_INTERNAL_DEPEND_PKG([EEZE], [eina])
3027 EFL_INTERNAL_DEPEND_PKG([EEZE], [ecore])
3028 EFL_INTERNAL_DEPEND_PKG([EEZE], [eo])
3029 EFL_INTERNAL_DEPEND_PKG([EEZE], [ecore-file])
3030 EFL_INTERNAL_DEPEND_PKG([EEZE], [ecore-con])
3031 EFL_INTERNAL_DEPEND_PKG([EEZE], [eet])
3032 EFL_INTERNAL_DEPEND_PKG([EEZE], [emile])
3033
3034 EFL_DEPEND_PKG([EEZE], [UDEV], [libudev >= 148])
3035
3036 AC_ARG_ENABLE([libmount],
3037    [AS_HELP_STRING([--disable-libmount],[disable libmount support. @<:@default=enabled@:>@])],
3038    [
3039     if test "x${enableval}" = "xyes" ; then
3040        want_libmount="yes"
3041     else
3042        want_libmount="no"
3043        CFOPT_WARNING="xyes"
3044     fi
3045    ],
3046    [want_libmount="yes"])
3047
3048 EFL_OPTIONAL_DEPEND_PKG([EEZE], [${want_libmount}],
3049    [EEZE_MOUNT], [mount >= 2.18.0])
3050 EFL_ADD_FEATURE([EEZE], [libmount], [${have_eeze_mount}])
3051
3052 PKG_CHECK_EXISTS([libudev < 199],
3053                  [have_libudev_old="yes"],
3054                  [have_libudev_old="no"])
3055 AC_MSG_CHECKING([Use old libudev API (before 199)])
3056 AC_MSG_RESULT([${have_libudev_old}])
3057
3058 PKG_CHECK_EXISTS([mount < 2.19.0],
3059                  [have_libmount_old="yes"],
3060                  [have_libmount_old="no"])
3061 AC_MSG_CHECKING([Use old libmount API (before 2.19.0)])
3062 AC_MSG_RESULT([${have_libmount_old}])
3063
3064 PKG_CHECK_EXISTS([mount == 2.19.0],
3065                  [have_libmount_219="yes"],
3066                  [have_libmount_219="no"])
3067 AC_MSG_CHECKING([Use libmount 2.19.0 API])
3068 AC_MSG_RESULT([${have_libmount_219}])
3069
3070 PKG_CHECK_EXISTS([mount > 2.19.0],
3071                  [have_libmount_new="yes"],
3072                  [have_libmount_new="no"])
3073 AC_MSG_CHECKING([Use new libmount API (newer than 2.19.0)])
3074 AC_MSG_RESULT([${have_libmount_new}])
3075
3076 if test "x${have_libudev_old}" = "xyes"; then
3077   AC_DEFINE_UNQUOTED([OLD_LIBUDEV], [1], [using older version of libudev])
3078 fi
3079
3080 if test "x${have_libmount_old}" = "xyes"; then
3081   AC_DEFINE_UNQUOTED([OLD_LIBMOUNT], [1], [using first version of libmount])
3082 fi
3083
3084 ## modules
3085 if test "${want_tizen}"  = "yes"; then
3086   PKG_CHECK_MODULES([TIZEN_SENSOR], [capi-system-sensor >= 0.1.17])
3087 fi
3088 EFL_ADD_FEATURE([EEZE], [tizen])
3089
3090 EFL_EVAL_PKGS([EEZE])
3091
3092 ### Checks for header files
3093
3094 ### Checks for types
3095
3096 ### Checks for structures
3097
3098 ### Checks for compiler characteristics
3099
3100 ### Checks for linker characteristics
3101
3102 ### Checks for library functions
3103
3104 ### Checks for binaries
3105 if test "x$with_eeze_mount" = "xdetect"; then
3106   AC_PATH_PROG([with_eeze_mount], [mount], [])
3107 fi
3108 AC_DEFINE_UNQUOTED([EEZE_MOUNT_BIN], ["$with_eeze_mount"], [mount bin to use])
3109
3110 if test "x$with_eeze_umount" = "xdetect";then
3111   AC_PATH_PROG([with_eeze_umount], [umount], [])
3112 fi
3113 AC_DEFINE_UNQUOTED([EEZE_UNMOUNT_BIN], ["$with_eeze_umount"], [umount bin to use])
3114
3115 if test "x$with_eeze_eject" = "xdetect";then
3116   AC_PATH_PROG([with_eeze_eject], [eject], [])
3117 fi
3118 AC_DEFINE_UNQUOTED([EEZE_EJECT_BIN], ["$with_eeze_eject"], [eject bin to use])
3119
3120 EFL_LIB_END_OPTIONAL([Eeze])
3121
3122 AM_CONDITIONAL([EEZE_LIBMOUNT_AFTER_219],
3123                [test "x${have_libmount_new}" = "xyes"])
3124 AM_CONDITIONAL([EEZE_LIBMOUNT_BEFORE_219],
3125                [test "x${have_libmount_old}" = "xyes"])
3126 AM_CONDITIONAL([HAVE_EEZE_MOUNT], [test "x${have_eeze_mount}" = "xyes"])
3127 AM_CONDITIONAL([HAVE_EEZE_TIZEN], [test "x${want_tizen}" = "xyes"])
3128 #### End of Eeze
3129
3130
3131 #### Ecore_Drm
3132 have_libinput_new="no"
3133 EFL_LIB_START_OPTIONAL([Ecore_Drm], [test "${want_drm}" = "yes"])
3134
3135 ### Additional options to configure
3136 SUID_CFLAGS=-fPIE
3137 SUID_LDFLAGS=-pie
3138 AC_SUBST([SUID_CFLAGS])
3139 AC_SUBST([SUID_LDFLAGS])
3140
3141 ### Default values
3142
3143 ### Checks for programs
3144
3145 ### Checks for libraries
3146 EFL_INTERNAL_DEPEND_PKG([ECORE_DRM], [ecore])
3147 EFL_INTERNAL_DEPEND_PKG([ECORE_DRM], [ecore-input])
3148 EFL_INTERNAL_DEPEND_PKG([ECORE_DRM], [eldbus])
3149 EFL_INTERNAL_DEPEND_PKG([ECORE_DRM], [eeze])
3150 EFL_INTERNAL_DEPEND_PKG([ECORE_DRM], [eo])
3151 EFL_INTERNAL_DEPEND_PKG([ECORE_DRM], [eina])
3152
3153 EFL_DEPEND_PKG([ECORE_DRM], [DRM], [libdrm >= 2.4 xkbcommon >= 0.3.0 gbm])
3154 EFL_DEPEND_PKG([ECORE_DRM], [LIBINPUT], [libinput >= 0.6.0])
3155
3156 # API change from 0.7 to 0.8. So we define this to support both for now.
3157 PKG_CHECK_EXISTS([libinput >= 0.8.0],
3158                  [have_libinput_new="yes"],
3159                  [have_libinput_new="no"])
3160 AC_MSG_CHECKING([Use new libinput API (newer than 0.8.0)])
3161 AC_MSG_RESULT([${have_libinput_new}])
3162 if test "x${have_libinput_new}" = "xyes";then
3163   AC_DEFINE_UNQUOTED([LIBINPUT_HIGHER_08], [1], [libinput version >= 0.8])
3164 fi
3165 if test "x${have_libinput_new}" = "xno";then
3166   AC_DEFINE_UNQUOTED([LIBINPUT_HIGHER_08], [0], [libinput version >= 0.8])
3167 fi
3168
3169
3170 EFL_EVAL_PKGS([ECORE_DRM])
3171
3172 ### Checks for header files
3173
3174 ### Checks for types
3175
3176 ### Checks for structures
3177
3178 ### Checks for compiler characteristics
3179
3180 ### Checks for linker characteristics
3181
3182 ### Checks for library functions
3183
3184 EFL_LIB_END_OPTIONAL([Ecore_Drm])
3185 #### End of Ecore_Drm
3186
3187
3188 #### Ecore_Audio
3189
3190 AC_ARG_ENABLE([audio],
3191    [AS_HELP_STRING([--disable-audio],[disable audio support. @<:@default=enabled@:>@])],
3192    [
3193     if test "x${enableval}" = "xyes" ; then
3194        want_audio="yes"
3195     else
3196        want_audio="no"
3197        CFOPT_WARNING="xyes"
3198     fi
3199    ],
3200    [want_audio="yes"])
3201
3202 EFL_LIB_START_OPTIONAL([Ecore_Audio], [test "${want_audio}" = "yes"])
3203
3204 ### Additional options to configure
3205
3206 # ALSA support is still not there, thus no option for it yet.
3207 want_alsa="no"
3208
3209 # sndfile is mandatory otherwise it won't read from/write to files.
3210 # TODO: if confirmed sndfile is mandatory, remove this variable
3211 # TODO: and the EFL_OPTIONAL_DEPEND_PKG(), use EFL_DEPEND_PKG()
3212 want_sndfile="yes"
3213
3214 AC_ARG_ENABLE([pulseaudio],
3215    [AS_HELP_STRING([--disable-pulseaudio],[disable pulseaudio sound support. @<:@default=enabled@:>@])],
3216    [
3217     if test "x${enableval}" = "xyes" ; then
3218        want_pulseaudio="yes"
3219     else
3220        want_pulseaudio="no"
3221        CFOPT_WARNING="xyes"
3222     fi
3223    ],
3224    [want_pulseaudio="yes"])
3225
3226 if test "x${have_darwin}" = "xyes"; then
3227    want_pulseaudio="no"
3228    want_alsa="no"
3229    want_coreaudio="yes"
3230 else
3231    want_coreaudio="no"
3232 fi
3233
3234
3235 # CoreAudio flags
3236 if test "x${want_coreaudio}" = "xyes"; then
3237    coreaudio_ldflags=""
3238    have_coreaudio="no"
3239    LIBS_save="$LIBS"
3240    LIBS="$LIBS -framework CoreAudio"
3241    AC_LINK_IFELSE(
3242       [AC_LANG_PROGRAM(
3243          [[
3244 #include <CoreAudio/CoreAudio.h>
3245          ]],
3246          [[
3247 UInt32 size;
3248 AudioDeviceID dev_id;
3249 AudioObjectPropertyAddress prop = {
3250    kAudioHardwarePropertyDefaultOutputDevice,
3251    kAudioObjectPropertyScopeGlobal,
3252    kAudioObjectPropertyElementMaster
3253 };
3254 size = sizeof(AudioDeviceID);
3255 AudioObjectGetPropertyData(kAudioObjectSystemObject, &prop, 0, NULL,
3256                            &size, &dev_id);
3257          ]])],
3258          [
3259           have_coreaudio="yes"
3260           coreaudio_ldflags="-framework CoreAudio"
3261          ],
3262          [have_coreaudio="no"])
3263       LIBS="$LIBS_save"
3264       AC_MSG_CHECKING([whether Apple CoreAudio framework is supported])
3265       AC_MSG_RESULT([${have_coreaudio}])
3266 fi
3267 AC_SUBST(coreaudio_ldflags)
3268 if test "x${have_coreaudio}" = "xyes"; then
3269    AC_DEFINE([HAVE_COREAUDIO], [1], [CoreAudio support enabled])
3270 else
3271    AC_DEFINE([HAVE_COREAUDIO], [0], [CoreAudio support disabled])
3272 fi
3273
3274
3275 ### Default values
3276
3277 ### Checks for programs
3278
3279 ## Compatibility layers
3280 EFL_PLATFORM_DEPEND([ECORE_AUDIO], [evil])
3281
3282 ### Checks for libraries
3283 EFL_INTERNAL_DEPEND_PKG([ECORE_AUDIO], [ecore])
3284 EFL_INTERNAL_DEPEND_PKG([ECORE_AUDIO], [eet])
3285 EFL_INTERNAL_DEPEND_PKG([ECORE_AUDIO], [eo])
3286 EFL_INTERNAL_DEPEND_PKG([ECORE_AUDIO], [eina])
3287 EFL_INTERNAL_DEPEND_PKG([ECORE_AUDIO], [emile])
3288
3289 EFL_ADD_LIBS([ECORE_AUDIO], [-lm])
3290
3291 EFL_OPTIONAL_DEPEND_PKG([ECORE_AUDIO], [${want_alsa}], [ALSA], [alsa])
3292 EFL_OPTIONAL_DEPEND_PKG([ECORE_AUDIO], [${want_pulseaudio}], [PULSE], [libpulse])
3293 EFL_OPTIONAL_DEPEND_PKG([ECORE_AUDIO], [${want_sndfile}], [SNDFILE], [sndfile])
3294
3295 EFL_EVAL_PKGS([ECORE_AUDIO])
3296
3297 EFL_ADD_FEATURE([ECORE_AUDIO], [alsa])
3298 EFL_ADD_FEATURE([ECORE_AUDIO], [pulseaudio])
3299 EFL_ADD_FEATURE([ECORE_AUDIO], [sndfile])
3300 EFL_ADD_FEATURE([ECORE_AUDIO], [coreaudio])
3301
3302 ### Checks for header files
3303
3304 ### Checks for types
3305
3306 ### Checks for structures
3307
3308 ### Checks for compiler characteristics
3309
3310 ### Checks for linker characteristics
3311
3312 ### Checks for library functions
3313
3314 EFL_LIB_END_OPTIONAL([Ecore_Audio])
3315 AM_CONDITIONAL([HAVE_ECORE_AUDIO_PULSE], [test "x${want_pulseaudio}" = "xyes"])
3316 AM_CONDITIONAL([HAVE_ECORE_AUDIO_SNDFILE], [test "x${want_sndfile}" = "xyes"])
3317 AM_CONDITIONAL([HAVE_ECORE_AUDIO_CORE_AUDIO], [test "x${want_coreaudio}" = "xyes"])
3318
3319 #### End of Ecore_Audio
3320
3321 #### Ecore Audio CXX
3322 EFL_LIB_START([Ecore_Audio_Cxx])
3323
3324 EFL_EVAL_PKGS([ECORE_AUDIO_CXX])
3325
3326 EFL_LIB_END([Ecore_Audio_Cxx])
3327 #### End of Ecore Audio CXX
3328
3329 #### Ecore_Win32
3330 EFL_LIB_START_OPTIONAL([Ecore_Win32], [test "${have_win32}" = "yes"])
3331
3332 ### Additional options to configure
3333
3334 ### Default values
3335
3336 ### Checks for programs
3337
3338 ### Checks for libraries
3339 EFL_PLATFORM_DEPEND([ECORE_WIN32], [evil])
3340 EFL_INTERNAL_DEPEND_PKG([ECORE_WIN32], [ecore-input])
3341 EFL_INTERNAL_DEPEND_PKG([ECORE_WIN32], [ecore])
3342 EFL_INTERNAL_DEPEND_PKG([ECORE_WIN32], [eo])
3343 EFL_INTERNAL_DEPEND_PKG([ECORE_WIN32], [eina])
3344
3345 EFL_ADD_LIBS([ECORE_WIN32], [-lole32 -lgdi32])
3346 AC_SUBST([ECORE_WIN32_LIBS])
3347
3348 ### Checks for header files
3349
3350 ### Checks for types
3351
3352 ### Checks for structures
3353
3354 ### Checks for compiler characteristics
3355
3356 ### Checks for linker characteristics
3357
3358 ### Checks for library functions
3359
3360 EFL_LIB_END_OPTIONAL([Ecore_Win32])
3361 #### End of Ecore_Win32
3362
3363 #### Ecore_Avahi
3364
3365 EFL_LIB_START([Ecore_Avahi])
3366
3367 ### Default values
3368
3369 ### Additional options to configure
3370
3371 want_avahi="yes"
3372
3373 AC_ARG_ENABLE([avahi],
3374    [AS_HELP_STRING([--disable-avahi],[disable avahi support. @<:@default=enabled@:>@])],
3375    [
3376     if test "x${enableval}" = "xyes" ; then
3377        want_avahi="yes"
3378     else
3379        want_avahi="no"
3380     fi
3381    ], [
3382     want_avahi="yes"
3383    ])
3384
3385 ### Checks for programs
3386
3387 ## Compatibility layers
3388 EFL_PLATFORM_DEPEND([ECORE_AVAHI], [evil])
3389
3390 ### Checks for libraries
3391 EFL_INTERNAL_DEPEND_PKG([ECORE_AVAHI], [ecore])
3392 EFL_INTERNAL_DEPEND_PKG([ECORE_AVAHI], [eina])
3393 EFL_INTERNAL_DEPEND_PKG([ECORE_AVAHI], [eo])
3394
3395 EFL_OPTIONAL_DEPEND_PKG([ECORE_AVAHI], [${want_avahi}], [AVAHI], [avahi-client], [have_avahi=yes], [have_avahi=no])
3396
3397 EFL_ADD_FEATURE([ECORE_AVAHI], [avahi-client], [${have_avahi}])
3398
3399 # Needed bu example as they use avahi directly in that case
3400 if test "x${have_avahi}" = "xyes"; then
3401    PKG_CHECK_MODULES([AVAHI_CLIENT], [avahi-client])
3402 fi
3403
3404 EFL_EVAL_PKGS([ECORE_AVAHI])
3405
3406 ### Checks for header files
3407
3408 ### Checks for types
3409
3410 ### Checks for structures
3411
3412 ### Checks for compiler characteristics
3413
3414 ### Checks for linker characteristics
3415
3416 ### Checks for library functions
3417
3418 EFL_LIB_END([Ecore_Avahi])
3419
3420 #### End of Ecore_Avahi
3421
3422
3423 #### Ecore_X
3424 EFL_LIB_START_OPTIONAL([Ecore_X], [test "${want_x11_any}" = "yes"])
3425
3426 ### Additional options to configure
3427
3428 AC_ARG_ENABLE([gesture],
3429    [AS_HELP_STRING([--enable-gesture],[enable X11 Gesture extension support])],
3430    [
3431     if test "x${enableval}" = "xyes" ; then
3432        want_gesture="yes"
3433     else
3434        want_gesture="no"
3435     fi
3436    ],
3437    [want_gesture="no"])
3438
3439 AC_ARG_ENABLE([xpresent],
3440    [AS_HELP_STRING([--enable-xpresent],[enable X11 XPresent extension support])],
3441    [
3442     if test "x${enableval}" = "xyes" ; then
3443        want_xpresent="yes"
3444     else
3445        want_xpresent="no"
3446     fi
3447    ],
3448    [want_xpresent="no"])
3449
3450 AC_ARG_ENABLE([xinput2],
3451    [AS_HELP_STRING([--disable-xinput2],[disable X11 XInput v2.x support])],
3452    [
3453     if test "x${enableval}" = "xyes" ; then
3454        want_xinput2="yes"
3455     else
3456        want_xinput2="no"
3457        CFOPT_WARNING="xyes"
3458     fi
3459    ],
3460    [want_xinput2="yes"])
3461
3462 AC_ARG_ENABLE([xinput22],
3463    [AS_HELP_STRING([--enable-xinput22],[enable X11 XInput v2.2+ support])],
3464    [
3465     if test "x${enableval}" = "xyes" ; then
3466        want_xinput22="yes"
3467     else
3468        want_xinput22="no"
3469     fi
3470    ],
3471    [want_xinput22="no"])
3472
3473 AC_ARG_ENABLE([xim],
3474    [AS_HELP_STRING([--disable-xim],[disable X Input Method.])],
3475    [
3476     if test "x${enableval}" = "xyes" ; then
3477        want_xim="yes"
3478     else
3479        want_xim="no"
3480        CFOPT_WARNING="xyes"
3481     fi
3482    ],
3483    [want_xim="yes"])
3484
3485 AC_ARG_ENABLE([scim],
3486    [AS_HELP_STRING([--disable-scim],[disable SCIM.])],
3487    [
3488     if test "x${enableval}" = "xyes" ; then
3489        want_scim="yes"
3490     else
3491        want_scim="no"
3492        CFOPT_WARNING="xyes"
3493     fi
3494    ],
3495    [want_scim="yes"])
3496
3497 AC_ARG_ENABLE([ibus],
3498    [AS_HELP_STRING([--disable-ibus],[disable IBUS.])],
3499    [
3500     if test "x${enableval}" = "xyes" ; then
3501        want_ibus="yes"
3502     else
3503        want_ibus="no"
3504     fi
3505    ],
3506    [want_ibus="yes"])
3507
3508 ### Default values
3509
3510 ### Checks for programs
3511
3512 ### Checks for libraries
3513 EFL_INTERNAL_DEPEND_PKG([ECORE_X], [ecore-input])
3514 EFL_INTERNAL_DEPEND_PKG([ECORE_X], [ecore])
3515 EFL_INTERNAL_DEPEND_PKG([ECORE_X], [eo])
3516 EFL_INTERNAL_DEPEND_PKG([ECORE_X], [eina])
3517
3518 ## Xlib
3519
3520 ## XCB
3521
3522 ### Checks for header files
3523
3524 AC_CHECK_DECL([MAXHOSTNAMELEN], [FOUND_MAXHOSTNAMELEN=yes])
3525
3526 if test "x${FOUND_MAXHOSTNAMELEN}" != "xyes" ; then
3527    FOUND_MAXHOSTNAMELEN="not found"
3528
3529    AC_COMPILE_IFELSE(
3530       [
3531        AC_LANG_PROGRAM(
3532           [[
3533 #include <sys/param.h>
3534           ]],
3535           [[
3536 int h = MAXHOSTNAMELEN;
3537           ]])
3538       ],
3539       [
3540        FOUND_MAXHOSTNAMELEN="sys/param.h"
3541        AC_DEFINE([NEED_SYS_PARAM_H], [1], [Define to 1 if you need <sys/param.h> to define MAXHOSTNAMELEN])
3542       ])
3543
3544    AC_COMPILE_IFELSE(
3545       [
3546        AC_LANG_PROGRAM(
3547           [[
3548 #include <netdb.h>
3549           ]],
3550           [[
3551 int h = MAXHOSTNAMELEN;
3552           ]])
3553       ],
3554       [
3555        FOUND_MAXHOSTNAMELEN="netdb.h"
3556        AC_DEFINE([NEED_NETDB_H], [1], [Define to 1 if you need <netdb.h> to define MAXHOSTNAMELEN])
3557       ])
3558
3559    AC_MSG_CHECKING([for header that defines MAXHOSTNAMELEN])
3560    AC_MSG_RESULT([$FOUND_MAXHOSTNAMELEN])
3561 fi
3562
3563 ## Xlib
3564 if test "x${want_x11_xcb}" = "xyes" ; then
3565    KEYSYMDEFDIR=`$PKG_CONFIG --variable=includedir xproto`/X11
3566    FILES="keysymdef.h XF86keysym.h Sunkeysym.h DECkeysym.h HPkeysym.h"
3567    for i in $FILES; do
3568        if test -f "$KEYSYMDEFDIR/$i"; then
3569          KEYSYMDEFS="$KEYSYMDEFS $KEYSYMDEFDIR/$i"
3570        elif test "x$i" = "xkeysymdef.h"; then
3571          AC_MSG_ERROR([Cannot find keysymdef.h])
3572        fi
3573    done
3574    AC_MSG_CHECKING([keysym definitions])
3575    AC_MSG_RESULT([$KEYSYMDEFS])
3576    AC_SUBST([KEYSYMDEFS])
3577 fi
3578
3579 ### Checks for types
3580
3581 ### Checks for structures
3582
3583 ### Checks for compiler characteristics
3584
3585 ### Checks for linker characteristics
3586
3587 ### Checks for library functions
3588
3589 ## Xlib
3590 if test "x${want_x11_xlib}" = "xyes"; then
3591    EFL_FIND_X(ECORE_X_XLIB,
3592      [X11/Xlib.h X11/Xcursor/Xcursor.h],
3593      [X11 XOpenDisplay Xcursor XcursorImageLoadCursor],
3594      [
3595        use_Xcursor="yes"
3596        AC_DEFINE([ECORE_XCURSOR], 1, [Build support for Xcursor])
3597        EFL_ADD_LIBS([ECORE_X], [$ECORE_X_XLIB_libs])
3598        EFL_ADD_CFLAGS([ECORE_X], [$ECORE_X_XLIB_cflags])
3599      ],[
3600        AC_MSG_ERROR([Xcursor is missing])
3601      ])
3602 fi
3603
3604 if test "x${want_x11_xlib}" = "xyes" ; then
3605    ECORE_CHECK_X_EXTENSION([Xkb], [XKB.h], [X11], [XkbSetDetectableAutoRepeat])
3606    ECORE_CHECK_X_EXTENSION([Xcomposite], [Xcomposite.h], [Xcomposite], [XCompositeQueryExtension])
3607    ECORE_CHECK_X_EXTENSION([Xdamage], [Xdamage.h], [Xdamage], [XDamageSubtract])
3608    ECORE_CHECK_X_EXTENSION([Xdpms], [dpms.h], [Xext], [DPMSQueryExtension])
3609    ECORE_CHECK_X_EXTENSION([Xfixes], [Xfixes.h], [Xfixes], [XFixesExpandRegion])
3610    ECORE_CHECK_X_EXTENSION([Xinerama], [Xinerama.h], [Xinerama], [XineramaQueryScreens])
3611    ECORE_CHECK_X_EXTENSION([Xprint], [Print.h], [Xp], [XpQueryScreens])
3612    ECORE_CHECK_X_EXTENSION([Xrandr], [Xrandr.h], [Xrandr], [XRRGetScreenResourcesCurrent])
3613    ECORE_CHECK_X_EXTENSION([Xrender], [Xrender.h], [Xrender], [XRenderFindVisualFormat])
3614    ECORE_CHECK_X_EXTENSION([Xtest], [XTest.h], [Xtst], [XTestFakeKeyEvent])
3615    ECORE_CHECK_X_EXTENSION([Xss], [scrnsaver.h], [Xss], [XScreenSaverSelectInput])
3616
3617    PKG_CHECK_EXISTS([xrandr > 1.3.2], [AC_DEFINE([XRANDR_GOOD], [1], [good xrandr])], [])
3618
3619    if test "${want_xpresent}" = "yes"; then
3620       ECORE_CHECK_X_EXTENSION([Xpresent], [Xpresent.h], [Xpresent], [XPresentQueryExtension])
3621    fi
3622    EFL_ADD_FEATURE([ECORE_X], [xpresent])
3623
3624    if test "${want_gesture}" = "yes"; then
3625       ECORE_CHECK_X_EXTENSION([Xgesture], [gesture.h], [Xgesture], [XGestureQueryExtension])
3626    fi
3627    EFL_ADD_FEATURE([ECORE_X], [gesture])
3628
3629    if test "${want_xinput2}" = "yes"; then
3630       ECORE_CHECK_X_EXTENSION([Xi2], [XInput2.h], [Xi], [XIQueryDevice])
3631    fi
3632    EFL_ADD_FEATURE([ECORE_X], [xinput2])
3633
3634    if test "${want_xinput22}" = "yes"; then
3635       ECORE_CHECK_X_EXTENSION([Xi2_2], [XInput2.h], [Xi],[XIGrabTouchBegin])
3636    fi
3637    EFL_ADD_FEATURE([ECORE_X], [xinput22])
3638
3639    AC_DEFINE([HAVE_ECORE_X_XLIB], [1], [Defined to 1 if Xlib is enabled.])
3640    HAVE_ECORE_X_BACKEND="HAVE_ECORE_X_XLIB"
3641
3642    EFL_EVAL_PKGS([ECORE_X])
3643    EFL_CHECK_FUNCS([ECORE_X], [dlopen dlsym])
3644 fi
3645
3646 ## XCB
3647
3648 if test "${want_x11_xcb}" = "yes"; then
3649 dnl note: added pixman-1 as ecore_xcb_region uses that
3650    EFL_DEPEND_PKG([ECORE_X], [ECORE_X_XCB],
3651       [x11-xcb xcb xcb-shm xcb-event xcb-icccm >= 0.3.8 xcb-util >= 0.3.8 xcb-image xcb-keysyms >= 0.3.8 xcb-composite xcb-present xcb-damage xcb-dpms xcb-randr xcb-render xcb-screensaver xcb-shape xcb-sync xcb-xfixes xcb-xinerama xcb-xtest xcb-renderutil pixman-1])
3652
3653 dnl TODO: remove these ifdefs from code!
3654    AC_DEFINE([ECORE_XCB_COMPOSITE], [1], [Build support for XCB composite])
3655    AC_DEFINE([ECORE_XCB_DAMAGE], [1], [Build support for XCB damage])
3656    AC_DEFINE([ECORE_XCB_DPMS], [1], [Build support for XCB dpms])
3657    AC_DEFINE([ECORE_XCB_RANDR], [1], [Build support for XCB randr])
3658    AC_DEFINE([ECORE_XCB_RENDER], [1], [Build support for XCB render])
3659    AC_DEFINE([ECORE_XCB_SCREENSAVER], [1], [Build support for XCB screensaver])
3660    AC_DEFINE([ECORE_XCB_SHAPE], [1], [Build support for XCB shape])
3661    AC_DEFINE([ECORE_XCB_SYNC], [1], [Build support for XCB sync])
3662    AC_DEFINE([ECORE_XCB_XFIXES], [1], [Build support for XCB xfixes])
3663    AC_DEFINE([ECORE_XCB_XINERAMA], [1], [Build support for XCB xinerama])
3664    AC_DEFINE([ECORE_XCB_XTEST], [1], [Build support for XCB xtest])
3665    AC_DEFINE([ECORE_XCB_CURSOR], [1], [Build support for XCB cursor])
3666
3667    EFL_OPTIONAL_DEPEND_PKG([ECORE_X], [${want_xpresent}], [ECORE_XCB_XPRESENT],
3668       [xcb-present])
3669    AC_DEFINE_IF([ECORE_XCB_XPRESENT], [test "${want_xpresent}" = "yes"],
3670       [1], [Build support for XCB Present])
3671    EFL_ADD_FEATURE([ECORE_X], [xpresent])
3672
3673    EFL_OPTIONAL_DEPEND_PKG([ECORE_X], [${want_gesture}], [ECORE_XCB_GESTURE],
3674       [xcb-gesture])
3675    AC_DEFINE_IF([ECORE_XCB_XGESTURE], [test "${want_gesture}" = "yes"],
3676       [1], [Build support for XCB xgesture])
3677
3678    EFL_ADD_FEATURE([ECORE_X], [gesture])
3679
3680 dnl input extension disabled currently in xcb as xcb-input has some issues
3681 dnl remember to add xcb-xinput to EFL_DEPEND_PKG()
3682 dnl AC_DEFINE([ECORE_XCB_XINPUT], [1], [Build support for XCB input])
3683
3684 dnl dri extension disabled currently in xcb
3685 dnl remember to add xcb-dri2 to EFL_DEPEND_PKG()
3686 dnl AC_DEFINE([ECORE_XCB_DRI], [1], [Build support for XCB dri])
3687
3688    EFL_EVAL_PKGS([ECORE_X])
3689    EFL_CHECK_FUNCS([ECORE_X], [dlopen iconv])
3690
3691    HAVE_ECORE_X_BACKEND="HAVE_ECORE_X_XCB"
3692 fi
3693
3694 EFL_ADD_LIBS([ECORE_X], [${ECORE_X_LIBS}])
3695
3696 AC_SUBST([HAVE_ECORE_X_BACKEND])
3697
3698 EFL_LIB_END_OPTIONAL([Ecore_X])
3699
3700 AM_CONDITIONAL([HAVE_ECORE_X_XLIB], [test "${want_x11_xlib}" = "yes"])
3701 AM_CONDITIONAL([HAVE_ECORE_X_XCB], [test "${want_x11_xcb}" = "yes"])
3702 #### End of Ecore_X
3703
3704
3705 #### Ecore_Imf
3706 EFL_LIB_START([Ecore_Imf])
3707
3708 ### Additional options to configure
3709
3710 ### Default values
3711
3712 want_ecore_imf="yes"
3713 want_ecore_imf_xim="no"
3714 want_ecore_imf_scim="no"
3715 want_ecore_imf_ibus="no"
3716 want_ecore_imf_wayland="no"
3717 want_ecore_imf="yes"
3718
3719 if test "${have_windows}" = "no" && test "${have_darwin}" = "no"; then
3720    want_ecore_imf="yes"
3721    want_ecore_imf_xim="yes"
3722    want_ecore_imf_scim="yes"
3723    want_ecore_imf_ibus="yes"
3724    if test "${want_wayland}" = "yes"; then
3725       want_ecore_imf_wayland="yes"
3726    fi
3727 fi
3728
3729 ### Checks for programs
3730
3731 ## Compatibility layers
3732 EFL_PLATFORM_DEPEND([ECORE_IMF], [evil])
3733
3734 ### Checks for libraries
3735 EFL_PLATFORM_DEPEND([ECORE_IMF], [escape])
3736 EFL_INTERNAL_DEPEND_PKG([ECORE_IMF], [ecore])
3737 EFL_INTERNAL_DEPEND_PKG([ECORE_IMF], [ecore-input])
3738 EFL_INTERNAL_DEPEND_PKG([ECORE_IMF], [eo])
3739 EFL_INTERNAL_DEPEND_PKG([ECORE_IMF], [eina])
3740
3741 if test "x${want_ecore_imf}" = "xyes" ; then
3742    AC_DEFINE([HAVE_ECORE_IMF], [1], [Ecore IMF Support])
3743 fi
3744
3745 ## modules
3746
3747 # ibus
3748
3749 have_ecore_imf_ibus="no"
3750 if test "x${want_ibus}" = "xyes" && test "x${want_ecore_imf_ibus}" = "xyes" && test "x${have_glib}" = "xyes" ; then
3751    PKG_CHECK_MODULES([IBUS],
3752       [ibus-1.0 >= 1.4 glib-2.0],
3753       [
3754        have_ecore_imf_ibus="yes"
3755        AC_DEFINE([BUILD_ECORE_IMF_IBUS], [1], [Ecore Imf IBUS Support])
3756       ],
3757       [have_ecore_imf_ibus="no"])
3758 fi
3759
3760 AM_CONDITIONAL([BUILD_ECORE_IMF_IBUS], [test "x${have_ecore_imf_ibus}" = "xyes"])
3761 EFL_ADD_FEATURE([ECORE_IMF], [ibus], [${have_ecore_imf_ibus}])
3762
3763 # scim
3764
3765 have_ecore_imf_scim="no"
3766 if test "x${want_scim}" = "xyes" && test "x${want_ecore_imf_scim}" = "xyes" ; then
3767    PKG_CHECK_MODULES([SCIM],
3768       [scim],
3769       [
3770        have_ecore_imf_scim="yes"
3771        AC_DEFINE([BUILD_ECORE_IMF_SCIM], [1], [Ecore Imf SCIM Support])
3772       ],
3773       [have_ecore_imf_scim="no"])
3774 fi
3775
3776 AM_CONDITIONAL([BUILD_ECORE_IMF_SCIM], [test "x${have_ecore_imf_scim}" = "xyes"])
3777 EFL_ADD_FEATURE([ECORE_IMF], [scim], [${have_ecore_imf_scim}])
3778
3779 # xim
3780
3781 have_ecore_imf_xim="no"
3782 if test "x${want_xim}" = "xyes" && test "x${want_ecore_imf_xim}" = "xyes" ; then
3783
3784  EFL_FIND_X(ecore_imf_xim,
3785    [X11/Xlib.h],
3786    [X11 XOpenIM],
3787    [
3788      have_ecore_imf_xim=yes
3789      AC_DEFINE([ENABLE_XIM], [1], [Enable X Input Method])
3790    ])
3791 fi
3792
3793 AM_CONDITIONAL([BUILD_ECORE_IMF_XIM], [test "x${have_ecore_imf_xim}" = "xyes"])
3794 EFL_ADD_FEATURE([ECORE_IMF], [xim])
3795
3796 # wayland
3797 if test "x${want_ecore_imf_wayland}" = "xyes" ; then
3798    PKG_CHECK_MODULES([WAYLAND],
3799       [wayland-client >= 1.2.0],
3800       [
3801        have_ecore_imf_wayland="yes"
3802        AC_DEFINE([BUILD_ECORE_IMF_WAYLAND], [1], [Ecore Imf Wayland Support])
3803       ],
3804       [have_ecore_imf_wayland="no"])
3805 fi
3806
3807 AM_CONDITIONAL([BUILD_ECORE_IMF_WAYLAND], [test "x${have_ecore_imf_wayland}" = "xyes"])
3808 EFL_ADD_FEATURE([ECORE_IMF], [wayland], [${want_ecore_imf_wayland}])
3809
3810 ### Checks for header files
3811
3812 ### Checks for types
3813
3814 ### Checks for structures
3815
3816 ### Checks for compiler characteristics
3817
3818 ### Checks for linker characteristics
3819
3820 ### Checks for library functions
3821
3822 EFL_LIB_END([Ecore_Imf])
3823 #### End of Ecore_Imf
3824
3825
3826 #### Ecore_Imf_Evas
3827 EFL_LIB_START([Ecore_Imf_Evas])
3828
3829 ### Additional options to configure
3830
3831 ### Default values
3832
3833 ### Checks for programs
3834
3835 ## Compatibility layers
3836 EFL_PLATFORM_DEPEND([ECORE_IMF_EVAS], [evil])
3837
3838 ### Checks for libraries
3839 EFL_PLATFORM_DEPEND([ECORE_IMF_EVAS], [escape])
3840 EFL_INTERNAL_DEPEND_PKG([ECORE_IMF_EVAS], [ecore-imf])
3841 EFL_INTERNAL_DEPEND_PKG([ECORE_IMF_EVAS], [ecore])
3842 EFL_INTERNAL_DEPEND_PKG([ECORE_IMF_EVAS], [evas])
3843 EFL_INTERNAL_DEPEND_PKG([ECORE_IMF_EVAS], [efl])
3844 EFL_INTERNAL_DEPEND_PKG([ECORE_IMF_EVAS], [eo])
3845 EFL_INTERNAL_DEPEND_PKG([ECORE_IMF_EVAS], [eina])
3846 EFL_INTERNAL_DEPEND_PKG([ECORE_IMF_EVAS], [emile])
3847
3848 ### Checks for header files
3849
3850 ### Checks for types
3851
3852 ### Checks for structures
3853
3854 ### Checks for compiler characteristics
3855
3856 ### Checks for linker characteristics
3857
3858 ### Checks for library functions
3859
3860 EFL_LIB_END([Ecore_Imf_Evas])
3861 #### End of Ecore_Imf_Evas
3862
3863
3864 #### Ecore_Evas
3865 EFL_LIB_START([Ecore_Evas])
3866
3867 ### Additional options to configure
3868
3869 ### Default values
3870
3871 want_ecore_evas_software_gdi="${have_evas_engine_software_gdi}"
3872 want_ecore_evas_software_ddraw="${have_evas_engine_software_ddraw}"
3873 want_ecore_evas_gl_cocoa="${have_evas_engine_gl_cocoa}"
3874 want_ecore_evas_wayland_egl="${have_evas_engine_wayland_egl}"
3875 want_ecore_evas_extn="yes"
3876 want_ecore_evas_drm="${have_evas_engine_drm}"
3877
3878 if test "x${have_ecore_ipc}" = "xno" || \
3879    test "x${efl_func_shm_open}" = "xno" || \
3880    test "x${have_windows}" = "xyes" ; then
3881    want_ecore_evas_extn="no"
3882 fi
3883
3884 ### Checks for programs
3885
3886 ## Compatibility layers
3887 EFL_PLATFORM_DEPEND([ECORE_EVAS], [evil])
3888
3889 ### Checks for libraries
3890 EFL_INTERNAL_DEPEND_PKG([ECORE_EVAS], [ecore-input-evas])
3891 EFL_INTERNAL_DEPEND_PKG([ECORE_EVAS], [ecore-input])
3892 EFL_INTERNAL_DEPEND_PKG([ECORE_EVAS], [ecore])
3893 EFL_INTERNAL_DEPEND_PKG([ECORE_EVAS], [eet])
3894 EFL_INTERNAL_DEPEND_PKG([ECORE_EVAS], [evas])
3895 EFL_INTERNAL_DEPEND_PKG([ECORE_EVAS], [efl])
3896 EFL_INTERNAL_DEPEND_PKG([ECORE_EVAS], [eo])
3897 EFL_INTERNAL_DEPEND_PKG([ECORE_EVAS], [eina])
3898 EFL_INTERNAL_DEPEND_PKG([ECORE_EVAS], [emile])
3899
3900 ## modules
3901 ECORE_EVAS_MODULE([extn], [${want_ecore_evas_extn}])
3902 ECORE_EVAS_MODULE([ews], [yes])
3903 ECORE_EVAS_MODULE([fb], [${want_fb}])
3904 ECORE_EVAS_MODULE([drm], [${want_drm}], 
3905   [EFL_OPTIONAL_INTERNAL_DEPEND_PKG([ECORE_EVAS], [${want_drm}], [ecore-drm])])
3906 ECORE_EVAS_MODULE([gl-drm], [${want_gl_drm}],
3907   [EFL_OPTIONAL_INTERNAL_DEPEND_PKG([ECORE_EVAS], [${want_gl_drm}], [ecore-drm])])
3908 ECORE_EVAS_MODULE([psl1ght], [${have_ps3}])
3909
3910 ECORE_EVAS_MODULE([opengl-cocoa], [${want_ecore_evas_gl_cocoa}])
3911
3912 ECORE_EVAS_MODULE([software-sdl], [${want_sdl}])
3913 ECORE_EVAS_MODULE([opengl-sdl], [${want_gl_sdl}])
3914
3915 build_ecore_evas_sdl="no"
3916 if test "x${have_ecore_evas_software_sdl}" = "xyes" || \
3917    test "x${have_ecore_evas_opengl_sdl}" = "xyes" ; then
3918    build_ecore_evas_sdl="yes"
3919    AC_DEFINE(BUILD_ECORE_EVAS_SDL, 1, [Support for SDL Engine in Ecore_Evas])
3920 fi
3921 AM_CONDITIONAL([BUILD_ECORE_EVAS_SDL],
3922    [test "${build_ecore_evas_sdl}" = "yes"])
3923
3924 ECORE_EVAS_MODULE([wayland-shm], [${want_wayland}])
3925 ECORE_EVAS_MODULE([wayland-egl], [${want_ecore_evas_wayland_egl}])
3926
3927 build_ecore_evas_wayland="no"
3928 if test "x${have_ecore_evas_wayland_shm}" = "xyes" || \
3929    test "x${have_ecore_evas_wayland_egl}" = "xyes" ; then
3930    build_ecore_evas_wayland="yes"
3931    AC_DEFINE(BUILD_ECORE_EVAS_WAYLAND, 1, [Support for Wayland Engine in Ecore_Evas])
3932 fi
3933 AM_CONDITIONAL([BUILD_ECORE_EVAS_WAYLAND],
3934    [test "${build_ecore_evas_wayland}" = "yes"])
3935
3936 ECORE_EVAS_MODULE([software-gdi], [${want_ecore_evas_software_gdi}])
3937 ECORE_EVAS_MODULE([software-ddraw], [${want_ecore_evas_software_ddraw}])
3938
3939 build_ecore_evas_win32="no"
3940 if test "x${have_ecore_evas_software_gdi}" = "xyes" || \
3941    test "x${have_ecore_evas_software_ddraw}" = "xyes" ; then
3942    build_ecore_evas_win32="yes"
3943    AC_DEFINE(BUILD_ECORE_EVAS_WIN32, 1, [Support for Win32 Engine in Ecore_Evas])
3944 fi
3945 AM_CONDITIONAL([BUILD_ECORE_EVAS_WIN32],
3946    [test "${build_ecore_evas_win32}" = "yes"])
3947
3948
3949 # XXX TODO: ecore_evas_x11
3950
3951 ECORE_EVAS_MODULE([software-x11], [${want_x11_any}])
3952
3953 have_ecore_evas_software_xlib="no"
3954 have_ecore_evas_software_xcb="no"
3955 if test "x$have_ecore_evas_software_x11" = "xyes" ; then
3956    have_ecore_evas_software_xlib=${have_evas_engine_software_xlib}
3957    if test "x${have_ecore_evas_software_xlib}" = "xstatic"; then
3958       have_ecore_evas_software_xlib="yes"
3959    fi
3960    if test "x${have_ecore_evas_software_xlib}" = "xyes"; then
3961       AC_DEFINE([BUILD_ECORE_EVAS_SOFTWARE_XLIB], [1], [Evas Software Xlib Engine Support])
3962    fi
3963    have_ecore_evas_software_xcb=${have_evas_engine_software_xcb}
3964    if test "x$have_ecore_evas_software_xcb" = "xstatic"; then
3965       have_ecore_evas_software_xcb="yes"
3966    fi
3967    if test "x$have_ecore_evas_software_xcb" = "xyes"; then
3968       AC_DEFINE([BUILD_ECORE_EVAS_SOFTWARE_XCB], [1], [Evas Software XCB Engine Support])
3969    fi
3970 fi
3971
3972 # XXX TODO: ecore_evas_opengl_x11
3973
3974 ECORE_EVAS_MODULE([opengl-x11], [${want_x11_any_opengl}])
3975
3976 have_ecore_evas_opengl_xlib="no"
3977 have_ecore_evas_opengl_xcb="no"
3978 if test "x${have_ecore_evas_opengl_x11}" = "xyes" || test "x${have_ecore_evas_opengl_x11}" = "xstatic" ; then
3979    have_ecore_evas_opengl_xlib=${have_evas_engine_gl_xlib}
3980    if test "x${have_ecore_evas_opengl_xlib}" = "xyes" ; then
3981       AC_DEFINE([BUILD_ECORE_EVAS_OPENGL_XLIB], [1], [OpenGL Xlib rendering backend])
3982    fi
3983
3984 # opengl does not work with xcb (yet)
3985    have_ecore_evas_opengl_xcb=${have_evas_engine_gl_xcb}
3986    if test "x${have_ecore_evas_opengl_xcb}" = "xstatic"; then
3987       have_ecore_evas_opengl_xcb="yes"
3988    fi
3989    if test "x${have_ecore_evas_opengl_xcb}" = "xyes"; then
3990       PKG_CHECK_MODULES([XCB_X11],
3991          [x11-xcb],
3992          [
3993           have_ecore_x_opengl_xcb="yes"
3994           requirements_ecore_x="x11-xcb ${requirements_ecore_x}"
3995           AC_DEFINE([BUILD_ECORE_X_OPENGL_XCB], [1], [Build support for XCB-based OpenGL])
3996           AC_DEFINE([BUILD_ECORE_EVAS_OPENGL_XCB], [1], [OpenGL XCB rendering backend])
3997          ],
3998          [have_ecore_x_opengl_xcb="no"])
3999     else
4000       have_ecore_x_opengl_xcb="no"
4001       AC_MSG_NOTICE(["XCB-based OpenGL explicitly disabled"])
4002     fi
4003 fi
4004
4005 build_ecore_evas_x11="no"
4006 if test "x$have_ecore_evas_software_x11" = "xyes" || \
4007    test "x$have_ecore_evas_opengl_x11" = "xyes" || \
4008    test "x$have_ecore_evas_software_xcb" = "xyes"; then
4009    AC_DEFINE([BUILD_ECORE_EVAS_X11], [1], [Support for X Window Engines in Ecore_Evas])
4010    build_ecore_evas_x11="yes"
4011 fi
4012 AM_CONDITIONAL([BUILD_ECORE_EVAS_X11], [test "${build_ecore_evas_x11}" = "yes"])
4013
4014 EFL_EVAL_PKGS([ECORE_EVAS])
4015
4016 ### Checks for header files
4017
4018 ### Checks for types
4019
4020 ### Checks for structures
4021
4022 ### Checks for compiler characteristics
4023
4024 ### Checks for linker characteristics
4025
4026 ### Checks for library functions
4027
4028 EFL_LIB_END([Ecore_Evas])
4029 #### End of Ecore_Evas
4030
4031 #### Eio
4032 EFL_LIB_START([Eio])
4033
4034 ### Additional options to configure
4035
4036 ### Default values
4037
4038 ### Checks for programs
4039
4040 ## Compatibility layers
4041 EFL_PLATFORM_DEPEND([EIO], [evil])
4042
4043 ### Checks for libraries
4044 EFL_INTERNAL_DEPEND_PKG([EIO], [ecore])
4045 EFL_INTERNAL_DEPEND_PKG([EIO], [eet])
4046 EFL_INTERNAL_DEPEND_PKG([EIO], [eo])
4047 EFL_INTERNAL_DEPEND_PKG([EIO], [eina])
4048 EFL_INTERNAL_DEPEND_PKG([EIO], [emile])
4049
4050 EFL_ADD_LIBS([EIO], [-lm])
4051
4052 ### Checks for header files
4053
4054 ### Checks for types
4055
4056 ### Checks for structures
4057
4058 ### Checks for compiler characteristics
4059
4060 ### Checks for linker characteristics
4061
4062 ### Checks for library functions
4063 have_inotify="${ac_cv_header_sys_inotify_h}"
4064 AM_CONDITIONAL([HAVE_INOTIFY], [test "x${have_inotify}" = "xyes"])
4065
4066 have_notify_win32="${have_win32}"
4067 AC_DEFINE_IF([HAVE_NOTIFY_WIN32],
4068    [test "x${have_notify_win32}" = "xyes"], [1],
4069    [File monitoring with Windows notification])
4070 AM_CONDITIONAL([HAVE_NOTIFY_WIN32], [test "x${have_notify_win32}" = "xyes"])
4071
4072 AC_DEFINE_IF([HAVE_NOTIFY_COCOA],
4073    [test "x${have_darwin}" = "xyes"], [1],
4074    [File monitoring with fsevent notification])
4075 AM_CONDITIONAL([HAVE_NOTIFY_COCOA], [test "x${have_darwin}" = "xyes"])
4076
4077
4078 EFL_LIB_END([Eio])
4079 dnl TODO: remove these ifdefs from code!
4080 AC_DEFINE([HAVE_EIO], [1], [Have eio library])
4081 #### End of Eio
4082
4083 # Eo Id
4084 if test "x${want_eo_id}" = "xyes" ; then
4085    AC_DEFINE([HAVE_EO_ID], [1], [Have eo id])
4086 fi
4087
4088
4089 #### Efreet
4090 EFL_LIB_START([Efreet])
4091
4092 ### Additional options to configure
4093
4094 ### Default values
4095
4096 AC_DEFINE([SLOPPY_SPEC], [1], [Sloppy Spec Compliance])
4097
4098 ### Checks for programs
4099
4100 ## Compatibility layers
4101 EFL_PLATFORM_DEPEND([EFREET], [evil])
4102
4103 ### Checks for libraries
4104 EFL_INTERNAL_DEPEND_PKG([EFREET], [eet])
4105 EFL_INTERNAL_DEPEND_PKG([EFREET], [ecore])
4106 EFL_INTERNAL_DEPEND_PKG([EFREET], [ecore-file])
4107 EFL_INTERNAL_DEPEND_PKG([EFREET], [eldbus])
4108 EFL_INTERNAL_DEPEND_PKG([EFREET], [eo])
4109 EFL_INTERNAL_DEPEND_PKG([EFREET], [eina])
4110 EFL_INTERNAL_DEPEND_PKG([EFREET], [emile])
4111
4112 ### Checks for header files
4113
4114 ### Checks for types
4115
4116 ### Checks for structures
4117
4118 ### Checks for compiler characteristics
4119
4120 ### Checks for linker characteristics
4121
4122 ### Checks for library functions
4123
4124 EFL_LIB_END([Efreet])
4125 #### End of Efreet
4126
4127
4128 #### EPhysics
4129 AC_ARG_ENABLE([physics],
4130    [AS_HELP_STRING([--disable-physics],[disable physics effects and support. @<:@default=enabled@:>@])],
4131    [
4132     if test "x${enableval}" = "xyes" ; then
4133        want_physics="yes"
4134     else
4135        CFOPT_WARNING="xyes"
4136        want_physics="no"
4137     fi
4138    ],
4139    [want_physics="yes"])
4140
4141 EFL_LIB_START_OPTIONAL([EPhysics], [test "${want_physics}" = "yes"])
4142
4143 ### Additional options to configure
4144
4145 ### Default values
4146
4147 ### Checks for programs
4148
4149 ### Checks for libraries
4150 EFL_PLATFORM_DEPEND([EPHYSICS], [evil])
4151
4152 EFL_INTERNAL_DEPEND_PKG([EPHYSICS], [eina])
4153 EFL_INTERNAL_DEPEND_PKG([EPHYSICS], [evas])
4154 EFL_INTERNAL_DEPEND_PKG([EPHYSICS], [efl])
4155 EFL_INTERNAL_DEPEND_PKG([EPHYSICS], [ecore])
4156 EFL_INTERNAL_DEPEND_PKG([EPHYSICS], [eo])
4157 EFL_INTERNAL_DEPEND_PKG([EPHYSICS], [emile])
4158
4159 EFL_DEPEND_PKG([EPHYSICS], [BULLET], [bullet >= 2.80])
4160
4161 EFL_EVAL_PKGS([EPHYSICS])
4162
4163 ### Checks for header files
4164
4165 ### Checks for types
4166
4167 ### Checks for structures
4168
4169 ### Checks for compiler characteristics
4170
4171 ### Checks for linker characteristics
4172
4173 ### Checks for library functions
4174
4175 EFL_LIB_END_OPTIONAL([EPhysics])
4176 #### End of EPhysics
4177
4178
4179 #### Edje
4180 EFL_LIB_START([Edje])
4181
4182 ### Additional options to configure
4183
4184 ### Default values
4185
4186 AC_ARG_ENABLE([multisense],
4187    [AS_HELP_STRING([--enable-multisense],[Enable multisense support. @<:@default=enabled@:>@])],
4188    [
4189     if test "x${enableval}" = "xyes" ; then
4190        want_multisense="yes"
4191     else
4192        want_multisense="no"
4193        CFOPT_WARNING="xyes"
4194     fi
4195    ],
4196    [
4197     if test "x${want_pulseaudio}" = "xyes" -o "x${want_coreaudio}" = "xyes"; then
4198        want_multisense="yes"
4199     else
4200        want_multisense="no"
4201     fi
4202    ])
4203
4204 # TODO: should we keep or remove these?
4205 want_edje_program_cache="no"
4206 want_edje_calc_cache="yes"
4207 want_fixed_point="no"
4208
4209 ### Checks for programs
4210
4211 ### Checks for libraries
4212 EFL_PLATFORM_DEPEND([EDJE], [evil])
4213
4214 EFL_INTERNAL_DEPEND_PKG([EDJE], [eina])
4215 EFL_INTERNAL_DEPEND_PKG([EDJE], [eo])
4216 EFL_INTERNAL_DEPEND_PKG([EDJE], [efl])
4217 EFL_INTERNAL_DEPEND_PKG([EDJE], [eet])
4218 EFL_INTERNAL_DEPEND_PKG([EDJE], [evas])
4219 EFL_INTERNAL_DEPEND_PKG([EDJE], [ecore])
4220 EFL_INTERNAL_DEPEND_PKG([EDJE], [ecore-evas])
4221 EFL_INTERNAL_DEPEND_PKG([EDJE], [ecore-file])
4222 EFL_INTERNAL_DEPEND_PKG([EDJE], [ecore-input])
4223 EFL_INTERNAL_DEPEND_PKG([EDJE], [ecore-imf])
4224 EFL_INTERNAL_DEPEND_PKG([EDJE], [ecore-imf-evas])
4225 EFL_INTERNAL_DEPEND_PKG([EDJE], [embryo])
4226 EFL_INTERNAL_DEPEND_PKG([EDJE], [eio])
4227 EFL_INTERNAL_DEPEND_PKG([EDJE], [emile])
4228
4229 EFL_OPTIONAL_INTERNAL_DEPEND_PKG([EDJE], [${want_physics}], [ephysics])
4230 EFL_OPTIONAL_INTERNAL_DEPEND_PKG([EDJE], [${want_multisense}], [ecore-audio])
4231
4232 EFL_ADD_FEATURE([EDJE], [physics])
4233 EFL_ADD_FEATURE([EDJE], [multisense])
4234 EFL_ADD_FEATURE([EDJE], [lua-old])
4235
4236 if test "${want_lua_old}" = "yes"; then
4237    EFL_CHECK_LUA_OLD([EDJE])
4238 else
4239    EFL_DEPEND_PKG([EDJE], [LUAJIT], [luajit >= 2.0.0])
4240 fi
4241
4242 EFL_ADD_LIBS([EDJE], [-lm])
4243
4244 EFL_EVAL_PKGS([EDJE])
4245
4246 AC_DEFINE_IF([EDJE_PROGRAM_CACHE], [test "${want_edje_program_cache}" = "yes"],
4247    [1], [Cache result of program glob matches])
4248 AC_DEFINE_IF([EDJE_CALC_CACHE], [test "${want_edje_calc_cache}" = "yes"],
4249    [1], [Cache result of calc glob matches])
4250 AC_DEFINE_IF([BUILD_EDJE_FP], [test "${want_fixed_point}" = "yes"],
4251    [1], [Use Fixed Point instead of FPU])
4252
4253 AM_CONDITIONAL([ENABLE_MULTISENSE], [test "${want_multisense}" = "yes"])
4254 AC_DEFINE_IF([ENABLE_MULTISENSE], [test "${want_multisense}" = "yes"],
4255   [1], [Use Multisense])
4256 AC_SUBST([want_multisense])
4257 AC_SUBST([want_physics])
4258
4259 ### Checks for header files
4260
4261 AC_CHECK_HEADERS([ \
4262 sys/wait.h \
4263 ])
4264
4265 ### Checks for types
4266
4267 ### Checks for structures
4268
4269 ### Checks for compiler characteristics
4270
4271 ### Checks for linker characteristics
4272
4273 ### Checks for library functions
4274
4275 EFL_LIB_END([Edje])
4276 #### End of Edje
4277
4278 #### Edje CXX
4279 EFL_LIB_START([Edje_Cxx])
4280
4281 EFL_EVAL_PKGS([EDJE_CXX])
4282
4283 EFL_LIB_END([Edje_Cxx])
4284 #### End of Edje CXX
4285
4286 #### Emotion
4287 EFL_LIB_START([Emotion])
4288
4289 ## Compatibility layers
4290 EFL_PLATFORM_DEPEND([Emotion], [evil])
4291
4292 ### Default values
4293 if test "${efl_func_shm_open}" = "yes"; then
4294    want_emotion_generic="static"
4295 else
4296    want_emotion_generic="no"
4297 fi
4298
4299 ### Additional options to configure
4300 AC_ARG_ENABLE([xine],
4301    [AS_HELP_STRING([--enable-xine],[enable xine support. @<:@default=disabled@:>@])],
4302    [
4303     if test "x${enableval}" = "xyes" ; then
4304        want_xine="yes"
4305     else
4306        want_xine="no"
4307     fi
4308    ],
4309    [want_xine="no"])
4310
4311 AC_ARG_ENABLE([v4l2],
4312    [AS_HELP_STRING([--enable-v4l2],[enable v4l2 support.])],
4313    [
4314     if test "x${enableval}" = "xyes" ; then
4315        want_v4l2="yes"
4316     else
4317        want_v4l2="no"
4318     fi
4319    ],
4320    [want_v4l2="${efl_lib_optional_eeze}"])
4321
4322 ### Checks for programs
4323
4324 ### Checks for libraries
4325 EFL_INTERNAL_DEPEND_PKG([EMOTION], [eina])
4326 EFL_INTERNAL_DEPEND_PKG([EMOTION], [eo])
4327 EFL_INTERNAL_DEPEND_PKG([EMOTION], [ecore])
4328 EFL_INTERNAL_DEPEND_PKG([EMOTION], [eet])
4329 EFL_INTERNAL_DEPEND_PKG([EMOTION], [evas])
4330 EFL_INTERNAL_DEPEND_PKG([EMOTION], [efl])
4331 EFL_INTERNAL_DEPEND_PKG([EMOTION], [eio])
4332 EFL_INTERNAL_DEPEND_PKG([EMOTION], [emile])
4333
4334 EFL_OPTIONAL_INTERNAL_DEPEND_PKG([EMOTION], [${efl_lib_optional_eeze}], [eeze])
4335 EFL_ADD_FEATURE([EMOTION], [v4l2])
4336
4337 ## modules
4338
4339 have_gst_xoverlay="no"
4340
4341 EMOTION_MODULE([xine], [${want_xine}])
4342 EMOTION_MODULE([gstreamer], [${want_gstreamer}])
4343 EMOTION_MODULE([gstreamer1], [${want_gstreamer1}])
4344 EMOTION_MODULE([generic], [${want_emotion_generic}])
4345
4346 EFL_ADD_FEATURE([EMOTION], [xine])
4347 EFL_ADD_FEATURE([EMOTION], [gstreamer])
4348 EFL_ADD_FEATURE([EMOTION], [gstreamer1])
4349 EFL_ADD_FEATURE([EMOTION], [generic], [${want_emotion_generic}])
4350
4351 EFL_EVAL_PKGS([EMOTION])
4352
4353 ### Checks for header files
4354
4355 ### Checks for types
4356
4357 ### Checks for structures
4358
4359 ### Checks for compiler characteristics
4360
4361 ### Checks for linker characteristics
4362
4363 ### Checks for library functions
4364
4365 if test "${want_v4l2}" = "yes"; then
4366    AC_CHECK_DECL([V4L2_CAP_VIDEO_CAPTURE],
4367       [AC_DEFINE([HAVE_V4L2], [1], [Define to 1 if you have Video4Linux 2 available])],
4368       [AC_MSG_ERROR([Video4Linux 2 desired but not found. See --disable-v4l2.])],
4369       [#include <linux/videodev2.h>])
4370 fi
4371
4372 ### Check availability
4373
4374 EFL_LIB_END([Emotion])
4375 #### End of Emotion
4376
4377
4378 #### Ethumb
4379 EFL_LIB_START([Ethumb])
4380
4381 ### Default values
4382
4383 ### Additional options to configure
4384
4385 ### Checks for programs
4386
4387 ## Compatibility layers
4388 EFL_PLATFORM_DEPEND([ETHUMB], [evil])
4389
4390 ### Checks for libraries
4391 EFL_PLATFORM_DEPEND([EINA], [evil])
4392
4393 EFL_INTERNAL_DEPEND_PKG([ETHUMB], [eina])
4394 EFL_INTERNAL_DEPEND_PKG([ETHUMB], [eet])
4395 EFL_INTERNAL_DEPEND_PKG([ETHUMB], [evas])
4396 EFL_INTERNAL_DEPEND_PKG([ETHUMB], [efl])
4397 EFL_INTERNAL_DEPEND_PKG([ETHUMB], [eo])
4398 EFL_INTERNAL_DEPEND_PKG([ETHUMB], [ecore])
4399 EFL_INTERNAL_DEPEND_PKG([ETHUMB], [ecore-evas])
4400 EFL_INTERNAL_DEPEND_PKG([ETHUMB], [ecore-file])
4401 EFL_INTERNAL_DEPEND_PKG([ETHUMB], [ecore-imf])
4402 EFL_INTERNAL_DEPEND_PKG([ETHUMB], [edje])
4403 EFL_INTERNAL_DEPEND_PKG([ETHUMB], [emile])
4404
4405 ## modules
4406
4407 EFL_EVAL_PKGS([ETHUMB])
4408
4409 ### Checks for header files
4410
4411 ### Checks for types
4412
4413 ### Checks for structures
4414
4415 ### Checks for compiler characteristics
4416
4417 ### Checks for linker characteristics
4418
4419 ### Checks for library functions
4420
4421 ### Check availability
4422
4423 EFL_LIB_END([Ethumb])
4424 #### End of Ethumb
4425
4426 #### Ethumb_Client
4427 EFL_LIB_START([Ethumb_Client])
4428
4429 ### Default values
4430
4431 ### Additional options to configure
4432
4433 ### Checks for programs
4434
4435 ## Compatibility layers
4436 EFL_PLATFORM_DEPEND([ETHUMB_CLIENT], [evil])
4437
4438 ### Checks for libraries
4439 EFL_INTERNAL_DEPEND_PKG([ETHUMB_CLIENT], [eina])
4440 EFL_INTERNAL_DEPEND_PKG([ETHUMB_CLIENT], [eo])
4441 EFL_INTERNAL_DEPEND_PKG([ETHUMB_CLIENT], [efl])
4442 EFL_INTERNAL_DEPEND_PKG([ETHUMB_CLIENT], [eet])
4443 EFL_INTERNAL_DEPEND_PKG([ETHUMB_CLIENT], [ecore])
4444 EFL_INTERNAL_DEPEND_PKG([ETHUMB_CLIENT], [ecore-imf])
4445 EFL_INTERNAL_DEPEND_PKG([ETHUMB_CLIENT], [edje])
4446 EFL_INTERNAL_DEPEND_PKG([ETHUMB_CLIENT], [eldbus])
4447 EFL_INTERNAL_DEPEND_PKG([ETHUMB_CLIENT], [ethumb])
4448 EFL_INTERNAL_DEPEND_PKG([ETHUMB_CLIENT], [evas])
4449 EFL_INTERNAL_DEPEND_PKG([ETHUMB_CLIENT], [emile])
4450
4451 EFL_EVAL_PKGS([ETHUMB_CLIENT])
4452
4453 ### Checks for header files
4454
4455 ### Checks for types
4456
4457 ### Checks for structures
4458
4459 ### Checks for compiler characteristics
4460
4461 ### Checks for linker characteristics
4462
4463 ### Checks for library functions
4464
4465 ### Check availability
4466
4467 EFL_LIB_END([Ethumb_Client])
4468 #### End of Ethumb_Client
4469
4470 #### Elua
4471
4472 have_elua="yes"
4473 if test "${want_lua_old}" = "yes"; then
4474   have_elua="no"
4475 fi
4476
4477 EFL_LIB_START_OPTIONAL([Elua], [test "${have_elua}" = "yes"])
4478
4479 ### Default values
4480
4481 AM_CONDITIONAL([HAVE_ELUA], [test "x${have_elua}" = "xyes"])
4482
4483 ### Additional options to configure
4484
4485 ### Checks for programs
4486
4487 ## Compatibility layers
4488 EFL_PLATFORM_DEPEND([ELUA], [evil])
4489
4490 ### Checks for libraries
4491 EFL_INTERNAL_DEPEND_PKG([ELUA], [eina])
4492 EFL_INTERNAL_DEPEND_PKG([ELUA], [eo])
4493 EFL_INTERNAL_DEPEND_PKG([ELUA], [ecore])
4494
4495 EFL_DEPEND_PKG([ELUA], [LUAJIT], [luajit >= 2.0.0])
4496
4497 EFL_EVAL_PKGS([ELUA])
4498
4499 ### Checks for header files
4500
4501 ### Checks for types
4502
4503 ### Checks for structures
4504
4505 ### Checks for compiler characteristics
4506
4507 ### Checks for linker characteristics
4508
4509 ### Checks for library functions
4510
4511 ### Check availability
4512
4513 EFL_LIB_END_OPTIONAL([Elua])
4514 #### End of Elua
4515
4516 #### Elocation
4517
4518 EFL_LIB_START([Elocation])
4519
4520 ### Default values
4521
4522 ### Additional options to configure
4523
4524 ### Checks for programs
4525
4526 ### Checks for libraries
4527 EFL_PLATFORM_DEPEND([ELOCATION], [evil])
4528 EFL_INTERNAL_DEPEND_PKG([ELOCATION], [eina])
4529 EFL_INTERNAL_DEPEND_PKG([ELOCATION], [eo])
4530 EFL_INTERNAL_DEPEND_PKG([ELOCATION], [ecore])
4531 EFL_INTERNAL_DEPEND_PKG([ELOCATION], [eldbus])
4532
4533 EFL_ADD_LIBS([ELOCATION], [-lm])
4534
4535 ### Checks for header files
4536
4537 ### Checks for types
4538
4539 ### Checks for structures
4540
4541 ### Checks for compiler characteristics
4542
4543 ### Checks for linker characteristics
4544
4545 ### Checks for library functions
4546
4547 ### Check availability
4548
4549 EFL_LIB_END([Elocation])
4550 #### End of Elocation
4551
4552 ### Add Wayland server library if test is enabled
4553 if test "x${want_tests}" = "xyes" -a "x${want_wayland}" = "xyes"; then
4554    EFL_DEPEND_PKG([ECORE_WAYLAND_SRV], [WAYLAND], [wayland-server >= 1.3.0])
4555    EFL_EVAL_PKGS([ECORE_WAYLAND_SRV])
4556 fi
4557
4558 AC_ARG_ENABLE([always-build-examples],
4559    [AS_HELP_STRING([--enable-always-build-examples],[always build examples. @<:@default=disabled@:>@])],
4560    [
4561     if test "x${enableval}" = "xyes" ; then
4562        want_always_build_examples="yes"
4563     else
4564        want_always_build_examples="no"
4565     fi
4566    ],
4567    [want_always_build_examples="no"])
4568 AM_CONDITIONAL([ALWAYS_BUILD_EXAMPLES], [test "${want_always_build_examples}" = "yes"])
4569
4570 BARF_OK="xno"
4571 # Harfbuzz
4572 AC_ARG_ENABLE([i-really-know-what-i-am-doing-and-that-this-will-probably-break-things-and-i-will-fix-them-myself-and-send-patches-aba],
4573    [ You will be told when this is needed ],
4574    [
4575     if test "x${enableval}" = "xyes" ; then
4576        BARF_OK=""
4577     else
4578        BARF_OK="xno"
4579     fi
4580    ],
4581    [ BARF_OK="xno" ])
4582
4583
4584 AC_CONFIG_FILES([
4585 Makefile
4586 data/Makefile
4587 doc/Makefile
4588 doc/Doxyfile
4589 doc/previews/Makefile
4590 src/Makefile
4591 src/benchmarks/eina/Makefile
4592 src/benchmarks/eo/Makefile
4593 src/benchmarks/evas/Makefile
4594 src/examples/eina/Makefile
4595 src/examples/eina_cxx/Makefile
4596 src/examples/eet/Makefile
4597 src/examples/eo/Makefile
4598 src/examples/evas/Makefile
4599 src/examples/ecore/Makefile
4600 src/examples/ecore_avahi/Makefile
4601 src/examples/eio/Makefile
4602 src/examples/eldbus/Makefile
4603 src/examples/ephysics/Makefile
4604 src/examples/edje/Makefile
4605 src/examples/emotion/Makefile
4606 src/examples/ethumb_client/Makefile
4607 src/examples/elua/Makefile
4608 src/examples/eolian_cxx/Makefile
4609 src/examples/elocation/Makefile
4610 src/lib/eina/eina_config.h
4611 src/lib/ecore_x/ecore_x_version.h
4612 src/lib/efl/Efl_Config.h
4613 spec/efl.spec
4614 pc/evil.pc
4615 pc/escape.pc
4616 pc/eina.pc
4617 pc/eina-cxx.pc
4618 pc/emile.pc
4619 pc/eet.pc
4620 pc/eet-cxx.pc
4621 pc/eo.pc
4622 pc/eo-cxx.pc
4623 pc/eolian.pc
4624 pc/eolian-cxx.pc
4625 pc/efl.pc
4626 pc/efl-cxx.pc
4627 pc/evas-fb.pc
4628 pc/evas-opengl-x11.pc
4629 pc/evas-opengl-sdl.pc
4630 pc/evas-opengl-cocoa.pc
4631 pc/evas-psl1ght.pc
4632 pc/evas-software-buffer.pc
4633 pc/evas-software-x11.pc
4634 pc/evas-software-gdi.pc
4635 pc/evas-software-ddraw.pc
4636 pc/evas-software-sdl.pc
4637 pc/evas-wayland-shm.pc
4638 pc/evas-wayland-egl.pc
4639 pc/evas-drm.pc
4640 pc/evas.pc
4641 pc/evas-cxx.pc
4642 pc/ecore.pc
4643 pc/ecore-cxx.pc
4644 pc/ecore-con.pc
4645 pc/ecore-ipc.pc
4646 pc/ecore-file.pc
4647 pc/ecore-input.pc
4648 pc/ecore-input-evas.pc
4649 pc/ecore-cocoa.pc
4650 pc/ecore-drm.pc
4651 pc/ecore-fb.pc
4652 pc/ecore-psl1ght.pc
4653 pc/ecore-sdl.pc
4654 pc/ecore-wayland.pc
4655 pc/ecore-win32.pc
4656 pc/ecore-x.pc
4657 pc/ecore-evas.pc
4658 pc/ecore-imf.pc
4659 pc/ecore-imf-evas.pc
4660 pc/ecore-audio.pc
4661 pc/ecore-audio-cxx.pc
4662 pc/ecore-avahi.pc
4663 pc/ector.pc
4664 pc/embryo.pc
4665 pc/eio.pc
4666 pc/eio-cxx.pc
4667 pc/eldbus.pc
4668 pc/efreet.pc
4669 pc/efreet-mime.pc
4670 pc/efreet-trash.pc
4671 pc/eeze.pc
4672 pc/ephysics.pc
4673 pc/edje.pc
4674 pc/edje-cxx.pc
4675 pc/emotion.pc
4676 pc/ethumb.pc
4677 pc/ethumb_client.pc
4678 pc/elocation.pc
4679 pc/elua.pc
4680 dbus-services/org.enlightenment.Efreet.service
4681 dbus-services/org.enlightenment.Ethumb.service
4682 systemd-services/efreet.service
4683 systemd-services/ethumb.service
4684 $po_makefile_in
4685 cmakeconfig/EflConfig.cmake
4686 cmakeconfig/EflConfigVersion.cmake:cmakeconfig/EFLConfigVersion.cmake.in
4687 cmakeconfig/EinaConfig.cmake
4688 cmakeconfig/EinaConfigVersion.cmake:cmakeconfig/EFLConfigVersion.cmake.in
4689 cmakeconfig/EioConfig.cmake
4690 cmakeconfig/EioConfigVersion.cmake:cmakeconfig/EFLConfigVersion.cmake.in
4691 cmakeconfig/EezeConfig.cmake
4692 cmakeconfig/EezeConfigVersion.cmake:cmakeconfig/EFLConfigVersion.cmake.in
4693 cmakeconfig/EoConfig.cmake
4694 cmakeconfig/EoConfigVersion.cmake:cmakeconfig/EFLConfigVersion.cmake.in
4695 cmakeconfig/EolianConfig.cmake
4696 cmakeconfig/EolianConfigVersion.cmake:cmakeconfig/EFLConfigVersion.cmake.in
4697 cmakeconfig/EolianCxxConfig.cmake
4698 cmakeconfig/EolianCxxConfigVersion.cmake:cmakeconfig/EFLConfigVersion.cmake.in
4699 cmakeconfig/EinaCxxConfig.cmake
4700 cmakeconfig/EinaCxxConfigVersion.cmake:cmakeconfig/EFLConfigVersion.cmake.in
4701 cmakeconfig/EoCxxConfig.cmake
4702 cmakeconfig/EoCxxConfigVersion.cmake:cmakeconfig/EFLConfigVersion.cmake.in
4703 cmakeconfig/EcoreCxxConfig.cmake
4704 cmakeconfig/EcoreCxxConfigVersion.cmake:cmakeconfig/EFLConfigVersion.cmake.in
4705 cmakeconfig/EvasCxxConfig.cmake
4706 cmakeconfig/EvasCxxConfigVersion.cmake:cmakeconfig/EFLConfigVersion.cmake.in
4707 cmakeconfig/EetCxxConfig.cmake
4708 cmakeconfig/EetCxxConfigVersion.cmake:cmakeconfig/EFLConfigVersion.cmake.in
4709 cmakeconfig/EetConfig.cmake
4710 cmakeconfig/EetConfigVersion.cmake:cmakeconfig/EFLConfigVersion.cmake.in
4711 cmakeconfig/EvasConfig.cmake
4712 cmakeconfig/EvasConfigVersion.cmake:cmakeconfig/EFLConfigVersion.cmake.in
4713 cmakeconfig/EcoreConfig.cmake
4714 cmakeconfig/EcoreConfigVersion.cmake:cmakeconfig/EFLConfigVersion.cmake.in
4715 cmakeconfig/EdjeConfig.cmake
4716 cmakeconfig/EdjeConfigVersion.cmake:cmakeconfig/EFLConfigVersion.cmake.in
4717 cmakeconfig/EldbusConfig.cmake
4718 cmakeconfig/EldbusConfigVersion.cmake:cmakeconfig/EFLConfigVersion.cmake.in
4719 cmakeconfig/EfreetConfig.cmake
4720 cmakeconfig/EfreetConfigVersion.cmake:cmakeconfig/EFLConfigVersion.cmake.in
4721 cmakeconfig/EthumbConfig.cmake
4722 cmakeconfig/EthumbConfigVersion.cmake:cmakeconfig/EFLConfigVersion.cmake.in
4723 cmakeconfig/EthumbClientConfig.cmake
4724 cmakeconfig/EthumbClientConfigVersion.cmake:cmakeconfig/EFLConfigVersion.cmake.in
4725 cmakeconfig/EmotionConfig.cmake
4726 cmakeconfig/EmotionConfigVersion.cmake:cmakeconfig/EFLConfigVersion.cmake.in
4727 cmakeconfig/EluaConfig.cmake
4728 cmakeconfig/EluaConfigVersion.cmake:cmakeconfig/EFLConfigVersion.cmake.in
4729 cmakeconfig/EmileConfig.cmake
4730 cmakeconfig/EmileConfigVersion.cmake:cmakeconfig/EFLConfigVersion.cmake.in
4731 ])
4732
4733 AC_OUTPUT
4734
4735 #### Work around bug in automake check macro
4736 ## yes it is hugly, but no choice here for now.
4737 $SED -i "s/am__is_gnu_make = test -n '\$(MAKEFILE_LIST)' && test -n '\$(MAKELEVEL)'/ifdef MAKEFILE_LIST\nifdef MAKELEVEL\nam__is_gnu_make = true\nelse\nam__is_gnu_make = false\nendif\nelse\nam__is_gnu_make = false\nendif/" src/Makefile
4738
4739 if test -f $srcdir/config.status; then
4740    TO="$SED -i \"s/am__is_gnu_make = test -n '\\\\\$(MAKEFILE_LIST)' \&\& test -n '\\\\\$(MAKELEVEL)'/ifdef MAKEFILE_LIST\\\nifdef MAKELEVEL\\\nam__is_gnu_make = true\\\nelse\\\nam__is_gnu_make = false\\\nendif\\\nelse\\\nam__is_gnu_make = false\\\nendif/\" src/Makefile\nas_fn_exit 0"
4741    $SED -i "s|as_fn_exit 0|$TO|" $srcdir/config.status
4742 fi
4743
4744 #### Info
4745
4746 EFL_ADD_FEATURE([EO], [eo-id], [${want_eo_id}])
4747
4748 case $host_cpu in
4749   i*86|x86_64|amd64)
4750     EFL_ADD_FEATURE([cpu], [mmx], [${build_cpu_mmx}])
4751     EFL_ADD_FEATURE([cpu], [sse3], [${build_cpu_sse3}])
4752     ;;
4753   *power* | *ppc*)
4754     EFL_ADD_FEATURE([cpu], [altivec], [${build_cpu_altivec}])
4755     ;;
4756   arm*)
4757     EFL_ADD_FEATURE([cpu], [neon], [${build_cpu_neon}])
4758     ;;
4759   aarch64*)
4760     EFL_ADD_FEATURE([cpu], [neon], [${build_cpu_neon}])
4761     ;;
4762 esac
4763
4764 if test "${have_linux}" = "yes"; then
4765    EFL_ADD_FEATURE([system], [inotify])
4766    EFL_ADD_FEATURE([system], [atfile_source])
4767 elif test "${have_windows}" = "yes"; then
4768    EFL_ADD_FEATURE([system], [notify_win32])
4769 fi
4770 EFL_ADD_FEATURE([system], [ipv6])
4771
4772 if test "x${efl_have_posix_threads_spinlock}" = "xyes" || test "x${efl_have_osx_spinlock}" = "xyes"; then
4773    efl_have_spinlock="yes"
4774 else
4775    efl_have_spinlock="no"
4776 fi
4777 EFL_ADD_FEATURE([thread], [spinlocks], [${efl_have_spinlock}])
4778 EFL_ADD_FEATURE([thread], [barrier], [${efl_have_pthread_barrier}])
4779 EFL_ADD_FEATURE([thread], [affinity], [${efl_have_setaffinity}])
4780
4781 echo
4782 echo
4783 echo
4784 echo "------------------------------------------------------------------------"
4785 echo "$PACKAGE_NAME $PACKAGE_VERSION"
4786 echo "------------------------------------------------------------------------"
4787 echo
4788
4789 if test "x${have_windows}" = "xyes" ; then
4790    osname="${host_os}(${_efl_windows_version})"
4791 else
4792    osname="${host_os}"
4793 fi
4794
4795 echo "Configuration...: ${COLOR_OTHER}profile=${build_profile} os=${osname}${COLOR_RESET}"
4796 echo "  EFL API Set...: ${efl_api}"
4797 echo "  CPU Extensions: ${host_cpu} (${features_cpu})"
4798 echo "  System Feature: ${features_system}"
4799 echo "  Threads.......: ${efl_have_threads} (${features_thread})"
4800 echo "  Cryptography..: ${build_crypto}"
4801 echo "  X11...........: ${with_x11}"
4802 echo "  OpenGL........: ${with_opengl}"
4803 echo "  C++11.........: ${have_cxx11}"
4804 echo "Eina............: yes (${features_eina})"
4805 echo "Eo..............: yes (${features_eo})"
4806 echo "Eolian..........: yes (${features_eolian})"
4807 echo "Emile...........: yes (${features_emile})"
4808 echo "Eet.............: yes"
4809 echo "Evas............: yes (${features_evas})"
4810 echo "  Engines.......: ${features_evas_engine}"
4811 echo "  Image Loaders.: ${features_evas_loader}"
4812 if test "x${have_pixman}" = "xyes" ; then
4813 echo "  Pixman........: ${features_evas_pixman}"
4814 fi
4815 echo "Ecore...........: yes (${features_ecore})"
4816 echo "Ecore_Con.......: yes (${features_ecore_con})"
4817 echo "Ecore_File......: yes"
4818 echo "Ecore_IMF.......: yes (${features_ecore_imf})"
4819 echo "Ecore_X.........: ${with_x11} (${features_ecore_x})"
4820 echo "Ecore_SDL.......: $want_sdl"
4821 echo "Ecore_Wayland...: $want_wayland"
4822 echo "IVI-Shell.......: $want_wayland_ivi_shell"
4823 if test "${have_linux}" = "yes"; then
4824 echo "Ecore_FB........: $want_fb (${features_ecore_fb})"
4825 elif test "${have_ps3}" = "yes"; then
4826 echo "Ecore_PSL1GHT...: $have_ps3"
4827 elif test "${have_darwin}" = "yes"; then
4828 echo "Ecore_Cocoa.....: $efl_lib_optional_ecore_cocoa"
4829 elif test "${have_windows}" = "yes"; then
4830 echo "Ecore_Win32.....: $have_win32"
4831 fi
4832 echo "Ecore_Audio.....: ${efl_lib_optional_ecore_audio} (${features_ecore_audio})"
4833 echo "Ecore_Avahi.....: yes (${features_ecore_avahi})"
4834 echo "Ecore_Evas......: yes (${features_ecore_evas})"
4835 echo "Ector...........: yes"
4836 echo "Eeze............: ${efl_lib_optional_eeze} (${features_eeze})"
4837 echo "EPhysics........: ${efl_lib_optional_ephysics}"
4838 echo "Edje............: yes (${features_edje})"
4839 echo "Emotion.........: yes (${features_emotion})"
4840 echo "Ethumb..........: yes"
4841 echo "Ethumb_Client...: yes"
4842 echo "Elua............: $have_elua"
4843 if test "${build_tests}" = "none"; then
4844 echo "Tests...........: no"
4845 elif test "${build_tests}" = "auto"; then
4846 echo "Tests...........: make check (inexplicitly enabled)"
4847 elif test "${build_tests}" = "regular"; then
4848 echo "Tests...........: make check"
4849 elif test "${build_tests}" = "coverage"; then
4850 echo "Tests...........: make lcov-check"
4851 fi
4852 echo "Examples........: make examples (make install-examples)"
4853 if test "x${build_doc}" = "xyes"; then
4854 echo "Documentation...: make doc"
4855 else
4856 echo "Documentation...: no"
4857 fi
4858 echo "Compilation.....: make (or gmake)"
4859 echo "  CPPFLAGS......: $CPPFLAGS"
4860 echo "  CFLAGS........: $CFLAGS"
4861 echo "  CXXFLAGS......: $CXXFLAGS"
4862 echo "  LDFLAGS.......: $LDFLAGS"
4863
4864 if test "x${with_binary_edje_cc}" != "x"; then
4865 echo "  edje_cc.......: ${with_binary_edje_cc}"
4866 fi
4867
4868 if test "x${with_binary_eolian_gen}" != "x"; then
4869 echo "  eolian_gen....: ${with_binary_eolian_gen}"
4870 fi
4871
4872 if test "x${with_binary_eolian_cxx}" != "x"; then
4873 echo "  eolian_cxx....: ${with_binary_eolian_cxx}"
4874 fi
4875
4876 if test "x${with_binary_elua_bin}" != "x"; then
4877 echo "  elua..........: ${with_binary_elua_bin}"
4878 fi
4879
4880 echo "  "
4881 echo "Installation....: make install (as root if needed, with 'su' or 'sudo')"
4882 echo "  prefix........: $prefix"
4883 echo "  dbus units....: $dbusservicedir"
4884 if test "${have_systemd_user_session}" = "yes"; then
4885 echo "  systemd units.: $USER_SESSION_DIR"
4886 fi
4887 echo
4888
4889 if test "x${have_systemd_pkg}" = "xyes" -a "x${want_systemd}" = "xno"; then
4890    echo " _________________________________________"
4891    echo "/ Systemd dependency is available on your \\"
4892    echo "| system, but you are building without    |"
4893    echo "| systemd support. Don't forget to        |"
4894    echo "| --enable-systemd if you want systemd    |"
4895    echo "\\ integration for EFL.                    /"
4896    echo " -----------------------------------------"
4897    echo "        \\   ^__^"
4898    echo "         \\  (oo)\\_______"
4899    echo "            (__)\\       )\\/\\"
4900    echo "                ||----w |"
4901    echo "                ||     ||"
4902 fi
4903
4904 if test -n "$CFOPT_WARNING"; then
4905   echo "_____________________________________________________________________"
4906   echo ""
4907   echo "==-- WARNING --=="
4908   echo ""
4909   echo "_____________________________________________________________________"
4910   if test "x${with_x11}" = "xxcb"; then
4911     echo "_____________________________________________________________________"
4912     echo "You have chosen to use XCB instead of Xlib. It is a myth that XCB"
4913     echo "is amazingly faster than Xlib (when used sensibly). It can be"
4914     echo "faster in a few corner cases on startup of an app, but it comes"
4915     echo "with many downsides. One of those is more complex code inside"
4916     echo "ecore_x, which is far less tested in XCB mode than Xlib. Also"
4917     echo "the big catch is that OpenGL support basically requires Xlib anyway"
4918     echo "so if you want OpenGL in X11, you need Xlib regardless and so you"
4919     echo "gain nothing really in terms of speed and no savings in memory"
4920     echo "because Xlib is still linked, loaded and used, BUT instead you"
4921     echo "have OpenGL drivers working with an hybrid XCB/Xlib (mostly XCB)"
4922     echo "toolkit and this is basically never tested by anyone working on"
4923     echo "the OpenGL drivers, so you will have bugs. Do not enable XCB"
4924     echo "and use OpenGL. XCB is only useful if you wish to shave a few Kb"
4925     echo "off the memory footprint of a whole system and live with less"
4926     echo "tested code, and possibly unimplemented features in ecore_x. To"
4927     echo "remove the XCB setup, remove the --with-x11=xcb option to"
4928     echo "configure."
4929     echo "_____________________________________________________________________"
4930   fi
4931   if test "x${want_physics}" = "xno"; then
4932     echo "_____________________________________________________________________"
4933     echo "You have chosen to disable physics support. This disables lots of"
4934     echo "core functionality and is effectively never tested. You are going"
4935     echo "to find features that suddenly don't work and as a result cause"
4936     echo "a series of breakages. This is simply not tested so you are on"
4937     echo "your own in terms of ensuring everything works if you do this"
4938     echo "_____________________________________________________________________"
4939   fi
4940   if test "x${efl_have_threads}" = "xno"; then
4941     echo "_____________________________________________________________________"
4942     echo "You have disabled threading support. A lot of code is literally"
4943     echo "written to need threading. We never test or even build with"
4944     echo "threading disabled, so doing this is entering uncharted territory."
4945     echo "There is a very good chance things may not compile at all, or if"
4946     echo "the do, they will break at runtime in weird and wonderful ways."
4947     echo "Highly reconsider what you are doing here, or be prepared to deal"
4948     echo "with the fallout yourself."
4949     echo "_____________________________________________________________________"
4950   fi
4951   if test "x${want_fontconfig}" = "xno"; then
4952     echo "_____________________________________________________________________"
4953     echo "You have disabled fontconfig. This is going to make general font"
4954     echo "searching not work, and only some very direct 'load /path/file.ttf'"
4955     echo "will work alongside some old-school ttf file path searching. This"
4956     echo "is very likely not what you want, so highly reconsider turning"
4957     echo "fontconfig off. Having it off will lead to visual problems like"
4958     echo "missing text in many UI areas etc."
4959     echo "_____________________________________________________________________"
4960   fi
4961   if test "x${want_fribidi}" = "xno"; then
4962     echo "_____________________________________________________________________"
4963     echo "Fribidi is used for handling right-to-left text (like Arabic,"
4964     echo "Hebrew, Farsi, Persian etc.) and is very likely not a feature"
4965     echo "you want to disable unless you know for absolute certain you"
4966     echo "will never encounter and have to display such scripts. Also"
4967     echo "note that we don't test with fribidi disabled so you may also"
4968     echo "trigger code paths with bugs that are never normally used."
4969     echo "_____________________________________________________________________"
4970   fi
4971   if test "x${want_pixman}" = "xyes"; then
4972     echo "_____________________________________________________________________"
4973     echo "Pixman allows you to replace some rendering paths in Evas with"
4974     echo "Pixman. Pixman may or may not be faster (probably slower), and"
4975     echo "the rendering paths with Pixman enabled are not tested often so"
4976     echo "this may introduce rendering bugs. Do not turn Pixman on unless"
4977     echo "you wish to deal with these bugs."
4978     echo "_____________________________________________________________________"
4979   fi
4980   if test "x${have_tile_rotate}" = "xyes"; then
4981     echo "_____________________________________________________________________"
4982     echo "Tiled rotation code is not tested much, so be aware that you"
4983     echo "may introduce bugs by enabling this."
4984     echo "_____________________________________________________________________"
4985   fi
4986   if test "x${want_g_main_loop}" = "xyes"; then
4987     echo "_____________________________________________________________________"
4988     echo "Using the Glib mainloop as the mainloop in Ecore is not tested"
4989     echo "regularly, but the glib mainloop integration (on by default) is."
4990     echo "You can use apps that use glib mainloop constructs by default"
4991     echo "this way, but the Ecore mainloop is not built on top of glib."
4992     echo "You have enabled ecore to be built on top of glib and thus you"
4993     echo "may experience bugs that normally would not be there. Be prepared"
4994     echo "to fix these if they arise."
4995     echo "_____________________________________________________________________"
4996   fi
4997   if test "x${want_gstreamer}" = "xyes"; then
4998     echo "_____________________________________________________________________"
4999     echo "Gstreamer 0.10 is no longer supported, and EFL has moved to use"
5000     echo "Gstreamer 1.x. The old Gstremaer code is not tested or maintained"
5001     echo "and will eventually be removed entirely. Don't enable the old"
5002     echo "Gstreamer support unless you want to deal with the issues yourself."
5003     echo "_____________________________________________________________________"
5004   fi
5005   if test "x${want_gstreamer1}" = "xno"; then
5006     echo "_____________________________________________________________________"
5007     echo "You disabled Gstreamer 1.x support. You likely don't want to do"
5008     echo "this as it will heavily limit your media support options and render"
5009     echo "some functionality as useless, leading to visible application bugs."
5010     echo "_____________________________________________________________________"
5011   fi
5012   if test "x${want_eo_id}" = "xno"; then
5013     echo "_____________________________________________________________________"
5014     echo "Eo's ID abstraction interface is a major safety system that"
5015     echo "protects code from crashing or misbehaving in many cases. It does"
5016     echo "come at a slight cost, but the safety and protection is worth it."
5017     echo "Also by disabling this, you may also introduce security holes in"
5018     echo "EFL as well as cause all sorts of previously non-existant crashes."
5019     echo "Seriously reconsider disabling EO ID."
5020     echo "_____________________________________________________________________"
5021   fi
5022   if test "x${want_evas_cserve2}" = "xno"; then
5023     echo "_____________________________________________________________________"
5024     echo "Evas Cserve is built and on by default and no testing is done"
5025     echo "for the old non-cserve2 code paths, so by disabling this you"
5026     echo "may be introducing bugs. Be aware of this and be prepared to"
5027     echo "deal with the bugs as a result of this."
5028     echo "_____________________________________________________________________"
5029   fi
5030   if test "x${want_audio}" = "xno"; then
5031     echo "_____________________________________________________________________"
5032     echo "You disabled audio support in Ecore. This is not tested and may"
5033     echo "Create bugs for you due to it creating untested code paths."
5034     echo "Reconsider disabling audio."
5035     echo "_____________________________________________________________________"
5036   fi
5037   if test "x${have_darwin}" = "xno" -a "x${want_pulseaudio}" = "xno"; then
5038     echo "_____________________________________________________________________"
5039     echo "The only audio output method supported by Ecore right now on your"
5040     echo "system is via Pulseaudio. You have disabled that and likely have"
5041     echo "broken a whole bunch of things in the process. Reconsider your"
5042     echo "configure options."
5043     echo "_____________________________________________________________________"
5044   fi
5045   if test "x${want_xinput2}" = "xno"; then
5046     echo "_____________________________________________________________________"
5047     echo "You have disabled xinput2 support. This means a whole lot of input"
5048     echo "devices in X11 will not work correctly. You likely do not want to"
5049     echo "do this."
5050     echo "_____________________________________________________________________"
5051   fi
5052   if test "x${want_xim}" = "xno"; then
5053     echo "_____________________________________________________________________"
5054     echo "You disabled XIM input method support. This is the most basic and"
5055     echo "core input method protocol supported in X11 and you almost certainly"
5056     echo "want the support for it. Input methods allow for complex text input"
5057     echo "like for Chinese, Japanese and Korean as well as virtual keyboards"
5058     echo "on touch/mobile devices."
5059     echo "_____________________________________________________________________"
5060   fi
5061   if test "x${want_scim}" = "xno"; then
5062     echo "_____________________________________________________________________"
5063     echo "SCIM is a modern and very common input method framework and you"
5064     echo "disabled support for it. You very likely want the support for"
5065     echo "complex language input, so please reconsider this. Input methods"
5066     echo "allow for complex text input like for Chinese, Japanese and Korean"
5067     echo "as well as virtual keyboards on touch/mobile devices."
5068     echo "_____________________________________________________________________"
5069   fi
5070   if test "x${want_libmount}" = "xno"; then
5071     echo "_____________________________________________________________________"
5072     echo "Libmount has been disabled, and it is used heavily inside Eeze"
5073     echo "for support of removable devices etc. and disabling this will"
5074     echo "hurt support for Enlightenment and its filemanager."
5075     echo "_____________________________________________________________________"
5076   fi
5077   if test "x${want_multisense}" = "xno"; then
5078     echo "_____________________________________________________________________"
5079     echo "Multisense has been disabled. This causes Edje audio suport to"
5080     echo "Simply not work, and will break applications and libraries"
5081     echo "that rely on it with users then reporting bugs."
5082     echo "If you want to mute audio, there are APIs and policies to do"
5083     echo "that, as opposed to compiling it out."
5084     echo "_____________________________________________________________________"
5085   fi
5086   if test "x${efl_api}" = "xeo"; then
5087     echo "_____________________________________________________________________"
5088     echo "Using the EO based EFL API only does not work at the moment. We still"
5089     echo "have a lot code that depends on the legacy interfaces. We provide"
5090     echo "this option for testing once we are able to migrate to the EO based"
5091     echo "API."
5092     echo "If you are not working on this migration please leave the option set"
5093     echo "to both as it will break your build if set to eo."
5094     echo "_____________________________________________________________________"
5095   fi
5096   if test "x${want_libeeze}" = "xno"; then
5097     echo "_____________________________________________________________________"
5098     echo "Libeeze has been disabled, and it is used heavily for support of"
5099     echo "removable devices etc. and disabling this will hurt support for"
5100     echo "Enlightenment and its filemanager."
5101     echo "_____________________________________________________________________"
5102   fi
5103   echo "_____________________________________________________________________"
5104   echo ""
5105   echo "==-- WARNING --=="
5106   echo ""
5107   echo "_____________________________________________________________________"
5108   if test -n "$BARF_OK"; then
5109     echo "Please add the following option to acknowledge this:"
5110     echo "  --enable-i-really-know-what-i-am-doing-and-that-this-will-probably-break-things-and-i-will-fix-them-myself-and-send-patches-aba"
5111     echo "_____________________________________________________________________"
5112     rm -f Makefile
5113     exit 1
5114   fi
5115   sleep 10
5116 fi
5117
5118 if test "x$prefix" != "x/usr"; then
5119   old=
5120   path=$dbusservicedir
5121   while test "x$old" != "x$path"; do
5122     old=$path
5123     eval path="\"$path\""
5124   done
5125   resolved_dbusservicedir=$path
5126
5127   old=
5128   path=$USER_SESSION_DIR
5129   while test "x$old" != "x$path"; do
5130     old=$path
5131     eval path="\"$path\""
5132   done
5133   resolved_USER_SESSION_DIR=$path
5134   base_USER_SESSION_DIR=`echo "$resolved_USER_SESSION_DIR" | sed -e 's:^\(.*\)/systemd/user/*$:\1:g'`
5135
5136   old=
5137   path=$datadir
5138   while test "x$old" != "x$path"; do
5139     old=$path
5140     eval path="\"$path\""
5141   done
5142   resolved_datadir=$path
5143
5144   needs_alert_dbus=0
5145   if test "$resolved_dbusservicedir" = "${HOME}/.local/share/dbus-1/services"; then
5146     AC_MSG_NOTICE([installing DBus services in user local "$resolved_dbusservicedir". Only accessible to user $USER])
5147   elif echo "$resolved_dbusservicedir" | grep -e '^/usr/s' >/dev/null 2>/dev/null; then
5148     AC_MSG_NOTICE([installing DBus serivces in $resolved_dbusservicedir])
5149   else
5150     needs_alert_dbus=1
5151   fi
5152
5153   needs_alert_systemd=0
5154   if test "$have_systemd_user_session" = "yes"; then
5155     if test "$resolved_USER_SESSION_DIR" = "${HOME}/.config/systemd/user"; then
5156       AC_MSG_NOTICE([installing systemd services in user local "$resolved_USER_SESSION_DIR". Only accessible to user $USER])
5157     elif echo "$resolved_USER_SESSION_DIR" | grep -e '^/usr/s' >/dev/null 2>/dev/null; then
5158       AC_MSG_NOTICE([installing systemd serivces in $resolved_USER_SESSION_DIR])
5159     else
5160        needs_alert_systemd=1
5161     fi
5162   fi
5163
5164   if test $needs_alert_dbus -eq 1 -o $needs_alert_systemd -eq 1; then
5165     if test $needs_alert_dbus -eq 1 -a $needs_alert_systemd -eq 1; then
5166       what_alert="dbus and systemd"
5167     elif test $needs_alert_dbus -eq 1; then
5168       what_alert="dbus"
5169     else
5170       what_alert="systemd"
5171     fi
5172
5173     echo ""
5174     echo "#-------------------------------------------------------------------#"
5175     echo "##==--                          ALERT                          --==##"
5176     echo "#-------------------------------------------------------------------#"
5177     echo ""
5178     echo "  Your installation prefix is *NOT* /usr so this means you need"
5179     echo "to ensure some files are visible to $what_alert otherwise services cannot"
5180     echo "be started when needed. You will need to do the following:"
5181     if test $needs_alert_dbus -eq 1; then
5182       echo ""
5183       echo "System-wide installation:"
5184       echo "  ln -s ${resolved_dbusservicedir}/org.enlightenment.Ethumb.service /usr/share/dbus-1/services/org.enlightenment.Ethumb.service"
5185       echo "  ln -s ${resolved_dbusservicedir}/org.enlightenment.Efreet.service /usr/share/dbus-1/services/org.enlightenment.Efreet.service"
5186       echo ""
5187       echo "  or add \"${resolved_datadir}\" to \$XDG_DATA_DIRS"
5188       echo ""
5189       echo "User installation:"
5190       echo "  ln -s ${resolved_dbusservicedir}/org.enlightenment.Ethumb.service ~/.local/share/dbus-1/services/org.enlightenment.Ethumb.service"
5191       echo "  ln -s ${resolved_dbusservicedir}/org.enlightenment.Efreet.service ~/.local/share/dbus-1/services/org.enlightenment.Efreet.service"
5192     fi
5193     if test $needs_alert_systemd -eq 1; then
5194       echo ""
5195       echo "System-wide installation:"
5196       echo "  ln -s ${resolved_USER_SESSION_DIR}/ethumb.service /usr/lib/systemd/user/ethumb.service"
5197       echo "  ln -s ${resolved_USER_SESSION_DIR}/efreet.service /usr/lib/systemd/user/efreet.service"
5198       echo ""
5199       echo "  or add \"${base_USER_SESSION_DIR}\" to \$XDG_DATA_DIRS or \$XDG_CONFIG_DIRS"
5200       echo ""
5201       echo "User installation:"
5202       echo "  ln -s ${resolved_USER_SESSION_DIR}/ethumb.service ~/.config/systemd/user/ethumb.service"
5203       echo "  ln -s ${resolved_USER_SESSION_DIR}/efreet.service ~/.config/systemd/user/efreet.service"
5204     fi
5205     echo ""
5206     echo "#-------------------------------------------------------------------#"
5207   fi
5208 fi
5209
5210 if test "x${efl_deprecated_option}" = "xyes"; then
5211   echo ""
5212   echo "#-------------------------------------------------------------------#"
5213   echo "##==--                          ALERT                          --==##"
5214   echo "#-------------------------------------------------------------------#"
5215   echo ""
5216   echo "  Your build script is using a deprecated option. It will get b0rken"
5217   echo "with the next release of EFL. You better update it now than later."
5218   echo ""
5219   echo "#-------------------------------------------------------------------#"
5220 fi
5221