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