summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorMarcel Hollerbach <mail@marcel-hollerbach.de>2019-05-26 18:30:54 +0200
committerMarcel Hollerbach <mail@marcel-hollerbach.de>2019-06-18 08:56:34 +0200
commit639869703f3e8b0ce34d83b523ff611e85cfd93b (patch)
treedc72c59b87a83d02758ae81f979a25e21b226a8b /configure.ac
parent4f8e15c16c4f68b6fae8708b177ce672daefc59c (diff)
autotools: REMOVAL!
Get your seatbelt fastend! It is happening! AUTOTOOLS IS GONE NOW! All praise to meson! This time the final version, ci has been adjusted, and now does not try anymore to build a removed buildsystem. However, the scripts in there need cleaning up. Differential Revision: https://phab.enlightenment.org/D9027
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac6337
1 files changed, 0 insertions, 6337 deletions
diff --git a/configure.ac b/configure.ac
deleted file mode 100644
index 4ca3d09..0000000
--- a/configure.ac
+++ /dev/null
@@ -1,6337 +0,0 @@
1EFL_VERSION([1], [22], [99], [dev])
2AC_INIT([efl], [efl_version], [enlightenment-devel@lists.sourceforge.net])
3
4AC_PREREQ([2.60])
5AC_CONFIG_SRCDIR([configure.ac])
6AC_CONFIG_MACRO_DIR([m4])
7
8AC_CONFIG_HEADERS([config.h])
9AH_TOP([
10#ifndef EFL_CONFIG_H__
11#define EFL_CONFIG_H__
12])
13AH_BOTTOM([
14#endif /* EFL_CONFIG_H__ */
15])
16
17
18AM_INIT_AUTOMAKE([1.6 dist-xz no-dist-gzip -Wall color-tests subdir-objects])
19m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
20AM_CONDITIONAL([HAVE_AM_16], [test $(echo "${am__api_version}"|cut -d. -f2) -ge 16])
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
23AC_USE_SYSTEM_EXTENSIONS
24
25CFOPT_WARNING=""
26CXXFLAGS="${CXXFLAGS} -Wno-shadow" # No shadow warnings
27
28#### Apply configuring with legacy api's only, eo api's or both.
29
30EFL_API_LEGACY_DEF="#define EFL_NOLEGACY_API_SUPPORT"
31efl_api="both"
32
33#### For the moment the Eo EFL API is not ready you need to explicitly optin.
34EFL_ENABLE_EO_API_SUPPORT
35EFL_ENABLE_BETA_API_SUPPORT
36
37AC_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
42case "$efl_api" in
43 eo)
44 EFL_API_LEGACY_DEF="#define EFL_NOLEGACY_API_SUPPORT"
45 CFOPT_WARNING="xyes"
46 ;;
47 legacy|both)
48 EFL_API_LEGACY_DEF=""
49 ;;
50 *) AC_MSG_ERROR([Invalid api (${efl_api}): must be eo, legacy or both]) ;;
51esac
52
53AC_SUBST(EFL_API_LEGACY_DEF)
54
55#### Additional options to configure
56
57# string to identify the build
58AC_ARG_WITH([id],
59 [AS_HELP_STRING([--with-id=BUILD_ID],[Specify a string to identify the build (vendor, maintainer, etc).
60 @<:@default=none@:>@])],
61 [EFL_BUILD_ID="${withval}"],
62 [EFL_BUILD_ID="none"])
63AC_SUBST(EFL_BUILD_ID)
64
65# profile
66AC_ARG_WITH([profile],
67 [AS_HELP_STRING([--with-profile=PROFILE],[use the predefined build profile, one of: dev, debug and release.
68 @<:@default=dev@:>@])],
69 [build_profile=${withval}],
70 [build_profile=def_build_profile])
71
72case "${build_profile}" in
73 dev|debug|release)
74 ;;
75 *)
76 AC_MSG_ERROR([Unknown build profile --with-profile=${build_profile}])
77 ;;
78esac
79
80prefer_assert="no"
81eina_log_backtrace="yes"
82efl_less_insane="no"
83case "${build_profile}" in
84 dev|debug)
85 prefer_assert="yes"
86 eina_log_backtrace="no"
87 efl_less_insane="yes"
88 ;;
89esac
90
91# Enable CRI & ERR backtrace by default for release but not for dev/debug
92AC_DEFINE_IF([EINA_LOG_BACKTRACE_ENABLE], [test "x${eina_log_backtrace}" = "xyes"], [1], [Default log level triggering backtraces])
93
94# Additional sanity checks only performed in debug builds
95AC_DEFINE_IF([EFL_EXTRA_SANITY_CHECKS], [test "x${efl_less_insane}" = "xyes"], [1], [Extra run time sanity checks])
96
97# TODO: add some build "profile" (server, full, etc...)
98
99AC_ARG_WITH([crypto],
100 [AS_HELP_STRING([--with-crypto=CRYPTO],[use the predefined build crypto, one of:
101 openssl, gnutls or none.
102 @<:@default=openssl@:>@])],
103 [build_crypto=${withval}],
104 [build_crypto=openssl])
105
106case "${build_crypto}" in
107 openssl|gnutls|none)
108 ;;
109 *)
110 AC_MSG_ERROR([Unknown build crypto option: --with-crypto=${build_crypto}])
111 ;;
112esac
113
114AC_ARG_WITH([tests],
115 [AS_HELP_STRING([--with-tests=none|regular|coverage],[choose testing method: regular, coverage or none.
116 @<:@default=auto@:>@])],
117 [build_tests=${withval}],
118 [build_tests=auto])
119
120want_coverage="no"
121want_tests="no"
122case "${build_tests}" in
123 auto)
124 if test "${build_profile}" = "dev"; then
125 want_tests="yes"
126 fi
127 ;;
128 regular)
129 want_tests="yes"
130 ;;
131 coverage)
132 want_tests="yes"
133 want_coverage="yes"
134 ;;
135 no*)
136 ;;
137 *)
138 AC_MSG_ERROR([Unknown build tests option: --with-tests=${build_tests}])
139 ;;
140esac
141
142install_eo_files="no"
143AC_ARG_ENABLE([install-eo-files],
144 [AS_HELP_STRING([--enable-install-eo-files],[Enable installing eo files. @<:@default=disabled@:>@])],
145 [
146 if test "x${enableval}" = "xyes" ; then
147 install_eo_files="yes"
148 else
149 install_eo_files="no"
150 fi
151 ],
152 [install_eo_files="no"])
153
154AM_CONDITIONAL([INSTALL_EO_FILES], [test "${install_eo_files}" = "yes"])
155
156AC_ARG_WITH([ecore-con-http-test-url],
157 [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])])
158
159AC_ARG_WITH([ecore-con-ftp-test-url],
160 [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])])
161
162dbusservicedir="${datadir}/dbus-1/services"
163AC_ARG_WITH([dbus-services],
164 [AS_HELP_STRING([--with-dbus-services=DBUS_SERVICES],[specify a directory to store dbus service files.])],
165 [dbusservicedir=$withval])
166AC_SUBST(dbusservicedir)
167
168efl_deprecated_option="no"
169EFL_WITH_BIN([eet], [eet-eet])
170EFL_WITH_BIN([edje], [edje-cc])
171EFL_WITH_BIN([eolian], [eolian-gen])
172EFL_WITH_BIN([eolian_cxx], [eolian-cxx])
173EFL_WITH_BIN([eolian_mono], [eolian-mono])
174EFL_WITH_BIN([eolian-js], [eolian-js])
175EFL_WITH_BIN_SUFFIX([elua], [elua], [_bin])
176EFL_WITH_BIN([eldbus], [eldbus_codegen])
177EFL_WITH_BIN([elementary], [elementary-codegen])
178EFL_WITH_BIN([elementary], [elm-prefs-cc])
179
180#### Default values
181
182requirements_pc_eflall=""
183requirements_pc_deps_eflall=""
184requirements_libs_eflall=""
185requirements_cflags_eflall=""
186
187requirements_pc_crypto=""
188requirements_pc_deps_crypto=""
189requirements_libs_crypto=""
190requirements_cflags_crypto=""
191
192AC_CANONICAL_HOST
193
194# TODO: move me to m4 file that setups module/so related variables
195case "$host_os" in
196 cegcc*|mingw32ce*)
197 AC_MSG_ERROR([ceGCC compiler is not supported anymore. Exiting...])
198 ;;
199 mingw*)
200 have_win32="yes"
201 have_windows="yes"
202 MODULE_ARCH="v-v_maj.v_min"
203 MODULE_EXT=".dll"
204 ;;
205 cygwin*)
206 MODULE_ARCH="v-v_maj.v_min"
207 MODULE_EXT=".dll"
208 ;;
209 *solaris*)
210 have_solaris="yes"
211 MODULE_ARCH="v-v_maj.v_min"
212 MODULE_EXT=".so"
213 ;;
214 *)
215 MODULE_ARCH="v-v_maj.v_min"
216 MODULE_EXT=".so"
217 ;;
218esac
219
220EFL_VERSION_MAJOR="v_maj"
221EFL_VERSION_MINOR="v_min"
222AC_SUBST(EFL_VERSION_MAJOR)
223AC_SUBST(EFL_VERSION_MINOR)
224
225ELM_UNIX_DEF="#undef"
226ELM_WIN32_DEF="#undef"
227
228have_systemd_pkg="no"
229have_win32="no"
230have_windows="no"
231have_freebsd="no"
232have_darwin="no"
233have_linux="no"
234have_ps3="no"
235case "$host_os" in
236 mingw*|cygwin*)
237 # TODO: check cygwin* here
238 have_win32="yes"
239 have_windows="yes"
240 ELM_WIN32_DEF="#define"
241 EFLALL_CFLAGS="${EFLALL_CFLAGS} -D__USE_MINGW_ANSI_STDIO"
242 ;;
243 freebsd*)
244 have_freebsd="yes"
245 ELM_UNIX_DEF="#define"
246 ;;
247 darwin*)
248 have_darwin="yes"
249 ELM_UNIX_DEF="#define"
250 ;;
251 linux*)
252 have_linux="yes"
253 have_systemd_pkg="auto"
254 want_systemd="yes"
255 ELM_UNIX_DEF="#define"
256 ;;
257 *)
258 ELM_UNIX_DEF="#define"
259 ;;
260esac
261
262case "$host_vendor" in
263 ps3*)
264 have_ps3="yes"
265 ;;
266esac
267
268AC_SUBST([MODULE_ARCH])
269AC_DEFINE_UNQUOTED([MODULE_ARCH], ["${MODULE_ARCH}"], ["Module architecture"])
270AC_DEFINE_UNQUOTED([SHARED_LIB_SUFFIX], ["${MODULE_EXT}"], [Suffix for shared objects])
271AC_DEFINE_UNQUOTED([EXEEXT], ["${EXEEXT}"], [Suffix for binary objects])
272
273# TODO: move me to m4 file that setups the windows related variables
274AM_CONDITIONAL([HAVE_WIN32], [test "x${have_win32}" = "xyes"])
275AM_CONDITIONAL([HAVE_WINDOWS], [test "x${have_windows}" = "xyes"])
276AM_CONDITIONAL([HAVE_PS3], [test "x${have_ps3}" = "xyes"])
277
278AM_CONDITIONAL([HAVE_FREEBSD], [test "x${have_freebsd}" = "xyes"])
279AM_CONDITIONAL([HAVE_OSX], [test "x${have_darwin}" = "xyes"])
280AM_CONDITIONAL([HAVE_X86_64], [test "x${host_cpu}" = "xx86_64"])
281
282AC_SUBST([ELM_UNIX_DEF])
283AC_SUBST([ELM_WIN32_DEF])
284
285#### Checks for programs
286
287### libtool
288
289if test "x${have_windows}" = "xyes" ; then
290 lt_cv_deplibs_check_method='pass_all'
291fi
292m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
293LT_INIT([win32-dll disable-static pic-only])
294EFL_INIT
295
296if test "x${have_win32}" = "xyes" ; then
297 # We should be using ${CXX} here, but there is a bug in
298 # autotools macro and CXX is always set to g++ even if
299 # it's not found. So we are using an internal variable
300 # that does the work for now, may get broken in the future.
301 AC_DEFINE([_POSIX_C_SOURCE], [200809L], [Define the POSIX version])
302 if test "x${ac_ct_CXX}" = "x" -a "x${CXX}" = "xg++"; then
303 AC_MSG_ERROR([efl requires a C++ compiler got ${ac_ct_CXX} and ${CXX}.])
304 fi
305else
306 CXXFLAGS="${CXXFLAGS} -fPIC -DPIC"
307 LDFLAGS="${LDFLAGS} -fPIC -DPIC"
308fi
309
310### gettext
311
312AM_GNU_GETTEXT_VERSION([0.18])
313
314m4_ifdef([AC_GNU_GETTEXT], [
315AC_GNU_GETTEXT([external])
316po_makefile_in=po/Makefile.in
317have_po="yes"
318],
319[
320m4_ifdef([AM_GNU_GETTEXT], [
321AM_GNU_GETTEXT([external])
322po_makefile_in=po/Makefile.in
323have_po="yes"
324],
325[
326have_po="no"
327])
328])
329AC_SUBST([LTLIBINTL])
330LOCALE_DIR="${localedir}"
331AC_SUBST(LOCALE_DIR)
332
333if test "x${POSUB}" = "x" ; then
334 have_po="no"
335fi
336
337AM_CONDITIONAL([HAVE_PO], [test "x${have_po}" = "xyes"])
338
339### compilers
340
341AC_PROG_MKDIR_P
342AM_PROG_AS
343AC_PROG_CXX
344AC_PROG_OBJC
345AC_LANG(C)
346AC_PROG_CC_C99
347AM_PROG_CC_C_O
348AC_PROG_SED
349AC_PROG_MCS
350
351AM_CONDITIONAL([BUILD_EFL_NATIVE], [test "x${cross_compiling}" = "xno"])
352
353if test "x${ac_cv_prog_cc_c99}" = "xno" ; then
354 AC_MSG_ERROR([efl requires a c99-capable compiler])
355fi
356
357AC_SYS_LARGEFILE
358
359# pkg-config
360
361PKG_PROG_PKG_CONFIG
362if test "x${PKG_CONFIG}" = "x" ; then
363 AC_MSG_ERROR([pkg-config tool not found. Install it or set PKG_CONFIG environment variable to that path tool. Exiting...])
364fi
365
366# doxygen program for documentation building
367
368EFL_CHECK_DOXYGEN([build_doc="yes"], [build_doc="no"])
369
370# lcov
371
372if test "${want_coverage}" = "yes" ; then
373 AC_CHECK_PROG([have_lcov], [lcov], [yes], [no])
374 if test "x${have_lcov}" = "xyes" ; then
375 AC_SEARCH_LIBS([__gcov_init], [gcov])
376 EFL_CHECK_COMPILER_FLAGS([EFLALL], [-fprofile-arcs -ftest-coverage])
377 EFL_CHECK_COMPILER_FLAGS([EFLALL], [-fprofile-instr-generate -fcoverage-mapping])
378 EFL_CHECK_LINKER_FLAGS([EFLALL], [-fprofile-instr-generate -fcoverage-mapping])
379 if test "x${prefer_assert}" = "xno"; then
380 EFLALL_COV_CFLAGS="${EFLALL_COV_CFLAGS} -DNDEBUG"
381 else
382 EFLALL_COV_CFLAGS="${EFLALL_COV_CFLAGS} -g -O0"
383 fi
384 else
385 AC_MSG_ERROR([lcov is not found])
386 fi
387fi
388
389AM_CONDITIONAL([EFL_ENABLE_COVERAGE], [test "${want_coverage}" = "yes"])
390
391#### Checks for libraries
392
393# check unit testing library
394
395if test "${want_tests}" = "yes"; then
396 PKG_CHECK_MODULES([CHECK], [check >= 0.9.10])
397fi
398AM_CONDITIONAL([EFL_ENABLE_TESTS], [test "${want_tests}" = "yes"])
399
400
401# check for crypto/tls library to use
402case "$build_crypto" in
403 gnutls)
404 EFL_DEPEND_PKG([crypto], [GNUTLS], [gnutls >= 3.3.6])
405
406 AM_PATH_LIBGCRYPT([], [:],
407 [AC_MSG_ERROR([libgcrypt required but not found])])
408 requirements_libs_crypto="${LIBGCRYPT_LIBS} ${requirements_libs_crypto}"
409 requirements_cflags_crypto="${LIBGCRYPT_CFLAGS} ${requirements_cflags_crypto}"
410 ;;
411
412 openssl)
413 EFL_DEPEND_PKG([crypto], [OPENSSL], [openssl])
414 ;;
415esac
416AM_CONDITIONAL([HAVE_CRYPTO_GNUTLS], [test "${build_crypto}" = "gnutls"])
417AM_CONDITIONAL([HAVE_CRYPTO_OPENSSL], [test "${build_crypto}" = "openssl"])
418
419# check for lua old
420want_lua_old="no"
421AC_ARG_ENABLE([lua-old],
422 [AS_HELP_STRING([--enable-lua-old],[Enable interpreted Lua support (5.1 or 5.2). @<:@default=disabled@:>@])],
423 [
424 if test "x${enableval}" = "xyes" ; then
425 want_lua_old="yes"
426 else
427 want_lua_old="no"
428 fi
429 ],
430 [want_lua_old="no"])
431
432AM_CONDITIONAL([ENABLE_LUA_OLD], [test "${want_lua_old}" = "yes"])
433AC_DEFINE_IF([ENABLE_LUA_OLD], [test "${want_lua_old}" = "yes"],
434 [1], [Use interpreted Lua (5.1 or 5.2)])
435AC_SUBST([want_lua_old])
436
437
438want_liblz4="no"
439AC_ARG_ENABLE([liblz4],
440 [AS_HELP_STRING([--enable-liblz4],[Enable usage of liblz4 instead of our embedded copy. @<:@default=disabled@:>@])],
441 [
442 if test "x${enableval}" = "xyes" ; then
443 # Only ships pc file since r120
444 PKG_CHECK_MODULES([LIBLZ4], [liblz4])
445 EFL_DEPEND_PKG([EET], [LIBLZ4], [liblz4])
446 EFL_DEPEND_PKG([EVAS], [LIBLZ4], [liblz4])
447 want_liblz4="yes"
448 else
449 want_liblz4="no"
450 fi
451 ],
452 [want_liblz4="no"])
453
454AM_CONDITIONAL([ENABLE_LIBLZ4], [test "${want_liblz4}" = "yes"])
455AC_DEFINE_IF([ENABLE_LIBLZ4], [test "${want_liblz4}" = "yes"], [1], [Use liblz4 external library instead of embedded copy])
456AC_SUBST([want_liblz4])
457AC_SUBST([ENABLE_LIBLZ4])
458
459
460want_vnc_server="no"
461AC_ARG_ENABLE([vnc-server],
462 [AS_HELP_STRING([--enable-vnc-server],[Build Ecore_Evas VNC module. @<:@default=disabled@:>@])],
463 [
464 if test "x${enableval}" = "xyes" ; then
465 PKG_CHECK_MODULES([LIBVNCSERVER], [libvncserver])
466 want_vnc_server="yes"
467 else
468 want_vnc_server="no"
469 fi
470 ],
471 [want_vnc_server="no"])
472
473#### Checks for header files
474
475# Common Checks (keep names sorted for ease of use):
476AC_HEADER_DIRENT
477AC_HEADER_TIME
478
479AC_CHECK_HEADERS([ \
480execinfo.h \
481mcheck.h \
482sys/signalfd.h \
483sys/types.h \
484sys/param.h \
485sys/mman.h \
486netinet/in.h \
487sys/auxv.h \
488asm/hwcap.h \
489])
490
491if test "x${have_linux}" = "xyes" ; then
492 AC_CHECK_HEADERS([sys/inotify.h])
493 AC_CHECK_HEADERS([sys/epoll.h])
494fi
495
496EFL_CHECK_PATH_MAX
497
498#### Checks for defines in headers
499
500EFL_CHECK_DEFINE(TCP_CORK, netinet/tcp.h)
501EFL_CHECK_DEFINE(TCP_NOPUSH, netinet/tcp.h)
502EFL_CHECK_DEFINE(UDP_CORK, netinet/udp.h)
503
504#### Checks for types
505
506# wchar_t
507AC_CHECK_SIZEOF([wchar_t])
508EINA_SIZEOF_WCHAR_T=$ac_cv_sizeof_wchar_t
509AC_SUBST([EINA_SIZEOF_WCHAR_T])
510
511AC_CHECK_SIZEOF(int, 4)
512AC_CHECK_SIZEOF(long, 4)
513
514AC_CHECK_SIZEOF([uintptr_t])
515EINA_SIZEOF_UINTPTR_T=$ac_cv_sizeof_uintptr_t
516AC_SUBST([EINA_SIZEOF_UINTPTR_T])
517
518AC_CHECK_TYPES([siginfo_t], [], [],
519 [[
520#include <signal.h>
521#if HAVE_SIGINFO_H
522# include <siginfo.h>
523#endif
524 ]])
525
526#### Checks for structures
527
528
529#### Checks for compiler characteristics
530
531AC_C_BIGENDIAN
532AC_C_INLINE
533EFL_CHECK_COMPILER_FLAGS([EFLALL], [-Wall -Wextra -Wpointer-arith -Wno-missing-field-initializers -fvisibility=hidden -fdata-sections -ffunction-sections])
534EFL_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])
535case "${build_profile}" in
536 dev)
537 dnl Check if compiler has a dodgy -Wshadow that emits errors when shadowing a global
538 AC_MSG_CHECKING([whether -Wshadow generates spurious warnings])
539 CFLAGS_save="${CFLAGS}"
540 CFLAGS="${CFLAGS} -Werror -Wshadow"
541 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[int x;]], [[int x = 0; (void)x;]])],[AC_MSG_RESULT([no])
542 EFL_CHECK_COMPILER_FLAGS([EFLALL], [-Wshadow])],[AC_MSG_RESULT([yes])])
543 CFLAGS="${CFLAGS_save}"
544 ;;
545
546 debug)
547 ;;
548
549 release)
550 ;;
551esac
552
553EFL_ATTRIBUTE_VECTOR
554EFL_ATTRIBUTE_ALWAYS_INLINE
555
556EFLALL_LIBS="${EFLALL_LIBS}"
557EFLALL_CFLAGS="${EFLALL_CFLAGS}"
558
559## CPU architecture specific assembly
560
561build_cpu_mmx="no"
562build_cpu_sse3="no"
563build_cpu_altivec="no"
564build_cpu_neon="no"
565
566want_neon="yes"
567AC_ARG_ENABLE([neon],
568 [AS_HELP_STRING([--disable-neon],[disable neon support @<:@default=enable@:>@])],
569 [
570 if test "x${enableval}" = "xyes"; then
571 want_neon="yes"
572 else
573 want_neon="no"
574 fi
575 ])
576
577SSE3_CFLAGS=""
578ALTIVEC_CFLAGS=""
579NEON_CFLAGS=""
580
581case $host_cpu in
582 i*86|x86_64|amd64)
583 AC_DEFINE([BUILD_MMX], [1], [Build MMX Code])
584 build_cpu_mmx="yes"
585 AC_CHECK_HEADER([immintrin.h],
586 [
587 AC_DEFINE(BUILD_SSE3, 1, [Build SSE3 Code])
588 build_cpu_sse3="yes"
589 ],
590 [build_cpu_sse3="no"])
591 AC_MSG_CHECKING([whether to build SSE3 code])
592 AC_MSG_RESULT([${build_cpu_sse3}])
593
594 if test "x$build_cpu_sse3" = "xyes" ; then
595 SSE3_CFLAGS="-msse3"
596 fi
597 ;;
598 *power* | *ppc*)
599 build_cpu_altivec="yes"
600 AC_CHECK_HEADER([altivec.h],
601 [
602 AC_DEFINE([BUILD_ALTIVEC], [1], [Build Altivec Code])
603 AC_DEFINE([HAVE_ALTIVEC_H], [1], [Have altivec.h header file])
604 build_cpu_altivec="yes"
605 ],
606 [
607 save_CFLAGS=$CFLAGS
608 save_CPPFLAGS=$CPPFLAGS
609 CFLAGS=$CFLAGS" -maltivec"
610 CPPFLAGS=$CPPFLAGS" -maltivec"
611 unset ac_cv_header_altivec_h
612 AC_CHECK_HEADER([altivec.h],
613 [
614 AC_DEFINE([BUILD_ALTIVEC], [1], [Build Altivec Code])
615 AC_DEFINE([HAVE_ALTIVEC_H], [1], [Have altivec.h header file])
616 build_cpu_altivec="yes"
617 ],
618 [build_cpu_altivec="no"]
619 )
620 CFLAGS=$save_CFLAGS
621 CPPFLAGS=$save_CPPFLAGS
622 ]
623 )
624 if test "x${build_cpu_altivec}" = "xyes"; then
625 AC_MSG_CHECKING([whether to use altivec compiler flag])
626 if test "x$GCC" = "xyes"; then
627 if echo "int main(){return 0;}" | ${CPP} -faltivec - > /dev/null 2>&1; then
628 altivec_cflags="-faltivec"
629 AC_DEFINE([BUILD_ALTIVEC], [1], [Build Altivec Code])
630 elif echo "int main(){return 0;}" | ${CPP} -maltivec - > /dev/null 2>&1; then
631 altivec_cflags="-maltivec"
632 AC_DEFINE([BUILD_ALTIVEC], [1], [Build Altivec Code])
633 fi
634 fi
635 AC_MSG_RESULT([${altivec_cflags}])
636 CFLAGS="$CFLAGS ${altivec_cflags}"
637 ALTIVEC_CFLAGS="-maltivec"
638 fi
639 ;;
640 arm*)
641 if test "x${want_neon}" = "xyes"; then
642 build_cpu_neon="yes"
643 AC_MSG_CHECKING([whether to use NEON instructions])
644 CFLAGS_save="${CFLAGS}"
645 CFLAGS="-mfpu=neon -ftree-vectorize ${CFLAGS}"
646 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <arm_neon.h>]], [[asm volatile ("vqadd.u8 d0, d1, d0\n")]])],[
647 AC_MSG_RESULT([yes])
648 AC_DEFINE([BUILD_NEON], [1], [Build NEON Code])
649 build_cpu_neon="yes"
650 NEON_CFLAGS="-mfpu=neon"
651 ],[
652 AC_MSG_RESULT([no])
653 build_cpu_neon="no"
654 ])
655 CFLAGS="${CFLAGS_save}"
656 fi
657 ;;
658 aarch64*)
659 if test "x${want_neon}" = "xyes"; then
660 build_cpu_neon="yes"
661 AC_MSG_CHECKING([whether to use NEON instructions])
662 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <arm_neon.h>]], [[volatile uint32x4_t test = vdupq_n_u32(0x1);]])],[
663 AC_MSG_RESULT([yes])
664 AC_DEFINE([BUILD_NEON], [1], [Build NEON Code])
665 AC_DEFINE([BUILD_NEON_INTRINSICS], [1], [Build NEON Intrinsics])
666 build_cpu_neon="yes"
667 build_cpu_neon_intrinsics="yes"
668 ],[
669 AC_MSG_RESULT([no])
670 build_cpu_neon="no"
671 ])
672 fi
673 ;;
674esac
675
676AM_CONDITIONAL([BUILD_NEON], [test "${build_cpu_neon}" = "yes"])
677AM_CONDITIONAL([BUILD_NEON_INTRINSICS], [test "${build_cpu_neon_intrinsics}" = "yes"])
678
679AC_SUBST([ALTIVEC_CFLAGS])
680AC_SUBST([SSE3_CFLAGS])
681AC_SUBST([NEON_CFLAGS])
682
683#### Checks for linker characteristics
684
685
686#### Checks for library functions
687
688AC_CHECK_FUNCS([\
689backtrace \
690backtrace_symbols \
691execvp \
692fpathconf \
693fstatat \
694malloc_usable_size \
695mkdirat \
696mtrace \
697realpath \
698strlcpy \
699geteuid \
700getuid \
701pause \
702gmtime_r \
703pthread_getcpuclockid \
704clock_gettime \
705clearenv
706])
707
708AC_FUNC_ALLOCA
709AC_FUNC_MMAP
710AC_FUNC_STRERROR_R
711
712EFL_CHECK_FUNCS([EFLALL], [fnmatch gettimeofday dirfd fcntl sched_getcpu])
713
714have_atfile_source="${ac_cv_func_fstatat}"
715AC_DEFINE_IF([HAVE_ATFILE_SOURCE],
716 [test "x${have_atfile_source}" = "xyes"],
717 [1], [Use fstatat and other -at file functions])
718
719
720
721###################### EFL ######################
722
723want_libeeze="yes"
724AC_ARG_ENABLE([libeeze],
725 [AS_HELP_STRING([--disable-libeeze],[disable Eeze device library @<:@default=enable@:>@])],
726 [
727 if test "x${enableval}" = "xyes"; then
728 want_libeeze="yes"
729 else
730 want_libeeze="no"
731 CFOPT_WARNING="yes"
732 fi
733 ])
734
735build_libeeze="yes"
736if test "x${want_libeeze}" = "xyes" ; then
737 if test "x${have_linux}" = "xyes" ; then
738 build_libeeze="yes"
739 else
740 build_libeeze="no"
741 want_libeeze="no"
742 fi
743else
744 build_libeeze="no"
745fi
746
747AC_ARG_ENABLE([systemd],
748 [AS_HELP_STRING([--disable-systemd],[Disable systemd support. @<:@default=enabled@:>@])],
749 [
750 if test "x${enableval}" = "xyes" ; then
751 want_systemd="yes"
752 else
753 want_systemd="no"
754 fi
755 ])
756
757systemd_dbus_prefix="# "
758if test "${want_systemd}" = "yes"; then
759 systemd_dbus_prefix=""
760fi
761AC_SUBST(systemd_dbus_prefix)
762
763AC_ARG_WITH([systemdunitdir],
764 AS_HELP_STRING([--with-systemdunitdir=DIR],[path to systemd user services directory]),
765 [USER_SESSION_DIR=${withval}])
766if test "$want_systemd" == "no"; then
767 have_systemd_user_session="no"
768elif test -n "${USER_SESSION_DIR}"; then
769 have_systemd_user_session="yes"
770 AC_MSG_NOTICE([Using systemd user services directory as ${USER_SESSION_DIR}])
771else
772 # Detect systemd user session directory properly
773 EFL_PKG_CHECK_VAR([USER_SESSION_DIR], [systemd >= 192], [systemduserunitdir],
774 [have_systemd_user_session="yes"], [have_systemd_user_session="no"])
775
776 if test "$want_systemd" = "yes" -a "$have_systemd_user_session" = "no"; then
777 AC_MSG_ERROR([systemd support wanted, but systemd was not found.])
778 fi
779fi
780
781AM_CONDITIONAL([HAVE_SYSTEMD_USER_SESSION], [test "x${have_systemd_user_session}" = "xyes"])
782AC_SUBST([USER_SESSION_DIR])
783
784if test "x${have_systemd_pkg}" = "xauto" -o "x${have_systemd_pkg}" = "xyes"; then
785 PKG_CHECK_MODULES([SYSTEMD], [libsystemd >= 209],
786 [
787 have_systemd_pkg="yes"
788 AC_DEFINE_UNQUOTED([HAVE_SYSTEMD_LOGIN_209],[1],[Defined if systemd >= 209])
789 ],
790 [have_systemd_pkg="no"])
791fi
792
793# check for systemd library if requested
794if test "x${want_systemd}" = "xyes" -a "x${have_systemd_pkg}" = "xno"; then
795 AC_MSG_ERROR([Systemd dependency requested but not found])
796fi
797
798AM_CONDITIONAL([WANT_SYSTEMD], [test "${want_systemd}" = "yes"])
799AM_CONDITIONAL([HAVE_SYSTEMD], [test "${want_systemd}" = "yes" -a "${have_systemd_pkg}" = "yes"])
800#### Platform-dependent
801
802#### Evil
803EFL_LIB_START_OPTIONAL([Evil], [test "${have_windows}" = "yes"])
804
805### Default values
806
807### Additional options to configure
808EFL_SELECT_WINDOWS_VERSION
809
810### Checks for programs
811
812### Checks for libraries
813
814EFL_ADD_LIBS([EVIL], [-lpsapi -lole32 -lws2_32 -lsecur32 -luuid -lregex])
815
816### Checks for header files
817
818AC_CHECK_HEADERS([regex.h fnmatch.h],
819 [],
820 [AC_MSG_ERROR([regex.h or fnmatch.h can not be found])])
821
822### Checks for types
823
824### Checks for structures
825
826### Checks for compiler characteristics
827
828EVIL_CPPFLAGS="-DPSAPI_VERSION=1"
829# TODO: should we have these at EFL (global?)
830# Note: these warnings should not be used with C++ code
831EVIL_CFLAGS_WRN="-Wdeclaration-after-statement -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls"
832EVIL_CXXFLAGS="${EVIL_CXXFLAGS}"
833
834if test "x${have_win32}" = "xyes" ; then
835 EVIL_CFLAGS="-DSECURITY_WIN32 ${EVIL_CFLAGS}"
836 EVIL_CXXFLAGS="-fno-rtti -fno-exceptions -DSECURITY_WIN32 ${EVIL_CXXFLAGS}"
837fi
838
839AC_SUBST([EVIL_CPPFLAGS])
840AC_SUBST([EVIL_CFLAGS_WRN])
841AC_SUBST([EVIL_CXXFLAGS])
842
843### Checks for linker characteristics
844
845### Checks for library functions
846
847AC_SEARCH_LIBS([regcomp], [regex],
848 [],
849 [AC_MSG_ERROR([regcomp() can not be found in libregex])])
850
851AC_SEARCH_LIBS([fnmatch], [regex],
852 [],
853 [AC_MSG_ERROR([fnmatch() can not be found in libregex])])
854
855EFL_LIB_END_OPTIONAL([Evil])
856
857AC_SUBST([USE_EVIL_CFLAGS])
858AC_SUBST([USE_EVIL_LIBS])
859#### End of Evil
860
861
862#### Escape
863EFL_LIB_START_OPTIONAL([Escape], [test "${have_ps3}" = "yes"])
864
865### Additional options to configure
866
867### Default values
868
869### Checks for programs
870
871### Checks for libraries
872EFL_ADD_LIBS([ESCAPE], [-llv2 -lm -lnet -lsysmodule -liberty])
873
874### Checks for header files
875
876### Checks for types
877
878### Checks for structures
879
880### Checks for compiler characteristics
881
882### Checks for linker characteristics
883
884### Checks for library functions
885
886EFL_LIB_END_OPTIONAL([Escape])
887#### End of Escape
888
889EFL_CHECK_FUNC([SHM], [shm_open])
890SHM_LIBS="${requirements_libs_shm}"
891AC_SUBST([SHM_LIBS])
892
893AC_SUBST([DL_LIBS])
894AC_SUBST([DL_INTERNAL_LIBS])
895#### End of Platform-dependent
896
897
898#### Eina
899
900EFL_LIB_START([Eina])
901
902### Default values
903
904have_safety_checks="yes"
905want_log="yes"
906case "${build_profile}" in
907 dev)
908 with_max_log_level=""
909 have_stringshare_usage="no"
910 want_valgrind="auto"
911 want_debug_malloc="no"
912 want_debug_threads="no"
913 want_default_mempool="no"
914 want_cow_magic="no"
915 ;;
916
917 debug)
918 with_max_log_level=""
919 have_stringshare_usage="yes"
920 want_valgrind="auto"
921 want_debug_malloc="yes"
922 want_debug_threads="yes"
923 want_default_mempool="yes"
924 want_cow_magic="yes"
925 ;;
926
927 release)
928 with_max_log_level=""
929 have_stringshare_usage="no"
930 want_valgrind="no"
931 want_debug_malloc="no"
932 want_debug_threads="no"
933 want_default_mempool="no"
934 want_cow_magic="no"
935 ;;
936esac
937
938EFL_CHECK_LIBUNWIND
939
940EINA_CONFIG([HAVE_ALLOCA_H], [test "x${ac_cv_working_alloca_h}" = "xyes"])
941EINA_CONFIG([SAFETY_CHECKS], [test "x${have_safety_checks}" = "xyes"])
942EINA_CONFIG([DEFAULT_MEMPOOL], [test "x${want_default_mempool}" = "xyes"])
943
944if test -n "${with_max_log_level}"; then
945 AC_MSG_NOTICE([ignoring any EINA_LOG() with level greater than ${with_max_log_level}])
946 AC_DEFINE_UNQUOTED([EINA_LOG_LEVEL_MAXIMUM], [${with_max_log_level}], [if set, logging is limited to this amount.])
947fi
948
949AC_DEFINE_IF([EINA_STRINGSHARE_USAGE],
950 [test "x${have_stringshare_usage}" = "xyes"],
951 [1], [Report Eina stringshare usage pattern])
952
953### Additional options to configure
954AC_ARG_ENABLE([magic-debug],
955 [AS_HELP_STRING([--disable-magic-debug],[disable magic debug of eina structure @<:@default=enabled@:>@])],
956 [
957 if test "x${enableval}" = "xyes" ; then
958 have_magic_debug="yes"
959 else
960 have_magic_debug="no"
961 fi
962 ],
963 [have_magic_debug="yes"])
964
965AC_ARG_ENABLE([debug-threads],
966 [AS_HELP_STRING([--enable-debug-threads], [enable debugging of eina threads @<:@default=disabled@:>@])],
967 [
968 if test "x${enableval}" = "xyes" ; then
969 want_debug_threads="yes"
970 else
971 want_debug_threads="no"
972 fi
973 ])
974
975EINA_CONFIG([MAGIC_DEBUG], [test "x${have_magic_debug}" = "xyes"])
976
977AC_ARG_WITH([xattr-tests-path],
978 [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])])
979
980evas_dicts_hyphen_dir="/usr/share/hyphen/"
981AC_ARG_WITH([dictionaries-hyphen-dir],
982 [AS_HELP_STRING([--with-dictionaries-hyphen-dir=DIR],[path of hunspell-compatible hyphen dictionaries])], [evas_dicts_hyphen_dir=$withval])
983AC_DEFINE_UNQUOTED([EVAS_DICTS_HYPHEN_DIR],["$evas_dicts_hyphen_dir"], [Hunspell-compatible hyphen dictionaries install directory])
984
985### Checks for programs
986
987### Checks for libraries
988
989# sockets
990
991case "$host_os" in
992 mingw*)
993 have_socket="no"
994 ;;
995 *solaris*)
996 AC_CHECK_LIB([socket], [connect],
997 [
998 have_socket="yes"
999 requirement_socket="-lsocket"
1000 requirement_nsl="-lnsl"
1001 ],
1002 [have_socket="no"])
1003 ;;
1004 darwin*)
1005 have_socket="yes"
1006 ;;
1007 *)
1008 have_socket="yes"
1009 ;;
1010esac
1011
1012EFL_PLATFORM_DEPEND([EINA], [all])
1013
1014EFL_ADD_LIBS([EINA], [${requirement_socket} -lm])
1015
1016## Options
1017
1018# Valgrind
1019AC_ARG_ENABLE([valgrind],
1020 [AS_HELP_STRING([--disable-valgrind],[enable valgrind mempool declaration. @<:@default=disabled@:>@])],
1021 [
1022 if test "x${enableval}" = "xyes" ; then
1023 want_valgrind="yes"
1024 else
1025 want_valgrind="no"
1026 fi
1027 ])
1028
1029if test "${want_valgrind}" = "auto"; then
1030 PKG_CHECK_EXISTS([valgrind >= 2.4.0], [want_valgrind="yes"],
1031 [want_valgrind="no"
1032 AC_MSG_WARN([valgrind support desired by --with-profile=${build_profile} but not found. If your platform supports it, install valgrind.])])
1033fi
1034
1035if test "${want_valgrind}" = "no"; then
1036 AC_DEFINE([NVALGRIND], [1], [Valgrind support disabled])
1037else
1038 PKG_CHECK_MODULES([VALGRIND], [valgrind >= 2.4.0])
1039 AC_DEFINE([HAVE_VALGRIND], [1], [Valgrind support enabled])
1040fi
1041
1042AC_DEFINE_IF([EINA_DEBUG_MALLOC],
1043 [test "x${ac_cv_func_malloc_usable_size}" = "xyes" && test "x${want_debug_malloc}" = "xyes"],
1044 [1], [Turn on debugging overhead in mempool])
1045
1046AC_DEFINE_IF([EINA_COW_MAGIC_ON],
1047 [test "x${want_cow_magic}" = "xyes" ],
1048 [1], [Turn on Eina_Magic in Eina_Cow])
1049
1050EFL_OPTIONAL_DEPEND_PKG([EINA], [${want_systemd}], [SYSTEMD], [libsystemd])
1051
1052EFL_EVAL_PKGS([EINA])
1053
1054## Examples
1055
1056## Benchmarks
1057
1058PKG_CHECK_MODULES([GLIB],
1059 [glib-2.0],
1060 [have_glib="yes"],
1061 [have_glib="no"])
1062
1063if test "x${have_glib}" = "xyes" ; then
1064 GLIB_CFLAGS="${GLIB_CFLAGS} -DEINA_BENCH_HAVE_GLIB"
1065fi
1066
1067### Checks for header files
1068
1069# sys/mman.h could be provided by evil/escape/exotic so we need to set CFLAGS accordingly
1070CFLAGS_save="${CFLAGS}"
1071CFLAGS="${CFLAGS} ${EINA_CFLAGS}"
1072AC_CHECK_HEADERS([sys/mman.h])
1073CFLAGS="${CFLAGS_save}"
1074
1075AC_CHECK_HEADER([byteswap.h], [have_byteswap="yes"], [have_byteswap="no"])
1076
1077### Checks for types
1078
1079EINA_CONFIG([HAVE_DIRENT_H], [test "x${have_dirent}" = "xyes"])
1080AC_DEFINE_IF([HAVE_DIRENT_H], [test "x${have_dirent}" = "xyes"],
1081 [1], [Define to 1 if you have a valid <dirent.h> header file.])
1082
1083### Checks for structures
1084
1085### Checks for compiler characteristics
1086EINA_CONFIG([HAVE_BYTESWAP_H], [test "x${have_byteswap}" = "xyes"])
1087
1088EFL_CHECK_GCC_BUILTIN([bswap16], [HAVE_BSWAP16])
1089EFL_CHECK_GCC_BUILTIN([bswap32], [HAVE_BSWAP32])
1090EFL_CHECK_GCC_BUILTIN([bswap64], [HAVE_BSWAP64])
1091
1092### Checks for linker characteristics
1093
1094### Checks for library functions
1095
1096AC_CHECK_FUNCS([fchmod])
1097
1098EFL_CHECK_FUNCS([EINA], [dlopen dladdr iconv shm_open splice setxattr getpagesize prctl])
1099
1100enable_log="no"
1101if test "x${efl_func_fnmatch}" = "xyes" && test "x${want_log}" = "xyes" ; then
1102 enable_log="yes"
1103fi
1104
1105AC_MSG_CHECKING([wether to build Eina_Log infrastructure])
1106AC_MSG_RESULT([${enable_log}])
1107
1108EINA_CONFIG([ENABLE_LOG], [test "x${enable_log}" = "xyes"])
1109
1110EFL_CHECK_THREADS
1111if test "x${efl_have_threads}" = "xno"; then
1112 CFOPT_WARNING="xyes"
1113fi
1114
1115AC_COMPILE_IFELSE(
1116 [AC_LANG_PROGRAM(
1117 [[ ]],
1118 [[
1119 static __thread int a = 0;
1120 ]])],
1121 [have_thread_specifier="yes"],
1122 [have_thread_specifier="no"])
1123AC_MSG_CHECKING([for __thread specifier])
1124AC_MSG_RESULT([${have_thread_specifier}])
1125if test "x${have_thread_specifier}" = "xyes" ; then
1126 AC_DEFINE([HAVE_THREAD_SPECIFIER], [1], [Have the __thread specifier])
1127fi
1128
1129EFL_ADD_PUBLIC_LIBS([EINA], [${EFL_PTHREAD_LIBS}])
1130EFL_ADD_CFLAGS([EINA], [${EFL_PTHREAD_CFLAGS}])
1131
1132EINA_CONFIG([HAVE_PTHREAD_BARRIER], [test "x${efl_have_pthread_barrier}" = "xyes"])
1133EINA_CONFIG([HAVE_PTHREAD_AFFINITY], [test "x${efl_have_setaffinity}" = "xyes"])
1134EINA_CONFIG([HAVE_PTHREAD_SETNAME], [test "x${efl_have_setname}" = "xyes"])
1135EINA_CONFIG([HAVE_DEBUG_THREADS], [test "x${want_debug_threads}" = "xyes"])
1136EINA_CONFIG([HAVE_POSIX_SPINLOCK], [test "x${efl_have_posix_threads_spinlock}" = "xyes"])
1137EINA_CONFIG([HAVE_OSX_SPINLOCK], [test "x${efl_have_osx_spinlock}" = "xyes"])
1138EINA_CONFIG([HAVE_OSX_SEMAPHORE], [test "x${have_darwin}" = "xyes"])
1139EINA_CONFIG([HAVE_WORDS_BIGENDIAN], [test "x${ac_cv_c_bigendian}" = "xyes"])
1140
1141### Modules
1142
1143EINA_CHECK_MODULE([chained-pool], [static], [chained pool])
1144EINA_CHECK_MODULE([pass-through], [static], [pass through])
1145EINA_CHECK_MODULE([one-big], [static], [one big])
1146
1147EFL_ADD_FEATURE([EINA], [systemd-journal], [${want_systemd}])
1148
1149EFL_LIB_END([Eina])
1150#### End of Eina
1151
1152#### Eina CXX
1153EFL_LIB_START([Eina_Cxx])
1154
1155AC_ARG_ENABLE([cxx-bindings],
1156 [AS_HELP_STRING([--disable-cxx-bindings],[disable C++11 bindings. @<:@default=enabled@:>@])],
1157 [want_cxx11="${enableval}"], [want_cxx11="yes"])
1158
1159have_cxx11="no"
1160if test "x${want_cxx11}" = "xyes"; then
1161 EFL_CXX_COMPILE_STDCXX_11([ext])
1162 if test "x${HAVE_CXX11}" = "x1" ; then
1163
1164 # We should be using ${CXX} here, but there is a bug in
1165 # autotools macro and CXX is always set to g++ even if
1166 # it's not found. So we are using an internal variable
1167 # that does the work for now, may get broken in the future.
1168 if test "x${ac_ct_CXX}" = "x" -a "x${CXX}" = "xg++"; then
1169 AC_MSG_ERROR([efl requires a C++ compiler got ${ac_ct_CXX} and ${CXX}.])
1170 fi
1171
1172 have_cxx11="yes"
1173 fi
1174fi
1175
1176AM_CONDITIONAL([HAVE_CXX], [test "x${have_cxx11}" = "xyes"])
1177
1178EFL_INTERNAL_DEPEND_PKG([EINA_CXX], [Eina])
1179EFL_ADD_CFLAGS([EINA_CXX], [${EFL_PTHREAD_CFLAGS}])
1180EFL_EVAL_PKGS([EINA_CXX])
1181
1182EFL_LIB_END([Eina_Cxx])
1183#### End of Eina CXX
1184
1185AC_ARG_WITH([js],
1186 [AS_HELP_STRING([--with-js=@<:@nodejs/libv8/libuv/none@:>@],[enable JavaScript bindings using nodejs or libv8/libuv as build dependencies. The libuv option implies libv8. @<:@default=none@:>@])],
1187 [want_js="${withval}"], [want_js="none"])
1188
1189EFLJS_CXXFLAGS=""
1190AC_LANG_PUSH([C++])
1191case "$want_js" in
1192 nodejs)
1193 AC_CHECK_HEADERS([node/v8.h nodejs/deps/v8/v8.h nodejs/deps/v8/include/v8.h nodejs/src/v8.h v8.h],
1194 [
1195 v8_header=AC_header
1196 v8_header_define=AS_TR_CPP([HAVE_]AC_header)
1197 EFLJS_CXXFLAGS="$EFLJS_CXXFLAGS -D$v8_header_define"
1198 break
1199 ]
1200 [AC_MSG_ERROR([Could not find v8 include headers from nodejs.])])
1201 AC_CHECK_HEADERS([node/node.h nodejs/deps/node/node.h nodejs/deps/node/include/node.h nodejs/src/node.h node.h],
1202 [
1203 node_header_define=AS_TR_CPP([HAVE_]AC_header)
1204 EFLJS_CXXFLAGS="$EFLJS_CXXFLAGS -D$node_header_define"
1205 break
1206 ]
1207 [AC_MSG_ERROR([Could not find node include headers from nodejs.])])
1208 AC_CHECK_HEADERS([node/uv.h nodejs/deps/uv/uv.h nodejs/deps/uv/include/uv.h nodejs/src/uv.h uv.h],
1209 [
1210 uv_header_define=AS_TR_CPP([HAVE_]AC_header)
1211 EFLJS_CXXFLAGS="$EFLJS_CXXFLAGS -D$uv_header_define"
1212 break
1213 ]
1214 [AC_MSG_ERROR([Could not find uv include headers from nodejs.])])
1215 ;;
1216 libv8)
1217 AC_CHECK_HEADERS([v8.h],
1218 [
1219 v8_header=AC_header
1220 break
1221 ]
1222 [AC_MSG_ERROR([Could not find v8 include headers from libv8.])])
1223 ;;
1224 libuv)
1225 AC_CHECK_HEADERS([v8.h],
1226 [
1227 v8_header=AC_header
1228 break
1229 ]
1230 [AC_MSG_ERROR([Could not find v8 include headers from libv8.])])
1231 AC_CHECK_HEADERS([uv.h],
1232 [break]
1233 [AC_MSG_ERROR([Could not find uv include headers from libuv.])])
1234 ;;
1235 none)
1236 ;;
1237 *) AC_MSG_ERROR([Invalid javascript dependency (${want_js}): must be none, nodejs, libv8 or libuv]) ;;
1238esac
1239
1240have_v8_global="no"
1241have_v8_create_params="no"
1242if test "$want_js" != "none" ; then
1243AC_COMPILE_IFELSE(
1244 [AC_LANG_PROGRAM(
1245 [[
1246#include "$v8_header"
1247 ]],
1248 [[
1249v8::Isolate::CreateParams create_params; create_params.array_buffer_allocator = nullptr;
1250 ]])
1251 ],
1252 [
1253 AC_DEFINE(HAVE_V8_CREATE_PARAMS, 1, [Define to 1 if you must pass create_params explicitly.])
1254 have_v8_create_params="yes"
1255 AC_MSG_NOTICE([checking for v8::Isolate::CreateParams... yes])
1256 ],
1257 [
1258 AC_MSG_NOTICE([checking for v8::Isolate::CreateParams... no])
1259 ])
1260AC_COMPILE_IFELSE(
1261 [AC_LANG_PROGRAM(
1262 [[
1263#include "$v8_header"
1264#include <type_traits>
1265 ]],
1266 [[
1267 static_assert((std::is_same< ::v8::Global<void>, ::v8::UniquePersistent<void>>::value), "");
1268 ]])
1269 ],
1270 [
1271 AC_DEFINE(HAVE_V8_GLOBAL, 1, [Define to 1 if you must pass create_params explicitly.])
1272 have_v8_global="yes"
1273 AC_MSG_NOTICE([checking for v8::Global<T> class... yes])
1274 ],
1275 [
1276 AC_MSG_NOTICE([checking for v8::Global<T> class... no])
1277 ])
1278fi
1279AM_CONDITIONAL([HAVE_V8_CREATE_PARAMS], [test "x${have_v8_create_params}" = "xyes"])
1280AM_CONDITIONAL([HAVE_V8_GLOBAL], [test "x${have_v8_global}" = "xyes"])
1281AC_SUBST([HAVE_V8_CREATE_PARAMS])
1282AC_SUBST([HAVE_V8_GLOBAL])
1283AC_LANG_POP([C++])
1284
1285AM_CONDITIONAL([HAVE_NODEJS], [test "x${want_js}" = "xnodejs"])
1286AC_DEFINE_IF([HAVE_NODEJS], [test "x${want_js}" = "xnodejs"],
1287 [1], [Using NodeJS])
1288AC_SUBST([want_js])
1289AC_SUBST([HAVE_NODEJS])
1290
1291have_js="no"
1292if test "x${want_js}" != "xnone" ; then
1293 have_js="yes"
1294fi
1295AM_CONDITIONAL([HAVE_JS], [test "x${have_js}" = "xyes"])
1296AC_DEFINE_IF([HAVE_JS], [test "x${have_js}" = "xyes"], [1], [Compiling bindings for JavaScript])
1297AC_SUBST([HAVE_JS])
1298
1299AM_CONDITIONAL([HAVE_LIBUV], [test "x${want_js}" = "xnodejs" -o "x${want_js}" = "xlibuv"])
1300AC_DEFINE_IF([HAVE_LIBUV], [test "x${want_js}" = "xnodejs" -o "x${want_js}" = "xlibuv"],
1301 [1], [Compiling libuv event loop integration])
1302AC_SUBST([HAVE_LIBUV])
1303
1304# For efljspack mime handling
1305AM_CONDITIONAL([HAVE_XDG_DATA_HOME], [test "x${XDG_DATA_HOME}" != "x"])
1306AM_COND_IF([HAVE_XDG_DATA_HOME], [AC_SUBST([XDG_DATA_HOME])], [AC_SUBST([XDG_DATA_HOME], "$HOME/.local/share")])
1307
1308#### Eina JS
1309EFL_LIB_START_OPTIONAL([Eina_Js], [test "x${have_js}" = "xyes"])
1310EFL_INTERNAL_DEPEND_PKG([EINA_JS], [Eina])
1311EFL_INTERNAL_DEPEND_PKG([EINA_JS], [Eo])
1312EFL_ADD_CFLAGS([EINA_JS], [${EFL_PTHREAD_CFLAGS}])
1313EFL_EVAL_PKGS([EINA_JS])
1314
1315EFL_LIB_END_OPTIONAL([Eina_Js])
1316#### End of Eina JS
1317
1318#### Ecore JS
1319EFL_LIB_START_OPTIONAL([Ecore_Js], [test "x${have_js}" = "xyes"])
1320
1321EFL_INTERNAL_DEPEND_PKG([ECORE_JS], [ecore])
1322EFL_INTERNAL_DEPEND_PKG([ECORE_JS], [ecore_file])
1323EFL_INTERNAL_DEPEND_PKG([ECORE_JS], [efl])
1324EFL_ADD_CFLAGS([ECORE_JS], [${EFL_PTHREAD_CFLAGS}])
1325EFL_EVAL_PKGS([ECORE_JS])
1326
1327EFL_LIB_END_OPTIONAL([Ecore_Js])
1328#### End of Ecore JS
1329
1330#### Eio JS
1331EFL_LIB_START_OPTIONAL([Eio_Js], [test "x${have_js}" = "xyes"])
1332
1333EFL_INTERNAL_DEPEND_PKG([EIO_JS], [eio])
1334EFL_ADD_CFLAGS([EIO_JS], [${EFL_PTHREAD_CFLAGS}])
1335EFL_EVAL_PKGS([EIO_JS])
1336
1337EFL_LIB_END_OPTIONAL([Eio_Js])
1338#### End of Eio JS
1339
1340#### Ethumb JS
1341EFL_LIB_START_OPTIONAL([Ethumb_Js], [test "x${have_js}" = "xyes"])
1342
1343EFL_INTERNAL_DEPEND_PKG([ETHUMB_JS], [ethumb])
1344EFL_INTERNAL_DEPEND_PKG([ETHUMB_JS], [ethumb_client])
1345EFL_ADD_CFLAGS([ETHUMB_JS], [${EFL_PTHREAD_CFLAGS}])
1346EFL_EVAL_PKGS([ETHUMB_JS])
1347
1348EFL_LIB_END_OPTIONAL([Ethumb_Js])
1349#### End of Ethumb JS
1350
1351#### Eldbus JS
1352EFL_LIB_START_OPTIONAL([Eldbus_Js], [test "x${have_js}" = "xyes"])
1353
1354EFL_INTERNAL_DEPEND_PKG([ELDBUS_JS], [eldbus])
1355EFL_ADD_CFLAGS([ELDBUS_JS], [${EFL_PTHREAD_CFLAGS}])
1356EFL_EVAL_PKGS([ELDBUS_JS])
1357
1358EFL_LIB_END_OPTIONAL([Eldbus_Js])
1359#### End of Eldbus JS
1360
1361#### Eo JS
1362EFL_LIB_START_OPTIONAL([Eo_Js], [test "x${have_js}" = "xyes"])
1363
1364EFL_INTERNAL_DEPEND_PKG([EO_JS], [eina])
1365EFL_ADD_CFLAGS([EO_JS], [${EFL_PTHREAD_CFLAGS}])
1366EFL_EVAL_PKGS([EO_JS])
1367
1368EFL_LIB_END_OPTIONAL([Eo_Js])
1369#### End of Eo JS
1370
1371#### Efl C Sharp Bindings
1372want_csharp_beta="no"
1373AC_ARG_ENABLE([csharp-beta],
1374 [AS_HELP_STRING([--enable-csharp-beta],[enable C Sharp bindings. @<:@default=disabled@:>@])],
1375 [
1376 if test "x${enableval}" = "xyes" ; then
1377 want_csharp_beta="yes"
1378 else
1379 want_csharp_beta="no"
1380 fi
1381 ],
1382 [want_csharp_beta="no"])
1383
1384want_csharp="no"
1385AC_ARG_ENABLE([csharp-bindings],
1386 [AS_HELP_STRING([--enable-csharp-bindings],[enable C Sharp bindings. @<:@default=disabled@:>@])],
1387 [
1388 if test "x${enableval}" = "xyes" ; then
1389 want_csharp="yes"
1390 else
1391 want_csharp="no"
1392 fi
1393 ],
1394 [want_csharp="no"])
1395
1396if test "x${want_csharp}" = "xyes" -a "x${HAVE_MCS}" != "x1"; then
1397 want_csharp="no"
1398 AC_MSG_ERROR([C Sharp bindings requested but C Sharp compiler could not be found])
1399fi
1400
1401AM_CONDITIONAL([HAVE_CSHARP], [test "x${want_csharp}" = "xyes"])
1402AC_DEFINE_IF([HAVE_CSHARP], [test "x${want_csharp}" = "xyes"],
1403 [1], [Compiling bindings for C Sharp])
1404AC_SUBST([want_csharp])
1405
1406AM_CONDITIONAL([HAVE_CSHARP_BETA], [test "x${want_csharp_beta}" = "xyes"])
1407AC_DEFINE_IF([HAVE_CSHARP_BETA], [test "x${want_csharp_beta}" = "xyes"],
1408 [1], [Compiling bindings for C Sharp with beta methods, properties and classes])
1409AC_SUBST([want_csharp_beta])
1410
1411if test "x${have_windows}" = "xyes"; then
1412 eflmonodlldir="$prefix/bin"
1413else
1414 eflmonodlldir="$libdir/efl-mono-${EFL_VERSION_MAJOR}"
1415fi
1416AC_SUBST([eflmonodlldir])
1417
1418# Efl Mono
1419EFL_LIB_START_OPTIONAL([Efl_Mono], [test "x${want_csharp}" = "xyes"])
1420
1421EFL_PLATFORM_DEPEND([EFL_MONO], [evil])
1422EFL_INTERNAL_DEPEND_PKG([EFL_MONO], [Eina])
1423EFL_INTERNAL_DEPEND_PKG([EFL_MONO], [Eo])
1424EFL_INTERNAL_DEPEND_PKG([EFL_MONO], [Ecore])
1425EFL_INTERNAL_DEPEND_PKG([EFL_MONO], [Eet])
1426EFL_INTERNAL_DEPEND_PKG([EFL_MONO], [Ecore_Evas])
1427EFL_INTERNAL_DEPEND_PKG([EFL_MONO], [Ecore_Con])
1428EFL_INTERNAL_DEPEND_PKG([EFL_MONO], [Ecore_Audio])
1429EFL_INTERNAL_DEPEND_PKG([EFL_MONO], [Efl])
1430EFL_INTERNAL_DEPEND_PKG([EFL_MONO], [Evas])
1431EFL_INTERNAL_DEPEND_PKG([EFL_MONO], [Edje])
1432EFL_INTERNAL_DEPEND_PKG([EFL_MONO], [Emotion])
1433EFL_INTERNAL_DEPEND_PKG([EFL_MONO], [Eldbus])
1434EFL_INTERNAL_DEPEND_PKG([EFL_MONO], [Emile])
1435EFL_INTERNAL_DEPEND_PKG([EFL_MONO], [Ethumb])
1436EFL_INTERNAL_DEPEND_PKG([EFL_MONO], [Ethumb_Client])
1437EFL_INTERNAL_DEPEND_PKG([EFL_MONO], [Eio])
1438EFL_INTERNAL_DEPEND_PKG([EFL_MONO], [Elementary])
1439EFL_INTERNAL_DEPEND_PKG([EFL_MONO], [Efl_Custom_Exports_Mono])
1440
1441EFL_EVAL_PKGS([EFL_MONO])
1442
1443EFL_LIB_END_OPTIONAL([Efl_Mono])
1444
1445# Efl Custom Exports Mono
1446EFL_LIB_START_OPTIONAL([Efl_Custom_Exports_Mono], [test "x${want_csharp}" = "xyes"])
1447
1448EFL_PLATFORM_DEPEND([EFL_CUSTOM_EXPORTS_MONO], [evil])
1449EFL_INTERNAL_DEPEND_PKG([EFL_CUSTOM_EXPORTS_MONO], [Eina])
1450EFL_INTERNAL_DEPEND_PKG([EFL_CUSTOM_EXPORTS_MONO], [Eo])
1451EFL_INTERNAL_DEPEND_PKG([EFL_CUSTOM_EXPORTS_MONO], [Ecore])
1452EFL_INTERNAL_DEPEND_PKG([EFL_CUSTOM_EXPORTS_MONO], [Efl])
1453EFL_INTERNAL_DEPEND_PKG([EFL_CUSTOM_EXPORTS_MONO], [Eldbus])
1454
1455EFL_EVAL_PKGS([EFL_CUSTOM_EXPORTS_MONO])
1456
1457EFL_LIB_END_OPTIONAL([Efl_Custom_Exports_Mono])
1458
1459# Libtool versioning stuff.
1460# On windows, the version of the library goes into the filename.
1461# See https://autotools.io/libtool/windows.html#libtool.windows.version
1462# Based on the current:revision:age string passed to libtool, the generated suffix
1463# has the value of (current - age).
1464# To get the current and age, we use the same calculation from m4/efl.m4 (lt_cur, lt_age)
1465DLIB_PREFIX_MONO=""
1466DLIB_SUFFIX_MONO=""
1467if test "x${have_windows}" = "xyes"; then
1468 DLIB_PREFIX_MONO="lib"
1469 if test "x${EFL_VERSION_MAJOR}" = "x1"; then
1470 DLIB_SUFFIX_MONO="-${EFL_VERSION_MAJOR}"
1471 else
1472 DLIB_SUFFIX_MONO="-${EFL_VERSION_MAJOR}00"
1473 fi
1474fi
1475AC_SUBST([DLIB_PREFIX_MONO])
1476AC_SUBST([DLIB_SUFFIX_MONO])
1477
1478EFL_DL_MONO="${DLIB_PREFIX_MONO}efl${DLIB_SUFFIX_MONO}";
1479ECORE_DL_MONO="${DLIB_PREFIX_MONO}ecore${DLIB_SUFFIX_MONO}";
1480EINA_DL_MONO="${DLIB_PREFIX_MONO}eina${DLIB_SUFFIX_MONO}"
1481EO_DL_MONO="${DLIB_PREFIX_MONO}eo${DLIB_SUFFIX_MONO}"
1482EVAS_DL_MONO="${DLIB_PREFIX_MONO}evas${DLIB_SUFFIX_MONO}"
1483if test "x${have_windows}" = "xyes"; then
1484 EVIL_DL_MONO="${DLIB_PREFIX_MONO}evil${DLIB_SUFFIX_MONO}"
1485else
1486 EVIL_DL_MONO="dl"
1487fi
1488EDJE_DL_MONO="${DLIB_PREFIX_MONO}edje${DLIB_SUFFIX_MONO}"
1489ELEMENTARY_DL_MONO="${DLIB_PREFIX_MONO}elementary${DLIB_SUFFIX_MONO}"
1490ELDBUS_DL_MONO="${DLIB_PREFIX_MONO}eldbus${DLIB_SUFFIX_MONO}"
1491CUSTOM_EXPORTS_MONO_DL_MONO="${DLIB_PREFIX_MONO}eflcustomexportsmono${DLIB_SUFFIX_MONO}"
1492
1493AC_SUBST([EFL_DL_MONO])
1494AC_SUBST([ECORE_DL_MONO])
1495AC_SUBST([EINA_DL_MONO])
1496AC_SUBST([EO_DL_MONO])
1497AC_SUBST([EVAS_DL_MONO])
1498AC_SUBST([EVIL_DL_MONO])
1499AC_SUBST([EDJE_DL_MONO])
1500AC_SUBST([ELEMENTARY_DL_MONO])
1501AC_SUBST([ELDBUS_DL_MONO])
1502AC_SUBST([CUSTOM_EXPORTS_MONO_DL_MONO])
1503
1504# Eos file/library mapping
1505
1506# Unescaped sed pattern: sed -n 's/src\/lib\/\([a-z0-9_]*\)\/[a-z\/]*\/\([a-z0-9\._]*\)/\2,\1/pg'
1507AC_CHECK_PROG([have_realpath], [realpath], [yes], [no])
1508if test "x${have_realpath}" = "xyes" ; then
1509 _configure_path=`realpath $0`
1510else
1511 AC_CHECK_PROG([have_readlink], [readlink], [yes], [no])
1512 if test "x${have_readlink}" = "xyes" ; then
1513 _configure_path=`readlink -f $0`
1514 fi
1515fi
1516efl_mono_top_srcdir=`dirname ${_configure_path}`
1517EFL_MONO_LIBRARY_MAP=`find ${efl_mono_top_srcdir}/src/lib/ -iname "*\.eo" | sed -n 's/.*\/src\/lib\/\(@<:@a-z0-9_@:>@*\)@<:@\/a-z@:>@*\/\(@<:@a-z0-9\._@:>@*\)/\2,\1/pg'`
1518
1519AC_SUBST([EFL_MONO_LIBRARY_MAP])
1520AM_SUBST_NOTMAKE([EFL_MONO_LIBRARY_MAP])
1521
1522#### End of Efl C Sharp Bindings
1523
1524#### Eo
1525
1526EFL_LIB_START([Eo])
1527
1528### Default values
1529
1530### Additional options to configure
1531
1532### Checks for programs
1533
1534## Compatibility layers
1535EFL_PLATFORM_DEPEND([EO], [evil])
1536
1537### Checks for libraries
1538EFL_INTERNAL_DEPEND_PKG([EO], [eina])
1539
1540# Example (evas one)
1541
1542# TODO: add once elementary is merged
1543#PKG_CHECK_MODULES([ELM], [elementary >= 1.7.0], [have_elm="yes"], [have_elm="no"])
1544AM_CONDITIONAL([EO_BUILD_EXAMPLE_EVAS], [test "x${have_elm}" = "xyes"])
1545
1546### Checks for header files
1547
1548### Checks for types
1549
1550### Checks for structures
1551
1552### Checks for compiler characteristics
1553
1554### Checks for linker characteristics
1555
1556### Checks for library functions
1557EFL_CHECK_FUNCS([EO], [dladdr])
1558
1559### Check availability
1560
1561EFL_LIB_END([Eo])
1562#### End of Eo
1563
1564#### Eet CXX
1565EFL_LIB_START([Eet_Cxx])
1566
1567EFL_INTERNAL_DEPEND_PKG([EET_CXX], [Eina_Cxx])
1568EFL_INTERNAL_DEPEND_PKG([EET_CXX], [Eet])
1569
1570EFL_EVAL_PKGS([EET_CXX])
1571
1572EFL_LIB_END([Eet_Cxx])
1573#### End of Eet CXX
1574
1575#### Emile
1576
1577EFL_LIB_START([Emile])
1578
1579### Default values
1580
1581### Additional options to configure
1582
1583### Checks for programs
1584
1585### Checks for libraries
1586
1587EFL_CHECK_LIBS([EMILE], [libjpeg])
1588
1589## Compatibility layers
1590EFL_PLATFORM_DEPEND([EMILE], [evil])
1591
1592EFL_ADD_LIBS([EMILE], [-lm])
1593
1594# Cryptography support
1595if test "$build_crypto" != "none" ; then
1596 AC_DEFINE([HAVE_CIPHER], [1], [Have cipher support built in emile])
1597 AC_DEFINE([HAVE_SIGNATURE], [1], [Have signature support in emile])
1598 EFL_CRYPTO_DEPEND([EMILE])
1599fi
1600
1601EFL_CHECK_LIBS([EMILE], [zlib])
1602
1603EFL_INTERNAL_DEPEND_PKG([EMILE], [eina])
1604
1605EFL_EVAL_PKGS([EMILE])
1606
1607### Checks for header files
1608
1609### Checks for types
1610
1611### Checks for structures
1612
1613### Checks for compiler characteristics
1614
1615### Checks for linker characteristics
1616
1617### Checks for library functions
1618
1619### Check availability
1620
1621EFL_ADD_FEATURE([EMILE], [crypto], [${build_crypto}])
1622
1623EFL_LIB_END([Emile])
1624#### End of Emile
1625
1626
1627#### Eet
1628
1629EFL_LIB_START([Eet])
1630
1631### Default values
1632
1633### Additional options to configure
1634
1635### Checks for programs
1636
1637### Checks for libraries
1638
1639EFL_CHECK_LIBS([EET], [libjpeg])
1640
1641## Compatibility layers
1642EFL_PLATFORM_DEPEND([EET], [evil])
1643
1644EFL_ADD_LIBS([EET], [-lm])
1645
1646# Cryptography support
1647if test "$build_crypto" != "none" ; then
1648 AC_DEFINE([HAVE_CIPHER], [1], [Have cipher support built in eet])
1649 AC_DEFINE([HAVE_SIGNATURE], [1], [Have signature support for eet file])
1650 EFL_CRYPTO_DEPEND([EET])
1651fi
1652
1653EFL_INTERNAL_DEPEND_PKG([EET], [eina])
1654EFL_INTERNAL_DEPEND_PKG([EET], [emile])
1655
1656EFL_EVAL_PKGS([EET])
1657
1658### Checks for header files
1659
1660### Checks for types
1661
1662### Checks for structures
1663
1664### Checks for compiler characteristics
1665
1666### Checks for linker characteristics
1667
1668### Checks for library functions
1669
1670### Check availability
1671
1672EFL_LIB_END([Eet])
1673#### End of Eet
1674
1675#### Eo CXX
1676EFL_LIB_START([Eo_Cxx])
1677
1678EFL_EVAL_PKGS([EO_CXX])
1679
1680EFL_LIB_END([Eo_Cxx])
1681#### End of Eo CXX
1682
1683#### Eolian
1684
1685EFL_LIB_START([Eolian])
1686
1687### Default values
1688
1689### Additional options to configure
1690EFL_ADD_FEATURE([EOLIAN], [cxx], [${have_cxx11}])
1691
1692### Checks for programs
1693
1694## Compatibility layers
1695EFL_PLATFORM_DEPEND([EOLIAN], [evil])
1696
1697### Checks for libraries
1698EFL_INTERNAL_DEPEND_PKG([EOLIAN], [eina])
1699
1700### Checks for header files
1701
1702### Checks for types
1703
1704### Checks for structures
1705
1706### Checks for compiler characteristics
1707
1708### Checks for linker characteristics
1709
1710### Checks for library functions
1711
1712### Check availability
1713
1714EFL_LIB_END([Eolian])
1715#### End of Eolian
1716
1717EFL_LIB_START_OPTIONAL([Eolian_Js], [test "${have_js}" = "yes"])
1718
1719EFL_INTERNAL_DEPEND_PKG([EOLIAN_JS], [eina])
1720EFL_INTERNAL_DEPEND_PKG([EOLIAN_JS], [eolian])
1721
1722EFL_LIB_END_OPTIONAL([Eolian_Js])
1723#### End of Eolian
1724
1725
1726EFL_LIB_START([Eolian_Cxx])
1727### Default values
1728
1729### Additional options to configure
1730
1731### Checks for programs
1732
1733## Compatibility layers
1734
1735### Checks for libraries
1736EFL_INTERNAL_DEPEND_PKG([EOLIAN_CXX], [eina])
1737EFL_INTERNAL_DEPEND_PKG([EOLIAN_CXX], [eo])
1738
1739### Checks for header files
1740
1741### Checks for types
1742
1743### Checks for structures
1744
1745### Checks for compiler characteristics
1746
1747### Checks for linker characteristics
1748
1749### Checks for library functions
1750
1751### Check availability
1752EFL_LIB_END([Eolian_Cxx])
1753
1754#### Efl
1755
1756EFL_LIB_START([Efl])
1757
1758EFL_PLATFORM_DEPEND([EFL], [evil])
1759EFL_INTERNAL_DEPEND_PKG([EFL], [eina])
1760EFL_INTERNAL_DEPEND_PKG([EFL], [eo])
1761
1762EFL_ADD_LIBS([EFL], [-lm])
1763
1764EFL_LIB_END([Efl])
1765#### End of Efl
1766
1767#### Ector
1768
1769EFL_LIB_START([Ector])
1770
1771
1772### Default values
1773
1774### Additional options to configure
1775
1776### Checks for programs
1777
1778### Checks for libraries
1779
1780## Compatibility layers
1781
1782EFL_PLATFORM_DEPEND([ECTOR], [evil])
1783
1784EFL_INTERNAL_DEPEND_PKG([ECTOR], [eina])
1785EFL_INTERNAL_DEPEND_PKG([ECTOR], [emile])
1786EFL_INTERNAL_DEPEND_PKG([ECTOR], [eet])
1787EFL_INTERNAL_DEPEND_PKG([ECTOR], [eo])
1788EFL_INTERNAL_DEPEND_PKG([ECTOR], [efl])
1789
1790EFL_ADD_LIBS([ECTOR], [-lm])
1791
1792EFL_EVAL_PKGS([ECTOR])
1793
1794### Checks for header files
1795
1796### Checks for types
1797
1798### Checks for structures
1799
1800### Checks for compiler characteristics
1801
1802### Checks for linker characteristics
1803
1804### Checks for library functions
1805
1806### Check availability
1807
1808EFL_LIB_END([ECTOR])
1809
1810#### End of Ector
1811
1812
1813#### Ecore
1814
1815EFL_LIB_START([Ecore])
1816
1817### Additional options to configure
1818
1819# glib
1820
1821AC_ARG_WITH([glib],
1822 [AS_HELP_STRING([--with-glib=yes|no|always],[add glib support. @<:@default=enabled@:>@])],
1823 [
1824 if test "x${withval}" = "xyes" ; then
1825 with_glib="yes"
1826 else
1827 if test "x${withval}" = "xalways" ; then
1828 with_glib="always"
1829 else
1830 with_glib="no"
1831 fi
1832 fi
1833 ],
1834 [with_glib="yes"])
1835
1836AC_ARG_ENABLE([g-main-loop],
1837 [AS_HELP_STRING([--enable-g-main-loop],[enable ecore_main_loop based on g_main_loop. @<:@default=disabled@:>@])],
1838 [
1839 if test "x${enableval}" = "xyes" ; then
1840 want_g_main_loop="yes"
1841 CFOPT_WARNING="xyes"
1842 else
1843 want_g_main_loop="no"
1844 fi
1845 ],
1846 [want_g_main_loop="no"])
1847AC_ARG_ENABLE([libuv],
1848 [AS_HELP_STRING([--enable-libuv],[enable ecore_main_loop based on libuv. @<:@default=disabled@:>@])],
1849 [
1850 if test "x${enableval}" = "xyes" ; then
1851 want_libuv="yes"
1852 CFOPT_WARNING="xyes"
1853 else
1854 want_libuv="no"
1855 fi
1856 ],
1857 [want_libuv="no"])
1858
1859AC_ARG_ENABLE([gstreamer],
1860 [AS_HELP_STRING([--enable-gstreamer],[enable gstreamer 0.10 support. @<:@default=disabled@:>@])],
1861 [
1862 if test "x${enableval}" = "xyes" ; then
1863 want_gstreamer="yes"
1864 CFOPT_WARNING="xyes"
1865 else
1866 want_gstreamer="no"
1867 fi
1868 ],
1869 [want_gstreamer="no"])
1870
1871AC_ARG_ENABLE([gstreamer1],
1872 [AS_HELP_STRING([--disable-gstreamer1],[disable gstreamer 1.0 support. @<:@default=enabled@:>@])],
1873 [
1874 if test "x${enableval}" = "xyes" ; then
1875 want_gstreamer1="yes"
1876 else
1877 want_gstreamer1="no"
1878 CFOPT_WARNING="xyes"
1879 fi
1880 ],
1881 [want_gstreamer1="yes"])
1882
1883AC_ARG_ENABLE([tizen],
1884 [AS_HELP_STRING([--enable-tizen],[enable tizen support. @<:@default=disabled@:>@])],
1885 [
1886 if test "x${enableval}" = "xyes" ; then
1887 want_tizen="yes"
1888 else
1889 want_tizen="no"
1890 fi
1891 ],
1892 [want_tizen="no"])
1893
1894if test "${want_tizen}" = "yes"; then
1895 PKG_CHECK_MODULES([TIZEN_CONFIGURATION_MANAGER],
1896 [vconf],
1897 [have_tizen_vconf="yes"],
1898 [have_tizen_vconf="no"])
1899 PKG_CHECK_MODULES([TIZEN_CONFIGURATION_MANAGER], [vconf])
1900fi
1901
1902AM_CONDITIONAL([HAVE_TIZEN_CONFIGURATION_MANAGER], [test "${have_tizen_vconf}" = "yes"])
1903if test "${have_tizen_vconf}" = "yes"; then
1904 AC_DEFINE(HAVE_TIZEN_CONFIGURATION_MANAGER, 1, [Define to 1 if you have Tizen configuration manager(vconf).])
1905fi
1906
1907AC_ARG_ENABLE([ecore_wayland],
1908 [AS_HELP_STRING([--enable-ecore-wayland],[enable legacy Ecore_Wayland support. @<:@default=disabled@:>@])],
1909 [
1910 if test "x${enableval}" = "xyes" ; then
1911 want_ecore_wayland="yes"
1912 else
1913 want_ecore_wayland="no"
1914 fi
1915 ],
1916 [want_ecore_wayland="no"])
1917
1918AC_ARG_ENABLE([ecore_drm],
1919 [AS_HELP_STRING([--enable-ecore-drm],[enable legacy Ecore_Drm support. @<:@default=disabled@:>@])],
1920 [
1921 if test "x${enableval}" = "xyes" ; then
1922 want_ecore_drm="yes"
1923 else
1924 want_ecore_drm="no"
1925 fi
1926 ],
1927 [want_ecore_drm="no"])
1928
1929### Default values
1930
1931if test "${have_windows}" = "yes"; then
1932 with_glib="no"
1933fi
1934
1935want_glib="no"
1936if test "x${with_glib}" = "xyes" || test "x${with_glib}" = "xalways" ; then
1937 want_glib="yes"
1938fi
1939
1940want_ecore_timer_dump="no"
1941if test "x${build_profile}" = "xdebug" && test "x${ac_cv_func_backtrace}" = "xyes"; then
1942 want_ecore_timer_dump="yes"
1943 AC_DEFINE([WANT_ECORE_TIMER_DUMP], [1], [Want Ecore_Timer dump infrastructure])
1944fi
1945
1946### Checks for programs
1947
1948### Checks for libraries
1949EFL_PLATFORM_DEPEND([ECORE], [all])
1950EFL_INTERNAL_DEPEND_PKG([ECORE], [eo])
1951EFL_INTERNAL_DEPEND_PKG([ECORE], [eina])
1952EFL_INTERNAL_DEPEND_PKG([ECORE], [efl])
1953
1954EFL_ADD_LIBS([ECORE], [-lm])
1955
1956# glib
1957
1958EFL_OPTIONAL_DEPEND_PKG([ECORE], [${want_glib}], [GLIB], [glib-2.0 gthread-2.0])
1959if test "x${have_glib}" = "xno"; then
1960 want_g_main_loop="no"
1961fi
1962
1963EFL_OPTIONAL_DEPEND_PKG([ECORE], [${want_systemd}], [SYSTEMD], [libsystemd])
1964
1965EFL_ADD_FEATURE([ECORE], [systemd-daemon], [${want_systemd}])
1966EFL_ADD_FEATURE([ECORE], [glib])
1967EFL_ADD_FEATURE([ECORE], [g-main-loop])
1968EFL_ADD_FEATURE([ECORE], [libuv])
1969
1970want_glib_integration_always=no
1971if test "x${with_glib}" = "xalways" ; then
1972 want_glib_integration_always="yes"
1973 AC_DEFINE([GLIB_INTEGRATION_ALWAYS], [1], [Always integrate glib if support compiled])
1974fi
1975
1976if test "x${want_g_main_loop}" = "xyes" ; then
1977 AC_DEFINE([USE_G_MAIN_LOOP], [1], [Use g_main_loop in ecore])
1978 if test "x${want_js}" = "xnodejs" -o "x${want_js}" = "xlibuv" ; then
1979 AC_MSG_ERROR([Can't define glib and libuv integration together])
1980 fi
1981fi
1982
1983# not EFL_OPTIONAL_DEPEND_PKG() because it's only used for ecore examples
1984if test "${want_gstreamer1}" = "yes" -a "${want_gstreamer}" = "yes"; then
1985 AC_MSG_ERROR([You can only enable either GStreamer 1.0 or GStreamer 0.10 support])
1986fi
1987
1988if test "${want_gstreamer1}" = "yes"; then
1989 PKG_CHECK_MODULES([GSTREAMER], [gstreamer-1.0])
1990fi
1991if test "${want_gstreamer}" = "yes"; then
1992 PKG_CHECK_MODULES([GSTREAMER], [gstreamer-0.10])
1993fi
1994
1995AM_CONDITIONAL([HAVE_GSTREAMER], [test "x${want_gstreamer}" = "xyes" -o "x${want_gstreamer1}" = "xyes"])
1996AM_CONDITIONAL([HAVE_GSTREAMER0], [test "x${want_gstreamer}" = "xyes"])
1997AM_CONDITIONAL([HAVE_GSTREAMER1], [test "x${want_gstreamer1}" = "xyes"])
1998
1999EFL_EVAL_PKGS([ECORE])
2000
2001### Checks for header files
2002
2003AC_HEADER_SYS_WAIT
2004
2005AC_CHECK_HEADERS([sys/socket.h])
2006
2007AC_CHECK_HEADERS([ \
2008arpa/inet.h \
2009arpa/nameser.h \
2010langinfo.h \
2011features.h \
2012netinet/in.h \
2013netinet/tcp.h \
2014netinet/udp.h \
2015sys/prctl.h \
2016sys/ioctl.h \
2017sys/resource.h \
2018sys/timerfd.h \
2019sys/un.h \
2020ieeefp.h \
2021],[],[],
2022[
2023 #ifdef HAVE_SYS_SOCKET_H
2024 # include <sys/socket.h>
2025 #endif
2026])
2027
2028AC_CHECK_HEADERS([net/if.h], [], [],
2029[#include <stdio.h>
2030#if STDC_HEADERS
2031# include <stdlib.h>
2032# include <stddef.h>
2033#else
2034# if HAVE_STDLIB_H
2035# include <stdlib.h>
2036# endif
2037#endif
2038#if HAVE_SYS_SOCKET_H
2039# include <sys/socket.h>
2040#endif
2041])
2042
2043### Checks for types
2044
2045### Checks for structures
2046
2047### Checks for compiler characteristics
2048
2049### Checks for linker characteristics
2050
2051### Checks for library functions
2052
2053## ecore
2054
2055# isfinite
2056
2057AC_COMPILE_IFELSE(
2058 [AC_LANG_PROGRAM(
2059 [[
2060#include <math.h>
2061 ]],
2062 [[
2063int i = isfinite(0);
2064 ]])],
2065 [
2066 AC_DEFINE(HAVE_ISFINITE, 1, [Define to 1 if you have 'isfinite', as a function or macro.])
2067 have_isfinite="yes"
2068 ],
2069 [have_isfinite="no"])
2070
2071AC_MSG_CHECKING([for isfinite])
2072AC_MSG_RESULT([${have_isfinite}])
2073
2074# mallinfo, timerfd_create, clock_gettime
2075
2076AC_CHECK_FUNCS_ONCE([mallinfo timerfd_create clock_gettime malloc_info])
2077
2078if ! test "x${ac_cv_func_clock_gettime}" = "xyes" ; then
2079 AC_CHECK_LIB([rt], [clock_gettime],
2080 [
2081 EFL_ADD_LIBS([ECORE], [-lrt])
2082 AC_DEFINE([HAVE_CLOCK_GETTIME], [1], [Have clock_gettime()])
2083 ])
2084fi
2085
2086EFL_ADD_LIBS([ECORE], [${LTLIBINTL}])
2087
2088# coroutine function specific
2089
2090AC_COMPILE_IFELSE(
2091 [AC_LANG_PROGRAM(
2092 [[
2093#include <ucontext.h>
2094 ]],
2095 [[
2096ucontext_t test;
2097getcontext(&test);
2098 ]])],
2099 [have_ucontext="yes"],
2100 [have_ucontext="no"])
2101
2102AC_MSG_CHECKING([for ucontext])
2103AC_MSG_RESULT([${have_ucontext}])
2104
2105AC_COMPILE_IFELSE(
2106 [AC_LANG_PROGRAM(
2107 [[
2108#include <setjmp.h>
2109 ]],
2110 [[
2111jmp_buf context;
2112setjmp(&context);
2113 ]])],
2114 [have_setjmp="yes"],
2115 [have_setjmp="no"])
2116
2117AC_MSG_CHECKING([for setjmp])
2118AC_MSG_RESULT([${have_setjmp}])
2119
2120if test "X${have_windows}" = "xyes"; then
2121 AC_DEFINE(USE_FIBER, 1, [Define to 1 if you have Windows Fiber support.])
2122 EFL_ADD_FEATURE([system], [coroutine], [fiber])
2123elif test "x${have_ucontext}" = "xyes"; then
2124 AC_DEFINE(USE_UCONTEXT, 1, [Define to 1 if you have posix ucontext functions.])
2125 EFL_ADD_FEATURE([system], [coroutine], [ucontext])
2126elif test "x${have_setjmp}" = "xyes"; then
2127 AC_DEFINE(USE_SETJMP, 1, [Define to 1 if you have setjmp/longjmp functions.])
2128 EFL_ADD_FEATURE([system], [coroutine], [setjmp])
2129else
2130 AC_MSG_ERROR([You do not have a working way to implement coroutine. Exiting...])
2131fi
2132
2133### Check availability
2134
2135EFL_LIB_END([Ecore])
2136#### End of Ecore
2137
2138#### Evas
2139
2140EFL_LIB_START([Evas])
2141
2142### Additional options to configure
2143
2144# X11
2145AC_ARG_WITH([x11],
2146 [AS_HELP_STRING([--with-x11=xlib|none],[Use X11 (Xlib) or not])])
2147
2148if test "x${have_windows}" = "xyes" || test "x${have_ps3}" = "xyes" || test "x${have_darwin}" = "xyes"; then
2149 with_x11="none"
2150elif test "x${with_x11}" = "x"; then
2151 with_x11="xlib"
2152fi
2153
2154want_x11_xlib="no"
2155want_x11_none="no"
2156want_x11_any="no"
2157case "${with_x11}" in
2158 xlib)
2159 want_x11_xlib="yes"
2160 want_x11_any="yes"
2161 ;;
2162 none)
2163 want_x11_none="yes"
2164 ;;
2165 *)
2166 AC_MSG_ERROR([Unknown build x11 --with-x11=${with_x11}])
2167 ;;
2168esac
2169
2170# OpenGL
2171AC_ARG_WITH([opengl],
2172 [AS_HELP_STRING([--with-opengl=full|es|none],[OpenGL method to use: full, es or none])])
2173
2174if test "x${have_windows}" = "xyes" || test "x${have_ps3}" = "xyes"; then
2175 with_opengl="none"
2176elif test "x${with_opengl}" = "x"; then
2177 with_opengl="full"
2178fi
2179
2180case "${with_opengl}" in
2181 full|es|none)
2182 ;;
2183 *)
2184 AC_MSG_ERROR([Unknown build opengl --with-opengl=${with_opengl}])
2185 ;;
2186esac
2187
2188want_x11_xlib_opengl="no"
2189if test "${with_opengl}" != "none"; then
2190 want_x11_xlib_opengl="${want_x11_xlib}"
2191 want_x11_any_opengl="${want_x11_any}"
2192fi
2193
2194# Wayland
2195AC_ARG_ENABLE([wayland],
2196 [AS_HELP_STRING([--enable-wayland],[enable wayland display server. @<:@default=disabled@:>@])],
2197 [
2198 if test "x${enableval}" = "xyes" ; then
2199 want_wayland="yes"
2200 else
2201 want_wayland="no"
2202 fi
2203 ],
2204 [want_wayland="no"])
2205
2206if test "${want_wayland}" = "yes"; then
2207 EFL_PKG_CHECK_STRICT([wayland-client >= 1.11.0 wayland-scanner >= 1.11.0 wayland-protocols >= 1.12])
2208 PKG_CHECK_MODULES([WAYLAND], [wayland-scanner >= 1.11.0],
2209 [
2210 AC_ARG_VAR([wayland_scanner], [The wayland-scanner executable])
2211 AC_PATH_PROG([wayland_scanner], [wayland-scanner])
2212 if test x$wayland_scanner = x; then
2213 PKG_CHECK_MODULES(WAYLAND_SCANNER, [wayland-scanner])
2214 wayland_scanner=`$PKG_CONFIG --variable=wayland_scanner wayland-scanner`
2215 fi
2216 ac_wayland_protocols_pkgdatadir=`$PKG_CONFIG --variable=pkgdatadir wayland-protocols`
2217 AC_SUBST(WAYLAND_PROTOCOLS_DATADIR, $ac_wayland_protocols_pkgdatadir)
2218 ])
2219fi
2220AM_CONDITIONAL([HAVE_WAYLAND_SCANNER], [test x$wayland_scanner != x])
2221
2222# Wayland IVI-Shell
2223AC_ARG_ENABLE([wayland-ivi-shell],
2224 [AS_HELP_STRING([--enable-wayland-ivi-shell],[enable ivi-shell support. @<:@default=disabled@:>@])],
2225 [
2226 if test "x${enableval}" = "xyes" ; then
2227 want_wayland_ivi_shell="yes"
2228 else
2229 want_wayland_ivi_shell="no"
2230 fi
2231 ],
2232 [want_wayland_ivi_shell="no"])
2233
2234# Fb
2235AC_ARG_ENABLE([fb],
2236 [AS_HELP_STRING([--enable-fb],[enable raw Framebuffer access. @<:@default=disabled@:>@])],
2237 [
2238 if test "x${enableval}" = "xyes" ; then
2239 want_fb="yes"
2240 else
2241 want_fb="no"
2242 fi
2243 ],
2244 [want_fb="no"])
2245
2246# Eglfs
2247AC_ARG_ENABLE([eglfs],
2248 [AS_HELP_STRING([--enable-eglfs],[enable hardware accelerated framebuffer access. @<:@default=disabled@:>@])],
2249 [
2250 if test "x${enableval}" = "xyes" ; then
2251 want_eglfs="yes"
2252 want_fb="yes"
2253 else
2254 want_eglfs="no"
2255 fi
2256 ],
2257 [want_eglfs="no"])
2258
2259# SDL
2260AC_ARG_ENABLE([sdl],
2261 [AS_HELP_STRING([--enable-sdl],[enable SDL support. @<:@default=disabled@:>@])],
2262 [
2263 if test "x${enableval}" = "xyes" ; then
2264 want_sdl="yes"
2265 else
2266 want_sdl="no"
2267 fi
2268 ],
2269 [want_sdl="no"])
2270
2271if test "${want_sdl}" = "yes"; then
2272 EFL_PKG_CHECK_STRICT([sdl2 >= 2.0.0])
2273fi
2274
2275# We only enable SDL with opengl if it is the full version and not ES
2276# This can be changed if we ported our SDL code over to SDL 2.0. For older
2277# versions the SDL_opengles.h has never been released.
2278want_gl_sdl="no"
2279if test "${want_sdl}" = "yes" && test "${with_opengl}" = "es"; then
2280 AC_MSG_ERROR([We currently do not support SDL with OpenGL ES. Please consider full OpenGL if you want to use it with SDL.])
2281fi
2282if test "${want_sdl}" = "yes" && test "${with_opengl}" = "full"; then
2283 want_gl_sdl="yes"
2284fi
2285
2286# Cocoa
2287AC_ARG_ENABLE([cocoa],
2288 [AS_HELP_STRING([--enable-cocoa],[enable Cocoa backend on Mac OS X. @<:@default=enabled@:>@])],
2289 [
2290 if test "x${enableval}" = "xyes" ; then
2291 want_cocoa="yes"
2292 else
2293 want_cocoa="no"
2294 fi
2295 ],
2296 [want_cocoa="yes"])
2297
2298if test "${want_cocoa}" = "yes"; then
2299 #test cocoa requirements (objc and Cocoa/Cocoa.h)
2300 cocoa_ldflags=""
2301 have_cocoa="no"
2302 m4_ifdef([AC_PROG_OBJC],
2303 [
2304 AC_LANG_PUSH([Objective C])
2305 LIBS_save="$LIBS"
2306 LIBS="$LIBS -framework Cocoa"
2307 AC_LINK_IFELSE(
2308 [AC_LANG_PROGRAM(
2309 [[
2310#include <Cocoa/Cocoa.h>
2311 ]],
2312 [[
2313NSWindow *window;
2314window = [[NSWindow alloc]
2315 initWithContentRect:NSMakeRect(0, 0, 1, 1)
2316 styleMask:(NSTitledWindowMask)
2317 backing:NSBackingStoreBuffered
2318 defer:NO
2319 screen:nil
2320 ];
2321 ]])],
2322 [
2323 have_cocoa="yes"
2324 cocoa_ldflags="-framework Cocoa"
2325 ],
2326 [have_cocoa="no"])
2327 LIBS="$LIBS_save"
2328 AC_MSG_CHECKING([whether Cocoa framework is supported])
2329 AC_MSG_RESULT([${have_cocoa}])
2330 AC_LANG_POP([Objective C])
2331 ])
2332fi
2333AC_SUBST(cocoa_ldflags)
2334
2335if test "x${have_cocoa}" = "xyes"; then
2336 #test cocoa requirements (objc and Cocoa/Cocoa.h)
2337 cocoa_coreservices_ldflags=""
2338 have_cocoa_coreservices="no"
2339 m4_ifdef([AC_PROG_OBJC],
2340 [
2341 AC_LANG_PUSH([Objective C])
2342 LIBS_save="$LIBS"
2343 LIBS="$LIBS -framework CoreServices"
2344 AC_LINK_IFELSE(
2345 [AC_LANG_PROGRAM(
2346 [[
2347#include <CoreServices/CoreServices.h>
2348 ]],
2349 [[
2350//test function here
2351 ]])],
2352 [
2353 have_cocoa_coreservices="yes"
2354 cocoa_coreservices_ldflags="-framework CoreServices"
2355 ],
2356 [have_cocoa_coreservices="no"])
2357 LIBS="$LIBS_save"
2358 AC_MSG_CHECKING([whether Cocoa CoreServices framework is supported])
2359 AC_MSG_RESULT([${have_cocoa_coreservices}])
2360 AC_LANG_POP([Objective C])
2361 ])
2362fi
2363AC_SUBST(cocoa_coreservices_ldflags)
2364
2365AC_ARG_ENABLE([elput],
2366 [AS_HELP_STRING([--enable-elput],[enable elput library. @<:@default=disabled@:>@])],
2367 [
2368 if test "x${enableval}" = "xyes" ; then
2369 want_elput="yes"
2370 else
2371 want_elput="no"
2372 fi
2373 ],
2374 [
2375 if test "x${want_wayland}" = "xyes" ; then
2376 want_elput="yes"
2377 else
2378 want_elput="no"
2379 fi
2380 ])
2381
2382# Drm
2383AC_ARG_ENABLE([drm],
2384 [AS_HELP_STRING([--enable-drm],[enable drm engine. @<:@default=disabled@:>@])],
2385 [
2386 if test "x${enableval}" = "xyes" ; then
2387 if test "x${want_elput}" != "xyes" ; then
2388 AC_MSG_ERROR([elput is required to build drm support])
2389 fi
2390 want_drm="yes"
2391 else
2392 want_drm="no"
2393 fi
2394 ],
2395 [want_drm="no"])
2396
2397AC_ARG_ENABLE([gl-drm],
2398 [AC_HELP_STRING([--enable-gl-drm],
2399 [enable gl drm engine. @<:@default=disabled@:>@])],
2400 [
2401 if test "x${enableval}" = "xyes" ; then
2402 if test "x${want_elput}" != "xyes" ; then
2403 AC_MSG_ERROR([elput is required to build gl-drm support])
2404 fi
2405 want_gl_drm="yes"
2406 else
2407 want_gl_drm="no"
2408 fi
2409 ],
2410 [want_gl_drm="no"])
2411
2412# Fontconfig
2413AC_ARG_ENABLE([fontconfig],
2414 [AS_HELP_STRING([--disable-fontconfig],[disable fontconfig for finding fonts. @<:@default=enabled@:>@])],
2415 [
2416 if test "x${enableval}" = "xyes" ; then
2417 want_fontconfig="yes"
2418 else
2419 want_fontconfig="no"
2420 CFOPT_WARNING="xyes"
2421 fi
2422 ],
2423 [want_fontconfig="yes"])
2424
2425# Fribidi
2426AC_ARG_ENABLE([fribidi],
2427 [AS_HELP_STRING([--disable-fribidi],[disable bidirectional text support. @<:@default=enabled@:>@])],
2428 [
2429 if test "x${enableval}" = "xyes" ; then
2430 want_fribidi="yes"
2431 else
2432 want_fribidi="no"
2433 CFOPT_WARNING="xyes"
2434 fi
2435 ],
2436 [want_fribidi="yes"])
2437
2438# Harfbuzz
2439AC_ARG_ENABLE([harfbuzz],
2440 [AS_HELP_STRING([--enable-harfbuzz],[enable complex text shaping and layouting support. @<:@default=disabled@:>@])],
2441 [
2442 if test "x${enableval}" = "xyes" ; then
2443 want_harfbuzz="yes"
2444 else
2445 want_harfbuzz="no"
2446 fi
2447 ],
2448 [want_harfbuzz="no"])
2449
2450# Hyphenation
2451AC_ARG_ENABLE([hyphen],
2452 [AS_HELP_STRING([--enable-hyphen],[enable text hyphenation support. @<:@default=disabled@:>@])],
2453 [
2454 if test "x${enableval}" = "xyes" ; then
2455 want_hyphen="yes"
2456 else
2457 want_hyphen="no"
2458 fi
2459 ],
2460 [want_hyphen="no"])
2461
2462# Egl
2463AC_ARG_ENABLE([egl],
2464 [AS_HELP_STRING([--enable-egl],[enable EGL rendering. @<:@default=disabled@:>@])],
2465 [
2466 if test "x${enableval}" = "xyes" ; then
2467 want_egl="yes"
2468 else
2469 want_egl="no"
2470 fi
2471 ],
2472 [want_egl="no"])
2473
2474# Verify OpenGL + EGL modes match (full+glx or es+egl)
2475if test "x${want_egl}" = "xyes" && test "x${with_opengl}" != "xes" ; then
2476 AC_MSG_ERROR([Full OpenGL with EGL is not supported, please add --with-opengl=es to your configure options to switch to EGL + OpenGL ES.])
2477fi
2478if test "x${want_egl}" = "xno" && test "x${with_opengl}" = "xes" ; then
2479 AC_MSG_ERROR([OpenGL ES requires EGL, please add --enable-egl to your configure options to switch to EGL + OpenGL ES.])
2480fi
2481
2482# Pixman
2483AC_ARG_ENABLE([pixman],
2484 [AS_HELP_STRING([--enable-pixman],[enable pixman for software rendering. @<:@default=disabled@:>@])],
2485 [
2486 if test "x${enableval}" = "xyes" ; then
2487 want_pixman="yes"
2488 CFOPT_WARNING="xyes"
2489 else
2490 want_pixman="no"
2491 fi
2492 ],
2493 [want_pixman="no"])
2494
2495AC_ARG_ENABLE([pixman-font],
2496 [AS_HELP_STRING([--enable-pixman-font],[Allow pixman to render fonts. @<:@default=disabled@:>@])],
2497 [
2498 if test "x${enableval}" = "xyes" ; then
2499 have_pixman_font="yes"
2500 else
2501 have_pixman_font="no"
2502 fi
2503 ],
2504 [have_pixman_font="no"])
2505
2506AC_ARG_ENABLE([pixman-rect],
2507 [AS_HELP_STRING([--enable-pixman-rect],[Allow pixman to render rects. @<:@default=disabled@:>@])],
2508 [
2509 if test "x${enableval}" = "xyes" ; then
2510 have_pixman_rect="yes"
2511 else
2512 have_pixman_rect="no"
2513 fi
2514 ],
2515 [have_pixman_rect="no"])
2516
2517AC_ARG_ENABLE([pixman-line],
2518 [AS_HELP_STRING([--enable-pixman-line],[Allow pixman to render lines. @<:@default=disabled@:>@])],
2519 [
2520 if test "x${enableval}" = "xyes" ; then
2521 have_pixman_line="yes"
2522 else
2523 have_pixman_line="no"
2524 fi
2525 ],
2526 [have_pixman_line="no"])
2527
2528AC_ARG_ENABLE(pixman-poly,
2529 AS_HELP_STRING([--enable-pixman-poly],[Allow pixman to render polys. @<:@default=disabled@:>@]),
2530 [
2531 if test "x${enableval}" = "xyes" ; then
2532 have_pixman_poly="yes"
2533 else
2534 have_pixman_poly="no"
2535 fi
2536 ],
2537 [have_pixman_poly="no"])
2538
2539AC_ARG_ENABLE([pixman-image],
2540 [AS_HELP_STRING([--enable-pixman-image],[Allow pixman to render images. @<:@default=disabled@:>@])],
2541 [
2542 if test "x${enableval}" = "xyes" ; then
2543 have_pixman_image="yes"
2544 else
2545 have_pixman_image="no"
2546 fi
2547 ],
2548 [have_pixman_image="no"])
2549
2550AC_ARG_ENABLE([pixman-image-scale-sample],
2551 [AS_HELP_STRING([--enable-pixman-image-scale-sample],[Allow pixman to render sampled scaled images. @<:@default=disabled@:>@])],
2552 [
2553 if test "x${enableval}" = "xyes" ; then
2554 have_pixman_image_scale_sample="yes"
2555 else
2556 have_pixman_image_scale_sample="no"
2557 fi
2558 ],
2559 [have_pixman_image_scale_sample="no"])
2560
2561# Ecore Buffer
2562AC_ARG_ENABLE([ecore-buffer],
2563 [AS_HELP_STRING([--enable-ecore-buffer],[enable ecore-buffer. @<:@default=disabled@:>@])],
2564 [
2565 if test "x${enableval}" = "xyes" ; then
2566 want_ecore_buffer="yes"
2567 else
2568 want_ecore_buffer="no"
2569 fi
2570 ],
2571 [want_ecore_buffer="no"])
2572
2573# Image Loaders
2574case "$host_os" in
2575 cegcc*|mingw32ce*)
2576 AC_MSG_ERROR([ceGCC compiler is not supported anymore. Exiting...])
2577 ;;
2578 mingw*)
2579 want_generic="no"
2580 want_poppler="no"
2581 want_spectre="no"
2582 want_libraw="no"
2583 want_rsvg="no"
2584 want_xcf="no"
2585 ;;
2586 cygwin*)
2587 want_generic="no"
2588 want_poppler="no"
2589 want_spectre="no"
2590 want_libraw="no"
2591 want_rsvg="no"
2592 want_xcf="no"
2593 ;;
2594 *)
2595 want_generic="static"
2596 want_poppler="yes"
2597 want_spectre="yes"
2598 want_libraw="yes"
2599 want_rsvg="yes"
2600 want_xcf="yes"
2601 ;;
2602esac
2603
2604ARG_ENABLE_EVAS_VG_LOADER(SVG, static)
2605ARG_ENABLE_EVAS_VG_LOADER(EET, static)
2606
2607
2608ARG_ENABLE_EVAS_IMAGE_LOADER(BMP, static)
2609ARG_ENABLE_EVAS_IMAGE_LOADER(Eet, static)
2610ARG_ENABLE_EVAS_IMAGE_LOADER(Generic, [${want_generic}])
2611ARG_ENABLE_EVAS_IMAGE_LOADER(Gif, yes)
2612ARG_ENABLE_EVAS_IMAGE_LOADER(ICO, static)
2613ARG_ENABLE_EVAS_IMAGE_LOADER(JPEG, static)
2614ARG_ENABLE_EVAS_IMAGE_LOADER(JP2K, auto)
2615ARG_ENABLE_EVAS_IMAGE_LOADER(PMAPS, static)
2616ARG_ENABLE_EVAS_IMAGE_LOADER(PNG, static)
2617ARG_ENABLE_EVAS_IMAGE_LOADER(PSD, static)
2618ARG_ENABLE_EVAS_IMAGE_LOADER(Tga, static)
2619ARG_ENABLE_EVAS_IMAGE_LOADER(Tiff, yes)
2620ARG_ENABLE_EVAS_IMAGE_LOADER(WBMP, static)
2621ARG_ENABLE_EVAS_IMAGE_LOADER(WEBP, no)
2622ARG_ENABLE_EVAS_IMAGE_LOADER(XPM, static)
2623ARG_ENABLE_EVAS_IMAGE_LOADER(TGV, static)
2624ARG_ENABLE_EVAS_IMAGE_LOADER(DDS, static)
2625
2626### Default values
2627
2628want_evas_engine_software_gdi="${have_win32}"
2629want_evas_engine_software_ddraw="${have_win32}"
2630want_evas_engine_gl_cocoa="${have_cocoa}"
2631want_evas_engine_wayland_egl="no"
2632if test "${want_wayland}" = "yes" && test "${want_egl}" = "yes" && test "${with_opengl}" = "es"; then
2633 want_evas_engine_wayland_egl="yes"
2634fi
2635
2636if test "${want_lua_old}" = "yes"; then
2637 EFL_CHECK_LUA_OLD([EVAS])
2638else
2639 EFL_DEPEND_PKG([EVAS], [LUAJIT], [luajit >= 2.0.0])
2640fi
2641
2642EFL_ADD_FEATURE([EVAS], [lua-old])
2643
2644EFL_CHECK_FUNC([EVAS], [dlsym])
2645
2646if test "x${efl_func_dlsym}" = "xno" && test "${with_opengl}" != "none"; then
2647 AC_MSG_ERROR([OpenGL cannot work without dlsym()])
2648fi
2649
2650### Checks for programs
2651
2652### Checks for libraries
2653
2654## Compatibility layers
2655EFL_PLATFORM_DEPEND([EVAS], [all])
2656EFL_INTERNAL_DEPEND_PKG([EVAS], [eo])
2657EFL_INTERNAL_DEPEND_PKG([EVAS], [eet])
2658EFL_INTERNAL_DEPEND_PKG([EVAS], [eina])
2659EFL_INTERNAL_DEPEND_PKG([EVAS], [efl])
2660EFL_INTERNAL_DEPEND_PKG([EVAS], [emile])
2661EFL_INTERNAL_DEPEND_PKG([EVAS], [ector])
2662EFL_INTERNAL_DEPEND_PKG([EVAS], [ecore])
2663
2664EFL_ADD_LIBS([EVAS], [-lm])
2665
2666# Freetype (the version 16.2.10 equals the freetype 2.5.0.1 release)
2667EFL_DEPEND_PKG([EVAS], [FREETYPE], [freetype2 >= 16.2.10])
2668
2669## optional dependencies
2670
2671# FontConfig
2672EFL_OPTIONAL_DEPEND_PKG([EVAS], [${want_fontconfig}],
2673 [FONTCONFIG], [fontconfig >= 2.5.0])
2674
2675# fribidi support
2676EFL_OPTIONAL_DEPEND_PKG([EVAS], [${want_fribidi}],
2677 [FRIBIDI], [fribidi >= 0.19.2])
2678
2679# harfbuzz support
2680have_harfbuzz_ft="no"
2681EFL_OPTIONAL_DEPEND_PKG([EVAS], [${want_harfbuzz}],
2682 [HARFBUZZ], [harfbuzz >= 0.9.0])
2683
2684# Pixman
2685EFL_OPTIONAL_DEPEND_PKG([EVAS], [${want_pixman}], [PIXMAN], [pixman-1])
2686
2687if test "x${have_pixman}" = "xyes" ; then
2688 if test "x${have_pixman_font}" = "xyes" ; then
2689 AC_DEFINE(PIXMAN_FONT, 1, [Allow pixman to render fonts])
2690 fi
2691 EFL_ADD_FEATURE([EVAS_PIXMAN], [font], [${have_pixman_font}])
2692
2693 if test "x${have_pixman_rect}" = "xyes" ; then
2694 AC_DEFINE(PIXMAN_RECT, 1, [Allow pixman to render rects])
2695 fi
2696 EFL_ADD_FEATURE([EVAS_PIXMAN], [rect], [${have_pixman_rect}])
2697
2698 if test "x${have_pixman_line}" = "xyes" ; then
2699 AC_DEFINE(PIXMAN_LINE, 1, [Allow pixman to render lines])
2700 fi
2701 EFL_ADD_FEATURE([EVAS_PIXMAN], [line], [${have_pixman_line}])
2702
2703 if test "x${have_pixman_poly}" = "xyes" ; then
2704 AC_DEFINE(PIXMAN_POLY, 1, [Allow pixman to render polys])
2705 fi
2706 EFL_ADD_FEATURE([EVAS_PIXMAN], [poly], [${have_pixman_poly}])
2707
2708 if test "x${have_pixman_image}" = "xyes" ; then
2709 AC_DEFINE(PIXMAN_IMAGE, 1, [Allow pixman to render images])
2710 fi
2711 EFL_ADD_FEATURE([EVAS_PIXMAN], [image], [${have_pixman_image}])
2712
2713 if test "x${have_pixman_image_scale_sample}" = "xyes" ; then
2714 AC_DEFINE(PIXMAN_IMAGE_SCALE_SAMPLE, 1, [Allow pixman to render image sampled scaling])
2715 fi
2716 EFL_ADD_FEATURE([EVAS_PIXMAN], [scale_sample], [${have_pixman_scale_sample}])
2717fi
2718
2719## Engines
2720
2721define([EVAS_ENGINE_DEP_CHECK_FB], [
2722AC_CHECK_HEADER([linux/fb.h], [:], [AC_MSG_ERROR([Missing linux/fb.h])])
2723])
2724
2725EVAS_ENGINE([buffer], [static])
2726EVAS_ENGINE([fb], [${want_fb}], [EVAS_ENGINE_DEP_CHECK_FB])
2727
2728# XXX TODO:
2729EVAS_CHECK_ENGINE([gl-cocoa], [${want_evas_engine_gl_cocoa}], [no], [OpenGL Cocoa])
2730EVAS_CHECK_ENGINE([gl-sdl], [${want_gl_sdl}], [no], [OpenGL SDL])
2731EVAS_CHECK_ENGINE([software-gdi], [${want_evas_engine_software_gdi}], [no], [Software GDI])
2732EVAS_CHECK_ENGINE([software-ddraw], [${want_evas_engine_software_ddraw}], [no], [Software DirectDraw])
2733EVAS_CHECK_ENGINE([wayland-egl], [${want_evas_engine_wayland_egl}], [no], [Wayland Egl])
2734EVAS_CHECK_ENGINE([wayland-shm], [${want_wayland}], [no], [Wayland Shm])
2735EVAS_CHECK_ENGINE([drm], [${want_drm}], [no], [Drm])
2736EVAS_CHECK_ENGINE([gl-drm], [${want_gl_drm}], [no], [OpenGL Drm])
2737EVAS_CHECK_ENGINE([eglfs], [${want_eglfs}], [no], [OpenGL Fb])
2738
2739
2740# Software Xlib
2741
2742have_evas_engine_software_xlib="no"
2743EVAS_CHECK_ENGINE([software-xlib], [${want_x11_xlib}], [no], [Software Xlib])
2744AC_MSG_CHECKING([whether to build Software Xlib Engine])
2745AC_MSG_RESULT([${have_evas_engine_software_xlib}])
2746
2747# If software_x11 is available, define everything needed for X11
2748
2749have_evas_engine_software_x11="no"
2750if test "x${have_evas_engine_software_xlib}" = "xyes" || test "x${have_evas_engine_software_xlib}" = "xstatic"; then
2751 have_evas_engine_software_x11="yes"
2752 AC_DEFINE_UNQUOTED([BUILD_ENGINE_SOFTWARE_X11], [1], [Build software X11 engine])
2753fi
2754AM_CONDITIONAL([BUILD_ENGINE_SOFTWARE_X11], [test "x${have_evas_engine_software_x11}" = "xyes"])
2755
2756if test "x${have_evas_engine_software_xlib}" = "xstatic"; then
2757 AC_DEFINE_UNQUOTED([EVAS_STATIC_BUILD_SOFTWARE_X11], [1], [Build software X11 engine as part of libevas])
2758fi
2759AM_CONDITIONAL([EVAS_STATIC_BUILD_SOFTWARE_X11], [test "x${have_evas_engine_software_xlib}" = "xstatic"])
2760
2761# Needed for evas-software-x11.pc
2762
2763AC_SUBST([have_evas_engine_software_xlib])
2764
2765# Software generic
2766AC_DEFINE([EVAS_STATIC_BUILD_SOFTWARE_GENERIC], [1], [Build software generic engine as part of libevas])
2767AM_CONDITIONAL([EVAS_STATIC_BUILD_SOFTWARE_GENERIC], [true])
2768
2769# OpenGL
2770
2771if test "${with_opengl}" = "es" ; then
2772 AC_DEFINE(GL_GLES, 1, [GLSL runtime shader GLES2 support])
2773fi
2774
2775# OpenGL Xlib
2776
2777have_evas_engine_gl_xlib="no"
2778EVAS_CHECK_ENGINE([gl-xlib], [${want_x11_xlib_opengl}], [no], [OpenGL XLib])
2779
2780AC_MSG_CHECKING([whether to build OpenGL Xlib Engine])
2781AC_MSG_RESULT([${have_evas_engine_gl_xlib}])
2782
2783# If opengl_x11 is available, define everything needed for X11
2784
2785have_evas_engine_gl_x11="no"
2786if test "x${have_evas_engine_gl_xlib}" = "xyes" || test "x${have_evas_engine_gl_xlib}" = "xstatic"; then
2787 have_evas_engine_gl_x11="yes"
2788 AC_DEFINE_UNQUOTED([BUILD_ENGINE_GL_X11], [1], [Build OpenGL X11 engine])
2789fi
2790AM_CONDITIONAL([BUILD_ENGINE_GL_X11], [test "x${have_evas_engine_gl_x11}" = "xyes"])
2791
2792if test "x${have_evas_engine_gl_xlib}" = "xstatic"; then
2793 AC_DEFINE_UNQUOTED([EVAS_STATIC_BUILD_GL_X11], [1], [Build OpenGL X11 engine as part of libevas])
2794fi
2795AM_CONDITIONAL([EVAS_STATIC_BUILD_GL_X11], [test "x${have_evas_engine_gl_xlib}" = "xstatic"])
2796
2797# Needed for evas-opengl-x11.pc
2798
2799AC_SUBST([have_evas_engine_gl_xlib])
2800
2801# OpenGL SDL
2802
2803if test "x$have_evas_engine_gl_sdl" = "xyes" || test "x$have_evas_engine_gl_sdl" = "xstatic" ; then
2804 AC_CHECK_DECL([SDL_GL_CONTEXT_MAJOR_VERSION],
2805 [AC_DEFINE([HAVE_SDL_GL_CONTEXT_VERSION], [1], [SDL_GL version attributes present])],,
2806 [#include <SDL2/SDL_video.h>])
2807fi
2808
2809if test "${with_opengl}" = "es"; then
2810 AC_CHECK_DECL([SDL_OPENGLES],
2811 [AC_DEFINE([HAVE_SDL_FLAG_OPENGLES], [1], [SDL_OPENGLES flag is present])],,
2812 [#include <SDL2/SDL_video.h>])
2813fi
2814
2815# OpenGL common
2816evas_engine_gl_common_cflags=""
2817if test "x${have_egl}" = "xyes"; then
2818 evas_engine_gl_common_libs="-lEGL -lGLESv2 -lm"
2819else
2820 evas_engine_gl_common_libs="-lGL -lm"
2821fi
2822
2823# The lines below fix compiling/linking of gl_generic on OSX
2824if test "x${have_darwin}" = "xyes"; then
2825 if test "x${have_evas_engine_gl_cocoa}" = "xyes"; then
2826 # If gl_cocoa is enabled, Apple's Core OpenGL (CGL) should be the default OpenGL.
2827 # CFLAGS and LIBS are determined by evas-gl_cocoa.
2828 evas_engine_gl_common_libs="${evas_engine_gl_cocoa_libs}"
2829 evas_engine_gl_common_cflags="${evas_engine_gl_cocoa_cflags}"
2830 else
2831 # If evas-gl_cocoa is disabled, the only supported OpenGL engine on OSX (for now)
2832 # is evas-gl_x11. Without its CFLAGS and LIBS explicitely set, gl_generic
2833 # cannot compile (nor link).
2834 evas_engine_gl_common_libs=""
2835 evas_engine_gl_common_cflags=""
2836
2837 if test "x${have_evas_engine_gl_xlib}" = "xyes"; then
2838 evas_engine_gl_common_libs="${evas_engine_gl_xlib_libs}"
2839 evas_engine_gl_common_cflags="${evas_engine_gl_xlib_cflags}"
2840 fi
2841 ### XXX Check for other supported engines supported on OSX (dec. 2014: NONE)
2842 fi
2843fi
2844
2845AC_SUBST([evas_engine_gl_common_cflags])
2846AC_SUBST([evas_engine_gl_common_libs])
2847
2848have_evas_engine_gl_common="no"
2849have_static_evas_engine_gl_common="no"
2850if test "x$have_evas_engine_gl_xlib" = "xyes" || \
2851 test "x$have_evas_engine_gl_sdl" = "xyes" || \
2852 test "x$have_evas_engine_gl_cocoa" = "xyes" || \
2853 test "x$have_evas_engine_gl_drm" = "xyes" || \
2854 test "x$have_evas_engine_eglfs" = "xyes" || \
2855 test "x$have_evas_engine_wayland_egl" = "xyes"; then
2856 have_evas_engine_gl_common="yes"
2857fi
2858if test "x$have_evas_engine_gl_xlib" = "xstatic" || \
2859 test "x$have_evas_engine_gl_sdl" = "xstatic" || \
2860 test "x$have_evas_engine_gl_cocoa" = "xstatic" || \
2861 test "x$have_evas_engine_gl_drm" = "xstatic" || \
2862 test "x$have_evas_engine_eglfs" = "xstatic" || \
2863 test "x$have_evas_engine_wayland_egl" = "xstatic"; then
2864 have_evas_engine_gl_common="yes"
2865 have_static_evas_engine_gl_common="yes"
2866fi
2867
2868if test "x${have_evas_engine_gl_common}" = "xyes"; then
2869 AC_DEFINE([BUILD_ENGINE_GL_COMMON], [1], [Generic OpenGL Rendering Support])
2870fi
2871
2872AM_CONDITIONAL([BUILD_ENGINE_GL_COMMON], [test "x$have_evas_engine_gl_common" = "xyes"])
2873
2874if test "x${have_static_evas_engine_gl_common}" = "xyes"; then
2875 AC_DEFINE([EVAS_STATIC_BUILD_GL_COMMON], [1], [Build GL generic engine as part of libevas])
2876fi
2877
2878AM_CONDITIONAL([EVAS_STATIC_BUILD_GL_COMMON], [test "x${have_static_evas_engine_gl_common}" = "xyes"])
2879
2880have_evas_engine_wayland_common="no"
2881if test "x$have_evas_engine_wayland_egl" = "xstatic" || \
2882 test "x$have_evas_engine_wayland_shm" = "xstatic" || \
2883 test "x$have_evas_engine_wayland_egl" = "xyes" || \
2884 test "x$have_evas_engine_wayland_shm" = "xyes"; then
2885 have_evas_engine_wayland_common="yes"
2886fi
2887
2888if test "x$have_evas_engine_wayland_common" = "xyes"; then
2889 AC_DEFINE([BUILD_ENGINE_WAYLAND_COMMON], [1], [Building any wayland evas engine])
2890fi
2891AM_CONDITIONAL([BUILD_ENGINE_WAYLAND_COMMON], [test "x${have_evas_engine_wayland_common}" = "xyes"])
2892
2893## Vg Loaders
2894
2895EVAS_CHECK_VG_LOADER([SVG], [${want_evas_vg_loader_svg}])
2896EVAS_CHECK_VG_LOADER([EET], [${want_evas_vg_loader_eet}])
2897
2898## Image Loaders
2899
2900EVAS_CHECK_IMAGE_LOADER([BMP], [${want_evas_image_loader_bmp}])
2901EVAS_CHECK_IMAGE_LOADER([Eet], [${want_evas_image_loader_eet}])
2902EVAS_CHECK_IMAGE_LOADER([Generic], [${want_evas_image_loader_generic}])
2903EVAS_CHECK_IMAGE_LOADER([Gif], [${want_evas_image_loader_gif}])
2904EVAS_CHECK_IMAGE_LOADER([ICO], [${want_evas_image_loader_ico}])
2905EVAS_CHECK_IMAGE_LOADER([JPEG], [${want_evas_image_loader_jpeg}])
2906EVAS_CHECK_IMAGE_LOADER([JP2K], [${want_evas_image_loader_jp2k}])
2907EVAS_CHECK_IMAGE_LOADER([PMAPS], [${want_evas_image_loader_pmaps}])
2908EVAS_CHECK_IMAGE_LOADER([PNG], [${want_evas_image_loader_png}])
2909EVAS_CHECK_IMAGE_LOADER([PSD], [${want_evas_image_loader_psd}])
2910EVAS_CHECK_IMAGE_LOADER([Tga], [${want_evas_image_loader_tga}])
2911EVAS_CHECK_IMAGE_LOADER([Tiff], [${want_evas_image_loader_tiff}])
2912EVAS_CHECK_IMAGE_LOADER([WBMP], [${want_evas_image_loader_wbmp}])
2913EVAS_CHECK_IMAGE_LOADER([WEBP], [${want_evas_image_loader_webp}])
2914EVAS_CHECK_IMAGE_LOADER([XPM], [${want_evas_image_loader_xpm}])
2915EVAS_CHECK_IMAGE_LOADER([TGV], [${want_evas_image_loader_tgv}])
2916EVAS_CHECK_IMAGE_LOADER([DDS], [${want_evas_image_loader_dds}])
2917
2918EFL_EVAL_PKGS([EVAS])
2919
2920### Checks for header files
2921
2922if test "x$want_hyphen" = "xyes" ; then
2923
2924 EFL_CHECK_LIB_CODE([EVAS], [-lhyphen], [have_fct], [[
2925 #include <string.h>
2926 #include <stdlib.h>
2927 #include <ctype.h>
2928 #include <stdio.h>
2929 #include <hyphen.h>
2930 ]], [[
2931 HyphenDict *dict;
2932 ]])
2933
2934 if test "${have_fct}" = "no"; then
2935 AC_MSG_ERROR([Cannot find the hyphen library.])
2936 else
2937 AC_DEFINE([HAVE_HYPHEN], [1], [have hunspell hyphen support])
2938 fi
2939fi
2940
2941if test "x$have_harfbuzz" = "xyes" ; then
2942
2943 CPPFLAGS_SAVE="$CPPFLAGS"
2944 CPPFLAGS="$CPPFLAGS $EVAS_CFLAGS"
2945# must have for usage with harfbuzz although harfbuzz may not have it.
2946
2947 AC_CHECK_HEADER([hb-ft.h],
2948 [
2949 have_harfbuzz_ft="yes"
2950 #Depend on harfbuzz ft for harfbuzz support
2951 AC_DEFINE([HAVE_HARFBUZZ], [1], [have harfbuzz support])
2952 ],
2953 [AC_MSG_ERROR([Harfbuzz-ft (hb-ft.h) not found])])
2954
2955 CPPFLAGS="$CPPFLAGS_SAVE"
2956fi
2957
2958### Checks for types
2959
2960CPPFLAGS_SAVE="$CPPFLAGS"
2961CPPFLAGS="$CPPFLAGS $EVAS_CFLAGS -Isrc/lib/eina"
2962AC_CHECK_SIZEOF([Eina_Unicode], [], [#include <Eina.h>])
2963CPPFLAGS="$CPPFLAGS_SAVE"
2964
2965
2966if test "x$have_fribidi" = "xyes" ; then
2967 CPPFLAGS_SAVE="$CPPFLAGS"
2968 CPPFLAGS="$CPPFLAGS $EVAS_CFLAGS"
2969 AC_CHECK_SIZEOF([FriBidiChar], [], [#include <fribidi.h>])
2970 CPPFLAGS="$CPPFLAGS_SAVE"
2971fi
2972
2973### Checks for structures
2974
2975AC_CHECK_TYPES([struct sigaction], [], [],
2976 [[#include <signal.h>]])
2977
2978### Checks for compiler characteristics
2979
2980### Checks for linker characteristics
2981
2982### Checks for library functions
2983
2984AC_CHECK_FUNCS([siglongjmp])
2985
2986AC_CHECK_LIB([m], [lround],
2987[AC_DEFINE([HAVE_LROUND], [1], [C99 lround function exists])],
2988[EFL_CHECK_GCC_BUILTIN([lround], [HAVE_LROUND])]
2989)
2990
2991
2992### Configuration
2993
2994## dither options
2995
2996AC_ARG_WITH([evas-dither-mask],
2997 [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.
2998 @<:@default=big@:>@])],
2999 [build_evas_dither_mask=${withval}],
3000 [build_evas_dither_mask=big])
3001
3002case "${build_evas_dither_mask}" in
3003 big)
3004 AC_DEFINE([BUILD_BIG_DITHER_MASK], [1], [Use biggest dither mask while converting in Evas])
3005 ;;
3006 small)
3007 AC_DEFINE([BUILD_SMALL_DITHER_MASK], [1], [Use smaller dither mask while converting in Evas])
3008 ;;
3009 line)
3010 AC_DEFINE([BUILD_LINE_DITHER_MASK], [1], [Use simpler line-only dither mask while converting in Evas])
3011 ;;
3012 none)
3013 AC_DEFINE([BUILD_NO_DITHER_MASK], [1], [Do not use dither masks while converting in Evas])
3014 ;;
3015 *)
3016 AC_MSG_ERROR([Unknown Evas dither mask --with-evas-dither-mask=${build_evas_dither_mask}])
3017 ;;
3018esac
3019EFL_ADD_FEATURE([EVAS], [fontconfig])
3020EFL_ADD_FEATURE([EVAS], [fribidi])
3021EFL_ADD_FEATURE([EVAS], [harfbuzz])
3022EFL_ADD_FEATURE([EVAS], [tile-rotate])
3023EFL_ADD_FEATURE([EVAS], [dither-mask], [${build_evas_dither_mask}])
3024EFL_ADD_FEATURE([EVAS], [hyphen])
3025
3026#### Generic backend
3027
3028### Options to turn off generic loaders for evas
3029AC_ARG_ENABLE([poppler],
3030 [AS_HELP_STRING([--disable-poppler],[disable pdf support. @<:@default=enabled@:>@])],
3031 [
3032 if test "x${enableval}" = "xyes" ; then
3033 want_poppler="yes"
3034 else
3035 want_poppler="no"
3036 fi
3037 ])
3038
3039AC_ARG_ENABLE([spectre],
3040 [AS_HELP_STRING([--disable-spectre],[disable postscript support. @<:@default=enabled@:>@])],
3041 [
3042 if test "x${enableval}" = "xyes" ; then
3043 want_spectre="yes"
3044 else
3045 want_spectre="no"
3046 fi
3047 ])
3048
3049AC_ARG_ENABLE([libraw],
3050 [AS_HELP_STRING([--disable-libraw],[disable libraw support. @<:@default=enabled@:>@])],
3051 [
3052 if test "x${enableval}" = "xyes" ; then
3053 want_libraw="yes"
3054 else
3055 want_libraw="no"
3056 fi
3057 ])
3058
3059AC_ARG_ENABLE([librsvg],
3060 [AS_HELP_STRING([--disable-librsvg],[disable svg support. @<:@default=enabled@:>@])],
3061 [
3062 if test "x${enableval}" = "xyes" ; then
3063 want_rsvg="yes"
3064 else
3065 want_rsvg="no"
3066 fi
3067 ])
3068
3069AC_ARG_ENABLE([xcf],
3070 [AS_HELP_STRING([--disable-xcf],[disable xcf support. @<:@default=enabled@:>@])],
3071 [
3072 if test "x${enableval}" = "xyes" ; then
3073 want_xcf="yes"
3074 else
3075 want_xcf="no"
3076 fi
3077 ])
3078
3079have_poppler="no"
3080have_spectre="no"
3081have_raw="no"
3082have_rsvg="no"
3083
3084### Check needed dependency for each generic loader
3085if test "x${want_poppler}" = "xyes"; then
3086 PKG_CHECK_MODULES([POPPLER], [poppler-cpp >= 0.12], [have_poppler="yes"])
3087fi
3088
3089if test "x${have_poppler}" = "xyes" ; then
3090 # We should be using ${CXX} here, but there is a bug in
3091 # autotools macro and CXX is always set to g++ even if
3092 # it's not found. So we are using an internal variable
3093 # that does the work for now, may get broken in the future.
3094 if test "x${ac_ct_CXX}" = "x" -a "x${CXX}" = "xg++"; then
3095 AC_MSG_ERROR([efl requires a C++ compiler got ${ac_ct_CXX} and ${CXX}.])
3096 fi
3097fi
3098
3099if test "x${want_spectre}" = "xyes"; then
3100 PKG_CHECK_MODULES([SPECTRE], [libspectre], [have_spectre="yes"])
3101fi
3102
3103if test "x${want_libraw}" = "xyes"; then
3104 PKG_CHECK_MODULES([LIBRAW], [libraw], [have_raw="yes"])
3105fi
3106
3107if test "x${want_rsvg}" = "xyes"; then
3108 PKG_CHECK_MODULES([RSVG], [librsvg-2.0 >= 2.14.0 cairo >= 1.0.0], [have_rsvg="yes"])
3109 PKG_CHECK_MODULES(
3110 [SVG_2_36], [librsvg-2.0 >= 2.36.0 cairo >= 1.0.0],
3111 [
3112 have_rsvg_2_36="yes"
3113 AC_DEFINE(HAVE_SVG_2_36, 1, [Have librsvg >= 2.36])
3114 ],
3115 [have_rsvg_2_36="no"])
3116fi
3117
3118AM_CONDITIONAL([HAVE_POPPLER], [test "x${have_poppler}" = "xyes"])
3119AM_CONDITIONAL([HAVE_SPECTRE], [test "x${have_spectre}" = "xyes"])
3120AM_CONDITIONAL([HAVE_LIBRAW], [test "x${have_raw}" = "xyes"])
3121AM_CONDITIONAL([HAVE_RSVG], [test "x${have_rsvg}" = "xyes"])
3122AM_CONDITIONAL([HAVE_XCF], [test "x${want_xcf}" = "xyes"])
3123
3124EFL_ADD_FEATURE([EVAS_LOADER], [poppler], [${have_poppler}])
3125EFL_ADD_FEATURE([EVAS_LOADER], [spectre], [${have_spectre}])
3126EFL_ADD_FEATURE([EVAS_LOADER], [raw], [${have_raw}])
3127EFL_ADD_FEATURE([EVAS_LOADER], [rsvg], [${have_rsvg}])
3128EFL_ADD_FEATURE([EVAS_LOADER], [xcf], [${want_xcf}])
3129
3130EFL_LIB_END([Evas])
3131#### End of Evas
3132
3133#### Edje CXX
3134EFL_LIB_START([Evas_Cxx])
3135
3136EFL_EVAL_PKGS([EVAS_CXX])
3137
3138EFL_LIB_END([Evas_Cxx])
3139#### End of Edje CXX
3140
3141#### Embryo
3142
3143EFL_LIB_START([Embryo])
3144
3145### Default values
3146
3147### Additional options to configure
3148
3149### Checks for programs
3150
3151### Checks for libraries
3152EFL_PLATFORM_DEPEND([EMBRYO], [all])
3153EFL_INTERNAL_DEPEND_PKG([EMBRYO], [eina])
3154
3155EFL_ADD_LIBS([EMBRYO], [-lm])
3156
3157### Checks for header files
3158
3159### Checks for types
3160
3161### Checks for structures
3162
3163### Checks for compiler characteristics
3164
3165### Checks for linker characteristics
3166
3167### Checks for library functions
3168
3169if ! test "x${efl_func_fnmatch}" = "xyes" ; then
3170 AC_MSG_ERROR([Cannot find fnmatch()])
3171fi
3172
3173if ! test "x${efl_func_gettimeofday}" = "xyes" ; then
3174 AC_MSG_ERROR([Cannot find gettimeofday()])
3175fi
3176
3177### Check availability
3178
3179EFL_LIB_END([Embryo])
3180#### End of Embryo
3181
3182
3183#### Ecore CXX
3184EFL_LIB_START([Ecore_Cxx])
3185
3186EFL_INTERNAL_DEPEND_PKG([ECORE_CXX], [Eina_Cxx])
3187EFL_INTERNAL_DEPEND_PKG([ECORE_CXX], [Ecore])
3188EFL_INTERNAL_DEPEND_PKG([ECORE_CXX], [Eina])
3189EFL_INTERNAL_DEPEND_PKG([ECORE_CXX], [Eo])
3190EFL_INTERNAL_DEPEND_PKG([ECORE_CXX], [Efl])
3191
3192EFL_EVAL_PKGS([ECORE_CXX])
3193
3194EFL_LIB_END([Ecore_Cxx])
3195#### End of Ecore CXX
3196
3197#### Ecore_Con
3198
3199EFL_LIB_START([Ecore_Con])
3200
3201### Default values
3202
3203want_ecore_con_local_sockets="yes"
3204want_ecore_con_abstract_sockets="yes"
3205
3206if test "${have_win32}" = "yes"; then
3207 want_ecore_con_abstract_sockets="no"
3208elif test "${have_darwin}" = "yes"; then
3209 want_ecore_con_abstract_sockets="yes"
3210elif test "${have_ps3}" = "yes"; then
3211 want_ecore_con_local_sockets="no"
3212 want_ecore_con_abstract_sockets="no"
3213fi
3214
3215AC_DEFINE_IF([HAVE_LOCAL_SOCKETS],
3216 [test "x${want_ecore_con_local_sockets}" = "xyes"],
3217 [1], [Have local sockets support])
3218AC_DEFINE_IF([HAVE_ABSTRACT_SOCKETS],
3219 [test "x${want_ecore_con_abstract_sockets}" = "xyes"],
3220 [1], [Have abstract sockets namespace])
3221
3222EFL_NET_CONTROL_BACKEND=none
3223if test "${have_linux}" = "yes"; then
3224 EFL_NET_CONTROL_BACKEND=connman
3225fi
3226
3227AC_MSG_CHECKING([net-control backend to use])
3228AC_ARG_WITH([net-control],
3229 [AS_HELP_STRING([--with-net-control=BACKEND],[Specify which network control backend to be used by Efl.Net.Session and Efl.Net.Control. One of: connman or none])],
3230 [EFL_NET_CONTROL_BACKEND="${withval}"])
3231
3232case "${EFL_NET_CONTROL_BACKEND}" in
3233 connman|none)
3234 ;;
3235 *)
3236 AC_MSG_ERROR([Unknown net-control backend --with-net-control=${EFL_NET_CONTROL_BACKEND}])
3237 ;;
3238esac
3239AC_MSG_RESULT([${EFL_NET_CONTROL_BACKEND}])
3240AC_SUBST(EFL_NET_CONTROL_BACKEND)
3241
3242### Checks for programs
3243
3244### Checks for libraries
3245EFL_PLATFORM_DEPEND([ECORE_CON], [all])
3246if test "$build_crypto" != "none" ; then
3247 EFL_CRYPTO_DEPEND([ECORE_CON])
3248fi
3249EFL_INTERNAL_DEPEND_PKG([ECORE_CON], [eo])
3250EFL_INTERNAL_DEPEND_PKG([ECORE_CON], [efl])
3251EFL_INTERNAL_DEPEND_PKG([ECORE_CON], [eet])
3252EFL_INTERNAL_DEPEND_PKG([ECORE_CON], [eina])
3253EFL_INTERNAL_DEPEND_PKG([ECORE_CON], [ecore])
3254EFL_INTERNAL_DEPEND_PKG([ECORE_CON], [emile])
3255
3256if test "${EFL_NET_CONTROL_BACKEND}" = "connman"; then
3257 EFL_INTERNAL_DEPEND_PKG([ECORE_CON], [eldbus])
3258fi
3259AM_CONDITIONAL([EFL_NET_CONTROL_BACKEND_CONNMAN], [test "${EFL_NET_CONTROL_BACKEND}" = "connman"])
3260AM_CONDITIONAL([EFL_NET_CONTROL_BACKEND_NONE], [test "${EFL_NET_CONTROL_BACKEND}" = "none"])
3261
3262EFL_ADD_LIBS([ECORE_CON], [${requirement_nsl} -lm])
3263
3264EFL_OPTIONAL_DEPEND_PKG([ECORE_CON], [${want_systemd}], [SYSTEMD], [libsystemd])
3265
3266EFL_ADD_FEATURE([ECORE_CON], [local-sockets], [${want_ecore_con_local_sockets}])
3267EFL_ADD_FEATURE([ECORE_CON], [abstract-sockets], [${want_ecore_con_abstract_sockets}])
3268EFL_ADD_FEATURE([ECORE_CON], [systemd-daemon], [${want_systemd}])
3269EFL_ADD_FEATURE([ECORE_CON], [net-control], [${EFL_NET_CONTROL_BACKEND}])
3270
3271EFL_EVAL_PKGS([ECORE_CON])
3272
3273### Checks for header files
3274
3275AC_CHECK_HEADERS([netdb.h sys/filio.h])
3276
3277if test "x${ac_cv_header_netdb_h}" = "xno" && test "x${have_windows}" = "xno"; then
3278 AC_MSG_ERROR([netdb.h is requested to have Ecore_Con. Exiting...])
3279fi
3280
3281### Checks for types
3282
3283if test "x${have_win32}" = "xyes" ; then
3284 have_ipv6="yes"
3285else
3286 have_ipv6="no"
3287 AC_CHECK_TYPES([struct ipv6_mreq],
3288 [have_ipv6="yes"],
3289 [have_ipv6="no"],
3290 [[
3291#ifdef HAVE_NETINET_IN_H
3292# include <netinet/in.h>
3293#endif
3294 ]])
3295fi
3296
3297AC_DEFINE_IF([HAVE_IPV6],
3298 [test "x${have_ipv6}" = "xyes"],
3299 [1], [Define if IPV6 is supported])
3300AM_CONDITIONAL([HAVE_IPV6], [test "x${have_ipv6}" = "xyes"])
3301
3302### Checks for structures
3303
3304### Checks for compiler characteristics
3305
3306### Checks for linker characteristics
3307
3308### Checks for library functions
3309AC_CHECK_FUNCS([accept4], ,
3310 [AC_CHECK_LIB([socket], [accept4],
3311 [AC_DEFINE([HAVE_ACCEPT4], [1])])])
3312
3313EFL_LIB_END([Ecore_Con])
3314#### End of Ecore_Con
3315
3316
3317#### Ecore_Ipc
3318
3319EFL_LIB_START([Ecore_Ipc])
3320
3321### Default values
3322
3323### Additional options to configure
3324
3325### Checks for programs
3326
3327## Compatibility layers
3328EFL_PLATFORM_DEPEND([ECORE_IPC], [evil])
3329
3330### Checks for libraries
3331EFL_INTERNAL_DEPEND_PKG([ECORE_IPC], [ecore-con])
3332EFL_INTERNAL_DEPEND_PKG([ECORE_IPC], [ecore])
3333EFL_INTERNAL_DEPEND_PKG([ECORE_IPC], [eo])
3334EFL_INTERNAL_DEPEND_PKG([ECORE_IPC], [efl])
3335EFL_INTERNAL_DEPEND_PKG([ECORE_IPC], [eina])
3336
3337EFL_ADD_LIBS([ECORE_IPC], [-lm])
3338
3339### Checks for header files
3340
3341AC_CHECK_HEADERS([winsock2.h])
3342
3343### Checks for types
3344
3345### Checks for structures
3346
3347### Checks for compiler characteristics
3348
3349### Checks for linker characteristics
3350
3351### Checks for library functions
3352
3353EFL_LIB_END([Ecore_Ipc])
3354#### End of Ecore_Ipc
3355
3356
3357#### Ecore_File
3358
3359EFL_LIB_START([Ecore_File])
3360
3361### Additional options to configure
3362
3363### Default values
3364
3365### Checks for programs
3366
3367## Compatibility layers
3368EFL_PLATFORM_DEPEND([ECORE_FILE], [evil])
3369
3370### Checks for libraries
3371EFL_PLATFORM_DEPEND([ECORE_FILE], [escape])
3372EFL_INTERNAL_DEPEND_PKG([ECORE_FILE], [ecore-con])
3373EFL_INTERNAL_DEPEND_PKG([ECORE_FILE], [ecore])
3374EFL_INTERNAL_DEPEND_PKG([ECORE_FILE], [eo])
3375EFL_INTERNAL_DEPEND_PKG([ECORE_FILE], [efl])
3376EFL_INTERNAL_DEPEND_PKG([ECORE_FILE], [eina])
3377
3378### Checks for header files
3379
3380### Checks for types
3381
3382### Checks for structures
3383
3384### Checks for compiler characteristics
3385
3386### Checks for linker characteristics
3387
3388### Checks for library functions
3389
3390EFL_LIB_END([Ecore_File])
3391#### End of Ecore_File
3392
3393
3394#### Eeze
3395have_libmount_new="no"
3396have_libmount_old="no"
3397have_eeze_mount="no"
3398
3399EFL_LIB_START_OPTIONAL([Eeze], [test "x${build_libeeze}" = "xyes"])
3400
3401### Additional options to configure
3402AC_ARG_WITH([mount],
3403 [AS_HELP_STRING([--with-mount], [specify mount bin @<:@default=detect@:>@])],
3404 [with_eeze_mount=$withval], [with_eeze_mount="detect"])
3405AC_ARG_WITH([umount],
3406 [AS_HELP_STRING([--with-umount], [specify umount bin @<:@default=detect@:>@])],
3407 [with_eeze_umount=$withval], [with_eeze_umount="detect"])
3408AC_ARG_WITH([eject],
3409 [AS_HELP_STRING([--with-eject], [specify eject bin @<:@default=detect@:>@])],
3410 [with_eeze_eject=$withval], [with_eeze_eject="detect"])
3411
3412### Default values
3413
3414### Checks for programs
3415
3416### Checks for libraries
3417EFL_INTERNAL_DEPEND_PKG([EEZE], [eina])
3418EFL_INTERNAL_DEPEND_PKG([EEZE], [ecore])
3419EFL_INTERNAL_DEPEND_PKG([EEZE], [eo])
3420EFL_INTERNAL_DEPEND_PKG([EEZE], [efl])
3421EFL_INTERNAL_DEPEND_PKG([EEZE], [ecore-file])
3422EFL_INTERNAL_DEPEND_PKG([EEZE], [ecore-con])
3423EFL_INTERNAL_DEPEND_PKG([EEZE], [eet])
3424EFL_INTERNAL_DEPEND_PKG([EEZE], [emile])
3425
3426EFL_DEPEND_PKG([EEZE], [UDEV], [libudev >= 148])
3427
3428AC_ARG_ENABLE([libmount],
3429 [AS_HELP_STRING([--disable-libmount],[disable libmount support. @<:@default=enabled@:>@])],
3430 [
3431 if test "x${enableval}" = "xyes" ; then
3432 want_libmount="yes"
3433 else
3434 want_libmount="no"
3435 CFOPT_WARNING="xyes"
3436 fi
3437 ],
3438 [want_libmount="yes"])
3439
3440EFL_OPTIONAL_DEPEND_PKG([EEZE], [${want_libmount}],
3441 [EEZE_MOUNT], [mount >= 2.18.0])
3442EFL_ADD_FEATURE([EEZE], [libmount], [${have_eeze_mount}])
3443
3444PKG_CHECK_EXISTS([libudev < 199],
3445 [have_libudev_old="yes"],
3446 [have_libudev_old="no"])
3447AC_MSG_CHECKING([Use old libudev API (before 199)])
3448AC_MSG_RESULT([${have_libudev_old}])
3449
3450PKG_CHECK_EXISTS([mount < 2.19.0],
3451 [have_libmount_old="yes"],
3452 [have_libmount_old="no"])
3453AC_MSG_CHECKING([Use old libmount API (before 2.19.0)])
3454AC_MSG_RESULT([${have_libmount_old}])
3455
3456PKG_CHECK_EXISTS([mount == 2.19.0],
3457 [have_libmount_219="yes"],
3458 [have_libmount_219="no"])
3459AC_MSG_CHECKING([Use libmount 2.19.0 API])
3460AC_MSG_RESULT([${have_libmount_219}])
3461
3462PKG_CHECK_EXISTS([mount > 2.19.0],
3463 [have_libmount_new="yes"],
3464 [have_libmount_new="no"])
3465AC_MSG_CHECKING([Use new libmount API (newer than 2.19.0)])
3466AC_MSG_RESULT([${have_libmount_new}])
3467
3468if test "x${have_libudev_old}" = "xyes"; then
3469 AC_DEFINE_UNQUOTED([OLD_LIBUDEV], [1], [using older version of libudev])
3470fi
3471
3472if test "x${have_libmount_old}" = "xyes"; then
3473 AC_DEFINE_UNQUOTED([OLD_LIBMOUNT], [1], [using first version of libmount])
3474fi
3475
3476## modules
3477if test "${want_tizen}" = "yes"; then
3478 PKG_CHECK_MODULES([TIZEN_SENSOR], [capi-system-sensor >= 0.1.17])
3479fi
3480EFL_ADD_FEATURE([EEZE], [tizen])
3481
3482EFL_EVAL_PKGS([EEZE])
3483
3484### Checks for header files
3485
3486### Checks for types
3487
3488### Checks for structures
3489
3490### Checks for compiler characteristics
3491
3492### Checks for linker characteristics
3493
3494### Checks for library functions
3495
3496### Checks for binaries
3497if test "x$with_eeze_mount" = "xdetect"; then
3498 AC_PATH_PROG([with_eeze_mount], [mount], [])
3499fi
3500AC_DEFINE_UNQUOTED([EEZE_MOUNT_BIN], ["$with_eeze_mount"], [mount bin to use])
3501
3502if test "x$with_eeze_umount" = "xdetect";then
3503 AC_PATH_PROG([with_eeze_umount], [umount], [])
3504fi
3505AC_DEFINE_UNQUOTED([EEZE_UNMOUNT_BIN], ["$with_eeze_umount"], [umount bin to use])
3506
3507if test "x$with_eeze_eject" = "xdetect";then
3508 AC_PATH_PROG([with_eeze_eject], [eject], [])
3509fi
3510AC_DEFINE_UNQUOTED([EEZE_EJECT_BIN], ["$with_eeze_eject"], [eject bin to use])
3511
3512EFL_LIB_END_OPTIONAL([Eeze])
3513
3514AM_CONDITIONAL([EEZE_LIBMOUNT_AFTER_219],
3515 [test "x${have_libmount_new}" = "xyes"])
3516AM_CONDITIONAL([EEZE_LIBMOUNT_BEFORE_219],
3517 [test "x${have_libmount_old}" = "xyes"])
3518AM_CONDITIONAL([HAVE_EEZE_MOUNT], [test "x${have_eeze_mount}" = "xyes"])
3519AM_CONDITIONAL([HAVE_EEZE_TIZEN], [test "x${want_tizen}" = "xyes"])
3520#### End of Eeze
3521
3522
3523#### Ecore_Input
3524EFL_LIB_START([Ecore_Input])
3525
3526### Additional options to configure
3527
3528### Default values
3529
3530### Checks for programs
3531
3532## Compatibility layers
3533EFL_PLATFORM_DEPEND([ECORE_INPUT], [evil])
3534
3535### Checks for libraries
3536EFL_INTERNAL_DEPEND_PKG([ECORE_INPUT], [ecore])
3537EFL_INTERNAL_DEPEND_PKG([ECORE_INPUT], [eo])
3538EFL_INTERNAL_DEPEND_PKG([ECORE_INPUT], [efl])
3539EFL_INTERNAL_DEPEND_PKG([ECORE_INPUT], [eina])
3540
3541EFL_OPTIONAL_INTERNAL_DEPEND_PKG([ECORE_INPUT], [${efl_lib_optional_eeze}], [eeze])
3542
3543### Checks for header files
3544
3545### Checks for types
3546
3547### Checks for structures
3548
3549### Checks for compiler characteristics
3550
3551### Checks for linker characteristics
3552
3553### Checks for library functions
3554
3555EFL_LIB_END([Ecore_Input])
3556#### End of Ecore_Input
3557
3558
3559#### Ecore_Input_Evas
3560EFL_LIB_START([Ecore_Input_Evas])
3561
3562### Additional options to configure
3563
3564### Default values
3565
3566### Checks for programs
3567
3568## Compatibility layers
3569EFL_PLATFORM_DEPEND([ECORE_INPUT_EVAS], [evil])
3570
3571### Checks for libraries
3572EFL_INTERNAL_DEPEND_PKG([ECORE_INPUT_EVAS], [ecore-input])
3573EFL_INTERNAL_DEPEND_PKG([ECORE_INPUT_EVAS], [ecore])
3574EFL_INTERNAL_DEPEND_PKG([ECORE_INPUT_EVAS], [evas])
3575EFL_INTERNAL_DEPEND_PKG([ECORE_INPUT_EVAS], [efl])
3576EFL_INTERNAL_DEPEND_PKG([ECORE_INPUT_EVAS], [eo])
3577EFL_INTERNAL_DEPEND_PKG([ECORE_INPUT_EVAS], [eina])
3578EFL_INTERNAL_DEPEND_PKG([ECORE_INPUT_EVAS], [emile])
3579
3580### Checks for header files
3581
3582### Checks for types
3583
3584### Checks for structures
3585
3586### Checks for compiler characteristics
3587
3588### Checks for linker characteristics
3589
3590### Checks for library functions
3591
3592EFL_LIB_END([Ecore_Input_Evas])
3593#### End of Ecore_Input_Evas
3594
3595
3596#### Ecore_Cocoa
3597EFL_LIB_START_OPTIONAL([Ecore_Cocoa], [test "${have_cocoa}" = "yes"])
3598
3599### Additional options to configure
3600
3601### Default values
3602
3603### Checks for programs
3604
3605### Checks for libraries
3606EFL_INTERNAL_DEPEND_PKG([ECORE_COCOA], [ecore-input])
3607EFL_INTERNAL_DEPEND_PKG([ECORE_COCOA], [ecore])
3608EFL_INTERNAL_DEPEND_PKG([ECORE_COCOA], [eo])
3609EFL_INTERNAL_DEPEND_PKG([ECORE_COCOA], [efl])
3610EFL_INTERNAL_DEPEND_PKG([ECORE_COCOA], [eina])
3611
3612### Checks for header files
3613
3614EFL_ADD_LIBS([ECORE_COCOA], [-framework Cocoa])
3615
3616### Checks for types
3617
3618### Checks for structures
3619
3620### Checks for compiler characteristics
3621
3622### Checks for linker characteristics
3623
3624### Checks for library functions
3625
3626EFL_LIB_END_OPTIONAL([Ecore_Cocoa])
3627#### End of Ecore_Cocoa
3628
3629
3630#### Ecore_FB
3631EFL_LIB_START_OPTIONAL([Ecore_FB], [test "${want_fb}" = "yes"])
3632
3633### Additional options to configure
3634AC_ARG_ENABLE([tslib],
3635 [AS_HELP_STRING([--disable-tslib],[disable tslib for touchscreen events.])],
3636 [
3637 if test "x${enableval}" = "xyes" ; then
3638 want_tslib="yes"
3639 else
3640 want_tslib="no"
3641 fi
3642 ], [want_tslib="yes"])
3643
3644### Default values
3645
3646### Checks for programs
3647
3648### Checks for libraries
3649EFL_INTERNAL_DEPEND_PKG([ECORE_FB], [ecore])
3650EFL_INTERNAL_DEPEND_PKG([ECORE_FB], [ecore-input])
3651EFL_INTERNAL_DEPEND_PKG([ECORE_FB], [eo])
3652EFL_INTERNAL_DEPEND_PKG([ECORE_FB], [efl])
3653EFL_INTERNAL_DEPEND_PKG([ECORE_FB], [eina])
3654
3655EFL_OPTIONAL_DEPEND_PKG([ECORE_FB], [${want_tslib}], [TSLIB], [tslib])
3656EFL_ADD_FEATURE([ECORE_FB], [tslib])
3657
3658EFL_EVAL_PKGS([ECORE_FB])
3659
3660### Checks for header files
3661
3662have_ecore_fb="no"
3663AC_CHECK_HEADER([linux/fb.h],
3664 [AC_CHECK_HEADER([linux/input.h], [have_ecore_fb="yes"])])
3665if test "${have_ecore_fb}" = "no"; then
3666 AC_MSG_ERROR([Missing linux/input.h or linux/fb.h])
3667fi
3668
3669### Checks for types
3670
3671### Checks for structures
3672
3673### Checks for compiler characteristics
3674
3675### Checks for linker characteristics
3676
3677### Checks for library functions
3678
3679EFL_LIB_END_OPTIONAL([Ecore_FB])
3680#### End of Ecore_FB
3681
3682
3683#### Ecore_SDL
3684EFL_LIB_START_OPTIONAL([Ecore_SDL], [test "${want_sdl}" = "yes"])
3685
3686### Additional options to configure
3687
3688### Default values
3689
3690### Checks for programs
3691
3692### Checks for libraries
3693EFL_PLATFORM_DEPEND([ECORE_SDL], [all])
3694EFL_INTERNAL_DEPEND_PKG([ECORE_SDL], [ecore-input])
3695EFL_INTERNAL_DEPEND_PKG([ECORE_SDL], [ecore])
3696EFL_INTERNAL_DEPEND_PKG([ECORE_SDL], [eo])
3697EFL_INTERNAL_DEPEND_PKG([ECORE_SDL], [efl])
3698EFL_INTERNAL_DEPEND_PKG([ECORE_SDL], [eina])
3699
3700EFL_DEPEND_PKG([ECORE_SDL], [SDL], [sdl2 >= 2.0.0])
3701
3702EFL_EVAL_PKGS([ECORE_SDL])
3703
3704### Checks for header files
3705
3706### Checks for types
3707
3708### Checks for structures
3709
3710### Checks for compiler characteristics
3711
3712### Checks for linker characteristics
3713
3714### Checks for library functions
3715
3716EFL_LIB_END_OPTIONAL([Ecore_SDL])
3717#### End of Ecore_SDL
3718
3719
3720#### Ecore_Wayland
3721EFL_LIB_START_OPTIONAL([Ecore_Wayland], [test "${want_ecore_wayland}" = "yes"])
3722
3723if test "x${want_wayland_ivi_shell}" = "xyes" ; then
3724 AC_DEFINE(USE_IVI_SHELL, 1, [Ecore_Wayland IVI-Shell Support])
3725fi
3726
3727### Additional options to configure
3728
3729### Default values
3730
3731### Checks for programs
3732
3733### Checks for libraries
3734EFL_INTERNAL_DEPEND_PKG([ECORE_WAYLAND], [ecore-input])
3735EFL_INTERNAL_DEPEND_PKG([ECORE_WAYLAND], [ecore])
3736EFL_INTERNAL_DEPEND_PKG([ECORE_WAYLAND], [eo])
3737EFL_INTERNAL_DEPEND_PKG([ECORE_WAYLAND], [efl])
3738EFL_INTERNAL_DEPEND_PKG([ECORE_WAYLAND], [eina])
3739
3740EFL_DEPEND_PKG([ECORE_WAYLAND], [WAYLAND],
3741 [wayland-client >= 1.8.0 wayland-cursor >= 1.8.0 xkbcommon >= 0.5.0 uuid])
3742
3743EFL_EVAL_PKGS([ECORE_WAYLAND])
3744
3745### Checks for header files
3746
3747### Checks for types
3748
3749### Checks for structures
3750
3751### Checks for compiler characteristics
3752
3753### Checks for linker characteristics
3754
3755### Checks for library functions
3756
3757EFL_LIB_END_OPTIONAL([Ecore_Wayland])
3758#### End of Ecore_Wayland
3759
3760#### Ecore_Wl2
3761EFL_LIB_START_OPTIONAL([Ecore_Wl2], [test "${want_wayland}" = "yes"])
3762
3763if test "x${want_wayland_ivi_shell}" = "xyes" ; then
3764 AC_DEFINE(USE_IVI_SHELL, 1, [Ecore_Wl2 IVI-Shell Support])
3765fi
3766
3767### Additional options to configure
3768
3769### Default values
3770
3771### Checks for programs
3772
3773### Checks for libraries
3774EFL_INTERNAL_DEPEND_PKG([ECORE_WL2], [ecore-input])
3775EFL_INTERNAL_DEPEND_PKG([ECORE_WL2], [ecore])
3776EFL_INTERNAL_DEPEND_PKG([ECORE_WL2], [eo])
3777EFL_INTERNAL_DEPEND_PKG([ECORE_WL2], [efl])
3778EFL_INTERNAL_DEPEND_PKG([ECORE_WL2], [eina])
3779
3780EFL_DEPEND_PKG([ECORE_WL2], [WAYLAND],
3781 [wayland-server >= 1.11.0 wayland-client >= 1.11.0 xkbcommon >= 0.6.0])
3782
3783EFL_EVAL_PKGS([ECORE_WL2])
3784
3785### Checks for header files
3786
3787### Checks for types
3788
3789### Checks for structures
3790
3791### Checks for compiler characteristics
3792
3793### Checks for linker characteristics
3794
3795### Checks for library functions
3796
3797EFL_LIB_END_OPTIONAL([Ecore_Wl2])
3798#### End of Ecore_Wl2
3799
3800#### Efl_Wl
3801EFL_LIB_START_OPTIONAL([Efl_Wl], [test -n "${ECORE_WL2_CFLAGS}"])
3802
3803### Additional options to configure
3804
3805### Default values
3806
3807### Checks for programs
3808
3809### Checks for libraries
3810EFL_INTERNAL_DEPEND_PKG([EFL_WL], [ecore-wl2])
3811EFL_INTERNAL_DEPEND_PKG([EFL_WL], [ecore-input])
3812EFL_INTERNAL_DEPEND_PKG([EFL_WL], [ecore])
3813EFL_INTERNAL_DEPEND_PKG([EFL_WL], [ecore-evas])
3814EFL_INTERNAL_DEPEND_PKG([EFL_WL], [evas])
3815EFL_INTERNAL_DEPEND_PKG([EFL_WL], [emile])
3816EFL_INTERNAL_DEPEND_PKG([EFL_WL], [eo])
3817EFL_INTERNAL_DEPEND_PKG([EFL_WL], [efl])
3818EFL_INTERNAL_DEPEND_PKG([EFL_WL], [eina])
3819EFL_OPTIONAL_INTERNAL_DEPEND_PKG([EFL_WL], [${want_x11_any}], [ecore_x])
3820
3821EFL_DEPEND_PKG([EFL_WL], [WAYLAND],
3822 [wayland-server >= 1.11.0 xkbcommon >= 0.6.0])
3823EFL_OPTIONAL_DEPEND_PKG([EFL_WL], [${want_x11_any}], [XKBCOMMONX11], [xkbcommon-x11])
3824
3825EFL_EVAL_PKGS([EFL_WL])
3826
3827### Checks for header files
3828
3829### Checks for types
3830
3831### Checks for structures
3832
3833### Checks for compiler characteristics
3834
3835### Checks for linker characteristics
3836
3837### Checks for library functions
3838
3839EFL_LIB_END_OPTIONAL([Efl_Wl])
3840#### End of Efl_Wl
3841
3842#### Eldbus
3843EFL_LIB_START([Eldbus])
3844
3845### Additional options to configure
3846
3847### Default values
3848
3849### Checks for programs
3850
3851## Compatibility layers
3852EFL_PLATFORM_DEPEND([ELDBUS], [evil])
3853
3854### Checks for libraries
3855EFL_INTERNAL_DEPEND_PKG([ELDBUS], [ecore])
3856EFL_INTERNAL_DEPEND_PKG([ELDBUS], [efl])
3857EFL_INTERNAL_DEPEND_PKG([ELDBUS], [eo])
3858EFL_INTERNAL_DEPEND_PKG([ELDBUS], [eina])
3859
3860EFL_DEPEND_PKG([ELDBUS], [DBUS], [dbus-1])
3861
3862EFL_EVAL_PKGS([ELDBUS])
3863
3864### Checks for header files
3865
3866### Checks for types
3867
3868### Checks for structures
3869
3870### Checks for compiler characteristics
3871
3872### Checks for linker characteristics
3873
3874### Checks for library functions
3875
3876EFL_LIB_END([Eldbus])
3877#### End of Eldbus
3878
3879
3880
3881#### Ecore_Drm
3882EFL_LIB_START_OPTIONAL([Ecore_Drm], [test "${want_ecore_drm}" = "yes"])
3883
3884### Additional options to configure
3885SUID_CFLAGS=-fPIE
3886SUID_LDFLAGS=-pie
3887AC_SUBST([SUID_CFLAGS])
3888AC_SUBST([SUID_LDFLAGS])
3889
3890### Default values
3891
3892### Checks for programs
3893
3894### Checks for libraries
3895EFL_INTERNAL_DEPEND_PKG([ECORE_DRM], [ecore])
3896EFL_INTERNAL_DEPEND_PKG([ECORE_DRM], [ecore-input])
3897EFL_INTERNAL_DEPEND_PKG([ECORE_DRM], [eldbus])
3898EFL_INTERNAL_DEPEND_PKG([ECORE_DRM], [eeze])
3899EFL_INTERNAL_DEPEND_PKG([ECORE_DRM], [eo])
3900EFL_INTERNAL_DEPEND_PKG([ECORE_DRM], [efl])
3901EFL_INTERNAL_DEPEND_PKG([ECORE_DRM], [eina])
3902
3903EFL_DEPEND_PKG([ECORE_DRM], [DRM], [libdrm >= 2.4 xkbcommon >= 0.3.0 gbm])
3904EFL_DEPEND_PKG([ECORE_DRM], [LIBINPUT], [libinput >= 1.6.0])
3905
3906EFL_ADD_LIBS([ECORE_DRM], [-lm])
3907
3908EFL_EVAL_PKGS([ECORE_DRM])
3909
3910### Checks for header files
3911
3912### Checks for types
3913
3914### Checks for structures
3915
3916### Checks for compiler characteristics
3917
3918### Checks for linker characteristics
3919
3920### Checks for library functions
3921
3922EFL_LIB_END_OPTIONAL([Ecore_Drm])
3923#### End of Ecore_Drm
3924
3925
3926#### Elput
3927EFL_LIB_START_OPTIONAL([Elput], [test "${want_elput}" = "yes"])
3928
3929### Additional options to configure
3930SUID_CFLAGS=-fPIE
3931SUID_LDFLAGS=-pie
3932AC_SUBST([SUID_CFLAGS])
3933AC_SUBST([SUID_LDFLAGS])
3934
3935### Default values
3936
3937### Checks for programs
3938
3939### Checks for libraries
3940EFL_INTERNAL_DEPEND_PKG([ELPUT], [ecore])
3941EFL_INTERNAL_DEPEND_PKG([ELPUT], [ecore-input])
3942EFL_INTERNAL_DEPEND_PKG([ELPUT], [eldbus])
3943EFL_INTERNAL_DEPEND_PKG([ELPUT], [eeze])
3944EFL_INTERNAL_DEPEND_PKG([ELPUT], [eo])
3945EFL_INTERNAL_DEPEND_PKG([ELPUT], [eina])
3946
3947EFL_DEPEND_PKG([ELPUT], [LIBINPUT], [libinput >= 1.7.0 xkbcommon >= 0.3.0 libudev])
3948
3949AC_ARG_ENABLE([elogind],
3950 [AS_HELP_STRING([--enable-elogind],[enable elogind support.@<:@default=disabled@:>@])],
3951 [
3952 if test "x${enableval}" = "xyes" ; then
3953 want_elogind="yes"
3954 else
3955 want_elogind="no"
3956 fi
3957 ], [
3958 want_elogind="no"
3959 ])
3960
3961EFL_OPTIONAL_DEPEND_PKG([ELPUT], [${want_systemd}], [SYSTEMD], [libsystemd])
3962EFL_OPTIONAL_DEPEND_PKG([ELPUT], [${want_elogind}], [ELOGIND], [libelogind])
3963EFL_ADD_FEATURE([ELPUT], [systemd-logind], [${want_systemd}])
3964EFL_ADD_FEATURE([ELPUT], [elogind], [${want_elogind}])
3965
3966EFL_ADD_LIBS([ELPUT], [-lm])
3967
3968
3969EFL_EVAL_PKGS([ELPUT])
3970
3971### Checks for header files
3972
3973### Checks for types
3974
3975### Checks for structures
3976
3977### Checks for compiler characteristics
3978
3979### Checks for linker characteristics
3980
3981### Checks for library functions
3982
3983EFL_LIB_END_OPTIONAL([Elput])
3984#### End of Elput
3985
3986#### Ecore_Drm2
3987EFL_LIB_START_OPTIONAL([Ecore_Drm2], [test "${want_drm}" = "yes"])
3988
3989### Additional options to configure
3990SUID_CFLAGS=-fPIE
3991SUID_LDFLAGS=-pie
3992AC_SUBST([SUID_CFLAGS])
3993AC_SUBST([SUID_LDFLAGS])
3994
3995### Default values
3996
3997### Checks for programs
3998
3999### Checks for libraries
4000EFL_INTERNAL_DEPEND_PKG([ECORE_DRM2], [eo])
4001EFL_INTERNAL_DEPEND_PKG([ECORE_DRM2], [efl])
4002EFL_INTERNAL_DEPEND_PKG([ECORE_DRM2], [eina])
4003EFL_INTERNAL_DEPEND_PKG([ECORE_DRM2], [ecore])
4004EFL_INTERNAL_DEPEND_PKG([ECORE_DRM2], [elput])
4005EFL_INTERNAL_DEPEND_PKG([ECORE_DRM2], [eeze])
4006
4007EFL_DEPEND_PKG([ECORE_DRM2], [DRM], [gbm])
4008
4009EFL_ADD_LIBS([ECORE_DRM2], [-lm])
4010EFL_ADD_LIBS([ECORE_DRM2], [-ldl])
4011
4012EFL_EVAL_PKGS([ECORE_DRM2])
4013
4014### Checks for header files
4015
4016### Checks for types
4017
4018### Checks for structures
4019
4020### Checks for compiler characteristics
4021
4022### Checks for linker characteristics
4023
4024### Checks for library functions
4025
4026EFL_LIB_END_OPTIONAL([Ecore_Drm2])
4027#### End of Ecore_Drm2
4028
4029
4030#### Ecore_Audio
4031
4032AC_ARG_ENABLE([audio],
4033 [AS_HELP_STRING([--disable-audio],[disable audio support. @<:@default=enabled@:>@])],
4034 [
4035 if test "x${enableval}" = "xyes" ; then
4036 want_audio="yes"
4037 else
4038 want_audio="no"
4039 CFOPT_WARNING="xyes"
4040 fi
4041 ],
4042 [want_audio="yes"])
4043
4044EFL_LIB_START_OPTIONAL([Ecore_Audio], [test "${want_audio}" = "yes"])
4045
4046### Additional options to configure
4047
4048# ALSA support is still not there, thus no option for it yet.
4049want_alsa="no"
4050
4051# sndfile is mandatory otherwise it won't read from/write to files.
4052# TODO: if confirmed sndfile is mandatory, remove this variable
4053# TODO: and the EFL_OPTIONAL_DEPEND_PKG(), use EFL_DEPEND_PKG()
4054want_sndfile="yes"
4055
4056want_wasapiaudio="no"
4057
4058AC_ARG_ENABLE([pulseaudio],
4059 [AS_HELP_STRING([--disable-pulseaudio],[disable pulseaudio sound support. @<:@default=enabled@:>@])],
4060 [
4061 if test "x${enableval}" = "xyes" ; then
4062 want_pulseaudio="yes"
4063 else
4064 want_pulseaudio="no"
4065 if test "x${have_win32}" = "xyes" ; then
4066 want_wasapiaudio="yes"
4067 else
4068 want_wasapiaudio="no"
4069 CFOPT_WARNING="xyes"
4070 fi
4071 fi
4072 ],
4073 [want_pulseaudio="yes"])
4074
4075### Default values
4076
4077### Checks for programs
4078
4079## Compatibility layers
4080EFL_PLATFORM_DEPEND([ECORE_AUDIO], [evil])
4081
4082### Checks for libraries
4083EFL_INTERNAL_DEPEND_PKG([ECORE_AUDIO], [ecore])
4084EFL_INTERNAL_DEPEND_PKG([ECORE_AUDIO], [eet])
4085EFL_INTERNAL_DEPEND_PKG([ECORE_AUDIO], [eo])
4086EFL_INTERNAL_DEPEND_PKG([ECORE_AUDIO], [efl])
4087EFL_INTERNAL_DEPEND_PKG([ECORE_AUDIO], [eina])
4088EFL_INTERNAL_DEPEND_PKG([ECORE_AUDIO], [emile])
4089
4090EFL_ADD_LIBS([ECORE_AUDIO], [-lm])
4091
4092if test "x${want_alsa}" = "xyes" ; then
4093 PKG_CHECK_MODULES([ECORE_AUDIO_ALSA], [alsa])
4094 AC_DEFINE([HAVE_ALSA], [1], [Alsa support])
4095fi
4096if test "x${want_pulseaudio}" = "xyes" ; then
4097 PKG_CHECK_MODULES([ECORE_AUDIO_PULSE], [libpulse])
4098 AC_DEFINE([HAVE_PULSE], [1], [Pulseaudio support])
4099fi
4100if test "x${want_sndfile}" = "xyes" ; then
4101 PKG_CHECK_MODULES([ECORE_AUDIO_SNDFILE], [sndfile])
4102 AC_DEFINE([HAVE_SNDFILE], [1], [Sndfile support])
4103fi
4104if test "x${want_wasapiaudio}" = "xyes" ; then
4105 EFL_ADD_LIBS([ECORE_AUDIO], [-luuid -lwinmm -lksuser])
4106fi
4107
4108dnl EFL_OPTIONAL_DEPEND_PKG([ECORE_AUDIO_ALSA], [${want_alsa}], [ALSA], [alsa])
4109dnl EFL_OPTIONAL_DEPEND_PKG([ECORE_AUDIO_PULSE], [${want_pulseaudio}], [PULSE], [libpulse])
4110dnl EFL_OPTIONAL_DEPEND_PKG([ECORE_AUDIO_SNDFILE], [${want_sndfile}], [SNDFILE], [sndfile])
4111
4112EFL_EVAL_PKGS([ECORE_AUDIO])
4113
4114EFL_ADD_FEATURE([ECORE_AUDIO], [alsa])
4115EFL_ADD_FEATURE([ECORE_AUDIO], [pulseaudio])
4116EFL_ADD_FEATURE([ECORE_AUDIO], [sndfile])
4117EFL_ADD_FEATURE([ECORE_AUDIO], [wasapiaudio])
4118
4119### Checks for header files
4120
4121### Checks for types
4122
4123### Checks for structures
4124
4125### Checks for compiler characteristics
4126
4127### Checks for linker characteristics
4128
4129### Checks for library functions
4130
4131EFL_LIB_END_OPTIONAL([Ecore_Audio])
4132AM_CONDITIONAL([HAVE_ECORE_AUDIO_PULSE], [test "x${want_pulseaudio}" = "xyes"])
4133AM_CONDITIONAL([HAVE_ECORE_AUDIO_SNDFILE], [test "x${want_sndfile}" = "xyes"])
4134
4135#### End of Ecore_Audio
4136
4137#### Ecore Audio CXX
4138EFL_LIB_START([Ecore_Audio_Cxx])
4139
4140EFL_EVAL_PKGS([ECORE_AUDIO_CXX])
4141
4142EFL_LIB_END([Ecore_Audio_Cxx])
4143#### End of Ecore Audio CXX
4144
4145#### Ecore_Win32
4146EFL_LIB_START_OPTIONAL([Ecore_Win32], [test "${have_win32}" = "yes"])
4147
4148### Additional options to configure
4149
4150### Default values
4151
4152### Checks for programs
4153
4154### Checks for libraries
4155EFL_PLATFORM_DEPEND([ECORE_WIN32], [evil])
4156EFL_INTERNAL_DEPEND_PKG([ECORE_WIN32], [ecore-input])
4157EFL_INTERNAL_DEPEND_PKG([ECORE_WIN32], [ecore])
4158EFL_INTERNAL_DEPEND_PKG([ECORE_WIN32], [eo])
4159EFL_INTERNAL_DEPEND_PKG([ECORE_WIN32], [efl])
4160EFL_INTERNAL_DEPEND_PKG([ECORE_WIN32], [eina])
4161
4162EFL_ADD_LIBS([ECORE_WIN32], [-lole32 -lgdi32])
4163AC_SUBST([ECORE_WIN32_LIBS])
4164
4165### Checks for header files