eet-cxx: add implementation for eet C++.
[platform/upstream/efl.git] / configure.ac
1 EFL_VERSION([1], [9], [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 AC_USE_SYSTEM_EXTENSIONS
18
19 AM_INIT_AUTOMAKE([1.6 dist-bzip2 -Wall color-tests])
20 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
21
22 CFOPT_WARNING=""
23
24 #### Apply configuring with legacy api's only, eo api's or both.
25
26 EFL_API_LEGACY_DEF="#define EFL_NOLEGACY_API_SUPPORT"
27 EFL_API_EO_DEF="#define EFL_EO_API_SUPPORT"
28 efl_api="both"
29
30 #### For the moment the Eo EFL API is not ready you need to explicitely optin.
31 EFL_ENABLE_EO_API_SUPPORT
32 EFL_ENABLE_BETA_API_SUPPORT
33
34 AC_ARG_WITH([api],
35    [AC_HELP_STRING([--with-api=@<:@eo/legacy/both@:>@], [Select the EFL API Model @<:@default=both@:>@])],
36    [efl_api=${withval}],
37    [efl_api="both"])
38
39 case "$efl_api" in
40     eo)
41         EFL_API_LEGACY_DEF="#define EFL_NOLEGACY_API_SUPPORT"
42         EFL_API_EO_DEF="#define EFL_EO_API_SUPPORT"
43         ;;
44     legacy)
45         EFL_API_LEGACY_DEF=""
46         EFL_API_EO_DEF=""
47         ;;
48     both)
49         EFL_API_LEGACY_DEF=""
50         EFL_API_EO_DEF="#define EFL_EO_API_SUPPORT"
51         ;;
52     *) AC_MSG_ERROR([Invalid api (${efl_api}): must be eo, legacy or both]) ;;
53 esac
54
55 AC_SUBST(EFL_API_LEGACY_DEF)
56 AC_SUBST(EFL_API_EO_DEF)
57
58 #### Additional options to configure
59
60 # string to identify the build
61 AC_ARG_WITH([id],
62    [AC_HELP_STRING([--with-id=BUILD_ID],
63                    [Specify a string to identify the build (vendor, maintainer, etc).
64                      @<:@default=none@:>@])],
65    [EFL_BUILD_ID="${withval}"],
66    [EFL_BUILD_ID="none"])
67 AC_SUBST(EFL_BUILD_ID)
68
69 # profile
70 AC_ARG_WITH([profile],
71    [AC_HELP_STRING([--with-profile=PROFILE],
72                    [use the predefined build profile, one of: dev, debug and release.
73                     @<:@default=dev@:>@])],
74    [build_profile=${withval}],
75    [build_profile=def_build_profile])
76
77 case "${build_profile}" in
78    dev|debug|release)
79      ;;
80    *)
81      AC_MSG_ERROR([Unknown build profile --with-profile=${build_profile}])
82      ;;
83 esac
84
85 prefer_assert="no"
86 case "${build_profile}" in
87    dev|debug)
88      prefer_assert="yes"
89      ;;
90 esac
91
92 # TODO: add some build "profile" (server, full, etc...)
93
94 AC_ARG_WITH([crypto],
95    [AC_HELP_STRING([--with-crypto=CRYPTO],
96                    [use the predefined build crypto, one of:
97                     openssl, gnutls or none.
98                     @<:@default=openssl@:>@])],
99    [build_crypto=${withval}],
100    [build_crypto=openssl])
101
102 case "${build_crypto}" in
103    openssl|gnutls|none)
104      ;;
105    *)
106      AC_MSG_ERROR([Unknown build crypto option: --with-crypto=${build_crypto}])
107      ;;
108 esac
109
110 AC_ARG_WITH([tests],
111    [AC_HELP_STRING([--with-tests=none|regular|coverage],
112                    [choose testing method: regular, coverage or none.
113                     @<:@default=none@:>@])],
114    [build_tests=${withval}],
115    [build_tests=auto])
116
117 want_coverage="no"
118 want_tests="no"
119 case "${build_tests}" in
120    auto)
121      if test "${build_profile}" = "dev"; then
122         want_tests="yes"
123      fi
124      ;;
125    regular)
126      want_tests="yes"
127      ;;
128    coverage)
129      want_tests="yes"
130      want_coverage="yes"
131      ;;
132    no*)
133      ;;
134    *)
135      AC_MSG_ERROR([Unknown build tests option: --with-tests=${build_tests}])
136      ;;
137 esac
138
139 dbusservicedir="${datadir}/dbus-1/services"
140 AC_ARG_WITH([dbus-services],
141    [AC_HELP_STRING([--with-dbus-services=DBUS_SERVICES],
142       [specify a directory to store dbus service files.])],
143    [dbusservicedir=$withval])
144 AC_SUBST(dbusservicedir)
145
146 efl_deprecated_option="no"
147 EFL_WITH_BIN([edje], [edje-cc])
148 EFL_WITH_BIN([eolian], [eolian-gen])
149
150
151 #### Default values
152
153 requirements_pc_efl=""
154 requirements_pc_deps_efl=""
155 requirements_libs_efl=""
156 requirements_cflags_efl=""
157
158 requirements_pc_crypto=""
159 requirements_pc_deps_crypto=""
160 requirements_libs_crypto=""
161 requirements_cflags_crypto=""
162
163 AC_CANONICAL_HOST
164
165 # TODO: move me to m4 file that setups module/so related variables
166 case "$host_os" in
167    cegcc*)
168       AC_MSG_ERROR([ceGCC compiler is not supported anymore. Exiting...])
169    ;;
170    mingw32ce*)
171       MODULE_ARCH="v"
172       MODULE_EXT=".dll"
173    ;;
174    mingw*)
175       have_win32="yes"
176       have_windows="yes"
177       MODULE_ARCH="v-v_maj.v_min"
178       MODULE_EXT=".dll"
179    ;;
180    cygwin*)
181       MODULE_ARCH="v-v_maj.v_min"
182       MODULE_EXT=".dll"
183    ;;
184    *)
185       MODULE_ARCH="v-v_maj.v_min"
186       MODULE_EXT=".so"
187    ;;
188 esac
189
190 EFL_VERSION_MAJOR="v_maj"
191 EFL_VERSION_MINOR="v_min"
192 AC_SUBST(EFL_VERSION_MAJOR)
193 AC_SUBST(EFL_VERSION_MINOR)
194
195 have_systemd_pkg="no"
196 have_wince="no"
197 have_win32="no"
198 have_windows="no"
199 have_darwin="no"
200 have_linux="no"
201 have_ps3="no"
202 case "$host_os" in
203    mingw32ce*)
204       have_wince="yes"
205       have_windows="yes"
206    ;;
207    mingw*|cygwin*)
208       # TODO: check cygwin* here
209       have_win32="yes"
210       have_windows="yes"
211       EFL_CFLAGS="${EFL_CFLAGS} -D__USE_MINGW_ANSI_STDIO"
212    ;;
213    darwin*)
214       have_darwin="yes"
215    ;;
216    linux*)
217       have_linux="yes"
218       have_systemd_pkg="auto"
219    ;;
220 esac
221
222 case "$host_vendor" in
223    ps3*)
224       have_ps3="yes"
225    ;;
226 esac
227
228 AC_SUBST([MODULE_ARCH])
229 AC_DEFINE_UNQUOTED([MODULE_ARCH], ["${MODULE_ARCH}"], ["Module architecture"])
230 AC_DEFINE_UNQUOTED([SHARED_LIB_SUFFIX], ["${MODULE_EXT}"], [Suffix for shared objects])
231
232 # TODO: move me to m4 file that setups the windows related variables
233 AM_CONDITIONAL([HAVE_WINCE], [test "x${have_wince}" = "xyes"])
234 AM_CONDITIONAL([HAVE_WIN32], [test "x${have_win32}" = "xyes"])
235 AM_CONDITIONAL([HAVE_WINDOWS], [test "x${have_windows}" = "xyes"])
236 AM_CONDITIONAL([HAVE_PS3], [test "x${have_ps3}" = "xyes"])
237
238
239 #### Checks for programs
240
241 ### libtool
242
243 if test "x${have_windows}" = "xyes" ; then
244    lt_cv_deplibs_check_method='pass_all'
245 fi
246 m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
247 LT_INIT([win32-dll disable-static pic-only])
248 EFL_INIT
249
250 ### gettext
251
252 AM_GNU_GETTEXT_VERSION([0.17])
253
254 m4_ifdef([AC_GNU_GETTEXT], [
255 AC_GNU_GETTEXT([external])
256 po_makefile_in=po/Makefile.in
257 have_po="yes"
258 ],
259 [
260 m4_ifdef([AM_GNU_GETTEXT], [
261 AM_GNU_GETTEXT([external])
262 po_makefile_in=po/Makefile.in
263 have_po="yes"
264 ],
265 [
266 have_po="no"
267 ])
268 ])
269 AC_SUBST([LTLIBINTL])
270 LOCALE_DIR="${localedir}"
271 AC_SUBST(LOCALE_DIR)
272
273 if test "x${POSUB}" = "x" ; then
274    have_po="no"
275 fi
276
277 AM_CONDITIONAL([HAVE_PO], [test "x${have_po}" = "xyes"])
278
279 ### compilers
280
281 AM_PROG_AS
282 AC_PROG_CXX
283 AC_PROG_OBJC
284 AC_LANG(C)
285 AC_PROG_CC_C99
286 AM_PROG_CC_C_O
287
288 AM_CONDITIONAL([BUILD_EFL_NATIVE], [test "x${cross_compiling}" = "xno"])
289
290 if test "x${ac_cv_prog_cc_c99}" = "xno" ; then
291    AC_MSG_ERROR([efl requires a c99-capable compiler])
292 fi
293 # We should be using ${CXX} here, but there is a bug in
294 # autotools macro and CXX is always set to g++ even if
295 # it's not found. So we are using an internal variable
296 # that does the work for now, may get broken in the future.
297 if test "x${ac_ct_CXX}" = "x" -a "x${CXX}" = "xg++"; then
298    AC_MSG_ERROR([efl requires a C++ compiler got ${ac_ct_CXX} and ${CXX}.])
299 fi
300
301 AC_SYS_LARGEFILE
302
303 # pkg-config
304
305 PKG_PROG_PKG_CONFIG
306 if test "x${PKG_CONFIG}" = "x" ; then
307    AC_MSG_ERROR([pkg-config tool not found. Install it or set PKG_CONFIG environment variable to that path tool. Exiting...])
308 fi
309
310 # doxygen program for documentation building
311
312 EFL_CHECK_DOXYGEN([build_doc="yes"], [build_doc="no"])
313
314 # lcov
315
316 if test "${want_coverage}" = "yes" ; then
317    AC_CHECK_PROG([have_lcov], [lcov], [yes], [no])
318    if test "x${have_lcov}" = "xyes" ; then
319       EFL_COV_CFLAGS="${EFL_COV_CFLAGS} -fprofile-arcs -ftest-coverage"
320       EFL_COV_LIBS="${EFL_COV_LIBS} -lgcov"
321       if test "x${prefer_assert}" = "xno"; then
322          EFL_COV_CFLAGS="${EFL_COV_CFLAGS} -DNDEBUG"
323       else
324          EFL_COV_CFLAGS="${EFL_COV_CFLAGS} -g -O0 -DDEBUG"
325       fi
326    else
327       AC_MSG_ERROR([lcov is not found])
328    fi
329 fi
330
331 AM_CONDITIONAL([EFL_ENABLE_COVERAGE], [test "${want_coverage}" = "yes"])
332
333 # ragel
334
335 AC_CHECK_PROG([have_ragel], [ragel], [yes], [no])
336 AM_CONDITIONAL([EFL_HAVE_RAGEL], [test "${have_ragel}" = "yes"])
337
338 #### Checks for libraries
339
340 # check unit testing library
341
342 if test "${want_tests}" = "yes"; then
343    PKG_CHECK_MODULES([CHECK], [check >= 0.9.5])
344 fi
345 AM_CONDITIONAL([EFL_ENABLE_TESTS], [test "${want_tests}" = "yes"])
346
347
348 # check for crypto/tls library to use
349 case "$build_crypto" in
350    gnutls)
351       CFOPT_WARNING="xyes"
352       EFL_DEPEND_PKG([crypto], [GNUTLS], [gnutls >= 2.12.16])
353
354       AM_PATH_LIBGCRYPT([], [:],
355          [AC_MSG_ERROR([libgcrypt required but not found])])
356       requirements_libs_crypto="${LIBGCRYPT_LIBS} ${requirements_libs_crypto}"
357       requirements_cflags_crypto="${LIBGCRYPT_CFLAGS} ${requirements_cflags_crypto}"
358       ;;
359
360    openssl)
361       EFL_DEPEND_PKG([crypto], [OPENSSL], [openssl])
362       ;;
363 esac
364 AM_CONDITIONAL([HAVE_CRYPTO_GNUTLS], [test "${build_crypto}" = "gnutls"])
365 AM_CONDITIONAL([HAVE_CRYPTO_OPENSSL], [test "${build_crypto}" = "openssl"])
366
367 #### Checks for header files
368
369 # Common Checks (keep names sorted for ease of use):
370 AC_HEADER_DIRENT
371 AC_HEADER_TIME
372
373 AC_CHECK_HEADERS([ \
374 execinfo.h \
375 mcheck.h \
376 sys/epoll.h \
377 sys/inotify.h \
378 sys/signalfd.h \
379 sys/types.h \
380 sys/param.h \
381 sys/mman.h \
382 netinet/in.h \
383 ])
384
385 have_inotify="${ac_cv_header_sys_inotify_h}"
386 AM_CONDITIONAL([HAVE_INOTIFY], [test "x${have_inotify}" = "xyes"])
387
388 have_notify_win32="${have_win32}"
389 AC_DEFINE_IF([HAVE_NOTIFY_WIN32],
390    [test "x${have_notify_win32}" = "xyes"], [1],
391    [File monitoring with Windows notification])
392 AM_CONDITIONAL([HAVE_NOTIFY_WIN32], [test "x${have_notify_win32}" = "xyes"])
393
394
395 EFL_CHECK_PATH_MAX
396
397
398 #### Checks for types
399
400 # wchar_t
401 AC_CHECK_SIZEOF([wchar_t])
402 EINA_SIZEOF_WCHAR_T=$ac_cv_sizeof_wchar_t
403 AC_SUBST([EINA_SIZEOF_WCHAR_T])
404
405 AC_CHECK_SIZEOF(int, 4)
406 AC_CHECK_SIZEOF(long, 4)
407
408 AC_CHECK_SIZEOF([uintptr_t])
409
410 AC_CHECK_TYPES([siginfo_t], [], [],
411    [[
412 #include <signal.h>
413 #if HAVE_SIGINFO_H
414 # include <siginfo.h>
415 #endif
416    ]])
417
418 #### Checks for structures
419
420
421 #### Checks for compiler characteristics
422
423 AC_C_BIGENDIAN
424 AC_C_INLINE
425 EFL_CHECK_COMPILER_FLAGS([EFL], [-Wall -Wextra -Wpointer-arith -Wno-missing-field-initializers -fvisibility=hidden -fdata-sections -ffunction-sections])
426 EFL_CHECK_LINKER_FLAGS([EFL], [-fvisibility=hidden -fdata-sections -ffunction-sections -Wl,--gc-sections -fno-strict-aliasing -Wl,--as-needed -Wl,--no-copy-dt-needed-entries])
427 case "${build_profile}" in
428    dev)
429      dnl Check if compiler has a dodgy -Wshadow that emits errors when shadowing a global
430      AC_MSG_CHECKING([whether -Wshadow generates spurious warnings])
431      CFLAGS_save="${CFLAGS}"
432      CFLAGS="${CFLAGS} -Werror -Wshadow"
433      AC_TRY_COMPILE([int x;], [int x = 0; (void)x;],
434        [AC_MSG_RESULT([no])
435         EFL_CHECK_COMPILER_FLAGS([EFL], [-Wshadow])],
436        [AC_MSG_RESULT([yes])])
437      CFLAGS="${CFLAGS_save}"
438      ;;
439
440    debug)
441      ;;
442
443    release)
444      ;;
445 esac
446
447 EFL_ATTRIBUTE_VECTOR
448 EFL_ATTRIBUTE_ALWAYS_INLINE
449
450 EFL_LIBS="${EFL_LIBS}"
451 EFL_CFLAGS="${EFL_CFLAGS}"
452
453 ## CPU architecture specific assembly
454
455 build_cpu_mmx="no"
456 build_cpu_sse3="no"
457 build_cpu_altivec="no"
458 build_cpu_neon="no"
459
460 SSE3_CFLAGS=""
461 ALTIVEC_CFLAGS=""
462 NEON_CFLAGS=""
463
464 case $host_cpu in
465   i*86|x86_64|amd64)
466     AC_DEFINE([BUILD_MMX], [1], [Build MMX Code])
467     build_cpu_mmx="yes"
468     AC_CHECK_HEADER([immintrin.h],
469        [
470         AC_DEFINE(BUILD_SSE3, 1, [Build SSE3 Code])
471         build_cpu_sse3="yes"
472        ],
473        [build_cpu_sse3="no"])
474     AC_MSG_CHECKING([whether to build SSE3 code])
475     AC_MSG_RESULT([${build_cpu_sse3}])
476
477     if test "x$build_cpu_sse3" = "xyes" ; then
478        SSE3_CFLAGS="-msse3"
479     fi
480     ;;
481   *power* | *ppc*)
482     build_cpu_altivec="yes"
483     AC_CHECK_HEADER([altivec.h],
484        [
485         AC_DEFINE([BUILD_ALTIVEC], [1], [Build Altivec Code])
486         AC_DEFINE([HAVE_ALTIVEC_H], [1], [Have altivec.h header file])
487         build_cpu_altivec="yes"
488        ],
489        [
490         save_CFLAGS=$CFLAGS
491         save_CPPFLAGS=$CPPFLAGS
492         CFLAGS=$CFLAGS" -maltivec"
493         CPPFLAGS=$CPPFLAGS" -maltivec"
494         unset ac_cv_header_altivec_h
495         AC_CHECK_HEADER([altivec.h],
496           [
497             AC_DEFINE([BUILD_ALTIVEC], [1], [Build Altivec Code])
498             AC_DEFINE([HAVE_ALTIVEC_H], [1], [Have altivec.h header file])
499             build_cpu_altivec="yes"
500           ],
501           [build_cpu_altivec="no"]
502         )
503         CFLAGS=$save_CFLAGS
504         CPPFLAGS=$save_CPPFLAGS
505        ]
506     )
507     if test "x${build_cpu_altivec}" = "xyes"; then
508        AC_MSG_CHECKING([whether to use altivec compiler flag])
509        if test "x$GCC" = "xyes"; then
510           if echo "int main(){return 0;}" | ${CPP} -faltivec - > /dev/null 2>&1; then
511              altivec_cflags="-faltivec"
512              AC_DEFINE([BUILD_ALTIVEC], [1], [Build Altivec Code])
513           elif echo "int main(){return 0;}" | ${CPP} -maltivec - > /dev/null 2>&1; then
514              altivec_cflags="-maltivec"
515              AC_DEFINE([BUILD_ALTIVEC], [1], [Build Altivec Code])
516           fi
517        fi
518        AC_MSG_RESULT([${altivec_cflags}])
519        CFLAGS="$CFLAGS ${altivec_cflags}"
520        ALTIVEC_CFLAGS="-maltivec"
521     fi
522     ;;
523   arm*)
524     build_cpu_neon="yes"
525     AC_MSG_CHECKING([whether to use NEON instructions])
526     CFLAGS_save="${CFLAGS}"
527     CFLAGS="${CFLAGS} -mfpu=neon"
528     AC_TRY_COMPILE([#include <arm_neon.h>],
529        [asm volatile ("vqadd.u8 d0, d1, d0\n")],
530        [
531         AC_MSG_RESULT([yes])
532         AC_DEFINE([BUILD_NEON], [1], [Build NEON Code])
533         build_cpu_neon="yes"
534         NEON_CFLAGS="-mfpu=neon"
535        ],
536        [
537         AC_MSG_RESULT([no])
538         build_cpu_neon="no"
539        ])
540     CFLAGS="${CFLAGS_save}"
541     ;;
542 esac
543
544 AC_SUBST([ALTIVEC_CFLAGS])
545 AC_SUBST([SSE3_CFLAGS])
546 AC_SUBST([NEON_CFLAGS])
547
548 #### Checks for linker characteristics
549
550
551 #### Checks for library functions
552
553 AC_CHECK_FUNCS([\
554 backtrace \
555 backtrace_symbols \
556 execvp \
557 fpathconf \
558 fstatat \
559 malloc_usable_size \
560 mkdirat \
561 mtrace \
562 realpath \
563 strlcpy \
564 geteuid \
565 getuid \
566 pause \
567 ])
568
569 AC_FUNC_ALLOCA
570
571 EFL_CHECK_FUNCS([EFL], [fnmatch gettimeofday dirfd fcntl])
572
573 have_atfile_source="${ac_cv_func_fstatat}"
574 AC_DEFINE_IF([HAVE_ATFILE_SOURCE],
575    [test "x${have_atfile_source}" = "xyes"],
576    [1], [Use fstatat and other -at file functions])
577
578
579
580 ######################  EFL  ######################
581
582 AC_ARG_ENABLE([systemd],
583    [AC_HELP_STRING([--enable-systemd],
584       [Enable systemd support. @<:@default=disabled@:>@])],
585    [
586     if test "x${enableval}" = "xyes" ; then
587        want_systemd="yes"
588     else
589        want_systemd="no"
590     fi
591    ], [
592     want_systemd="no"
593    ])
594
595 systemd_dbus_prefix="# "
596 if test "${want_systemd}" = "yes"; then
597    systemd_dbus_prefix=""
598 fi
599 AC_SUBST(systemd_dbus_prefix)
600
601 AC_ARG_WITH([systemdunitdir],
602          AC_HELP_STRING([--with-systemdunitdir=DIR],
603                 [path to systemd user services directory]),
604          [USER_SESSION_DIR=${withval}])
605 if test "$want_systemd" == "no"; then
606   have_systemd_user_session="no"
607 elif test -n "${USER_SESSION_DIR}"; then
608   have_systemd_user_session="yes"
609   AC_MSG_NOTICE([Using systemd user services directory as ${USER_SESSION_DIR}])
610 else
611   # Detect systemd user session directory properly
612   EFL_PKG_CHECK_VAR([USER_SESSION_DIR], [systemd >= 192], [systemduserunitdir],
613         [have_systemd_user_session="yes"], [have_systemd_user_session="no"])
614
615   if test "$want_systemd" = "yes" -a "$have_systemd_user_session" = "no"; then
616      AC_MSG_ERROR([systemd support wanted, but systemd was not found.])
617   fi
618 fi
619
620 AM_CONDITIONAL([HAVE_SYSTEMD_USER_SESSION], [test "x${have_systemd_user_session}" = "xyes"])
621 AC_SUBST([USER_SESSION_DIR])
622
623
624 if test "x${have_systemd_pkg}" = "xauto" -o "x${have_systemd_pkg}" = "xyes"; then
625    PKG_CHECK_MODULES([SYSTEMD], [libsystemd-daemon >= 192 libsystemd-journal >= 192],
626    [have_systemd_pkg="yes"],
627    [have_systemd_pkg="no"])
628 fi
629
630 # check for systemd library if requested
631 if test "x${want_systemd}" = "xyes" -a "x${have_systemd_pkg}" = "xno"; then
632    AC_MSG_ERROR([Systemd dependencie requested but not found])
633 fi
634
635 AM_CONDITIONAL([WANT_SYSTEMD], [test "${want_systemd}" = "yes"])
636
637 #### Platform-dependent
638 DL_LIBS=""
639 DL_INTERNAL_LIBS=""
640
641 #### Evil
642 EFL_LIB_START_OPTIONAL([Evil], [test "${have_windows}" = "yes"])
643
644 ### Default values
645
646 ### Additional options to configure
647 EFL_SELECT_WINDOWS_VERSION
648
649 ### Checks for programs
650
651 ### Checks for libraries
652
653 EVIL_DLFCN_LIBS=""
654 if test "${have_wince}" = "xyes"; then
655    EFL_ADD_LIBS([EVIL], [-lws2])
656    EVIL_DLFCN_LIBS="-ltoolhelp"
657 else
658    EFL_ADD_LIBS([EVIL], [-lole32 -lws2_32 -lsecur32 -luuid])
659    EVIL_DLFCN_LIBS="-lpsapi"
660 fi
661
662 AC_SUBST([EVIL_DLFCN_LIBS])
663
664 ### Checks for header files
665
666 ### Checks for types
667
668 ### Checks for structures
669
670 ### Checks for compiler characteristics
671
672 EVIL_DLFCN_CPPFLAGS="-DEFL_EVIL_DLFCN_BUILD -DPSAPI_VERSION=1"
673 # TODO: should we have these at EFL (global?)
674 # Note: these warnings should not be used with C++ code
675 EVIL_CFLAGS_WRN="-Wdeclaration-after-statement -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls"
676 EVIL_CXXFLAGS="${EVIL_CXXFLAGS}"
677
678 if test "x${have_win32}" = "xyes" ; then
679    EVIL_CFLAGS="-DSECURITY_WIN32 ${EVIL_CFLAGS}"
680    EVIL_CXXFLAGS="-fno-rtti -fno-exceptions -DSECURITY_WIN32 ${EVIL_CXXFLAGS}"
681 fi
682
683 AC_SUBST([EVIL_DLFCN_CPPFLAGS])
684 AC_SUBST([EVIL_CFLAGS_WRN])
685 AC_SUBST([EVIL_CXXFLAGS])
686
687 ### Checks for linker characteristics
688
689 ### Checks for library functions
690
691 DL_LIBS="lib/evil/libdl.la"
692 DL_INTERNAL_LIBS="lib/evil/libdl.la"
693
694 EFL_LIB_END_OPTIONAL([Evil])
695
696 AC_SUBST([USE_EVIL_CFLAGS])
697 AC_SUBST([USE_EVIL_LIBS])
698 #### End of Evil
699
700
701 #### Escape
702 EFL_LIB_START_OPTIONAL([Escape], [test "${have_ps3}" = "yes"])
703
704 ### Additional options to configure
705
706 ### Default values
707
708 ### Checks for programs
709
710 ### Checks for libraries
711 EFL_ADD_LIBS([ESCAPE], [-llv2 -lm -lnet -lsysmodule -liberty])
712
713 ### Checks for header files
714
715 ### Checks for types
716
717 ### Checks for structures
718
719 ### Checks for compiler characteristics
720
721 ### Checks for linker characteristics
722
723 ### Checks for library functions
724
725 EFL_LIB_END_OPTIONAL([Escape])
726 #### End of Escape
727
728 EFL_CHECK_FUNC([SHM], [shm_open])
729 SHM_LIBS="${requirements_libs_shm}"
730 AC_SUBST([SHM_LIBS])
731
732 AC_SUBST([DL_LIBS])
733 AC_SUBST([DL_INTERNAL_LIBS])
734 #### End of Platform-dependent
735
736
737 #### Eina
738
739 EFL_LIB_START([Eina])
740
741 ### Default values
742
743 have_safety_checks="yes"
744 want_log="yes"
745 case "${build_profile}" in
746    dev)
747      with_max_log_level=""
748      have_stringshare_usage="no"
749      want_valgrind="auto"
750      want_debug_malloc="no"
751      want_debug_threads="no"
752      want_default_mempool="no"
753      want_cow_magic="no"
754      ;;
755
756    debug)
757      with_max_log_level=""
758      have_stringshare_usage="yes"
759      want_valgrind="auto"
760      want_debug_malloc="yes"
761      want_debug_threads="yes"
762      want_default_mempool="yes"
763      want_cow_magic="yes"
764      ;;
765
766    release)
767      with_max_log_level="3"
768      have_stringshare_usage="no"
769      want_valgrind="no"
770      want_debug_malloc="no"
771      want_debug_threads="no"
772      want_default_mempool="no"
773      want_cow_magic="no"
774      ;;
775 esac
776
777 EINA_CONFIG([HAVE_ALLOCA_H], [test "x${ac_cv_working_alloca_h}" = "xyes"])
778 EINA_CONFIG([SAFETY_CHECKS], [test "x${have_safety_checks}" = "xyes"])
779 EINA_CONFIG([DEFAULT_MEMPOOL], [test "x${want_default_mempool}" = "xyes"])
780
781 if test -n "${with_max_log_level}"; then
782    AC_MSG_NOTICE([ignoring any EINA_LOG() with level greater than ${with_max_log_level}])
783    AC_DEFINE_UNQUOTED([EINA_LOG_LEVEL_MAXIMUM], [${with_max_log_level}], [if set, logging is limited to this amount.])
784 fi
785
786 AC_DEFINE_IF([EINA_STRINGSHARE_USAGE],
787    [test "x${have_stringshare_usage}" = "xyes"],
788    [1], [Report Eina stringshare usage pattern])
789
790 ### Additional options to configure
791 AC_ARG_ENABLE([magic-debug],
792    [AC_HELP_STRING([--disable-magic-debug], [disable magic debug of eina structure @<:@default=enabled@:>@])],
793    [
794     if test "x${enableval}" = "xyes" ; then
795        have_magic_debug="yes"
796     else
797        have_magic_debug="no"
798     fi
799    ],
800    [have_magic_debug="yes"])
801
802 EINA_CONFIG([MAGIC_DEBUG], [test "x${have_magic_debug}" = "xyes"])
803
804 ### Checks for programs
805
806 ### Checks for libraries
807 EFL_PLATFORM_DEPEND([EINA], [all])
808
809 EFL_ADD_LIBS([EINA], [-lm])
810
811 ## Options
812
813 # Valgrind
814 AC_ARG_ENABLE([valgrind],
815    [AC_HELP_STRING([--disable-valgrind],
816        [enable valgrind mempool declaration. @<:@default=disabled@:>@])],
817    [
818     if test "x${enableval}" = "xyes" ; then
819        want_valgrind="yes"
820     else
821        want_valgrind="no"
822     fi
823    ])
824
825 if test "${want_valgrind}" = "auto"; then
826    PKG_CHECK_EXISTS([valgrind >= 2.4.0], [want_valgrind="yes"],
827       [want_valgrind="no"
828        AC_MSG_WARN([valgrind support desired by --with-profile=${build_profile} but not found. If your platform supports it, install valgrind.])])
829 fi
830
831 if test "${want_valgrind}" = "no"; then
832     AC_DEFINE([NVALGRIND], [1], [Valgrind support disabled])
833 else
834     PKG_CHECK_MODULES([VALGRIND], [valgrind >= 2.4.0])
835     AC_DEFINE([HAVE_VALGRIND], [1], [Valgrind support enabled])
836 fi
837
838 AC_DEFINE_IF([EINA_DEBUG_MALLOC],
839    [test "x${ac_cv_func_malloc_usable_size}" = "xyes" && test "x${want_debug_malloc}" = "xyes"],
840    [1], [Turn on debugging overhead in mempool])
841
842 AC_DEFINE_IF([EINA_COW_MAGIC_ON],
843    [test "x${want_cow_magic}" = "xyes" ],
844    [1], [Turn on Eina_Magic in Eina_Cow])
845
846 EFL_OPTIONAL_DEPEND_PKG([EINA], [${want_systemd}], [SYSTEMD], [libsystemd-journal])
847
848 EFL_EVAL_PKGS([EINA])
849
850 ## Examples
851
852 ## Benchmarks
853
854 PKG_CHECK_MODULES([GLIB],
855    [glib-2.0],
856    [have_glib="yes"],
857    [have_glib="no"])
858
859 if test "x${have_glib}" = "xyes" ; then
860    GLIB_CFLAGS="${GLIB_CFLAGS} -DEINA_BENCH_HAVE_GLIB"
861 fi
862
863 ### Checks for header files
864
865 # sys/mman.h could be provided by evil/escape/exotic so we need to set CFLAGS accordingly
866 CFLAGS_save="${CFLAGS}"
867 CFLAGS="${CFLAGS} ${EINA_CFLAGS}"
868 AC_CHECK_HEADERS([sys/mman.h])
869 CFLAGS="${CFLAGS_save}"
870
871 AC_CHECK_HEADER([byteswap.h], [have_byteswap="yes"], [have_byteswap="no"])
872
873 ### Checks for types
874
875 EINA_CONFIG([HAVE_DIRENT_H], [test "x${have_dirent}" = "xyes"])
876 AC_DEFINE_IF([HAVE_DIRENT_H], [test "x${have_dirent}" = "xyes"],
877    [1], [Define to 1 if you have a valid <dirent.h> header file.])
878
879 ### Checks for structures
880
881 ### Checks for compiler characteristics
882 EINA_CONFIG([HAVE_BYTESWAP_H], [test "x${have_byteswap}" = "xyes"])
883
884 EFL_CHECK_GCC_BUILTIN([bswap16], [HAVE_BSWAP16])
885 EFL_CHECK_GCC_BUILTIN([bswap32], [HAVE_BSWAP32])
886 EFL_CHECK_GCC_BUILTIN([bswap64], [HAVE_BSWAP64])
887
888 ### Checks for linker characteristics
889
890 ### Checks for library functions
891
892 AC_CHECK_FUNCS([fchmod])
893
894 EFL_CHECK_FUNCS([EINA], [dlopen dladdr iconv shm_open splice setxattr getpagesize])
895
896 enable_log="no"
897 if test "x${efl_func_fnmatch}" = "xyes" && test "x${want_log}" = "xyes" ; then
898    enable_log="yes"
899 fi
900
901 AC_MSG_CHECKING([wether to build Eina_Log infrastructure])
902 AC_MSG_RESULT([${enable_log}])
903
904 EINA_CONFIG([ENABLE_LOG], [test "x${enable_log}" = "xyes"])
905
906 EFL_CHECK_THREADS
907 if test "x${efl_have_threads}" = "xno"; then
908    CFOPT_WARNING="xyes"
909 fi
910
911 EFL_ADD_PUBLIC_LIBS([EINA], [${EFL_PTHREAD_LIBS}])
912 EFL_ADD_CFLAGS([EINA], [${EFL_PTHREAD_CFLAGS}])
913
914 EINA_CONFIG([HAVE_PTHREAD_BARRIER], [test "x${efl_have_pthread_barrier}" = "xyes"])
915 EINA_CONFIG([HAVE_PTHREAD_AFFINITY], [test "x${efl_have_setaffinity}" = "xyes"])
916 EINA_CONFIG([HAVE_DEBUG_THREADS], [test "x${want_debug_threads}" = "xyes"])
917 EINA_CONFIG([HAVE_POSIX_SPINLOCK], [test "x${efl_have_posix_threads_spinlock}" = "xyes"])
918
919 ### Modules
920
921 EINA_CHECK_MODULE([chained-pool], [static], [chained pool])
922 EINA_CHECK_MODULE([pass-through], [static], [pass through])
923 EINA_CHECK_MODULE([one-big],      [static], [one big])
924
925 EFL_ADD_FEATURE([EINA], [systemd-journal], [${want_systemd}])
926
927 EFL_LIB_END([Eina])
928 #### End of Eina
929
930
931 #### Eina CXX
932 EFL_LIB_START([Eina_Cxx])
933
934 AX_CXX_COMPILE_STDCXX_11([ext])
935 if test "x${HAVE_CXX11}" -a "x1"; then
936   have_cxx11="yes"
937 else
938   have_cxx11="no"
939 fi
940
941 AM_CONDITIONAL([HAVE_CXX11], [test "x${have_cxx11}" -a "xyes"])
942
943 EFL_LIB_END([Eina_Cxx])
944 #### End of Eina CXX
945
946 #### Eet
947
948 EFL_LIB_START([Eet])
949
950 ### Default values
951
952 ### Additional options to configure
953
954 ### Checks for programs
955
956 ### Checks for libraries
957
958 ## Compatibility layers
959 EFL_PLATFORM_DEPEND([EET], [evil])
960
961 EFL_ADD_LIBS([EET], [-lm])
962
963 # Cryptography support
964 if test "$build_crypto" != "none" ; then
965    AC_DEFINE([HAVE_CIPHER], [1], [Have cipher support built in eet])
966    AC_DEFINE([HAVE_SIGNATURE], [1], [Have signature support for eet file])
967    EFL_CRYPTO_DEPEND([EET])
968 fi
969
970 EFL_CHECK_LIBS([EET], [libjpeg zlib])
971
972 EFL_INTERNAL_DEPEND_PKG([EET], [eina])
973
974 EFL_EVAL_PKGS([EET])
975
976 ### Checks for header files
977
978 ### Checks for types
979
980 ### Checks for structures
981
982 ### Checks for compiler characteristics
983
984 ### Checks for linker characteristics
985
986 ### Checks for library functions
987
988 ### Check availability
989
990 EFL_LIB_END([Eet])
991 #### End of Eet
992
993
994 #### Eo
995
996 EFL_LIB_START([Eo])
997
998 ### Default values
999
1000 ### Additional options to configure
1001
1002 ### Checks for programs
1003
1004 ## Compatibility layers
1005 EFL_PLATFORM_DEPEND([EO], [evil])
1006
1007 ### Checks for libraries
1008 EFL_INTERNAL_DEPEND_PKG([EO], [eina])
1009
1010 # Example (evas one)
1011
1012 # TODO: add once elementary is merged
1013 #PKG_CHECK_MODULES([ELM], [elementary >= 1.7.0], [have_elm="yes"], [have_elm="no"])
1014 AM_CONDITIONAL([EO_BUILD_EXAMPLE_EVAS], [test "x${have_elm}" = "xyes"])
1015
1016 ### Checks for header files
1017
1018 ### Checks for types
1019
1020 ### Checks for structures
1021
1022 ### Checks for compiler characteristics
1023
1024 ### Checks for linker characteristics
1025
1026 ### Checks for library functions
1027
1028 ### Check availability
1029
1030 EFL_LIB_END([Eo])
1031 #### End of Eo
1032
1033 #### Eolian
1034
1035 EFL_LIB_START([Eolian])
1036
1037 ### Default values
1038
1039 ### Additional options to configure
1040
1041 ### Checks for programs
1042
1043 ## Compatibility layers
1044 EFL_PLATFORM_DEPEND([EOLIAN], [evil])
1045
1046 ### Checks for libraries
1047 EFL_INTERNAL_DEPEND_PKG([EOLIAN], [eina])
1048
1049 ### Checks for header files
1050
1051 ### Checks for types
1052
1053 ### Checks for structures
1054
1055 ### Checks for compiler characteristics
1056
1057 ### Checks for linker characteristics
1058
1059 ### Checks for library functions
1060
1061 ### Check availability
1062
1063 EFL_LIB_END([Eolian])
1064 #### End of Eolian
1065
1066
1067 #### Evas
1068
1069 EFL_LIB_START([Evas])
1070
1071 ### Additional options to configure
1072
1073 # X11
1074 AC_ARG_WITH([x11],
1075    [AC_HELP_STRING([--with-x11=xlib|xcb|none],
1076                    [X11 method to use: xlib, xcb or none])])
1077
1078 if test "x${have_windows}" = "xyes" || test "x${have_ps3}" = "xyes"; then
1079    with_x11="none"
1080 elif test "x${with_x11}" = "x"; then
1081    with_x11="xlib"
1082 fi
1083
1084 want_x11_xlib="no"
1085 want_x11_xcb="no"
1086 want_x11_none="no"
1087 want_x11_any="no"
1088 case "${with_x11}" in
1089    xlib)
1090      want_x11_xlib="yes"
1091      want_x11_any="yes"
1092      ;;
1093    xcb)
1094      want_x11_xcb="yes"
1095      want_x11_any="yes"
1096      CFOPT_WARNING="xyes"
1097      ;;
1098    none)
1099      want_x11_none="yes"
1100      ;;
1101    *)
1102      AC_MSG_ERROR([Unknown build x11 --with-x11=${with_x11}])
1103      ;;
1104 esac
1105
1106 # OpenGL
1107 AC_ARG_WITH([opengl],
1108    [AC_HELP_STRING([--with-opengl=full|es|none],
1109                    [OpenGL method to use: full, es or none])])
1110
1111 if test "x${have_windows}" = "xyes" || test "x${have_ps3}" = "xyes"; then
1112    with_opengl="none"
1113 elif test "x${with_opengl}" = "x"; then
1114    with_opengl="full"
1115 fi
1116
1117 case "${with_opengl}" in
1118    full|es|none)
1119      ;;
1120    *)
1121      AC_MSG_ERROR([Unknown build opengl --with-opengl=${with_opengl}])
1122      ;;
1123 esac
1124
1125 want_x11_xlib_opengl="no"
1126 want_x11_xcb_opengl="no"
1127 if test "${with_opengl}" != "none"; then
1128    want_x11_xlib_opengl="${want_x11_xlib}"
1129    want_x11_xcb_opengl="${want_x11_xcb}"
1130    want_x11_any_opengl="${want_x11_any}"
1131 fi
1132
1133 # Wayland
1134 AC_ARG_ENABLE([wayland],
1135    [AC_HELP_STRING([--enable-wayland],
1136        [enable wayland display server. @<:@default=disabled@:>@])],
1137    [
1138     if test "x${enableval}" = "xyes" ; then
1139        want_wayland="yes"
1140     else
1141        want_wayland="no"
1142     fi
1143    ],
1144    [want_wayland="no"])
1145
1146 if test "${want_wayland}" = "yes"; then
1147    EFL_PKG_CHECK_STRICT([wayland-client >= 1.3.0])
1148 fi
1149
1150 # Fb
1151 AC_ARG_ENABLE([fb],
1152    [AC_HELP_STRING([--enable-fb],
1153        [enable raw Framebuffer access. @<:@default=disabled@:>@])],
1154    [
1155     if test "x${enableval}" = "xyes" ; then
1156        want_fb="yes"
1157     else
1158        want_fb="no"
1159     fi
1160    ],
1161    [want_fb="no"])
1162
1163 # SDL
1164 AC_ARG_ENABLE([sdl],
1165    [AC_HELP_STRING([--enable-sdl],
1166        [enable SDL support. @<:@default=disabled@:>@])],
1167    [
1168     if test "x${enableval}" = "xyes" ; then
1169        want_sdl="yes"
1170     else
1171        want_sdl="no"
1172     fi
1173    ],
1174    [want_sdl="no"])
1175
1176 if test "${want_sdl}" = "yes"; then
1177    EFL_PKG_CHECK_STRICT([sdl >= 1.2.0])
1178 fi
1179
1180 # We only enable SDL with opengl if it is not the full version and not ES
1181 # This can be changed if we ported our SDL code over to SDL 2.0. For older
1182 # versions the SDL_opengles.h has never been released.
1183 want_gl_sdl="no"
1184 if test "${want_sdl}" = "yes" && test "${with_opengl}" = "es"; then
1185    AC_MSG_ERROR([We currently do not support SDL with OpenGL ES. Please consider full OpenGL if you want to use it with SDL.])
1186 fi
1187 if test "${want_sdl}" = "yes" && test "${with_opengl}" = "full"; then
1188    want_gl_sdl="yes"
1189 fi
1190
1191 # Cocoa
1192 dnl AC_ARG_ENABLE([cocoa],
1193 dnl    [AC_HELP_STRING([--enable-cocoa],
1194 dnl        [enable MacOS X Cocoa . @<:@default=disabled@:>@])],
1195 dnl    [
1196 dnl     if test "x${enableval}" = "xyes" ; then
1197 dnl        want_cocoa="yes"
1198 dnl     else
1199 dnl        want_cocoa="no"
1200 dnl     fi
1201 dnl    ],
1202 dnl    [want_cocoa="no"])
1203 dnl
1204 dnl if test "${want_cocoa}" = "yes"; then
1205 dnl    test cocoa requirements (objc and Cocoa/Cocoa.h)
1206 dnl fi
1207 want_cocoa="no"
1208
1209 # Drm
1210 AC_ARG_ENABLE([drm],
1211    [AC_HELP_STRING([--enable-drm],
1212        [enable drm engine. @<:@default=disabled@:>@])],
1213    [
1214     if test "x${enableval}" = "xyes" ; then
1215        want_drm="yes"
1216     else
1217        want_drm="no"
1218     fi
1219    ],
1220    [want_drm="no"])
1221
1222 want_drm_hw_accel="no"
1223 AC_ARG_ENABLE([drm-hw-accel],
1224    [AC_HELP_STRING([--enable-drm-hw-accel],
1225        [enable drm hardware acceleration. @<:@default=disabled@:>@])],
1226    [
1227     if test "x${enableval}" = "xyes" ; then
1228        want_drm_hw_accel="yes"
1229     else
1230        want_drm_hw_accel="no"
1231     fi
1232    ],
1233    [want_drm_hw_accel="no"])
1234
1235
1236 # Fontconfig
1237 AC_ARG_ENABLE([fontconfig],
1238    [AC_HELP_STRING([--disable-fontconfig],
1239        [disable fontconfig for finding fonts. @<:@default=enabled@:>@])],
1240    [
1241     if test "x${enableval}" = "xyes" ; then
1242        want_fontconfig="yes"
1243     else
1244        want_fontconfig="no"
1245        CFOPT_WARNING="xyes"
1246     fi
1247    ],
1248    [want_fontconfig="yes"])
1249
1250 # Fribidi
1251 AC_ARG_ENABLE([fribidi],
1252    [AC_HELP_STRING([--disable-fribidi],
1253        [disable bidirectional text support. @<:@default=enabled@:>@])],
1254    [
1255     if test "x${enableval}" = "xyes" ; then
1256        want_fribidi="yes"
1257     else
1258        want_fribidi="no"
1259        CFOPT_WARNING="xyes"
1260     fi
1261    ],
1262    [want_fribidi="yes"])
1263
1264 # Eo Id
1265 AC_ARG_ENABLE([eo_id],
1266    [AC_HELP_STRING([--disable-eo-id],
1267        [disable Eo indirection. @<:@default=enabled@:>@])],
1268    [
1269     if test "x${enableval}" = "xyes" ; then
1270        want_eo_id="yes"
1271     else
1272        want_eo_id="no"
1273        CFOPT_WARNING="xyes"
1274     fi
1275    ],
1276    [want_eo_id="yes"])
1277
1278 # Harfbuzz
1279 AC_ARG_ENABLE([harfbuzz],
1280    [AC_HELP_STRING([--enable-harfbuzz],
1281        [enable complex text shaping and layouting support. @<:@default=disabled@:>@])],
1282    [
1283     if test "x${enableval}" = "xyes" ; then
1284        want_harfbuzz="yes"
1285     else
1286        want_harfbuzz="no"
1287     fi
1288    ],
1289    [want_harfbuzz="no"])
1290
1291 # Egl
1292 AC_ARG_ENABLE([egl],
1293    [AC_HELP_STRING([--enable-egl],
1294        [enable EGL rendering. @<:@default=disabled@:>@])],
1295    [
1296     if test "x${enableval}" = "xyes" ; then
1297        want_egl="yes"
1298     else
1299        want_egl="no"
1300     fi
1301    ],
1302    [want_egl="no"])
1303
1304 # Pixman
1305 AC_ARG_ENABLE([pixman],
1306    [AC_HELP_STRING([--enable-pixman],
1307        [enable pixman for software rendering. @<:@default=disabled@:>@])],
1308    [
1309     if test "x${enableval}" = "xyes" ; then
1310        want_pixman="yes"
1311        CFOPT_WARNING="xyes"
1312     else
1313        want_pixman="no"
1314     fi
1315    ],
1316    [want_pixman="no"])
1317
1318 AC_ARG_ENABLE([pixman-font],
1319    [AC_HELP_STRING([--enable-pixman-font],
1320        [Allow pixman to render fonts. @<:@default=disabled@:>@])],
1321    [
1322     if test "x${enableval}" = "xyes" ; then
1323        have_pixman_font="yes"
1324     else
1325        have_pixman_font="no"
1326     fi
1327    ],
1328    [have_pixman_font="no"])
1329
1330 AC_ARG_ENABLE([pixman-rect],
1331    [AC_HELP_STRING([--enable-pixman-rect],
1332        [Allow pixman to render rects. @<:@default=disabled@:>@])],
1333    [
1334     if test "x${enableval}" = "xyes" ; then
1335        have_pixman_rect="yes"
1336     else
1337        have_pixman_rect="no"
1338     fi
1339    ],
1340    [have_pixman_rect="no"])
1341
1342 AC_ARG_ENABLE([pixman-line],
1343    [AC_HELP_STRING([--enable-pixman-line],
1344        [Allow pixman to render lines. @<:@default=disabled@:>@])],
1345    [
1346     if test "x${enableval}" = "xyes" ; then
1347        have_pixman_line="yes"
1348     else
1349        have_pixman_line="no"
1350     fi
1351    ],
1352    [have_pixman_line="no"])
1353
1354 AC_ARG_ENABLE(pixman-poly,
1355    AC_HELP_STRING([--enable-pixman-poly],
1356       [Allow pixman to render polys. @<:@default=disabled@:>@]),
1357    [
1358     if test "x${enableval}" = "xyes" ; then
1359        have_pixman_poly="yes"
1360     else
1361        have_pixman_poly="no"
1362     fi
1363    ],
1364    [have_pixman_poly="no"])
1365
1366 AC_ARG_ENABLE([pixman-image],
1367    [AC_HELP_STRING([--enable-pixman-image],
1368        [Allow pixman to render images. @<:@default=disabled@:>@])],
1369    [
1370     if test "x${enableval}" = "xyes" ; then
1371        have_pixman_image="yes"
1372     else
1373        have_pixman_image="no"
1374     fi
1375    ],
1376    [have_pixman_image="no"])
1377
1378 AC_ARG_ENABLE([pixman-image-scale-sample],
1379    [AC_HELP_STRING([--enable-pixman-image-scale-sample],
1380        [Allow pixman to render sampled scaled images. @<:@default=disabled@:>@])],
1381    [
1382     if test "x${enableval}" = "xyes" ; then
1383        have_pixman_image_scale_sample="yes"
1384     else
1385        have_pixman_image_scale_sample="no"
1386     fi
1387    ],
1388    [have_pixman_image_scale_sample="no"])
1389
1390 # Tile rotate
1391 AC_ARG_ENABLE([tile-rotate],
1392    [AC_HELP_STRING([--enable-tile-rotate],
1393        [Enable tiled rotate algorithm. @<:@default=disabled@:>@])],
1394    [
1395     if test "x${enableval}" = "xyes" ; then
1396        have_tile_rotate="yes"
1397        CFOPT_WARNING="xyes"
1398     else
1399        have_tile_rotate="no"
1400     fi
1401   ],
1402   [have_tile_rotate="no"])
1403
1404
1405 # Image Loaders
1406
1407 ARG_ENABLE_EVAS_IMAGE_LOADER(BMP, static)
1408 ARG_ENABLE_EVAS_IMAGE_LOADER(Eet, static)
1409 ARG_ENABLE_EVAS_IMAGE_LOADER(Generic, static)
1410 ARG_ENABLE_EVAS_IMAGE_LOADER(Gif, yes)
1411 ARG_ENABLE_EVAS_IMAGE_LOADER(ICO, static)
1412 ARG_ENABLE_EVAS_IMAGE_LOADER(JPEG, static)
1413 ARG_ENABLE_EVAS_IMAGE_LOADER(JP2K, auto)
1414 ARG_ENABLE_EVAS_IMAGE_LOADER(PMAPS, static)
1415 ARG_ENABLE_EVAS_IMAGE_LOADER(PNG, static)
1416 ARG_ENABLE_EVAS_IMAGE_LOADER(PSD, static)
1417 ARG_ENABLE_EVAS_IMAGE_LOADER(Tga, static)
1418 ARG_ENABLE_EVAS_IMAGE_LOADER(Tiff, yes)
1419 ARG_ENABLE_EVAS_IMAGE_LOADER(WBMP, static)
1420 ARG_ENABLE_EVAS_IMAGE_LOADER(WEBP, no)
1421 ARG_ENABLE_EVAS_IMAGE_LOADER(XPM, static)
1422
1423 ### Default values
1424
1425 want_evas_engine_software_gdi="${have_win32}"
1426 want_evas_engine_software_ddraw="${have_win32}"
1427 want_evas_engine_gl_cocoa="${want_cocoa}"
1428 want_evas_engine_wayland_egl="no"
1429 if test "${want_wayland}" = "yes" && test "${want_egl}" = "yes"; then
1430    want_evas_engine_wayland_egl="yes"
1431 fi
1432
1433 if test "${have_wince}" = "yes"; then
1434    want_fontconfig="no"
1435    want_evas_image_loader_gif="no"
1436    want_evas_image_loader_tiff="no"
1437    want_evas_image_loader_webp="no"
1438 fi
1439
1440 EFL_CHECK_FUNC([EVAS], [dlsym])
1441
1442 if test "x${efl_func_dlsym}" = "xno" && test "${with_opengl}" != "none"; then
1443    AC_MSG_ERROR([OpenGL cannot work without dlsym()])
1444 fi
1445
1446 ### Checks for programs
1447
1448 ### Checks for libraries
1449
1450 ## Compatibility layers
1451 EFL_PLATFORM_DEPEND([EVAS], [all])
1452 EFL_INTERNAL_DEPEND_PKG([EVAS], [eo])
1453 EFL_INTERNAL_DEPEND_PKG([EVAS], [eet])
1454 EFL_INTERNAL_DEPEND_PKG([EVAS], [eina])
1455
1456 EFL_ADD_LIBS([EVAS], [-lm])
1457
1458 # Freetype
1459 EFL_DEPEND_PKG([EVAS], [FREETYPE], [freetype2 >= 9.3.0])
1460
1461 ## optional dependencies
1462
1463 # FontConfig
1464 EFL_OPTIONAL_DEPEND_PKG([EVAS], [${want_fontconfig}],
1465    [FONTCONFIG], [fontconfig >= 2.5.0])
1466
1467 # fribidi support
1468 EFL_OPTIONAL_DEPEND_PKG([EVAS], [${want_fribidi}],
1469    [FRIBIDI], [fribidi >= 0.19.2])
1470
1471 # harfbuzz support
1472 have_harfbuzz_ft="no"
1473 EFL_OPTIONAL_DEPEND_PKG([EVAS], [${want_harfbuzz}],
1474    [HARFBUZZ], [harfbuzz >= 0.9.0])
1475
1476 # Pixman
1477 EFL_OPTIONAL_DEPEND_PKG([EVAS], [${want_pixman}], [PIXMAN], [pixman-1])
1478
1479 if test "x${have_pixman}" = "xyes" ; then
1480    if test "x${have_pixman_font}" = "xyes" ; then
1481       AC_DEFINE(PIXMAN_FONT, 1, [Allow pixman to render fonts])
1482    fi
1483    EFL_ADD_FEATURE([EVAS_PIXMAN], [font], [${have_pixman_font}])
1484
1485    if test "x${have_pixman_rect}" = "xyes" ; then
1486       AC_DEFINE(PIXMAN_RECT, 1, [Allow pixman to render rects])
1487    fi
1488    EFL_ADD_FEATURE([EVAS_PIXMAN], [rect], [${have_pixman_rect}])
1489
1490    if test "x${have_pixman_line}" = "xyes" ; then
1491       AC_DEFINE(PIXMAN_LINE, 1, [Allow pixman to render lines])
1492    fi
1493    EFL_ADD_FEATURE([EVAS_PIXMAN], [line], [${have_pixman_line}])
1494
1495    if test "x${have_pixman_poly}" = "xyes" ; then
1496       AC_DEFINE(PIXMAN_POLY, 1, [Allow pixman to render polys])
1497    fi
1498    EFL_ADD_FEATURE([EVAS_PIXMAN], [poly], [${have_pixman_poly}])
1499
1500    if test "x${have_pixman_image}" = "xyes" ; then
1501       AC_DEFINE(PIXMAN_IMAGE, 1, [Allow pixman to render images])
1502    fi
1503    EFL_ADD_FEATURE([EVAS_PIXMAN], [image], [${have_pixman_image}])
1504
1505    if test "x${have_pixman_image_scale_sample}" = "xyes" ; then
1506       AC_DEFINE(PIXMAN_IMAGE_SCALE_SAMPLE, 1, [Allow pixman to render image sampled scaling])
1507    fi
1508    EFL_ADD_FEATURE([EVAS_PIXMAN], [scale_sample], [${have_pixman_scale_sample}])
1509 fi
1510
1511 ## Engines
1512
1513 define([EVAS_ENGINE_DEP_CHECK_FB], [
1514 AC_CHECK_HEADER([linux/fb.h], [:], [AC_MSG_ERROR([Missing linux/fb.h])])
1515 ])
1516
1517 define([EVAS_ENGINE_DEP_CHECK_PSL1GHT], [
1518 AC_CHECK_HEADER([rsx/rsx.h], [:], [AC_MSG_ERROR([Missing rsx/rsx.h])])
1519 ])
1520
1521 EVAS_ENGINE([buffer], [static])
1522 EVAS_ENGINE([fb], [${want_fb}], [EVAS_ENGINE_DEP_CHECK_FB])
1523 EVAS_ENGINE([psl1ght], [${have_ps3}], [EVAS_ENGINE_DEP_CHECK_PSL1GHT])
1524
1525 # XXX TODO:
1526 EVAS_CHECK_ENGINE([gl-cocoa], [${want_evas_engine_gl_cocoa}], [no], [OpenGL Cocoa])
1527 EVAS_CHECK_ENGINE([gl-sdl], [${want_gl_sdl}], [no], [OpenGL SDL])
1528 EVAS_CHECK_ENGINE([software-gdi], [${want_evas_engine_software_gdi}], [no], [Software GDI])
1529 EVAS_CHECK_ENGINE([software-ddraw], [${want_evas_engine_software_ddraw}], [no], [Software DirectDraw])
1530 EVAS_CHECK_ENGINE([wayland-egl], [${want_evas_engine_wayland_egl}], [no], [Wayland Egl])
1531 EVAS_CHECK_ENGINE([wayland-shm], [${want_wayland}], [no], [Wayland Shm])
1532 EVAS_CHECK_ENGINE([drm], [${want_drm}], [no], [Drm])
1533
1534
1535 # Software XCB
1536
1537 have_evas_engine_software_xcb="no"
1538 if test "${with_x11}" = "xcb" ; then
1539    EVAS_CHECK_ENGINE([software-xcb], [${want_x11_xcb}], [no], [Software XCB])
1540 else
1541    AM_CONDITIONAL([BUILD_ENGINE_SOFTWARE_XCB], [false])
1542    AM_CONDITIONAL([EVAS_STATIC_BUILD_SOFTWARE_XCB], [false])
1543 fi
1544
1545 AC_MSG_CHECKING([whether to build Software XCB Engine])
1546 AC_MSG_RESULT([${have_evas_engine_software_xcb}])
1547
1548 # No Software XCB ? Then try Software Xlib
1549
1550 have_evas_engine_software_xlib="no"
1551 if test "x${want_x11_xcb}" = "xno" ; then
1552    EVAS_CHECK_ENGINE([software-xlib], [${want_x11_xlib}], [no], [Software Xlib])
1553 else
1554    AM_CONDITIONAL([BUILD_ENGINE_SOFTWARE_XLIB], [false])
1555    AM_CONDITIONAL([EVAS_STATIC_BUILD_SOFTWARE_XLIB], [false])
1556 fi
1557
1558 AC_MSG_CHECKING([whether to build Software Xlib Engine])
1559 AC_MSG_RESULT([${have_evas_engine_software_xlib}])
1560
1561 # If software_x11 is available, define everything needed for X11
1562
1563 have_evas_engine_software_x11="no"
1564 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
1565    have_evas_engine_software_x11="yes"
1566    AC_DEFINE_UNQUOTED([BUILD_ENGINE_SOFTWARE_X11], [1], [Build software X11 engine])
1567 fi
1568 AM_CONDITIONAL([BUILD_ENGINE_SOFTWARE_X11], [test "x${have_evas_engine_software_x11}" = "xyes"])
1569
1570 if test "x${have_evas_engine_software_xlib}" = "xstatic" || test "x${have_evas_engine_software_xcb}" = "xstatic"; then
1571    AC_DEFINE_UNQUOTED([EVAS_STATIC_BUILD_SOFTWARE_X11], [1], [Build software X11 engine as part of libevas])
1572 fi
1573 AM_CONDITIONAL([EVAS_STATIC_BUILD_SOFTWARE_X11], [test "x${have_evas_engine_software_xcb}" = "xstatic" || test "x${have_evas_engine_software_xlib}" = "xstatic"])
1574
1575 # Needed for evas-software-x11.pc
1576
1577 AC_SUBST([have_evas_engine_software_xlib])
1578 AC_SUBST([have_evas_engine_software_xcb])
1579
1580 # Software generic
1581 AC_DEFINE([EVAS_STATIC_BUILD_SOFTWARE_GENERIC], [1], [Build software generic engine as part of libevas])
1582 AM_CONDITIONAL([EVAS_STATIC_BUILD_SOFTWARE_GENERIC], [true])
1583
1584 # OpenGL
1585
1586 if test "${with_opengl}" = "es" ; then
1587    AC_DEFINE(GL_GLES, 1, [GLSL runtime shader GLES2 support])
1588 fi
1589
1590 # OpenGL XCB
1591
1592 have_evas_engine_gl_xcb="no"
1593 if test "${want_x11_xcb_opengl}" = "yes"; then
1594    EVAS_CHECK_ENGINE([gl-xcb], [${want_x11_xcb_opengl}], [no], [OpenGL XCB])
1595 else
1596    AM_CONDITIONAL([BUILD_ENGINE_GL_XCB], [false])
1597    AM_CONDITIONAL([EVAS_STATIC_BUILD_GL_XCB], [false])
1598 fi
1599
1600 AC_MSG_CHECKING([whether to build OpenGL XCB Engine])
1601 AC_MSG_RESULT([${have_evas_engine_gl_xcb}])
1602
1603 # No openGL XCB ? Then try OpenGL Xlib
1604
1605 have_evas_engine_gl_xlib="no"
1606 if test "x${have_evas_engine_gl_xcb}" = "xno" ; then
1607    EVAS_CHECK_ENGINE([gl-xlib], [${want_x11_xlib_opengl}], [no], [OpenGL XLib])
1608 else
1609    AM_CONDITIONAL([BUILD_ENGINE_GL_XLIB], [false])
1610    AM_CONDITIONAL([EVAS_STATIC_BUILD_GL_XLIB], [false])
1611 fi
1612
1613 AC_MSG_CHECKING([whether to build OpenGL Xlib Engine])
1614 AC_MSG_RESULT([${have_evas_engine_gl_xlib}])
1615
1616 # If opengl_x11 is available, define everything needed for X11
1617
1618 have_evas_engine_gl_x11="no"
1619 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
1620    have_evas_engine_gl_x11="yes"
1621    AC_DEFINE_UNQUOTED([BUILD_ENGINE_GL_X11], [1], [Build OpenGL X11 engine])
1622 fi
1623 AM_CONDITIONAL([BUILD_ENGINE_GL_X11], [test "x${have_evas_engine_gl_x11}" = "xyes"])
1624
1625 if test "x${have_evas_engine_gl_xlib}" = "xstatic" || test "x${have_evas_engine_gl_xcb}" = "xstatic"; then
1626    AC_DEFINE_UNQUOTED([EVAS_STATIC_BUILD_GL_X11], [1], [Build OpenGL X11 engine as part of libevas])
1627 fi
1628 AM_CONDITIONAL([EVAS_STATIC_BUILD_GL_X11], [test "x${have_evas_engine_gl_xcb}" = "xstatic" || test "x${have_evas_engine_gl_xlib}" = "xstatic"])
1629
1630 # Needed for evas-opengl-x11.pc
1631
1632 AC_SUBST([have_evas_engine_gl_xlib])
1633 AC_SUBST([have_evas_engine_gl_xcb])
1634
1635 # OpenGL SDL
1636
1637 if test "x$have_evas_engine_gl_sdl" = "xyes" || test "x$have_evas_engine_gl_sdl" = "xstatic" ; then
1638    AC_CHECK_DECL([SDL_GL_CONTEXT_MAJOR_VERSION],
1639       [AC_DEFINE([HAVE_SDL_GL_CONTEXT_VERSION], [1], [SDL_GL version attributes present])],,
1640       [#include <SDL/SDL_video.h>])
1641 fi
1642
1643 if test "${with_opengl}" = "es"; then
1644    AC_CHECK_DECL([SDL_OPENGLES],
1645       [AC_DEFINE([HAVE_SDL_FLAG_OPENGLES], [1], [SDL_OPENGLES flag is present])],,
1646       [#include <SDL/SDL_video.h>])
1647 fi
1648
1649 # OpenGL common
1650 evas_engine_gl_common_cflags=""
1651 evas_engine_gl_common_libs=""
1652 AC_SUBST([evas_engine_gl_common_cflags])
1653 AC_SUBST([evas_engine_gl_common_libs])
1654
1655 have_evas_engine_gl_common="no"
1656 have_static_evas_engine_gl_common="no"
1657 if test "x$have_evas_engine_gl_xlib" = "xyes" || \
1658    test "x$have_evas_engine_gl_xcb" = "xyes" || \
1659    test "x$have_evas_engine_gl_sdl" = "xyes" || \
1660    test "x$have_evas_engine_gl_cocoa" = "xyes" || \
1661    test "x$have_evas_engine_wayland_egl" = "xyes"; then
1662    have_evas_engine_gl_common="yes"
1663 fi
1664 if test "x$have_evas_engine_gl_xlib" = "xstatic" || \
1665    test "x$have_evas_engine_gl_xcb" = "xstatic" || \
1666    test "x$have_evas_engine_gl_sdl" = "xstatic" || \
1667    test "x$have_evas_engine_gl_cocoa" = "xstatic" || \
1668    test "x$have_evas_engine_wayland_egl" = "xstatic"; then
1669    have_evas_engine_gl_common="yes"
1670    have_static_evas_engine_gl_common="yes"
1671 fi
1672
1673 if test "x${have_evas_engine_gl_common}" = "xyes"; then
1674    AC_DEFINE([BUILD_ENGINE_GL_COMMON], [1], [Generic OpenGL Rendering Support])
1675 fi
1676
1677 AM_CONDITIONAL([BUILD_ENGINE_GL_COMMON], [test "x$have_evas_engine_gl_common" = "xyes"])
1678
1679 if test "x${have_static_evas_engine_gl_common}" = "xyes"; then
1680    AC_DEFINE([EVAS_STATIC_BUILD_GL_COMMON], [1], [Build GL generic engine as part of libevas])
1681 fi
1682
1683 AM_CONDITIONAL([EVAS_STATIC_BUILD_GL_COMMON], [test "x${have_static_evas_engine_gl_common}" = "xyes"])
1684
1685
1686 ## Image Loaders
1687
1688 EVAS_CHECK_IMAGE_LOADER([BMP],     [${want_evas_image_loader_bmp}])
1689 EVAS_CHECK_IMAGE_LOADER([Eet],     [${want_evas_image_loader_eet}])
1690 EVAS_CHECK_IMAGE_LOADER([Generic], [${want_evas_image_loader_generic}])
1691 EVAS_CHECK_IMAGE_LOADER([Gif],     [${want_evas_image_loader_gif}])
1692 EVAS_CHECK_IMAGE_LOADER([ICO],     [${want_evas_image_loader_ico}])
1693 EVAS_CHECK_IMAGE_LOADER([JPEG],    [${want_evas_image_loader_jpeg}])
1694 EVAS_CHECK_IMAGE_LOADER([JP2K],    [${want_evas_image_loader_jp2k}])
1695 EVAS_CHECK_IMAGE_LOADER([PMAPS],   [${want_evas_image_loader_pmaps}])
1696 EVAS_CHECK_IMAGE_LOADER([PNG],     [${want_evas_image_loader_png}])
1697 EVAS_CHECK_IMAGE_LOADER([PSD],     [${want_evas_image_loader_psd}])
1698 EVAS_CHECK_IMAGE_LOADER([Tga],     [${want_evas_image_loader_tga}])
1699 EVAS_CHECK_IMAGE_LOADER([Tiff],    [${want_evas_image_loader_tiff}])
1700 EVAS_CHECK_IMAGE_LOADER([WBMP],    [${want_evas_image_loader_wbmp}])
1701 EVAS_CHECK_IMAGE_LOADER([WEBP],    [${want_evas_image_loader_webp}])
1702 EVAS_CHECK_IMAGE_LOADER([XPM],     [${want_evas_image_loader_xpm}])
1703
1704 dnl Windows has no sigsetjmp function, nor equivalent.
1705 dnl So we disable the jpeg saver.
1706 dnl TODO: must find a workaround
1707 if test "${have_windows}" = "yes"; then
1708    have_evas_image_saver_jpeg="no"
1709 elif test "x${have_evas_image_loader_jpeg}" = "xyes" || \
1710      test "x${have_evas_image_loader_jpeg}" = "xstatic"; then
1711    AC_DEFINE([EVAS_BUILD_SAVER_JPEG], [1], [Build JPEG saver])
1712    have_evas_image_saver_jpeg="yes"
1713 fi
1714
1715 AM_CONDITIONAL([BUILD_SAVER_JPEG], [test "x${have_evas_image_saver_jpeg}" = "xyes"])
1716
1717 EFL_EVAL_PKGS([EVAS])
1718
1719 ### Checks for header files
1720
1721 if test "x$have_harfbuzz" = "xyes" ; then
1722
1723    CPPFLAGS_SAVE="$CPPFLAGS"
1724    CPPFLAGS="$CPPFLAGS $EVAS_CFLAGS"
1725 # must have for usage with harfbuzz although harfbuzz may not have it.
1726
1727    AC_CHECK_HEADER([hb-ft.h],
1728       [
1729        have_harfbuzz_ft="yes"
1730        #Depend on harfbuzz ft for harfbuzz support
1731        AC_DEFINE([HAVE_HARFBUZZ], [1], [have harfbuzz support])
1732       ],
1733       [AC_MSG_ERROR([Harfbuzz-ft (hb-ft.h) not found])])
1734
1735    CPPFLAGS="$CPPFLAGS_SAVE"
1736 fi
1737
1738 ### Checks for types
1739
1740 CPPFLAGS_SAVE="$CPPFLAGS"
1741 CPPFLAGS="$CPPFLAGS $EVAS_CFLAGS -Isrc/lib/eina"
1742 AC_CHECK_SIZEOF([Eina_Unicode], [], [#include <Eina.h>])
1743 CPPFLAGS="$CPPFLAGS_SAVE"
1744
1745
1746 if test "x$have_fribidi" = "xyes" ; then
1747    CPPFLAGS_SAVE="$CPPFLAGS"
1748    CPPFLAGS="$CPPFLAGS $EVAS_CFLAGS"
1749    AC_CHECK_SIZEOF([FriBidiChar], [], [#include <fribidi.h>])
1750    CPPFLAGS="$CPPFLAGS_SAVE"
1751 fi
1752
1753 ### Checks for structures
1754
1755 AC_CHECK_TYPES([struct sigaction], [], [],
1756                [[#include <signal.h>]])
1757
1758 ### Checks for compiler characteristics
1759
1760 ### Checks for linker characteristics
1761
1762 ### Checks for library functions
1763
1764 AC_CHECK_FUNCS([siglongjmp])
1765
1766 AC_CHECK_LIB([m], [lround],
1767 [AC_DEFINE([HAVE_LROUND], [1], [C99 lround function exists])],
1768 [EFL_CHECK_GCC_BUILTIN([lround], [HAVE_LROUND])]
1769 )
1770
1771
1772 # Evas cserve2
1773
1774 AC_ARG_ENABLE([cserve],
1775    [AC_HELP_STRING([--enable-cserve],
1776        [enable shared cache server (cserve2). @<:@default=enabled@:>@])],
1777    [
1778     if test "x${enableval}" = "xyes" ; then
1779        want_evas_cserve2="yes"
1780     else
1781        want_evas_cserve2="no"
1782        CFOPT_WARNING="xyes"
1783     fi
1784    ],
1785    [want_evas_cserve2="yes"])
1786
1787 if test "x${want_evas_image_loader_generic}" = "xyes" || test "x${want_evas_cserve2}" = "xyes" ; then
1788    EFL_ADD_LIBS([EVAS], [${requirements_libs_shm}])
1789 fi
1790
1791 # cserve2 only works on Linux so far.
1792
1793 if test "x${efl_func_shm_open}" = "xno" ; then
1794    want_evas_cserve2="no"
1795 fi
1796
1797 if test "x${want_evas_cserve2}" = "xyes"; then
1798    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
1799       want_evas_cserve2="no"
1800    else
1801       EVAS_CSERVE2_SLAVE_LIBS="${EFL_COV_LIBS} ${EFL_LIBS} ${requirements_libs_shm}"
1802       AC_SUBST([EVAS_CSERVE2_SLAVE_LIBS])
1803    fi
1804 fi
1805
1806 AC_DEFINE_IF([EVAS_CSERVE2],
1807    [test "x${want_evas_cserve2}" = "xyes"],
1808    [1], [Shared cache server.])
1809 AM_CONDITIONAL([EVAS_CSERVE2], [test "x${want_evas_cserve2}" = "xyes"])
1810
1811 ### Configuration
1812
1813 ## Tile rotation
1814
1815 if test "x${have_tile_rotate}" = "xyes" ; then
1816    AC_DEFINE(TILE_ROTATE, 1, [Enable tiled rotate algorithm])
1817 fi
1818
1819
1820 ## dither options
1821
1822 AC_ARG_WITH([evas-dither-mask],
1823    [AC_HELP_STRING([--with-evas-dither-mask=TYPE],
1824                    [use the specified dither mask to convert bitdepths in Evas, one of: big, small, line or none.
1825                     @<:@default=big@:>@])],
1826    [build_evas_dither_mask=${withval}],
1827    [build_evas_dither_mask=big])
1828
1829 case "${build_evas_dither_mask}" in
1830    big)
1831      AC_DEFINE([BUILD_BIG_DITHER_MASK], [1], [Use biggest dither mask while converting in Evas])
1832      ;;
1833    small)
1834      AC_DEFINE([BUILD_SMALL_DITHER_MASK], [1], [Use smaller dither mask while converting in Evas])
1835      ;;
1836    line)
1837      AC_DEFINE([BUILD_LINE_DITHER_MASK], [1], [Use simpler line-only dither mask while converting in Evas])
1838      ;;
1839    none)
1840      AC_DEFINE([BUILD_NO_DITHER_MASK], [1], [Do not use dither masks while converting in Evas])
1841      ;;
1842    *)
1843      AC_MSG_ERROR([Unknown Evas dither mask --with-evas-dither-mask=${build_evas_dither_mask}])
1844      ;;
1845 esac
1846 EFL_ADD_FEATURE([EVAS], [fontconfig])
1847 EFL_ADD_FEATURE([EVAS], [fribidi])
1848 EFL_ADD_FEATURE([EVAS], [harfbuzz])
1849 EFL_ADD_FEATURE([EVAS], [cserve], [${want_evas_cserve2}])
1850 EFL_ADD_FEATURE([EVAS], [tile-rotate])
1851 EFL_ADD_FEATURE([EVAS], [dither-mask], [${build_evas_dither_mask}])
1852
1853 EFL_LIB_END([Evas])
1854 #### End of Evas
1855
1856
1857 #### Embryo
1858
1859 EFL_LIB_START([Embryo])
1860
1861 ### Default values
1862
1863 ### Additional options to configure
1864
1865 ### Checks for programs
1866
1867 ### Checks for libraries
1868 EFL_PLATFORM_DEPEND([EMBRYO], [all])
1869 EFL_INTERNAL_DEPEND_PKG([EMBRYO], [eina])
1870
1871 EFL_ADD_LIBS([EMBRYO], [-lm])
1872
1873 ### Checks for header files
1874
1875 ### Checks for types
1876
1877 ### Checks for structures
1878
1879 ### Checks for compiler characteristics
1880
1881 ### Checks for linker characteristics
1882
1883 ### Checks for library functions
1884
1885 if ! test "x${efl_func_fnmatch}" = "xyes" ; then
1886    AC_MSG_ERROR([Cannot find fnmatch()])
1887 fi
1888
1889 if ! test "x${efl_func_gettimeofday}" = "xyes" ; then
1890    AC_MSG_ERROR([Cannot find gettimeofday()])
1891 fi
1892
1893 ### Check availability
1894
1895 EFL_LIB_END([Embryo])
1896 #### End of Embryo
1897
1898
1899 #### Ecore
1900
1901 EFL_LIB_START([Ecore])
1902
1903 ### Additional options to configure
1904
1905 # glib
1906
1907 AC_ARG_WITH([glib],
1908    [AC_HELP_STRING([--with-glib=yes|no|always],
1909                    [add glib support. @<:@default=enabled@:>@])],
1910    [
1911     if test "x${withval}" = "xyes" ; then
1912        with_glib="yes"
1913     else
1914        if test "x${withval}" = "xalways" ; then
1915           with_glib="always"
1916        else
1917           with_glib="no"
1918        fi
1919     fi
1920    ],
1921    [with_glib="yes"])
1922
1923 AC_ARG_ENABLE([g-main-loop],
1924    [AC_HELP_STRING([--enable-g-main-loop],
1925        [enable ecore_main_loop based on g_main_loop. @<:@default=disabled@:>@])],
1926    [
1927     if test "x${enableval}" = "xyes" ; then
1928        want_g_main_loop="yes"
1929        CFOPT_WARNING="xyes"
1930     else
1931        want_g_main_loop="no"
1932     fi
1933    ],
1934    [want_g_main_loop="no"])
1935
1936 AC_ARG_ENABLE([gstreamer],
1937    [AC_HELP_STRING([--enable-gstreamer],
1938                    [enable gstreamer 0.10 support. @<:@default=disabled@:>@])],
1939    [
1940     if test "x${enableval}" = "xyes" ; then
1941        want_gstreamer="yes"
1942        CFOPT_WARNING="xyes"
1943     else
1944        want_gstreamer="no"
1945     fi
1946    ],
1947    [want_gstreamer="no"])
1948
1949 AC_ARG_ENABLE([gstreamer1],
1950    [AC_HELP_STRING([--disable-gstreamer1],
1951                    [disable gstreamer 1.0 support. @<:@default=enabled@:>@])],
1952    [
1953     if test "x${enableval}" = "xyes" ; then
1954        want_gstreamer1="yes"
1955     else
1956        want_gstreamer1="no"
1957        CFOPT_WARNING="xyes"
1958     fi
1959    ],
1960    [want_gstreamer1="yes"])
1961
1962 AC_ARG_ENABLE([tizen],
1963    [AC_HELP_STRING([--enable-tizen],
1964        [enable tizen support. @<:@default=disabled@:>@])],
1965    [
1966     if test "x${enableval}" = "xyes" ; then
1967        want_tizen="yes"
1968     else
1969        want_tizen="no"
1970     fi
1971    ],
1972    [want_tizen="no"])
1973
1974 if test "${want_tizen}" = "yes"; then
1975      PKG_CHECK_MODULES([TIZEN_CONFIGURATION_MANAGER],
1976       [vconf],
1977       [have_tizen_vconf="yes"],
1978       [have_tizen_vconf="no"])
1979   PKG_CHECK_MODULES([TIZEN_CONFIGURATION_MANAGER], [vconf])
1980 fi
1981
1982 AM_CONDITIONAL([HAVE_TIZEN_CONFIGURATION_MANAGER], [test "${have_tizen_vconf}" = "yes"])
1983 if test "${have_tizen_vconf}"  = "yes"; then
1984   AC_DEFINE(HAVE_TIZEN_CONFIGURATION_MANAGER, 1, [Define to 1 if you have Tizen configuration manager(vconf).])
1985 fi
1986
1987 ### Default values
1988
1989 if test "${have_windows}" = "yes"; then
1990    with_glib="no"
1991 fi
1992
1993 want_glib="no"
1994 if test "x${with_glib}" = "xyes" || test "x${with_glib}" = "xalways" ; then
1995    want_glib="yes"
1996 fi
1997
1998 want_ecore_timer_dump="no"
1999 if test "x${build_profile}" = "xdebug" && test "x${ac_cv_func_backtrace}" = "xyes"; then
2000    want_ecore_timer_dump="yes"
2001    AC_DEFINE([WANT_ECORE_TIMER_DUMP], [1], [Want Ecore_Timer dump infrastructure])
2002 fi
2003
2004 ### Checks for programs
2005
2006 ### Checks for libraries
2007 EFL_PLATFORM_DEPEND([ECORE], [all])
2008 EFL_INTERNAL_DEPEND_PKG([ECORE], [eo])
2009 EFL_INTERNAL_DEPEND_PKG([ECORE], [eina])
2010
2011 EFL_ADD_LIBS([ECORE], [-lm])
2012
2013 # glib
2014
2015 EFL_OPTIONAL_DEPEND_PKG([ECORE], [${want_glib}], [GLIB], [glib-2.0 gthread-2.0])
2016 if test "x${have_glib}" = "xno"; then
2017    want_g_main_loop="no"
2018 fi
2019
2020 EFL_OPTIONAL_DEPEND_PKG([ECORE], [${want_systemd}], [SYSTEMD], [libsystemd-daemon])
2021
2022 EFL_ADD_FEATURE([ECORE], [systemd-daemon], [${want_systemd}])
2023 EFL_ADD_FEATURE([ECORE], [glib])
2024 EFL_ADD_FEATURE([ECORE], [g-main-loop])
2025
2026 want_glib_integration_always=no
2027 if test "x${with_glib}" = "xalways" ; then
2028   want_glib_integration_always="yes"
2029   AC_DEFINE([GLIB_INTEGRATION_ALWAYS], [1], [Always integrate glib if support compiled])
2030 fi
2031
2032 if test "x${want_g_main_loop}" = "xyes" ; then
2033   AC_DEFINE([USE_G_MAIN_LOOP], [1], [Use g_main_loop in ecore])
2034 fi
2035
2036 # not EFL_OPTIONAL_DEPEND_PKG() because it's only used for ecore examples
2037 if test "${want_gstreamer1}" = "yes" -a "${want_gstreamer}" = "yes"; then
2038    AC_MSG_ERROR([You can only enable either GStreamer 1.0 or GStreamer 0.10 support])
2039 fi
2040
2041 if test "${want_gstreamer1}" = "yes"; then
2042   PKG_CHECK_MODULES([GSTREAMER], [gstreamer-1.0])
2043 fi
2044 if test "${want_gstreamer}" = "yes"; then
2045   PKG_CHECK_MODULES([GSTREAMER], [gstreamer-0.10])
2046 fi
2047 AM_CONDITIONAL([HAVE_GSTREAMER], [test "${want_gstreamer}" = "yes" -o "${want_gstreamer1}" = "yes"])
2048
2049 EFL_EVAL_PKGS([ECORE])
2050
2051 ### Checks for header files
2052
2053 AC_HEADER_SYS_WAIT
2054
2055 AC_CHECK_HEADERS([sys/socket.h])
2056
2057 AC_CHECK_HEADERS([ \
2058 arpa/inet.h \
2059 langinfo.h \
2060 features.h \
2061 net/if.h \
2062 netinet/in.h \
2063 netinet/tcp.h \
2064 sys/prctl.h \
2065 sys/resource.h \
2066 sys/timerfd.h \
2067 sys/un.h \
2068 ],[],[],
2069 [
2070  #ifdef HAVE_SYS_SOCKET_H
2071  # include <sys/socket.h>
2072  #endif
2073 ])
2074
2075 ### Checks for types
2076
2077 ### Checks for structures
2078
2079 ### Checks for compiler characteristics
2080
2081 ### Checks for linker characteristics
2082
2083 ### Checks for library functions
2084
2085 ## ecore
2086
2087 # isfinite
2088
2089 AC_COMPILE_IFELSE(
2090    [AC_LANG_PROGRAM(
2091        [[
2092 #include <math.h>
2093        ]],
2094        [[
2095 int i = isfinite(0);
2096        ]])],
2097    [
2098     AC_DEFINE(HAVE_ISFINITE, 1, [Define to 1 if you have `isfinite', as a function or macro.])
2099     have_isfinite="yes"
2100    ],
2101    [have_isfinite="no"])
2102
2103 AC_MSG_CHECKING([for isfinite])
2104 AC_MSG_RESULT([${have_isfinite}])
2105
2106 # mallinfo, timerfd_create, clock_gettime
2107
2108 AC_CHECK_FUNCS_ONCE([mallinfo timerfd_create clock_gettime malloc_info])
2109
2110 if ! test "x${ac_cv_func_clock_gettime}" = "xyes" ; then
2111    AC_CHECK_LIB([rt], [clock_gettime],
2112       [
2113         EFL_ADD_LIBS([ECORE], [-lrt])
2114         AC_DEFINE([HAVE_CLOCK_GETTIME], [1], [Have clock_gettime()])
2115        ])
2116 fi
2117
2118 EFL_ADD_LIBS([ECORE], [${LTLIBINTL}])
2119
2120 # coroutine function specific
2121
2122 AC_COMPILE_IFELSE(
2123    [AC_LANG_PROGRAM(
2124        [[
2125 #include <ucontext.h>
2126        ]],
2127        [[
2128 ucontext_t test;
2129 getcontext(&test);
2130        ]])],
2131    [have_ucontext="yes"],
2132    [have_ucontext="no"])
2133
2134 AC_MSG_CHECKING([for ucontext])
2135 AC_MSG_RESULT([${have_ucontext}])
2136
2137 AC_COMPILE_IFELSE(
2138    [AC_LANG_PROGRAM(
2139        [[
2140 #include <setjmp.h>
2141        ]],
2142        [[
2143 jmp_buf context;
2144 setjmp(&context);
2145        ]])],
2146    [have_setjmp="yes"],
2147    [have_setjmp="no"])
2148
2149 AC_MSG_CHECKING([for setjmp])
2150 AC_MSG_RESULT([${have_setjmp}])
2151
2152 if test "X${have_windows}" = "xyes"; then
2153    AC_DEFINE(USE_FIBER, 1, [Define to 1 if you have Windows Fiber support.])
2154    EFL_ADD_FEATURE([system], [coroutine], [fiber])
2155 elif test "x${have_ucontext}" = "xyes"; then
2156    AC_DEFINE(USE_UCONTEXT, 1, [Define to 1 if you have posix ucontext functions.])
2157    EFL_ADD_FEATURE([system], [coroutine], [ucontext])
2158 elif test "x${have_setjmp}" = "xyes"; then
2159    AC_DEFINE(USE_SETJMP, 1, [Define to 1 if you have setjmp/longjmp functions.])
2160    EFL_ADD_FEATURE([system], [coroutine], [setjmp])
2161 else
2162    AC_MSG_ERROR([You don't have a working way to implement coroutine. Exiting...])
2163 fi
2164
2165 ### Check availability
2166
2167 EFL_LIB_END([Ecore])
2168 #### End of Ecore
2169
2170
2171 #### Ecore_Con
2172
2173 EFL_LIB_START([Ecore_Con])
2174
2175 ### Default values
2176
2177 want_ecore_con_local_sockets="yes"
2178 want_ecore_con_abstract_sockets="yes"
2179
2180 if test "${have_wince}" = "yes"; then
2181    want_cares="no"
2182    want_ecore_con_local_sockets="no"
2183    want_ecore_con_abstract_sockets="no"
2184 elif test "${have_win32}" = "yes"; then
2185    want_cares="yes"
2186    want_ecore_con_abstract_sockets="no"
2187 elif test "${have_darwin}" = "yes"; then
2188    want_cares="no"
2189    want_ecore_con_abstract_sockets="no"
2190 elif test "${have_ps3}" = "yes"; then
2191    want_cares="no"
2192    want_ecore_con_local_sockets="no"
2193    want_ecore_con_abstract_sockets="no"
2194 else
2195    want_cares="no"
2196 fi
2197
2198 AC_DEFINE_IF([HAVE_LOCAL_SOCKETS],
2199    [test "x${want_ecore_con_local_sockets}" = "xyes"],
2200    [1], [Have local sockets support])
2201 AC_DEFINE_IF([HAVE_ABSTRACT_SOCKETS],
2202    [test "x${want_ecore_con_abstract_sockets}" = "xyes"],
2203    [1], [Have abstract sockets namespace])
2204
2205 ### Checks for programs
2206
2207 ### Checks for libraries
2208 EFL_PLATFORM_DEPEND([ECORE_CON], [all])
2209 if test "$build_crypto" != "none" ; then
2210    EFL_CRYPTO_DEPEND([ECORE_CON])
2211 fi
2212 EFL_INTERNAL_DEPEND_PKG([ECORE_CON], [eo])
2213 EFL_INTERNAL_DEPEND_PKG([ECORE_CON], [eet])
2214 EFL_INTERNAL_DEPEND_PKG([ECORE_CON], [eina])
2215 EFL_INTERNAL_DEPEND_PKG([ECORE_CON], [ecore])
2216
2217 EFL_ADD_LIBS([ECORE_CON], [-lm])
2218
2219 EFL_OPTIONAL_DEPEND_PKG([ECORE_CON], [${want_cares}],
2220    [CARES], [libcares >= 1.6.1])
2221 AM_CONDITIONAL([HAVE_CARES], [test "x${have_cares}" = "xyes"])
2222
2223 if test "x$have_cares" = "xyes" ; then
2224    ecore_con_resolver="cares"
2225 elif test "x$ac_cv_prog_cc_c99" != "xno" ; then
2226    ecore_con_resolver="dns.c"
2227 else
2228    ecore_con_resolver="fork"
2229 fi
2230
2231 EFL_OPTIONAL_DEPEND_PKG([ECORE_CON], [${want_systemd}], [SYSTEMD], [libsystemd-daemon])
2232
2233 EFL_ADD_FEATURE([ECORE_CON], [cares])
2234 EFL_ADD_FEATURE([ECORE_CON], [local-sockets], [${want_ecore_con_local_sockets}])
2235 EFL_ADD_FEATURE([ECORE_CON], [abstract-sockets], [${want_ecore_con_abstract_sockets}])
2236 EFL_ADD_FEATURE([ECORE_CON], [resolver], [${ecore_con_resolver}])
2237 EFL_ADD_FEATURE([ECORE_CON], [systemd-daemon], [${want_systemd}])
2238
2239 EFL_EVAL_PKGS([ECORE_CON])
2240
2241 ### Checks for header files
2242
2243 AC_CHECK_HEADERS([ws2tcpip.h netdb.h])
2244
2245 if test "x${ac_cv_header_netdb_h}" = "xno" && test "x${have_windows}" = "xno"; then
2246    AC_MSG_ERROR([netdb.h is requested to have Ecore_Con. Exiting...])
2247 fi
2248
2249 ### Checks for types
2250
2251 have_ipv6="no"
2252 AC_CHECK_TYPES([struct ipv6_mreq],
2253    [have_ipv6="yes"],
2254    [have_ipv6="no"],
2255    [[
2256 #include <netinet/in.h>
2257 #ifdef HAVE_WS2TCPIP_H
2258 # include <ws2tcpip.h>
2259 #endif
2260 ]])
2261
2262 AC_DEFINE_IF([HAVE_IPV6],
2263    [test "x${have_ipv6}" = "xyes"],
2264    [1], [Define if IPV6 is supported])
2265 AM_CONDITIONAL([HAVE_IPV6], [test "x${have_ipv6}" = "xyes"])
2266
2267 ### Checks for structures
2268
2269 ### Checks for compiler characteristics
2270
2271 ### Checks for linker characteristics
2272
2273 ### Checks for library functions
2274
2275 EFL_LIB_END([Ecore_Con])
2276 #### End of Ecore_Con
2277
2278
2279 #### Ecore_Ipc
2280
2281 EFL_LIB_START([Ecore_Ipc])
2282
2283 ### Default values
2284
2285 ### Additional options to configure
2286
2287 ### Checks for programs
2288
2289 ## Compatibility layers
2290 EFL_PLATFORM_DEPEND([ECORE_IPC], [evil])
2291
2292 ### Checks for libraries
2293 EFL_INTERNAL_DEPEND_PKG([ECORE_IPC], [ecore-con])
2294 EFL_INTERNAL_DEPEND_PKG([ECORE_IPC], [ecore])
2295 EFL_INTERNAL_DEPEND_PKG([ECORE_IPC], [eo])
2296 EFL_INTERNAL_DEPEND_PKG([ECORE_IPC], [eina])
2297
2298 EFL_ADD_LIBS([ECORE_IPC], [-lm])
2299
2300 ### Checks for header files
2301
2302 AC_CHECK_HEADERS([winsock2.h])
2303
2304 ### Checks for types
2305
2306 ### Checks for structures
2307
2308 ### Checks for compiler characteristics
2309
2310 ### Checks for linker characteristics
2311
2312 ### Checks for library functions
2313
2314 EFL_LIB_END([Ecore_Ipc])
2315 #### End of Ecore_Ipc
2316
2317
2318 #### Ecore_File
2319
2320 EFL_LIB_START([Ecore_File])
2321
2322 ### Additional options to configure
2323
2324 ### Default values
2325
2326 ### Checks for programs
2327
2328 ## Compatibility layers
2329 EFL_PLATFORM_DEPEND([ECORE_FILE], [evil])
2330
2331 ### Checks for libraries
2332 EFL_PLATFORM_DEPEND([ECORE_FILE], [escape])
2333 EFL_INTERNAL_DEPEND_PKG([ECORE_FILE], [ecore-con])
2334 EFL_INTERNAL_DEPEND_PKG([ECORE_FILE], [ecore])
2335 EFL_INTERNAL_DEPEND_PKG([ECORE_FILE], [eo])
2336 EFL_INTERNAL_DEPEND_PKG([ECORE_FILE], [eina])
2337
2338 ### Checks for header files
2339
2340 ### Checks for types
2341
2342 ### Checks for structures
2343
2344 ### Checks for compiler characteristics
2345
2346 ### Checks for linker characteristics
2347
2348 ### Checks for library functions
2349
2350 EFL_LIB_END([Ecore_File])
2351 #### End of Ecore_File
2352
2353
2354 #### Ecore_Input
2355 EFL_LIB_START([Ecore_Input])
2356
2357 ### Additional options to configure
2358
2359 ### Default values
2360
2361 ### Checks for programs
2362
2363 ## Compatibility layers
2364 EFL_PLATFORM_DEPEND([ECORE_INPUT], [evil])
2365
2366 ### Checks for libraries
2367 EFL_INTERNAL_DEPEND_PKG([ECORE_INPUT], [ecore])
2368 EFL_INTERNAL_DEPEND_PKG([ECORE_INPUT], [eo])
2369 EFL_INTERNAL_DEPEND_PKG([ECORE_INPUT], [eina])
2370
2371 ### Checks for header files
2372
2373 ### Checks for types
2374
2375 ### Checks for structures
2376
2377 ### Checks for compiler characteristics
2378
2379 ### Checks for linker characteristics
2380
2381 ### Checks for library functions
2382
2383 EFL_LIB_END([Ecore_Input])
2384 #### End of Ecore_Input
2385
2386
2387 #### Ecore_Input_Evas
2388 EFL_LIB_START([Ecore_Input_Evas])
2389
2390 ### Additional options to configure
2391
2392 ### Default values
2393
2394 ### Checks for programs
2395
2396 ## Compatibility layers
2397 EFL_PLATFORM_DEPEND([ECORE_INPUT_EVAS], [evil])
2398
2399 ### Checks for libraries
2400 EFL_INTERNAL_DEPEND_PKG([ECORE_INPUT_EVAS], [ecore-input])
2401 EFL_INTERNAL_DEPEND_PKG([ECORE_INPUT_EVAS], [ecore])
2402 EFL_INTERNAL_DEPEND_PKG([ECORE_INPUT_EVAS], [evas])
2403 EFL_INTERNAL_DEPEND_PKG([ECORE_INPUT_EVAS], [eo])
2404 EFL_INTERNAL_DEPEND_PKG([ECORE_INPUT_EVAS], [eina])
2405
2406 ### Checks for header files
2407
2408 ### Checks for types
2409
2410 ### Checks for structures
2411
2412 ### Checks for compiler characteristics
2413
2414 ### Checks for linker characteristics
2415
2416 ### Checks for library functions
2417
2418 EFL_LIB_END([Ecore_Input_Evas])
2419 #### End of Ecore_Input_Evas
2420
2421
2422 #### Ecore_Cocoa
2423 EFL_LIB_START_OPTIONAL([Ecore_Cocoa], [test "${want_cocoa}" = "yes"])
2424
2425 ### Additional options to configure
2426
2427 ### Default values
2428
2429 ### Checks for programs
2430
2431 ### Checks for libraries
2432 EFL_INTERNAL_DEPEND_PKG([ECORE_COCOA], [ecore-input])
2433 EFL_INTERNAL_DEPEND_PKG([ECORE_COCOA], [ecore])
2434 EFL_INTERNAL_DEPEND_PKG([ECORE_COCOA], [eo])
2435 EFL_INTERNAL_DEPEND_PKG([ECORE_COCOA], [eina])
2436
2437 ### Checks for header files
2438
2439 dnl TODO: once cocoa is fixed and test-able, add required libs here
2440 dnl to ECORE_COCOA_LIBS and ECORE_COCOA_CFLAGS.
2441 dnl Evas already tests for ObjC and Cocoa/Cocoa.h
2442
2443 ### Checks for types
2444
2445 ### Checks for structures
2446
2447 ### Checks for compiler characteristics
2448
2449 ### Checks for linker characteristics
2450
2451 ### Checks for library functions
2452
2453 EFL_LIB_END_OPTIONAL([Ecore_Cocoa])
2454 #### End of Ecore_Cocoa
2455
2456
2457 #### Ecore_FB
2458 EFL_LIB_START_OPTIONAL([Ecore_FB], [test "${want_fb}" = "yes"])
2459
2460 ### Additional options to configure
2461 AC_ARG_ENABLE([tslib],
2462    [AC_HELP_STRING([--disable-tslib],
2463        [disable tslib for touchscreen events.])],
2464    [
2465     if test "x${enableval}" = "xyes" ; then
2466        want_tslib="yes"
2467     else
2468        want_tslib="no"
2469     fi
2470    ], [want_tslib="yes"])
2471
2472 ### Default values
2473
2474 ### Checks for programs
2475
2476 ### Checks for libraries
2477 EFL_INTERNAL_DEPEND_PKG([ECORE_FB], [ecore])
2478 EFL_INTERNAL_DEPEND_PKG([ECORE_FB], [ecore-input])
2479 EFL_INTERNAL_DEPEND_PKG([ECORE_FB], [eo])
2480 EFL_INTERNAL_DEPEND_PKG([ECORE_FB], [eina])
2481
2482 EFL_OPTIONAL_DEPEND_PKG([ECORE_FB], [${want_tslib}], [TSLIB], [tslib])
2483 EFL_ADD_FEATURE([ECORE_FB], [tslib])
2484
2485 EFL_EVAL_PKGS([ECORE_FB])
2486
2487 ### Checks for header files
2488
2489 have_ecore_fb="no"
2490 AC_CHECK_HEADER([linux/fb.h],
2491    [AC_CHECK_HEADER([linux/input.h], [have_ecore_fb="yes"])])
2492 if test "${have_ecore_fb}" = "no"; then
2493    AC_MSG_ERROR([Missing linux/input.h or linux/fb.h])
2494 fi
2495
2496 ### Checks for types
2497
2498 ### Checks for structures
2499
2500 ### Checks for compiler characteristics
2501
2502 ### Checks for linker characteristics
2503
2504 ### Checks for library functions
2505
2506 EFL_LIB_END_OPTIONAL([Ecore_FB])
2507 #### End of Ecore_FB
2508
2509
2510 #### Ecore_Psl1ght
2511 EFL_LIB_START_OPTIONAL([Ecore_Psl1ght], [test "${have_ps3}" = "yes"])
2512
2513 ### Additional options to configure
2514
2515 ### Default values
2516
2517 ### Checks for programs
2518
2519 ### Checks for libraries
2520 EFL_PLATFORM_DEPEND([ECORE_PSL1GHT], [escape])
2521
2522 EFL_INTERNAL_DEPEND_PKG([ECORE_PSL1GHT], [ecore-input])
2523 EFL_INTERNAL_DEPEND_PKG([ECORE_PSL1GHT], [ecore])
2524 EFL_INTERNAL_DEPEND_PKG([ECORE_PSL1GHT], [eo])
2525 EFL_INTERNAL_DEPEND_PKG([ECORE_PSL1GHT], [eina])
2526
2527 EFL_ADD_LIBS([ECORE_PSL1GHT], [-lio -lsysutil -lgem -lcamera -lspurs])
2528
2529 ### Checks for header files
2530
2531 ### Checks for types
2532
2533 ### Checks for structures
2534
2535 ### Checks for compiler characteristics
2536
2537 ### Checks for linker characteristics
2538
2539 ### Checks for library functions
2540
2541 EFL_LIB_END_OPTIONAL([Ecore_Psl1ght])
2542 #### End of Ecore_Psl1ght
2543
2544
2545 #### Ecore_SDL
2546 EFL_LIB_START_OPTIONAL([Ecore_SDL], [test "${want_sdl}" = "yes"])
2547
2548 ### Additional options to configure
2549
2550 ### Default values
2551
2552 ### Checks for programs
2553
2554 ### Checks for libraries
2555 EFL_PLATFORM_DEPEND([ECORE_SDL], [all])
2556 EFL_INTERNAL_DEPEND_PKG([ECORE_SDL], [ecore-input])
2557 EFL_INTERNAL_DEPEND_PKG([ECORE_SDL], [ecore])
2558 EFL_INTERNAL_DEPEND_PKG([ECORE_SDL], [eo])
2559 EFL_INTERNAL_DEPEND_PKG([ECORE_SDL], [eina])
2560
2561 EFL_DEPEND_PKG([ECORE_SDL], [SDL], [sdl >= 1.2.0])
2562
2563 PKG_CHECK_EXISTS([sdl >= 1.3.0],
2564    [AC_DEFINE(BUILD_ECORE_EVAS_SDL_130, 1, [Support for SVN SDL])])
2565
2566 EFL_EVAL_PKGS([ECORE_SDL])
2567
2568 ### Checks for header files
2569
2570 ### Checks for types
2571
2572 ### Checks for structures
2573
2574 ### Checks for compiler characteristics
2575
2576 ### Checks for linker characteristics
2577
2578 ### Checks for library functions
2579
2580 EFL_LIB_END_OPTIONAL([Ecore_SDL])
2581 #### End of Ecore_SDL
2582
2583
2584 #### Ecore_Wayland
2585 EFL_LIB_START_OPTIONAL([Ecore_Wayland], [test "${want_wayland}" = "yes"])
2586
2587 ### Additional options to configure
2588
2589 ### Default values
2590
2591 ### Checks for programs
2592
2593 ### Checks for libraries
2594 EFL_INTERNAL_DEPEND_PKG([ECORE_WAYLAND], [ecore-input])
2595 EFL_INTERNAL_DEPEND_PKG([ECORE_WAYLAND], [ecore])
2596 EFL_INTERNAL_DEPEND_PKG([ECORE_WAYLAND], [eo])
2597 EFL_INTERNAL_DEPEND_PKG([ECORE_WAYLAND], [eina])
2598
2599 EFL_DEPEND_PKG([ECORE_WAYLAND], [WAYLAND],
2600    [wayland-client >= 1.3.0 wayland-cursor >= 1.3.0 xkbcommon >= 0.3.0])
2601
2602 EFL_EVAL_PKGS([ECORE_WAYLAND])
2603
2604 ### Checks for header files
2605
2606 ### Checks for types
2607
2608 ### Checks for structures
2609
2610 ### Checks for compiler characteristics
2611
2612 ### Checks for linker characteristics
2613
2614 ### Checks for library functions
2615 EFL_LIB_END_OPTIONAL([Ecore_Wayland])
2616 #### End of Ecore_Wayland
2617
2618 #### Ecore_Drm
2619 EFL_LIB_START_OPTIONAL([Ecore_Drm], [test "${want_drm}" = "yes"])
2620
2621 ### Additional options to configure
2622 SUID_CFLAGS=-fPIE
2623 SUID_LDFLAGS=-pie
2624 AC_SUBST([SUID_CFLAGS])
2625 AC_SUBST([SUID_LDFLAGS])
2626
2627 ### Default values
2628
2629 ### Checks for programs
2630
2631 ### Checks for libraries
2632 EFL_INTERNAL_DEPEND_PKG([ECORE_DRM], [ecore])
2633 EFL_INTERNAL_DEPEND_PKG([ECORE_DRM], [ecore-input])
2634 EFL_INTERNAL_DEPEND_PKG([ECORE_DRM], [eo])
2635 EFL_INTERNAL_DEPEND_PKG([ECORE_DRM], [eina])
2636
2637 EFL_DEPEND_PKG([ECORE_DRM], [DRM], [libudev >= 148 libdrm >= 2.4 xkbcommon >= 0.3.0])
2638
2639 EFL_EVAL_PKGS([ECORE_DRM])
2640
2641 ### Checks for header files
2642
2643 ### Checks for types
2644
2645 ### Checks for structures
2646
2647 ### Checks for compiler characteristics
2648
2649 ### Checks for linker characteristics
2650
2651 ### Checks for library functions
2652
2653 EFL_LIB_END_OPTIONAL([Ecore_Drm])
2654 #### End of Ecore_Drm
2655
2656
2657 #### Ecore_Audio
2658
2659 AC_ARG_ENABLE([audio],
2660    [AC_HELP_STRING([--disable-audio],
2661        [disable audio support. @<:@default=enabled@:>@])],
2662    [
2663     if test "x${enableval}" = "xyes" ; then
2664        want_audio="yes"
2665     else
2666        want_audio="no"
2667        CFOPT_WARNING="xyes"
2668     fi
2669    ],
2670    [want_audio="yes"])
2671
2672 EFL_LIB_START_OPTIONAL([Ecore_Audio], [test "${want_audio}" = "yes"])
2673
2674 ### Additional options to configure
2675
2676 # ALSA support is still not there, thus no option for it yet.
2677 want_alsa="no"
2678
2679 # sndfile is mandatory otherwise it won't read from/write to files.
2680 # TODO: if confirmed sndfile is mandatory, remove this variable
2681 # TODO: and the EFL_OPTIONAL_DEPEND_PKG(), use EFL_DEPEND_PKG()
2682 want_sndfile="yes"
2683
2684 AC_ARG_ENABLE([pulseaudio],
2685    [AC_HELP_STRING([--disable-pulseaudio],
2686        [disable pulseaudio sound support. @<:@default=enabled@:>@])],
2687    [
2688     if test "x${enableval}" = "xyes" ; then
2689        want_pulseaudio="yes"
2690     else
2691        want_pulseaudio="no"
2692        CFOPT_WARNING="xyes"
2693     fi
2694    ],
2695    [want_pulseaudio="yes"])
2696
2697
2698 ### Default values
2699
2700 ### Checks for programs
2701
2702 ## Compatibility layers
2703 EFL_PLATFORM_DEPEND([ECORE_AUDIO], [evil])
2704
2705 ### Checks for libraries
2706 EFL_INTERNAL_DEPEND_PKG([ECORE_AUDIO], [ecore])
2707 EFL_INTERNAL_DEPEND_PKG([ECORE_AUDIO], [eet])
2708 EFL_INTERNAL_DEPEND_PKG([ECORE_AUDIO], [eo])
2709 EFL_INTERNAL_DEPEND_PKG([ECORE_AUDIO], [eina])
2710
2711 EFL_ADD_LIBS([ECORE_AUDIO], [-lm])
2712
2713 EFL_OPTIONAL_DEPEND_PKG([ECORE_AUDIO], [${want_alsa}], [ALSA], [alsa])
2714 EFL_OPTIONAL_DEPEND_PKG([ECORE_AUDIO], [${want_pulseaudio}], [PULSE], [libpulse])
2715 EFL_OPTIONAL_DEPEND_PKG([ECORE_AUDIO], [${want_sndfile}], [SNDFILE], [sndfile])
2716
2717 EFL_EVAL_PKGS([ECORE_AUDIO])
2718
2719 EFL_ADD_FEATURE([ECORE_AUDIO], [alsa])
2720 EFL_ADD_FEATURE([ECORE_AUDIO], [pulseaudio])
2721 EFL_ADD_FEATURE([ECORE_AUDIO], [sndfile])
2722
2723 ### Checks for header files
2724
2725 ### Checks for types
2726
2727 ### Checks for structures
2728
2729 ### Checks for compiler characteristics
2730
2731 ### Checks for linker characteristics
2732
2733 ### Checks for library functions
2734
2735 EFL_LIB_END_OPTIONAL([Ecore_Audio])
2736 AM_CONDITIONAL([HAVE_ECORE_AUDIO_PULSE], [test "x${want_pulseaudio}" = "xyes"])
2737 AM_CONDITIONAL([HAVE_ECORE_AUDIO_SNDFILE], [test "x${want_sndfile}" = "xyes"])
2738
2739 #### End of Ecore_Audio
2740
2741 #### Ecore_Win32
2742 EFL_LIB_START_OPTIONAL([Ecore_Win32], [test "${have_win32}" = "yes"])
2743
2744 ### Additional options to configure
2745
2746 ### Default values
2747
2748 ### Checks for programs
2749
2750 ### Checks for libraries
2751 EFL_PLATFORM_DEPEND([ECORE_WIN32], [evil])
2752 EFL_INTERNAL_DEPEND_PKG([ECORE_WIN32], [ecore-input])
2753 EFL_INTERNAL_DEPEND_PKG([ECORE_WIN32], [ecore])
2754 EFL_INTERNAL_DEPEND_PKG([ECORE_WIN32], [eo])
2755 EFL_INTERNAL_DEPEND_PKG([ECORE_WIN32], [eina])
2756
2757 EFL_ADD_LIBS([ECORE_WIN32], [-lole32 -lgdi32])
2758 AC_SUBST([ECORE_WIN32_LIBS])
2759
2760 ### Checks for header files
2761
2762 ### Checks for types
2763
2764 ### Checks for structures
2765
2766 ### Checks for compiler characteristics
2767
2768 ### Checks for linker characteristics
2769
2770 ### Checks for library functions
2771
2772 EFL_LIB_END_OPTIONAL([Ecore_Win32])
2773 #### End of Ecore_Win32
2774
2775 #### Ecore_Avahi
2776
2777 EFL_LIB_START([Ecore_Avahi])
2778
2779 ### Default values
2780
2781 ### Additional options to configure
2782
2783 want_avahi="yes"
2784
2785 AC_ARG_ENABLE([avahi],
2786    [AC_HELP_STRING([--disable-avahi],
2787        [disable avahi support. @<:@default=enabled@:>@])],
2788    [
2789     if test "x${enableval}" = "xyes" ; then
2790        want_avahi="yes"
2791     else
2792        want_avahi="no"
2793     fi
2794    ], [
2795     want_avahi="yes"
2796    ])
2797
2798 ### Checks for programs
2799
2800 ## Compatibility layers
2801 EFL_PLATFORM_DEPEND([ECORE_AVAHI], [evil])
2802
2803 ### Checks for libraries
2804 EFL_INTERNAL_DEPEND_PKG([ECORE_AVAHI], [ecore])
2805 EFL_INTERNAL_DEPEND_PKG([ECORE_AVAHI], [eina])
2806 EFL_INTERNAL_DEPEND_PKG([ECORE_AVAHI], [eo])
2807
2808 EFL_OPTIONAL_DEPEND_PKG([ECORE_AVAHI], [${want_avahi}], [AVAHI], [avahi-client], [have_avahi=yes], [have_avahi=no])
2809
2810 EFL_ADD_FEATURE([ECORE_AVAHI], [avahi-client], [${have_avahi}])
2811
2812 # Needed bu example as they use avahi directly in that case
2813 if test "x${have_avahi}" = "xyes"; then
2814    PKG_CHECK_MODULES([AVAHI_CLIENT], [avahi-client])
2815 fi
2816
2817 EFL_EVAL_PKGS([ECORE_AVAHI])
2818
2819 ### Checks for header files
2820
2821 ### Checks for types
2822
2823 ### Checks for structures
2824
2825 ### Checks for compiler characteristics
2826
2827 ### Checks for linker characteristics
2828
2829 ### Checks for library functions
2830
2831 EFL_LIB_END([Ecore_Avahi])
2832
2833 #### End of Ecore_Avahi
2834
2835 #### Ecore_WinCE
2836 EFL_LIB_START_OPTIONAL([Ecore_WinCE], [test "${have_wince}" = "yes"])
2837
2838 ### Additional options to configure
2839
2840 ### Default values
2841
2842 ### Checks for programs
2843
2844 ### Checks for libraries
2845 EFL_PLATFORM_DEPEND([ECORE_WINCE], [evil])
2846 EFL_INTERNAL_DEPEND_PKG([ECORE_WINCE], [ecore-input])
2847 EFL_INTERNAL_DEPEND_PKG([ECORE_WINCE], [ecore])
2848 EFL_INTERNAL_DEPEND_PKG([ECORE_WINCE], [eo])
2849 EFL_INTERNAL_DEPEND_PKG([ECORE_WINCE], [eina])
2850
2851 ### Checks for header files
2852
2853 ### Checks for types
2854
2855 ### Checks for structures
2856
2857 ### Checks for compiler characteristics
2858
2859 ### Checks for linker characteristics
2860
2861 ### Checks for library functions
2862
2863 EFL_LIB_END_OPTIONAL([Ecore_WinCE])
2864 #### End of Ecore_WinCE
2865
2866
2867 #### Ecore_X
2868 EFL_LIB_START_OPTIONAL([Ecore_X], [test "${want_x11_any}" = "yes"])
2869
2870 ### Additional options to configure
2871
2872 AC_ARG_ENABLE([gesture],
2873    [AC_HELP_STRING([--enable-gesture], [enable X11 Gesture extension support])],
2874    [
2875     if test "x${enableval}" = "xyes" ; then
2876        want_gesture="yes"
2877     else
2878        want_gesture="no"
2879     fi
2880    ],
2881    [want_gesture="no"])
2882
2883 AC_ARG_ENABLE([xpresent],
2884    [AC_HELP_STRING([--enable-xpresent], [enable X11 XPresent extension support])],
2885    [
2886     if test "x${enableval}" = "xyes" ; then
2887        want_xpresent="yes"
2888     else
2889        want_xpresent="no"
2890     fi
2891    ],
2892    [want_xpresent="no"])
2893
2894 AC_ARG_ENABLE([xinput2],
2895    [AC_HELP_STRING([--disable-xinput2], [disable X11 XInput v2.x support])],
2896    [
2897     if test "x${enableval}" = "xyes" ; then
2898        want_xinput2="yes"
2899     else
2900        want_xinput2="no"
2901        CFOPT_WARNING="xyes"
2902     fi
2903    ],
2904    [want_xinput2="yes"])
2905
2906 AC_ARG_ENABLE([xinput22],
2907    [AC_HELP_STRING([--enable-xinput22], [enable X11 XInput v2.2+ support])],
2908    [
2909     if test "x${enableval}" = "xyes" ; then
2910        want_xinput22="yes"
2911     else
2912        want_xinput22="no"
2913     fi
2914    ],
2915    [want_xinput22="no"])
2916
2917 AC_ARG_ENABLE([xim],
2918    [AC_HELP_STRING([--disable-xim], [disable X Input Method.])],
2919    [
2920     if test "x${enableval}" = "xyes" ; then
2921        want_xim="yes"
2922     else
2923        want_xim="no"
2924        CFOPT_WARNING="xyes"
2925     fi
2926    ],
2927    [want_xim="yes"])
2928
2929 AC_ARG_ENABLE([scim],
2930    [AC_HELP_STRING([--disable-scim], [disable SCIM.])],
2931    [
2932     if test "x${enableval}" = "xyes" ; then
2933        want_scim="yes"
2934     else
2935        want_scim="no"
2936        CFOPT_WARNING="xyes"
2937     fi
2938    ],
2939    [want_scim="yes"])
2940
2941 AC_ARG_ENABLE([ibus],
2942    [AC_HELP_STRING([--disable-ibus], [disable IBUS.])],
2943    [
2944     if test "x${enableval}" = "xyes" ; then
2945        want_ibus="yes"
2946     else
2947        want_ibus="no"
2948     fi
2949    ],
2950    [want_ibus="yes"])
2951
2952 ### Default values
2953
2954 ### Checks for programs
2955
2956 ### Checks for libraries
2957 EFL_INTERNAL_DEPEND_PKG([ECORE_X], [ecore-input])
2958 EFL_INTERNAL_DEPEND_PKG([ECORE_X], [ecore])
2959 EFL_INTERNAL_DEPEND_PKG([ECORE_X], [eo])
2960 EFL_INTERNAL_DEPEND_PKG([ECORE_X], [eina])
2961
2962 ## Xlib
2963
2964 ## XCB
2965
2966 ### Checks for header files
2967
2968 AC_CHECK_DECL([MAXHOSTNAMELEN], [FOUND_MAXHOSTNAMELEN=yes])
2969
2970 if test "x${FOUND_MAXHOSTNAMELEN}" != "xyes" ; then
2971    FOUND_MAXHOSTNAMELEN="not found"
2972
2973    AC_COMPILE_IFELSE(
2974       [
2975        AC_LANG_PROGRAM(
2976           [[
2977 #include <sys/param.h>
2978           ]],
2979           [[
2980 int h = MAXHOSTNAMELEN;
2981           ]])
2982       ],
2983       [
2984        FOUND_MAXHOSTNAMELEN="sys/param.h"
2985        AC_DEFINE([NEED_SYS_PARAM_H], [1], [Define to 1 if you need <sys/param.h> to define MAXHOSTNAMELEN])
2986       ])
2987
2988    AC_COMPILE_IFELSE(
2989       [
2990        AC_LANG_PROGRAM(
2991           [[
2992 #include <netdb.h>
2993           ]],
2994           [[
2995 int h = MAXHOSTNAMELEN;
2996           ]])
2997       ],
2998       [
2999        FOUND_MAXHOSTNAMELEN="netdb.h"
3000        AC_DEFINE([NEED_NETDB_H], [1], [Define to 1 if you need <netdb.h> to define MAXHOSTNAMELEN])
3001       ])
3002
3003    AC_MSG_CHECKING([for header that defines MAXHOSTNAMELEN])
3004    AC_MSG_RESULT([$FOUND_MAXHOSTNAMELEN])
3005 fi
3006
3007 ## Xlib
3008 if test "x${want_x11_xcb}" = "xyes" ; then
3009    KEYSYMDEFDIR=`$PKG_CONFIG --variable=includedir xproto`/X11
3010    FILES="keysymdef.h XF86keysym.h Sunkeysym.h DECkeysym.h HPkeysym.h"
3011    for i in $FILES; do
3012        if test -f "$KEYSYMDEFDIR/$i"; then
3013          KEYSYMDEFS="$KEYSYMDEFS $KEYSYMDEFDIR/$i"
3014        elif test "x$i" = "xkeysymdef.h"; then
3015          AC_MSG_ERROR([Cannot find keysymdef.h])
3016        fi
3017    done
3018    AC_MSG_CHECKING([keysym definitions])
3019    AC_MSG_RESULT([$KEYSYMDEFS])
3020    AC_SUBST([KEYSYMDEFS])
3021 fi
3022
3023 ### Checks for types
3024
3025 ### Checks for structures
3026
3027 ### Checks for compiler characteristics
3028
3029 ### Checks for linker characteristics
3030
3031 ### Checks for library functions
3032
3033 ## Xlib
3034 if test "x${want_x11_xlib}" = "xyes"; then
3035    EFL_FIND_X(ECORE_X_XLIB,
3036      [X11/Xlib.h X11/Xcursor/Xcursor.h],
3037      [X11 XOpenDisplay Xcursor XcursorImageLoadCursor],
3038      [
3039        use_Xcursor="yes"
3040        AC_DEFINE([ECORE_XCURSOR], 1, [Build support for Xcursor])
3041        EFL_ADD_LIBS([ECORE_X], [$ECORE_X_XLIB_libs])
3042        EFL_ADD_CFLAGS([ECORE_X], [$ECORE_X_XLIB_cflags])
3043      ],[
3044        AC_MSG_ERROR([Xcursor is missing])
3045      ])
3046 fi
3047
3048 if test "x${want_x11_xlib}" = "xyes" ; then
3049    ECORE_CHECK_X_EXTENSION([Xkb], [XKB.h], [X11], [XkbSetDetectableAutoRepeat])
3050    ECORE_CHECK_X_EXTENSION([Xcomposite], [Xcomposite.h], [Xcomposite], [XCompositeQueryExtension])
3051    ECORE_CHECK_X_EXTENSION([Xdamage], [Xdamage.h], [Xdamage], [XDamageSubtract])
3052    ECORE_CHECK_X_EXTENSION([Xdpms], [dpms.h], [Xext], [DPMSQueryExtension])
3053    ECORE_CHECK_X_EXTENSION([Xfixes], [Xfixes.h], [Xfixes], [XFixesExpandRegion])
3054    ECORE_CHECK_X_EXTENSION([Xinerama], [Xinerama.h], [Xinerama], [XineramaQueryScreens])
3055    ECORE_CHECK_X_EXTENSION([Xprint], [Print.h], [Xp], [XpQueryScreens])
3056    ECORE_CHECK_X_EXTENSION([Xrandr], [Xrandr.h], [Xrandr], [XRRGetScreenResourcesCurrent])
3057    ECORE_CHECK_X_EXTENSION([Xrender], [Xrender.h], [Xrender], [XRenderFindVisualFormat])
3058    ECORE_CHECK_X_EXTENSION([Xtest], [XTest.h], [Xtst], [XTestFakeKeyEvent])
3059    ECORE_CHECK_X_EXTENSION([Xss], [scrnsaver.h], [Xss], [XScreenSaverSelectInput])
3060
3061    PKG_CHECK_EXISTS([xrandr > 1.3.2], [AC_DEFINE([XRANDR_GOOD], [1], [good xrandr])], [])
3062
3063    if test "${want_xpresent}" = "yes"; then
3064       ECORE_CHECK_X_EXTENSION([Xpresent], [Xpresent.h], [Xpresent], [XPresentQueryExtension])
3065    fi
3066    EFL_ADD_FEATURE([ECORE_X], [xpresent])
3067
3068    if test "${want_gesture}" = "yes"; then
3069       ECORE_CHECK_X_EXTENSION([Xgesture], [gesture.h], [Xgesture], [XGestureQueryExtension])
3070    fi
3071    EFL_ADD_FEATURE([ECORE_X], [gesture])
3072
3073    if test "${want_xinput2}" = "yes"; then
3074       ECORE_CHECK_X_EXTENSION([Xi2], [XInput2.h], [Xi], [XIQueryDevice])
3075    fi
3076    EFL_ADD_FEATURE([ECORE_X], [xinput2])
3077
3078    if test "${want_xinput22}" = "yes"; then
3079       ECORE_CHECK_X_EXTENSION([Xi2_2], [XInput2.h], [Xi],[XIGrabTouchBegin])
3080    fi
3081    EFL_ADD_FEATURE([ECORE_X], [xinput22])
3082
3083    AC_DEFINE([HAVE_ECORE_X_XLIB], [1], [Defined to 1 if Xlib is enabled.])
3084    HAVE_ECORE_X_BACKEND="HAVE_ECORE_X_XLIB"
3085
3086    EFL_EVAL_PKGS([ECORE_X])
3087    EFL_CHECK_FUNCS([ECORE_X], [dlopen dlsym])
3088 fi
3089
3090 ## XCB
3091
3092 if test "${want_x11_xcb}" = "yes"; then
3093 dnl note: added pixman-1 as ecore_xcb_region uses that
3094    EFL_DEPEND_PKG([ECORE_X], [ECORE_X_XCB],
3095       [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-xprint xcb-xtest xcb-renderutil pixman-1])
3096
3097 dnl TODO: remove these ifdefs from code!
3098    AC_DEFINE([ECORE_XCB_COMPOSITE], [1], [Build support for XCB composite])
3099    AC_DEFINE([ECORE_XCB_DAMAGE], [1], [Build support for XCB damage])
3100    AC_DEFINE([ECORE_XCB_DPMS], [1], [Build support for XCB dpms])
3101    AC_DEFINE([ECORE_XCB_RANDR], [1], [Build support for XCB randr])
3102    AC_DEFINE([ECORE_XCB_RENDER], [1], [Build support for XCB render])
3103    AC_DEFINE([ECORE_XCB_SCREENSAVER], [1], [Build support for XCB screensaver])
3104    AC_DEFINE([ECORE_XCB_SHAPE], [1], [Build support for XCB shape])
3105    AC_DEFINE([ECORE_XCB_SYNC], [1], [Build support for XCB sync])
3106    AC_DEFINE([ECORE_XCB_XFIXES], [1], [Build support for XCB xfixes])
3107    AC_DEFINE([ECORE_XCB_XINERAMA], [1], [Build support for XCB xinerama])
3108    AC_DEFINE([ECORE_XCB_XPRINT], [1], [Build support for XCB xprint])
3109    AC_DEFINE([ECORE_XCB_XTEST], [1], [Build support for XCB xtest])
3110    AC_DEFINE([ECORE_XCB_CURSOR], [1], [Build support for XCB cursor])
3111
3112    EFL_OPTIONAL_DEPEND_PKG([ECORE_X], [${want_xpresent}], [ECORE_XCB_XPRESENT],
3113       [xcb-present])
3114    AC_DEFINE_IF([ECORE_XCB_XPRESENT], [test "${want_xpresent}" = "yes"],
3115       [1], [Build support for XCB Present])
3116    EFL_ADD_FEATURE([ECORE_X], [xpresent])
3117
3118    EFL_OPTIONAL_DEPEND_PKG([ECORE_X], [${want_gesture}], [ECORE_XCB_GESTURE],
3119       [xcb-gesture])
3120    AC_DEFINE_IF([ECORE_XCB_XGESTURE], [test "${want_gesture}" = "yes"],
3121       [1], [Build support for XCB xgesture])
3122
3123    EFL_ADD_FEATURE([ECORE_X], [gesture])
3124
3125 dnl input extension disabled currently in xcb as xcb-input has some issues
3126 dnl remember to add xcb-xinput to EFL_DEPEND_PKG()
3127 dnl AC_DEFINE([ECORE_XCB_XINPUT], [1], [Build support for XCB input])
3128
3129 dnl dri extension disabled currently in xcb
3130 dnl remember to add xcb-dri2 to EFL_DEPEND_PKG()
3131 dnl AC_DEFINE([ECORE_XCB_DRI], [1], [Build support for XCB dri])
3132
3133    EFL_EVAL_PKGS([ECORE_X])
3134    EFL_CHECK_FUNCS([ECORE_X], [dlopen iconv])
3135
3136    HAVE_ECORE_X_BACKEND="HAVE_ECORE_X_XCB"
3137 fi
3138
3139 EFL_ADD_LIBS([ECORE_X], [${ECORE_X_LIBS}])
3140
3141 AC_SUBST([HAVE_ECORE_X_BACKEND])
3142
3143 EFL_LIB_END_OPTIONAL([Ecore_X])
3144
3145 AM_CONDITIONAL([HAVE_ECORE_X_XLIB], [test "${want_x11_xlib}" = "yes"])
3146 AM_CONDITIONAL([HAVE_ECORE_X_XCB], [test "${want_x11_xcb}" = "yes"])
3147 #### End of Ecore_X
3148
3149
3150 #### Ecore_Imf
3151 EFL_LIB_START([Ecore_Imf])
3152
3153 ### Additional options to configure
3154
3155 ### Default values
3156
3157 want_ecore_imf="yes"
3158 want_ecore_imf_xim="no"
3159 want_ecore_imf_scim="no"
3160 want_ecore_imf_ibus="no"
3161 want_ecore_imf_wayland="no"
3162
3163 if test "${have_wince}" = "yes"; then
3164    want_ecore_imf="no"
3165 else
3166    want_ecore_imf="yes"
3167
3168    if test "${have_windows}" = "no" && test "${have_darwin}" = "no"; then
3169       want_ecore_imf="yes"
3170       want_ecore_imf_xim="yes"
3171       want_ecore_imf_scim="yes"
3172       want_ecore_imf_ibus="yes"
3173       if test "${want_wayland}" = "yes"; then
3174           want_ecore_imf_wayland="yes"
3175       fi
3176    fi
3177 fi
3178
3179 ### Checks for programs
3180
3181 ## Compatibility layers
3182 EFL_PLATFORM_DEPEND([ECORE_IMF], [evil])
3183
3184 ### Checks for libraries
3185 EFL_PLATFORM_DEPEND([ECORE_IMF], [escape])
3186 EFL_INTERNAL_DEPEND_PKG([ECORE_IMF], [ecore])
3187 EFL_INTERNAL_DEPEND_PKG([ECORE_IMF], [ecore-input])
3188 EFL_INTERNAL_DEPEND_PKG([ECORE_IMF], [eo])
3189 EFL_INTERNAL_DEPEND_PKG([ECORE_IMF], [eina])
3190
3191 if test "x${want_ecore_imf}" = "xyes" ; then
3192    AC_DEFINE([HAVE_ECORE_IMF], [1], [Ecore IMF Support])
3193 fi
3194
3195 ## modules
3196
3197 # ibus
3198
3199 have_ecore_imf_ibus="no"
3200 if test "x${want_ibus}" = "xyes" && test "x${want_ecore_imf_ibus}" = "xyes" && test "x${have_glib}" = "xyes" ; then
3201    PKG_CHECK_MODULES([IBUS],
3202       [ibus-1.0 >= 1.4 glib-2.0],
3203       [
3204        have_ecore_imf_ibus="yes"
3205        AC_DEFINE([BUILD_ECORE_IMF_IBUS], [1], [Ecore Imf IBUS Support])
3206       ],
3207       [have_ecore_imf_ibus="no"])
3208 fi
3209
3210 AM_CONDITIONAL([BUILD_ECORE_IMF_IBUS], [test "x${have_ecore_imf_ibus}" = "xyes"])
3211 EFL_ADD_FEATURE([ECORE_IMF], [ibus], [${have_ecore_imf_ibus}])
3212
3213 # scim
3214
3215 have_ecore_imf_scim="no"
3216 if test "x${want_scim}" = "xyes" && test "x${want_ecore_imf_scim}" = "xyes" ; then
3217    PKG_CHECK_MODULES([SCIM],
3218       [scim],
3219       [
3220        have_ecore_imf_scim="yes"
3221        AC_DEFINE([BUILD_ECORE_IMF_SCIM], [1], [Ecore Imf SCIM Support])
3222       ],
3223       [have_ecore_imf_scim="no"])
3224 fi
3225
3226 AM_CONDITIONAL([BUILD_ECORE_IMF_SCIM], [test "x${have_ecore_imf_scim}" = "xyes"])
3227 EFL_ADD_FEATURE([ECORE_IMF], [scim], [${have_ecore_imf_scim}])
3228
3229 # xim
3230
3231 have_ecore_imf_xim="no"
3232 if test "x${want_xim}" = "xyes" && test "x${want_ecore_imf_xim}" = "xyes" ; then
3233
3234  EFL_FIND_X(ecore_imf_xim,
3235    [X11/Xlib.h],
3236    [X11 XOpenIM],
3237    [
3238      have_ecore_imf_xim=yes
3239      AC_DEFINE([ENABLE_XIM], [1], [Enable X Input Method])
3240    ])
3241 fi
3242
3243 AM_CONDITIONAL([BUILD_ECORE_IMF_XIM], [test "x${have_ecore_imf_xim}" = "xyes"])
3244 EFL_ADD_FEATURE([ECORE_IMF], [xim])
3245
3246 # wayland
3247 if test "x${want_ecore_imf_wayland}" = "xyes" ; then
3248    PKG_CHECK_MODULES([WAYLAND],
3249       [wayland-client >= 1.2.0],
3250       [
3251        have_ecore_imf_wayland="yes"
3252        AC_DEFINE([BUILD_ECORE_IMF_WAYLAND], [1], [Ecore Imf Wayland Support])
3253       ],
3254       [have_ecore_imf_wayland="no"])
3255 fi
3256
3257 AM_CONDITIONAL([BUILD_ECORE_IMF_WAYLAND], [test "x${have_ecore_imf_wayland}" = "xyes"])
3258 EFL_ADD_FEATURE([ECORE_IMF], [wayland], [${want_ecore_imf_wayland}])
3259
3260 ### Checks for header files
3261
3262 ### Checks for types
3263
3264 ### Checks for structures
3265
3266 ### Checks for compiler characteristics
3267
3268 ### Checks for linker characteristics
3269
3270 ### Checks for library functions
3271
3272 EFL_LIB_END([Ecore_Imf])
3273 #### End of Ecore_Imf
3274
3275
3276 #### Ecore_Imf_Evas
3277 EFL_LIB_START([Ecore_Imf_Evas])
3278
3279 ### Additional options to configure
3280
3281 ### Default values
3282
3283 ### Checks for programs
3284
3285 ## Compatibility layers
3286 EFL_PLATFORM_DEPEND([ECORE_IMF_EVAS], [evil])
3287
3288 ### Checks for libraries
3289 EFL_PLATFORM_DEPEND([ECORE_IMF_EVAS], [escape])
3290 EFL_INTERNAL_DEPEND_PKG([ECORE_IMF_EVAS], [ecore-imf])
3291 EFL_INTERNAL_DEPEND_PKG([ECORE_IMF_EVAS], [ecore])
3292 EFL_INTERNAL_DEPEND_PKG([ECORE_IMF_EVAS], [evas])
3293 EFL_INTERNAL_DEPEND_PKG([ECORE_IMF_EVAS], [eo])
3294 EFL_INTERNAL_DEPEND_PKG([ECORE_IMF_EVAS], [eina])
3295
3296 ### Checks for header files
3297
3298 ### Checks for types
3299
3300 ### Checks for structures
3301
3302 ### Checks for compiler characteristics
3303
3304 ### Checks for linker characteristics
3305
3306 ### Checks for library functions
3307
3308 EFL_LIB_END([Ecore_Imf_Evas])
3309 #### End of Ecore_Imf_Evas
3310
3311
3312 #### Eeze
3313 have_libmount_new="no"
3314 have_libmount_old="no"
3315 have_eeze_mount="no"
3316
3317 EFL_LIB_START_OPTIONAL([Eeze], [test "${have_linux}" = "yes"])
3318
3319 ### Additional options to configure
3320 AC_ARG_WITH([mount],
3321   [AS_HELP_STRING([--with-mount], [specify mount bin @<:@default=detect@:>@])],
3322   [with_eeze_mount=$withval], [with_eeze_mount="detect"])
3323 AC_ARG_WITH([umount],
3324   [AS_HELP_STRING([--with-umount], [specify umount bin @<:@default=detect@:>@])],
3325   [with_eeze_umount=$withval], [with_eeze_umount="detect"])
3326 AC_ARG_WITH([eject],
3327   [AS_HELP_STRING([--with-eject], [specify eject bin @<:@default=detect@:>@])],
3328   [with_eeze_eject=$withval], [with_eeze_eject="detect"])
3329
3330 ### Default values
3331
3332 ### Checks for programs
3333
3334 ### Checks for libraries
3335 EFL_INTERNAL_DEPEND_PKG([EEZE], [eina])
3336 EFL_INTERNAL_DEPEND_PKG([EEZE], [ecore])
3337 EFL_INTERNAL_DEPEND_PKG([EEZE], [eo])
3338 EFL_INTERNAL_DEPEND_PKG([EEZE], [ecore-file])
3339 EFL_INTERNAL_DEPEND_PKG([EEZE], [ecore-con])
3340 EFL_INTERNAL_DEPEND_PKG([EEZE], [eet])
3341
3342 EFL_DEPEND_PKG([EEZE], [UDEV], [libudev >= 148])
3343
3344 AC_ARG_ENABLE([libmount],
3345    [AC_HELP_STRING([--disable-libmount],
3346        [disable libmount support. @<:@default=enabled@:>@])],
3347    [
3348     if test "x${enableval}" = "xyes" ; then
3349        want_libmount="yes"
3350     else
3351        want_libmount="no"
3352        CFOPT_WARNING="xyes"
3353     fi
3354    ],
3355    [want_libmount="yes"])
3356
3357 EFL_OPTIONAL_DEPEND_PKG([EEZE], [${want_libmount}],
3358    [EEZE_MOUNT], [mount >= 2.18.0])
3359 EFL_ADD_FEATURE([EEZE], [libmount], [${have_eeze_mount}])
3360
3361 PKG_CHECK_EXISTS([mount < 2.19.0],
3362                  [have_libmount_old="yes"],
3363                  [have_libmount_old="no"])
3364 AC_MSG_CHECKING([Use old libmount API (before 2.19.0)])
3365 AC_MSG_RESULT([${have_libmount_old}])
3366
3367 PKG_CHECK_EXISTS([mount == 2.19.0],
3368                  [have_libmount_219="yes"],
3369                  [have_libmount_219="no"])
3370 AC_MSG_CHECKING([Use libmount 2.19.0 API])
3371 AC_MSG_RESULT([${have_libmount_219}])
3372
3373 PKG_CHECK_EXISTS([mount > 2.19.0],
3374                  [have_libmount_new="yes"],
3375                  [have_libmount_new="no"])
3376 AC_MSG_CHECKING([Use new libmount API (newer than 2.19.0)])
3377 AC_MSG_RESULT([${have_libmount_new}])
3378
3379 if test "x${have_libmount_old}" = "xyes"; then
3380   AC_DEFINE_UNQUOTED([OLD_LIBMOUNT], [1], [using first version of libmount])
3381 fi
3382
3383 ## modules
3384 if test "${want_tizen}"  = "yes"; then
3385   PKG_CHECK_MODULES([TIZEN_SENSOR], [capi-system-sensor >= 0.1.17])
3386 fi
3387 EFL_ADD_FEATURE([EEZE], [tizen])
3388
3389 EFL_EVAL_PKGS([EEZE])
3390
3391 ### Checks for header files
3392
3393 ### Checks for types
3394
3395 ### Checks for structures
3396
3397 ### Checks for compiler characteristics
3398
3399 ### Checks for linker characteristics
3400
3401 ### Checks for library functions
3402
3403 ### Checks for binaries
3404 if test "x$with_eeze_mount" = "xdetect"; then
3405   AC_PATH_PROG([with_eeze_mount], [mount], [])
3406 fi
3407 AC_DEFINE_UNQUOTED([EEZE_MOUNT_BIN], ["$with_eeze_mount"], [mount bin to use])
3408
3409 if test "x$with_eeze_umount" = "xdetect";then
3410   AC_PATH_PROG([with_eeze_umount], [umount], [])
3411 fi
3412 AC_DEFINE_UNQUOTED([EEZE_UNMOUNT_BIN], ["$with_eeze_umount"], [umount bin to use])
3413
3414 if test "x$with_eeze_eject" = "xdetect";then
3415   AC_PATH_PROG([with_eeze_eject], [eject], [])
3416 fi
3417 AC_DEFINE_UNQUOTED([EEZE_EJECT_BIN], ["$with_eeze_eject"], [eject bin to use])
3418
3419 EFL_LIB_END_OPTIONAL([Eeze])
3420
3421 AM_CONDITIONAL([EEZE_LIBMOUNT_AFTER_219],
3422                [test "x${have_libmount_new}" = "xyes"])
3423 AM_CONDITIONAL([EEZE_LIBMOUNT_BEFORE_219],
3424                [test "x${have_libmount_old}" = "xyes"])
3425 AM_CONDITIONAL([HAVE_EEZE_MOUNT], [test "x${have_eeze_mount}" = "xyes"])
3426 AM_CONDITIONAL([HAVE_EEZE_TIZEN], [test "x${want_tizen}" = "xyes"])
3427 #### End of Eeze
3428
3429
3430 #### Ecore_Evas
3431 EFL_LIB_START([Ecore_Evas])
3432
3433 ### Additional options to configure
3434
3435 ### Default values
3436
3437 want_ecore_evas_software_gdi="${have_evas_engine_software_gdi}"
3438 want_ecore_evas_software_ddraw="${have_evas_engine_software_ddraw}"
3439 want_ecore_evas_gl_cocoa="${have_evas_engine_gl_cocoa}"
3440 want_ecore_evas_wayland_egl="${have_evas_engine_wayland_egl}"
3441 want_ecore_evas_extn="yes"
3442 want_ecore_evas_drm="${have_evas_engine_drm}"
3443
3444 if test "x${have_ecore_ipc}" = "xno" || \
3445    test "x${efl_func_shm_open}" = "xno" || \
3446    test "x${have_windows}" = "xyes" ; then
3447    want_ecore_evas_extn="no"
3448 fi
3449
3450 ### Checks for programs
3451
3452 ## Compatibility layers
3453 EFL_PLATFORM_DEPEND([ECORE_EVAS], [evil])
3454
3455 ### Checks for libraries
3456 EFL_INTERNAL_DEPEND_PKG([ECORE_EVAS], [ecore-input-evas])
3457 EFL_INTERNAL_DEPEND_PKG([ECORE_EVAS], [ecore-input])
3458 EFL_INTERNAL_DEPEND_PKG([ECORE_EVAS], [ecore])
3459 EFL_INTERNAL_DEPEND_PKG([ECORE_EVAS], [evas])
3460 EFL_INTERNAL_DEPEND_PKG([ECORE_EVAS], [eo])
3461 EFL_INTERNAL_DEPEND_PKG([ECORE_EVAS], [eina])
3462
3463 ## modules
3464 ECORE_EVAS_MODULE([extn], [${want_ecore_evas_extn}])
3465 ECORE_EVAS_MODULE([ews], [yes])
3466 ECORE_EVAS_MODULE([fb], [${want_fb}])
3467 ECORE_EVAS_MODULE([drm], [${want_drm}], 
3468   [ EFL_OPTIONAL_INTERNAL_DEPEND_PKG([ECORE_EVAS], [${want_drm}], [ecore-drm]) ]
3469 )
3470 ECORE_EVAS_MODULE([psl1ght], [${have_ps3}])
3471
3472 ECORE_EVAS_MODULE([opengl-cocoa], [${want_ecore_evas_gl_cocoa}])
3473
3474 ECORE_EVAS_MODULE([software-sdl], [${want_sdl}])
3475 ECORE_EVAS_MODULE([opengl-sdl], [${want_gl_sdl}])
3476
3477 build_ecore_evas_sdl="no"
3478 if test "x${have_ecore_evas_software_sdl}" = "xyes" || \
3479    test "x${have_ecore_evas_opengl_sdl}" = "xyes" ; then
3480    build_ecore_evas_sdl="yes"
3481    AC_DEFINE(BUILD_ECORE_EVAS_SDL, 1, [Support for SDL Engine in Ecore_Evas])
3482 fi
3483 AM_CONDITIONAL([BUILD_ECORE_EVAS_SDL],
3484    [test "${build_ecore_evas_sdl}" = "yes"])
3485
3486 ECORE_EVAS_MODULE([wayland-shm], [${want_wayland}])
3487 ECORE_EVAS_MODULE([wayland-egl], [${want_ecore_evas_wayland_egl}])
3488
3489 build_ecore_evas_wayland="no"
3490 if test "x${have_ecore_evas_wayland_shm}" = "xyes" || \
3491    test "x${have_ecore_evas_wayland_egl}" = "xyes" ; then
3492    build_ecore_evas_wayland="yes"
3493    AC_DEFINE(BUILD_ECORE_EVAS_WAYLAND, 1, [Support for Wayland Engine in Ecore_Evas])
3494 fi
3495 AM_CONDITIONAL([BUILD_ECORE_EVAS_WAYLAND],
3496    [test "${build_ecore_evas_wayland}" = "yes"])
3497
3498 ECORE_EVAS_MODULE([software-gdi], [${want_ecore_evas_software_gdi}])
3499 ECORE_EVAS_MODULE([software-ddraw], [${want_ecore_evas_software_ddraw}])
3500
3501 build_ecore_evas_win32="no"
3502 if test "x${have_ecore_evas_software_gdi}" = "xyes" || \
3503    test "x${have_ecore_evas_software_ddraw}" = "xyes" ; then
3504    build_ecore_evas_win32="yes"
3505    AC_DEFINE(BUILD_ECORE_EVAS_WIN32, 1, [Support for Win32 Engine in Ecore_Evas])
3506 fi
3507 AM_CONDITIONAL([BUILD_ECORE_EVAS_WIN32],
3508    [test "${build_ecore_evas_win32}" = "yes"])
3509
3510
3511 # XXX TODO: ecore_evas_x11
3512
3513 ECORE_EVAS_MODULE([software-x11], [${want_x11_any}])
3514
3515 have_ecore_evas_software_xlib="no"
3516 have_ecore_evas_software_xcb="no"
3517 if test "x$have_ecore_evas_software_x11" = "xyes" ; then
3518    have_ecore_evas_software_xlib=${have_evas_engine_software_xlib}
3519    if test "x${have_ecore_evas_software_xlib}" = "xstatic"; then
3520       have_ecore_evas_software_xlib="yes"
3521    fi
3522    if test "x${have_ecore_evas_software_xlib}" = "xyes"; then
3523       AC_DEFINE([BUILD_ECORE_EVAS_SOFTWARE_XLIB], [1], [Evas Software Xlib Engine Support])
3524    fi
3525    have_ecore_evas_software_xcb=${have_evas_engine_software_xcb}
3526    if test "x$have_ecore_evas_software_xcb" = "xstatic"; then
3527       have_ecore_evas_software_xcb="yes"
3528    fi
3529    if test "x$have_ecore_evas_software_xcb" = "xyes"; then
3530       AC_DEFINE([BUILD_ECORE_EVAS_SOFTWARE_XCB], [1], [Evas Software XCB Engine Support])
3531    fi
3532 fi
3533
3534 # XXX TODO: ecore_evas_opengl_x11
3535
3536 ECORE_EVAS_MODULE([opengl-x11], [${want_x11_any_opengl}])
3537
3538 have_ecore_evas_opengl_xlib="no"
3539 have_ecore_evas_opengl_xcb="no"
3540 if test "x${have_ecore_evas_opengl_x11}" = "xyes" || test "x${have_ecore_evas_opengl_x11}" = "xstatic" ; then
3541    have_ecore_evas_opengl_xlib=${have_evas_engine_gl_xlib}
3542    if test "x${have_ecore_evas_opengl_xlib}" = "xyes" ; then
3543       AC_DEFINE([BUILD_ECORE_EVAS_OPENGL_XLIB], [1], [OpenGL Xlib rendering backend])
3544    fi
3545
3546 # opengl does not work with xcb (yet)
3547    have_ecore_evas_opengl_xcb=${have_evas_engine_gl_xcb}
3548    if test "x${have_ecore_evas_opengl_xcb}" = "xstatic"; then
3549       have_ecore_evas_opengl_xcb="yes"
3550    fi
3551    if test "x${have_ecore_evas_opengl_xcb}" = "xyes"; then
3552       PKG_CHECK_MODULES([XCB_X11],
3553          [x11-xcb],
3554          [
3555           have_ecore_x_opengl_xcb="yes"
3556           requirements_ecore_x="x11-xcb ${requirements_ecore_x}"
3557           AC_DEFINE([BUILD_ECORE_X_OPENGL_XCB], [1], [Build support for XCB-based OpenGL])
3558           AC_DEFINE([BUILD_ECORE_EVAS_OPENGL_XCB], [1], [OpenGL XCB rendering backend])
3559          ],
3560          [have_ecore_x_opengl_xcb="no"])
3561     else
3562       have_ecore_x_opengl_xcb="no"
3563       AC_MSG_NOTICE(["XCB-based OpenGL explicitly disabled"])
3564     fi
3565 fi
3566
3567 build_ecore_evas_x11="no"
3568 if test "x$have_ecore_evas_software_x11" = "xyes" || \
3569    test "x$have_ecore_evas_opengl_x11" = "xyes" || \
3570    test "x$have_ecore_evas_software_xcb" = "xyes"; then
3571    AC_DEFINE([BUILD_ECORE_EVAS_X11], [1], [Support for X Window Engines in Ecore_Evas])
3572    build_ecore_evas_x11="yes"
3573 fi
3574 AM_CONDITIONAL([BUILD_ECORE_EVAS_X11], [test "${build_ecore_evas_x11}" = "yes"])
3575
3576 EFL_EVAL_PKGS([ECORE_EVAS])
3577
3578 ### Checks for header files
3579
3580 ### Checks for types
3581
3582 ### Checks for structures
3583
3584 ### Checks for compiler characteristics
3585
3586 ### Checks for linker characteristics
3587
3588 ### Checks for library functions
3589
3590 EFL_LIB_END([Ecore_Evas])
3591 #### End of Ecore_Evas
3592
3593 #### Eio
3594 EFL_LIB_START([Eio])
3595
3596 ### Additional options to configure
3597
3598 ### Default values
3599
3600 ### Checks for programs
3601
3602 ## Compatibility layers
3603 EFL_PLATFORM_DEPEND([EIO], [evil])
3604
3605 ### Checks for libraries
3606 EFL_INTERNAL_DEPEND_PKG([EIO], [ecore])
3607 EFL_INTERNAL_DEPEND_PKG([EIO], [eet])
3608 EFL_INTERNAL_DEPEND_PKG([EIO], [eo])
3609 EFL_INTERNAL_DEPEND_PKG([EIO], [eina])
3610
3611 EFL_ADD_LIBS([EIO], [-lm])
3612
3613 ### Checks for header files
3614
3615 ### Checks for types
3616
3617 ### Checks for structures
3618
3619 ### Checks for compiler characteristics
3620
3621 ### Checks for linker characteristics
3622
3623 ### Checks for library functions
3624
3625 EFL_LIB_END([Eio])
3626 dnl TODO: remove these ifdefs from code!
3627 AC_DEFINE([HAVE_EIO], [1], [Have eio library])
3628 #### End of Eio
3629
3630 # Eo Id
3631 if test "x${want_eo_id}" = "xyes" ; then
3632    AC_DEFINE([HAVE_EO_ID], [1], [Have eo id])
3633 fi
3634
3635 #### Eldbus
3636 EFL_LIB_START([Eldbus])
3637
3638 ### Additional options to configure
3639
3640 ### Default values
3641
3642 ### Checks for programs
3643
3644 ## Compatibility layers
3645 EFL_PLATFORM_DEPEND([ELDBUS], [evil])
3646
3647 ### Checks for libraries
3648 EFL_INTERNAL_DEPEND_PKG([ELDBUS], [ecore])
3649 EFL_INTERNAL_DEPEND_PKG([ELDBUS], [eo])
3650 EFL_INTERNAL_DEPEND_PKG([ELDBUS], [eina])
3651
3652 EFL_DEPEND_PKG([ELDBUS], [DBUS], [dbus-1])
3653
3654 EFL_EVAL_PKGS([ELDBUS])
3655
3656 ### Checks for header files
3657
3658 ### Checks for types
3659
3660 ### Checks for structures
3661
3662 ### Checks for compiler characteristics
3663
3664 ### Checks for linker characteristics
3665
3666 ### Checks for library functions
3667
3668 EFL_LIB_END([Eldbus])
3669 #### End of Eldbus
3670
3671
3672 #### Efreet
3673 EFL_LIB_START([Efreet])
3674
3675 ### Additional options to configure
3676
3677 ### Default values
3678
3679 AC_DEFINE([SLOPPY_SPEC], [1], [Sloppy Spec Compliance])
3680
3681 ### Checks for programs
3682
3683 ## Compatibility layers
3684 EFL_PLATFORM_DEPEND([EFREET], [evil])
3685
3686 ### Checks for libraries
3687 EFL_INTERNAL_DEPEND_PKG([EFREET], [eet])
3688 EFL_INTERNAL_DEPEND_PKG([EFREET], [ecore])
3689 EFL_INTERNAL_DEPEND_PKG([EFREET], [ecore-file])
3690 EFL_INTERNAL_DEPEND_PKG([EFREET], [eldbus])
3691 EFL_INTERNAL_DEPEND_PKG([EFREET], [eo])
3692 EFL_INTERNAL_DEPEND_PKG([EFREET], [eina])
3693
3694 ### Checks for header files
3695
3696 ### Checks for types
3697
3698 ### Checks for structures
3699
3700 ### Checks for compiler characteristics
3701
3702 ### Checks for linker characteristics
3703
3704 ### Checks for library functions
3705
3706 EFL_LIB_END([Efreet])
3707 #### End of Efreet
3708
3709
3710 #### EPhysics
3711 AC_ARG_ENABLE([physics],
3712    [AC_HELP_STRING([--disable-physics],
3713        [disable physics effects and support. @<:@default=enabled@:>@])],
3714    [
3715     if test "x${enableval}" = "xyes" ; then
3716        want_physics="yes"
3717     else
3718        CFOPT_WARNING="xyes"
3719        want_physics="no"
3720     fi
3721    ],
3722    [want_physics="yes"])
3723
3724 EFL_LIB_START_OPTIONAL([EPhysics], [test "${want_physics}" = "yes"])
3725
3726 ### Additional options to configure
3727
3728 ### Default values
3729
3730 ### Checks for programs
3731
3732 ### Checks for libraries
3733 EFL_PLATFORM_DEPEND([EPHYSICS], [evil])
3734
3735 EFL_INTERNAL_DEPEND_PKG([EPHYSICS], [eina])
3736 EFL_INTERNAL_DEPEND_PKG([EPHYSICS], [evas])
3737 EFL_INTERNAL_DEPEND_PKG([EPHYSICS], [ecore])
3738 EFL_INTERNAL_DEPEND_PKG([EPHYSICS], [eo])
3739
3740 EFL_DEPEND_PKG([EPHYSICS], [BULLET], [bullet >= 2.80])
3741
3742 EFL_EVAL_PKGS([EPHYSICS])
3743
3744 ### Checks for header files
3745
3746 ### Checks for types
3747
3748 ### Checks for structures
3749
3750 ### Checks for compiler characteristics
3751
3752 ### Checks for linker characteristics
3753
3754 ### Checks for library functions
3755
3756 EFL_LIB_END_OPTIONAL([EPhysics])
3757 #### End of EPhysics
3758
3759
3760 #### Edje
3761 EFL_LIB_START([Edje])
3762
3763 ### Additional options to configure
3764
3765 ### Default values
3766 want_multisense="no" # TODO: move to ecore_audio and enable
3767 AC_ARG_ENABLE([multisense],
3768    [AC_HELP_STRING([--enable-multisense],
3769        [Enable multisense support. @<:@default=disabled@:>@])],
3770    [
3771     if test "x${enableval}" = "xyes" ; then
3772        want_multisense="yes"
3773     else
3774        want_multisense="no"
3775     fi
3776    ],
3777    [want_multisense="no"])
3778
3779 want_lua_old="no"
3780 AC_ARG_ENABLE([lua-old],
3781    [AC_HELP_STRING([--enable-lua-old],
3782        [Enable interpreted Lua support (5.1 or 5.2). @<:@default=disabled@:>@])],
3783    [
3784     if test "x${enableval}" = "xyes" ; then
3785        want_lua_old="yes"
3786     else
3787        want_lua_old="no"
3788     fi
3789    ],
3790    [want_lua_old="no"])
3791
3792 # TODO: should we keep or remove these?
3793 want_edje_program_cache="no"
3794 want_edje_calc_cache="yes"
3795 want_fixed_point="no"
3796
3797 ### Checks for programs
3798
3799 ### Checks for libraries
3800 EFL_PLATFORM_DEPEND([EDJE], [evil])
3801
3802 EFL_INTERNAL_DEPEND_PKG([EDJE], [eina])
3803 EFL_INTERNAL_DEPEND_PKG([EDJE], [eo])
3804 EFL_INTERNAL_DEPEND_PKG([EDJE], [eet])
3805 EFL_INTERNAL_DEPEND_PKG([EDJE], [evas])
3806 EFL_INTERNAL_DEPEND_PKG([EDJE], [ecore])
3807 EFL_INTERNAL_DEPEND_PKG([EDJE], [ecore-evas])
3808 EFL_INTERNAL_DEPEND_PKG([EDJE], [ecore-file])
3809 EFL_INTERNAL_DEPEND_PKG([EDJE], [ecore-input])
3810 EFL_INTERNAL_DEPEND_PKG([EDJE], [ecore-imf])
3811 EFL_INTERNAL_DEPEND_PKG([EDJE], [ecore-imf-evas])
3812 EFL_INTERNAL_DEPEND_PKG([EDJE], [embryo])
3813 EFL_INTERNAL_DEPEND_PKG([EDJE], [eio])
3814
3815 EFL_OPTIONAL_INTERNAL_DEPEND_PKG([EDJE], [${want_physics}], [ephysics])
3816 EFL_OPTIONAL_INTERNAL_DEPEND_PKG([EDJE], [${want_multisense}], [ecore-audio])
3817
3818 EFL_ADD_FEATURE([EDJE], [physics])
3819 EFL_ADD_FEATURE([EDJE], [multisense])
3820 EFL_ADD_FEATURE([EDJE], [lua-old])
3821
3822 if test "${want_lua_old}" = "yes"; then
3823    EFL_CHECK_LUA_OLD([EDJE])
3824 else
3825    EFL_DEPEND_PKG([EDJE], [LUAJIT], [luajit >= 2.0.0])
3826 fi
3827
3828 EFL_ADD_LIBS([EDJE], [-lm])
3829
3830 EFL_EVAL_PKGS([EDJE])
3831
3832 AC_DEFINE_IF([EDJE_PROGRAM_CACHE], [test "${want_edje_program_cache}" = "yes"],
3833    [1], [Cache result of program glob matches])
3834 AC_DEFINE_IF([EDJE_CALC_CACHE], [test "${want_edje_calc_cache}" = "yes"],
3835    [1], [Cache result of calc glob matches])
3836 AC_DEFINE_IF([BUILD_EDJE_FP], [test "${want_fixed_point}" = "yes"],
3837    [1], [Use Fixed Point instead of FPU])
3838
3839 AM_CONDITIONAL([ENABLE_MULTISENSE], [test "${want_multisense}" = "yes"])
3840 AC_DEFINE_IF([ENABLE_MULTISENSE], [test "${want_multisense}" = "yes"],
3841   [1], [Use Multisense])
3842 AC_SUBST([want_multisense])
3843 AM_CONDITIONAL([ENABLE_LUA_OLD], [test "${want_lua_old}" = "yes"])
3844 AC_DEFINE_IF([ENABLE_LUA_OLD], [test "${want_lua_old}" = "yes"],
3845   [1], [Use interpreted Lua (5.1 or 5.2)])
3846 AC_SUBST([want_lua_old])
3847 AC_SUBST([want_physics])
3848
3849 ### Checks for header files
3850
3851 AC_CHECK_HEADERS([ \
3852 sys/wait.h \
3853 ])
3854
3855 ### Checks for types
3856
3857 ### Checks for structures
3858
3859 ### Checks for compiler characteristics
3860
3861 ### Checks for linker characteristics
3862
3863 ### Checks for library functions
3864
3865 EFL_LIB_END([Edje])
3866 #### End of Edje
3867
3868 #### Emotion
3869 EFL_LIB_START([Emotion])
3870
3871 ## Compatibility layers
3872 EFL_PLATFORM_DEPEND([Emotion], [evil])
3873
3874 ### Default values
3875 if test "${efl_func_shm_open}" = "yes"; then
3876    want_emotion_generic="static"
3877 else
3878    want_emotion_generic="no"
3879 fi
3880
3881 ### Additional options to configure
3882 AC_ARG_ENABLE([xine],
3883    [AC_HELP_STRING([--enable-xine],
3884                    [enable xine support. @<:@default=disabled@:>@])],
3885    [
3886     if test "x${enableval}" = "xyes" ; then
3887        want_xine="yes"
3888     else
3889        want_xine="no"
3890     fi
3891    ],
3892    [want_xine="no"])
3893
3894 AC_ARG_ENABLE([v4l2],
3895    [AC_HELP_STRING([--enable-v4l2], [enable v4l2 support.])],
3896    [
3897     if test "x${enableval}" = "xyes" ; then
3898        want_v4l2="yes"
3899     else
3900        want_v4l2="no"
3901     fi
3902    ],
3903    [want_v4l2="${efl_lib_optional_eeze}"])
3904
3905 ### Checks for programs
3906
3907 ### Checks for libraries
3908 EFL_INTERNAL_DEPEND_PKG([EMOTION], [eina])
3909 EFL_INTERNAL_DEPEND_PKG([EMOTION], [eo])
3910 EFL_INTERNAL_DEPEND_PKG([EMOTION], [ecore])
3911 EFL_INTERNAL_DEPEND_PKG([EMOTION], [eet])
3912 EFL_INTERNAL_DEPEND_PKG([EMOTION], [evas])
3913 EFL_INTERNAL_DEPEND_PKG([EMOTION], [eio])
3914
3915 EFL_OPTIONAL_INTERNAL_DEPEND_PKG([EMOTION], [${efl_lib_optional_eeze}], [eeze])
3916 EFL_ADD_FEATURE([EMOTION], [v4l2])
3917
3918 ## modules
3919
3920 have_gst_xoverlay="no"
3921
3922 EMOTION_MODULE([xine], [${want_xine}])
3923 EMOTION_MODULE([gstreamer], [${want_gstreamer}])
3924 EMOTION_MODULE([gstreamer1], [${want_gstreamer1}])
3925 EMOTION_MODULE([generic], [${want_emotion_generic}])
3926
3927 EFL_ADD_FEATURE([EMOTION], [xine])
3928 EFL_ADD_FEATURE([EMOTION], [gstreamer])
3929 EFL_ADD_FEATURE([EMOTION], [gstreamer1])
3930 EFL_ADD_FEATURE([EMOTION], [generic], [${want_emotion_generic}])
3931
3932 EFL_EVAL_PKGS([EMOTION])
3933
3934 ### Checks for header files
3935
3936 ### Checks for types
3937
3938 ### Checks for structures
3939
3940 ### Checks for compiler characteristics
3941
3942 ### Checks for linker characteristics
3943
3944 ### Checks for library functions
3945
3946 if test "${want_v4l2}" = "yes"; then
3947    AC_CHECK_DECL([V4L2_CAP_VIDEO_CAPTURE],
3948       [AC_DEFINE([HAVE_V4L2], [1], [Define to 1 if you have Video4Linux 2 available])],
3949       [AC_MSG_ERROR([Video4Linux 2 desired but not found. See --disable-v4l2.])],
3950       [#include <linux/videodev2.h>])
3951 fi
3952
3953 ### Check availability
3954
3955 EFL_LIB_END([Emotion])
3956 #### End of Emotion
3957
3958
3959 #### Ethumb
3960 EFL_LIB_START([Ethumb])
3961
3962 ### Default values
3963
3964 ### Additional options to configure
3965
3966 ### Checks for programs
3967
3968 ## Compatibility layers
3969 EFL_PLATFORM_DEPEND([ETHUMB], [evil])
3970
3971 ### Checks for libraries
3972 EFL_PLATFORM_DEPEND([EINA], [evil])
3973
3974 EFL_INTERNAL_DEPEND_PKG([ETHUMB], [eina])
3975 EFL_INTERNAL_DEPEND_PKG([ETHUMB], [evas])
3976 EFL_INTERNAL_DEPEND_PKG([ETHUMB], [eo])
3977 EFL_INTERNAL_DEPEND_PKG([ETHUMB], [ecore])
3978 EFL_INTERNAL_DEPEND_PKG([ETHUMB], [ecore-evas])
3979 EFL_INTERNAL_DEPEND_PKG([ETHUMB], [ecore-file])
3980 EFL_INTERNAL_DEPEND_PKG([ETHUMB], [ecore-imf])
3981 EFL_INTERNAL_DEPEND_PKG([ETHUMB], [edje])
3982
3983 ## modules
3984
3985 EFL_EVAL_PKGS([ETHUMB])
3986
3987 ### Checks for header files
3988
3989 ### Checks for types
3990
3991 ### Checks for structures
3992
3993 ### Checks for compiler characteristics
3994
3995 ### Checks for linker characteristics
3996
3997 ### Checks for library functions
3998
3999 ### Check availability
4000
4001 EFL_LIB_END([Ethumb])
4002 #### End of Ethumb
4003
4004 #### Ethumb_Client
4005 EFL_LIB_START([Ethumb_Client])
4006
4007 ### Default values
4008
4009 ### Additional options to configure
4010
4011 ### Checks for programs
4012
4013 ## Compatibility layers
4014 EFL_PLATFORM_DEPEND([ETHUMB_CLIENT], [evil])
4015
4016 ### Checks for libraries
4017 EFL_INTERNAL_DEPEND_PKG([ETHUMB_CLIENT], [eina])
4018 EFL_INTERNAL_DEPEND_PKG([ETHUMB_CLIENT], [eo])
4019 EFL_INTERNAL_DEPEND_PKG([ETHUMB_CLIENT], [ecore])
4020 EFL_INTERNAL_DEPEND_PKG([ETHUMB_CLIENT], [edje])
4021 EFL_INTERNAL_DEPEND_PKG([ETHUMB_CLIENT], [eldbus])
4022 EFL_INTERNAL_DEPEND_PKG([ETHUMB_CLIENT], [ethumb])
4023 EFL_INTERNAL_DEPEND_PKG([ETHUMB_CLIENT], [evas])
4024
4025 EFL_EVAL_PKGS([ETHUMB_CLIENT])
4026
4027 ### Checks for header files
4028
4029 ### Checks for types
4030
4031 ### Checks for structures
4032
4033 ### Checks for compiler characteristics
4034
4035 ### Checks for linker characteristics
4036
4037 ### Checks for library functions
4038
4039 ### Check availability
4040
4041 EFL_LIB_END([Ethumb_Client])
4042 #### End of Ethumb_Client
4043
4044
4045 AC_ARG_ENABLE([always-build-examples],
4046    [AC_HELP_STRING([--enable-always-build-examples],
4047        [always build examples. @<:@default=disabled@:>@])],
4048    [
4049     if test "x${enableval}" = "xyes" ; then
4050        want_always_build_examples="yes"
4051     else
4052        want_always_build_examples="no"
4053     fi
4054    ],
4055    [want_always_build_examples="no"])
4056 AM_CONDITIONAL([ALWAYS_BUILD_EXAMPLES], [test "${want_always_build_examples}" = "yes"])
4057
4058 BARF_OK="xno"
4059 # Harfbuzz
4060 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-aaa],
4061    [ You will be told when this is needed ],
4062    [
4063     if test "x${enableval}" = "xyes" ; then
4064        BARF_OK=""
4065     else
4066        BARF_OK="xno"
4067     fi
4068    ],
4069    [ BARF_OK="xno" ])
4070
4071
4072 AC_CONFIG_FILES([
4073 Makefile
4074 data/Makefile
4075 doc/Makefile
4076 doc/Doxyfile
4077 doc/previews/Makefile
4078 src/Makefile
4079 src/benchmarks/eina/Makefile
4080 src/benchmarks/eo/Makefile
4081 src/examples/eina/Makefile
4082 src/examples/eina_cxx/Makefile
4083 src/examples/eet/Makefile
4084 src/examples/eo/Makefile
4085 src/examples/evas/Makefile
4086 src/examples/ecore/Makefile
4087 src/examples/ecore_avahi/Makefile
4088 src/examples/eio/Makefile
4089 src/examples/eldbus/Makefile
4090 src/examples/ephysics/Makefile
4091 src/examples/edje/Makefile
4092 src/examples/emotion/Makefile
4093 src/examples/ethumb_client/Makefile
4094 src/lib/eina/eina_config.h
4095 src/lib/ecore_x/ecore_x_version.h
4096 src/lib/efl/Efl_Config.h
4097 spec/efl.spec
4098 pc/evil.pc
4099 pc/escape.pc
4100 pc/eina.pc
4101 pc/eina-cxx.pc
4102 pc/eet.pc
4103 pc/eet-cxx.pc
4104 pc/eo.pc
4105 pc/eolian.pc
4106 pc/evas-fb.pc
4107 pc/evas-opengl-x11.pc
4108 pc/evas-opengl-sdl.pc
4109 pc/evas-opengl-cocoa.pc
4110 pc/evas-psl1ght.pc
4111 pc/evas-software-buffer.pc
4112 pc/evas-software-x11.pc
4113 pc/evas-software-gdi.pc
4114 pc/evas-software-ddraw.pc
4115 pc/evas-software-sdl.pc
4116 pc/evas-wayland-shm.pc
4117 pc/evas-wayland-egl.pc
4118 pc/evas-drm.pc
4119 pc/evas.pc
4120 pc/ecore.pc
4121 pc/ecore-con.pc
4122 pc/ecore-ipc.pc
4123 pc/ecore-file.pc
4124 pc/ecore-input.pc
4125 pc/ecore-input-evas.pc
4126 pc/ecore-cocoa.pc
4127 pc/ecore-drm.pc
4128 pc/ecore-fb.pc
4129 pc/ecore-psl1ght.pc
4130 pc/ecore-sdl.pc
4131 pc/ecore-wayland.pc
4132 pc/ecore-win32.pc
4133 pc/ecore-wince.pc
4134 pc/ecore-x.pc
4135 pc/ecore-evas.pc
4136 pc/ecore-imf.pc
4137 pc/ecore-imf-evas.pc
4138 pc/ecore-audio.pc
4139 pc/ecore-avahi.pc
4140 pc/embryo.pc
4141 pc/eio.pc
4142 pc/eldbus.pc
4143 pc/efreet.pc
4144 pc/efreet-mime.pc
4145 pc/efreet-trash.pc
4146 pc/eeze.pc
4147 pc/ephysics.pc
4148 pc/edje.pc
4149 pc/emotion.pc
4150 pc/ethumb.pc
4151 pc/ethumb_client.pc
4152 dbus-services/org.enlightenment.Efreet.service
4153 dbus-services/org.enlightenment.Ethumb.service
4154 systemd-services/efreet.service
4155 systemd-services/ethumb.service
4156 $po_makefile_in
4157 cmakeconfig/EinaConfig.cmake
4158 cmakeconfig/EinaConfigVersion.cmake:cmakeconfig/EFLConfigVersion.cmake.in
4159 cmakeconfig/EezeConfig.cmake
4160 cmakeconfig/EezeConfigVersion.cmake:cmakeconfig/EFLConfigVersion.cmake.in
4161 cmakeconfig/EoConfig.cmake
4162 cmakeconfig/EoConfigVersion.cmake:cmakeconfig/EFLConfigVersion.cmake.in
4163 cmakeconfig/EetConfig.cmake
4164 cmakeconfig/EetConfigVersion.cmake:cmakeconfig/EFLConfigVersion.cmake.in
4165 cmakeconfig/EvasConfig.cmake
4166 cmakeconfig/EvasConfigVersion.cmake:cmakeconfig/EFLConfigVersion.cmake.in
4167 cmakeconfig/EcoreConfig.cmake
4168 cmakeconfig/EcoreConfigVersion.cmake:cmakeconfig/EFLConfigVersion.cmake.in
4169 cmakeconfig/EdjeConfig.cmake
4170 cmakeconfig/EdjeConfigVersion.cmake:cmakeconfig/EFLConfigVersion.cmake.in
4171 cmakeconfig/EldbusConfig.cmake
4172 cmakeconfig/EldbusConfigVersion.cmake:cmakeconfig/EFLConfigVersion.cmake.in
4173 cmakeconfig/EfreetConfig.cmake
4174 cmakeconfig/EfreetConfigVersion.cmake:cmakeconfig/EFLConfigVersion.cmake.in
4175 cmakeconfig/EthumbConfig.cmake
4176 cmakeconfig/EthumbConfigVersion.cmake:cmakeconfig/EFLConfigVersion.cmake.in
4177 cmakeconfig/EthumbClientConfig.cmake
4178 cmakeconfig/EthumbClientConfigVersion.cmake:cmakeconfig/EFLConfigVersion.cmake.in
4179 cmakeconfig/EmotionConfig.cmake
4180 cmakeconfig/EmotionConfigVersion.cmake:cmakeconfig/EFLConfigVersion.cmake.in
4181 ])
4182
4183 AC_OUTPUT
4184
4185
4186 #### Info
4187
4188 EFL_ADD_FEATURE([EO], [eo-id], [${want_eo_id}])
4189
4190 case $host_cpu in
4191   i*86|x86_64|amd64)
4192     EFL_ADD_FEATURE([cpu], [mmx], [${build_cpu_mmx}])
4193     EFL_ADD_FEATURE([cpu], [sse3], [${build_cpu_sse3}])
4194     ;;
4195   *power* | *ppc*)
4196     EFL_ADD_FEATURE([cpu], [altivec], [${build_cpu_altivec}])
4197     ;;
4198   arm*)
4199     EFL_ADD_FEATURE([cpu], [neon], [${build_cpu_neon}])
4200     ;;
4201 esac
4202
4203 if test "${have_linux}" = "yes"; then
4204    EFL_ADD_FEATURE([system], [inotify])
4205    EFL_ADD_FEATURE([system], [atfile_source])
4206 elif test "${have_windows}" = "yes"; then
4207    EFL_ADD_FEATURE([system], [notify_win32])
4208 fi
4209 EFL_ADD_FEATURE([system], [ipv6])
4210
4211 EFL_ADD_FEATURE([thread], [spinlocks], [${efl_have_posix_threads_spinlock}])
4212 EFL_ADD_FEATURE([thread], [barrier], [${efl_have_pthread_barrier}])
4213 EFL_ADD_FEATURE([thread], [affinity], [${efl_have_setaffinity}])
4214
4215 echo
4216 echo
4217 echo
4218 echo "------------------------------------------------------------------------"
4219 echo "$PACKAGE_NAME $PACKAGE_VERSION"
4220 echo "------------------------------------------------------------------------"
4221 echo
4222
4223 if test "x${have_windows}" = "xyes" ; then
4224    osname="${host_os}(${_efl_windows_version})"
4225 else
4226    osname="${host_os}"
4227 fi
4228
4229 echo "Configuration...: ${COLOR_OTHER}profile=${build_profile} os=${osname}${COLOR_RESET}"
4230 echo "  EFL API Set...: ${efl_api}"
4231 echo "  CPU Extensions: ${host_cpu} (${features_cpu})"
4232 echo "  System Feature: ${features_system}"
4233 echo "  Threads.......: ${efl_have_threads} (${features_thread})"
4234 echo "  Cryptography..: ${build_crypto}"
4235 echo "  X11...........: ${with_x11}"
4236 echo "  OpenGL........: ${with_opengl}"
4237 echo "  C++11.........: ${have_cxx11}"
4238 echo "Evas............: yes (${features_evas})"
4239 echo "  Engines.......: ${features_evas_engine}"
4240 echo "  Image Loaders.: ${features_evas_loader}"
4241 if test "x${have_pixman}" = "xyes" ; then
4242 echo "  Pixman........: ${features_evas_pixman}"
4243 fi
4244 echo "Eo..............: yes (${features_eo})"
4245 echo "Eolian..........: yes (${features_eolian})"
4246 echo "Eina............: yes (${features_eina})"
4247 echo "Ecore...........: yes (${features_ecore})"
4248 echo "Ecore_Con.......: yes (${features_ecore_con})"
4249 echo "Ecore_File......: yes"
4250 echo "Ecore_IMF.......: yes (${features_ecore_imf})"
4251 echo "Ecore_X.........: ${with_x11} (${features_ecore_x})"
4252 echo "Ecore_SDL.......: $want_sdl"
4253 echo "Ecore_Wayland...: $want_wayland"
4254 if test "${have_linux}" = "yes"; then
4255 echo "Ecore_FB........: $want_fb (${features_ecore_fb})"
4256 elif test "${have_ps3}" = "yes"; then
4257 echo "Ecore_PSL1GHT...: $have_ps3"
4258 elif test "${have_darwin}" = "yes"; then
4259 echo "Ecore_Cocoa.....: $efl_lib_optional_ecore_cocoa"
4260 elif test "${have_windows}" = "yes"; then
4261 echo "Ecore_Win32.....: $have_win32"
4262 echo "Ecore_WinCE.....: $have_wince"
4263 fi
4264 echo "Ecore_Audio.....: ${efl_lib_optional_ecore_audio} (${features_ecore_audio})"
4265 echo "Ecore_Avahi.....: yes (${features_ecore_avahi})"
4266 echo "Ecore_Evas......: yes (${features_ecore_evas})"
4267 echo "Eeze............: ${efl_lib_optional_eeze} (${features_eeze})"
4268 echo "EPhysics........: ${efl_lib_optional_ephysics}"
4269 echo "Edje............: yes (${features_edje})"
4270 echo "Emotion.........: yes (${features_emotion})"
4271 echo "Ethumb..........: yes"
4272 echo "Ethumb_Client...: yes"
4273 if test "${build_tests}" = "none"; then
4274 echo "Tests...........: no"
4275 elif test "${build_tests}" = "auto"; then
4276 echo "Tests...........: make check (inexplicitly enabled)"
4277 elif test "${build_tests}" = "regular"; then
4278 echo "Tests...........: make check"
4279 elif test "${build_tests}" = "coverage"; then
4280 echo "Tests...........: make lcov-check"
4281 fi
4282 echo "Examples........: make examples (make install-examples)"
4283 if test "x${build_doc}" = "xyes"; then
4284 echo "Documentation...: make doc"
4285 else
4286 echo "Documentation...: no"
4287 fi
4288 echo "Compilation.....: make (or gmake)"
4289 echo "  CPPFLAGS......: $CPPFLAGS"
4290 echo "  CFLAGS........: $CFLAGS"
4291 echo "  CXXFLAGS......: $CXXFLAGS"
4292 echo "  LDFLAGS.......: $LDFLAGS"
4293
4294 if test "x${with_binary_edje_cc}" != "x"; then
4295 echo "  edje_cc.......: ${with_binary_edje_cc}"
4296 fi
4297
4298 if test "x${with_binary_eolian_gen}" != "x"; then
4299 echo "  eolian_gen....: ${with_binary_eolian_gen}"
4300 fi
4301
4302 echo "  "
4303 echo "Installation....: make install (as root if needed, with 'su' or 'sudo')"
4304 echo "  prefix........: $prefix"
4305 echo "  dbus units....: $dbusservicedir"
4306 if test "${have_systemd_user_session}" = "yes"; then
4307 echo "  systemd units.: $USER_SESSION_DIR"
4308 fi
4309 echo
4310
4311 if test "x${have_systemd_pkg}" = "xyes" -a "x${want_systemd}" = "xno"; then
4312    echo " _________________________________________"
4313    echo "/ Systemd dependency is available on your \\"
4314    echo "| system, but you are building without    |"
4315    echo "| systemd support. Don't forget to        |"
4316    echo "| --enable-systemd if you want systemd    |"
4317    echo "\\ integration for EFL.                    /"
4318    echo " -----------------------------------------"
4319    echo "        \\   ^__^"
4320    echo "         \\  (oo)\\_______"
4321    echo "            (__)\\       )\\/\\"
4322    echo "                ||----w |"
4323    echo "                ||     ||"
4324 fi
4325
4326
4327 if test -n "$CFOPT_WARNING"; then
4328   echo "_____________________________________________________________________"
4329   echo ""
4330   echo "==-- WARNING --=="
4331   echo ""
4332   echo "_____________________________________________________________________"
4333   if test "x${with_x11}" = "xxcb"; then
4334     echo "_____________________________________________________________________"
4335     echo "You have chosen to use XCB instead of Xlib. It is a myth that XCB"
4336     echo "is amazingly faster than Xlib (when used sensibly). It can be"
4337     echo "faster in a few corner cases on startup of an app, but it comes"
4338     echo "with many downsides. One of those is more complex code inside"
4339     echo "ecore_x, which is far less tested in XCB mode than Xlib. Also"
4340     echo "the big catch is that OpenGL support basically requires Xlib anyway"
4341     echo "so if you want OpenGL in X11, you need Xlib regardless and so you"
4342     echo "gain nothing really in terms of speed and no savings in memory"
4343     echo "because Xlib is still linked, loaded and used, BUT instead you"
4344     echo "have OpenGL drivers working with an hybrid XCB/Xlib (mostly XCB)"
4345     echo "toolkit and this is basically never tested by anyone working on"
4346     echo "the OpenGL drivers, so you will have bugs. Do not enable XCB"
4347     echo "and use OpenGL. XCB is only useful if you wish to shave a few Kb"
4348     echo "off the memory footprint of a whole system and live with less"
4349     echo "tested code, and possibly unimplemented features in ecore_x. To"
4350     echo "remove the XCB setup, remove the --with-x11=xcb option to"
4351     echo "configure."
4352     echo "_____________________________________________________________________"
4353   fi
4354   if test "x${build_crypto}" = "xgnutls"; then
4355     echo "_____________________________________________________________________"
4356     echo "You have chosen gnutls as the crypto back-end. This will have some"
4357     echo "side-effects that can break set-uid root binaries that happen to"
4358     echo "link to and/or use EFL. These do actually exist. Gnutls will drop"
4359     echo "root privs if it detects being setuid, thus breaking these tools"
4360     echo "and their functionality. Only enable gnutls if you REALLY know"
4361     echo "what you are doing and are willing to live with broken "
4362     echo "functionality."
4363     echo "_____________________________________________________________________"
4364   fi
4365   if test "x${want_physics}" = "xno"; then
4366     echo "_____________________________________________________________________"
4367     echo "You have chosen to disable physics support. This disables lots of"
4368     echo "core functionality and is effectively never tested. You are going"
4369     echo "to find features that suddenly don't work and as a result cause"
4370     echo "a series of breakages. This is simply not tested so you are on"
4371     echo "your own in terms of ensuring everything works if you do this"
4372     echo "_____________________________________________________________________"
4373   fi
4374   if test "x${efl_have_threads}" = "xno"; then
4375     echo "_____________________________________________________________________"
4376     echo "You have disabled threading support. A lot of code is literally"
4377     echo "written to need threading. We never test or even build with"
4378     echo "threading disabled, so doing this is entering uncharted territory."
4379     echo "There is a very good chance things may not compile at all, or if"
4380     echo "the do, they will break at runtime in weird and wonderful ways."
4381     echo "Highly reconsider what you are doing here, or be prepared to deal"
4382     echo "with the fallout yourself."
4383     echo "_____________________________________________________________________"
4384   fi
4385   if test "x${want_fontconfig}" = "xno"; then
4386     echo "_____________________________________________________________________"
4387     echo "You have disabled fontconfig. This is going to make general font"
4388     echo "searching not work, and only some very direct 'load /path/file.ttf'"
4389     echo "will wok alongside some old-school ttf file path searching. This"
4390     echo "is very likely not what you want, so highly reconsider turning"
4391     echo "fontconfig off. Having it off will lead to visual problems like"
4392     echo "missing text in many UI areas etc."
4393     echo "_____________________________________________________________________"
4394   fi
4395   if test "x${want_fribidi}" = "xno"; then
4396     echo "_____________________________________________________________________"
4397     echo "Fribidi is used for handling right-to-left text (like Arabic,"
4398     echo "Hebrew, Farsi, Persian etc.) and is very likely not a feature"
4399     echo "you want to disable unless you know for absolute certain you"
4400     echo "will never encounter and have to display such scripts. Also"
4401     echo "note that we don't test with fribidi disabled so you may also"
4402     echo "trigger code paths with bugs that are never normally used."
4403     echo "_____________________________________________________________________"
4404   fi
4405   if test "x${want_pixman}" = "xyes"; then
4406     echo "_____________________________________________________________________"
4407     echo "Pixman allows you to replace some rendering paths in Evas with"
4408     echo "Pixman. Pixman may or may not be faster (probably slower), and"
4409     echo "the rendering paths with Pixman enabled are not tested often so"
4410     echo "this may introduce rendering bugs. Do not turn Pixman on unless"
4411     echo "you wish to deal with these bugs."
4412     echo "_____________________________________________________________________"
4413   fi
4414   if test "x${have_tile_rotate}" = "xyes"; then
4415     echo "_____________________________________________________________________"
4416     echo "Tiled rotation code is not tested much, so be aware that you"
4417     echo "may introduce bugs by enabling this."
4418     echo "_____________________________________________________________________"
4419   fi
4420   if test "x${want_g_main_loop}" = "xyes"; then
4421     echo "_____________________________________________________________________"
4422     echo "Using the Glib mainloop as the mainloop in Ecore is not tested"
4423     echo "regularly, but the glib mainloop integration (on by default) is."
4424     echo "You can use apps that use glib mainloop constructs by default"
4425     echo "this way, but the Ecore mainloop is not built on top of glib."
4426     echo "You have enabled ecore to be built on top of glib and thus you"
4427     echo "may experience bugs that normally would not be there. Be prepared"
4428     echo "to fix these if they arise."
4429     echo "_____________________________________________________________________"
4430   fi
4431   if test "x${want_gstreamer}" = "xyes"; then
4432     echo "_____________________________________________________________________"
4433     echo "Gstreamer 0.10 is no longer supported, and EFL has moved to use"
4434     echo "Gstreamer 1.x. The old Gstremaer code is not tested or maintained"
4435     echo "and will eventually be removed entirely. Don't enable the old"
4436     echo "Gstreamer support unless you want to deal with the issues yourself."
4437     echo "_____________________________________________________________________"
4438   fi
4439   if test "x${want_gstreamer1}" = "xno"; then
4440     echo "_____________________________________________________________________"
4441     echo "You disabled Gstreamer 1.x support. You likely don't want to do"
4442     echo "this as it will heavily limit your media support options and render"
4443     echo "some functionality as useless, leading to visible application bugs."
4444     echo "_____________________________________________________________________"
4445   fi
4446   if test "x${want_eo_id}" = "xno"; then
4447     echo "_____________________________________________________________________"
4448     echo "Eo's ID absttraction interface is a major safety system that"
4449     echo "protects code from crashing or misbehaving in many cases. It does"
4450     echo "come at a slight cost, but the safety and protection is worth it."
4451     echo "Also by disabling this, you may also introduce security holes in"
4452     echo "EFL as well as cause all sorts of previously non-existant crashes."
4453     echo "Seriously reconsider disabling EO ID."
4454     echo "_____________________________________________________________________"
4455   fi
4456   if test "x${want_evas_cserve2}" = "xno"; then
4457     echo "_____________________________________________________________________"
4458     echo "Evas Cserve is built and on by default and no testing is done"
4459     echo "for the old non-cserve2 code paths, so by disabling this you"
4460     echo "may be introducing bugs. Be aware of this and be prepared to"
4461     echo "deal with the bugs as a result of this."
4462     echo "_____________________________________________________________________"
4463   fi
4464   if test "x${want_audio}" = "xno"; then
4465     echo "_____________________________________________________________________"
4466     echo "You disabled audio support in Ecore. This is not tested and may"
4467     echo "Create bugs for you due to it creating untested code paths."
4468     echo "Reconsider disabling audio."
4469     echo "_____________________________________________________________________"
4470   fi
4471   if test "x${want_pulseaudio}" = "xno"; then
4472     echo "_____________________________________________________________________"
4473     echo "The only audio output method supported by Ecore right now is via"
4474     echo "Pulseaudio. You have disabled that and likely have broken a whole"
4475     echo "bunch of things in the process. Reconsider your configure options."
4476     echo "_____________________________________________________________________"
4477   fi
4478   if test "x${want_xinput2}" = "xno"; then
4479     echo "_____________________________________________________________________"
4480     echo "You have disabled xinput2 support. This means a whole lot of input"
4481     echo "devices in X11 will not work correctly. You likely do not want to"
4482     echo "do this."
4483     echo "_____________________________________________________________________"
4484   fi
4485   if test "x${want_xim}" = "xno"; then
4486     echo "_____________________________________________________________________"
4487     echo "You disabled XIM input method support. This is the most basic and"
4488     echo "core input method protocol supported in X11 and you almost certainly"
4489     echo "want the suport for it. Input methods allow for complex text input"
4490     echo "like for Chinese, Japanese and Korean as well as virtual keyboards"
4491     echo "on touch/mobile devices."
4492     echo "_____________________________________________________________________"
4493   fi
4494   if test "x${want_scim}" = "xno"; then
4495     echo "_____________________________________________________________________"
4496     echo "SCIM is a modern and very common input method framework and you"
4497     echo "disabled support for it. You very likely want the support for"
4498     echo "complex language input, so please reconsider this. Input methods"
4499     echo "allow for complex text input like for Chinese, Japanese and Korean"
4500     echo "as well as virtual keyboards on touch/mobile devices."
4501     echo "_____________________________________________________________________"
4502   fi
4503   if test "x${want_libmount}" = "xno"; then
4504     echo "_____________________________________________________________________"
4505     echo "Libmount has been disabled, and it is used heavily inside Eeze"
4506     echo "for support of removable devices etc. and disabling this will"
4507     echo "hurt support for Enlightenment and its filemanager."
4508     echo "_____________________________________________________________________"
4509   fi
4510   echo "_____________________________________________________________________"
4511   echo ""
4512   echo "==-- WARNING --=="
4513   echo ""
4514   echo "_____________________________________________________________________"
4515   if test -n "$BARF_OK"; then
4516     echo "Please add the following option to acknowledge this:"
4517     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-aaa"
4518     echo "_____________________________________________________________________"
4519     rm -f Makefile
4520     exit 1
4521   fi
4522   sleep 10
4523 fi
4524
4525 if test "x$prefix" != "x/usr"; then
4526   old=
4527   path=$dbusservicedir
4528   while test "x$old" != "x$path"; do
4529     old=$path
4530     eval path="\"$path\""
4531   done
4532   resolved_dbusservicedir=$path
4533
4534   old=
4535   path=$USER_SESSION_DIR
4536   while test "x$old" != "x$path"; do
4537     old=$path
4538     eval path="\"$path\""
4539   done
4540   resolved_USER_SESSION_DIR=$path
4541   base_USER_SESSION_DIR=`echo "$resolved_USER_SESSION_DIR" | sed -e 's:^\(.*\)/systemd/user/*$:\1:g'`
4542
4543   old=
4544   path=$datadir
4545   while test "x$old" != "x$path"; do
4546     old=$path
4547     eval path="\"$path\""
4548   done
4549   resolved_datadir=$path
4550
4551   needs_alert_dbus=0
4552   if test "$resolved_dbusservicedir" = "${HOME}/.local/share/dbus-1/services"; then
4553     AC_MSG_NOTICE([installing DBus services in user local "$resolved_dbusservicedir". Only accessible to user $USER])
4554   elif echo "$XDG_DATA_DIRS" | grep -e "$resolved_datadir" >/dev/null 2>/dev/null; then
4555     AC_MSG_NOTICE([installing DBus services in "$resolved_datadir" set in \$XDG_DATA_DIRS. Every user must have \$XDG_DATA_DIRS containing "$resolved_datadir".])
4556   elif echo "$resolved_dbusservicedir" | grep -e '^/usr/s' >/dev/null 2>/dev/null; then
4557     AC_MSG_NOTICE([installing DBus serivces in $resolved_dbusservicedir])
4558   else
4559     needs_alert_dbus=1
4560   fi
4561
4562   needs_alert_systemd=0
4563   if test "$have_systemd_user_session" = "yes"; then
4564     if test "$resolved_USER_SESSION_DIR" = "${HOME}/.config/systemd/user"; then
4565       AC_MSG_NOTICE([installing systemd services in user local "$resolved_USER_SESSION_DIR". Only accessible to user $USER])
4566     elif echo "$XDG_DATA_DIRS" | grep -e "$base_USER_SESSION_DIR" >/dev/null 2>/dev/null; then
4567       AC_MSG_NOTICE([installing systemd services in "$base_USER_SESSION_DIR" set in \$XDG_DATA_DIRS. Every user must have \$XDG_DATA_DIRS containing "$base_USER_SESSION_DIR".])
4568     elif echo "$XDG_CONFIG_DIRS" | grep -e "$base_USER_SESSION_DIR" >/dev/null 2>/dev/null; then
4569       AC_MSG_NOTICE([installing systemd services in "$base_USER_SESSION_DIR" set in \$XDG_CONFIG_DIRS. Every user must have \$XDG_CONFIG_DIRS containing "$base_USER_SESSION_DIR".])
4570     elif echo "$resolved_USER_SESSION_DIR" | grep -e '^/usr/s' >/dev/null 2>/dev/null; then
4571       AC_MSG_NOTICE([installing systemd serivces in $resolved_USER_SESSION_DIR])
4572     else
4573        needs_alert_systemd=1
4574     fi
4575   fi
4576
4577   if test $needs_alert_dbus -eq 1 -o $needs_alert_systemd -eq 1; then
4578     if test $needs_alert_dbus -eq 1 -a $needs_alert_systemd -eq 1; then
4579       what_alert="dbus and systemd"
4580     elif test $needs_alert_dbus -eq 1; then
4581       what_alert="dbus"
4582     else
4583       what_alert="systemd"
4584     fi
4585
4586     echo ""
4587     echo "#-------------------------------------------------------------------#"
4588     echo "##==--                          ALERT                          --==##"
4589     echo "#-------------------------------------------------------------------#"
4590     echo ""
4591     echo "  Your installation prefix is *NOT* /usr so this means you need"
4592     echo "to ensure some files are visible to $what_alert otherwise services cannot"
4593     echo "be started when needed. You will need to do the following:"
4594     if test $needs_alert_dbus -eq 1; then
4595       echo ""
4596       echo "System-wide installation:"
4597       echo "  ln -s ${resolved_dbusservicedir}/org.enlightenment.Ethumb.service /usr/share/dbus-1/services/org.enlightenment.Ethumb.service"
4598       echo "  ln -s ${resolved_dbusservicedir}/org.enlightenment.Efreet.service /usr/share/dbus-1/services/org.enlightenment.Efreet.service"
4599       echo ""
4600       echo "  or add \"${resolved_datadir}\" to \$XDG_DATA_DIRS"
4601       echo ""
4602       echo "User installation:"
4603       echo "  ln -s ${resolved_dbusservicedir}/org.enlightenment.Ethumb.service ~/.local/share/dbus-1/services/org.enlightenment.Ethumb.service"
4604       echo "  ln -s ${resolved_dbusservicedir}/org.enlightenment.Efreet.service ~/.local/share/dbus-1/services/org.enlightenment.Efreet.service"
4605     fi
4606     if test $needs_alert_systemd -eq 1; then
4607       echo ""
4608       echo "System-wide installation:"
4609       echo "  ln -s ${resolved_USER_SESSION_DIR}/ethumb.service /usr/lib/systemd/user/ethumb.service"
4610       echo "  ln -s ${resolved_USER_SESSION_DIR}/efreet.service /usr/lib/systemd/user/efreet.service"
4611       echo ""
4612       echo "  or add \"${base_USER_SESSION_DIR}\" to \$XDG_DATA_DIRS or \$XDG_CONFIG_DIRS"
4613       echo ""
4614       echo "User installation:"
4615       echo "  ln -s ${resolved_USER_SESSION_DIR}/ethumb.service ~/.config/systemd/user/ethumb.service"
4616       echo "  ln -s ${resolved_USER_SESSION_DIR}/efreet.service ~/.config/systemd/user/efreet.service"
4617     fi
4618     echo ""
4619     echo "#-------------------------------------------------------------------#"
4620   fi
4621 fi
4622
4623 if test "x${efl_deprecated_option}" = "xyes"; then
4624   echo ""
4625   echo "#-------------------------------------------------------------------#"
4626   echo "##==--                          ALERT                          --==##"
4627   echo "#-------------------------------------------------------------------#"
4628   echo ""
4629   echo "  Your build script is using a deprecated option. It will get b0rken"
4630   echo "with the next release of EFL. You better update it now than later."
4631   echo ""
4632   echo "#-------------------------------------------------------------------#"
4633 fi