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