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