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