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