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