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