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