release: Update NEWS and bump version for 1.15.0-beta3 release
[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.3.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="-lGL"
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.3.0 wayland-cursor >= 1.3.0 xkbcommon >= 0.3.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([Xprint], [Print.h], [Xp], [XpQueryScreens])
3628    ECORE_CHECK_X_EXTENSION([Xrandr], [Xrandr.h], [Xrandr], [XRRGetScreenResourcesCurrent])
3629    ECORE_CHECK_X_EXTENSION([Xrender], [Xrender.h], [Xrender], [XRenderFindVisualFormat])
3630    ECORE_CHECK_X_EXTENSION([Xtest], [XTest.h], [Xtst], [XTestFakeKeyEvent])
3631    ECORE_CHECK_X_EXTENSION([Xss], [scrnsaver.h], [Xss], [XScreenSaverSelectInput])
3632
3633    PKG_CHECK_EXISTS([xrandr > 1.3.2], [AC_DEFINE([XRANDR_GOOD], [1], [good xrandr])], [])
3634
3635    if test "${want_xpresent}" = "yes"; then
3636       ECORE_CHECK_X_EXTENSION([Xpresent], [Xpresent.h], [Xpresent], [XPresentQueryExtension])
3637    fi
3638    EFL_ADD_FEATURE([ECORE_X], [xpresent])
3639
3640    if test "${want_gesture}" = "yes"; then
3641       ECORE_CHECK_X_EXTENSION([Xgesture], [gesture.h], [Xgesture], [XGestureQueryExtension])
3642    fi
3643    EFL_ADD_FEATURE([ECORE_X], [gesture])
3644
3645    if test "${want_xinput2}" = "yes"; then
3646       ECORE_CHECK_X_EXTENSION([Xi2], [XInput2.h], [Xi], [XIQueryDevice])
3647    fi
3648    EFL_ADD_FEATURE([ECORE_X], [xinput2])
3649
3650    if test "${want_xinput22}" = "yes"; then
3651       ECORE_CHECK_X_EXTENSION([Xi2_2], [XInput2.h], [Xi],[XIGrabTouchBegin])
3652    fi
3653    EFL_ADD_FEATURE([ECORE_X], [xinput22])
3654
3655    AC_DEFINE([HAVE_ECORE_X_XLIB], [1], [Defined to 1 if Xlib is enabled.])
3656    HAVE_ECORE_X_BACKEND="HAVE_ECORE_X_XLIB"
3657
3658    EFL_EVAL_PKGS([ECORE_X])
3659    EFL_CHECK_FUNCS([ECORE_X], [dlopen dlsym])
3660 fi
3661
3662 ## XCB
3663
3664 if test "${want_x11_xcb}" = "yes"; then
3665 dnl note: added pixman-1 as ecore_xcb_region uses that
3666    EFL_DEPEND_PKG([ECORE_X], [ECORE_X_XCB],
3667       [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])
3668
3669 dnl TODO: remove these ifdefs from code!
3670    AC_DEFINE([ECORE_XCB_COMPOSITE], [1], [Build support for XCB composite])
3671    AC_DEFINE([ECORE_XCB_DAMAGE], [1], [Build support for XCB damage])
3672    AC_DEFINE([ECORE_XCB_DPMS], [1], [Build support for XCB dpms])
3673    AC_DEFINE([ECORE_XCB_RANDR], [1], [Build support for XCB randr])
3674    AC_DEFINE([ECORE_XCB_RENDER], [1], [Build support for XCB render])
3675    AC_DEFINE([ECORE_XCB_SCREENSAVER], [1], [Build support for XCB screensaver])
3676    AC_DEFINE([ECORE_XCB_SHAPE], [1], [Build support for XCB shape])
3677    AC_DEFINE([ECORE_XCB_SYNC], [1], [Build support for XCB sync])
3678    AC_DEFINE([ECORE_XCB_XFIXES], [1], [Build support for XCB xfixes])
3679    AC_DEFINE([ECORE_XCB_XINERAMA], [1], [Build support for XCB xinerama])
3680    AC_DEFINE([ECORE_XCB_XTEST], [1], [Build support for XCB xtest])
3681    AC_DEFINE([ECORE_XCB_CURSOR], [1], [Build support for XCB cursor])
3682
3683    EFL_OPTIONAL_DEPEND_PKG([ECORE_X], [${want_xpresent}], [ECORE_XCB_XPRESENT],
3684       [xcb-present])
3685    AC_DEFINE_IF([ECORE_XCB_XPRESENT], [test "${want_xpresent}" = "yes"],
3686       [1], [Build support for XCB Present])
3687    EFL_ADD_FEATURE([ECORE_X], [xpresent])
3688
3689    EFL_OPTIONAL_DEPEND_PKG([ECORE_X], [${want_gesture}], [ECORE_XCB_GESTURE],
3690       [xcb-gesture])
3691    AC_DEFINE_IF([ECORE_XCB_XGESTURE], [test "${want_gesture}" = "yes"],
3692       [1], [Build support for XCB xgesture])
3693
3694    EFL_ADD_FEATURE([ECORE_X], [gesture])
3695
3696 dnl input extension disabled currently in xcb as xcb-input has some issues
3697 dnl remember to add xcb-xinput to EFL_DEPEND_PKG()
3698 dnl AC_DEFINE([ECORE_XCB_XINPUT], [1], [Build support for XCB input])
3699
3700 dnl dri extension disabled currently in xcb
3701 dnl remember to add xcb-dri2 to EFL_DEPEND_PKG()
3702 dnl AC_DEFINE([ECORE_XCB_DRI], [1], [Build support for XCB dri])
3703
3704    EFL_EVAL_PKGS([ECORE_X])
3705    EFL_CHECK_FUNCS([ECORE_X], [dlopen iconv])
3706
3707    HAVE_ECORE_X_BACKEND="HAVE_ECORE_X_XCB"
3708 fi
3709
3710 EFL_ADD_LIBS([ECORE_X], [${ECORE_X_LIBS}])
3711
3712 AC_SUBST([HAVE_ECORE_X_BACKEND])
3713
3714 EFL_LIB_END_OPTIONAL([Ecore_X])
3715
3716 AM_CONDITIONAL([HAVE_ECORE_X_XLIB], [test "${want_x11_xlib}" = "yes"])
3717 AM_CONDITIONAL([HAVE_ECORE_X_XCB], [test "${want_x11_xcb}" = "yes"])
3718 #### End of Ecore_X
3719
3720
3721 #### Ecore_Imf
3722 EFL_LIB_START([Ecore_Imf])
3723
3724 ### Additional options to configure
3725
3726 ### Default values
3727
3728 want_ecore_imf="yes"
3729 want_ecore_imf_xim="no"
3730 want_ecore_imf_scim="no"
3731 want_ecore_imf_ibus="no"
3732 want_ecore_imf_wayland="no"
3733 want_ecore_imf="yes"
3734
3735 if test "${have_windows}" = "no" && test "${have_darwin}" = "no"; then
3736    want_ecore_imf="yes"
3737    want_ecore_imf_xim="yes"
3738    want_ecore_imf_scim="yes"
3739    want_ecore_imf_ibus="yes"
3740    if test "${want_wayland}" = "yes"; then
3741       want_ecore_imf_wayland="yes"
3742    fi
3743 fi
3744
3745 ### Checks for programs
3746
3747 ## Compatibility layers
3748 EFL_PLATFORM_DEPEND([ECORE_IMF], [evil])
3749
3750 ### Checks for libraries
3751 EFL_PLATFORM_DEPEND([ECORE_IMF], [escape])
3752 EFL_INTERNAL_DEPEND_PKG([ECORE_IMF], [ecore])
3753 EFL_INTERNAL_DEPEND_PKG([ECORE_IMF], [ecore-input])
3754 EFL_INTERNAL_DEPEND_PKG([ECORE_IMF], [eo])
3755 EFL_INTERNAL_DEPEND_PKG([ECORE_IMF], [eina])
3756
3757 if test "x${want_ecore_imf}" = "xyes" ; then
3758    AC_DEFINE([HAVE_ECORE_IMF], [1], [Ecore IMF Support])
3759 fi
3760
3761 ## modules
3762
3763 # ibus
3764
3765 have_ecore_imf_ibus="no"
3766 if test "x${want_ibus}" = "xyes" && test "x${want_ecore_imf_ibus}" = "xyes" && test "x${have_glib}" = "xyes" ; then
3767    PKG_CHECK_MODULES([IBUS],
3768       [ibus-1.0 >= 1.4 glib-2.0],
3769       [
3770        have_ecore_imf_ibus="yes"
3771        AC_DEFINE([BUILD_ECORE_IMF_IBUS], [1], [Ecore Imf IBUS Support])
3772       ],
3773       [have_ecore_imf_ibus="no"])
3774 fi
3775
3776 AM_CONDITIONAL([BUILD_ECORE_IMF_IBUS], [test "x${have_ecore_imf_ibus}" = "xyes"])
3777 EFL_ADD_FEATURE([ECORE_IMF], [ibus], [${have_ecore_imf_ibus}])
3778
3779 # scim
3780
3781 have_ecore_imf_scim="no"
3782 if test "x${want_scim}" = "xyes" && test "x${want_ecore_imf_scim}" = "xyes" ; then
3783    PKG_CHECK_MODULES([SCIM],
3784       [scim],
3785       [
3786        have_ecore_imf_scim="yes"
3787        AC_DEFINE([BUILD_ECORE_IMF_SCIM], [1], [Ecore Imf SCIM Support])
3788       ],
3789       [have_ecore_imf_scim="no"])
3790 fi
3791
3792 AM_CONDITIONAL([BUILD_ECORE_IMF_SCIM], [test "x${have_ecore_imf_scim}" = "xyes"])
3793 EFL_ADD_FEATURE([ECORE_IMF], [scim], [${have_ecore_imf_scim}])
3794
3795 # xim
3796
3797 have_ecore_imf_xim="no"
3798 if test "x${want_xim}" = "xyes" && test "x${want_ecore_imf_xim}" = "xyes" ; then
3799
3800  EFL_FIND_X(ecore_imf_xim,
3801    [X11/Xlib.h],
3802    [X11 XOpenIM],
3803    [
3804      have_ecore_imf_xim=yes
3805      AC_DEFINE([ENABLE_XIM], [1], [Enable X Input Method])
3806    ])
3807 fi
3808
3809 AM_CONDITIONAL([BUILD_ECORE_IMF_XIM], [test "x${have_ecore_imf_xim}" = "xyes"])
3810 EFL_ADD_FEATURE([ECORE_IMF], [xim])
3811
3812 # wayland
3813 if test "x${want_ecore_imf_wayland}" = "xyes" ; then
3814    PKG_CHECK_MODULES([WAYLAND],
3815       [wayland-client >= 1.2.0],
3816       [
3817        have_ecore_imf_wayland="yes"
3818        AC_DEFINE([BUILD_ECORE_IMF_WAYLAND], [1], [Ecore Imf Wayland Support])
3819       ],
3820       [have_ecore_imf_wayland="no"])
3821 fi
3822
3823 AM_CONDITIONAL([BUILD_ECORE_IMF_WAYLAND], [test "x${have_ecore_imf_wayland}" = "xyes"])
3824 EFL_ADD_FEATURE([ECORE_IMF], [wayland], [${want_ecore_imf_wayland}])
3825
3826 ### Checks for header files
3827
3828 ### Checks for types
3829
3830 ### Checks for structures
3831
3832 ### Checks for compiler characteristics
3833
3834 ### Checks for linker characteristics
3835
3836 ### Checks for library functions
3837
3838 EFL_LIB_END([Ecore_Imf])
3839 #### End of Ecore_Imf
3840
3841
3842 #### Ecore_Imf_Evas
3843 EFL_LIB_START([Ecore_Imf_Evas])
3844
3845 ### Additional options to configure
3846
3847 ### Default values
3848
3849 ### Checks for programs
3850
3851 ## Compatibility layers
3852 EFL_PLATFORM_DEPEND([ECORE_IMF_EVAS], [evil])
3853
3854 ### Checks for libraries
3855 EFL_PLATFORM_DEPEND([ECORE_IMF_EVAS], [escape])
3856 EFL_INTERNAL_DEPEND_PKG([ECORE_IMF_EVAS], [ecore-imf])
3857 EFL_INTERNAL_DEPEND_PKG([ECORE_IMF_EVAS], [ecore])
3858 EFL_INTERNAL_DEPEND_PKG([ECORE_IMF_EVAS], [evas])
3859 EFL_INTERNAL_DEPEND_PKG([ECORE_IMF_EVAS], [efl])
3860 EFL_INTERNAL_DEPEND_PKG([ECORE_IMF_EVAS], [eo])
3861 EFL_INTERNAL_DEPEND_PKG([ECORE_IMF_EVAS], [eina])
3862 EFL_INTERNAL_DEPEND_PKG([ECORE_IMF_EVAS], [emile])
3863
3864 ### Checks for header files
3865
3866 ### Checks for types
3867
3868 ### Checks for structures
3869
3870 ### Checks for compiler characteristics
3871
3872 ### Checks for linker characteristics
3873
3874 ### Checks for library functions
3875
3876 EFL_LIB_END([Ecore_Imf_Evas])
3877 #### End of Ecore_Imf_Evas
3878
3879
3880 #### Ecore_Evas
3881 EFL_LIB_START([Ecore_Evas])
3882
3883 ### Additional options to configure
3884
3885 ### Default values
3886
3887 want_ecore_evas_software_gdi="${have_evas_engine_software_gdi}"
3888 want_ecore_evas_software_ddraw="${have_evas_engine_software_ddraw}"
3889 want_ecore_evas_gl_cocoa="${have_evas_engine_gl_cocoa}"
3890 want_ecore_evas_wayland_egl="${have_evas_engine_wayland_egl}"
3891 want_ecore_evas_extn="yes"
3892 want_ecore_evas_drm="${have_evas_engine_drm}"
3893
3894 if test "x${have_ecore_ipc}" = "xno" || \
3895    test "x${efl_func_shm_open}" = "xno" || \
3896    test "x${have_windows}" = "xyes" ; then
3897    want_ecore_evas_extn="no"
3898 fi
3899
3900 ### Checks for programs
3901
3902 ## Compatibility layers
3903 EFL_PLATFORM_DEPEND([ECORE_EVAS], [evil])
3904
3905 ### Checks for libraries
3906 EFL_INTERNAL_DEPEND_PKG([ECORE_EVAS], [ecore-input-evas])
3907 EFL_INTERNAL_DEPEND_PKG([ECORE_EVAS], [ecore-input])
3908 EFL_INTERNAL_DEPEND_PKG([ECORE_EVAS], [ecore])
3909 EFL_INTERNAL_DEPEND_PKG([ECORE_EVAS], [eet])
3910 EFL_INTERNAL_DEPEND_PKG([ECORE_EVAS], [evas])
3911 EFL_INTERNAL_DEPEND_PKG([ECORE_EVAS], [efl])
3912 EFL_INTERNAL_DEPEND_PKG([ECORE_EVAS], [eo])
3913 EFL_INTERNAL_DEPEND_PKG([ECORE_EVAS], [eina])
3914 EFL_INTERNAL_DEPEND_PKG([ECORE_EVAS], [emile])
3915
3916 ## modules
3917 ECORE_EVAS_MODULE([extn], [${want_ecore_evas_extn}])
3918 ECORE_EVAS_MODULE([ews], [yes])
3919 ECORE_EVAS_MODULE([fb], [${want_fb}])
3920 ECORE_EVAS_MODULE([drm], [${want_drm}], 
3921   [EFL_OPTIONAL_INTERNAL_DEPEND_PKG([ECORE_EVAS], [${want_drm}], [ecore-drm])])
3922 ECORE_EVAS_MODULE([gl-drm], [${want_gl_drm}],
3923   [EFL_OPTIONAL_INTERNAL_DEPEND_PKG([ECORE_EVAS], [${want_gl_drm}], [ecore-drm])])
3924 ECORE_EVAS_MODULE([psl1ght], [${have_ps3}])
3925
3926 ECORE_EVAS_MODULE([opengl-cocoa], [${want_ecore_evas_gl_cocoa}])
3927
3928 ECORE_EVAS_MODULE([software-sdl], [${want_sdl}])
3929 ECORE_EVAS_MODULE([opengl-sdl], [${want_gl_sdl}])
3930
3931 build_ecore_evas_sdl="no"
3932 if test "x${have_ecore_evas_software_sdl}" = "xyes" || \
3933    test "x${have_ecore_evas_opengl_sdl}" = "xyes" ; then
3934    build_ecore_evas_sdl="yes"
3935    AC_DEFINE(BUILD_ECORE_EVAS_SDL, 1, [Support for SDL Engine in Ecore_Evas])
3936 fi
3937 AM_CONDITIONAL([BUILD_ECORE_EVAS_SDL],
3938    [test "${build_ecore_evas_sdl}" = "yes"])
3939
3940 ECORE_EVAS_MODULE([wayland-shm], [${want_wayland}])
3941 ECORE_EVAS_MODULE([wayland-egl], [${want_ecore_evas_wayland_egl}])
3942
3943 build_ecore_evas_wayland="no"
3944 if test "x${have_ecore_evas_wayland_shm}" = "xyes" || \
3945    test "x${have_ecore_evas_wayland_egl}" = "xyes" ; then
3946    build_ecore_evas_wayland="yes"
3947    AC_DEFINE(BUILD_ECORE_EVAS_WAYLAND, 1, [Support for Wayland Engine in Ecore_Evas])
3948 fi
3949 AM_CONDITIONAL([BUILD_ECORE_EVAS_WAYLAND],
3950    [test "${build_ecore_evas_wayland}" = "yes"])
3951
3952 ECORE_EVAS_MODULE([software-gdi], [${want_ecore_evas_software_gdi}])
3953 ECORE_EVAS_MODULE([software-ddraw], [${want_ecore_evas_software_ddraw}])
3954
3955 build_ecore_evas_win32="no"
3956 if test "x${have_ecore_evas_software_gdi}" = "xyes" || \
3957    test "x${have_ecore_evas_software_ddraw}" = "xyes" ; then
3958    build_ecore_evas_win32="yes"
3959    AC_DEFINE(BUILD_ECORE_EVAS_WIN32, 1, [Support for Win32 Engine in Ecore_Evas])
3960 fi
3961 AM_CONDITIONAL([BUILD_ECORE_EVAS_WIN32],
3962    [test "${build_ecore_evas_win32}" = "yes"])
3963
3964
3965 # XXX TODO: ecore_evas_x11
3966
3967 ECORE_EVAS_MODULE([software-x11], [${want_x11_any}])
3968
3969 have_ecore_evas_software_xlib="no"
3970 have_ecore_evas_software_xcb="no"
3971 if test "x$have_ecore_evas_software_x11" = "xyes" ; then
3972    have_ecore_evas_software_xlib=${have_evas_engine_software_xlib}
3973    if test "x${have_ecore_evas_software_xlib}" = "xstatic"; then
3974       have_ecore_evas_software_xlib="yes"
3975    fi
3976    if test "x${have_ecore_evas_software_xlib}" = "xyes"; then
3977       AC_DEFINE([BUILD_ECORE_EVAS_SOFTWARE_XLIB], [1], [Evas Software Xlib Engine Support])
3978    fi
3979    have_ecore_evas_software_xcb=${have_evas_engine_software_xcb}
3980    if test "x$have_ecore_evas_software_xcb" = "xstatic"; then
3981       have_ecore_evas_software_xcb="yes"
3982    fi
3983    if test "x$have_ecore_evas_software_xcb" = "xyes"; then
3984       AC_DEFINE([BUILD_ECORE_EVAS_SOFTWARE_XCB], [1], [Evas Software XCB Engine Support])
3985    fi
3986 fi
3987
3988 # XXX TODO: ecore_evas_opengl_x11
3989
3990 ECORE_EVAS_MODULE([opengl-x11], [${want_x11_any_opengl}])
3991
3992 have_ecore_evas_opengl_xlib="no"
3993 have_ecore_evas_opengl_xcb="no"
3994 if test "x${have_ecore_evas_opengl_x11}" = "xyes" || test "x${have_ecore_evas_opengl_x11}" = "xstatic" ; then
3995    have_ecore_evas_opengl_xlib=${have_evas_engine_gl_xlib}
3996    if test "x${have_ecore_evas_opengl_xlib}" = "xyes" ; then
3997       AC_DEFINE([BUILD_ECORE_EVAS_OPENGL_XLIB], [1], [OpenGL Xlib rendering backend])
3998    fi
3999
4000 # opengl does not work with xcb (yet)
4001    have_ecore_evas_opengl_xcb=${have_evas_engine_gl_xcb}
4002    if test "x${have_ecore_evas_opengl_xcb}" = "xstatic"; then
4003       have_ecore_evas_opengl_xcb="yes"
4004    fi
4005    if test "x${have_ecore_evas_opengl_xcb}" = "xyes"; then
4006       PKG_CHECK_MODULES([XCB_X11],
4007          [x11-xcb],
4008          [
4009           have_ecore_x_opengl_xcb="yes"
4010           requirements_ecore_x="x11-xcb ${requirements_ecore_x}"
4011           AC_DEFINE([BUILD_ECORE_X_OPENGL_XCB], [1], [Build support for XCB-based OpenGL])
4012           AC_DEFINE([BUILD_ECORE_EVAS_OPENGL_XCB], [1], [OpenGL XCB rendering backend])
4013          ],
4014          [have_ecore_x_opengl_xcb="no"])
4015     else
4016       have_ecore_x_opengl_xcb="no"
4017       AC_MSG_NOTICE(["XCB-based OpenGL explicitly disabled"])
4018     fi
4019 fi
4020
4021 build_ecore_evas_x11="no"
4022 if test "x$have_ecore_evas_software_x11" = "xyes" || \
4023    test "x$have_ecore_evas_opengl_x11" = "xyes" || \
4024    test "x$have_ecore_evas_software_xcb" = "xyes"; then
4025    AC_DEFINE([BUILD_ECORE_EVAS_X11], [1], [Support for X Window Engines in Ecore_Evas])
4026    build_ecore_evas_x11="yes"
4027 fi
4028 AM_CONDITIONAL([BUILD_ECORE_EVAS_X11], [test "${build_ecore_evas_x11}" = "yes"])
4029
4030 EFL_EVAL_PKGS([ECORE_EVAS])
4031
4032 ### Checks for header files
4033
4034 ### Checks for types
4035
4036 ### Checks for structures
4037
4038 ### Checks for compiler characteristics
4039
4040 ### Checks for linker characteristics
4041
4042 ### Checks for library functions
4043
4044 EFL_LIB_END([Ecore_Evas])
4045 #### End of Ecore_Evas
4046
4047 #### Eio
4048 EFL_LIB_START([Eio])
4049
4050 ### Additional options to configure
4051
4052 ### Default values
4053
4054 ### Checks for programs
4055
4056 ## Compatibility layers
4057 EFL_PLATFORM_DEPEND([EIO], [evil])
4058
4059 ### Checks for libraries
4060 EFL_INTERNAL_DEPEND_PKG([EIO], [ecore])
4061 EFL_INTERNAL_DEPEND_PKG([EIO], [eet])
4062 EFL_INTERNAL_DEPEND_PKG([EIO], [eo])
4063 EFL_INTERNAL_DEPEND_PKG([EIO], [eina])
4064 EFL_INTERNAL_DEPEND_PKG([EIO], [emile])
4065
4066 EFL_ADD_LIBS([EIO], [-lm])
4067
4068 ### Checks for header files
4069
4070 ### Checks for types
4071
4072 ### Checks for structures
4073
4074 ### Checks for compiler characteristics
4075
4076 ### Checks for linker characteristics
4077
4078 ### Checks for library functions
4079 have_inotify="${ac_cv_header_sys_inotify_h}"
4080 AM_CONDITIONAL([HAVE_INOTIFY], [test "x${have_inotify}" = "xyes"])
4081
4082 have_notify_win32="${have_win32}"
4083 AC_DEFINE_IF([HAVE_NOTIFY_WIN32],
4084    [test "x${have_notify_win32}" = "xyes"], [1],
4085    [File monitoring with Windows notification])
4086 AM_CONDITIONAL([HAVE_NOTIFY_WIN32], [test "x${have_notify_win32}" = "xyes"])
4087
4088 AC_DEFINE_IF([HAVE_NOTIFY_COCOA],
4089    [test "x${have_darwin}" = "xyes"], [1],
4090    [File monitoring with fsevent notification])
4091 AM_CONDITIONAL([HAVE_NOTIFY_COCOA], [test "x${have_darwin}" = "xyes"])
4092
4093
4094 EFL_LIB_END([Eio])
4095 dnl TODO: remove these ifdefs from code!
4096 AC_DEFINE([HAVE_EIO], [1], [Have eio library])
4097 #### End of Eio
4098
4099 # Eo Id
4100 if test "x${want_eo_id}" = "xyes" ; then
4101    AC_DEFINE([HAVE_EO_ID], [1], [Have eo id])
4102 fi
4103
4104
4105 #### Efreet
4106 EFL_LIB_START([Efreet])
4107
4108 ### Additional options to configure
4109
4110 ### Default values
4111
4112 AC_DEFINE([SLOPPY_SPEC], [1], [Sloppy Spec Compliance])
4113
4114 ### Checks for programs
4115
4116 ## Compatibility layers
4117 EFL_PLATFORM_DEPEND([EFREET], [evil])
4118
4119 ### Checks for libraries
4120 EFL_INTERNAL_DEPEND_PKG([EFREET], [eet])
4121 EFL_INTERNAL_DEPEND_PKG([EFREET], [ecore])
4122 EFL_INTERNAL_DEPEND_PKG([EFREET], [ecore-file])
4123 EFL_INTERNAL_DEPEND_PKG([EFREET], [eo])
4124 EFL_INTERNAL_DEPEND_PKG([EFREET], [eina])
4125 EFL_INTERNAL_DEPEND_PKG([EFREET], [emile])
4126 EFL_INTERNAL_DEPEND_PKG([EFREET], [ecore-ipc])
4127
4128 ### Checks for header files
4129
4130 ### Checks for types
4131
4132 ### Checks for structures
4133
4134 ### Checks for compiler characteristics
4135
4136 ### Checks for linker characteristics
4137
4138 ### Checks for library functions
4139
4140 EFL_LIB_END([Efreet])
4141 #### End of Efreet
4142
4143
4144 #### EPhysics
4145 AC_ARG_ENABLE([physics],
4146    [AS_HELP_STRING([--disable-physics],[disable physics effects and support. @<:@default=enabled@:>@])],
4147    [
4148     if test "x${enableval}" = "xyes" ; then
4149        want_physics="yes"
4150     else
4151        CFOPT_WARNING="xyes"
4152        want_physics="no"
4153     fi
4154    ],
4155    [want_physics="yes"])
4156
4157 EFL_LIB_START_OPTIONAL([EPhysics], [test "${want_physics}" = "yes"])
4158
4159 ### Additional options to configure
4160
4161 ### Default values
4162
4163 ### Checks for programs
4164
4165 ### Checks for libraries
4166 EFL_PLATFORM_DEPEND([EPHYSICS], [evil])
4167
4168 EFL_INTERNAL_DEPEND_PKG([EPHYSICS], [eina])
4169 EFL_INTERNAL_DEPEND_PKG([EPHYSICS], [evas])
4170 EFL_INTERNAL_DEPEND_PKG([EPHYSICS], [efl])
4171 EFL_INTERNAL_DEPEND_PKG([EPHYSICS], [ecore])
4172 EFL_INTERNAL_DEPEND_PKG([EPHYSICS], [eo])
4173 EFL_INTERNAL_DEPEND_PKG([EPHYSICS], [emile])
4174
4175 EFL_DEPEND_PKG([EPHYSICS], [BULLET], [bullet >= 2.80])
4176
4177 EFL_EVAL_PKGS([EPHYSICS])
4178
4179 ### Checks for header files
4180
4181 ### Checks for types
4182
4183 ### Checks for structures
4184
4185 ### Checks for compiler characteristics
4186
4187 ### Checks for linker characteristics
4188
4189 ### Checks for library functions
4190
4191 EFL_LIB_END_OPTIONAL([EPhysics])
4192 #### End of EPhysics
4193
4194
4195 #### Edje
4196 EFL_LIB_START([Edje])
4197
4198 ### Additional options to configure
4199
4200 ### Default values
4201
4202 AC_ARG_ENABLE([multisense],
4203    [AS_HELP_STRING([--enable-multisense],[Enable multisense support. @<:@default=enabled@:>@])],
4204    [
4205     if test "x${enableval}" = "xyes" ; then
4206        want_multisense="yes"
4207     else
4208        want_multisense="no"
4209        CFOPT_WARNING="xyes"
4210     fi
4211    ],
4212    [
4213     if test "x${want_pulseaudio}" = "xyes" -o "x${want_coreaudio}" = "xyes"; then
4214        want_multisense="yes"
4215     else
4216        want_multisense="no"
4217     fi
4218    ])
4219
4220 # TODO: should we keep or remove these?
4221 want_edje_program_cache="no"
4222 want_edje_calc_cache="yes"
4223 want_fixed_point="no"
4224
4225 ### Checks for programs
4226
4227 ### Checks for libraries
4228 EFL_PLATFORM_DEPEND([EDJE], [evil])
4229
4230 EFL_INTERNAL_DEPEND_PKG([EDJE], [eina])
4231 EFL_INTERNAL_DEPEND_PKG([EDJE], [eo])
4232 EFL_INTERNAL_DEPEND_PKG([EDJE], [efl])
4233 EFL_INTERNAL_DEPEND_PKG([EDJE], [eet])
4234 EFL_INTERNAL_DEPEND_PKG([EDJE], [evas])
4235 EFL_INTERNAL_DEPEND_PKG([EDJE], [ecore])
4236 EFL_INTERNAL_DEPEND_PKG([EDJE], [ecore-evas])
4237 EFL_INTERNAL_DEPEND_PKG([EDJE], [ecore-file])
4238 EFL_INTERNAL_DEPEND_PKG([EDJE], [ecore-input])
4239 EFL_INTERNAL_DEPEND_PKG([EDJE], [ecore-imf])
4240 EFL_INTERNAL_DEPEND_PKG([EDJE], [ecore-imf-evas])
4241 EFL_INTERNAL_DEPEND_PKG([EDJE], [embryo])
4242 EFL_INTERNAL_DEPEND_PKG([EDJE], [eio])
4243 EFL_INTERNAL_DEPEND_PKG([EDJE], [emile])
4244 EFL_INTERNAL_DEPEND_PKG([EDJE], [efreet])
4245
4246 EFL_OPTIONAL_INTERNAL_DEPEND_PKG([EDJE], [${want_physics}], [ephysics])
4247 EFL_OPTIONAL_INTERNAL_DEPEND_PKG([EDJE], [${want_multisense}], [ecore-audio])
4248
4249 EFL_ADD_FEATURE([EDJE], [physics])
4250 EFL_ADD_FEATURE([EDJE], [multisense])
4251 EFL_ADD_FEATURE([EDJE], [lua-old])
4252
4253 if test "${want_lua_old}" = "yes"; then
4254    EFL_CHECK_LUA_OLD([EDJE])
4255 else
4256    EFL_DEPEND_PKG([EDJE], [LUAJIT], [luajit >= 2.0.0])
4257 fi
4258
4259 EFL_ADD_LIBS([EDJE], [-lm])
4260
4261 EFL_EVAL_PKGS([EDJE])
4262
4263 AC_DEFINE_IF([EDJE_PROGRAM_CACHE], [test "${want_edje_program_cache}" = "yes"],
4264    [1], [Cache result of program glob matches])
4265 AC_DEFINE_IF([EDJE_CALC_CACHE], [test "${want_edje_calc_cache}" = "yes"],
4266    [1], [Cache result of calc glob matches])
4267 AC_DEFINE_IF([BUILD_EDJE_FP], [test "${want_fixed_point}" = "yes"],
4268    [1], [Use Fixed Point instead of FPU])
4269
4270 AM_CONDITIONAL([ENABLE_MULTISENSE], [test "${want_multisense}" = "yes"])
4271 AC_DEFINE_IF([ENABLE_MULTISENSE], [test "${want_multisense}" = "yes"],
4272   [1], [Use Multisense])
4273 AC_SUBST([want_multisense])
4274 AC_SUBST([want_physics])
4275
4276 ### Checks for header files
4277
4278 AC_CHECK_HEADERS([ \
4279 sys/wait.h \
4280 ])
4281
4282 ### Checks for types
4283
4284 ### Checks for structures
4285
4286 ### Checks for compiler characteristics
4287
4288 ### Checks for linker characteristics
4289
4290 ### Checks for library functions
4291
4292 EFL_LIB_END([Edje])
4293 #### End of Edje
4294
4295 #### Edje CXX
4296 EFL_LIB_START([Edje_Cxx])
4297
4298 EFL_EVAL_PKGS([EDJE_CXX])
4299
4300 EFL_LIB_END([Edje_Cxx])
4301 #### End of Edje CXX
4302
4303 #### Emotion
4304 EFL_LIB_START([Emotion])
4305
4306 ## Compatibility layers
4307 EFL_PLATFORM_DEPEND([Emotion], [evil])
4308
4309 ### Default values
4310 if test "${efl_func_shm_open}" = "yes"; then
4311    want_emotion_generic="static"
4312 else
4313    want_emotion_generic="no"
4314 fi
4315
4316 ### Additional options to configure
4317 AC_ARG_ENABLE([xine],
4318    [AS_HELP_STRING([--enable-xine],[enable xine support. @<:@default=disabled@:>@])],
4319    [
4320     if test "x${enableval}" = "xyes" ; then
4321        want_xine="yes"
4322     else
4323        want_xine="no"
4324     fi
4325    ],
4326    [want_xine="no"])
4327
4328 AC_ARG_ENABLE([v4l2],
4329    [AS_HELP_STRING([--enable-v4l2],[enable v4l2 support.])],
4330    [
4331     if test "x${enableval}" = "xyes" ; then
4332        want_v4l2="yes"
4333     else
4334        want_v4l2="no"
4335     fi
4336    ],
4337    [want_v4l2="${efl_lib_optional_eeze}"])
4338
4339 ### Checks for programs
4340
4341 ### Checks for libraries
4342 EFL_INTERNAL_DEPEND_PKG([EMOTION], [eina])
4343 EFL_INTERNAL_DEPEND_PKG([EMOTION], [eo])
4344 EFL_INTERNAL_DEPEND_PKG([EMOTION], [ecore])
4345 EFL_INTERNAL_DEPEND_PKG([EMOTION], [eet])
4346 EFL_INTERNAL_DEPEND_PKG([EMOTION], [evas])
4347 EFL_INTERNAL_DEPEND_PKG([EMOTION], [efl])
4348 EFL_INTERNAL_DEPEND_PKG([EMOTION], [eio])
4349 EFL_INTERNAL_DEPEND_PKG([EMOTION], [emile])
4350
4351 EFL_OPTIONAL_INTERNAL_DEPEND_PKG([EMOTION], [${efl_lib_optional_eeze}], [eeze])
4352 EFL_ADD_FEATURE([EMOTION], [v4l2])
4353
4354 ## modules
4355
4356 have_gst_xoverlay="no"
4357
4358 EMOTION_MODULE([xine], [${want_xine}])
4359 EMOTION_MODULE([gstreamer], [${want_gstreamer}])
4360 EMOTION_MODULE([gstreamer1], [${want_gstreamer1}])
4361 EMOTION_MODULE([generic], [${want_emotion_generic}])
4362
4363 EFL_ADD_FEATURE([EMOTION], [xine])
4364 EFL_ADD_FEATURE([EMOTION], [gstreamer])
4365 EFL_ADD_FEATURE([EMOTION], [gstreamer1])
4366 EFL_ADD_FEATURE([EMOTION], [generic], [${want_emotion_generic}])
4367
4368 EFL_EVAL_PKGS([EMOTION])
4369
4370 ### Checks for header files
4371
4372 ### Checks for types
4373
4374 ### Checks for structures
4375
4376 ### Checks for compiler characteristics
4377
4378 ### Checks for linker characteristics
4379
4380 ### Checks for library functions
4381
4382 if test "${want_v4l2}" = "yes"; then
4383    AC_CHECK_DECL([V4L2_CAP_VIDEO_CAPTURE],
4384       [AC_DEFINE([HAVE_V4L2], [1], [Define to 1 if you have Video4Linux 2 available])],
4385       [AC_MSG_ERROR([Video4Linux 2 desired but not found. See --disable-v4l2.])],
4386       [#include <linux/videodev2.h>])
4387 fi
4388
4389 ### Check availability
4390
4391 EFL_LIB_END([Emotion])
4392 #### End of Emotion
4393
4394
4395 #### Ethumb
4396 EFL_LIB_START([Ethumb])
4397
4398 ### Default values
4399
4400 ### Additional options to configure
4401
4402 ### Checks for programs
4403
4404 ## Compatibility layers
4405 EFL_PLATFORM_DEPEND([ETHUMB], [evil])
4406
4407 ### Checks for libraries
4408 EFL_PLATFORM_DEPEND([EINA], [evil])
4409
4410 EFL_INTERNAL_DEPEND_PKG([ETHUMB], [eina])
4411 EFL_INTERNAL_DEPEND_PKG([ETHUMB], [eet])
4412 EFL_INTERNAL_DEPEND_PKG([ETHUMB], [evas])
4413 EFL_INTERNAL_DEPEND_PKG([ETHUMB], [efl])
4414 EFL_INTERNAL_DEPEND_PKG([ETHUMB], [eo])
4415 EFL_INTERNAL_DEPEND_PKG([ETHUMB], [ecore])
4416 EFL_INTERNAL_DEPEND_PKG([ETHUMB], [ecore-evas])
4417 EFL_INTERNAL_DEPEND_PKG([ETHUMB], [ecore-file])
4418 EFL_INTERNAL_DEPEND_PKG([ETHUMB], [ecore-imf])
4419 EFL_INTERNAL_DEPEND_PKG([ETHUMB], [edje])
4420 EFL_INTERNAL_DEPEND_PKG([ETHUMB], [emile])
4421
4422 ## modules
4423
4424 EFL_EVAL_PKGS([ETHUMB])
4425
4426 ### Checks for header files
4427
4428 ### Checks for types
4429
4430 ### Checks for structures
4431
4432 ### Checks for compiler characteristics
4433
4434 ### Checks for linker characteristics
4435
4436 ### Checks for library functions
4437
4438 ### Check availability
4439
4440 EFL_LIB_END([Ethumb])
4441 #### End of Ethumb
4442
4443 #### Ethumb_Client
4444 EFL_LIB_START([Ethumb_Client])
4445
4446 ### Default values
4447
4448 ### Additional options to configure
4449
4450 ### Checks for programs
4451
4452 ## Compatibility layers
4453 EFL_PLATFORM_DEPEND([ETHUMB_CLIENT], [evil])
4454
4455 ### Checks for libraries
4456 EFL_INTERNAL_DEPEND_PKG([ETHUMB_CLIENT], [eina])
4457 EFL_INTERNAL_DEPEND_PKG([ETHUMB_CLIENT], [eo])
4458 EFL_INTERNAL_DEPEND_PKG([ETHUMB_CLIENT], [efl])
4459 EFL_INTERNAL_DEPEND_PKG([ETHUMB_CLIENT], [eet])
4460 EFL_INTERNAL_DEPEND_PKG([ETHUMB_CLIENT], [ecore])
4461 EFL_INTERNAL_DEPEND_PKG([ETHUMB_CLIENT], [ecore-imf])
4462 EFL_INTERNAL_DEPEND_PKG([ETHUMB_CLIENT], [edje])
4463 EFL_INTERNAL_DEPEND_PKG([ETHUMB_CLIENT], [eldbus])
4464 EFL_INTERNAL_DEPEND_PKG([ETHUMB_CLIENT], [ethumb])
4465 EFL_INTERNAL_DEPEND_PKG([ETHUMB_CLIENT], [evas])
4466 EFL_INTERNAL_DEPEND_PKG([ETHUMB_CLIENT], [emile])
4467
4468 EFL_EVAL_PKGS([ETHUMB_CLIENT])
4469
4470 ### Checks for header files
4471
4472 ### Checks for types
4473
4474 ### Checks for structures
4475
4476 ### Checks for compiler characteristics
4477
4478 ### Checks for linker characteristics
4479
4480 ### Checks for library functions
4481
4482 ### Check availability
4483
4484 EFL_LIB_END([Ethumb_Client])
4485 #### End of Ethumb_Client
4486
4487 #### Elua
4488
4489 have_elua="yes"
4490 if test "${want_lua_old}" = "yes"; then
4491   have_elua="no"
4492 fi
4493
4494 EFL_LIB_START_OPTIONAL([Elua], [test "${have_elua}" = "yes"])
4495
4496 ### Default values
4497
4498 AM_CONDITIONAL([HAVE_ELUA], [test "x${have_elua}" = "xyes"])
4499
4500 ### Additional options to configure
4501
4502 ### Checks for programs
4503
4504 ## Compatibility layers
4505 EFL_PLATFORM_DEPEND([ELUA], [evil])
4506
4507 ### Checks for libraries
4508 EFL_INTERNAL_DEPEND_PKG([ELUA], [eina])
4509 EFL_INTERNAL_DEPEND_PKG([ELUA], [eo])
4510 EFL_INTERNAL_DEPEND_PKG([ELUA], [ecore])
4511
4512 EFL_DEPEND_PKG([ELUA], [LUAJIT], [luajit >= 2.0.0])
4513
4514 EFL_EVAL_PKGS([ELUA])
4515
4516 ### Checks for header files
4517
4518 ### Checks for types
4519
4520 ### Checks for structures
4521
4522 ### Checks for compiler characteristics
4523
4524 ### Checks for linker characteristics
4525
4526 ### Checks for library functions
4527
4528 ### Check availability
4529
4530 EFL_LIB_END_OPTIONAL([Elua])
4531 #### End of Elua
4532
4533 #### Elocation
4534
4535 EFL_LIB_START([Elocation])
4536
4537 ### Default values
4538
4539 ### Additional options to configure
4540
4541 ### Checks for programs
4542
4543 ### Checks for libraries
4544 EFL_PLATFORM_DEPEND([ELOCATION], [evil])
4545 EFL_INTERNAL_DEPEND_PKG([ELOCATION], [eina])
4546 EFL_INTERNAL_DEPEND_PKG([ELOCATION], [eo])
4547 EFL_INTERNAL_DEPEND_PKG([ELOCATION], [ecore])
4548 EFL_INTERNAL_DEPEND_PKG([ELOCATION], [eldbus])
4549
4550 EFL_ADD_LIBS([ELOCATION], [-lm])
4551
4552 ### Checks for header files
4553
4554 ### Checks for types
4555
4556 ### Checks for structures
4557
4558 ### Checks for compiler characteristics
4559
4560 ### Checks for linker characteristics
4561
4562 ### Checks for library functions
4563
4564 ### Check availability
4565
4566 EFL_LIB_END([Elocation])
4567 #### End of Elocation
4568
4569 ### Add Wayland server library if test is enabled
4570 if test "x${want_tests}" = "xyes" -a "x${want_wayland}" = "xyes"; then
4571    EFL_DEPEND_PKG([ECORE_WAYLAND_SRV], [WAYLAND], [wayland-server >= 1.3.0])
4572    EFL_EVAL_PKGS([ECORE_WAYLAND_SRV])
4573 fi
4574
4575 AC_ARG_ENABLE([always-build-examples],
4576    [AS_HELP_STRING([--enable-always-build-examples],[always build examples. @<:@default=disabled@:>@])],
4577    [
4578     if test "x${enableval}" = "xyes" ; then
4579        want_always_build_examples="yes"
4580     else
4581        want_always_build_examples="no"
4582     fi
4583    ],
4584    [want_always_build_examples="no"])
4585 AM_CONDITIONAL([ALWAYS_BUILD_EXAMPLES], [test "${want_always_build_examples}" = "yes"])
4586
4587 BARF_OK="xno"
4588 # Harfbuzz
4589 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],
4590    [ You will be told when this is needed ],
4591    [
4592     if test "x${enableval}" = "xyes" ; then
4593        BARF_OK=""
4594     else
4595        BARF_OK="xno"
4596     fi
4597    ],
4598    [ BARF_OK="xno" ])
4599
4600 #### Ecore_Buffer
4601 build_ecore_buffer_x11_dri2="no"
4602 build_ecore_buffer_x11_dri3="no"
4603 EFL_LIB_START_OPTIONAL([Ecore_Buffer], [test "${want_ecore_buffer}" = "yes"])
4604 ### Checks for libraries
4605 EFL_INTERNAL_DEPEND_PKG([ECORE_BUFFER], [eina])
4606 EFL_INTERNAL_DEPEND_PKG([ECORE_BUFFER], [eo])
4607 EFL_INTERNAL_DEPEND_PKG([ECORE_BUFFER], [ecore])
4608 EFL_DEPEND_PKG([ECORE_BUFFER], [WAYLAND],
4609                [wayland-server >= 1.5.0 wayland-client >= 1.5.0])
4610
4611 PKG_CHECK_MODULES([X11_DRI_COMMON],
4612    [
4613       libtbm >= 1.1.0,
4614       libdrm >= 2.4.35,
4615    ],
4616    [have_x11_dri_common_pkgs="yes"],
4617    [have_x11_dri_common_pkgs="no"]
4618 )
4619
4620 if test "x$have_x11_dri_common_pkgs" = "xyes" ; then
4621    EFL_INTERNAL_DEPEND_PKG([ECORE_BUFFER], [ecore_x])
4622
4623    PKG_CHECK_MODULES([X11_DRI2], [libdri2],
4624                      [have_x11_dri2_pkgs="yes"],
4625                      [have_x11_dri2_pkgs="no"])
4626    PKG_CHECK_MODULES([X11_DRI3],
4627       [
4628          xshmfence,
4629          xcb,
4630          x11-xcb,
4631          xcb-sync,
4632          xcb-dri3
4633       ],
4634       [have_x11_dri3_pkgs="yes"],
4635       [have_x11_dri3_pkgs="no"])
4636 fi
4637
4638 if test "x${have_x11_dri2_pkgs}" = "xyes" ; then
4639    build_ecore_buffer_x11_dri2="yes"
4640    AC_DEFINE(BUILD_ECORE_BUFFER_X11_DRI2, 1, [Support for X11_DRI2 Backend in Ecore_Buffer])
4641 fi
4642
4643 if test "x${have_x11_dri3_pkgs}" = "xyes" ; then
4644    build_ecore_buffer_x11_dri3="yes"
4645    AC_DEFINE(BUILD_ECORE_BUFFER_X11_DRI3, 1, [Support for X11_DRI3 Backend in Ecore_Buffer])
4646 fi
4647 EFL_EVAL_PKGS([ECORE_BUFFER])
4648
4649 EFL_ADD_FEATURE([ECORE_BUFFER], [shm], ["yes"])
4650 EFL_ADD_FEATURE([ECORE_BUFFER], [x11_dri2], [${build_ecore_buffer_x11_dri2}])
4651 EFL_ADD_FEATURE([ECORE_BUFFER], [x11_dri3], [${build_ecore_buffer_x11_dri3}])
4652
4653 EFL_LIB_END_OPTIONAL([Ecore_Buffer])
4654
4655 AM_CONDITIONAL([BUILD_ECORE_BUFFER_X11_DRI2], [test "${build_ecore_buffer_x11_dri2}" = "xyes"])
4656 AM_CONDITIONAL([BUILD_ECORE_BUFFER_X11_DRI3], [test "${build_ecore_buffer_x11_dri3}" = "xyes"])
4657
4658 #### End of Ecore_Buffer
4659
4660 AC_CONFIG_FILES([
4661 Makefile
4662 data/Makefile
4663 doc/Makefile
4664 doc/Doxyfile
4665 doc/previews/Makefile
4666 src/Makefile
4667 src/benchmarks/eina/Makefile
4668 src/benchmarks/eo/Makefile
4669 src/benchmarks/evas/Makefile
4670 src/examples/eina/Makefile
4671 src/examples/eina_cxx/Makefile
4672 src/examples/eet/Makefile
4673 src/examples/eo/Makefile
4674 src/examples/evas/Makefile
4675 src/examples/ecore/Makefile
4676 src/examples/ecore_avahi/Makefile
4677 src/examples/eio/Makefile
4678 src/examples/eldbus/Makefile
4679 src/examples/ephysics/Makefile
4680 src/examples/edje/Makefile
4681 src/examples/emotion/Makefile
4682 src/examples/ethumb_client/Makefile
4683 src/examples/elua/Makefile
4684 src/examples/eolian_cxx/Makefile
4685 src/examples/elocation/Makefile
4686 src/lib/eina/eina_config.h
4687 src/lib/ecore_x/ecore_x_version.h
4688 src/lib/efl/Efl_Config.h
4689 spec/efl.spec
4690 pc/evil.pc
4691 pc/escape.pc
4692 pc/eina.pc
4693 pc/eina-cxx.pc
4694 pc/emile.pc
4695 pc/eet.pc
4696 pc/eet-cxx.pc
4697 pc/eo.pc
4698 pc/eo-cxx.pc
4699 pc/eolian.pc
4700 pc/eolian-cxx.pc
4701 pc/efl.pc
4702 pc/efl-cxx.pc
4703 pc/evas-fb.pc
4704 pc/evas-opengl-x11.pc
4705 pc/evas-opengl-sdl.pc
4706 pc/evas-opengl-cocoa.pc
4707 pc/evas-psl1ght.pc
4708 pc/evas-software-buffer.pc
4709 pc/evas-software-x11.pc
4710 pc/evas-software-gdi.pc
4711 pc/evas-software-ddraw.pc
4712 pc/evas-software-sdl.pc
4713 pc/evas-wayland-shm.pc
4714 pc/evas-wayland-egl.pc
4715 pc/evas-drm.pc
4716 pc/evas.pc
4717 pc/evas-cxx.pc
4718 pc/ecore.pc
4719 pc/ecore-cxx.pc
4720 pc/ecore-con.pc
4721 pc/ecore-ipc.pc
4722 pc/ecore-file.pc
4723 pc/ecore-input.pc
4724 pc/ecore-input-evas.pc
4725 pc/ecore-cocoa.pc
4726 pc/ecore-drm.pc
4727 pc/ecore-fb.pc
4728 pc/ecore-psl1ght.pc
4729 pc/ecore-sdl.pc
4730 pc/ecore-wayland.pc
4731 pc/ecore-win32.pc
4732 pc/ecore-x.pc
4733 pc/ecore-evas.pc
4734 pc/ecore-imf.pc
4735 pc/ecore-imf-evas.pc
4736 pc/ecore-audio.pc
4737 pc/ecore-audio-cxx.pc
4738 pc/ecore-avahi.pc
4739 pc/ecore-buffer.pc
4740 pc/ector.pc
4741 pc/embryo.pc
4742 pc/eio.pc
4743 pc/eio-cxx.pc
4744 pc/eldbus.pc
4745 pc/efreet.pc
4746 pc/efreet-mime.pc
4747 pc/efreet-trash.pc
4748 pc/eeze.pc
4749 pc/ephysics.pc
4750 pc/edje.pc
4751 pc/edje-cxx.pc
4752 pc/emotion.pc
4753 pc/ethumb.pc
4754 pc/ethumb_client.pc
4755 pc/elocation.pc
4756 pc/elua.pc
4757 dbus-services/org.enlightenment.Ethumb.service
4758 systemd-services/ethumb.service
4759 $po_makefile_in
4760 cmakeconfig/EflConfig.cmake
4761 cmakeconfig/EflConfigVersion.cmake:cmakeconfig/EFLConfigVersion.cmake.in
4762 cmakeconfig/EinaConfig.cmake
4763 cmakeconfig/EinaConfigVersion.cmake:cmakeconfig/EFLConfigVersion.cmake.in
4764 cmakeconfig/EioConfig.cmake
4765 cmakeconfig/EioConfigVersion.cmake:cmakeconfig/EFLConfigVersion.cmake.in
4766 cmakeconfig/EezeConfig.cmake
4767 cmakeconfig/EezeConfigVersion.cmake:cmakeconfig/EFLConfigVersion.cmake.in
4768 cmakeconfig/EoConfig.cmake
4769 cmakeconfig/EoConfigVersion.cmake:cmakeconfig/EFLConfigVersion.cmake.in
4770 cmakeconfig/EolianConfig.cmake
4771 cmakeconfig/EolianConfigVersion.cmake:cmakeconfig/EFLConfigVersion.cmake.in
4772 cmakeconfig/EolianCxxConfig.cmake
4773 cmakeconfig/EolianCxxConfigVersion.cmake:cmakeconfig/EFLConfigVersion.cmake.in
4774 cmakeconfig/EinaCxxConfig.cmake
4775 cmakeconfig/EinaCxxConfigVersion.cmake:cmakeconfig/EFLConfigVersion.cmake.in
4776 cmakeconfig/EoCxxConfig.cmake
4777 cmakeconfig/EoCxxConfigVersion.cmake:cmakeconfig/EFLConfigVersion.cmake.in
4778 cmakeconfig/EcoreCxxConfig.cmake
4779 cmakeconfig/EcoreCxxConfigVersion.cmake:cmakeconfig/EFLConfigVersion.cmake.in
4780 cmakeconfig/EvasCxxConfig.cmake
4781 cmakeconfig/EvasCxxConfigVersion.cmake:cmakeconfig/EFLConfigVersion.cmake.in
4782 cmakeconfig/EetCxxConfig.cmake
4783 cmakeconfig/EetCxxConfigVersion.cmake:cmakeconfig/EFLConfigVersion.cmake.in
4784 cmakeconfig/EetConfig.cmake
4785 cmakeconfig/EetConfigVersion.cmake:cmakeconfig/EFLConfigVersion.cmake.in
4786 cmakeconfig/EvasConfig.cmake
4787 cmakeconfig/EvasConfigVersion.cmake:cmakeconfig/EFLConfigVersion.cmake.in
4788 cmakeconfig/EcoreConfig.cmake
4789 cmakeconfig/EcoreConfigVersion.cmake:cmakeconfig/EFLConfigVersion.cmake.in
4790 cmakeconfig/EdjeConfig.cmake
4791 cmakeconfig/EdjeConfigVersion.cmake:cmakeconfig/EFLConfigVersion.cmake.in
4792 cmakeconfig/EldbusConfig.cmake
4793 cmakeconfig/EldbusConfigVersion.cmake:cmakeconfig/EFLConfigVersion.cmake.in
4794 cmakeconfig/EfreetConfig.cmake
4795 cmakeconfig/EfreetConfigVersion.cmake:cmakeconfig/EFLConfigVersion.cmake.in
4796 cmakeconfig/EthumbConfig.cmake
4797 cmakeconfig/EthumbConfigVersion.cmake:cmakeconfig/EFLConfigVersion.cmake.in
4798 cmakeconfig/EthumbClientConfig.cmake
4799 cmakeconfig/EthumbClientConfigVersion.cmake:cmakeconfig/EFLConfigVersion.cmake.in
4800 cmakeconfig/EmotionConfig.cmake
4801 cmakeconfig/EmotionConfigVersion.cmake:cmakeconfig/EFLConfigVersion.cmake.in
4802 cmakeconfig/EluaConfig.cmake
4803 cmakeconfig/EluaConfigVersion.cmake:cmakeconfig/EFLConfigVersion.cmake.in
4804 cmakeconfig/EmileConfig.cmake
4805 cmakeconfig/EmileConfigVersion.cmake:cmakeconfig/EFLConfigVersion.cmake.in
4806 ])
4807
4808 AC_OUTPUT
4809
4810 #### Work around bug in automake check macro
4811 ## yes it is hugly, but no choice here for now.
4812 $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
4813
4814 if test -f $srcdir/config.status; then
4815    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"
4816    $SED -i "s|as_fn_exit 0|$TO|" $srcdir/config.status
4817 fi
4818
4819 #### Info
4820
4821 EFL_ADD_FEATURE([EO], [eo-id], [${want_eo_id}])
4822
4823 case $host_cpu in
4824   i*86|x86_64|amd64)
4825     EFL_ADD_FEATURE([cpu], [mmx], [${build_cpu_mmx}])
4826     EFL_ADD_FEATURE([cpu], [sse3], [${build_cpu_sse3}])
4827     ;;
4828   *power* | *ppc*)
4829     EFL_ADD_FEATURE([cpu], [altivec], [${build_cpu_altivec}])
4830     ;;
4831   arm*)
4832     EFL_ADD_FEATURE([cpu], [neon], [${build_cpu_neon}])
4833     ;;
4834   aarch64*)
4835     EFL_ADD_FEATURE([cpu], [neon], [${build_cpu_neon}])
4836     ;;
4837 esac
4838
4839 if test "${have_linux}" = "yes"; then
4840    EFL_ADD_FEATURE([system], [inotify])
4841    EFL_ADD_FEATURE([system], [atfile_source])
4842 elif test "${have_windows}" = "yes"; then
4843    EFL_ADD_FEATURE([system], [notify_win32])
4844 fi
4845 EFL_ADD_FEATURE([system], [ipv6])
4846
4847 if test "x${efl_have_posix_threads_spinlock}" = "xyes" || test "x${efl_have_osx_spinlock}" = "xyes"; then
4848    efl_have_spinlock="yes"
4849 else
4850    efl_have_spinlock="no"
4851 fi
4852 EFL_ADD_FEATURE([thread], [spinlocks], [${efl_have_spinlock}])
4853 EFL_ADD_FEATURE([thread], [barrier], [${efl_have_pthread_barrier}])
4854 EFL_ADD_FEATURE([thread], [affinity], [${efl_have_setaffinity}])
4855
4856 echo
4857 echo
4858 echo
4859 echo "------------------------------------------------------------------------"
4860 echo "$PACKAGE_NAME $PACKAGE_VERSION"
4861 echo "------------------------------------------------------------------------"
4862 echo
4863
4864 if test "x${have_windows}" = "xyes" ; then
4865    osname="${host_os}(${_efl_windows_version})"
4866 else
4867    osname="${host_os}"
4868 fi
4869
4870 echo "Configuration...: ${COLOR_OTHER}profile=${build_profile} os=${osname}${COLOR_RESET}"
4871 echo "  EFL API Set...: ${efl_api}"
4872 echo "  CPU Extensions: ${host_cpu} (${features_cpu})"
4873 echo "  System Feature: ${features_system}"
4874 echo "  Threads.......: ${efl_have_threads} (${features_thread})"
4875 echo "  Cryptography..: ${build_crypto}"
4876 echo "  X11...........: ${with_x11}"
4877 echo "  OpenGL........: ${with_opengl}"
4878 echo "  C++11.........: ${have_cxx11}"
4879 echo "Eina............: yes (${features_eina} unwind=$have_unwind)"
4880 echo "Eo..............: yes (${features_eo})"
4881 echo "Eolian..........: yes (${features_eolian})"
4882 echo "Emile...........: yes (${features_emile})"
4883 echo "Eet.............: yes"
4884 echo "Evas............: yes (${features_evas})"
4885 echo "  Engines.......: ${features_evas_engine}"
4886 echo "  Image Loaders.: ${features_evas_loader}"
4887 if test "x${have_pixman}" = "xyes" ; then
4888 echo "  Pixman........: ${features_evas_pixman}"
4889 fi
4890 echo "Ecore...........: yes (${features_ecore})"
4891 echo "Ecore_Con.......: yes (${features_ecore_con})"
4892 echo "Ecore_File......: yes"
4893 echo "Ecore_IMF.......: yes (${features_ecore_imf})"
4894 echo "Ecore_X.........: ${with_x11} (${features_ecore_x})"
4895 echo "Ecore_SDL.......: $want_sdl"
4896 echo "Ecore_Wayland...: $want_wayland"
4897 echo "IVI-Shell.......: $want_wayland_ivi_shell"
4898 echo "Ecore_Buffer....: $want_ecore_buffer (${features_ecore_buffer})"
4899 if test "${have_linux}" = "yes"; then
4900 echo "Ecore_FB........: $want_fb (${features_ecore_fb})"
4901 elif test "${have_ps3}" = "yes"; then
4902 echo "Ecore_PSL1GHT...: $have_ps3"
4903 elif test "${have_darwin}" = "yes"; then
4904 echo "Ecore_Cocoa.....: $efl_lib_optional_ecore_cocoa"
4905 elif test "${have_windows}" = "yes"; then
4906 echo "Ecore_Win32.....: $have_win32"
4907 fi
4908 echo "Ecore_Audio.....: ${efl_lib_optional_ecore_audio} (${features_ecore_audio})"
4909 echo "Ecore_Avahi.....: yes (${features_ecore_avahi})"
4910 echo "Ecore_Evas......: yes (${features_ecore_evas})"
4911 echo "Ector...........: yes"
4912 echo "Eeze............: ${efl_lib_optional_eeze} (${features_eeze})"
4913 echo "EPhysics........: ${efl_lib_optional_ephysics}"
4914 echo "Edje............: yes (${features_edje})"
4915 echo "Emotion.........: yes (${features_emotion})"
4916 echo "Ethumb..........: yes"
4917 echo "Ethumb_Client...: yes"
4918 echo "Elua............: $have_elua"
4919 if test "${build_tests}" = "none"; then
4920 echo "Tests...........: no"
4921 elif test "${build_tests}" = "auto"; then
4922 echo "Tests...........: make check (inexplicitly enabled)"
4923 elif test "${build_tests}" = "regular"; then
4924 echo "Tests...........: make check"
4925 elif test "${build_tests}" = "coverage"; then
4926 echo "Tests...........: make lcov-check"
4927 fi
4928 echo "Examples........: make examples (make install-examples)"
4929 if test "x${build_doc}" = "xyes"; then
4930 echo "Documentation...: make doc"
4931 else
4932 echo "Documentation...: no"
4933 fi
4934 echo "Compilation.....: make (or gmake)"
4935 echo "  CPPFLAGS......: $CPPFLAGS"
4936 echo "  CFLAGS........: $CFLAGS"
4937 echo "  CXXFLAGS......: $CXXFLAGS"
4938 echo "  LDFLAGS.......: $LDFLAGS"
4939
4940 if test "x${with_binary_edje_cc}" != "x"; then
4941 echo "  edje_cc.......: ${with_binary_edje_cc}"
4942 fi
4943
4944 if test "x${with_binary_eolian_gen}" != "x"; then
4945 echo "  eolian_gen....: ${with_binary_eolian_gen}"
4946 fi
4947
4948 if test "x${with_binary_eolian_cxx}" != "x"; then
4949 echo "  eolian_cxx....: ${with_binary_eolian_cxx}"
4950 fi
4951
4952 if test "x${with_binary_elua_bin}" != "x"; then
4953 echo "  elua..........: ${with_binary_elua_bin}"
4954 fi
4955
4956 echo "  "
4957 echo "Installation....: make install (as root if needed, with 'su' or 'sudo')"
4958 echo "  prefix........: $prefix"
4959 echo "  dbus units....: $dbusservicedir"
4960 if test "${have_systemd_user_session}" = "yes"; then
4961 echo "  systemd units.: $USER_SESSION_DIR"
4962 fi
4963 echo
4964
4965 if test "x${have_systemd_pkg}" = "xyes" -a "x${want_systemd}" = "xno"; then
4966    echo " _________________________________________"
4967    echo "/ Systemd dependency is available on your \\"
4968    echo "| system, but you are building without    |"
4969    echo "| systemd support. Don't forget to        |"
4970    echo "| --enable-systemd if you want systemd    |"
4971    echo "\\ integration for EFL.                    /"
4972    echo " -----------------------------------------"
4973    echo "        \\   ^__^"
4974    echo "         \\  (oo)\\_______"
4975    echo "            (__)\\       )\\/\\"
4976    echo "                ||----w |"
4977    echo "                ||     ||"
4978 fi
4979
4980 if test -n "$CFOPT_WARNING"; then
4981   echo "_____________________________________________________________________"
4982   echo ""
4983   echo "==-- WARNING --=="
4984   echo ""
4985   echo "_____________________________________________________________________"
4986   if test "x${with_x11}" = "xxcb"; then
4987     echo "_____________________________________________________________________"
4988     echo "You have chosen to use XCB instead of Xlib. It is a myth that XCB"
4989     echo "is amazingly faster than Xlib (when used sensibly). It can be"
4990     echo "faster in a few corner cases on startup of an app, but it comes"
4991     echo "with many downsides. One of those is more complex code inside"
4992     echo "ecore_x, which is far less tested in XCB mode than Xlib. Also"
4993     echo "the big catch is that OpenGL support basically requires Xlib anyway"
4994     echo "so if you want OpenGL in X11, you need Xlib regardless and so you"
4995     echo "gain nothing really in terms of speed and no savings in memory"
4996     echo "because Xlib is still linked, loaded and used, BUT instead you"
4997     echo "have OpenGL drivers working with an hybrid XCB/Xlib (mostly XCB)"
4998     echo "toolkit and this is basically never tested by anyone working on"
4999     echo "the OpenGL drivers, so you will have bugs. Do not enable XCB"
5000     echo "and use OpenGL. XCB is only useful if you wish to shave a few Kb"
5001     echo "off the memory footprint of a whole system and live with less"
5002     echo "tested code, and possibly unimplemented features in ecore_x. To"
5003     echo "remove the XCB setup, remove the --with-x11=xcb option to"
5004     echo "configure."
5005     echo "_____________________________________________________________________"
5006   fi
5007   if test "x${want_physics}" = "xno"; then
5008     echo "_____________________________________________________________________"
5009     echo "You have chosen to disable physics support. This disables lots of"
5010     echo "core functionality and is effectively never tested. You are going"
5011     echo "to find features that suddenly don't work and as a result cause"
5012     echo "a series of breakages. This is simply not tested so you are on"
5013     echo "your own in terms of ensuring everything works if you do this"
5014     echo "_____________________________________________________________________"
5015   fi
5016   if test "x${efl_have_threads}" = "xno"; then
5017     echo "_____________________________________________________________________"
5018     echo "You have disabled threading support. A lot of code is literally"
5019     echo "written to need threading. We never test or even build with"
5020     echo "threading disabled, so doing this is entering uncharted territory."
5021     echo "There is a very good chance things may not compile at all, or if"
5022     echo "the do, they will break at runtime in weird and wonderful ways."
5023     echo "Highly reconsider what you are doing here, or be prepared to deal"
5024     echo "with the fallout yourself."
5025     echo "_____________________________________________________________________"
5026   fi
5027   if test "x${want_fontconfig}" = "xno"; then
5028     echo "_____________________________________________________________________"
5029     echo "You have disabled fontconfig. This is going to make general font"
5030     echo "searching not work, and only some very direct 'load /path/file.ttf'"
5031     echo "will work alongside some old-school ttf file path searching. This"
5032     echo "is very likely not what you want, so highly reconsider turning"
5033     echo "fontconfig off. Having it off will lead to visual problems like"
5034     echo "missing text in many UI areas etc."
5035     echo "_____________________________________________________________________"
5036   fi
5037   if test "x${want_fribidi}" = "xno"; then
5038     echo "_____________________________________________________________________"
5039     echo "Fribidi is used for handling right-to-left text (like Arabic,"
5040     echo "Hebrew, Farsi, Persian etc.) and is very likely not a feature"
5041     echo "you want to disable unless you know for absolute certain you"
5042     echo "will never encounter and have to display such scripts. Also"
5043     echo "note that we don't test with fribidi disabled so you may also"
5044     echo "trigger code paths with bugs that are never normally used."
5045     echo "_____________________________________________________________________"
5046   fi
5047   if test "x${want_pixman}" = "xyes"; then
5048     echo "_____________________________________________________________________"
5049     echo "Pixman allows you to replace some rendering paths in Evas with"
5050     echo "Pixman. Pixman may or may not be faster (probably slower), and"
5051     echo "the rendering paths with Pixman enabled are not tested often so"
5052     echo "this may introduce rendering bugs. Do not turn Pixman on unless"
5053     echo "you wish to deal with these bugs."
5054     echo "_____________________________________________________________________"
5055   fi
5056   if test "x${have_tile_rotate}" = "xyes"; then
5057     echo "_____________________________________________________________________"
5058     echo "Tiled rotation code is not tested much, so be aware that you"
5059     echo "may introduce bugs by enabling this."
5060     echo "_____________________________________________________________________"
5061   fi
5062   if test "x${want_g_main_loop}" = "xyes"; then
5063     echo "_____________________________________________________________________"
5064     echo "Using the Glib mainloop as the mainloop in Ecore is not tested"
5065     echo "regularly, but the glib mainloop integration (on by default) is."
5066     echo "You can use apps that use glib mainloop constructs by default"
5067     echo "this way, but the Ecore mainloop is not built on top of glib."
5068     echo "You have enabled ecore to be built on top of glib and thus you"
5069     echo "may experience bugs that normally would not be there. Be prepared"
5070     echo "to fix these if they arise."
5071     echo "_____________________________________________________________________"
5072   fi
5073   if test "x${want_gstreamer}" = "xyes"; then
5074     echo "_____________________________________________________________________"
5075     echo "Gstreamer 0.10 is no longer supported, and EFL has moved to use"
5076     echo "Gstreamer 1.x. The old Gstremaer code is not tested or maintained"
5077     echo "and will eventually be removed entirely. Don't enable the old"
5078     echo "Gstreamer support unless you want to deal with the issues yourself."
5079     echo "_____________________________________________________________________"
5080   fi
5081   if test "x${want_gstreamer1}" = "xno"; then
5082     echo "_____________________________________________________________________"
5083     echo "You disabled Gstreamer 1.x support. You likely don't want to do"
5084     echo "this as it will heavily limit your media support options and render"
5085     echo "some functionality as useless, leading to visible application bugs."
5086     echo "_____________________________________________________________________"
5087   fi
5088   if test "x${want_eo_id}" = "xno"; then
5089     echo "_____________________________________________________________________"
5090     echo "Eo's ID abstraction interface is a major safety system that"
5091     echo "protects code from crashing or misbehaving in many cases. It does"
5092     echo "come at a slight cost, but the safety and protection is worth it."
5093     echo "Also by disabling this, you may also introduce security holes in"
5094     echo "EFL as well as cause all sorts of previously non-existant crashes."
5095     echo "Seriously reconsider disabling EO ID."
5096     echo "_____________________________________________________________________"
5097   fi
5098   if test "x${want_evas_cserve2}" = "xno"; then
5099     echo "_____________________________________________________________________"
5100     echo "Evas Cserve is built and on by default and no testing is done"
5101     echo "for the old non-cserve2 code paths, so by disabling this you"
5102     echo "may be introducing bugs. Be aware of this and be prepared to"
5103     echo "deal with the bugs as a result of this."
5104     echo "_____________________________________________________________________"
5105   fi
5106   if test "x${want_audio}" = "xno"; then
5107     echo "_____________________________________________________________________"
5108     echo "You disabled audio support in Ecore. This is not tested and may"
5109     echo "Create bugs for you due to it creating untested code paths."
5110     echo "Reconsider disabling audio."
5111     echo "_____________________________________________________________________"
5112   fi
5113   if test "x${have_darwin}" = "xno" -a "x${want_pulseaudio}" = "xno"; then
5114     echo "_____________________________________________________________________"
5115     echo "The only audio output method supported by Ecore right now on your"
5116     echo "system is via Pulseaudio. You have disabled that and likely have"
5117     echo "broken a whole bunch of things in the process. Reconsider your"
5118     echo "configure options."
5119     echo "_____________________________________________________________________"
5120   fi
5121   if test "x${want_xinput2}" = "xno"; then
5122     echo "_____________________________________________________________________"
5123     echo "You have disabled xinput2 support. This means a whole lot of input"
5124     echo "devices in X11 will not work correctly. You likely do not want to"
5125     echo "do this."
5126     echo "_____________________________________________________________________"
5127   fi
5128   if test "x${want_xim}" = "xno"; then
5129     echo "_____________________________________________________________________"
5130     echo "You disabled XIM input method support. This is the most basic and"
5131     echo "core input method protocol supported in X11 and you almost certainly"
5132     echo "want the support for it. Input methods allow for complex text input"
5133     echo "like for Chinese, Japanese and Korean as well as virtual keyboards"
5134     echo "on touch/mobile devices."
5135     echo "_____________________________________________________________________"
5136   fi
5137   if test "x${want_scim}" = "xno"; then
5138     echo "_____________________________________________________________________"
5139     echo "SCIM is a modern and very common input method framework and you"
5140     echo "disabled support for it. You very likely want the support for"
5141     echo "complex language input, so please reconsider this. Input methods"
5142     echo "allow for complex text input like for Chinese, Japanese and Korean"
5143     echo "as well as virtual keyboards on touch/mobile devices."
5144     echo "_____________________________________________________________________"
5145   fi
5146   if test "x${want_libmount}" = "xno"; then
5147     echo "_____________________________________________________________________"
5148     echo "Libmount has been disabled, and it is used heavily inside Eeze"
5149     echo "for support of removable devices etc. and disabling this will"
5150     echo "hurt support for Enlightenment and its filemanager."
5151     echo "_____________________________________________________________________"
5152   fi
5153   if test "x${want_multisense}" = "xno"; then
5154     echo "_____________________________________________________________________"
5155     echo "Multisense has been disabled. This causes Edje audio suport to"
5156     echo "Simply not work, and will break applications and libraries"
5157     echo "that rely on it with users then reporting bugs."
5158     echo "If you want to mute audio, there are APIs and policies to do"
5159     echo "that, as opposed to compiling it out."
5160     echo "_____________________________________________________________________"
5161   fi
5162   if test "x${efl_api}" = "xeo"; then
5163     echo "_____________________________________________________________________"
5164     echo "Using the EO based EFL API only does not work at the moment. We still"
5165     echo "have a lot code that depends on the legacy interfaces. We provide"
5166     echo "this option for testing once we are able to migrate to the EO based"
5167     echo "API."
5168     echo "If you are not working on this migration please leave the option set"
5169     echo "to both as it will break your build if set to eo."
5170     echo "_____________________________________________________________________"
5171   fi
5172   if test "x${want_libeeze}" = "xno"; then
5173     echo "_____________________________________________________________________"
5174     echo "Libeeze has been disabled, and it is used heavily for support of"
5175     echo "removable devices etc. and disabling this will hurt support for"
5176     echo "Enlightenment and its filemanager."
5177     echo "_____________________________________________________________________"
5178   fi
5179   echo "_____________________________________________________________________"
5180   echo ""
5181   echo "==-- WARNING --=="
5182   echo ""
5183   echo "_____________________________________________________________________"
5184   if test -n "$BARF_OK"; then
5185     echo "Please add the following option to acknowledge this:"
5186     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"
5187     echo "_____________________________________________________________________"
5188     rm -f Makefile
5189     exit 1
5190   fi
5191   sleep 10
5192 fi
5193
5194 if test "x$prefix" != "x/usr"; then
5195   old=
5196   path=$dbusservicedir
5197   while test "x$old" != "x$path"; do
5198     old=$path
5199     eval path="\"$path\""
5200   done
5201   resolved_dbusservicedir=$path
5202
5203   old=
5204   path=$USER_SESSION_DIR
5205   while test "x$old" != "x$path"; do
5206     old=$path
5207     eval path="\"$path\""
5208   done
5209   resolved_USER_SESSION_DIR=$path
5210   base_USER_SESSION_DIR=`echo "$resolved_USER_SESSION_DIR" | sed -e 's:^\(.*\)/systemd/user/*$:\1:g'`
5211
5212   old=
5213   path=$datadir
5214   while test "x$old" != "x$path"; do
5215     old=$path
5216     eval path="\"$path\""
5217   done
5218   resolved_datadir=$path
5219
5220   needs_alert_dbus=0
5221   if test "$resolved_dbusservicedir" = "${HOME}/.local/share/dbus-1/services"; then
5222     AC_MSG_NOTICE([installing DBus services in user local "$resolved_dbusservicedir". Only accessible to user $USER])
5223   elif echo "$resolved_dbusservicedir" | grep -e '^/usr/s' >/dev/null 2>/dev/null; then
5224     AC_MSG_NOTICE([installing DBus serivces in $resolved_dbusservicedir])
5225   else
5226     needs_alert_dbus=1
5227   fi
5228
5229   needs_alert_systemd=0
5230   if test "$have_systemd_user_session" = "yes"; then
5231     if test "$resolved_USER_SESSION_DIR" = "${HOME}/.config/systemd/user"; then
5232       AC_MSG_NOTICE([installing systemd services in user local "$resolved_USER_SESSION_DIR". Only accessible to user $USER])
5233     elif echo "$resolved_USER_SESSION_DIR" | grep -e '^/usr/s' >/dev/null 2>/dev/null; then
5234       AC_MSG_NOTICE([installing systemd serivces in $resolved_USER_SESSION_DIR])
5235     else
5236        needs_alert_systemd=1
5237     fi
5238   fi
5239
5240   if test $needs_alert_dbus -eq 1 -o $needs_alert_systemd -eq 1; then
5241     if test $needs_alert_dbus -eq 1 -a $needs_alert_systemd -eq 1; then
5242       what_alert="dbus and systemd"
5243     elif test $needs_alert_dbus -eq 1; then
5244       what_alert="dbus"
5245     else
5246       what_alert="systemd"
5247     fi
5248
5249     echo ""
5250     echo "#-------------------------------------------------------------------#"
5251     echo "##==--                          ALERT                          --==##"
5252     echo "#-------------------------------------------------------------------#"
5253     echo ""
5254     echo "  Your installation prefix is *NOT* /usr so this means you need"
5255     echo "to ensure some files are visible to $what_alert otherwise services cannot"
5256     echo "be started when needed. You will need to do the following:"
5257     if test $needs_alert_dbus -eq 1; then
5258       echo ""
5259       echo "System-wide installation:"
5260       echo "  ln -s ${resolved_dbusservicedir}/org.enlightenment.Ethumb.service /usr/share/dbus-1/services/org.enlightenment.Ethumb.service"
5261       echo ""
5262       echo "  or add \"${resolved_datadir}\" to \$XDG_DATA_DIRS"
5263       echo ""
5264       echo "User installation:"
5265       echo "  ln -s ${resolved_dbusservicedir}/org.enlightenment.Ethumb.service ~/.local/share/dbus-1/services/org.enlightenment.Ethumb.service"
5266     fi
5267     if test $needs_alert_systemd -eq 1; then
5268       echo ""
5269       echo "System-wide installation:"
5270       echo "  ln -s ${resolved_USER_SESSION_DIR}/ethumb.service /usr/lib/systemd/user/ethumb.service"
5271       echo ""
5272       echo "  or add \"${base_USER_SESSION_DIR}\" to \$XDG_DATA_DIRS or \$XDG_CONFIG_DIRS"
5273       echo ""
5274       echo "User installation:"
5275       echo "  ln -s ${resolved_USER_SESSION_DIR}/ethumb.service ~/.config/systemd/user/ethumb.service"
5276     fi
5277     echo ""
5278     echo "#-------------------------------------------------------------------#"
5279   fi
5280 fi
5281
5282 if test "x${efl_deprecated_option}" = "xyes"; then
5283   echo ""
5284   echo "#-------------------------------------------------------------------#"
5285   echo "##==--                          ALERT                          --==##"
5286   echo "#-------------------------------------------------------------------#"
5287   echo ""
5288   echo "  Your build script is using a deprecated option. It will get b0rken"
5289   echo "with the next release of EFL. You better update it now than later."
5290   echo ""
5291   echo "#-------------------------------------------------------------------#"
5292 fi
5293