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