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