build: rename Eolian helper cmake file to mark it as input
[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
2847 ### Checks for header files
2848
2849 EFL_ADD_LIBS([ECORE_COCOA], [-framework Cocoa])
2850
2851 ### Checks for types
2852
2853 ### Checks for structures
2854
2855 ### Checks for compiler characteristics
2856
2857 ### Checks for linker characteristics
2858
2859 ### Checks for library functions
2860
2861 EFL_LIB_END_OPTIONAL([Ecore_Cocoa])
2862 #### End of Ecore_Cocoa
2863
2864
2865 #### Ecore_FB
2866 EFL_LIB_START_OPTIONAL([Ecore_FB], [test "${want_fb}" = "yes"])
2867
2868 ### Additional options to configure
2869 AC_ARG_ENABLE([tslib],
2870    [AS_HELP_STRING([--disable-tslib],[disable tslib for touchscreen events.])],
2871    [
2872     if test "x${enableval}" = "xyes" ; then
2873        want_tslib="yes"
2874     else
2875        want_tslib="no"
2876     fi
2877    ], [want_tslib="yes"])
2878
2879 ### Default values
2880
2881 ### Checks for programs
2882
2883 ### Checks for libraries
2884 EFL_INTERNAL_DEPEND_PKG([ECORE_FB], [ecore])
2885 EFL_INTERNAL_DEPEND_PKG([ECORE_FB], [ecore-input])
2886 EFL_INTERNAL_DEPEND_PKG([ECORE_FB], [eo])
2887 EFL_INTERNAL_DEPEND_PKG([ECORE_FB], [eina])
2888
2889 EFL_OPTIONAL_DEPEND_PKG([ECORE_FB], [${want_tslib}], [TSLIB], [tslib])
2890 EFL_ADD_FEATURE([ECORE_FB], [tslib])
2891
2892 EFL_EVAL_PKGS([ECORE_FB])
2893
2894 ### Checks for header files
2895
2896 have_ecore_fb="no"
2897 AC_CHECK_HEADER([linux/fb.h],
2898    [AC_CHECK_HEADER([linux/input.h], [have_ecore_fb="yes"])])
2899 if test "${have_ecore_fb}" = "no"; then
2900    AC_MSG_ERROR([Missing linux/input.h or linux/fb.h])
2901 fi
2902
2903 ### Checks for types
2904
2905 ### Checks for structures
2906
2907 ### Checks for compiler characteristics
2908
2909 ### Checks for linker characteristics
2910
2911 ### Checks for library functions
2912
2913 EFL_LIB_END_OPTIONAL([Ecore_FB])
2914 #### End of Ecore_FB
2915
2916
2917 #### Ecore_Psl1ght
2918 EFL_LIB_START_OPTIONAL([Ecore_Psl1ght], [test "${have_ps3}" = "yes"])
2919
2920 ### Additional options to configure
2921
2922 ### Default values
2923
2924 ### Checks for programs
2925
2926 ### Checks for libraries
2927 EFL_PLATFORM_DEPEND([ECORE_PSL1GHT], [escape])
2928
2929 EFL_INTERNAL_DEPEND_PKG([ECORE_PSL1GHT], [ecore-input])
2930 EFL_INTERNAL_DEPEND_PKG([ECORE_PSL1GHT], [ecore])
2931 EFL_INTERNAL_DEPEND_PKG([ECORE_PSL1GHT], [eo])
2932 EFL_INTERNAL_DEPEND_PKG([ECORE_PSL1GHT], [eina])
2933
2934 EFL_ADD_LIBS([ECORE_PSL1GHT], [-lio -lsysutil -lgem -lcamera -lspurs])
2935
2936 ### Checks for header files
2937
2938 ### Checks for types
2939
2940 ### Checks for structures
2941
2942 ### Checks for compiler characteristics
2943
2944 ### Checks for linker characteristics
2945
2946 ### Checks for library functions
2947
2948 EFL_LIB_END_OPTIONAL([Ecore_Psl1ght])
2949 #### End of Ecore_Psl1ght
2950
2951
2952 #### Ecore_SDL
2953 EFL_LIB_START_OPTIONAL([Ecore_SDL], [test "${want_sdl}" = "yes"])
2954
2955 ### Additional options to configure
2956
2957 ### Default values
2958
2959 ### Checks for programs
2960
2961 ### Checks for libraries
2962 EFL_PLATFORM_DEPEND([ECORE_SDL], [all])
2963 EFL_INTERNAL_DEPEND_PKG([ECORE_SDL], [ecore-input])
2964 EFL_INTERNAL_DEPEND_PKG([ECORE_SDL], [ecore])
2965 EFL_INTERNAL_DEPEND_PKG([ECORE_SDL], [eo])
2966 EFL_INTERNAL_DEPEND_PKG([ECORE_SDL], [eina])
2967
2968 EFL_DEPEND_PKG([ECORE_SDL], [SDL], [sdl2 >= 2.0.0])
2969
2970 EFL_EVAL_PKGS([ECORE_SDL])
2971
2972 ### Checks for header files
2973
2974 ### Checks for types
2975
2976 ### Checks for structures
2977
2978 ### Checks for compiler characteristics
2979
2980 ### Checks for linker characteristics
2981
2982 ### Checks for library functions
2983
2984 EFL_LIB_END_OPTIONAL([Ecore_SDL])
2985 #### End of Ecore_SDL
2986
2987
2988 #### Ecore_Wayland
2989 EFL_LIB_START_OPTIONAL([Ecore_Wayland], [test "${want_wayland}" = "yes"])
2990
2991 if test "x${want_wayland_ivi_shell}" = "xyes" ; then
2992    AC_DEFINE(USE_IVI_SHELL, 1, [Ecore_Wayland IVI-Shell Support])
2993 fi
2994
2995 ### Additional options to configure
2996
2997 ### Default values
2998
2999 ### Checks for programs
3000
3001 ### Checks for libraries
3002 EFL_INTERNAL_DEPEND_PKG([ECORE_WAYLAND], [ecore-input])
3003 EFL_INTERNAL_DEPEND_PKG([ECORE_WAYLAND], [ecore])
3004 EFL_INTERNAL_DEPEND_PKG([ECORE_WAYLAND], [eo])
3005 EFL_INTERNAL_DEPEND_PKG([ECORE_WAYLAND], [eina])
3006
3007 EFL_DEPEND_PKG([ECORE_WAYLAND], [WAYLAND],
3008    [wayland-client >= 1.8.0 wayland-cursor >= 1.8.0 xkbcommon >= 0.5.0])
3009
3010 EFL_EVAL_PKGS([ECORE_WAYLAND])
3011
3012 ### Checks for header files
3013
3014 ### Checks for types
3015
3016 ### Checks for structures
3017
3018 ### Checks for compiler characteristics
3019
3020 ### Checks for linker characteristics
3021
3022 ### Checks for library functions
3023
3024 EFL_LIB_END_OPTIONAL([Ecore_Wayland])
3025 #### End of Ecore_Wayland
3026
3027 #### Eldbus
3028 EFL_LIB_START([Eldbus])
3029
3030 ### Additional options to configure
3031
3032 ### Default values
3033
3034 ### Checks for programs
3035
3036 ## Compatibility layers
3037 EFL_PLATFORM_DEPEND([ELDBUS], [evil])
3038
3039 ### Checks for libraries
3040 EFL_INTERNAL_DEPEND_PKG([ELDBUS], [ecore])
3041 EFL_INTERNAL_DEPEND_PKG([ELDBUS], [eo])
3042 EFL_INTERNAL_DEPEND_PKG([ELDBUS], [eina])
3043
3044 EFL_DEPEND_PKG([ELDBUS], [DBUS], [dbus-1])
3045
3046 EFL_EVAL_PKGS([ELDBUS])
3047
3048 ### Checks for header files
3049
3050 ### Checks for types
3051
3052 ### Checks for structures
3053
3054 ### Checks for compiler characteristics
3055
3056 ### Checks for linker characteristics
3057
3058 ### Checks for library functions
3059
3060 EFL_LIB_END([Eldbus])
3061 #### End of Eldbus
3062
3063
3064 #### Eeze
3065 have_libmount_new="no"
3066 have_libmount_old="no"
3067 have_eeze_mount="no"
3068
3069 EFL_LIB_START_OPTIONAL([Eeze], [test "x${build_libeeze}" = "xyes"])
3070
3071 ### Additional options to configure
3072 AC_ARG_WITH([mount],
3073   [AS_HELP_STRING([--with-mount], [specify mount bin @<:@default=detect@:>@])],
3074   [with_eeze_mount=$withval], [with_eeze_mount="detect"])
3075 AC_ARG_WITH([umount],
3076   [AS_HELP_STRING([--with-umount], [specify umount bin @<:@default=detect@:>@])],
3077   [with_eeze_umount=$withval], [with_eeze_umount="detect"])
3078 AC_ARG_WITH([eject],
3079   [AS_HELP_STRING([--with-eject], [specify eject bin @<:@default=detect@:>@])],
3080   [with_eeze_eject=$withval], [with_eeze_eject="detect"])
3081
3082 ### Default values
3083
3084 ### Checks for programs
3085
3086 ### Checks for libraries
3087 EFL_INTERNAL_DEPEND_PKG([EEZE], [eina])
3088 EFL_INTERNAL_DEPEND_PKG([EEZE], [ecore])
3089 EFL_INTERNAL_DEPEND_PKG([EEZE], [eo])
3090 EFL_INTERNAL_DEPEND_PKG([EEZE], [ecore-file])
3091 EFL_INTERNAL_DEPEND_PKG([EEZE], [ecore-con])
3092 EFL_INTERNAL_DEPEND_PKG([EEZE], [eet])
3093 EFL_INTERNAL_DEPEND_PKG([EEZE], [emile])
3094
3095 EFL_DEPEND_PKG([EEZE], [UDEV], [libudev >= 148])
3096
3097 AC_ARG_ENABLE([libmount],
3098    [AS_HELP_STRING([--disable-libmount],[disable libmount support. @<:@default=enabled@:>@])],
3099    [
3100     if test "x${enableval}" = "xyes" ; then
3101        want_libmount="yes"
3102     else
3103        want_libmount="no"
3104        CFOPT_WARNING="xyes"
3105     fi
3106    ],
3107    [want_libmount="yes"])
3108
3109 EFL_OPTIONAL_DEPEND_PKG([EEZE], [${want_libmount}],
3110    [EEZE_MOUNT], [mount >= 2.18.0])
3111 EFL_ADD_FEATURE([EEZE], [libmount], [${have_eeze_mount}])
3112
3113 PKG_CHECK_EXISTS([libudev < 199],
3114                  [have_libudev_old="yes"],
3115                  [have_libudev_old="no"])
3116 AC_MSG_CHECKING([Use old libudev API (before 199)])
3117 AC_MSG_RESULT([${have_libudev_old}])
3118
3119 PKG_CHECK_EXISTS([mount < 2.19.0],
3120                  [have_libmount_old="yes"],
3121                  [have_libmount_old="no"])
3122 AC_MSG_CHECKING([Use old libmount API (before 2.19.0)])
3123 AC_MSG_RESULT([${have_libmount_old}])
3124
3125 PKG_CHECK_EXISTS([mount == 2.19.0],
3126                  [have_libmount_219="yes"],
3127                  [have_libmount_219="no"])
3128 AC_MSG_CHECKING([Use libmount 2.19.0 API])
3129 AC_MSG_RESULT([${have_libmount_219}])
3130
3131 PKG_CHECK_EXISTS([mount > 2.19.0],
3132                  [have_libmount_new="yes"],
3133                  [have_libmount_new="no"])
3134 AC_MSG_CHECKING([Use new libmount API (newer than 2.19.0)])
3135 AC_MSG_RESULT([${have_libmount_new}])
3136
3137 if test "x${have_libudev_old}" = "xyes"; then
3138   AC_DEFINE_UNQUOTED([OLD_LIBUDEV], [1], [using older version of libudev])
3139 fi
3140
3141 if test "x${have_libmount_old}" = "xyes"; then
3142   AC_DEFINE_UNQUOTED([OLD_LIBMOUNT], [1], [using first version of libmount])
3143 fi
3144
3145 ## modules
3146 if test "${want_tizen}"  = "yes"; then
3147   PKG_CHECK_MODULES([TIZEN_SENSOR], [capi-system-sensor >= 0.1.17])
3148 fi
3149 EFL_ADD_FEATURE([EEZE], [tizen])
3150
3151 EFL_EVAL_PKGS([EEZE])
3152
3153 ### Checks for header files
3154
3155 ### Checks for types
3156
3157 ### Checks for structures
3158
3159 ### Checks for compiler characteristics
3160
3161 ### Checks for linker characteristics
3162
3163 ### Checks for library functions
3164
3165 ### Checks for binaries
3166 if test "x$with_eeze_mount" = "xdetect"; then
3167   AC_PATH_PROG([with_eeze_mount], [mount], [])
3168 fi
3169 AC_DEFINE_UNQUOTED([EEZE_MOUNT_BIN], ["$with_eeze_mount"], [mount bin to use])
3170
3171 if test "x$with_eeze_umount" = "xdetect";then
3172   AC_PATH_PROG([with_eeze_umount], [umount], [])
3173 fi
3174 AC_DEFINE_UNQUOTED([EEZE_UNMOUNT_BIN], ["$with_eeze_umount"], [umount bin to use])
3175
3176 if test "x$with_eeze_eject" = "xdetect";then
3177   AC_PATH_PROG([with_eeze_eject], [eject], [])
3178 fi
3179 AC_DEFINE_UNQUOTED([EEZE_EJECT_BIN], ["$with_eeze_eject"], [eject bin to use])
3180
3181 EFL_LIB_END_OPTIONAL([Eeze])
3182
3183 AM_CONDITIONAL([EEZE_LIBMOUNT_AFTER_219],
3184                [test "x${have_libmount_new}" = "xyes"])
3185 AM_CONDITIONAL([EEZE_LIBMOUNT_BEFORE_219],
3186                [test "x${have_libmount_old}" = "xyes"])
3187 AM_CONDITIONAL([HAVE_EEZE_MOUNT], [test "x${have_eeze_mount}" = "xyes"])
3188 AM_CONDITIONAL([HAVE_EEZE_TIZEN], [test "x${want_tizen}" = "xyes"])
3189 #### End of Eeze
3190
3191
3192 #### Ecore_Drm
3193 have_libinput_new="no"
3194 EFL_LIB_START_OPTIONAL([Ecore_Drm], [test "${want_drm}" = "yes"])
3195
3196 ### Additional options to configure
3197 SUID_CFLAGS=-fPIE
3198 SUID_LDFLAGS=-pie
3199 AC_SUBST([SUID_CFLAGS])
3200 AC_SUBST([SUID_LDFLAGS])
3201
3202 ### Default values
3203
3204 ### Checks for programs
3205
3206 ### Checks for libraries
3207 EFL_INTERNAL_DEPEND_PKG([ECORE_DRM], [ecore])
3208 EFL_INTERNAL_DEPEND_PKG([ECORE_DRM], [ecore-input])
3209 EFL_INTERNAL_DEPEND_PKG([ECORE_DRM], [eldbus])
3210 EFL_INTERNAL_DEPEND_PKG([ECORE_DRM], [eeze])
3211 EFL_INTERNAL_DEPEND_PKG([ECORE_DRM], [eo])
3212 EFL_INTERNAL_DEPEND_PKG([ECORE_DRM], [eina])
3213
3214 EFL_DEPEND_PKG([ECORE_DRM], [DRM], [libdrm >= 2.4 xkbcommon >= 0.3.0 gbm])
3215 EFL_DEPEND_PKG([ECORE_DRM], [LIBINPUT], [libinput >= 0.6.0])
3216
3217 # API change from 0.7 to 0.8. So we define this to support both for now.
3218 PKG_CHECK_EXISTS([libinput >= 0.8.0],
3219                  [have_libinput_new="yes"],
3220                  [have_libinput_new="no"])
3221 AC_MSG_CHECKING([Use new libinput API (newer than 0.8.0)])
3222 AC_MSG_RESULT([${have_libinput_new}])
3223 if test "x${have_libinput_new}" = "xyes";then
3224   AC_DEFINE_UNQUOTED([LIBINPUT_HIGHER_08], [1], [libinput version >= 0.8])
3225 fi
3226 if test "x${have_libinput_new}" = "xno";then
3227   AC_DEFINE_UNQUOTED([LIBINPUT_HIGHER_08], [0], [libinput version >= 0.8])
3228 fi
3229
3230
3231 EFL_EVAL_PKGS([ECORE_DRM])
3232
3233 ### Checks for header files
3234
3235 ### Checks for types
3236
3237 ### Checks for structures
3238
3239 ### Checks for compiler characteristics
3240
3241 ### Checks for linker characteristics
3242
3243 ### Checks for library functions
3244
3245 EFL_LIB_END_OPTIONAL([Ecore_Drm])
3246 #### End of Ecore_Drm
3247
3248
3249 #### Ecore_Audio
3250
3251 AC_ARG_ENABLE([audio],
3252    [AS_HELP_STRING([--disable-audio],[disable audio support. @<:@default=enabled@:>@])],
3253    [
3254     if test "x${enableval}" = "xyes" ; then
3255        want_audio="yes"
3256     else
3257        want_audio="no"
3258        CFOPT_WARNING="xyes"
3259     fi
3260    ],
3261    [want_audio="yes"])
3262
3263 EFL_LIB_START_OPTIONAL([Ecore_Audio], [test "${want_audio}" = "yes"])
3264
3265 ### Additional options to configure
3266
3267 # ALSA support is still not there, thus no option for it yet.
3268 want_alsa="no"
3269
3270 # sndfile is mandatory otherwise it won't read from/write to files.
3271 # TODO: if confirmed sndfile is mandatory, remove this variable
3272 # TODO: and the EFL_OPTIONAL_DEPEND_PKG(), use EFL_DEPEND_PKG()
3273 want_sndfile="yes"
3274
3275 AC_ARG_ENABLE([pulseaudio],
3276    [AS_HELP_STRING([--disable-pulseaudio],[disable pulseaudio sound support. @<:@default=enabled@:>@])],
3277    [
3278     if test "x${enableval}" = "xyes" ; then
3279        want_pulseaudio="yes"
3280     else
3281        want_pulseaudio="no"
3282        CFOPT_WARNING="xyes"
3283     fi
3284    ],
3285    [want_pulseaudio="yes"])
3286
3287 if test "x${have_darwin}" = "xyes"; then
3288    want_pulseaudio="no"
3289    want_alsa="no"
3290    want_coreaudio="yes"
3291 else
3292    want_coreaudio="no"
3293 fi
3294
3295
3296 # CoreAudio flags
3297 if test "x${want_coreaudio}" = "xyes"; then
3298    coreaudio_ldflags=""
3299    have_coreaudio="no"
3300    LIBS_save="$LIBS"
3301    LIBS="$LIBS -framework CoreAudio"
3302    AC_LINK_IFELSE(
3303       [AC_LANG_PROGRAM(
3304          [[
3305 #include <CoreAudio/CoreAudio.h>
3306          ]],
3307          [[
3308 UInt32 size;
3309 AudioDeviceID dev_id;
3310 AudioObjectPropertyAddress prop = {
3311    kAudioHardwarePropertyDefaultOutputDevice,
3312    kAudioObjectPropertyScopeGlobal,
3313    kAudioObjectPropertyElementMaster
3314 };
3315 size = sizeof(AudioDeviceID);
3316 AudioObjectGetPropertyData(kAudioObjectSystemObject, &prop, 0, NULL,
3317                            &size, &dev_id);
3318          ]])],
3319          [
3320           have_coreaudio="yes"
3321           coreaudio_ldflags="-framework CoreAudio"
3322          ],
3323          [have_coreaudio="no"])
3324       LIBS="$LIBS_save"
3325       AC_MSG_CHECKING([whether Apple CoreAudio framework is supported])
3326       AC_MSG_RESULT([${have_coreaudio}])
3327 fi
3328 AC_SUBST(coreaudio_ldflags)
3329 if test "x${have_coreaudio}" = "xyes"; then
3330    AC_DEFINE([HAVE_COREAUDIO], [1], [CoreAudio support enabled])
3331 else
3332    AC_DEFINE([HAVE_COREAUDIO], [0], [CoreAudio support disabled])
3333 fi
3334
3335
3336 ### Default values
3337
3338 ### Checks for programs
3339
3340 ## Compatibility layers
3341 EFL_PLATFORM_DEPEND([ECORE_AUDIO], [evil])
3342
3343 ### Checks for libraries
3344 EFL_INTERNAL_DEPEND_PKG([ECORE_AUDIO], [ecore])
3345 EFL_INTERNAL_DEPEND_PKG([ECORE_AUDIO], [eet])
3346 EFL_INTERNAL_DEPEND_PKG([ECORE_AUDIO], [eo])
3347 EFL_INTERNAL_DEPEND_PKG([ECORE_AUDIO], [eina])
3348 EFL_INTERNAL_DEPEND_PKG([ECORE_AUDIO], [emile])
3349
3350 EFL_ADD_LIBS([ECORE_AUDIO], [-lm])
3351
3352 EFL_OPTIONAL_DEPEND_PKG([ECORE_AUDIO], [${want_alsa}], [ALSA], [alsa])
3353 EFL_OPTIONAL_DEPEND_PKG([ECORE_AUDIO], [${want_pulseaudio}], [PULSE], [libpulse])
3354 EFL_OPTIONAL_DEPEND_PKG([ECORE_AUDIO], [${want_sndfile}], [SNDFILE], [sndfile])
3355
3356 EFL_EVAL_PKGS([ECORE_AUDIO])
3357
3358 EFL_ADD_FEATURE([ECORE_AUDIO], [alsa])
3359 EFL_ADD_FEATURE([ECORE_AUDIO], [pulseaudio])
3360 EFL_ADD_FEATURE([ECORE_AUDIO], [sndfile])
3361 EFL_ADD_FEATURE([ECORE_AUDIO], [coreaudio])
3362
3363 ### Checks for header files
3364
3365 ### Checks for types
3366
3367 ### Checks for structures
3368
3369 ### Checks for compiler characteristics
3370
3371 ### Checks for linker characteristics
3372
3373 ### Checks for library functions
3374
3375 EFL_LIB_END_OPTIONAL([Ecore_Audio])
3376 AM_CONDITIONAL([HAVE_ECORE_AUDIO_PULSE], [test "x${want_pulseaudio}" = "xyes"])
3377 AM_CONDITIONAL([HAVE_ECORE_AUDIO_SNDFILE], [test "x${want_sndfile}" = "xyes"])
3378 AM_CONDITIONAL([HAVE_ECORE_AUDIO_CORE_AUDIO], [test "x${want_coreaudio}" = "xyes"])
3379
3380 #### End of Ecore_Audio
3381
3382 #### Ecore Audio CXX
3383 EFL_LIB_START([Ecore_Audio_Cxx])
3384
3385 EFL_EVAL_PKGS([ECORE_AUDIO_CXX])
3386
3387 EFL_LIB_END([Ecore_Audio_Cxx])
3388 #### End of Ecore Audio CXX
3389
3390 #### Ecore_Win32
3391 EFL_LIB_START_OPTIONAL([Ecore_Win32], [test "${have_win32}" = "yes"])
3392
3393 ### Additional options to configure
3394
3395 ### Default values
3396
3397 ### Checks for programs
3398
3399 ### Checks for libraries
3400 EFL_PLATFORM_DEPEND([ECORE_WIN32], [evil])
3401 EFL_INTERNAL_DEPEND_PKG([ECORE_WIN32], [ecore-input])
3402 EFL_INTERNAL_DEPEND_PKG([ECORE_WIN32], [ecore])
3403 EFL_INTERNAL_DEPEND_PKG([ECORE_WIN32], [eo])
3404 EFL_INTERNAL_DEPEND_PKG([ECORE_WIN32], [eina])
3405
3406 EFL_ADD_LIBS([ECORE_WIN32], [-lole32 -lgdi32])
3407 AC_SUBST([ECORE_WIN32_LIBS])
3408
3409 ### Checks for header files
3410
3411 ### Checks for types
3412
3413 ### Checks for structures
3414
3415 ### Checks for compiler characteristics
3416
3417 ### Checks for linker characteristics
3418
3419 ### Checks for library functions
3420
3421 EFL_LIB_END_OPTIONAL([Ecore_Win32])
3422 #### End of Ecore_Win32
3423
3424 #### Ecore_Avahi
3425
3426 EFL_LIB_START([Ecore_Avahi])
3427
3428 ### Default values
3429
3430 ### Additional options to configure
3431
3432 want_avahi="yes"
3433
3434 AC_ARG_ENABLE([avahi],
3435    [AS_HELP_STRING([--disable-avahi],[disable avahi support. @<:@default=enabled@:>@])],
3436    [
3437     if test "x${enableval}" = "xyes" ; then
3438        want_avahi="yes"
3439     else
3440        want_avahi="no"
3441     fi
3442    ], [
3443     want_avahi="yes"
3444    ])
3445
3446 ### Checks for programs
3447
3448 ## Compatibility layers
3449 EFL_PLATFORM_DEPEND([ECORE_AVAHI], [evil])
3450
3451 ### Checks for libraries
3452 EFL_INTERNAL_DEPEND_PKG([ECORE_AVAHI], [ecore])
3453 EFL_INTERNAL_DEPEND_PKG([ECORE_AVAHI], [eina])
3454 EFL_INTERNAL_DEPEND_PKG([ECORE_AVAHI], [eo])
3455
3456 EFL_OPTIONAL_DEPEND_PKG([ECORE_AVAHI], [${want_avahi}], [AVAHI], [avahi-client], [have_avahi=yes], [have_avahi=no])
3457
3458 EFL_ADD_FEATURE([ECORE_AVAHI], [avahi-client], [${have_avahi}])
3459
3460 # Needed bu example as they use avahi directly in that case
3461 if test "x${have_avahi}" = "xyes"; then
3462    PKG_CHECK_MODULES([AVAHI_CLIENT], [avahi-client])
3463 fi
3464
3465 EFL_EVAL_PKGS([ECORE_AVAHI])
3466
3467 ### Checks for header files
3468
3469 ### Checks for types
3470
3471 ### Checks for structures
3472
3473 ### Checks for compiler characteristics
3474
3475 ### Checks for linker characteristics
3476
3477 ### Checks for library functions
3478
3479 EFL_LIB_END([Ecore_Avahi])
3480
3481 #### End of Ecore_Avahi
3482
3483
3484 #### Ecore_X
3485 EFL_LIB_START_OPTIONAL([Ecore_X], [test "${want_x11_any}" = "yes"])
3486
3487 ### Additional options to configure
3488
3489 AC_ARG_ENABLE([gesture],
3490    [AS_HELP_STRING([--enable-gesture],[enable X11 Gesture extension support])],
3491    [
3492     if test "x${enableval}" = "xyes" ; then
3493        want_gesture="yes"
3494     else
3495        want_gesture="no"
3496     fi
3497    ],
3498    [want_gesture="no"])
3499
3500 AC_ARG_ENABLE([xpresent],
3501    [AS_HELP_STRING([--enable-xpresent],[enable X11 XPresent extension support])],
3502    [
3503     if test "x${enableval}" = "xyes" ; then
3504        want_xpresent="yes"
3505     else
3506        want_xpresent="no"
3507     fi
3508    ],
3509    [want_xpresent="no"])
3510
3511 AC_ARG_ENABLE([xinput2],
3512    [AS_HELP_STRING([--disable-xinput2],[disable X11 XInput v2.x support])],
3513    [
3514     if test "x${enableval}" = "xyes" ; then
3515        want_xinput2="yes"
3516     else
3517        want_xinput2="no"
3518        CFOPT_WARNING="xyes"
3519     fi
3520    ],
3521    [want_xinput2="yes"])
3522
3523 AC_ARG_ENABLE([xinput22],
3524    [AS_HELP_STRING([--enable-xinput22],[enable X11 XInput v2.2+ support])],
3525    [
3526     if test "x${enableval}" = "xyes" ; then
3527        want_xinput22="yes"
3528     else
3529        want_xinput22="no"
3530     fi
3531    ],
3532    [want_xinput22="no"])
3533
3534 AC_ARG_ENABLE([xim],
3535    [AS_HELP_STRING([--disable-xim],[disable X Input Method.])],
3536    [
3537     if test "x${enableval}" = "xyes" ; then
3538        want_xim="yes"
3539     else
3540        want_xim="no"
3541        CFOPT_WARNING="xyes"
3542     fi
3543    ],
3544    [want_xim="yes"])
3545
3546 AC_ARG_ENABLE([scim],
3547    [AS_HELP_STRING([--disable-scim],[disable SCIM.])],
3548    [
3549     if test "x${enableval}" = "xyes" ; then
3550        want_scim="yes"
3551     else
3552        want_scim="no"
3553        CFOPT_WARNING="xyes"
3554     fi
3555    ],
3556    [want_scim="yes"])
3557
3558 AC_ARG_ENABLE([ibus],
3559    [AS_HELP_STRING([--disable-ibus],[disable IBUS.])],
3560    [
3561     if test "x${enableval}" = "xyes" ; then
3562        want_ibus="yes"
3563     else
3564        want_ibus="no"
3565     fi
3566    ],
3567    [want_ibus="yes"])
3568
3569 ### Default values
3570
3571 ### Checks for programs
3572
3573 ### Checks for libraries
3574 EFL_INTERNAL_DEPEND_PKG([ECORE_X], [ecore-input])
3575 EFL_INTERNAL_DEPEND_PKG([ECORE_X], [ecore])
3576 EFL_INTERNAL_DEPEND_PKG([ECORE_X], [eo])
3577 EFL_INTERNAL_DEPEND_PKG([ECORE_X], [eina])
3578
3579 ## Xlib
3580
3581 ## XCB
3582
3583 ### Checks for header files
3584
3585 AC_CHECK_DECL([MAXHOSTNAMELEN], [FOUND_MAXHOSTNAMELEN=yes])
3586
3587 if test "x${FOUND_MAXHOSTNAMELEN}" != "xyes" ; then
3588    FOUND_MAXHOSTNAMELEN="not found"
3589
3590    AC_COMPILE_IFELSE(
3591       [
3592        AC_LANG_PROGRAM(
3593           [[
3594 #include <sys/param.h>
3595           ]],
3596           [[
3597 int h = MAXHOSTNAMELEN;
3598           ]])
3599       ],
3600       [
3601        FOUND_MAXHOSTNAMELEN="sys/param.h"
3602        AC_DEFINE([NEED_SYS_PARAM_H], [1], [Define to 1 if you need <sys/param.h> to define MAXHOSTNAMELEN])
3603       ])
3604
3605    AC_COMPILE_IFELSE(
3606       [
3607        AC_LANG_PROGRAM(
3608           [[
3609 #include <netdb.h>
3610           ]],
3611           [[
3612 int h = MAXHOSTNAMELEN;
3613           ]])
3614       ],
3615       [
3616        FOUND_MAXHOSTNAMELEN="netdb.h"
3617        AC_DEFINE([NEED_NETDB_H], [1], [Define to 1 if you need <netdb.h> to define MAXHOSTNAMELEN])
3618       ])
3619
3620    AC_MSG_CHECKING([for header that defines MAXHOSTNAMELEN])
3621    AC_MSG_RESULT([$FOUND_MAXHOSTNAMELEN])
3622 fi
3623
3624 ## Xlib
3625 if test "x${want_x11_xcb}" = "xyes" ; then
3626    KEYSYMDEFDIR=`$PKG_CONFIG --variable=includedir xproto`/X11
3627    FILES="keysymdef.h XF86keysym.h Sunkeysym.h DECkeysym.h HPkeysym.h"
3628    for i in $FILES; do
3629        if test -f "$KEYSYMDEFDIR/$i"; then
3630          KEYSYMDEFS="$KEYSYMDEFS $KEYSYMDEFDIR/$i"
3631        elif test "x$i" = "xkeysymdef.h"; then
3632          AC_MSG_ERROR([Cannot find keysymdef.h])
3633        fi
3634    done
3635    AC_MSG_CHECKING([keysym definitions])
3636    AC_MSG_RESULT([$KEYSYMDEFS])
3637    AC_SUBST([KEYSYMDEFS])
3638 fi
3639
3640 ### Checks for types
3641
3642 ### Checks for structures
3643
3644 ### Checks for compiler characteristics
3645
3646 ### Checks for linker characteristics
3647
3648 ### Checks for library functions
3649
3650 ## Xlib
3651 if test "x${want_x11_xlib}" = "xyes"; then
3652    EFL_FIND_X(ECORE_X_XLIB,
3653      [X11/Xlib.h X11/Xcursor/Xcursor.h],
3654      [X11 XOpenDisplay Xcursor XcursorImageLoadCursor],
3655      [
3656        use_Xcursor="yes"
3657        AC_DEFINE([ECORE_XCURSOR], 1, [Build support for Xcursor])
3658        EFL_ADD_LIBS([ECORE_X], [$ECORE_X_XLIB_libs])
3659        EFL_ADD_CFLAGS([ECORE_X], [$ECORE_X_XLIB_cflags])
3660      ],[
3661        AC_MSG_ERROR([Xcursor is missing])
3662      ])
3663 fi
3664
3665 if test "x${want_x11_xlib}" = "xyes" ; then
3666    ECORE_CHECK_X_EXTENSION([Xkb], [XKB.h], [X11], [XkbSetDetectableAutoRepeat])
3667    ECORE_CHECK_X_EXTENSION([Xcomposite], [Xcomposite.h], [Xcomposite], [XCompositeQueryExtension])
3668    ECORE_CHECK_X_EXTENSION([Xdamage], [Xdamage.h], [Xdamage], [XDamageSubtract])
3669    ECORE_CHECK_X_EXTENSION([Xdpms], [dpms.h], [Xext], [DPMSQueryExtension])
3670    ECORE_CHECK_X_EXTENSION([Xfixes], [Xfixes.h], [Xfixes], [XFixesExpandRegion])
3671    ECORE_CHECK_X_EXTENSION([Xinerama], [Xinerama.h], [Xinerama], [XineramaQueryScreens])
3672    ECORE_CHECK_X_EXTENSION([Xrandr], [Xrandr.h], [Xrandr], [XRRGetScreenResourcesCurrent])
3673    ECORE_CHECK_X_EXTENSION([Xrender], [Xrender.h], [Xrender], [XRenderFindVisualFormat])
3674    ECORE_CHECK_X_EXTENSION([Xtest], [XTest.h], [Xtst], [XTestFakeKeyEvent])
3675    ECORE_CHECK_X_EXTENSION([Xss], [scrnsaver.h], [Xss], [XScreenSaverSelectInput])
3676
3677    PKG_CHECK_EXISTS([xrandr > 1.3.2], [AC_DEFINE([XRANDR_GOOD], [1], [good xrandr])], [])
3678
3679    if test "${want_xpresent}" = "yes"; then
3680       ECORE_CHECK_X_EXTENSION([Xpresent], [Xpresent.h], [Xpresent], [XPresentQueryExtension])
3681    fi
3682    EFL_ADD_FEATURE([ECORE_X], [xpresent])
3683
3684    if test "${want_gesture}" = "yes"; then
3685       ECORE_CHECK_X_EXTENSION([Xgesture], [gesture.h], [Xgesture], [XGestureQueryExtension])
3686    fi
3687    EFL_ADD_FEATURE([ECORE_X], [gesture])
3688
3689    if test "${want_xinput2}" = "yes"; then
3690       ECORE_CHECK_X_EXTENSION([Xi2], [XInput2.h], [Xi], [XIQueryDevice])
3691    fi
3692    EFL_ADD_FEATURE([ECORE_X], [xinput2])
3693
3694    if test "${want_xinput22}" = "yes"; then
3695       ECORE_CHECK_X_EXTENSION([Xi2_2], [XInput2.h], [Xi],[XIGrabTouchBegin])
3696    fi
3697    EFL_ADD_FEATURE([ECORE_X], [xinput22])
3698
3699    AC_DEFINE([HAVE_ECORE_X_XLIB], [1], [Defined to 1 if Xlib is enabled.])
3700    HAVE_ECORE_X_BACKEND="HAVE_ECORE_X_XLIB"
3701
3702    EFL_EVAL_PKGS([ECORE_X])
3703    EFL_CHECK_FUNCS([ECORE_X], [dlopen dlsym])
3704 fi
3705
3706 ## XCB
3707
3708 if test "${want_x11_xcb}" = "yes"; then
3709 dnl note: added pixman-1 as ecore_xcb_region uses that
3710    EFL_DEPEND_PKG([ECORE_X], [ECORE_X_XCB],
3711       [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])
3712
3713 dnl TODO: remove these ifdefs from code!
3714    AC_DEFINE([ECORE_XCB_COMPOSITE], [1], [Build support for XCB composite])
3715    AC_DEFINE([ECORE_XCB_DAMAGE], [1], [Build support for XCB damage])
3716    AC_DEFINE([ECORE_XCB_DPMS], [1], [Build support for XCB dpms])
3717    AC_DEFINE([ECORE_XCB_RANDR], [1], [Build support for XCB randr])
3718    AC_DEFINE([ECORE_XCB_RENDER], [1], [Build support for XCB render])
3719    AC_DEFINE([ECORE_XCB_SCREENSAVER], [1], [Build support for XCB screensaver])
3720    AC_DEFINE([ECORE_XCB_SHAPE], [1], [Build support for XCB shape])
3721    AC_DEFINE([ECORE_XCB_SYNC], [1], [Build support for XCB sync])
3722    AC_DEFINE([ECORE_XCB_XFIXES], [1], [Build support for XCB xfixes])
3723    AC_DEFINE([ECORE_XCB_XINERAMA], [1], [Build support for XCB xinerama])
3724    AC_DEFINE([ECORE_XCB_XTEST], [1], [Build support for XCB xtest])
3725    AC_DEFINE([ECORE_XCB_CURSOR], [1], [Build support for XCB cursor])
3726
3727    EFL_OPTIONAL_DEPEND_PKG([ECORE_X], [${want_xpresent}], [ECORE_XCB_XPRESENT],
3728       [xcb-present])
3729    AC_DEFINE_IF([ECORE_XCB_XPRESENT], [test "${want_xpresent}" = "yes"],
3730       [1], [Build support for XCB Present])
3731    EFL_ADD_FEATURE([ECORE_X], [xpresent])
3732
3733    EFL_OPTIONAL_DEPEND_PKG([ECORE_X], [${want_gesture}], [ECORE_XCB_GESTURE],
3734       [xcb-gesture])
3735    AC_DEFINE_IF([ECORE_XCB_XGESTURE], [test "${want_gesture}" = "yes"],
3736       [1], [Build support for XCB xgesture])
3737
3738    EFL_ADD_FEATURE([ECORE_X], [gesture])
3739
3740 dnl input extension disabled currently in xcb as xcb-input has some issues
3741 dnl remember to add xcb-xinput to EFL_DEPEND_PKG()
3742 dnl AC_DEFINE([ECORE_XCB_XINPUT], [1], [Build support for XCB input])
3743
3744 dnl dri extension disabled currently in xcb
3745 dnl remember to add xcb-dri2 to EFL_DEPEND_PKG()
3746 dnl AC_DEFINE([ECORE_XCB_DRI], [1], [Build support for XCB dri])
3747
3748    EFL_EVAL_PKGS([ECORE_X])
3749    EFL_CHECK_FUNCS([ECORE_X], [dlopen iconv])
3750
3751    HAVE_ECORE_X_BACKEND="HAVE_ECORE_X_XCB"
3752 fi
3753
3754 EFL_ADD_LIBS([ECORE_X], [${ECORE_X_LIBS}])
3755
3756 AC_SUBST([HAVE_ECORE_X_BACKEND])
3757
3758 EFL_LIB_END_OPTIONAL([Ecore_X])
3759
3760 AM_CONDITIONAL([HAVE_ECORE_X_XLIB], [test "${want_x11_xlib}" = "yes"])
3761 AM_CONDITIONAL([HAVE_ECORE_X_XCB], [test "${want_x11_xcb}" = "yes"])
3762 #### End of Ecore_X
3763
3764
3765 #### Ecore_Imf
3766 EFL_LIB_START([Ecore_Imf])
3767
3768 ### Additional options to configure
3769
3770 ### Default values
3771
3772 want_ecore_imf="yes"
3773 want_ecore_imf_xim="no"
3774 want_ecore_imf_scim="no"
3775 want_ecore_imf_ibus="no"
3776 want_ecore_imf_wayland="no"
3777 want_ecore_imf="yes"
3778
3779 if test "${have_windows}" = "no" && test "${have_darwin}" = "no"; then
3780    want_ecore_imf="yes"
3781    want_ecore_imf_xim="yes"
3782    want_ecore_imf_scim="yes"
3783    want_ecore_imf_ibus="yes"
3784    if test "${want_wayland}" = "yes"; then
3785       want_ecore_imf_wayland="yes"
3786    fi
3787 fi
3788
3789 ### Checks for programs
3790
3791 ## Compatibility layers
3792 EFL_PLATFORM_DEPEND([ECORE_IMF], [evil])
3793
3794 ### Checks for libraries
3795 EFL_PLATFORM_DEPEND([ECORE_IMF], [escape])
3796 EFL_INTERNAL_DEPEND_PKG([ECORE_IMF], [ecore])
3797 EFL_INTERNAL_DEPEND_PKG([ECORE_IMF], [ecore-input])
3798 EFL_INTERNAL_DEPEND_PKG([ECORE_IMF], [eo])
3799 EFL_INTERNAL_DEPEND_PKG([ECORE_IMF], [eina])
3800
3801 if test "x${want_ecore_imf}" = "xyes" ; then
3802    AC_DEFINE([HAVE_ECORE_IMF], [1], [Ecore IMF Support])
3803 fi
3804
3805 ## modules
3806
3807 # ibus
3808
3809 have_ecore_imf_ibus="no"
3810 if test "x${want_ibus}" = "xyes" && test "x${want_ecore_imf_ibus}" = "xyes" && test "x${have_glib}" = "xyes" ; then
3811    PKG_CHECK_MODULES([IBUS],
3812       [ibus-1.0 >= 1.4 glib-2.0],
3813       [
3814        have_ecore_imf_ibus="yes"
3815        AC_DEFINE([BUILD_ECORE_IMF_IBUS], [1], [Ecore Imf IBUS Support])
3816       ],
3817       [have_ecore_imf_ibus="no"])
3818 fi
3819
3820 AM_CONDITIONAL([BUILD_ECORE_IMF_IBUS], [test "x${have_ecore_imf_ibus}" = "xyes"])
3821 EFL_ADD_FEATURE([ECORE_IMF], [ibus], [${have_ecore_imf_ibus}])
3822
3823 # scim
3824
3825 have_ecore_imf_scim="no"
3826 if test "x${want_scim}" = "xyes" && test "x${want_ecore_imf_scim}" = "xyes" ; then
3827    PKG_CHECK_MODULES([SCIM],
3828       [scim],
3829       [
3830        have_ecore_imf_scim="yes"
3831        AC_DEFINE([BUILD_ECORE_IMF_SCIM], [1], [Ecore Imf SCIM Support])
3832       ],
3833       [have_ecore_imf_scim="no"])
3834 fi
3835
3836 AM_CONDITIONAL([BUILD_ECORE_IMF_SCIM], [test "x${have_ecore_imf_scim}" = "xyes"])
3837 EFL_ADD_FEATURE([ECORE_IMF], [scim], [${have_ecore_imf_scim}])
3838
3839 # xim
3840
3841 have_ecore_imf_xim="no"
3842 if test "x${want_xim}" = "xyes" && test "x${want_ecore_imf_xim}" = "xyes" ; then
3843
3844  EFL_FIND_X(ecore_imf_xim,
3845    [X11/Xlib.h],
3846    [X11 XOpenIM],
3847    [
3848      have_ecore_imf_xim=yes
3849      AC_DEFINE([ENABLE_XIM], [1], [Enable X Input Method])
3850    ])
3851 fi
3852
3853 AM_CONDITIONAL([BUILD_ECORE_IMF_XIM], [test "x${have_ecore_imf_xim}" = "xyes"])
3854 EFL_ADD_FEATURE([ECORE_IMF], [xim])
3855
3856 # wayland
3857 if test "x${want_ecore_imf_wayland}" = "xyes" ; then
3858    PKG_CHECK_MODULES([WAYLAND],
3859       [wayland-client >= 1.8.0],
3860       [
3861        have_ecore_imf_wayland="yes"
3862        AC_DEFINE([BUILD_ECORE_IMF_WAYLAND], [1], [Ecore Imf Wayland Support])
3863       ],
3864       [have_ecore_imf_wayland="no"])
3865 fi
3866
3867 AM_CONDITIONAL([BUILD_ECORE_IMF_WAYLAND], [test "x${have_ecore_imf_wayland}" = "xyes"])
3868 EFL_ADD_FEATURE([ECORE_IMF], [wayland], [${want_ecore_imf_wayland}])
3869
3870 ### Checks for header files
3871
3872 ### Checks for types
3873
3874 ### Checks for structures
3875
3876 ### Checks for compiler characteristics
3877
3878 ### Checks for linker characteristics
3879
3880 ### Checks for library functions
3881
3882 EFL_LIB_END([Ecore_Imf])
3883 #### End of Ecore_Imf
3884
3885
3886 #### Ecore_Imf_Evas
3887 EFL_LIB_START([Ecore_Imf_Evas])
3888
3889 ### Additional options to configure
3890
3891 ### Default values
3892
3893 ### Checks for programs
3894
3895 ## Compatibility layers
3896 EFL_PLATFORM_DEPEND([ECORE_IMF_EVAS], [evil])
3897
3898 ### Checks for libraries
3899 EFL_PLATFORM_DEPEND([ECORE_IMF_EVAS], [escape])
3900 EFL_INTERNAL_DEPEND_PKG([ECORE_IMF_EVAS], [ecore-imf])
3901 EFL_INTERNAL_DEPEND_PKG([ECORE_IMF_EVAS], [ecore])
3902 EFL_INTERNAL_DEPEND_PKG([ECORE_IMF_EVAS], [evas])
3903 EFL_INTERNAL_DEPEND_PKG([ECORE_IMF_EVAS], [efl])
3904 EFL_INTERNAL_DEPEND_PKG([ECORE_IMF_EVAS], [eo])
3905 EFL_INTERNAL_DEPEND_PKG([ECORE_IMF_EVAS], [eina])
3906 EFL_INTERNAL_DEPEND_PKG([ECORE_IMF_EVAS], [emile])
3907
3908 ### Checks for header files
3909
3910 ### Checks for types
3911
3912 ### Checks for structures
3913
3914 ### Checks for compiler characteristics
3915
3916 ### Checks for linker characteristics
3917
3918 ### Checks for library functions
3919
3920 EFL_LIB_END([Ecore_Imf_Evas])
3921 #### End of Ecore_Imf_Evas
3922
3923
3924 #### Ecore_Evas
3925 EFL_LIB_START([Ecore_Evas])
3926
3927 ### Additional options to configure
3928
3929 ### Default values
3930
3931 want_ecore_evas_software_gdi="${have_evas_engine_software_gdi}"
3932 want_ecore_evas_software_ddraw="${have_evas_engine_software_ddraw}"
3933 want_ecore_evas_gl_cocoa="${have_evas_engine_gl_cocoa}"
3934 want_ecore_evas_wayland_egl="${have_evas_engine_wayland_egl}"
3935 want_ecore_evas_extn="yes"
3936 want_ecore_evas_drm="${have_evas_engine_drm}"
3937
3938 if test "x${have_ecore_ipc}" = "xno" || \
3939    test "x${efl_func_shm_open}" = "xno" || \
3940    test "x${have_windows}" = "xyes" ; then
3941    want_ecore_evas_extn="no"
3942 fi
3943
3944 ### Checks for programs
3945
3946 ## Compatibility layers
3947 EFL_PLATFORM_DEPEND([ECORE_EVAS], [evil])
3948
3949 ### Checks for libraries
3950 EFL_INTERNAL_DEPEND_PKG([ECORE_EVAS], [ecore-input-evas])
3951 EFL_INTERNAL_DEPEND_PKG([ECORE_EVAS], [ecore-input])
3952 EFL_INTERNAL_DEPEND_PKG([ECORE_EVAS], [ecore])
3953 EFL_INTERNAL_DEPEND_PKG([ECORE_EVAS], [eet])
3954 EFL_INTERNAL_DEPEND_PKG([ECORE_EVAS], [evas])
3955 EFL_INTERNAL_DEPEND_PKG([ECORE_EVAS], [efl])
3956 EFL_INTERNAL_DEPEND_PKG([ECORE_EVAS], [eo])
3957 EFL_INTERNAL_DEPEND_PKG([ECORE_EVAS], [eina])
3958 EFL_INTERNAL_DEPEND_PKG([ECORE_EVAS], [emile])
3959
3960 ## modules
3961 ECORE_EVAS_MODULE([extn], [${want_ecore_evas_extn}])
3962 ECORE_EVAS_MODULE([ews], [yes])
3963 ECORE_EVAS_MODULE([fb], [${want_fb}])
3964 ECORE_EVAS_MODULE([drm], [${want_drm}], 
3965   [EFL_OPTIONAL_INTERNAL_DEPEND_PKG([ECORE_EVAS], [${want_drm}], [ecore-drm])])
3966 ECORE_EVAS_MODULE([gl-drm], [${want_gl_drm}],
3967   [EFL_OPTIONAL_INTERNAL_DEPEND_PKG([ECORE_EVAS], [${want_gl_drm}], [ecore-drm])])
3968 ECORE_EVAS_MODULE([psl1ght], [${have_ps3}])
3969
3970 ECORE_EVAS_MODULE([opengl-cocoa], [${want_ecore_evas_gl_cocoa}])
3971
3972 ECORE_EVAS_MODULE([software-sdl], [${want_sdl}])
3973 ECORE_EVAS_MODULE([opengl-sdl], [${want_gl_sdl}])
3974
3975 build_ecore_evas_sdl="no"
3976 if test "x${have_ecore_evas_software_sdl}" = "xyes" || \
3977    test "x${have_ecore_evas_opengl_sdl}" = "xyes" ; then
3978    build_ecore_evas_sdl="yes"
3979    AC_DEFINE(BUILD_ECORE_EVAS_SDL, 1, [Support for SDL Engine in Ecore_Evas])
3980 fi
3981 AM_CONDITIONAL([BUILD_ECORE_EVAS_SDL],
3982    [test "${build_ecore_evas_sdl}" = "yes"])
3983
3984 ECORE_EVAS_MODULE([wayland-shm], [${want_wayland}])
3985 ECORE_EVAS_MODULE([wayland-egl], [${want_ecore_evas_wayland_egl}])
3986
3987 build_ecore_evas_wayland="no"
3988 if test "x${have_ecore_evas_wayland_shm}" = "xyes" || \
3989    test "x${have_ecore_evas_wayland_egl}" = "xyes" ; then
3990    build_ecore_evas_wayland="yes"
3991    AC_DEFINE(BUILD_ECORE_EVAS_WAYLAND, 1, [Support for Wayland Engine in Ecore_Evas])
3992 fi
3993 AM_CONDITIONAL([BUILD_ECORE_EVAS_WAYLAND],
3994    [test "${build_ecore_evas_wayland}" = "yes"])
3995
3996 ECORE_EVAS_MODULE([software-gdi], [${want_ecore_evas_software_gdi}])
3997 ECORE_EVAS_MODULE([software-ddraw], [${want_ecore_evas_software_ddraw}])
3998
3999 build_ecore_evas_win32="no"
4000 if test "x${have_ecore_evas_software_gdi}" = "xyes" || \
4001    test "x${have_ecore_evas_software_ddraw}" = "xyes" ; then
4002    build_ecore_evas_win32="yes"
4003    AC_DEFINE(BUILD_ECORE_EVAS_WIN32, 1, [Support for Win32 Engine in Ecore_Evas])
4004 fi
4005 AM_CONDITIONAL([BUILD_ECORE_EVAS_WIN32],
4006    [test "${build_ecore_evas_win32}" = "yes"])
4007
4008
4009 # XXX TODO: ecore_evas_x11
4010
4011 ECORE_EVAS_MODULE([software-x11], [${want_x11_any}])
4012
4013 have_ecore_evas_software_xlib="no"
4014 have_ecore_evas_software_xcb="no"
4015 if test "x$have_ecore_evas_software_x11" = "xyes" ; then
4016    have_ecore_evas_software_xlib=${have_evas_engine_software_xlib}
4017    if test "x${have_ecore_evas_software_xlib}" = "xstatic"; then
4018       have_ecore_evas_software_xlib="yes"
4019    fi
4020    if test "x${have_ecore_evas_software_xlib}" = "xyes"; then
4021       AC_DEFINE([BUILD_ECORE_EVAS_SOFTWARE_XLIB], [1], [Evas Software Xlib Engine Support])
4022    fi
4023    have_ecore_evas_software_xcb=${have_evas_engine_software_xcb}
4024    if test "x$have_ecore_evas_software_xcb" = "xstatic"; then
4025       have_ecore_evas_software_xcb="yes"
4026    fi
4027    if test "x$have_ecore_evas_software_xcb" = "xyes"; then
4028       AC_DEFINE([BUILD_ECORE_EVAS_SOFTWARE_XCB], [1], [Evas Software XCB Engine Support])
4029    fi
4030 fi
4031
4032 # XXX TODO: ecore_evas_opengl_x11
4033
4034 ECORE_EVAS_MODULE([opengl-x11], [${want_x11_any_opengl}])
4035
4036 have_ecore_evas_opengl_xlib="no"
4037 have_ecore_evas_opengl_xcb="no"
4038 if test "x${have_ecore_evas_opengl_x11}" = "xyes" || test "x${have_ecore_evas_opengl_x11}" = "xstatic" ; then
4039    have_ecore_evas_opengl_xlib=${have_evas_engine_gl_xlib}
4040    if test "x${have_ecore_evas_opengl_xlib}" = "xyes" ; then
4041       AC_DEFINE([BUILD_ECORE_EVAS_OPENGL_XLIB], [1], [OpenGL Xlib rendering backend])
4042    fi
4043
4044 # opengl does not work with xcb (yet)
4045    have_ecore_evas_opengl_xcb=${have_evas_engine_gl_xcb}
4046    if test "x${have_ecore_evas_opengl_xcb}" = "xstatic"; then
4047       have_ecore_evas_opengl_xcb="yes"
4048    fi
4049    if test "x${have_ecore_evas_opengl_xcb}" = "xyes"; then
4050       PKG_CHECK_MODULES([XCB_X11],
4051          [x11-xcb],
4052          [
4053           have_ecore_x_opengl_xcb="yes"
4054           requirements_ecore_x="x11-xcb ${requirements_ecore_x}"
4055           AC_DEFINE([BUILD_ECORE_X_OPENGL_XCB], [1], [Build support for XCB-based OpenGL])
4056           AC_DEFINE([BUILD_ECORE_EVAS_OPENGL_XCB], [1], [OpenGL XCB rendering backend])
4057          ],
4058          [have_ecore_x_opengl_xcb="no"])
4059     else
4060       have_ecore_x_opengl_xcb="no"
4061       AC_MSG_NOTICE([XCB-based OpenGL explicitly disabled])
4062     fi
4063 fi
4064
4065 build_ecore_evas_x11="no"
4066 if test "x$have_ecore_evas_software_x11" = "xyes" || \
4067    test "x$have_ecore_evas_opengl_x11" = "xyes" || \
4068    test "x$have_ecore_evas_software_xcb" = "xyes"; then
4069    AC_DEFINE([BUILD_ECORE_EVAS_X11], [1], [Support for X Window Engines in Ecore_Evas])
4070    build_ecore_evas_x11="yes"
4071 fi
4072 AM_CONDITIONAL([BUILD_ECORE_EVAS_X11], [test "${build_ecore_evas_x11}" = "yes"])
4073
4074 EFL_EVAL_PKGS([ECORE_EVAS])
4075
4076 ### Checks for header files
4077
4078 ### Checks for types
4079
4080 ### Checks for structures
4081
4082 ### Checks for compiler characteristics
4083
4084 ### Checks for linker characteristics
4085
4086 ### Checks for library functions
4087
4088 EFL_LIB_END([Ecore_Evas])
4089 #### End of Ecore_Evas
4090
4091 #### Eio
4092 EFL_LIB_START([Eio])
4093
4094 ### Additional options to configure
4095
4096 ### Default values
4097
4098 ### Checks for programs
4099
4100 ## Compatibility layers
4101 EFL_PLATFORM_DEPEND([EIO], [evil])
4102
4103 ### Checks for libraries
4104 EFL_INTERNAL_DEPEND_PKG([EIO], [ecore])
4105 EFL_INTERNAL_DEPEND_PKG([EIO], [eet])
4106 EFL_INTERNAL_DEPEND_PKG([EIO], [eo])
4107 EFL_INTERNAL_DEPEND_PKG([EIO], [eina])
4108 EFL_INTERNAL_DEPEND_PKG([EIO], [efl])
4109 EFL_INTERNAL_DEPEND_PKG([EIO], [emile])
4110
4111 EFL_ADD_LIBS([EIO], [-lm])
4112
4113 ### Checks for header files
4114
4115 ### Checks for types
4116
4117 ### Checks for structures
4118
4119 ### Checks for compiler characteristics
4120
4121 ### Checks for linker characteristics
4122
4123 ### Checks for library functions
4124 have_inotify="${ac_cv_header_sys_inotify_h}"
4125 AM_CONDITIONAL([HAVE_INOTIFY], [test "x${have_inotify}" = "xyes"])
4126
4127 have_notify_win32="${have_win32}"
4128 AC_DEFINE_IF([HAVE_NOTIFY_WIN32],
4129    [test "x${have_notify_win32}" = "xyes"], [1],
4130    [File monitoring with Windows notification])
4131 AM_CONDITIONAL([HAVE_NOTIFY_WIN32], [test "x${have_notify_win32}" = "xyes"])
4132
4133 AC_DEFINE_IF([HAVE_NOTIFY_COCOA],
4134    [test "x${have_darwin}" = "xyes"], [1],
4135    [File monitoring with fsevent notification])
4136 AM_CONDITIONAL([HAVE_NOTIFY_COCOA], [test "x${have_darwin}" = "xyes"])
4137
4138 AC_CHECK_FUNC([kevent])
4139 have_notify_kevent="${ac_cv_func_kevent}"
4140 AC_DEFINE_IF([HAVE_NOTIFY_KEVENT],
4141    [test "x${have_notify_kevent}" = "xyes"], [1],
4142    [File monitoring with kqueue/kevent mechanism])
4143 AM_CONDITIONAL([HAVE_NOTIFY_KEVENT], [test "x${have_notify_kevent}" = "xyes"])
4144
4145
4146 EFL_LIB_END([Eio])
4147 dnl TODO: remove these ifdefs from code!
4148 AC_DEFINE([HAVE_EIO], [1], [Have eio library])
4149 #### End of Eio
4150
4151 # Eo Id
4152 if test "x${want_eo_id}" = "xyes" ; then
4153    AC_DEFINE([HAVE_EO_ID], [1], [Have eo id])
4154 fi
4155
4156
4157 #### Efreet
4158 EFL_LIB_START([Efreet])
4159
4160 ### Additional options to configure
4161
4162 ### Default values
4163
4164 AC_DEFINE([SLOPPY_SPEC], [1], [Sloppy Spec Compliance])
4165
4166 ### Checks for programs
4167
4168 ## Compatibility layers
4169 EFL_PLATFORM_DEPEND([EFREET], [evil])
4170
4171 ### Checks for libraries
4172 EFL_INTERNAL_DEPEND_PKG([EFREET], [eet])
4173 EFL_INTERNAL_DEPEND_PKG([EFREET], [ecore])
4174 EFL_INTERNAL_DEPEND_PKG([EFREET], [ecore-file])
4175 EFL_INTERNAL_DEPEND_PKG([EFREET], [eo])
4176 EFL_INTERNAL_DEPEND_PKG([EFREET], [eina])
4177 EFL_INTERNAL_DEPEND_PKG([EFREET], [emile])
4178 EFL_INTERNAL_DEPEND_PKG([EFREET], [ecore-ipc])
4179
4180 ### Checks for header files
4181
4182 ### Checks for types
4183
4184 ### Checks for structures
4185
4186 ### Checks for compiler characteristics
4187
4188 ### Checks for linker characteristics
4189
4190 ### Checks for library functions
4191
4192 EFL_LIB_END([Efreet])
4193 #### End of Efreet
4194
4195
4196 #### EPhysics
4197 AC_ARG_ENABLE([physics],
4198    [AS_HELP_STRING([--disable-physics],[disable physics effects and support. @<:@default=enabled@:>@])],
4199    [
4200     if test "x${enableval}" = "xyes" ; then
4201        want_physics="yes"
4202     else
4203        CFOPT_WARNING="xyes"
4204        want_physics="no"
4205     fi
4206    ],
4207    [want_physics="yes"])
4208
4209 EFL_LIB_START_OPTIONAL([EPhysics], [test "${want_physics}" = "yes"])
4210
4211 ### Additional options to configure
4212
4213 ### Default values
4214
4215 ### Checks for programs
4216
4217 ### Checks for libraries
4218 EFL_PLATFORM_DEPEND([EPHYSICS], [evil])
4219
4220 EFL_INTERNAL_DEPEND_PKG([EPHYSICS], [eina])
4221 EFL_INTERNAL_DEPEND_PKG([EPHYSICS], [evas])
4222 EFL_INTERNAL_DEPEND_PKG([EPHYSICS], [efl])
4223 EFL_INTERNAL_DEPEND_PKG([EPHYSICS], [ecore])
4224 EFL_INTERNAL_DEPEND_PKG([EPHYSICS], [eo])
4225 EFL_INTERNAL_DEPEND_PKG([EPHYSICS], [emile])
4226
4227 EFL_DEPEND_PKG([EPHYSICS], [BULLET], [bullet >= 2.80])
4228
4229 EFL_EVAL_PKGS([EPHYSICS])
4230
4231 ### Checks for header files
4232
4233 ### Checks for types
4234
4235 ### Checks for structures
4236
4237 ### Checks for compiler characteristics
4238
4239 ### Checks for linker characteristics
4240
4241 ### Checks for library functions
4242
4243 EFL_LIB_END_OPTIONAL([EPhysics])
4244 #### End of EPhysics
4245
4246
4247 #### Edje
4248 EFL_LIB_START([Edje])
4249
4250 ### Additional options to configure
4251
4252 ### Default values
4253
4254 AC_ARG_ENABLE([multisense],
4255    [AS_HELP_STRING([--enable-multisense],[Enable multisense support. @<:@default=disabled@:>@])],
4256    [
4257     if test "x${enableval}" = "xyes" ; then
4258        want_multisense="yes"
4259     else
4260        want_multisense="no"
4261        CFOPT_WARNING="xyes"
4262     fi
4263    ],
4264    [
4265     if test "x${want_pulseaudio}" = "xyes" -o "x${want_coreaudio}" = "xyes"; then
4266        want_multisense="yes"
4267     else
4268        want_multisense="no"
4269     fi
4270    ])
4271
4272 # TODO: should we keep or remove these?
4273 want_edje_program_cache="no"
4274 want_edje_calc_cache="yes"
4275 want_fixed_point="no"
4276
4277 ### Checks for programs
4278
4279 ### Checks for libraries
4280 EFL_PLATFORM_DEPEND([EDJE], [evil])
4281
4282 EFL_INTERNAL_DEPEND_PKG([EDJE], [eina])
4283 EFL_INTERNAL_DEPEND_PKG([EDJE], [eo])
4284 EFL_INTERNAL_DEPEND_PKG([EDJE], [efl])
4285 EFL_INTERNAL_DEPEND_PKG([EDJE], [eet])
4286 EFL_INTERNAL_DEPEND_PKG([EDJE], [evas])
4287 EFL_INTERNAL_DEPEND_PKG([EDJE], [ecore])
4288 EFL_INTERNAL_DEPEND_PKG([EDJE], [ecore-evas])
4289 EFL_INTERNAL_DEPEND_PKG([EDJE], [ecore-file])
4290 EFL_INTERNAL_DEPEND_PKG([EDJE], [ecore-input])
4291 EFL_INTERNAL_DEPEND_PKG([EDJE], [ecore-imf])
4292 EFL_INTERNAL_DEPEND_PKG([EDJE], [ecore-imf-evas])
4293 EFL_INTERNAL_DEPEND_PKG([EDJE], [embryo])
4294 EFL_INTERNAL_DEPEND_PKG([EDJE], [eio])
4295 EFL_INTERNAL_DEPEND_PKG([EDJE], [emile])
4296 EFL_INTERNAL_DEPEND_PKG([EDJE], [efreet])
4297
4298 EFL_OPTIONAL_INTERNAL_DEPEND_PKG([EDJE], [${want_physics}], [ephysics])
4299 EFL_OPTIONAL_INTERNAL_DEPEND_PKG([EDJE], [${want_multisense}], [ecore-audio])
4300
4301 EFL_ADD_FEATURE([EDJE], [physics])
4302 EFL_ADD_FEATURE([EDJE], [multisense])
4303 EFL_ADD_FEATURE([EDJE], [lua-old])
4304
4305 if test "${want_lua_old}" = "yes"; then
4306    EFL_CHECK_LUA_OLD([EDJE])
4307 else
4308    EFL_DEPEND_PKG([EDJE], [LUAJIT], [luajit >= 2.0.0])
4309 fi
4310
4311 EFL_ADD_LIBS([EDJE], [-lm])
4312
4313 EFL_EVAL_PKGS([EDJE])
4314
4315 AC_DEFINE_IF([EDJE_PROGRAM_CACHE], [test "${want_edje_program_cache}" = "yes"],
4316    [1], [Cache result of program glob matches])
4317 AC_DEFINE_IF([EDJE_CALC_CACHE], [test "${want_edje_calc_cache}" = "yes"],
4318    [1], [Cache result of calc glob matches])
4319 AC_DEFINE_IF([BUILD_EDJE_FP], [test "${want_fixed_point}" = "yes"],
4320    [1], [Use Fixed Point instead of FPU])
4321
4322 AM_CONDITIONAL([ENABLE_MULTISENSE], [test "${want_multisense}" = "yes"])
4323 AC_DEFINE_IF([ENABLE_MULTISENSE], [test "${want_multisense}" = "yes"],
4324   [1], [Use Multisense])
4325 AC_SUBST([want_multisense])
4326 AC_SUBST([want_physics])
4327
4328 ### Checks for header files
4329
4330 AC_CHECK_HEADERS([ \
4331 sys/wait.h \
4332 ])
4333
4334 ### Checks for types
4335
4336 ### Checks for structures
4337
4338 ### Checks for compiler characteristics
4339
4340 ### Checks for linker characteristics
4341
4342 ### Checks for library functions
4343
4344 EFL_LIB_END([Edje])
4345 #### End of Edje
4346
4347 #### Edje CXX
4348 EFL_LIB_START([Edje_Cxx])
4349
4350 EFL_EVAL_PKGS([EDJE_CXX])
4351
4352 EFL_LIB_END([Edje_Cxx])
4353 #### End of Edje CXX
4354
4355 #### Emotion
4356 EFL_LIB_START([Emotion])
4357
4358 ## Compatibility layers
4359 EFL_PLATFORM_DEPEND([Emotion], [evil])
4360
4361 ### Default values
4362 if test "${efl_func_shm_open}" = "yes"; then
4363    want_emotion_generic="static"
4364 else
4365    want_emotion_generic="no"
4366 fi
4367
4368 ### Additional options to configure
4369 AC_ARG_ENABLE([xine],
4370    [AS_HELP_STRING([--enable-xine],[enable xine support. @<:@default=disabled@:>@])],
4371    [
4372     if test "x${enableval}" = "xyes" ; then
4373        want_xine="yes"
4374     else
4375        want_xine="no"
4376     fi
4377    ],
4378    [want_xine="no"])
4379
4380 AC_ARG_ENABLE([v4l2],
4381    [AS_HELP_STRING([--enable-v4l2],[enable v4l2 support.])],
4382    [
4383     if test "x${enableval}" = "xyes" ; then
4384        want_v4l2="yes"
4385     else
4386        want_v4l2="no"
4387     fi
4388    ],
4389    [want_v4l2="${efl_lib_optional_eeze}"])
4390
4391 AC_ARG_ENABLE([libvlc],
4392    [AS_HELP_STRING([--enable-libvlc],[enable libvlc support. @<:@default=disabled@:>@])],
4393    [
4394     if test "x${enableval}" = "xyes" ; then
4395        want_libvlc="yes"
4396     else
4397        want_libvlc="no"
4398     fi
4399    ],
4400    [want_libvlc="no"])
4401
4402 ### Checks for programs
4403
4404 ### Checks for libraries
4405 EFL_INTERNAL_DEPEND_PKG([EMOTION], [eina])
4406 EFL_INTERNAL_DEPEND_PKG([EMOTION], [eo])
4407 EFL_INTERNAL_DEPEND_PKG([EMOTION], [ecore])
4408 EFL_INTERNAL_DEPEND_PKG([EMOTION], [eet])
4409 EFL_INTERNAL_DEPEND_PKG([EMOTION], [evas])
4410 EFL_INTERNAL_DEPEND_PKG([EMOTION], [efl])
4411 EFL_INTERNAL_DEPEND_PKG([EMOTION], [eio])
4412 EFL_INTERNAL_DEPEND_PKG([EMOTION], [emile])
4413
4414 EFL_OPTIONAL_INTERNAL_DEPEND_PKG([EMOTION], [${efl_lib_optional_eeze}], [eeze])
4415 EFL_ADD_FEATURE([EMOTION], [v4l2])
4416
4417 ## modules
4418
4419 have_gst_xoverlay="no"
4420
4421 EMOTION_MODULE([xine], [${want_xine}])
4422 EMOTION_MODULE([gstreamer], [${want_gstreamer}])
4423 EMOTION_MODULE([gstreamer1], [${want_gstreamer1}])
4424 EMOTION_MODULE([libvlc], [${want_libvlc}])
4425 EMOTION_MODULE([generic], [${want_emotion_generic}])
4426
4427 EFL_ADD_FEATURE([EMOTION], [xine])
4428 EFL_ADD_FEATURE([EMOTION], [gstreamer])
4429 EFL_ADD_FEATURE([EMOTION], [gstreamer1])
4430 EFL_ADD_FEATURE([EMOTION], [libvlc])
4431 EFL_ADD_FEATURE([EMOTION], [generic], [${want_emotion_generic}])
4432
4433 EFL_EVAL_PKGS([EMOTION])
4434
4435 ### Checks for header files
4436
4437 ### Checks for types
4438
4439 ### Checks for structures
4440
4441 ### Checks for compiler characteristics
4442
4443 ### Checks for linker characteristics
4444
4445 ### Checks for library functions
4446
4447 if test "${want_v4l2}" = "yes"; then
4448    AC_CHECK_DECL([V4L2_CAP_VIDEO_CAPTURE],
4449       [AC_DEFINE([HAVE_V4L2], [1], [Define to 1 if you have Video4Linux 2 available])],
4450       [AC_MSG_ERROR([Video4Linux 2 desired but not found. See --disable-v4l2.])],
4451       [#include <linux/videodev2.h>])
4452 fi
4453
4454 ### Check availability
4455
4456 EFL_LIB_END([Emotion])
4457 #### End of Emotion
4458
4459
4460 #### Ethumb
4461 EFL_LIB_START([Ethumb])
4462
4463 ### Default values
4464
4465 ### Additional options to configure
4466
4467 ### Checks for programs
4468
4469 ## Compatibility layers
4470 EFL_PLATFORM_DEPEND([ETHUMB], [evil])
4471
4472 ### Checks for libraries
4473 EFL_PLATFORM_DEPEND([EINA], [evil])
4474
4475 EFL_INTERNAL_DEPEND_PKG([ETHUMB], [eina])
4476 EFL_INTERNAL_DEPEND_PKG([ETHUMB], [eet])
4477 EFL_INTERNAL_DEPEND_PKG([ETHUMB], [evas])
4478 EFL_INTERNAL_DEPEND_PKG([ETHUMB], [efl])
4479 EFL_INTERNAL_DEPEND_PKG([ETHUMB], [eo])
4480 EFL_INTERNAL_DEPEND_PKG([ETHUMB], [ecore])
4481 EFL_INTERNAL_DEPEND_PKG([ETHUMB], [ecore-evas])
4482 EFL_INTERNAL_DEPEND_PKG([ETHUMB], [ecore-file])
4483 EFL_INTERNAL_DEPEND_PKG([ETHUMB], [ecore-imf])
4484 EFL_INTERNAL_DEPEND_PKG([ETHUMB], [edje])
4485 EFL_INTERNAL_DEPEND_PKG([ETHUMB], [emile])
4486
4487 ## modules
4488
4489 EFL_EVAL_PKGS([ETHUMB])
4490
4491 ### Checks for header files
4492
4493 ### Checks for types
4494
4495 ### Checks for structures
4496
4497 ### Checks for compiler characteristics
4498
4499 ### Checks for linker characteristics
4500
4501 ### Checks for library functions
4502
4503 ### Check availability
4504
4505 EFL_LIB_END([Ethumb])
4506 #### End of Ethumb
4507
4508 #### Ethumb_Client
4509 EFL_LIB_START([Ethumb_Client])
4510
4511 ### Default values
4512
4513 ### Additional options to configure
4514
4515 ### Checks for programs
4516
4517 ## Compatibility layers
4518 EFL_PLATFORM_DEPEND([ETHUMB_CLIENT], [evil])
4519
4520 ### Checks for libraries
4521 EFL_INTERNAL_DEPEND_PKG([ETHUMB_CLIENT], [eina])
4522 EFL_INTERNAL_DEPEND_PKG([ETHUMB_CLIENT], [eo])
4523 EFL_INTERNAL_DEPEND_PKG([ETHUMB_CLIENT], [efl])
4524 EFL_INTERNAL_DEPEND_PKG([ETHUMB_CLIENT], [eet])
4525 EFL_INTERNAL_DEPEND_PKG([ETHUMB_CLIENT], [ecore])
4526 EFL_INTERNAL_DEPEND_PKG([ETHUMB_CLIENT], [ecore-imf])
4527 EFL_INTERNAL_DEPEND_PKG([ETHUMB_CLIENT], [edje])
4528 EFL_INTERNAL_DEPEND_PKG([ETHUMB_CLIENT], [eldbus])
4529 EFL_INTERNAL_DEPEND_PKG([ETHUMB_CLIENT], [ethumb])
4530 EFL_INTERNAL_DEPEND_PKG([ETHUMB_CLIENT], [evas])
4531 EFL_INTERNAL_DEPEND_PKG([ETHUMB_CLIENT], [emile])
4532
4533 EFL_EVAL_PKGS([ETHUMB_CLIENT])
4534
4535 ### Checks for header files
4536
4537 ### Checks for types
4538
4539 ### Checks for structures
4540
4541 ### Checks for compiler characteristics
4542
4543 ### Checks for linker characteristics
4544
4545 ### Checks for library functions
4546
4547 ### Check availability
4548
4549 EFL_LIB_END([Ethumb_Client])
4550 #### End of Ethumb_Client
4551
4552 #### Elua
4553
4554 have_elua="yes"
4555 if test "${want_lua_old}" = "yes"; then
4556   have_elua="no"
4557 fi
4558
4559 EFL_LIB_START_OPTIONAL([Elua], [test "${have_elua}" = "yes"])
4560
4561 ### Default values
4562
4563 AM_CONDITIONAL([HAVE_ELUA], [test "x${have_elua}" = "xyes"])
4564
4565 ### Additional options to configure
4566
4567 ### Checks for programs
4568
4569 ## Compatibility layers
4570 EFL_PLATFORM_DEPEND([ELUA], [evil])
4571
4572 ### Checks for libraries
4573 EFL_INTERNAL_DEPEND_PKG([ELUA], [eina])
4574 EFL_INTERNAL_DEPEND_PKG([ELUA], [eo])
4575 EFL_INTERNAL_DEPEND_PKG([ELUA], [ecore])
4576
4577 EFL_DEPEND_PKG([ELUA], [LUAJIT], [luajit >= 2.0.0])
4578
4579 EFL_EVAL_PKGS([ELUA])
4580
4581 ### Checks for header files
4582
4583 ### Checks for types
4584
4585 ### Checks for structures
4586
4587 ### Checks for compiler characteristics
4588
4589 ### Checks for linker characteristics
4590
4591 ### Checks for library functions
4592
4593 ### Check availability
4594
4595 EFL_LIB_END_OPTIONAL([Elua])
4596 #### End of Elua
4597
4598 #### Elocation
4599
4600 EFL_LIB_START([Elocation])
4601
4602 ### Default values
4603
4604 ### Additional options to configure
4605
4606 ### Checks for programs
4607
4608 ### Checks for libraries
4609 EFL_PLATFORM_DEPEND([ELOCATION], [evil])
4610 EFL_INTERNAL_DEPEND_PKG([ELOCATION], [eina])
4611 EFL_INTERNAL_DEPEND_PKG([ELOCATION], [eo])
4612 EFL_INTERNAL_DEPEND_PKG([ELOCATION], [ecore])
4613 EFL_INTERNAL_DEPEND_PKG([ELOCATION], [eldbus])
4614
4615 EFL_ADD_LIBS([ELOCATION], [-lm])
4616
4617 ### Checks for header files
4618
4619 ### Checks for types
4620
4621 ### Checks for structures
4622
4623 ### Checks for compiler characteristics
4624
4625 ### Checks for linker characteristics
4626
4627 ### Checks for library functions
4628
4629 ### Check availability
4630
4631 EFL_LIB_END([Elocation])
4632 #### End of Elocation
4633
4634 ### Add Wayland server library if test is enabled
4635 if test "x${want_tests}" = "xyes" -a "x${want_wayland}" = "xyes"; then
4636    EFL_DEPEND_PKG([ECORE_WAYLAND_SRV], [WAYLAND], [wayland-server >= 1.8.0])
4637    EFL_EVAL_PKGS([ECORE_WAYLAND_SRV])
4638 fi
4639
4640 AC_ARG_ENABLE([always-build-examples],
4641    [AS_HELP_STRING([--enable-always-build-examples],[always build examples. @<:@default=disabled@:>@])],
4642    [
4643     if test "x${enableval}" = "xyes" ; then
4644        want_always_build_examples="yes"
4645     else
4646        want_always_build_examples="no"
4647     fi
4648    ],
4649    [want_always_build_examples="no"])
4650 AM_CONDITIONAL([ALWAYS_BUILD_EXAMPLES], [test "${want_always_build_examples}" = "yes"])
4651
4652 BARF_OK="xno"
4653 # Harfbuzz
4654 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],
4655    [ You will be told when this is needed ],
4656    [
4657     if test "x${enableval}" = "xyes" ; then
4658        BARF_OK=""
4659     else
4660        BARF_OK="xno"
4661     fi
4662    ],
4663    [ BARF_OK="xno" ])
4664
4665 #### Ecore_Buffer
4666 build_ecore_buffer_x11_dri2="no"
4667 build_ecore_buffer_x11_dri3="no"
4668 EFL_LIB_START_OPTIONAL([Ecore_Buffer], [test "${want_ecore_buffer}" = "yes"])
4669 ### Checks for libraries
4670 EFL_INTERNAL_DEPEND_PKG([ECORE_BUFFER], [eina])
4671 EFL_INTERNAL_DEPEND_PKG([ECORE_BUFFER], [eo])
4672 EFL_INTERNAL_DEPEND_PKG([ECORE_BUFFER], [ecore])
4673 EFL_DEPEND_PKG([ECORE_BUFFER], [WAYLAND],
4674                [wayland-server >= 1.5.0 wayland-client >= 1.5.0])
4675
4676 PKG_CHECK_MODULES([X11_DRI_COMMON],
4677    [
4678       libtbm >= 1.1.0,
4679       libdrm >= 2.4.35,
4680    ],
4681    [have_x11_dri_common_pkgs="yes"],
4682    [have_x11_dri_common_pkgs="no"]
4683 )
4684
4685 if test "x$have_x11_dri_common_pkgs" = "xyes" ; then
4686    EFL_INTERNAL_DEPEND_PKG([ECORE_BUFFER], [ecore_x])
4687
4688    PKG_CHECK_MODULES([X11_DRI2], [libdri2],
4689                      [have_x11_dri2_pkgs="yes"],
4690                      [have_x11_dri2_pkgs="no"])
4691    PKG_CHECK_MODULES([X11_DRI3],
4692       [
4693          xshmfence,
4694          xcb,
4695          x11-xcb,
4696          xcb-sync,
4697          xcb-dri3
4698       ],
4699       [have_x11_dri3_pkgs="yes"],
4700       [have_x11_dri3_pkgs="no"])
4701 fi
4702
4703 if test "x${have_x11_dri2_pkgs}" = "xyes" ; then
4704    build_ecore_buffer_x11_dri2="yes"
4705    AC_DEFINE(BUILD_ECORE_BUFFER_X11_DRI2, 1, [Support for X11_DRI2 Backend in Ecore_Buffer])
4706 fi
4707
4708 if test "x${have_x11_dri3_pkgs}" = "xyes" ; then
4709    build_ecore_buffer_x11_dri3="yes"
4710    AC_DEFINE(BUILD_ECORE_BUFFER_X11_DRI3, 1, [Support for X11_DRI3 Backend in Ecore_Buffer])
4711 fi
4712 EFL_EVAL_PKGS([ECORE_BUFFER])
4713
4714 EFL_ADD_FEATURE([ECORE_BUFFER], [shm], ["yes"])
4715 EFL_ADD_FEATURE([ECORE_BUFFER], [x11_dri2], [${build_ecore_buffer_x11_dri2}])
4716 EFL_ADD_FEATURE([ECORE_BUFFER], [x11_dri3], [${build_ecore_buffer_x11_dri3}])
4717
4718 EFL_LIB_END_OPTIONAL([Ecore_Buffer])
4719
4720 AM_CONDITIONAL([BUILD_ECORE_BUFFER_X11_DRI2], [test "${build_ecore_buffer_x11_dri2}" = "xyes"])
4721 AM_CONDITIONAL([BUILD_ECORE_BUFFER_X11_DRI3], [test "${build_ecore_buffer_x11_dri3}" = "xyes"])
4722
4723 #### End of Ecore_Buffer
4724
4725 AC_CONFIG_FILES([
4726 Makefile
4727 data/Makefile
4728 doc/Makefile
4729 doc/Doxyfile
4730 doc/previews/Makefile
4731 src/Makefile
4732 src/benchmarks/eina/Makefile
4733 src/benchmarks/eo/Makefile
4734 src/benchmarks/evas/Makefile
4735 src/examples/eina/Makefile
4736 src/examples/eina_cxx/Makefile
4737 src/examples/eet/Makefile
4738 src/examples/eo/Makefile
4739 src/examples/evas/Makefile
4740 src/examples/ecore/Makefile
4741 src/examples/ecore_avahi/Makefile
4742 src/examples/eio/Makefile
4743 src/examples/eldbus/Makefile
4744 src/examples/ephysics/Makefile
4745 src/examples/edje/Makefile
4746 src/examples/emotion/Makefile
4747 src/examples/ethumb_client/Makefile
4748 src/examples/elua/Makefile
4749 src/examples/eolian_cxx/Makefile
4750 src/examples/elocation/Makefile
4751 src/lib/eina/eina_config.h
4752 src/lib/ecore_x/ecore_x_version.h
4753 src/lib/efl/Efl_Config.h
4754 spec/efl.spec
4755 pc/evil.pc
4756 pc/escape.pc
4757 pc/eina.pc
4758 pc/eina-cxx.pc
4759 pc/emile.pc
4760 pc/eet.pc
4761 pc/eet-cxx.pc
4762 pc/eo.pc
4763 pc/eo-cxx.pc
4764 pc/eolian.pc
4765 pc/eolian-cxx.pc
4766 pc/efl.pc
4767 pc/efl-cxx.pc
4768 pc/evas-fb.pc
4769 pc/evas-opengl-x11.pc
4770 pc/evas-opengl-sdl.pc
4771 pc/evas-opengl-cocoa.pc
4772 pc/evas-psl1ght.pc
4773 pc/evas-software-buffer.pc
4774 pc/evas-software-x11.pc
4775 pc/evas-software-gdi.pc
4776 pc/evas-software-ddraw.pc
4777 pc/evas-software-sdl.pc
4778 pc/evas-wayland-shm.pc
4779 pc/evas-wayland-egl.pc
4780 pc/evas-drm.pc
4781 pc/evas.pc
4782 pc/evas-cxx.pc
4783 pc/ecore.pc
4784 pc/ecore-cxx.pc
4785 pc/ecore-con.pc
4786 pc/ecore-ipc.pc
4787 pc/ecore-file.pc
4788 pc/ecore-input.pc
4789 pc/ecore-input-evas.pc
4790 pc/ecore-cocoa.pc
4791 pc/ecore-drm.pc
4792 pc/ecore-fb.pc
4793 pc/ecore-psl1ght.pc
4794 pc/ecore-sdl.pc
4795 pc/ecore-wayland.pc
4796 pc/ecore-win32.pc
4797 pc/ecore-x.pc
4798 pc/ecore-evas.pc
4799 pc/ecore-imf.pc
4800 pc/ecore-imf-evas.pc
4801 pc/ecore-audio.pc
4802 pc/ecore-audio-cxx.pc
4803 pc/ecore-avahi.pc
4804 pc/ecore-buffer.pc
4805 pc/ector.pc
4806 pc/embryo.pc
4807 pc/eio.pc
4808 pc/eio-cxx.pc
4809 pc/eldbus.pc
4810 pc/efreet.pc
4811 pc/efreet-mime.pc
4812 pc/efreet-trash.pc
4813 pc/eeze.pc
4814 pc/ephysics.pc
4815 pc/edje.pc
4816 pc/edje-cxx.pc
4817 pc/emotion.pc
4818 pc/ethumb.pc
4819 pc/ethumb_client.pc
4820 pc/elocation.pc
4821 pc/elua.pc
4822 dbus-services/org.enlightenment.Ethumb.service
4823 systemd-services/ethumb.service
4824 $po_makefile_in
4825 cmakeconfig/EflConfig.cmake
4826 cmakeconfig/EflConfigVersion.cmake:cmakeconfig/EFLConfigVersion.cmake.in
4827 cmakeconfig/EinaConfig.cmake
4828 cmakeconfig/EinaConfigVersion.cmake:cmakeconfig/EFLConfigVersion.cmake.in
4829 cmakeconfig/EioConfig.cmake
4830 cmakeconfig/EioConfigVersion.cmake:cmakeconfig/EFLConfigVersion.cmake.in
4831 cmakeconfig/EezeConfig.cmake
4832 cmakeconfig/EezeConfigVersion.cmake:cmakeconfig/EFLConfigVersion.cmake.in
4833 cmakeconfig/EoConfig.cmake
4834 cmakeconfig/EoConfigVersion.cmake:cmakeconfig/EFLConfigVersion.cmake.in
4835 cmakeconfig/EolianConfig.cmake
4836 cmakeconfig/EolianConfigVersion.cmake:cmakeconfig/EFLConfigVersion.cmake.in
4837 cmakeconfig/EolianHelper.cmake
4838 cmakeconfig/EolianCxxConfig.cmake
4839 cmakeconfig/EolianCxxConfigVersion.cmake:cmakeconfig/EFLConfigVersion.cmake.in
4840 cmakeconfig/EinaCxxConfig.cmake
4841 cmakeconfig/EinaCxxConfigVersion.cmake:cmakeconfig/EFLConfigVersion.cmake.in
4842 cmakeconfig/EoCxxConfig.cmake
4843 cmakeconfig/EoCxxConfigVersion.cmake:cmakeconfig/EFLConfigVersion.cmake.in
4844 cmakeconfig/EcoreCxxConfig.cmake
4845 cmakeconfig/EcoreCxxConfigVersion.cmake:cmakeconfig/EFLConfigVersion.cmake.in
4846 cmakeconfig/EvasCxxConfig.cmake
4847 cmakeconfig/EvasCxxConfigVersion.cmake:cmakeconfig/EFLConfigVersion.cmake.in
4848 cmakeconfig/EetCxxConfig.cmake
4849 cmakeconfig/EetCxxConfigVersion.cmake:cmakeconfig/EFLConfigVersion.cmake.in
4850 cmakeconfig/EetConfig.cmake
4851 cmakeconfig/EetConfigVersion.cmake:cmakeconfig/EFLConfigVersion.cmake.in
4852 cmakeconfig/EvasConfig.cmake
4853 cmakeconfig/EvasConfigVersion.cmake:cmakeconfig/EFLConfigVersion.cmake.in
4854 cmakeconfig/EcoreConfig.cmake
4855 cmakeconfig/EcoreConfigVersion.cmake:cmakeconfig/EFLConfigVersion.cmake.in
4856 cmakeconfig/EdjeConfig.cmake
4857 cmakeconfig/EdjeConfigVersion.cmake:cmakeconfig/EFLConfigVersion.cmake.in
4858 cmakeconfig/EldbusConfig.cmake
4859 cmakeconfig/EldbusConfigVersion.cmake:cmakeconfig/EFLConfigVersion.cmake.in
4860 cmakeconfig/EfreetConfig.cmake
4861 cmakeconfig/EfreetConfigVersion.cmake:cmakeconfig/EFLConfigVersion.cmake.in
4862 cmakeconfig/EthumbConfig.cmake
4863 cmakeconfig/EthumbConfigVersion.cmake:cmakeconfig/EFLConfigVersion.cmake.in
4864 cmakeconfig/EthumbClientConfig.cmake
4865 cmakeconfig/EthumbClientConfigVersion.cmake:cmakeconfig/EFLConfigVersion.cmake.in
4866 cmakeconfig/EmotionConfig.cmake
4867 cmakeconfig/EmotionConfigVersion.cmake:cmakeconfig/EFLConfigVersion.cmake.in
4868 cmakeconfig/EluaConfig.cmake
4869 cmakeconfig/EluaConfigVersion.cmake:cmakeconfig/EFLConfigVersion.cmake.in
4870 cmakeconfig/EmileConfig.cmake
4871 cmakeconfig/EmileConfigVersion.cmake:cmakeconfig/EFLConfigVersion.cmake.in
4872 ])
4873
4874 AC_OUTPUT
4875
4876 #### Work around bug in automake check macro
4877 ## yes it is hugly, but no choice here for now.
4878 $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
4879
4880 if test -f $srcdir/config.status; then
4881    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"
4882    $SED -i "s|as_fn_exit 0|$TO|" $srcdir/config.status
4883 fi
4884
4885 #### Info
4886
4887 EFL_ADD_FEATURE([EO], [eo-id], [${want_eo_id}])
4888
4889 case $host_cpu in
4890   i*86|x86_64|amd64)
4891     EFL_ADD_FEATURE([cpu], [mmx], [${build_cpu_mmx}])
4892     EFL_ADD_FEATURE([cpu], [sse3], [${build_cpu_sse3}])
4893     ;;
4894   *power* | *ppc*)
4895     EFL_ADD_FEATURE([cpu], [altivec], [${build_cpu_altivec}])
4896     ;;
4897   arm*)
4898     EFL_ADD_FEATURE([cpu], [neon], [${build_cpu_neon}])
4899     ;;
4900   aarch64*)
4901     EFL_ADD_FEATURE([cpu], [neon], [${build_cpu_neon}])
4902     ;;
4903 esac
4904
4905 if test "${have_linux}" = "yes"; then
4906    EFL_ADD_FEATURE([system], [inotify])
4907    EFL_ADD_FEATURE([system], [atfile_source])
4908 elif test "${have_windows}" = "yes"; then
4909    EFL_ADD_FEATURE([system], [notify_win32])
4910 fi
4911 EFL_ADD_FEATURE([system], [ipv6])
4912
4913 if test "x${efl_have_posix_threads_spinlock}" = "xyes" || test "x${efl_have_osx_spinlock}" = "xyes"; then
4914    efl_have_spinlock="yes"
4915 else
4916    efl_have_spinlock="no"
4917 fi
4918 EFL_ADD_FEATURE([thread], [spinlocks], [${efl_have_spinlock}])
4919 EFL_ADD_FEATURE([thread], [barrier], [${efl_have_pthread_barrier}])
4920 EFL_ADD_FEATURE([thread], [affinity], [${efl_have_setaffinity}])
4921 EFL_ADD_FEATURE([thread], [setname], [${efl_have_setname}])
4922 EFL_ADD_FEATURE([thread], [__thread], [${have_thread_specifier}])
4923
4924 echo
4925 echo
4926 echo
4927 echo "------------------------------------------------------------------------"
4928 echo "$PACKAGE_NAME $PACKAGE_VERSION"
4929 echo "------------------------------------------------------------------------"
4930 echo
4931
4932 if test "x${have_windows}" = "xyes" ; then
4933    osname="${host_os}(${_efl_windows_version})"
4934 else
4935    osname="${host_os}"
4936 fi
4937
4938 echo "Configuration...: ${COLOR_OTHER}profile=${build_profile} os=${osname}${COLOR_RESET}"
4939 echo "  EFL API Set...: ${efl_api}"
4940 echo "  CPU Extensions: ${host_cpu} (${features_cpu})"
4941 echo "  System Feature: ${features_system}"
4942 echo "  Threads.......: ${efl_have_threads} (${features_thread})"
4943 echo "  Cryptography..: ${build_crypto}"
4944 echo "  X11...........: ${with_x11}"
4945 echo "  OpenGL........: ${with_opengl}"
4946 echo "  C++11.........: ${have_cxx11}"
4947 echo "Eina............: yes (${features_eina} unwind=$have_unwind)"
4948 echo "Eo..............: yes (${features_eo})"
4949 echo "Eolian..........: yes (${features_eolian})"
4950 echo "Emile...........: yes (${features_emile})"
4951 echo "Eet.............: yes"
4952 echo "Evas............: yes (${features_evas})"
4953 echo "  Engines.......: ${features_evas_engine}"
4954 echo "  Image Loaders.: ${features_evas_loader}"
4955 if test "x${have_pixman}" = "xyes" ; then
4956 echo "  Pixman........: ${features_evas_pixman}"
4957 fi
4958 echo "Ecore...........: yes (${features_ecore})"
4959 echo "Ecore_Con.......: yes (${features_ecore_con})"
4960 echo "Ecore_File......: yes"
4961 echo "Ecore_IMF.......: yes (${features_ecore_imf})"
4962 echo "Ecore_X.........: ${with_x11} (${features_ecore_x})"
4963 echo "Ecore_SDL.......: $want_sdl"
4964 echo "Ecore_Wayland...: $want_wayland"
4965 echo "IVI-Shell.......: $want_wayland_ivi_shell"
4966 echo "Ecore_Buffer....: $want_ecore_buffer (${features_ecore_buffer})"
4967 if test "${have_linux}" = "yes"; then
4968 echo "Ecore_FB........: $want_fb (${features_ecore_fb})"
4969 elif test "${have_ps3}" = "yes"; then
4970 echo "Ecore_PSL1GHT...: $have_ps3"
4971 elif test "${have_darwin}" = "yes"; then
4972 echo "Ecore_Cocoa.....: $efl_lib_optional_ecore_cocoa"
4973 elif test "${have_windows}" = "yes"; then
4974 echo "Ecore_Win32.....: $have_win32"
4975 fi
4976 echo "Ecore_Audio.....: ${efl_lib_optional_ecore_audio} (${features_ecore_audio})"
4977 echo "Ecore_Avahi.....: yes (${features_ecore_avahi})"
4978 echo "Ecore_Evas......: yes (${features_ecore_evas})"
4979 echo "Ector...........: yes"
4980 echo "Eeze............: ${efl_lib_optional_eeze} (${features_eeze})"
4981 echo "EPhysics........: ${efl_lib_optional_ephysics}"
4982 echo "Edje............: yes (${features_edje})"
4983 echo "Emotion.........: yes (${features_emotion})"
4984 echo "Ethumb..........: yes"
4985 echo "Ethumb_Client...: yes"
4986 echo "Elua............: $have_elua"
4987 if test "${build_tests}" = "none"; then
4988 echo "Tests...........: no"
4989 elif test "${build_tests}" = "auto"; then
4990 echo "Tests...........: make check (inexplicitly enabled)"
4991 elif test "${build_tests}" = "regular"; then
4992 echo "Tests...........: make check"
4993 elif test "${build_tests}" = "coverage"; then
4994 echo "Tests...........: make lcov-check"
4995 fi
4996 echo "Examples........: make examples (make install-examples)"
4997 if test "x${build_doc}" = "xyes"; then
4998 echo "Documentation...: make doc"
4999 else
5000 echo "Documentation...: no"
5001 fi
5002 echo "Compilation.....: make (or gmake)"
5003 echo "  CPPFLAGS......: $CPPFLAGS"
5004 echo "  CFLAGS........: $CFLAGS"
5005 echo "  CXXFLAGS......: $CXXFLAGS"
5006 echo "  LDFLAGS.......: $LDFLAGS"
5007
5008 if test "x${with_binary_edje_cc}" != "x"; then
5009 echo "  edje_cc.......: ${with_binary_edje_cc}"
5010 fi
5011
5012 if test "x${with_binary_eolian_gen}" != "x"; then
5013 echo "  eolian_gen....: ${with_binary_eolian_gen}"
5014 fi
5015
5016 if test "x${with_binary_eolian_cxx}" != "x"; then
5017 echo "  eolian_cxx....: ${with_binary_eolian_cxx}"
5018 fi
5019
5020 if test "x${with_binary_elua_bin}" != "x"; then
5021 echo "  elua..........: ${with_binary_elua_bin}"
5022 fi
5023
5024 echo "  "
5025 echo "Installation....: make install (as root if needed, with 'su' or 'sudo')"
5026 echo "  prefix........: $prefix"
5027 echo "  dbus units....: $dbusservicedir"
5028 if test "${have_systemd_user_session}" = "yes"; then
5029 echo "  systemd units.: $USER_SESSION_DIR"
5030 fi
5031 echo
5032
5033 if test "x${have_systemd_pkg}" = "xyes" -a "x${want_systemd}" = "xno"; then
5034    echo " _________________________________________"
5035    echo "/ Systemd dependency is available on your \\"
5036    echo "| system, but you are building without    |"
5037    echo "| systemd support. Don't forget to        |"
5038    echo "| --enable-systemd if you want systemd    |"
5039    echo "\\ integration for EFL.                    /"
5040    echo " -----------------------------------------"
5041    echo "        \\   ^__^"
5042    echo "         \\  (oo)\\_______"
5043    echo "            (__)\\       )\\/\\"
5044    echo "                ||----w |"
5045    echo "                ||     ||"
5046 fi
5047
5048 if test -n "$CFOPT_WARNING"; then
5049   echo "_____________________________________________________________________"
5050   echo ""
5051   echo "==-- WARNING --=="
5052   echo ""
5053   echo "_____________________________________________________________________"
5054   if test "x${with_x11}" = "xxcb"; then
5055     echo "_____________________________________________________________________"
5056     echo "You have chosen to use XCB instead of Xlib. It is a myth that XCB"
5057     echo "is amazingly faster than Xlib (when used sensibly). It can be"
5058     echo "faster in a few corner cases on startup of an app, but it comes"
5059     echo "with many downsides. One of those is more complex code inside"
5060     echo "ecore_x, which is far less tested in XCB mode than Xlib. Also"
5061     echo "the big catch is that OpenGL support basically requires Xlib anyway"
5062     echo "so if you want OpenGL in X11, you need Xlib regardless and so you"
5063     echo "gain nothing really in terms of speed and no savings in memory"
5064     echo "because Xlib is still linked, loaded and used, BUT instead you"
5065     echo "have OpenGL drivers working with an hybrid XCB/Xlib (mostly XCB)"
5066     echo "toolkit and this is basically never tested by anyone working on"
5067     echo "the OpenGL drivers, so you will have bugs. Do not enable XCB"
5068     echo "and use OpenGL. XCB is only useful if you wish to shave a few Kb"
5069     echo "off the memory footprint of a whole system and live with less"
5070     echo "tested code, and possibly unimplemented features in ecore_x. To"
5071     echo "remove the XCB setup, remove the --with-x11=xcb option to"
5072     echo "configure."
5073     echo "_____________________________________________________________________"
5074   fi
5075   if test "x${want_physics}" = "xno"; then
5076     echo "_____________________________________________________________________"
5077     echo "You have chosen to disable physics support. This disables lots of"
5078     echo "core functionality and is effectively never tested. You are going"
5079     echo "to find features that suddenly don't work and as a result cause"
5080     echo "a series of breakages. This is simply not tested so you are on"
5081     echo "your own in terms of ensuring everything works if you do this"
5082     echo "_____________________________________________________________________"
5083   fi
5084   if test "x${efl_have_threads}" = "xno"; then
5085     echo "_____________________________________________________________________"
5086     echo "You have disabled threading support. A lot of code is literally"
5087     echo "written to need threading. We never test or even build with"
5088     echo "threading disabled, so doing this is entering uncharted territory."
5089     echo "There is a very good chance things may not compile at all, or if"
5090     echo "the do, they will break at runtime in weird and wonderful ways."
5091     echo "Highly reconsider what you are doing here, or be prepared to deal"
5092     echo "with the fallout yourself."
5093     echo "_____________________________________________________________________"
5094   fi
5095   if test "x${want_fontconfig}" = "xno"; then
5096     echo "_____________________________________________________________________"
5097     echo "You have disabled fontconfig. This is going to make general font"
5098     echo "searching not work, and only some very direct 'load /path/file.ttf'"
5099     echo "will work alongside some old-school ttf file path searching. This"
5100     echo "is very likely not what you want, so highly reconsider turning"
5101     echo "fontconfig off. Having it off will lead to visual problems like"
5102     echo "missing text in many UI areas etc."
5103     echo "_____________________________________________________________________"
5104   fi
5105   if test "x${want_fribidi}" = "xno"; then
5106     echo "_____________________________________________________________________"
5107     echo "Fribidi is used for handling right-to-left text (like Arabic,"
5108     echo "Hebrew, Farsi, Persian etc.) and is very likely not a feature"
5109     echo "you want to disable unless you know for absolute certain you"
5110     echo "will never encounter and have to display such scripts. Also"
5111     echo "note that we don't test with fribidi disabled so you may also"
5112     echo "trigger code paths with bugs that are never normally used."
5113     echo "_____________________________________________________________________"
5114   fi
5115   if test "x${want_pixman}" = "xyes"; then
5116     echo "_____________________________________________________________________"
5117     echo "Pixman allows you to replace some rendering paths in Evas with"
5118     echo "Pixman. Pixman may or may not be faster (probably slower), and"
5119     echo "the rendering paths with Pixman enabled are not tested often so"
5120     echo "this may introduce rendering bugs. Do not turn Pixman on unless"
5121     echo "you wish to deal with these bugs."
5122     echo "_____________________________________________________________________"
5123   fi
5124   if test "x${have_tile_rotate}" = "xyes"; then
5125     echo "_____________________________________________________________________"
5126     echo "Tiled rotation code is not tested much, so be aware that you"
5127     echo "may introduce bugs by enabling this."
5128     echo "_____________________________________________________________________"
5129   fi
5130   if test "x${want_g_main_loop}" = "xyes"; then
5131     echo "_____________________________________________________________________"
5132     echo "Using the Glib mainloop as the mainloop in Ecore is not tested"
5133     echo "regularly, but the glib mainloop integration (on by default) is."
5134     echo "You can use apps that use glib mainloop constructs by default"
5135     echo "this way, but the Ecore mainloop is not built on top of glib."
5136     echo "You have enabled ecore to be built on top of glib and thus you"
5137     echo "may experience bugs that normally would not be there. Be prepared"
5138     echo "to fix these if they arise."
5139     echo "_____________________________________________________________________"
5140   fi
5141   if test "x${want_gstreamer}" = "xyes"; then
5142     echo "_____________________________________________________________________"
5143     echo "Gstreamer 0.10 is no longer supported, and EFL has moved to use"
5144     echo "Gstreamer 1.x. The old Gstremaer code is not tested or maintained"
5145     echo "and will eventually be removed entirely. Don't enable the old"
5146     echo "Gstreamer support unless you want to deal with the issues yourself."
5147     echo "_____________________________________________________________________"
5148   fi
5149   if test "x${want_gstreamer1}" = "xno"; then
5150     echo "_____________________________________________________________________"
5151     echo "You disabled Gstreamer 1.x support. You likely don't want to do"
5152     echo "this as it will heavily limit your media support options and render"
5153     echo "some functionality as useless, leading to visible application bugs."
5154     echo "_____________________________________________________________________"
5155   fi
5156   if test "x${want_eo_id}" = "xno"; then
5157     echo "_____________________________________________________________________"
5158     echo "Eo's ID abstraction interface is a major safety system that"
5159     echo "protects code from crashing or misbehaving in many cases. It does"
5160     echo "come at a slight cost, but the safety and protection is worth it."
5161     echo "Also by disabling this, you may also introduce security holes in"
5162     echo "EFL as well as cause all sorts of previously non-existant crashes."
5163     echo "Seriously reconsider disabling EO ID."
5164     echo "_____________________________________________________________________"
5165   fi
5166   if test "x${want_evas_cserve2}" = "xno"; then
5167     echo "_____________________________________________________________________"
5168     echo "Evas Cserve is built and on by default and no testing is done"
5169     echo "for the old non-cserve2 code paths, so by disabling this you"
5170     echo "may be introducing bugs. Be aware of this and be prepared to"
5171     echo "deal with the bugs as a result of this."
5172     echo "_____________________________________________________________________"
5173   fi
5174   if test "x${want_audio}" = "xno"; then
5175     echo "_____________________________________________________________________"
5176     echo "You disabled audio support in Ecore. This is not tested and may"
5177     echo "Create bugs for you due to it creating untested code paths."
5178     echo "Reconsider disabling audio."
5179     echo "_____________________________________________________________________"
5180   fi
5181   if test "x${have_darwin}" = "xno" -a "x${want_pulseaudio}" = "xno"; then
5182     echo "_____________________________________________________________________"
5183     echo "The only audio output method supported by Ecore right now on your"
5184     echo "system is via Pulseaudio. You have disabled that and likely have"
5185     echo "broken a whole bunch of things in the process. Reconsider your"
5186     echo "configure options."
5187     echo "_____________________________________________________________________"
5188   fi
5189   if test "x${want_xinput2}" = "xno"; then
5190     echo "_____________________________________________________________________"
5191     echo "You have disabled xinput2 support. This means a whole lot of input"
5192     echo "devices in X11 will not work correctly. You likely do not want to"
5193     echo "do this."
5194     echo "_____________________________________________________________________"
5195   fi
5196   if test "x${want_xim}" = "xno"; then
5197     echo "_____________________________________________________________________"
5198     echo "You disabled XIM input method support. This is the most basic and"
5199     echo "core input method protocol supported in X11 and you almost certainly"
5200     echo "want the support for it. Input methods allow for complex text input"
5201     echo "like for Chinese, Japanese and Korean as well as virtual keyboards"
5202     echo "on touch/mobile devices."
5203     echo "_____________________________________________________________________"
5204   fi
5205   if test "x${want_scim}" = "xno"; then
5206     echo "_____________________________________________________________________"
5207     echo "SCIM is a modern and very common input method framework and you"
5208     echo "disabled support for it. You very likely want the support for"
5209     echo "complex language input, so please reconsider this. Input methods"
5210     echo "allow for complex text input like for Chinese, Japanese and Korean"
5211     echo "as well as virtual keyboards on touch/mobile devices."
5212     echo "_____________________________________________________________________"
5213   fi
5214   if test "x${want_libmount}" = "xno"; then
5215     echo "_____________________________________________________________________"
5216     echo "Libmount has been disabled, and it is used heavily inside Eeze"
5217     echo "for support of removable devices etc. and disabling this will"
5218     echo "hurt support for Enlightenment and its filemanager."
5219     echo "_____________________________________________________________________"
5220   fi
5221   if test "x${want_multisense}" = "xno"; then
5222     echo "_____________________________________________________________________"
5223     echo "Multisense has been disabled. This causes Edje audio suport to"
5224     echo "Simply not work, and will break applications and libraries"
5225     echo "that rely on it with users then reporting bugs."
5226     echo "If you want to mute audio, there are APIs and policies to do"
5227     echo "that, as opposed to compiling it out."
5228     echo "_____________________________________________________________________"
5229   fi
5230   if test "x${efl_api}" = "xeo"; then
5231     echo "_____________________________________________________________________"
5232     echo "Using the EO based EFL API only does not work at the moment. We still"
5233     echo "have a lot code that depends on the legacy interfaces. We provide"
5234     echo "this option for testing once we are able to migrate to the EO based"
5235     echo "API."
5236     echo "If you are not working on this migration please leave the option set"
5237     echo "to both as it will break your build if set to eo."
5238     echo "_____________________________________________________________________"
5239   fi
5240   if test "x${want_libeeze}" = "xno"; then
5241     echo "_____________________________________________________________________"
5242     echo "Libeeze has been disabled, and it is used heavily for support of"
5243     echo "removable devices etc. and disabling this will hurt support for"
5244     echo "Enlightenment and its filemanager."
5245     echo "_____________________________________________________________________"
5246   fi
5247   echo "_____________________________________________________________________"
5248   echo ""
5249   echo "==-- WARNING --=="
5250   echo ""
5251   echo "_____________________________________________________________________"
5252   if test -n "$BARF_OK"; then
5253     echo "Please add the following option to acknowledge this:"
5254     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"
5255     echo "_____________________________________________________________________"
5256     rm -f Makefile
5257     exit 1
5258   fi
5259   sleep 10
5260 fi
5261
5262 if test "x$prefix" != "x/usr"; then
5263   old=
5264   path=$dbusservicedir
5265   while test "x$old" != "x$path"; do
5266     old=$path
5267     eval path="\"$path\""
5268   done
5269   resolved_dbusservicedir=$path
5270
5271   old=
5272   path=$USER_SESSION_DIR
5273   while test "x$old" != "x$path"; do
5274     old=$path
5275     eval path="\"$path\""
5276   done
5277   resolved_USER_SESSION_DIR=$path
5278   base_USER_SESSION_DIR=`echo "$resolved_USER_SESSION_DIR" | sed -e 's:^\(.*\)/systemd/user/*$:\1:g'`
5279
5280   old=
5281   path=$datadir
5282   while test "x$old" != "x$path"; do
5283     old=$path
5284     eval path="\"$path\""
5285   done
5286   resolved_datadir=$path
5287
5288   needs_alert_dbus=0
5289   if test "$resolved_dbusservicedir" = "${HOME}/.local/share/dbus-1/services"; then
5290     AC_MSG_NOTICE([installing DBus services in user local "$resolved_dbusservicedir". Only accessible to user $USER])
5291   elif echo "$resolved_dbusservicedir" | grep -e '^/usr/s' >/dev/null 2>/dev/null; then
5292     AC_MSG_NOTICE([installing DBus serivces in $resolved_dbusservicedir])
5293   else
5294     needs_alert_dbus=1
5295   fi
5296
5297   needs_alert_systemd=0
5298   if test "$have_systemd_user_session" = "yes"; then
5299     if test "$resolved_USER_SESSION_DIR" = "${HOME}/.config/systemd/user"; then
5300       AC_MSG_NOTICE([installing systemd services in user local "$resolved_USER_SESSION_DIR". Only accessible to user $USER])
5301     elif echo "$resolved_USER_SESSION_DIR" | grep -e '^/usr/s' >/dev/null 2>/dev/null; then
5302       AC_MSG_NOTICE([installing systemd serivces in $resolved_USER_SESSION_DIR])
5303     else
5304        needs_alert_systemd=1
5305     fi
5306   fi
5307
5308   if test $needs_alert_dbus -eq 1 -o $needs_alert_systemd -eq 1; then
5309     if test $needs_alert_dbus -eq 1 -a $needs_alert_systemd -eq 1; then
5310       what_alert="dbus and systemd"
5311     elif test $needs_alert_dbus -eq 1; then
5312       what_alert="dbus"
5313     else
5314       what_alert="systemd"
5315     fi
5316
5317     echo ""
5318     echo "#-------------------------------------------------------------------#"
5319     echo "##==--                          ALERT                          --==##"
5320     echo "#-------------------------------------------------------------------#"
5321     echo ""
5322     echo "  Your installation prefix is *NOT* /usr so this means you need"
5323     echo "to ensure some files are visible to $what_alert otherwise services cannot"
5324     echo "be started when needed. You will need to do the following:"
5325     if test $needs_alert_dbus -eq 1; then
5326       echo ""
5327       echo "System-wide installation:"
5328       echo "  ln -s ${resolved_dbusservicedir}/org.enlightenment.Ethumb.service /usr/share/dbus-1/services/org.enlightenment.Ethumb.service"
5329       echo ""
5330       echo "  or add \"${resolved_datadir}\" to \$XDG_DATA_DIRS"
5331       echo ""
5332       echo "User installation:"
5333       echo "  ln -s ${resolved_dbusservicedir}/org.enlightenment.Ethumb.service ~/.local/share/dbus-1/services/org.enlightenment.Ethumb.service"
5334     fi
5335     if test $needs_alert_systemd -eq 1; then
5336       echo ""
5337       echo "System-wide installation:"
5338       echo "  ln -s ${resolved_USER_SESSION_DIR}/ethumb.service /usr/lib/systemd/user/ethumb.service"
5339       echo ""
5340       echo "  or add \"${base_USER_SESSION_DIR}\" to \$XDG_DATA_DIRS or \$XDG_CONFIG_DIRS"
5341       echo ""
5342       echo "User installation:"
5343       echo "  ln -s ${resolved_USER_SESSION_DIR}/ethumb.service ~/.config/systemd/user/ethumb.service"
5344     fi
5345     echo ""
5346     echo "#-------------------------------------------------------------------#"
5347   fi
5348 fi
5349
5350 if test "x${efl_deprecated_option}" = "xyes"; then
5351   echo ""
5352   echo "#-------------------------------------------------------------------#"
5353   echo "##==--                          ALERT                          --==##"
5354   echo "#-------------------------------------------------------------------#"
5355   echo ""
5356   echo "  Your build script is using a deprecated option. It will get b0rken"
5357   echo "with the next release of EFL. You better update it now than later."
5358   echo ""
5359   echo "#-------------------------------------------------------------------#"
5360 fi
5361