autotools: on OSX warn about prefix being /usr
[platform/upstream/efl.git] / configure.ac
1 EFL_VERSION([1], [17], [99], [dev])
2 AC_INIT([efl], [efl_version], [enlightenment-devel@lists.sourceforge.net])
3
4 AC_PREREQ([2.60])
5 AC_CONFIG_SRCDIR([configure.ac])
6 AC_CONFIG_MACRO_DIR([m4])
7
8 AC_CONFIG_HEADERS([config.h])
9 AH_TOP([
10 #ifndef EFL_CONFIG_H__
11 #define EFL_CONFIG_H__
12 ])
13 AH_BOTTOM([
14 #endif /* EFL_CONFIG_H__ */
15 ])
16
17
18 AM_INIT_AUTOMAKE([1.6 dist-xz -Wall color-tests subdir-objects])
19 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
20
21 # Due to a bug in automake 1.14 we need to use this after AM_INIT_AUTOMAKE
22 # http://debbugs.gnu.org/cgi/bugreport.cgi?bug=15981
23 AC_USE_SYSTEM_EXTENSIONS
24
25 CFOPT_WARNING=""
26
27 #### Apply configuring with legacy api's only, eo api's or both.
28
29 EFL_API_LEGACY_DEF="#define EFL_NOLEGACY_API_SUPPORT"
30 EFL_API_EO_DEF="#define EFL_EO_API_SUPPORT"
31 efl_api="both"
32
33 #### For the moment the Eo EFL API is not ready you need to explicitly optin.
34 EFL_ENABLE_EO_API_SUPPORT
35 EFL_ENABLE_BETA_API_SUPPORT
36
37 AC_ARG_WITH([api],
38    [AS_HELP_STRING([--with-api=@<:@eo/legacy/both@:>@],[Select the EFL API Model @<:@default=both@:>@])],
39    [efl_api=${withval}],
40    [efl_api="both"])
41
42 case "$efl_api" in
43     eo)
44         EFL_API_LEGACY_DEF="#define EFL_NOLEGACY_API_SUPPORT"
45         EFL_API_EO_DEF="#define EFL_EO_API_SUPPORT"
46         CFOPT_WARNING="xyes"
47         ;;
48     legacy)
49         EFL_API_LEGACY_DEF=""
50         EFL_API_EO_DEF=""
51         ;;
52     both)
53         EFL_API_LEGACY_DEF=""
54         EFL_API_EO_DEF="#define EFL_EO_API_SUPPORT"
55         ;;
56     *) AC_MSG_ERROR([Invalid api (${efl_api}): must be eo, legacy or both]) ;;
57 esac
58
59 AC_SUBST(EFL_API_LEGACY_DEF)
60 AC_SUBST(EFL_API_EO_DEF)
61
62 #### Additional options to configure
63
64 # string to identify the build
65 AC_ARG_WITH([id],
66    [AS_HELP_STRING([--with-id=BUILD_ID],[Specify a string to identify the build (vendor, maintainer, etc).
67                      @<:@default=none@:>@])],
68    [EFL_BUILD_ID="${withval}"],
69    [EFL_BUILD_ID="none"])
70 AC_SUBST(EFL_BUILD_ID)
71
72 # profile
73 AC_ARG_WITH([profile],
74    [AS_HELP_STRING([--with-profile=PROFILE],[use the predefined build profile, one of: dev, debug and release.
75                     @<:@default=dev@:>@])],
76    [build_profile=${withval}],
77    [build_profile=def_build_profile])
78
79 case "${build_profile}" in
80    dev|debug|release)
81      ;;
82    *)
83      AC_MSG_ERROR([Unknown build profile --with-profile=${build_profile}])
84      ;;
85 esac
86
87 prefer_assert="no"
88 eina_log_backtrace="yes"
89 case "${build_profile}" in
90    dev|debug)
91      prefer_assert="yes"
92      eina_log_backtrace="no"
93      ;;
94 esac
95
96 # Enable CRI & ERR backtrace by default for release but not for dev/debug
97 AC_DEFINE_IF([EINA_LOG_BACKTRACE_ENABLE], [test "x${eina_log_backtrace}" = "xyes"], [1], [Default log level triggering backtraces])
98
99 # TODO: add some build "profile" (server, full, etc...)
100
101 AC_ARG_WITH([crypto],
102    [AS_HELP_STRING([--with-crypto=CRYPTO],[use the predefined build crypto, one of:
103                     openssl, gnutls or none.
104                     @<:@default=openssl@:>@])],
105    [build_crypto=${withval}],
106    [build_crypto=openssl])
107
108 case "${build_crypto}" in
109    openssl|gnutls|none)
110      ;;
111    *)
112      AC_MSG_ERROR([Unknown build crypto option: --with-crypto=${build_crypto}])
113      ;;
114 esac
115
116 AC_ARG_WITH([tests],
117    [AS_HELP_STRING([--with-tests=none|regular|coverage],[choose testing method: regular, coverage or none.
118                     @<:@default=none@:>@])],
119    [build_tests=${withval}],
120    [build_tests=auto])
121
122 want_coverage="no"
123 want_tests="no"
124 case "${build_tests}" in
125    auto)
126      if test "${build_profile}" = "dev"; then
127         want_tests="yes"
128      fi
129      ;;
130    regular)
131      want_tests="yes"
132      ;;
133    coverage)
134      want_tests="yes"
135      want_coverage="yes"
136      ;;
137    no*)
138      ;;
139    *)
140      AC_MSG_ERROR([Unknown build tests option: --with-tests=${build_tests}])
141      ;;
142 esac
143
144 AC_ARG_WITH([ecore-con-http-test-url],
145    [AS_HELP_STRING([--with-ecore-con-http-test-url=http://username:password@example.com],[Url of http server for testing with username and password])],[ECORE_CON_HTTP_TEST_URL=${withval}][AC_DEFINE_UNQUOTED([ECORE_CON_HTTP_TEST_URL],["$withval"],[Http url for testing])])
146
147 AC_ARG_WITH([ecore-con-ftp-test-url],
148    [AS_HELP_STRING([--with-ecore-con-ftp-test-url=ftp://username:password@ftp.example.com?file=filename&directory=dir],[Url of ftp server for testing with username, password, complete filepath for upload with optional directory])],[ECORE_CON_FTP_TEST_URL=${withval}][AC_DEFINE_UNQUOTED([ECORE_CON_FTP_TEST_URL],["$withval"],[Ftp url for testing])])
149
150 dbusservicedir="${datadir}/dbus-1/services"
151 AC_ARG_WITH([dbus-services],
152    [AS_HELP_STRING([--with-dbus-services=DBUS_SERVICES],[specify a directory to store dbus service files.])],
153    [dbusservicedir=$withval])
154 AC_SUBST(dbusservicedir)
155
156 efl_deprecated_option="no"
157 EFL_WITH_BIN([eet], [eet-eet], [eet])
158 EFL_WITH_BIN([edje], [edje-cc])
159 EFL_WITH_BIN([eolian], [eolian-gen])
160 EFL_WITH_BIN([eolian_cxx], [eolian-cxx])
161 EFL_WITH_BIN([eolian-js], [eolian-js], [eolian_js])
162 EFL_WITH_BIN_SUFFIX([elua], [elua], [_bin])
163 EFL_WITH_BIN([eldbus], [eldbus_codegen], [eldbus-codegen])
164 EFL_WITH_BIN([elementary], [elementary-codegen], [elementary_codegen])
165 EFL_WITH_BIN([elementary], [elm-prefs-cc], [elm_prefs_cc])
166
167 #### Default values
168
169 requirements_pc_eflall=""
170 requirements_pc_deps_eflall=""
171 requirements_libs_eflall=""
172 requirements_cflags_eflall=""
173
174 requirements_pc_crypto=""
175 requirements_pc_deps_crypto=""
176 requirements_libs_crypto=""
177 requirements_cflags_crypto=""
178
179 AC_CANONICAL_HOST
180
181 # TODO: move me to m4 file that setups module/so related variables
182 case "$host_os" in
183    cegcc*|mingw32ce*)
184       AC_MSG_ERROR([ceGCC compiler is not supported anymore. Exiting...])
185    ;;
186    mingw*)
187       have_win32="yes"
188       have_windows="yes"
189       MODULE_ARCH="v-v_maj.v_min"
190       MODULE_EXT=".dll"
191    ;;
192    cygwin*)
193       MODULE_ARCH="v-v_maj.v_min"
194       MODULE_EXT=".dll"
195    ;;
196    *)
197       MODULE_ARCH="v-v_maj.v_min"
198       MODULE_EXT=".so"
199    ;;
200 esac
201
202 EFL_VERSION_MAJOR="v_maj"
203 EFL_VERSION_MINOR="v_min"
204 AC_SUBST(EFL_VERSION_MAJOR)
205 AC_SUBST(EFL_VERSION_MINOR)
206
207 ELM_UNIX_DEF="#undef"
208 ELM_WIN32_DEF="#undef"
209
210 have_systemd_pkg="no"
211 have_win32="no"
212 have_windows="no"
213 have_freebsd="no"
214 have_darwin="no"
215 have_linux="no"
216 have_ps3="no"
217 case "$host_os" in
218    mingw*|cygwin*)
219       # TODO: check cygwin* here
220       have_win32="yes"
221       have_windows="yes"
222       ELM_WIN32_DEF="#define"
223       EFLALL_CFLAGS="${EFLALL_CFLAGS} -D__USE_MINGW_ANSI_STDIO"
224    ;;
225    freebsd*)
226       have_freebsd="yes"
227       ELM_UNIX_DEF="#define"
228    ;;
229    darwin*)
230       have_darwin="yes"
231       ELM_UNIX_DEF="#define"
232    ;;
233    linux*)
234       have_linux="yes"
235       have_systemd_pkg="auto"
236       ELM_UNIX_DEF="#define"
237    ;;
238    *)
239       ELM_UNIX_DEF="#define"
240       ;;
241 esac
242
243 case "$host_vendor" in
244    ps3*)
245       have_ps3="yes"
246    ;;
247 esac
248
249 AC_SUBST([MODULE_ARCH])
250 AC_DEFINE_UNQUOTED([MODULE_ARCH], ["${MODULE_ARCH}"], ["Module architecture"])
251 AC_DEFINE_UNQUOTED([SHARED_LIB_SUFFIX], ["${MODULE_EXT}"], [Suffix for shared objects])
252 AC_DEFINE_UNQUOTED([EXEEXT], ["${EXEEXT}"], [Suffix for binary objects])
253
254 # TODO: move me to m4 file that setups the windows related variables
255 AM_CONDITIONAL([HAVE_WIN32], [test "x${have_win32}" = "xyes"])
256 AM_CONDITIONAL([HAVE_WINDOWS], [test "x${have_windows}" = "xyes"])
257 AM_CONDITIONAL([HAVE_PS3], [test "x${have_ps3}" = "xyes"])
258
259 AM_CONDITIONAL([HAVE_FREEBSD], [test "x${have_freebsd}" = "xyes"])
260 AM_CONDITIONAL([HAVE_OSX], [test "x${have_darwin}" = "xyes"])
261 AM_CONDITIONAL([HAVE_X86_64], [test "x${host_cpu}" = "xx86_64"])
262
263 AC_SUBST([ELM_UNIX_DEF])
264 AC_SUBST([ELM_WIN32_DEF])
265
266 #### Checks for programs
267
268 ### libtool
269
270 if test "x${have_windows}" = "xyes" ; then
271    lt_cv_deplibs_check_method='pass_all'
272 fi
273 m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
274 LT_INIT([win32-dll disable-static pic-only])
275 EFL_INIT
276
277 CXXFLAGS="${CXXFLAGS} -fPIC -DPIC"
278 LDFLAGS="${LDFLAGS} -fPIC -DPIC"
279
280 ### gettext
281
282 AM_GNU_GETTEXT_VERSION([0.18])
283
284 m4_ifdef([AC_GNU_GETTEXT], [
285 AC_GNU_GETTEXT([external])
286 po_makefile_in=po/Makefile.in
287 have_po="yes"
288 ],
289 [
290 m4_ifdef([AM_GNU_GETTEXT], [
291 AM_GNU_GETTEXT([external])
292 po_makefile_in=po/Makefile.in
293 have_po="yes"
294 ],
295 [
296 have_po="no"
297 ])
298 ])
299 AC_SUBST([LTLIBINTL])
300 LOCALE_DIR="${localedir}"
301 AC_SUBST(LOCALE_DIR)
302
303 if test "x${POSUB}" = "x" ; then
304    have_po="no"
305 fi
306
307 AM_CONDITIONAL([HAVE_PO], [test "x${have_po}" = "xyes"])
308
309 ### compilers
310
311 AC_PROG_MKDIR_P
312 AM_PROG_AS
313 AC_PROG_CXX
314 AC_PROG_OBJC
315 AC_LANG(C)
316 AC_PROG_CC_C99
317 AM_PROG_CC_C_O
318 AC_PROG_SED
319
320 AM_CONDITIONAL([BUILD_EFL_NATIVE], [test "x${cross_compiling}" = "xno"])
321
322 if test "x${ac_cv_prog_cc_c99}" = "xno" ; then
323    AC_MSG_ERROR([efl requires a c99-capable compiler])
324 fi
325 # We should be using ${CXX} here, but there is a bug in
326 # autotools macro and CXX is always set to g++ even if
327 # it's not found. So we are using an internal variable
328 # that does the work for now, may get broken in the future.
329 if test "x${ac_ct_CXX}" = "x" -a "x${CXX}" = "xg++"; then
330    AC_MSG_ERROR([efl requires a C++ compiler got ${ac_ct_CXX} and ${CXX}.])
331 fi
332
333 AC_SYS_LARGEFILE
334
335 # pkg-config
336
337 PKG_PROG_PKG_CONFIG
338 if test "x${PKG_CONFIG}" = "x" ; then
339    AC_MSG_ERROR([pkg-config tool not found. Install it or set PKG_CONFIG environment variable to that path tool. Exiting...])
340 fi
341
342 # doxygen program for documentation building
343
344 EFL_CHECK_DOXYGEN([build_doc="yes"], [build_doc="no"])
345
346 # lcov
347
348 if test "${want_coverage}" = "yes" ; then
349    AC_CHECK_PROG([have_lcov], [lcov], [yes], [no])
350    if test "x${have_lcov}" = "xyes" ; then
351       AC_SEARCH_LIBS([__gcov_init], [gcov])
352       EFL_CHECK_COMPILER_FLAGS([EFLALL], [-fprofile-arcs -ftest-coverage])
353       EFL_CHECK_COMPILER_FLAGS([EFLALL], [-fprofile-instr-generate -fcoverage-mapping])
354       EFL_CHECK_LINKER_FLAGS([EFLALL], [-fprofile-instr-generate -fcoverage-mapping])
355       if test "x${prefer_assert}" = "xno"; then
356          EFLALL_COV_CFLAGS="${EFLALL_COV_CFLAGS} -DNDEBUG"
357       else
358          EFLALL_COV_CFLAGS="${EFLALL_COV_CFLAGS} -g -O0"
359       fi
360    else
361       AC_MSG_ERROR([lcov is not found])
362    fi
363 fi
364
365 AM_CONDITIONAL([EFL_ENABLE_COVERAGE], [test "${want_coverage}" = "yes"])
366
367 #### Checks for libraries
368
369 # check unit testing library
370
371 if test "${want_tests}" = "yes"; then
372    PKG_CHECK_MODULES([CHECK], [check >= 0.9.5])
373 fi
374 AM_CONDITIONAL([EFL_ENABLE_TESTS], [test "${want_tests}" = "yes"])
375
376
377 # check for crypto/tls library to use
378 case "$build_crypto" in
379    gnutls)
380       EFL_DEPEND_PKG([crypto], [GNUTLS], [gnutls >= 2.12.16])
381
382       AM_PATH_LIBGCRYPT([], [:],
383          [AC_MSG_ERROR([libgcrypt required but not found])])
384       requirements_libs_crypto="${LIBGCRYPT_LIBS} ${requirements_libs_crypto}"
385       requirements_cflags_crypto="${LIBGCRYPT_CFLAGS} ${requirements_cflags_crypto}"
386       ;;
387
388    openssl)
389       EFL_DEPEND_PKG([crypto], [OPENSSL], [openssl])
390       ;;
391 esac
392 AM_CONDITIONAL([HAVE_CRYPTO_GNUTLS], [test "${build_crypto}" = "gnutls"])
393 AM_CONDITIONAL([HAVE_CRYPTO_OPENSSL], [test "${build_crypto}" = "openssl"])
394
395 # check for lua old
396 want_lua_old="no"
397 AC_ARG_ENABLE([lua-old],
398    [AS_HELP_STRING([--enable-lua-old],[Enable interpreted Lua support (5.1 or 5.2). @<:@default=disabled@:>@])],
399    [
400     if test "x${enableval}" = "xyes" ; then
401        want_lua_old="yes"
402     else
403        want_lua_old="no"
404     fi
405    ],
406    [want_lua_old="no"])
407
408 AM_CONDITIONAL([ENABLE_LUA_OLD], [test "${want_lua_old}" = "yes"])
409 AC_DEFINE_IF([ENABLE_LUA_OLD], [test "${want_lua_old}" = "yes"],
410   [1], [Use interpreted Lua (5.1 or 5.2)])
411 AC_SUBST([want_lua_old])
412
413
414 want_liblz4="no"
415 AC_ARG_ENABLE([liblz4],
416    [AS_HELP_STRING([--enable-liblz4],[Enable usage of liblz4 instead of our embedded copy. @<:@default=disabled@:>@])],
417    [
418     if test "x${enableval}" = "xyes" ; then
419         # Only ships pc file since r120
420         PKG_CHECK_MODULES([LIBLZ4], [liblz4])
421         EFL_DEPEND_PKG([EET], [LIBLZ4], [liblz4])
422         EFL_DEPEND_PKG([EVAS], [LIBLZ4], [liblz4])
423        want_liblz4="yes"
424     else
425        want_liblz4="no"
426     fi
427    ],
428    [want_liblz4="no"])
429
430 AM_CONDITIONAL([ENABLE_LIBLZ4], [test "${want_liblz4}" = "yes"])
431 AC_DEFINE_IF([ENABLE_LIBLZ4], [test "${want_liblz4}" = "yes"], [1], [Use liblz4 external library instead of embedded copy])
432 AC_SUBST([want_liblz4])
433 AC_SUBST([ENABLE_LIBLZ4])
434
435 #### Checks for header files
436
437 # Common Checks (keep names sorted for ease of use):
438 AC_HEADER_DIRENT
439 AC_HEADER_TIME
440
441 AC_CHECK_HEADERS([ \
442 execinfo.h \
443 mcheck.h \
444 sys/epoll.h \
445 sys/inotify.h \
446 sys/signalfd.h \
447 sys/types.h \
448 sys/param.h \
449 sys/mman.h \
450 netinet/in.h \
451 ])
452
453 EFL_CHECK_PATH_MAX
454
455 #### Checks for types
456
457 # wchar_t
458 AC_CHECK_SIZEOF([wchar_t])
459 EINA_SIZEOF_WCHAR_T=$ac_cv_sizeof_wchar_t
460 AC_SUBST([EINA_SIZEOF_WCHAR_T])
461
462 AC_CHECK_SIZEOF(int, 4)
463 AC_CHECK_SIZEOF(long, 4)
464
465 AC_CHECK_SIZEOF([uintptr_t])
466
467 AC_CHECK_TYPES([siginfo_t], [], [],
468    [[
469 #include <signal.h>
470 #if HAVE_SIGINFO_H
471 # include <siginfo.h>
472 #endif
473    ]])
474
475 #### Checks for structures
476
477
478 #### Checks for compiler characteristics
479
480 AC_C_BIGENDIAN
481 AC_C_INLINE
482 EFL_CHECK_COMPILER_FLAGS([EFLALL], [-Wall -Wextra -Wpointer-arith -Wno-missing-field-initializers -fvisibility=hidden -fdata-sections -ffunction-sections])
483 EFL_CHECK_LINKER_FLAGS([EFLALL], [-fvisibility=hidden -fdata-sections -ffunction-sections -Wl,--gc-sections -fno-strict-aliasing -Wl,--as-needed -Wl,--no-copy-dt-needed-entries])
484 case "${build_profile}" in
485    dev)
486      dnl Check if compiler has a dodgy -Wshadow that emits errors when shadowing a global
487      AC_MSG_CHECKING([whether -Wshadow generates spurious warnings])
488      CFLAGS_save="${CFLAGS}"
489      CFLAGS="${CFLAGS} -Werror -Wshadow"
490      AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[int x;]], [[int x = 0; (void)x;]])],[AC_MSG_RESULT([no])
491         EFL_CHECK_COMPILER_FLAGS([EFLALL], [-Wshadow])],[AC_MSG_RESULT([yes])])
492      CFLAGS="${CFLAGS_save}"
493      ;;
494
495    debug)
496      ;;
497
498    release)
499      ;;
500 esac
501
502 EFL_ATTRIBUTE_VECTOR
503 EFL_ATTRIBUTE_ALWAYS_INLINE
504
505 EFLALL_LIBS="${EFLALL_LIBS}"
506 EFLALL_CFLAGS="${EFLALL_CFLAGS}"
507
508 ## CPU architecture specific assembly
509
510 build_cpu_mmx="no"
511 build_cpu_sse3="no"
512 build_cpu_altivec="no"
513 build_cpu_neon="no"
514
515 want_neon="yes"
516 AC_ARG_ENABLE([neon],
517    [AS_HELP_STRING([--disable-neon],[disable neon support @<:@default=enable@:>@])],
518    [
519     if test "x${enableval}" = "xyes"; then
520        want_neon="yes"
521     else
522        want_neon="no"
523     fi
524    ])
525
526 SSE3_CFLAGS=""
527 ALTIVEC_CFLAGS=""
528 NEON_CFLAGS=""
529
530 case $host_cpu in
531   i*86|x86_64|amd64)
532     AC_DEFINE([BUILD_MMX], [1], [Build MMX Code])
533     build_cpu_mmx="yes"
534     AC_CHECK_HEADER([immintrin.h],
535        [
536         AC_DEFINE(BUILD_SSE3, 1, [Build SSE3 Code])
537         build_cpu_sse3="yes"
538        ],
539        [build_cpu_sse3="no"])
540     AC_MSG_CHECKING([whether to build SSE3 code])
541     AC_MSG_RESULT([${build_cpu_sse3}])
542
543     if test "x$build_cpu_sse3" = "xyes" ; then
544        SSE3_CFLAGS="-msse3"
545     fi
546     ;;
547   *power* | *ppc*)
548     build_cpu_altivec="yes"
549     AC_CHECK_HEADER([altivec.h],
550        [
551         AC_DEFINE([BUILD_ALTIVEC], [1], [Build Altivec Code])
552         AC_DEFINE([HAVE_ALTIVEC_H], [1], [Have altivec.h header file])
553         build_cpu_altivec="yes"
554        ],
555        [
556         save_CFLAGS=$CFLAGS
557         save_CPPFLAGS=$CPPFLAGS
558         CFLAGS=$CFLAGS" -maltivec"
559         CPPFLAGS=$CPPFLAGS" -maltivec"
560         unset ac_cv_header_altivec_h
561         AC_CHECK_HEADER([altivec.h],
562           [
563             AC_DEFINE([BUILD_ALTIVEC], [1], [Build Altivec Code])
564             AC_DEFINE([HAVE_ALTIVEC_H], [1], [Have altivec.h header file])
565             build_cpu_altivec="yes"
566           ],
567           [build_cpu_altivec="no"]
568         )
569         CFLAGS=$save_CFLAGS
570         CPPFLAGS=$save_CPPFLAGS
571        ]
572     )
573     if test "x${build_cpu_altivec}" = "xyes"; then
574        AC_MSG_CHECKING([whether to use altivec compiler flag])
575        if test "x$GCC" = "xyes"; then
576           if echo "int main(){return 0;}" | ${CPP} -faltivec - > /dev/null 2>&1; then
577              altivec_cflags="-faltivec"
578              AC_DEFINE([BUILD_ALTIVEC], [1], [Build Altivec Code])
579           elif echo "int main(){return 0;}" | ${CPP} -maltivec - > /dev/null 2>&1; then
580              altivec_cflags="-maltivec"
581              AC_DEFINE([BUILD_ALTIVEC], [1], [Build Altivec Code])
582           fi
583        fi
584        AC_MSG_RESULT([${altivec_cflags}])
585        CFLAGS="$CFLAGS ${altivec_cflags}"
586        ALTIVEC_CFLAGS="-maltivec"
587     fi
588     ;;
589   arm*)
590     if test "x${want_neon}" = "xyes"; then
591        build_cpu_neon="yes"
592        AC_MSG_CHECKING([whether to use NEON instructions])
593        CFLAGS_save="${CFLAGS}"
594        CFLAGS="${CFLAGS} -mfpu=neon -ftree-vectorize"
595        AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <arm_neon.h>]], [[asm volatile ("vqadd.u8 d0, d1, d0\n")]])],[
596            AC_MSG_RESULT([yes])
597            AC_DEFINE([BUILD_NEON], [1], [Build NEON Code])
598            build_cpu_neon="yes"
599            NEON_CFLAGS="-mfpu=neon"
600          ],[
601            AC_MSG_RESULT([no])
602            build_cpu_neon="no"
603          ])
604        CFLAGS="${CFLAGS_save}"
605     fi
606     ;;
607   aarch64*)
608     if test "x${want_neon}" = "xyes"; then
609        build_cpu_neon="yes"
610        AC_MSG_CHECKING([whether to use NEON instructions])
611        AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <arm_neon.h>]], [[volatile uint32x4_t test = vdupq_n_u32(0x1);]])],[
612            AC_MSG_RESULT([yes])
613            AC_DEFINE([BUILD_NEON], [1], [Build NEON Code])
614            AC_DEFINE([BUILD_NEON_INTRINSICS], [1], [Build NEON Intrinsics])
615            build_cpu_neon="yes"
616          ],[
617            AC_MSG_RESULT([no])
618            build_cpu_neon="no"
619          ])
620     fi
621     ;;
622 esac
623
624 AC_SUBST([ALTIVEC_CFLAGS])
625 AC_SUBST([SSE3_CFLAGS])
626 AC_SUBST([NEON_CFLAGS])
627
628 #### Checks for linker characteristics
629
630
631 #### Checks for library functions
632
633 AC_CHECK_FUNCS([\
634 backtrace \
635 backtrace_symbols \
636 execvp \
637 fpathconf \
638 fstatat \
639 malloc_usable_size \
640 mkdirat \
641 mtrace \
642 realpath \
643 strlcpy \
644 geteuid \
645 getuid \
646 pause \
647 ])
648
649 AC_FUNC_ALLOCA
650 AC_FUNC_MMAP
651
652 EFL_CHECK_FUNCS([EFLALL], [fnmatch gettimeofday dirfd fcntl])
653
654 have_atfile_source="${ac_cv_func_fstatat}"
655 AC_DEFINE_IF([HAVE_ATFILE_SOURCE],
656    [test "x${have_atfile_source}" = "xyes"],
657    [1], [Use fstatat and other -at file functions])
658
659
660
661 ######################  EFL  ######################
662
663 want_libeeze="yes"
664 AC_ARG_ENABLE([libeeze],
665    [AS_HELP_STRING([--disable-libeeze],[disable Eeze device library @<:@default=enable@:>@])],
666    [
667     if test "x${enableval}" = "xyes"; then
668        want_libeeze="yes"
669     else
670        want_libeeze="no"
671        CFOPT_WARNING="yes"
672     fi
673    ])
674
675 build_libeeze="yes"
676 if test "x${want_libeeze}" = "xyes" ; then
677     if test "x${have_linux}" = "xyes" ; then
678         build_libeeze="yes"
679     else
680         build_libeeze="no"
681         want_libeeze="no"
682     fi
683 else
684     build_libeeze="no"
685 fi
686
687 AC_ARG_ENABLE([systemd],
688    [AS_HELP_STRING([--enable-systemd],[Enable systemd support. @<:@default=disabled@:>@])],
689    [
690     if test "x${enableval}" = "xyes" ; then
691        want_systemd="yes"
692     else
693        want_systemd="no"
694     fi
695    ], [
696     want_systemd="no"
697    ])
698
699 systemd_dbus_prefix="# "
700 if test "${want_systemd}" = "yes"; then
701    systemd_dbus_prefix=""
702 fi
703 AC_SUBST(systemd_dbus_prefix)
704
705 AC_ARG_WITH([systemdunitdir],
706          AS_HELP_STRING([--with-systemdunitdir=DIR],[path to systemd user services directory]),
707          [USER_SESSION_DIR=${withval}])
708 if test "$want_systemd" == "no"; then
709   have_systemd_user_session="no"
710 elif test -n "${USER_SESSION_DIR}"; then
711   have_systemd_user_session="yes"
712   AC_MSG_NOTICE([Using systemd user services directory as ${USER_SESSION_DIR}])
713 else
714   # Detect systemd user session directory properly
715   EFL_PKG_CHECK_VAR([USER_SESSION_DIR], [systemd >= 192], [systemduserunitdir],
716         [have_systemd_user_session="yes"], [have_systemd_user_session="no"])
717
718   if test "$want_systemd" = "yes" -a "$have_systemd_user_session" = "no"; then
719      AC_MSG_ERROR([systemd support wanted, but systemd was not found.])
720   fi
721 fi
722
723 AM_CONDITIONAL([HAVE_SYSTEMD_USER_SESSION], [test "x${have_systemd_user_session}" = "xyes"])
724 AC_SUBST([USER_SESSION_DIR])
725
726 if test "x${have_systemd_pkg}" = "xauto" -o "x${have_systemd_pkg}" = "xyes"; then
727    PKG_CHECK_MODULES([SYSTEMD], [libsystemd >= 209],
728    [have_systemd_pkg="yes"],
729    [have_systemd_pkg="no"])
730 fi
731
732 # check for systemd library if requested
733 if test "x${want_systemd}" = "xyes" -a "x${have_systemd_pkg}" = "xno"; then
734    AC_MSG_ERROR([Systemd dependency requested but not found])
735 fi
736
737 AM_CONDITIONAL([WANT_SYSTEMD], [test "${want_systemd}" = "yes"])
738 AM_CONDITIONAL([HAVE_SYSTEMD], [test "${want_systemd}" = "yes" -a "${have_systemd_pkg}" = "yes"])
739 #### Platform-dependent
740
741 #### Evil
742 EFL_LIB_START_OPTIONAL([Evil], [test "${have_windows}" = "yes"])
743
744 ### Default values
745
746 ### Additional options to configure
747 EFL_SELECT_WINDOWS_VERSION
748
749 ### Checks for programs
750
751 ### Checks for libraries
752
753 EFL_ADD_LIBS([EVIL], [-lpsapi -lole32 -lws2_32 -lsecur32 -luuid])
754
755 ### Checks for header files
756
757 ### Checks for types
758
759 ### Checks for structures
760
761 ### Checks for compiler characteristics
762
763 EVIL_CPPFLAGS="-DPSAPI_VERSION=1"
764 # TODO: should we have these at EFL (global?)
765 # Note: these warnings should not be used with C++ code
766 EVIL_CFLAGS_WRN="-Wdeclaration-after-statement -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls"
767 EVIL_CXXFLAGS="${EVIL_CXXFLAGS}"
768
769 if test "x${have_win32}" = "xyes" ; then
770    EVIL_CFLAGS="-DSECURITY_WIN32 ${EVIL_CFLAGS}"
771    EVIL_CXXFLAGS="-fno-rtti -fno-exceptions -DSECURITY_WIN32 ${EVIL_CXXFLAGS}"
772 fi
773
774 AC_SUBST([EVIL_CPPFLAGS])
775 AC_SUBST([EVIL_CFLAGS_WRN])
776 AC_SUBST([EVIL_CXXFLAGS])
777
778 ### Checks for linker characteristics
779
780 ### Checks for library functions
781
782 EFL_LIB_END_OPTIONAL([Evil])
783
784 AC_SUBST([USE_EVIL_CFLAGS])
785 AC_SUBST([USE_EVIL_LIBS])
786 #### End of Evil
787
788
789 #### Escape
790 EFL_LIB_START_OPTIONAL([Escape], [test "${have_ps3}" = "yes"])
791
792 ### Additional options to configure
793
794 ### Default values
795
796 ### Checks for programs
797
798 ### Checks for libraries
799 EFL_ADD_LIBS([ESCAPE], [-llv2 -lm -lnet -lsysmodule -liberty])
800
801 ### Checks for header files
802
803 ### Checks for types
804
805 ### Checks for structures
806
807 ### Checks for compiler characteristics
808
809 ### Checks for linker characteristics
810
811 ### Checks for library functions
812
813 EFL_LIB_END_OPTIONAL([Escape])
814 #### End of Escape
815
816 EFL_CHECK_FUNC([SHM], [shm_open])
817 SHM_LIBS="${requirements_libs_shm}"
818 AC_SUBST([SHM_LIBS])
819
820 AC_SUBST([DL_LIBS])
821 AC_SUBST([DL_INTERNAL_LIBS])
822 #### End of Platform-dependent
823
824
825 #### Eina
826
827 EFL_LIB_START([Eina])
828
829 ### Default values
830
831 have_safety_checks="yes"
832 want_log="yes"
833 case "${build_profile}" in
834    dev)
835      with_max_log_level=""
836      have_stringshare_usage="no"
837      want_valgrind="auto"
838      want_debug_malloc="no"
839      want_debug_threads="no"
840      want_default_mempool="no"
841      want_cow_magic="no"
842      ;;
843
844    debug)
845      with_max_log_level=""
846      have_stringshare_usage="yes"
847      want_valgrind="auto"
848      want_debug_malloc="yes"
849      want_debug_threads="yes"
850      want_default_mempool="yes"
851      want_cow_magic="yes"
852      ;;
853
854    release)
855      with_max_log_level="3"
856      have_stringshare_usage="no"
857      want_valgrind="no"
858      want_debug_malloc="no"
859      want_debug_threads="no"
860      want_default_mempool="no"
861      want_cow_magic="no"
862      ;;
863 esac
864
865 PKG_CHECK_MODULES(UNWIND, [libunwind libunwind-generic],
866                   [have_unwind=yes], [have_unwind=no])
867 AS_IF([test "x$have_unwind" = "xyes"],
868       [AC_DEFINE([HAVE_UNWIND], [1], [Have libunwind])])
869 AM_CONDITIONAL(HAVE_UNWIND, test "x$have_unwind" = "xyes")
870
871 EINA_CONFIG([HAVE_ALLOCA_H], [test "x${ac_cv_working_alloca_h}" = "xyes"])
872 EINA_CONFIG([SAFETY_CHECKS], [test "x${have_safety_checks}" = "xyes"])
873 EINA_CONFIG([DEFAULT_MEMPOOL], [test "x${want_default_mempool}" = "xyes"])
874
875 if test -n "${with_max_log_level}"; then
876    AC_MSG_NOTICE([ignoring any EINA_LOG() with level greater than ${with_max_log_level}])
877    AC_DEFINE_UNQUOTED([EINA_LOG_LEVEL_MAXIMUM], [${with_max_log_level}], [if set, logging is limited to this amount.])
878 fi
879
880 AC_DEFINE_IF([EINA_STRINGSHARE_USAGE],
881    [test "x${have_stringshare_usage}" = "xyes"],
882    [1], [Report Eina stringshare usage pattern])
883
884 ### Additional options to configure
885 AC_ARG_ENABLE([magic-debug],
886    [AS_HELP_STRING([--disable-magic-debug],[disable magic debug of eina structure @<:@default=enabled@:>@])],
887    [
888     if test "x${enableval}" = "xyes" ; then
889        have_magic_debug="yes"
890     else
891        have_magic_debug="no"
892     fi
893    ],
894    [have_magic_debug="yes"])
895
896 EINA_CONFIG([MAGIC_DEBUG], [test "x${have_magic_debug}" = "xyes"])
897
898 AC_ARG_WITH([xattr-tests-path],
899    [AS_HELP_STRING([--with-xattr-tests-path=DIR],[path of xattr enabled directory to create test files])],[XATTR_TEST_DIR=${withval}][AC_DEFINE_UNQUOTED([XATTR_TEST_DIR],["$withval"], [xattr enabled directory])])
900
901 evas_dicts_hyphen_dir="/usr/share/hyphen/"
902 AC_ARG_WITH([dictionaries-hyphen-dir],
903    [AS_HELP_STRING([--with-dictionaries-hyphen-dir=DIR],[path of hunspell-compatible hyphen dictionaries])], [evas_dicts_hyphen_dir=$withval])
904 AC_DEFINE_UNQUOTED([EVAS_DICTS_HYPHEN_DIR],["$evas_dicts_hyphen_dir"], [Hunspell-compatible hyphen dictionaries install directory])
905
906 ### Checks for programs
907
908 ### Checks for libraries
909 EFL_PLATFORM_DEPEND([EINA], [all])
910
911 EFL_ADD_LIBS([EINA], [-lm])
912
913 ## Options
914
915 # Valgrind
916 AC_ARG_ENABLE([valgrind],
917    [AS_HELP_STRING([--disable-valgrind],[enable valgrind mempool declaration. @<:@default=disabled@:>@])],
918    [
919     if test "x${enableval}" = "xyes" ; then
920        want_valgrind="yes"
921     else
922        want_valgrind="no"
923     fi
924    ])
925
926 if test "${want_valgrind}" = "auto"; then
927    PKG_CHECK_EXISTS([valgrind >= 2.4.0], [want_valgrind="yes"],
928       [want_valgrind="no"
929        AC_MSG_WARN([valgrind support desired by --with-profile=${build_profile} but not found. If your platform supports it, install valgrind.])])
930 fi
931
932 if test "${want_valgrind}" = "no"; then
933     AC_DEFINE([NVALGRIND], [1], [Valgrind support disabled])
934 else
935     PKG_CHECK_MODULES([VALGRIND], [valgrind >= 2.4.0])
936     AC_DEFINE([HAVE_VALGRIND], [1], [Valgrind support enabled])
937 fi
938
939 AC_DEFINE_IF([EINA_DEBUG_MALLOC],
940    [test "x${ac_cv_func_malloc_usable_size}" = "xyes" && test "x${want_debug_malloc}" = "xyes"],
941    [1], [Turn on debugging overhead in mempool])
942
943 AC_DEFINE_IF([EINA_COW_MAGIC_ON],
944    [test "x${want_cow_magic}" = "xyes" ],
945    [1], [Turn on Eina_Magic in Eina_Cow])
946
947 EFL_OPTIONAL_DEPEND_PKG([EINA], [${want_systemd}], [SYSTEMD], [libsystemd])
948
949 EFL_EVAL_PKGS([EINA])
950
951 ## Examples
952
953 ## Benchmarks
954
955 PKG_CHECK_MODULES([GLIB],
956    [glib-2.0],
957    [have_glib="yes"],
958    [have_glib="no"])
959
960 if test "x${have_glib}" = "xyes" ; then
961    GLIB_CFLAGS="${GLIB_CFLAGS} -DEINA_BENCH_HAVE_GLIB"
962 fi
963
964 ### Checks for header files
965
966 # sys/mman.h could be provided by evil/escape/exotic so we need to set CFLAGS accordingly
967 CFLAGS_save="${CFLAGS}"
968 CFLAGS="${CFLAGS} ${EINA_CFLAGS}"
969 AC_CHECK_HEADERS([sys/mman.h])
970 CFLAGS="${CFLAGS_save}"
971
972 AC_CHECK_HEADER([byteswap.h], [have_byteswap="yes"], [have_byteswap="no"])
973
974 ### Checks for types
975
976 EINA_CONFIG([HAVE_DIRENT_H], [test "x${have_dirent}" = "xyes"])
977 AC_DEFINE_IF([HAVE_DIRENT_H], [test "x${have_dirent}" = "xyes"],
978    [1], [Define to 1 if you have a valid <dirent.h> header file.])
979
980 ### Checks for structures
981
982 ### Checks for compiler characteristics
983 EINA_CONFIG([HAVE_BYTESWAP_H], [test "x${have_byteswap}" = "xyes"])
984
985 EFL_CHECK_GCC_BUILTIN([bswap16], [HAVE_BSWAP16])
986 EFL_CHECK_GCC_BUILTIN([bswap32], [HAVE_BSWAP32])
987 EFL_CHECK_GCC_BUILTIN([bswap64], [HAVE_BSWAP64])
988
989 ### Checks for linker characteristics
990
991 ### Checks for library functions
992
993 AC_CHECK_FUNCS([fchmod])
994
995 EFL_CHECK_FUNCS([EINA], [dlopen dladdr iconv shm_open splice setxattr getpagesize])
996
997 enable_log="no"
998 if test "x${efl_func_fnmatch}" = "xyes" && test "x${want_log}" = "xyes" ; then
999    enable_log="yes"
1000 fi
1001
1002 AC_MSG_CHECKING([wether to build Eina_Log infrastructure])
1003 AC_MSG_RESULT([${enable_log}])
1004
1005 EINA_CONFIG([ENABLE_LOG], [test "x${enable_log}" = "xyes"])
1006
1007 EFL_CHECK_THREADS
1008 if test "x${efl_have_threads}" = "xno"; then
1009    CFOPT_WARNING="xyes"
1010 fi
1011
1012 AC_COMPILE_IFELSE(
1013    [AC_LANG_PROGRAM(
1014        [[ ]],
1015        [[
1016         static __thread int a = 0;
1017        ]])],
1018    [have_thread_specifier="yes"],
1019    [have_thread_specifier="no"])
1020 AC_MSG_CHECKING([for __thread specifier])
1021 AC_MSG_RESULT([${have_thread_specifier}])
1022 if test "x${have_thread_specifier}" = "xyes" ; then
1023     AC_DEFINE([HAVE_THREAD_SPECIFIER], [1], [Have the __thread specifier])
1024 fi
1025
1026 EFL_ADD_PUBLIC_LIBS([EINA], [${EFL_PTHREAD_LIBS}])
1027 EFL_ADD_CFLAGS([EINA], [${EFL_PTHREAD_CFLAGS}])
1028
1029 EINA_CONFIG([HAVE_PTHREAD_BARRIER], [test "x${efl_have_pthread_barrier}" = "xyes"])
1030 EINA_CONFIG([HAVE_PTHREAD_AFFINITY], [test "x${efl_have_setaffinity}" = "xyes"])
1031 EINA_CONFIG([HAVE_PTHREAD_SETNAME], [test "x${efl_have_setname}" = "xyes"])
1032 EINA_CONFIG([HAVE_DEBUG_THREADS], [test "x${want_debug_threads}" = "xyes"])
1033 EINA_CONFIG([HAVE_POSIX_SPINLOCK], [test "x${efl_have_posix_threads_spinlock}" = "xyes"])
1034 EINA_CONFIG([HAVE_OSX_SPINLOCK], [test "x${efl_have_osx_spinlock}" = "xyes"])
1035 EINA_CONFIG([HAVE_OSX_SEMAPHORE], [test "x${have_darwin}" = "xyes"])
1036
1037 ### Modules
1038
1039 EINA_CHECK_MODULE([chained-pool], [static], [chained pool])
1040 EINA_CHECK_MODULE([pass-through], [static], [pass through])
1041 EINA_CHECK_MODULE([one-big],      [static], [one big])
1042
1043 EFL_ADD_FEATURE([EINA], [systemd-journal], [${want_systemd}])
1044
1045 EFL_LIB_END([Eina])
1046 #### End of Eina
1047
1048 #### Eina CXX
1049 EFL_LIB_START([Eina_Cxx])
1050
1051 EFL_CXX_COMPILE_STDCXX_11([ext])
1052 AC_ARG_ENABLE([cxx-bindings],
1053    [AS_HELP_STRING([--disable-cxx-bindings],[disable C++11 bindings. @<:@default=enabled@:>@])],
1054    [want_cxx11="${enableval}"], [want_cxx11="yes"])
1055
1056 if test "x${HAVE_CXX11}" = "x1" -a "x${want_cxx11}" = "xyes"; then
1057   have_cxx11="yes"
1058 else
1059   have_cxx11="no"
1060 fi
1061
1062 AM_CONDITIONAL([HAVE_CXX11], [test "x${have_cxx11}" = "xyes"])
1063
1064 EFL_INTERNAL_DEPEND_PKG([EINA_CXX], [Eina])
1065 EFL_ADD_CFLAGS([EINA_CXX], [${EFL_PTHREAD_CFLAGS}])
1066 EFL_EVAL_PKGS([EINA_CXX])
1067
1068 EFL_LIB_END([Eina_Cxx])
1069 #### End of Eina CXX
1070
1071 AC_ARG_WITH([js],
1072    [AS_HELP_STRING([--with-js=@<:@nodejs/libv8/libuv/none@:>@],[enable JavaScript bindings using nodejs or libv8/libuv as build dependencies. The libuv option implies libv8. @<:@default=none@:>@])],
1073    [want_js="${withval}"], [want_js="none"])
1074
1075 EFLJS_CXXFLAGS=""
1076 AC_LANG_PUSH([C++])
1077 case "$want_js" in
1078      nodejs)
1079         AC_CHECK_HEADERS([node/v8.h nodejs/deps/v8/v8.h nodejs/deps/v8/include/v8.h nodejs/src/v8.h v8.h],
1080                          [
1081                            v8_header=AC_header
1082                            v8_header_define=AS_TR_CPP([HAVE_]AC_header)
1083                            EFLJS_CXXFLAGS="$EFLJS_CXXFLAGS -D$v8_header_define"
1084                            break
1085                          ]
1086                          [AC_MSG_ERROR([Could not find v8 include headers from nodejs.])])
1087         AC_CHECK_HEADERS([node/node.h nodejs/deps/node/node.h nodejs/deps/node/include/node.h nodejs/src/node.h node.h],
1088                          [
1089                            node_header_define=AS_TR_CPP([HAVE_]AC_header)
1090                            EFLJS_CXXFLAGS="$EFLJS_CXXFLAGS -D$node_header_define"
1091                            break
1092                          ]
1093                          [AC_MSG_ERROR([Could not find node include headers from nodejs.])])
1094         AC_CHECK_HEADERS([node/uv.h nodejs/deps/uv/uv.h nodejs/deps/uv/include/uv.h nodejs/src/uv.h uv.h],
1095                          [
1096                            uv_header_define=AS_TR_CPP([HAVE_]AC_header)
1097                            EFLJS_CXXFLAGS="$EFLJS_CXXFLAGS -D$uv_header_define"
1098                            break
1099                          ]
1100                          [AC_MSG_ERROR([Could not find uv include headers from nodejs.])])
1101         ;;
1102      libv8)
1103         AC_CHECK_HEADERS([v8.h],
1104                          [
1105                            v8_header=AC_header
1106                            break
1107                          ]
1108                          [AC_MSG_ERROR([Could not find v8 include headers from libv8.])])
1109         ;;
1110      libuv)
1111         AC_CHECK_HEADERS([v8.h],
1112                          [
1113                            v8_header=AC_header
1114                            break
1115                          ]
1116                          [AC_MSG_ERROR([Could not find v8 include headers from libv8.])])
1117         AC_CHECK_HEADERS([uv.h],
1118                          [break]
1119                          [AC_MSG_ERROR([Could not find uv include headers from libuv.])])
1120         ;;
1121      none)
1122         ;;
1123      *) AC_MSG_ERROR([Invalid javascript dependency (${want_js}): must be none, nodejs, libv8 or libuv]) ;;
1124 esac
1125
1126 have_v8_global="no"
1127 have_v8_create_params="no"
1128 if test "$want_js" != "none" ; then
1129 AC_COMPILE_IFELSE(
1130    [AC_LANG_PROGRAM(
1131        [[
1132 #include "$v8_header"
1133        ]],
1134        [[
1135 v8::Isolate::CreateParams create_params; create_params.array_buffer_allocator = nullptr;
1136        ]])
1137    ],
1138    [
1139     AC_DEFINE(HAVE_V8_CREATE_PARAMS, 1, [Define to 1 if you must pass create_params explicitly.])
1140     have_v8_create_params="yes"
1141     AC_MSG_NOTICE([checking for v8::Isolate::CreateParams... yes])
1142    ],
1143    [
1144     AC_MSG_NOTICE([checking for v8::Isolate::CreateParams... no])
1145    ])
1146 AC_COMPILE_IFELSE(
1147    [AC_LANG_PROGRAM(
1148        [[
1149 #include "$v8_header"
1150 #include <type_traits>
1151        ]],
1152        [[
1153        static_assert((std::is_same< ::v8::Global<void>, ::v8::UniquePersistent<void>>::value), "");
1154        ]])
1155    ],
1156    [
1157     AC_DEFINE(HAVE_V8_GLOBAL, 1, [Define to 1 if you must pass create_params explicitly.])
1158     have_v8_global="yes"
1159     AC_MSG_NOTICE([checking for v8::Global<T> class... yes])
1160    ],
1161    [
1162     AC_MSG_NOTICE([checking for v8::Global<T> class... no])
1163    ])
1164 fi
1165 AM_CONDITIONAL([HAVE_V8_CREATE_PARAMS], [test "x${have_v8_create_params}" = "xyes"])
1166 AM_CONDITIONAL([HAVE_V8_GLOBAL], [test "x${have_v8_global}" = "xyes"])
1167 AC_SUBST([HAVE_V8_CREATE_PARAMS])
1168 AC_SUBST([HAVE_V8_GLOBAL])
1169 AC_LANG_POP([C++])
1170
1171 AM_CONDITIONAL([HAVE_NODEJS], [test "x${want_js}" = "xnodejs"])
1172 AC_DEFINE_IF([HAVE_NODEJS], [test "x${want_js}" = "xnodejs"],
1173   [1], [Using NodeJS])
1174 AC_SUBST([want_js])
1175 AC_SUBST([HAVE_NODEJS])
1176
1177 have_js="no"
1178 if test "x${want_js}" != "xnone" ; then
1179    have_js="yes"
1180 fi
1181 AM_CONDITIONAL([HAVE_JS], [test "x${have_js}" = "xyes"])
1182 AC_DEFINE_IF([HAVE_JS], [test "x${have_js}" = "xyes"], [1], [Compiling bindings for JavaScript])
1183 AC_SUBST([HAVE_JS])
1184
1185 AM_CONDITIONAL([HAVE_LIBUV], [test "x${want_js}" = "xnodejs" -o "x${want_js}" = "xlibuv"])
1186 AC_DEFINE_IF([HAVE_LIBUV], [test "x${want_js}" = "xnodejs" -o "x${want_js}" = "xlibuv"],
1187              [1], [Compiling libuv event loop integration])
1188 AC_SUBST([HAVE_LIBUV])
1189
1190 # For efljspack mime handling
1191 AM_CONDITIONAL([HAVE_XDG_DATA_HOME], [test "x${XDG_DATA_HOME}" != "x"])
1192 AM_COND_IF([HAVE_XDG_DATA_HOME], [AC_SUBST([XDG_DATA_HOME])], [AC_SUBST([XDG_DATA_HOME], "$HOME/.local/share")])
1193
1194 #### Eina JS
1195 EFL_LIB_START_OPTIONAL([Eina_Js], [test "x${have_js}" = "xyes"])
1196 EFL_INTERNAL_DEPEND_PKG([EINA_JS], [Eina])
1197 EFL_INTERNAL_DEPEND_PKG([EINA_JS], [Eo])
1198 EFL_ADD_CFLAGS([EINA_JS], [${EFL_PTHREAD_CFLAGS}])
1199 EFL_EVAL_PKGS([EINA_JS])
1200
1201 EFL_LIB_END_OPTIONAL([Eina_Js])
1202 #### End of Eina JS
1203
1204 #### Ecore JS
1205 EFL_LIB_START_OPTIONAL([Ecore_Js], [test "x${have_js}" = "xyes"])
1206
1207 EFL_INTERNAL_DEPEND_PKG([ECORE_JS], [ecore])
1208 EFL_INTERNAL_DEPEND_PKG([ECORE_JS], [ecore_file])
1209 EFL_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 EFL_INTERNAL_DEPEND_PKG([ELUA], [ecore_file])
4886
4887 EFL_DEPEND_PKG([ELUA], [LUAJIT], [luajit >= 2.0.0])
4888
4889 EFL_EVAL_PKGS([ELUA])
4890
4891 ### Checks for header files
4892
4893 ### Checks for types
4894
4895 ### Checks for structures
4896
4897 ### Checks for compiler characteristics
4898
4899 ### Checks for linker characteristics
4900
4901 ### Checks for library functions
4902
4903 ### Check availability
4904
4905 EFL_LIB_END_OPTIONAL([Elua])
4906 #### End of Elua
4907
4908 #### Elocation
4909
4910 EFL_LIB_START([Elocation])
4911
4912 ### Default values
4913
4914 ### Additional options to configure
4915
4916 ### Checks for programs
4917
4918 ### Checks for libraries
4919 EFL_PLATFORM_DEPEND([ELOCATION], [evil])
4920 EFL_INTERNAL_DEPEND_PKG([ELOCATION], [eina])
4921 EFL_INTERNAL_DEPEND_PKG([ELOCATION], [eo])
4922 EFL_INTERNAL_DEPEND_PKG([ELOCATION], [ecore])
4923 EFL_INTERNAL_DEPEND_PKG([ELOCATION], [eldbus])
4924
4925 EFL_ADD_LIBS([ELOCATION], [-lm])
4926
4927 ### Checks for header files
4928
4929 ### Checks for types
4930
4931 ### Checks for structures
4932
4933 ### Checks for compiler characteristics
4934
4935 ### Checks for linker characteristics
4936
4937 ### Checks for library functions
4938
4939 ### Check availability
4940
4941 EFL_LIB_END([Elocation])
4942 #### End of Elocation
4943
4944
4945
4946 #### Efl_Js
4947 EFL_LIB_START_OPTIONAL([Efl_Js], [test "x${have_js}" = "xyes"])
4948
4949 ### Default values
4950
4951 ### Additional options to configure
4952
4953 ### Checks for programs
4954
4955 ### Checks for libraries
4956 EFL_INTERNAL_DEPEND_PKG([EFL_JS], [Eina])
4957 EFL_INTERNAL_DEPEND_PKG([EFL_JS], [Eo])
4958 EFL_INTERNAL_DEPEND_PKG([EFL_JS], [Ecore])
4959 EFL_INTERNAL_DEPEND_PKG([EFL_JS], [Eet])
4960 EFL_INTERNAL_DEPEND_PKG([EFL_JS], [Ecore_Evas])
4961 EFL_INTERNAL_DEPEND_PKG([EFL_JS], [Ecore_Con])
4962 EFL_INTERNAL_DEPEND_PKG([EFL_JS], [Ecore_Audio])
4963 EFL_INTERNAL_DEPEND_PKG([EFL_JS], [Efl])
4964 EFL_INTERNAL_DEPEND_PKG([EFL_JS], [Evas])
4965 EFL_INTERNAL_DEPEND_PKG([EFL_JS], [Edje])
4966 EFL_INTERNAL_DEPEND_PKG([EFL_JS], [Emotion])
4967 EFL_INTERNAL_DEPEND_PKG([EFL_JS], [Eldbus])
4968 EFL_INTERNAL_DEPEND_PKG([EFL_JS], [Emile])
4969 EFL_INTERNAL_DEPEND_PKG([EFL_JS], [Ethumb_Client])
4970 EFL_INTERNAL_DEPEND_PKG([EFL_JS], [Eio])
4971
4972 AM_COND_IF([HAVE_NODEJS], [], [ EFL_ADD_LIBS([EFL_JS], [-lv8]) ])
4973
4974 EFL_EVAL_PKGS([EFL_JS])
4975
4976 AM_COND_IF([HAVE_NODEJS], [EFLJS_CXXFLAGS="$EFLJS_CXXFLAGS -DHAVE_NODEJS"], [])
4977 AM_COND_IF([HAVE_LIBUV], [EFLJS_CXXFLAGS="$EFLJS_CXXFLAGS -DHAVE_LIBUV"], [])
4978 AM_COND_IF([HAVE_JS], [EFLJS_CXXFLAGS="$EFLJS_CXXFLAGS -DHAVE_JS"], [])
4979
4980 AM_COND_IF([HAVE_V8_CREATE_PARAMS], [EFLJS_CXXFLAGS="$EFLJS_CXXFLAGS -DHAVE_V8_CREATE_PARAMS"], [])
4981 AM_COND_IF([HAVE_V8_GLOBAL], [EFLJS_CXXFLAGS="$EFLJS_CXXFLAGS -DHAVE_V8_GLOBAL"], [])
4982 AC_SUBST([EFLJS_CXXFLAGS])
4983
4984 ### Checks for header files
4985
4986 ### Checks for types
4987
4988 ### Checks for structures
4989
4990 ### Checks for compiler characteristics
4991
4992 ### Checks for linker characteristics
4993
4994 ### Checks for library functions
4995
4996 ### Check availability
4997
4998 EFL_LIB_END_OPTIONAL([Efl_Js])
4999 #### End of Efl_Js
5000
5001 ### Add Wayland server library if test is enabled
5002 if test "x${want_tests}" = "xyes" -a "x${want_wayland}" = "xyes"; then
5003    EFL_DEPEND_PKG([ECORE_WAYLAND_SRV], [WAYLAND], [wayland-server >= 1.8.0])
5004    EFL_EVAL_PKGS([ECORE_WAYLAND_SRV])
5005 fi
5006
5007 AC_ARG_ENABLE([always-build-examples],
5008    [AS_HELP_STRING([--enable-always-build-examples],[always build examples. @<:@default=disabled@:>@])],
5009    [
5010     if test "x${enableval}" = "xyes" ; then
5011        want_always_build_examples="yes"
5012     else
5013        want_always_build_examples="no"
5014     fi
5015    ],
5016    [want_always_build_examples="no"])
5017 AM_CONDITIONAL([ALWAYS_BUILD_EXAMPLES], [test "${want_always_build_examples}" = "yes"])
5018
5019 BARF_OK="xno"
5020 # Harfbuzz
5021 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],
5022    [ You will be told when this is needed ],
5023    [
5024     if test "x${enableval}" = "xyes" ; then
5025        BARF_OK=""
5026     else
5027        BARF_OK="xno"
5028     fi
5029    ],
5030    [ BARF_OK="xno" ])
5031
5032 #### Ecore_Buffer
5033 build_ecore_buffer_x11_dri2="no"
5034 build_ecore_buffer_x11_dri3="no"
5035 EFL_LIB_START_OPTIONAL([Ecore_Buffer], [test "${want_ecore_buffer}" = "yes"])
5036 ### Checks for libraries
5037 EFL_INTERNAL_DEPEND_PKG([ECORE_BUFFER], [eina])
5038 EFL_INTERNAL_DEPEND_PKG([ECORE_BUFFER], [eo])
5039 EFL_INTERNAL_DEPEND_PKG([ECORE_BUFFER], [ecore])
5040 EFL_DEPEND_PKG([ECORE_BUFFER], [WAYLAND],
5041                [wayland-server >= 1.5.0 wayland-client >= 1.5.0])
5042
5043 PKG_CHECK_MODULES([X11_DRI_COMMON],
5044    [
5045       libtbm >= 1.1.0,
5046       libdrm >= 2.4.35,
5047    ],
5048    [have_x11_dri_common_pkgs="yes"],
5049    [have_x11_dri_common_pkgs="no"]
5050 )
5051
5052 if test "x$have_x11_dri_common_pkgs" = "xyes" ; then
5053    EFL_INTERNAL_DEPEND_PKG([ECORE_BUFFER], [ecore_x])
5054
5055    PKG_CHECK_MODULES([X11_DRI2], [libdri2],
5056                      [have_x11_dri2_pkgs="yes"],
5057                      [have_x11_dri2_pkgs="no"])
5058    PKG_CHECK_MODULES([X11_DRI3],
5059       [
5060          xshmfence,
5061          xcb,
5062          x11-xcb,
5063          xcb-sync,
5064          xcb-dri3
5065       ],
5066       [have_x11_dri3_pkgs="yes"],
5067       [have_x11_dri3_pkgs="no"])
5068 fi
5069
5070 if test "x${have_x11_dri2_pkgs}" = "xyes" ; then
5071    build_ecore_buffer_x11_dri2="yes"
5072    AC_DEFINE(BUILD_ECORE_BUFFER_X11_DRI2, 1, [Support for X11_DRI2 Backend in Ecore_Buffer])
5073 fi
5074
5075 if test "x${have_x11_dri3_pkgs}" = "xyes" ; then
5076    build_ecore_buffer_x11_dri3="yes"
5077    AC_DEFINE(BUILD_ECORE_BUFFER_X11_DRI3, 1, [Support for X11_DRI3 Backend in Ecore_Buffer])
5078 fi
5079 EFL_EVAL_PKGS([ECORE_BUFFER])
5080
5081 EFL_ADD_FEATURE([ECORE_BUFFER], [shm], ["yes"])
5082 EFL_ADD_FEATURE([ECORE_BUFFER], [x11_dri2], [${build_ecore_buffer_x11_dri2}])
5083 EFL_ADD_FEATURE([ECORE_BUFFER], [x11_dri3], [${build_ecore_buffer_x11_dri3}])
5084
5085 EFL_LIB_END_OPTIONAL([Ecore_Buffer])
5086
5087 AM_CONDITIONAL([BUILD_ECORE_BUFFER_X11_DRI2], [test "${build_ecore_buffer_x11_dri2}" = "xyes"])
5088 AM_CONDITIONAL([BUILD_ECORE_BUFFER_X11_DRI3], [test "${build_ecore_buffer_x11_dri3}" = "xyes"])
5089
5090 #### End of Ecore_Buffer
5091
5092
5093 #### Elementary
5094
5095 EFL_LIB_START([Elementary])
5096
5097 ### Default values
5098
5099 ### Additional options to configure
5100
5101 ## Elementary base dir
5102
5103 AC_ARG_WITH([elementary-base-dir],
5104    [AS_HELP_STRING([--with-elementary-base-dir=PATH], [specify the subdirectory for all elementary data @<:@default=${elementary_base_dir}@:>@])],
5105    [elementary_base_dir=${withval}],
5106    [elementary_base_dir=".elementary"])
5107
5108 AC_MSG_NOTICE([ELEMENTARY_BASE_DIR set to ${elementary_base_dir}])
5109 AC_DEFINE_UNQUOTED([ELEMENTARY_BASE_DIR], ["${elementary_base_dir}"], ["subdirectory for all elementary data"])
5110
5111 ## Debug mode
5112
5113 AC_ARG_ENABLE([debug],
5114    [AS_HELP_STRING([--enable-debug], [enable elementary debug support. @<:@default=disabled@:>@])],
5115    [want_elementary_debug=$enableval],
5116    [want_elementary_debug="no"])
5117
5118 ELM_DEBUG_DEF="#undef"
5119 if test "x$want_elementary_debug" = "xyes"; then
5120    AC_DEFINE([HAVE_ELEMENTARY_DEBUG], [1], [Elementary debug.])
5121    ELM_DEBUG_DEF="#define"
5122 fi
5123 AC_SUBST([ELM_DEBUG_DEF])
5124
5125 ## quicklaunch support
5126
5127 AC_ARG_ENABLE([quick-launch],
5128    [AS_HELP_STRING([--disable-quick-launch], [disable quick-launch support, @<:@default=detect@:>@])],
5129    [want_quicklaunch=$enableval],
5130    [want_quicklaunch="auto"])
5131
5132 ### Checks for programs
5133
5134 ### Checks for libraries
5135
5136 ## Compatibility layers
5137
5138 EFL_PLATFORM_DEPEND([ELEMENTARY], [evil])
5139
5140 EFL_INTERNAL_DEPEND_PKG([ELEMENTARY], [eina])
5141 EFL_INTERNAL_DEPEND_PKG([ELEMENTARY], [emile])
5142 EFL_INTERNAL_DEPEND_PKG([ELEMENTARY], [eet])
5143 EFL_INTERNAL_DEPEND_PKG([ELEMENTARY], [eo])
5144 EFL_INTERNAL_DEPEND_PKG([ELEMENTARY], [efl])
5145 EFL_INTERNAL_DEPEND_PKG([ELEMENTARY], [evas])
5146 EFL_INTERNAL_DEPEND_PKG([ELEMENTARY], [ecore])
5147 EFL_INTERNAL_DEPEND_PKG([ELEMENTARY], [ecore-evas])
5148 EFL_INTERNAL_DEPEND_PKG([ELEMENTARY], [ecore-file])
5149 EFL_INTERNAL_DEPEND_PKG([ELEMENTARY], [ecore-input])
5150 EFL_INTERNAL_DEPEND_PKG([ELEMENTARY], [edje])
5151 EFL_INTERNAL_DEPEND_PKG([ELEMENTARY], [ethumb])
5152 EFL_INTERNAL_DEPEND_PKG([ELEMENTARY], [ethumb_client])
5153 EFL_INTERNAL_DEPEND_PKG([ELEMENTARY], [emotion])
5154 EFL_INTERNAL_DEPEND_PKG([ELEMENTARY], [ecore-imf])
5155 EFL_INTERNAL_DEPEND_PKG([ELEMENTARY], [ecore-con])
5156 EFL_INTERNAL_DEPEND_PKG([ELEMENTARY], [eio])
5157 EFL_INTERNAL_DEPEND_PKG([ELEMENTARY], [eldbus])
5158 EFL_INTERNAL_DEPEND_PKG([ELEMENTARY], [efreet])
5159 EFL_INTERNAL_DEPEND_PKG([ELEMENTARY], [efreet-mime])
5160 EFL_INTERNAL_DEPEND_PKG([ELEMENTARY], [efreet-trash])
5161 EFL_INTERNAL_DEPEND_PKG([ELEMENTARY], [elocation])
5162
5163 EFL_OPTIONAL_INTERNAL_DEPEND_PKG([ELEMENTARY], [${want_x11_any}], [ecore_x])
5164 EFL_OPTIONAL_INTERNAL_DEPEND_PKG([ELEMENTARY], [${want_fb}], [ecore_fb])
5165 EFL_OPTIONAL_INTERNAL_DEPEND_PKG([ELEMENTARY], [${have_ps3}], [ecore_psl1ght])
5166 EFL_OPTIONAL_INTERNAL_DEPEND_PKG([ELEMENTARY], [${want_sdl}], [ecore_sdl])
5167 EFL_OPTIONAL_INTERNAL_DEPEND_PKG([ELEMENTARY], [${want_ecore_evas_gl_cocoa}], [ecore_cocoa])
5168 EFL_OPTIONAL_INTERNAL_DEPEND_PKG([ELEMENTARY], [${build_ecore_evas_win32}], [ecore_win32])
5169 EFL_OPTIONAL_INTERNAL_DEPEND_PKG([ELEMENTARY], [${want_drm}], [ecore_drm])
5170 EFL_OPTIONAL_INTERNAL_DEPEND_PKG([ELEMENTARY], [${build_ecore_evas_wayland}], [ecore_wl2])
5171
5172 dnl Special case deps for ecore_drm
5173 if test "${want_drm}" = "yes"; then
5174   EFL_DEPEND_PKG([ELEMENTARY], [DRM], [libdrm])
5175   EFL_INTERNAL_DEPEND_PKG([ELEMENTARY], [eeze])
5176 fi
5177
5178 EFL_ADD_LIBS([ELEMENTARY], [-lm])
5179
5180 ELM_CHECK_BACKEND([X], [${want_x11_any}])
5181 ELM_CHECK_BACKEND([FB], [${want_fb}])
5182 ELM_CHECK_BACKEND([PSL1GHT], [${have_ps3}])
5183 ELM_CHECK_BACKEND([SDL], [${want_sdl}])
5184 ELM_CHECK_BACKEND([Cocoa], [${want_ecore_evas_gl_cocoa}])
5185 ELM_CHECK_BACKEND([Win32], [${build_ecore_evas_win32}])
5186 ELM_CHECK_BACKEND([Wl2], [${build_ecore_evas_wayland}])
5187 ELM_CHECK_BACKEND([DRM], [${want_drm}])
5188
5189 EFL_EVAL_PKGS([ELEMENTARY])
5190
5191 ### Checks for header files
5192
5193 ELM_ALLOCA_H_DEF="#undef"
5194 AC_CHECK_HEADER([alloca.h], [ELM_ALLOCA_H_DEF="#define"])
5195 AC_SUBST([ELM_ALLOCA_H_DEF])
5196
5197 ELM_LIBINTL_H_DEF="#undef"
5198 AC_CHECK_HEADER([libintl.h], [ELM_LIBINTL_H_DEF="#define"])
5199 AC_SUBST([ELM_LIBINTL_H_DEF])
5200
5201 ELM_DIRENT_H_DEF="#undef"
5202 AC_CHECK_HEADER([dirent.h], [ELM_DIRENT_H_DEF="#define"])
5203 AC_SUBST([ELM_DIRENT_H_DEF])
5204
5205 AC_CHECK_HEADER([sys/mman.h], [have_mman="yes"], [have_mman="no"])
5206 if test "x${have_mman}" = "xyes"; then
5207    AC_DEFINE([HAVE_MMAN_H], [1], [Have sys/mman.h header file])
5208 fi
5209
5210 AC_CHECK_HEADERS([locale.h langinfo.h sys/times.h])
5211
5212 case "$host_os" in
5213    darwin*)
5214       AC_CHECK_HEADERS([crt_externs.h])
5215       ;;
5216 esac
5217
5218 ### Checks for types
5219
5220 ### Checks for structures
5221
5222 ### Checks for compiler characteristics
5223
5224 ### Checks for linker characteristics
5225
5226 # sockets
5227
5228 case "$host_os" in
5229    mingw*)
5230       have_socket="no"
5231       ;;
5232    *solaris*)
5233       AC_CHECK_LIB([socket], [connect],
5234          [
5235           have_socket="yes"
5236           requirement_elm_libs="-lsocket ${requirement_elm_libs}"
5237          ],
5238          [have_socket="no"])
5239       ;;
5240    darwin*)
5241       have_socket="yes"
5242       ;;
5243    *)
5244       have_socket="yes"
5245       ;;
5246 esac
5247
5248 AM_CONDITIONAL([BUILD_RUN], [test "x$have_socket" = "xyes"])
5249
5250 # Check if we can build binary with quicklaunch support
5251 ELM_QUICKLAUNCH
5252
5253 ### Checks for library functions
5254
5255 EFL_CHECK_FUNCS([ELEMENTARY], [dlopen])
5256
5257 AC_FUNC_ALLOCA
5258
5259 AC_CHECK_FUNCS([geteuid getuid getpwent])
5260
5261 if test "x${want_quicklaunch}" != "xno"; then
5262    AC_CHECK_FUNCS([fork clearenv])
5263 fi
5264
5265 build_quicklaunch="no"
5266 if test "x${ac_cv_func_fork}" = "xyes" -a "x${efl_func_dlopen}" = "xyes"; then
5267    build_quicklaunch="yes"
5268 fi
5269 echo ${build_quicklaunch}
5270
5271 AM_CONDITIONAL([BUILD_QUICKLAUNCH], [test "x${build_quicklaunch}" = "xyes"])
5272 EFL_ADD_FEATURE([ELEMENTARY], [quicklaunch], [${build_quicklaunch}])
5273
5274 # environ variable
5275
5276 AC_COMPILE_IFELSE(
5277    [AC_LANG_PROGRAM(
5278       [[
5279 # define _GNU_SOURCE 1
5280 #include <unistd.h>
5281       ]],
5282       [[
5283 extern char **environ;
5284       ]])
5285    ],
5286    [AC_DEFINE([HAVE_ENVIRON], [1], [extern environ exists])])
5287
5288 case "$host_os" in
5289    darwin*)
5290       AC_DEFINE([environ], [(*_NSGetEnviron())], ["apple doesn't follow POSIX in this case."])
5291       ;;
5292 esac
5293
5294 ### Check availability
5295
5296 EFL_LIB_END([Elementary])
5297
5298 #### End of Elementary
5299
5300
5301 #### Elementary CXX
5302 EFL_LIB_START([Elementary_Cxx])
5303
5304 EFL_INTERNAL_DEPEND_PKG([ELEMENTARY_CXX], [Eina_Cxx])
5305 EFL_INTERNAL_DEPEND_PKG([ELEMENTARY_CXX], [Eet_Cxx])
5306 EFL_INTERNAL_DEPEND_PKG([ELEMENTARY_CXX], [Ecore_Cxx])
5307 EFL_INTERNAL_DEPEND_PKG([ELEMENTARY_CXX], [Ecore])
5308 EFL_INTERNAL_DEPEND_PKG([ELEMENTARY_CXX], [Eina])
5309 EFL_INTERNAL_DEPEND_PKG([ELEMENTARY_CXX], [Eo])
5310 EFL_INTERNAL_DEPEND_PKG([ELEMENTARY_CXX], [Efl])
5311 EFL_INTERNAL_DEPEND_PKG([ELEMENTARY_CXX], [Elementary])
5312
5313 EFL_EVAL_PKGS([ELEMENTARY_CXX])
5314
5315 EFL_LIB_END([Elementary_Cxx])
5316 #### End of Ecore CXX
5317
5318
5319 #### Elementary_Js
5320 EFL_LIB_START_OPTIONAL([Elementary_Js], [test "x${have_js}" = "xyes"])
5321
5322 ### Default values
5323
5324 ### Additional options to configure
5325
5326 ### Checks for programs
5327
5328 ### Checks for libraries
5329 EFL_INTERNAL_DEPEND_PKG([ELEMENTARY_JS], [Eina])
5330 EFL_INTERNAL_DEPEND_PKG([ELEMENTARY_JS], [Eo])
5331 EFL_INTERNAL_DEPEND_PKG([ELEMENTARY_JS], [Ecore])
5332 EFL_INTERNAL_DEPEND_PKG([ELEMENTARY_JS], [Eet])
5333 EFL_INTERNAL_DEPEND_PKG([ELEMENTARY_JS], [Ecore_Evas])
5334 EFL_INTERNAL_DEPEND_PKG([ELEMENTARY_JS], [Ecore_Con])
5335 EFL_INTERNAL_DEPEND_PKG([ELEMENTARY_JS], [Ecore_Audio])
5336 EFL_INTERNAL_DEPEND_PKG([ELEMENTARY_JS], [Efl])
5337 EFL_INTERNAL_DEPEND_PKG([ELEMENTARY_JS], [Evas])
5338 EFL_INTERNAL_DEPEND_PKG([ELEMENTARY_JS], [Edje])
5339 EFL_INTERNAL_DEPEND_PKG([ELEMENTARY_JS], [Emotion])
5340 EFL_INTERNAL_DEPEND_PKG([ELEMENTARY_JS], [Eldbus])
5341 EFL_INTERNAL_DEPEND_PKG([ELEMENTARY_JS], [Emile])
5342 EFL_INTERNAL_DEPEND_PKG([ELEMENTARY_JS], [Ethumb_Client])
5343 EFL_INTERNAL_DEPEND_PKG([ELEMENTARY_JS], [Eio])
5344 EFL_INTERNAL_DEPEND_PKG([ELEMENTARY_JS], [Elementary])
5345 EFL_INTERNAL_DEPEND_PKG([ELEMENTARY_JS], [Efl_Js])
5346
5347 AM_COND_IF([HAVE_NODEJS], [], [ EFL_ADD_LIBS([ELEMENTARY_JS], [-lv8]) ])
5348
5349 EFL_EVAL_PKGS([ELEMENTARY_JS])
5350
5351 AM_COND_IF([HAVE_NODEJS], [ELEMENTARYJS_CXXFLAGS="$ELEMENTARYJS_CXXFLAGS -DHAVE_NODEJS"], [])
5352 AM_COND_IF([HAVE_LIBUV], [ELEMENTARYJS_CXXFLAGS="$ELEMENTARYJS_CXXFLAGS -DHAVE_LIBUV"], [])
5353 AM_COND_IF([HAVE_JS], [ELEMENTARYJS_CXXFLAGS="$ELEMENTARYJS_CXXFLAGS -DHAVE_JS"], [])
5354
5355 AM_COND_IF([HAVE_V8_CREATE_PARAMS], [ELEMENTARYJS_CXXFLAGS="$ELEMENTARYJS_CXXFLAGS -DHAVE_V8_CREATE_PARAMS"], [])
5356 AM_COND_IF([HAVE_V8_GLOBAL], [ELEMENTARYJS_CXXFLAGS="$ELEMENTARYJS_CXXFLAGS -DHAVE_V8_GLOBAL"], [])
5357 AC_SUBST([ELEMENTARYJS_CXXFLAGS])
5358
5359 ### Checks for header files
5360
5361 ### Checks for types
5362
5363 ### Checks for structures
5364
5365 ### Checks for compiler characteristics
5366
5367 ### Checks for linker characteristics
5368
5369 ### Checks for library functions
5370
5371 ### Check availability
5372
5373 EFL_LIB_END_OPTIONAL([ELEMENTARY_JS])
5374 #### End of Efl_Js
5375
5376 AC_CONFIG_FILES([
5377 Makefile
5378 data/Makefile
5379 config/Makefile
5380 config/default/Makefile
5381 config/default/base.src
5382 config/mobile/Makefile
5383 config/mobile/base.src
5384 config/standard/Makefile
5385 config/standard/base.src
5386 doc/Makefile
5387 doc/Doxyfile
5388 doc/previews/Makefile
5389 doc/widgets/Makefile
5390 src/Makefile
5391 src/benchmarks/eina/Makefile
5392 src/benchmarks/eo/Makefile
5393 src/benchmarks/evas/Makefile
5394 src/examples/eina/Makefile
5395 src/examples/eina_cxx/Makefile
5396 src/examples/eet/Makefile
5397 src/examples/evas/Makefile
5398 src/examples/ecore/Makefile
5399 src/examples/ecore_avahi/Makefile
5400 src/examples/eio/Makefile
5401 src/examples/eldbus/Makefile
5402 src/examples/ephysics/Makefile
5403 src/examples/edje/Makefile
5404 src/examples/emotion/Makefile
5405 src/examples/emile/Makefile
5406 src/examples/ethumb_client/Makefile
5407 src/examples/elua/Makefile
5408 src/examples/eolian_cxx/Makefile
5409 src/examples/elocation/Makefile
5410 src/lib/eina/eina_config.h
5411 src/lib/ecore_x/ecore_x_version.h
5412 src/lib/efl/Efl_Config.h
5413 src/lib/elementary/Elementary.h
5414 elm_intro.h
5415 spec/efl.spec
5416 pc/evil.pc
5417 pc/escape.pc
5418 pc/eina.pc
5419 pc/eina-cxx.pc
5420 pc/emile.pc
5421 pc/eet.pc
5422 pc/eet-cxx.pc
5423 pc/eo.pc
5424 pc/eo-cxx.pc
5425 pc/eolian.pc
5426 pc/eolian-cxx.pc
5427 pc/eina-js.pc
5428 pc/efl-js.pc
5429 pc/eolian-js.pc
5430 pc/eo-js.pc
5431 pc/efl.pc
5432 pc/efl-cxx.pc
5433 pc/evas-fb.pc
5434 pc/evas-eglfs.pc
5435 pc/evas-opengl-x11.pc
5436 pc/evas-opengl-sdl.pc
5437 pc/evas-opengl-cocoa.pc
5438 pc/evas-psl1ght.pc
5439 pc/evas-software-buffer.pc
5440 pc/evas-software-x11.pc
5441 pc/evas-software-gdi.pc
5442 pc/evas-software-ddraw.pc
5443 pc/evas-software-sdl.pc
5444 pc/evas-wayland-shm.pc
5445 pc/evas-wayland-egl.pc
5446 pc/evas-drm.pc
5447 pc/evas.pc
5448 pc/evas-cxx.pc
5449 pc/ecore.pc
5450 pc/ecore-cxx.pc
5451 pc/ecore-con.pc
5452 pc/ecore-ipc.pc
5453 pc/ecore-file.pc
5454 pc/ecore-input.pc
5455 pc/ecore-input-evas.pc
5456 pc/ecore-cocoa.pc
5457 pc/ecore-drm.pc
5458 pc/ecore-fb.pc
5459 pc/ecore-psl1ght.pc
5460 pc/ecore-sdl.pc
5461 pc/ecore-wayland.pc
5462 pc/ecore-wl2.pc
5463 pc/ecore-win32.pc
5464 pc/ecore-x.pc
5465 pc/ecore-evas.pc
5466 pc/ecore-imf.pc
5467 pc/ecore-imf-evas.pc
5468 pc/ecore-audio.pc
5469 pc/ecore-audio-cxx.pc
5470 pc/ecore-avahi.pc
5471 pc/ecore-buffer.pc
5472 pc/ector.pc
5473 pc/embryo.pc
5474 pc/eio.pc
5475 pc/eio-cxx.pc
5476 pc/eldbus.pc
5477 pc/efreet.pc
5478 pc/efreet-mime.pc
5479 pc/efreet-trash.pc
5480 pc/eeze.pc
5481 pc/ephysics.pc
5482 pc/edje.pc
5483 pc/edje-cxx.pc
5484 pc/emotion.pc
5485 pc/ethumb.pc
5486 pc/ethumb_client.pc
5487 pc/elocation.pc
5488 pc/elua.pc
5489 pc/elementary.pc
5490 pc/elementary-cxx.pc
5491 dbus-services/org.enlightenment.Ethumb.service
5492 systemd-services/ethumb.service
5493 $po_makefile_in
5494 cmakeconfig/EflConfig.cmake
5495 cmakeconfig/EflConfigVersion.cmake:cmakeconfig/EFLConfigVersion.cmake.in
5496 cmakeconfig/EinaConfig.cmake
5497 cmakeconfig/EinaConfigVersion.cmake:cmakeconfig/EFLConfigVersion.cmake.in
5498 cmakeconfig/EioConfig.cmake
5499 cmakeconfig/EioConfigVersion.cmake:cmakeconfig/EFLConfigVersion.cmake.in
5500 cmakeconfig/EezeConfig.cmake
5501 cmakeconfig/EezeConfigVersion.cmake:cmakeconfig/EFLConfigVersion.cmake.in
5502 cmakeconfig/EoConfig.cmake
5503 cmakeconfig/EoConfigVersion.cmake:cmakeconfig/EFLConfigVersion.cmake.in
5504 cmakeconfig/EolianConfig.cmake
5505 cmakeconfig/EolianConfigVersion.cmake:cmakeconfig/EFLConfigVersion.cmake.in
5506 cmakeconfig/EolianHelper.cmake
5507 cmakeconfig/EolianCxxConfig.cmake
5508 cmakeconfig/EolianCxxConfigVersion.cmake:cmakeconfig/EFLConfigVersion.cmake.in
5509 cmakeconfig/EinaCxxConfig.cmake
5510 cmakeconfig/EinaCxxConfigVersion.cmake:cmakeconfig/EFLConfigVersion.cmake.in
5511 cmakeconfig/EoCxxConfig.cmake
5512 cmakeconfig/EoCxxConfigVersion.cmake:cmakeconfig/EFLConfigVersion.cmake.in
5513 cmakeconfig/EcoreCxxConfig.cmake
5514 cmakeconfig/EcoreCxxConfigVersion.cmake:cmakeconfig/EFLConfigVersion.cmake.in
5515 cmakeconfig/EvasCxxConfig.cmake
5516 cmakeconfig/EvasCxxConfigVersion.cmake:cmakeconfig/EFLConfigVersion.cmake.in
5517 cmakeconfig/EetCxxConfig.cmake
5518 cmakeconfig/EetCxxConfigVersion.cmake:cmakeconfig/EFLConfigVersion.cmake.in
5519 cmakeconfig/EetConfig.cmake
5520 cmakeconfig/EetConfigVersion.cmake:cmakeconfig/EFLConfigVersion.cmake.in
5521 cmakeconfig/EvasConfig.cmake
5522 cmakeconfig/EvasConfigVersion.cmake:cmakeconfig/EFLConfigVersion.cmake.in
5523 cmakeconfig/EcoreConfig.cmake
5524 cmakeconfig/EcoreConfigVersion.cmake:cmakeconfig/EFLConfigVersion.cmake.in
5525 cmakeconfig/EdjeConfig.cmake
5526 cmakeconfig/EdjeConfigVersion.cmake:cmakeconfig/EFLConfigVersion.cmake.in
5527 cmakeconfig/EldbusConfig.cmake
5528 cmakeconfig/EldbusConfigVersion.cmake:cmakeconfig/EFLConfigVersion.cmake.in
5529 cmakeconfig/EfreetConfig.cmake
5530 cmakeconfig/EfreetConfigVersion.cmake:cmakeconfig/EFLConfigVersion.cmake.in
5531 cmakeconfig/EthumbConfig.cmake
5532 cmakeconfig/EthumbConfigVersion.cmake:cmakeconfig/EFLConfigVersion.cmake.in
5533 cmakeconfig/EthumbClientConfig.cmake
5534 cmakeconfig/EthumbClientConfigVersion.cmake:cmakeconfig/EFLConfigVersion.cmake.in
5535 cmakeconfig/EmotionConfig.cmake
5536 cmakeconfig/EmotionConfigVersion.cmake:cmakeconfig/EFLConfigVersion.cmake.in
5537 cmakeconfig/EluaConfig.cmake
5538 cmakeconfig/EluaConfigVersion.cmake:cmakeconfig/EFLConfigVersion.cmake.in
5539 cmakeconfig/EmileConfig.cmake
5540 cmakeconfig/EmileConfigVersion.cmake:cmakeconfig/EFLConfigVersion.cmake.in
5541 cmakeconfig/ElementaryConfigVersion.cmake
5542 cmakeconfig/ElementaryConfig.cmake
5543 ])
5544
5545 AC_OUTPUT
5546
5547 #### Work around bug in automake check macro
5548 ## yes it is hugly, but no choice here for now.
5549 $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
5550
5551 if test -f $srcdir/config.status; then
5552    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"
5553    $SED -i "s|as_fn_exit 0|$TO|" $srcdir/config.status
5554 fi
5555
5556 #### Info
5557
5558 EFL_ADD_FEATURE([EO], [eo-id], [${want_eo_id}])
5559
5560 case $host_cpu in
5561   i*86|x86_64|amd64)
5562     EFL_ADD_FEATURE([cpu], [mmx], [${build_cpu_mmx}])
5563     EFL_ADD_FEATURE([cpu], [sse3], [${build_cpu_sse3}])
5564     ;;
5565   *power* | *ppc*)
5566     EFL_ADD_FEATURE([cpu], [altivec], [${build_cpu_altivec}])
5567     ;;
5568   arm*)
5569     EFL_ADD_FEATURE([cpu], [neon], [${build_cpu_neon}])
5570     ;;
5571   aarch64*)
5572     EFL_ADD_FEATURE([cpu], [neon], [${build_cpu_neon}])
5573     ;;
5574 esac
5575
5576 if test "${have_linux}" = "yes"; then
5577    EFL_ADD_FEATURE([system], [inotify])
5578    EFL_ADD_FEATURE([system], [atfile_source])
5579 elif test "${have_windows}" = "yes"; then
5580    EFL_ADD_FEATURE([system], [notify_win32])
5581 fi
5582 EFL_ADD_FEATURE([system], [ipv6])
5583
5584 if test "x${efl_have_posix_threads_spinlock}" = "xyes" || test "x${efl_have_osx_spinlock}" = "xyes"; then
5585    efl_have_spinlock="yes"
5586 else
5587    efl_have_spinlock="no"
5588 fi
5589 EFL_ADD_FEATURE([thread], [spinlocks], [${efl_have_spinlock}])
5590 EFL_ADD_FEATURE([thread], [barrier], [${efl_have_pthread_barrier}])
5591 EFL_ADD_FEATURE([thread], [affinity], [${efl_have_setaffinity}])
5592 EFL_ADD_FEATURE([thread], [setname], [${efl_have_setname}])
5593 EFL_ADD_FEATURE([thread], [__thread], [${have_thread_specifier}])
5594
5595 echo
5596 echo
5597 echo
5598 echo "------------------------------------------------------------------------"
5599 echo "$PACKAGE_NAME $PACKAGE_VERSION"
5600 echo "------------------------------------------------------------------------"
5601 echo
5602
5603 if test "x${have_windows}" = "xyes" ; then
5604    osname="${host_os}(${_efl_windows_version})"
5605 else
5606    osname="${host_os}"
5607 fi
5608
5609 if test "x${want_egl}" = "xyes" ; then
5610    opengl_egl="(EGL)"
5611 else
5612    opengl_egl=""
5613 fi
5614
5615 echo "Configuration...: ${COLOR_OTHER}profile=${build_profile} os=${osname}${COLOR_RESET}"
5616 echo "  EFL API Set...: ${efl_api}"
5617 echo "  CPU Extensions: ${host_cpu} (${features_cpu})"
5618 echo "  System Feature: ${features_system}"
5619 echo "  Threads.......: ${efl_have_threads} (${features_thread})"
5620 echo "  Cryptography..: ${build_crypto}"
5621 echo "  X11...........: ${with_x11}"
5622 echo "  OpenGL........: ${with_opengl} ${opengl_egl}"
5623 echo "  C++11.........: ${have_cxx11}"
5624 echo "  JavaScript....: ${want_js}"
5625 echo "  JavaScript flg: $EINA_JS_LIBS"
5626 echo "Eina............: yes (${features_eina} unwind=$have_unwind)"
5627 echo "Eo..............: yes (${features_eo})"
5628 echo "Eolian..........: yes (${features_eolian})"
5629 echo "Emile...........: yes (${features_emile})"
5630 echo "Eet.............: yes"
5631 echo "Evas............: yes (${features_evas})"
5632 echo "  Engines.......: ${features_evas_engine}"
5633 echo "  Image Loaders.: ${features_evas_loader}"
5634 if test "x${have_pixman}" = "xyes" ; then
5635 echo "  Pixman........: ${features_evas_pixman}"
5636 fi
5637 echo "Ecore...........: yes (${features_ecore})"
5638 echo "Ecore_Con.......: yes (${features_ecore_con})"
5639 echo "Ecore_File......: yes"
5640 echo "Ecore_IMF.......: yes (${features_ecore_imf})"
5641 echo "Ecore_X.........: ${with_x11} (${features_ecore_x})"
5642 echo "Ecore_SDL.......: $want_sdl"
5643 echo "Ecore_Wayland...: $want_wayland"
5644 echo "Ecore_Wl2.......: $want_wayland"
5645 echo "IVI-Shell.......: $want_wayland_ivi_shell"
5646 echo "Ecore_Buffer....: $want_ecore_buffer (${features_ecore_buffer})"
5647 if test "${have_linux}" = "yes"; then
5648 echo "Ecore_FB........: $want_fb (${features_ecore_fb})"
5649 elif test "${have_ps3}" = "yes"; then
5650 echo "Ecore_PSL1GHT...: $have_ps3"
5651 elif test "${have_darwin}" = "yes"; then
5652 echo "Ecore_Cocoa.....: $efl_lib_optional_ecore_cocoa"
5653 elif test "${have_windows}" = "yes"; then
5654 echo "Ecore_Win32.....: $have_win32"
5655 fi
5656 echo "Ecore_Audio.....: ${efl_lib_optional_ecore_audio} (${features_ecore_audio})"
5657 echo "Ecore_Avahi.....: yes (${features_ecore_avahi})"
5658 echo "Ecore_Evas......: yes (${features_ecore_evas})"
5659 echo "Ector...........: yes"
5660 echo "Eeze............: ${efl_lib_optional_eeze} (${features_eeze})"
5661 echo "EPhysics........: ${efl_lib_optional_ephysics}"
5662 echo "Edje............: yes (${features_edje})"
5663 echo "Emotion.........: yes (${features_emotion})"
5664 echo "Ethumb..........: yes"
5665 echo "Ethumb_Client...: yes"
5666 echo "Elua............: $have_elua"
5667 echo "Elementary......: yes (${features_elementary})"
5668 echo 
5669
5670 echo
5671
5672 if test "${build_tests}" = "none"; then
5673 echo "Tests...........: no"
5674 elif test "${build_tests}" = "auto"; then
5675 echo "Tests...........: make check (inexplicitly enabled)"
5676 elif test "${build_tests}" = "regular"; then
5677 echo "Tests...........: make check"
5678 elif test "${build_tests}" = "coverage"; then
5679 echo "Tests...........: make lcov-check"
5680 fi
5681 echo "Examples........: make examples (make install-examples)"
5682 if test "x${build_doc}" = "xyes"; then
5683 echo "Documentation...: make doc"
5684 else
5685 echo "Documentation...: no"
5686 fi
5687 echo "Compilation.....: make (or gmake)"
5688 echo "  CPPFLAGS......: $CPPFLAGS"
5689 echo "  CFLAGS........: $CFLAGS"
5690 echo "  CXXFLAGS......: $CXXFLAGS"
5691 echo "  LDFLAGS.......: $LDFLAGS"
5692 echo "  EFLJS_CXXFLAGS: $EFLJS_CXXFLAGS"
5693
5694 if test "x${with_binary_edje_cc}" != "x"; then
5695 echo "  edje_cc.......: ${with_binary_edje_cc}"
5696 fi
5697
5698 if test "x${with_binary_eolian_gen}" != "x"; then
5699 echo "  eolian_gen....: ${with_binary_eolian_gen}"
5700 fi
5701
5702 if test "x${with_binary_eolian_cxx}" != "x"; then
5703 echo "  eolian_cxx....: ${with_binary_eolian_cxx}"
5704 fi
5705
5706 if test "x${with_binary_elua_bin}" != "x"; then
5707 echo "  elua..........: ${with_binary_elua_bin}"
5708 fi
5709
5710 echo "  "
5711 echo "Installation....: make install (as root if needed, with 'su' or 'sudo')"
5712 echo "  prefix........: $prefix"
5713 echo "  dbus units....: $dbusservicedir"
5714 if test "${have_systemd_user_session}" = "yes"; then
5715 echo "  systemd units.: $USER_SESSION_DIR"
5716 fi
5717 echo
5718
5719 if test "x${have_systemd_pkg}" = "xyes" -a "x${want_systemd}" = "xno"; then
5720    echo " _________________________________________"
5721    echo "/ Systemd dependency is available on your \\"
5722    echo "| system, but you are building without    |"
5723    echo "| systemd support. Don't forget to        |"
5724    echo "| --enable-systemd if you want systemd    |"
5725    echo "\\ integration for EFL.                    /"
5726    echo " -----------------------------------------"
5727    echo "        \\   ^__^"
5728    echo "         \\  (oo)\\_______"
5729    echo "            (__)\\       )\\/\\"
5730    echo "                ||----w |"
5731    echo "                ||     ||"
5732 fi
5733
5734 if test -n "$CFOPT_WARNING"; then
5735   echo "_____________________________________________________________________"
5736   echo ""
5737   echo "==-- WARNING --=="
5738   echo ""
5739   echo "_____________________________________________________________________"
5740   if test "x${with_x11}" = "xxcb"; then
5741     echo "_____________________________________________________________________"
5742     echo "You have chosen to use XCB instead of Xlib. It is a myth that XCB"
5743     echo "is amazingly faster than Xlib (when used sensibly). It can be"
5744     echo "faster in a few corner cases on startup of an app, but it comes"
5745     echo "with many downsides. One of those is more complex code inside"
5746     echo "ecore_x, which is far less tested in XCB mode than Xlib. Also"
5747     echo "the big catch is that OpenGL support basically requires Xlib anyway"
5748     echo "so if you want OpenGL in X11, you need Xlib regardless and so you"
5749     echo "gain nothing really in terms of speed and no savings in memory"
5750     echo "because Xlib is still linked, loaded and used, BUT instead you"
5751     echo "have OpenGL drivers working with an hybrid XCB/Xlib (mostly XCB)"
5752     echo "toolkit and this is basically never tested by anyone working on"
5753     echo "the OpenGL drivers, so you will have bugs. Do not enable XCB"
5754     echo "and use OpenGL. XCB is only useful if you wish to shave a few Kb"
5755     echo "off the memory footprint of a whole system and live with less"
5756     echo "tested code, and possibly unimplemented features in ecore_x. To"
5757     echo "remove the XCB setup, remove the --with-x11=xcb option to"
5758     echo "configure."
5759     echo "_____________________________________________________________________"
5760   fi
5761   if test "x${want_physics}" = "xno"; then
5762     echo "_____________________________________________________________________"
5763     echo "You have chosen to disable physics support. This disables lots of"
5764     echo "core functionality and is effectively never tested. You are going"
5765     echo "to find features that suddenly don't work and as a result cause"
5766     echo "a series of breakages. This is simply not tested so you are on"
5767     echo "your own in terms of ensuring everything works if you do this"
5768     echo "_____________________________________________________________________"
5769   fi
5770   if test "x${efl_have_threads}" = "xno"; then
5771     echo "_____________________________________________________________________"
5772     echo "You have disabled threading support. A lot of code is literally"
5773     echo "written to need threading. We never test or even build with"
5774     echo "threading disabled, so doing this is entering uncharted territory."
5775     echo "There is a very good chance things may not compile at all, or if"
5776     echo "the do, they will break at runtime in weird and wonderful ways."
5777     echo "Highly reconsider what you are doing here, or be prepared to deal"
5778     echo "with the fallout yourself."
5779     echo "_____________________________________________________________________"
5780   fi
5781   if test "x${want_fontconfig}" = "xno"; then
5782     echo "_____________________________________________________________________"
5783     echo "You have disabled fontconfig. This is going to make general font"
5784     echo "searching not work, and only some very direct 'load /path/file.ttf'"
5785     echo "will work alongside some old-school ttf file path searching. This"
5786     echo "is very likely not what you want, so highly reconsider turning"
5787     echo "fontconfig off. Having it off will lead to visual problems like"
5788     echo "missing text in many UI areas etc."
5789     echo "_____________________________________________________________________"
5790   fi
5791   if test "x${want_fribidi}" = "xno"; then
5792     echo "_____________________________________________________________________"
5793     echo "Fribidi is used for handling right-to-left text (like Arabic,"
5794     echo "Hebrew, Farsi, Persian etc.) and is very likely not a feature"
5795     echo "you want to disable unless you know for absolute certain you"
5796     echo "will never encounter and have to display such scripts. Also"
5797     echo "note that we don't test with fribidi disabled so you may also"
5798     echo "trigger code paths with bugs that are never normally used."
5799     echo "_____________________________________________________________________"
5800   fi
5801   if test "x${want_pixman}" = "xyes"; then
5802     echo "_____________________________________________________________________"
5803     echo "Pixman allows you to replace some rendering paths in Evas with"
5804     echo "Pixman. Pixman may or may not be faster (probably slower), and"
5805     echo "the rendering paths with Pixman enabled are not tested often so"
5806     echo "this may introduce rendering bugs. Do not turn Pixman on unless"
5807     echo "you wish to deal with these bugs."
5808     echo "_____________________________________________________________________"
5809   fi
5810   if test "x${have_tile_rotate}" = "xyes"; then
5811     echo "_____________________________________________________________________"
5812     echo "Tiled rotation code is not tested much, so be aware that you"
5813     echo "may introduce bugs by enabling this."
5814     echo "_____________________________________________________________________"
5815   fi
5816   if test "x${want_g_main_loop}" = "xyes"; then
5817     echo "_____________________________________________________________________"
5818     echo "Using the Glib mainloop as the mainloop in Ecore is not tested"
5819     echo "regularly, but the glib mainloop integration (on by default) is."
5820     echo "You can use apps that use glib mainloop constructs by default"
5821     echo "this way, but the Ecore mainloop is not built on top of glib."
5822     echo "You have enabled ecore to be built on top of glib and thus you"
5823     echo "may experience bugs that normally would not be there. Be prepared"
5824     echo "to fix these if they arise."
5825     echo "_____________________________________________________________________"
5826   fi
5827   if test "x${want_gstreamer}" = "xyes"; then
5828     echo "_____________________________________________________________________"
5829     echo "Gstreamer 0.10 is no longer supported, and EFL has moved to use"
5830     echo "Gstreamer 1.x. The old Gstremaer code is not tested or maintained"
5831     echo "and will eventually be removed entirely. Don't enable the old"
5832     echo "Gstreamer support unless you want to deal with the issues yourself."
5833     echo "_____________________________________________________________________"
5834   fi
5835   if test "x${want_gstreamer1}" = "xno"; then
5836     echo "_____________________________________________________________________"
5837     echo "You disabled Gstreamer 1.x support. You likely don't want to do"
5838     echo "this as it will heavily limit your media support options and render"
5839     echo "some functionality as useless, leading to visible application bugs."
5840     echo "_____________________________________________________________________"
5841   fi
5842   if test "x${want_eo_id}" = "xno"; then
5843     echo "_____________________________________________________________________"
5844     echo "Eo's ID abstraction interface is a major safety system that"
5845     echo "protects code from crashing or misbehaving in many cases. It does"
5846     echo "come at a slight cost, but the safety and protection is worth it."
5847     echo "Also by disabling this, you may also introduce security holes in"
5848     echo "EFL as well as cause all sorts of previously non-existant crashes."
5849     echo "Seriously reconsider disabling EO ID."
5850     echo "_____________________________________________________________________"
5851   fi
5852   if test "x${want_evas_cserve2}" = "xno"; then
5853     echo "_____________________________________________________________________"
5854     echo "Evas Cserve is built and on by default and no testing is done"
5855     echo "for the old non-cserve2 code paths, so by disabling this you"
5856     echo "may be introducing bugs. Be aware of this and be prepared to"
5857     echo "deal with the bugs as a result of this."
5858     echo "_____________________________________________________________________"
5859   fi
5860   if test "x${want_audio}" = "xno"; then
5861     echo "_____________________________________________________________________"
5862     echo "You disabled audio support in Ecore. This is not tested and may"
5863     echo "Create bugs for you due to it creating untested code paths."
5864     echo "Reconsider disabling audio."
5865     echo "_____________________________________________________________________"
5866   fi
5867   if test "x${have_darwin}" = "xno" -a "x${want_pulseaudio}" = "xno"; then
5868     echo "_____________________________________________________________________"
5869     echo "The only audio output method supported by Ecore right now on your"
5870     echo "system is via Pulseaudio. You have disabled that and likely have"
5871     echo "broken a whole bunch of things in the process. Reconsider your"
5872     echo "configure options."
5873     echo "_____________________________________________________________________"
5874   fi
5875   if test "x${want_xinput2}" = "xno"; then
5876     echo "_____________________________________________________________________"
5877     echo "You have disabled xinput2 support. This means a whole lot of input"
5878     echo "devices in X11 will not work correctly. You likely do not want to"
5879     echo "do this."
5880     echo "_____________________________________________________________________"
5881   fi
5882   if test "x${want_xim}" = "xno"; then
5883     echo "_____________________________________________________________________"
5884     echo "You disabled XIM input method support. This is the most basic and"
5885     echo "core input method protocol supported in X11 and you almost certainly"
5886     echo "want the support for it. Input methods allow for complex text input"
5887     echo "like for Chinese, Japanese and Korean as well as virtual keyboards"
5888     echo "on touch/mobile devices."
5889     echo "_____________________________________________________________________"
5890   fi
5891   if test "x${want_scim}" = "xno"; then
5892     echo "_____________________________________________________________________"
5893     echo "SCIM is a modern and very common input method framework and you"
5894     echo "disabled support for it. You very likely want the support for"
5895     echo "complex language input, so please reconsider this. Input methods"
5896     echo "allow for complex text input like for Chinese, Japanese and Korean"
5897     echo "as well as virtual keyboards on touch/mobile devices."
5898     echo "_____________________________________________________________________"
5899   fi
5900   if test "x${want_libmount}" = "xno"; then
5901     echo "_____________________________________________________________________"
5902     echo "Libmount has been disabled, and it is used heavily inside Eeze"
5903     echo "for support of removable devices etc. and disabling this will"
5904     echo "hurt support for Enlightenment and its filemanager."
5905     echo "_____________________________________________________________________"
5906   fi
5907   if test "x${want_multisense}" = "xno"; then
5908     echo "_____________________________________________________________________"
5909     echo "Multisense has been disabled. This causes Edje audio suport to"
5910     echo "Simply not work, and will break applications and libraries"
5911     echo "that rely on it with users then reporting bugs."
5912     echo "If you want to mute audio, there are APIs and policies to do"
5913     echo "that, as opposed to compiling it out."
5914     echo "_____________________________________________________________________"
5915   fi
5916   if test "x${efl_api}" = "xeo"; then
5917     echo "_____________________________________________________________________"
5918     echo "Using the EO based EFL API only does not work at the moment. We still"
5919     echo "have a lot code that depends on the legacy interfaces. We provide"
5920     echo "this option for testing once we are able to migrate to the EO based"
5921     echo "API."
5922     echo "If you are not working on this migration please leave the option set"
5923     echo "to both as it will break your build if set to eo."
5924     echo "_____________________________________________________________________"
5925   fi
5926   if test "x${want_libeeze}" = "xno"; then
5927     echo "_____________________________________________________________________"
5928     echo "Libeeze has been disabled, and it is used heavily for support of"
5929     echo "removable devices etc. and disabling this will hurt support for"
5930     echo "Enlightenment and its filemanager."
5931     echo "_____________________________________________________________________"
5932   fi
5933   echo "_____________________________________________________________________"
5934   echo ""
5935   echo "==-- WARNING --=="
5936   echo ""
5937   echo "_____________________________________________________________________"
5938   if test -n "$BARF_OK"; then
5939     echo "Please add the following option to acknowledge this:"
5940     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"
5941     echo "_____________________________________________________________________"
5942     rm -f Makefile
5943     exit 1
5944   fi
5945   sleep 10
5946 fi
5947
5948 if test "x$prefix" != "x/usr"; then
5949   old=
5950   path=$dbusservicedir
5951   while test "x$old" != "x$path"; do
5952     old=$path
5953     eval path="\"$path\""
5954   done
5955   resolved_dbusservicedir=$path
5956
5957   old=
5958   path=$USER_SESSION_DIR
5959   while test "x$old" != "x$path"; do
5960     old=$path
5961     eval path="\"$path\""
5962   done
5963   resolved_USER_SESSION_DIR=$path
5964   base_USER_SESSION_DIR=`echo "$resolved_USER_SESSION_DIR" | sed -e 's:^\(.*\)/systemd/user/*$:\1:g'`
5965
5966   old=
5967   path=$datadir
5968   while test "x$old" != "x$path"; do
5969     old=$path
5970     eval path="\"$path\""
5971   done
5972   resolved_datadir=$path
5973
5974   needs_alert_dbus=0
5975   if test "$resolved_dbusservicedir" = "${HOME}/.local/share/dbus-1/services"; then
5976     AC_MSG_NOTICE([installing DBus services in user local "$resolved_dbusservicedir". Only accessible to user $USER])
5977   elif echo "$resolved_dbusservicedir" | grep -e '^/usr/s' >/dev/null 2>/dev/null; then
5978     AC_MSG_NOTICE([installing DBus serivces in $resolved_dbusservicedir])
5979   else
5980     needs_alert_dbus=1
5981   fi
5982
5983   needs_alert_systemd=0
5984   if test "$have_systemd_user_session" = "yes"; then
5985     if test "$resolved_USER_SESSION_DIR" = "${HOME}/.config/systemd/user"; then
5986       AC_MSG_NOTICE([installing systemd services in user local "$resolved_USER_SESSION_DIR". Only accessible to user $USER])
5987     elif echo "$resolved_USER_SESSION_DIR" | grep -e '^/usr/s' >/dev/null 2>/dev/null; then
5988       AC_MSG_NOTICE([installing systemd serivces in $resolved_USER_SESSION_DIR])
5989     else
5990        needs_alert_systemd=1
5991     fi
5992   fi
5993
5994   if test $needs_alert_dbus -eq 1 -o $needs_alert_systemd -eq 1; then
5995     if test $needs_alert_dbus -eq 1 -a $needs_alert_systemd -eq 1; then
5996       what_alert="dbus and systemd"
5997     elif test $needs_alert_dbus -eq 1; then
5998       what_alert="dbus"
5999     else
6000       what_alert="systemd"
6001     fi
6002
6003     echo ""
6004     echo "#-------------------------------------------------------------------#"
6005     echo "##==--                          ALERT                          --==##"
6006     echo "#-------------------------------------------------------------------#"
6007     echo ""
6008     echo "  Your installation prefix is *NOT* /usr so this means you need"
6009     echo "to ensure some files are visible to $what_alert otherwise services cannot"
6010     echo "be started when needed. You will need to do the following:"
6011     if test $needs_alert_dbus -eq 1; then
6012       echo ""
6013       echo "System-wide installation:"
6014       echo "  ln -s ${resolved_dbusservicedir}/org.enlightenment.Ethumb.service /usr/share/dbus-1/services/org.enlightenment.Ethumb.service"
6015       echo ""
6016       echo "  or add \"${resolved_datadir}\" to \$XDG_DATA_DIRS"
6017       echo ""
6018       echo "User installation:"
6019       echo "  ln -s ${resolved_dbusservicedir}/org.enlightenment.Ethumb.service ~/.local/share/dbus-1/services/org.enlightenment.Ethumb.service"
6020     fi
6021     if test $needs_alert_systemd -eq 1; then
6022       echo ""
6023       echo "System-wide installation:"
6024       echo "  ln -s ${resolved_USER_SESSION_DIR}/ethumb.service /usr/lib/systemd/user/ethumb.service"
6025       echo ""
6026       echo "  or add \"${base_USER_SESSION_DIR}\" to \$XDG_DATA_DIRS or \$XDG_CONFIG_DIRS"
6027       echo ""
6028       echo "User installation:"
6029       echo "  ln -s ${resolved_USER_SESSION_DIR}/ethumb.service ~/.config/systemd/user/ethumb.service"
6030     fi
6031     echo ""
6032     echo "#-------------------------------------------------------------------#"
6033   fi
6034
6035 elif test "x${have_darwin}" = "xyes"; then
6036     echo ""
6037     echo "#-------------------------------------------------------------------#"
6038     echo "##==--                          ALERT                          --==##"
6039     echo "#-------------------------------------------------------------------#"
6040     echo ""
6041     echo "  If you are running Mac OS X >= 10.11 (starting from El Capitan)"
6042     echo "  you will have TROUBLE with the prefix you have chosen (/usr)..."
6043     echo "  Don't make it double and consider to use the default prefix"
6044     echo "  (/usr/local). This is because of Apple's SIP that provides MAC"
6045     echo "  and prevents ANYONE modifying the system."
6046     echo ""
6047     echo "#-------------------------------------------------------------------#"
6048 fi
6049
6050 if test "x${efl_deprecated_option}" = "xyes"; then
6051   echo ""
6052   echo "#-------------------------------------------------------------------#"
6053   echo "##==--                          ALERT                          --==##"
6054   echo "#-------------------------------------------------------------------#"
6055   echo ""
6056   echo "  Your build script is using a deprecated option. It will get b0rken"
6057   echo "with the next release of EFL. You better update it now than later."
6058   echo ""
6059   echo "#-------------------------------------------------------------------#"
6060 fi
6061