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