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