1 ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
2 ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
3 m4_define([v_maj], [1])
4 m4_define([v_min], [1])
5 m4_define([v_mic], [99])
6 m4_define([v_rev], m4_esyscmd([(svnversion "${SVN_REPO_PATH:-.}" | grep -v '\(export\|Unversioned directory\)' || echo 0) | awk -F : '{printf("%s\n", $1);}' | tr -d ' :MSP\n']))
7 m4_if(v_rev, [0], [m4_define([v_rev], m4_esyscmd([git log 2> /dev/null | (grep -m1 git-svn-id || echo 0) | sed -e 's/.*@\([0-9]*\).*/\1/' | tr -d '\n']))])
8 ##-- When released, remove the dnl on the below line
9 dnl m4_undefine([v_rev])
10 ##-- When doing snapshots - change soname. remove dnl on below line
11 dnl m4_define([relname], [ver-pre-svn-07])
12 dnl m4_define([v_rel], [-release relname])
13 ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
14 m4_ifdef([v_rev], [m4_define([v_ver], [v_maj.v_min.v_mic.v_rev])], [m4_define([v_ver], [v_maj.v_min.v_mic])])
15 m4_define([lt_cur], m4_eval(v_maj + v_min))
16 m4_define([lt_rev], v_mic)
17 m4_define([lt_age], v_min)
18 ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
19 ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
21 AC_INIT([edje], [v_ver], [enlightenment-devel@lists.sourceforge.net])
23 AC_CONFIG_SRCDIR([configure.ac])
24 AC_CONFIG_MACRO_DIR([m4])
26 AC_CONFIG_HEADERS([config.h])
28 #ifndef EFL_CONFIG_H__
29 #define EFL_CONFIG_H__
32 #endif /* EFL_CONFIG_H__ */
35 AM_INIT_AUTOMAKE([1.6 dist-bzip2])
36 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
39 define([AC_LIBTOOL_LANG_CXX_CONFIG], [:])dnl
40 define([AC_LIBTOOL_LANG_F77_CONFIG], [:])dnl
43 ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
44 ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
45 m4_ifdef([v_rev], , [m4_define([v_rev], [0])])
46 m4_ifdef([v_rel], , [m4_define([v_rel], [])])
47 AC_DEFINE_UNQUOTED(VMAJ, [v_maj], [Major version])
48 AC_DEFINE_UNQUOTED(VMIN, [v_min], [Minor version])
49 AC_DEFINE_UNQUOTED(VMIC, [v_mic], [Micro version])
50 AC_DEFINE_UNQUOTED(VREV, [v_rev], [Revison])
51 version_info="lt_cur:lt_rev:lt_age"
53 AC_SUBST(version_info)
54 AC_SUBST(release_info)
55 ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
56 ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
60 AC_DEFINE_UNQUOTED([SHARED_LIB_SUFFIX], ["$shrext_cmds"], [Suffix for shared objects])
62 ### Default options with respect to host
69 MODULE_ARCH="$host_os-$host_cpu"
74 MODULE_ARCH="$host_os-$host_cpu-v_maj.0.0"
83 AC_DEFINE_UNQUOTED(MODULE_ARCH, "${MODULE_ARCH}", "Module architecture")
85 ### Additional options to configure
87 AC_ARG_ENABLE([amalgamation],
88 [AC_HELP_STRING([--enable-amalgamation], [enable generation of one single file with all source code in it, helps compiler optimizations.])],
89 [if test "x${enableval}" = "xyes"; then
95 [do_amalgamation="no"]
97 AM_CONDITIONAL([EDJE_AMALGAMATION], [test "x${do_amalgamation}" = "xyes"])
99 EFL_WITH_BIN([edje], [edje-cc], [edje_cc])
101 EFL_ENABLE_BIN([edje-cc])
102 EFL_ENABLE_BIN([edje-decc])
103 EFL_ENABLE_BIN([edje-recc])
104 EFL_ENABLE_BIN([edje-player])
105 EFL_ENABLE_BIN([edje-inspector])
106 EFL_ENABLE_BIN([edje-external-inspector])
108 # Optional EDJE_PROGRAM_CACHE (use much more ram, but increase speed in some cases)
109 want_edje_program_cache="no"
111 AC_ARG_ENABLE([edje-program-cache],
113 [--enable-edje-program-cache],
114 [enable EDJE_PROGRAM_CACHE support. [[default=disabled]]]
116 [want_edje_program_cache=$enableval]
118 AM_CONDITIONAL([EDJE_PROGRAM_CACHE], [test "x${want_edje_program_cache}" = "xyes"])
120 if test "x${want_edje_program_cache}" = "xyes" ; then
121 AC_DEFINE([EDJE_PROGRAM_CACHE], [1], [Cache result of program glob matches - this uses up extra ram with the gain of faster program matching])
124 # Optional EDJE_CALC_CACHE (use more ram, but increase speed by reducing the need to recalculate static stuff)
125 want_edje_calc_cache="yes"
127 AC_ARG_ENABLE([edje-calc-cache],
129 [--enable-edje-calc-cache],
130 [enable EDJE_CALC_CACHE support. [[default=disabled]]]
132 [want_edje_calc_cache=$enableval]
134 AM_CONDITIONAL([EDJE_CALC_CACHE], [test "x${want_edje_calc_cache}" = "xyes"])
136 if test "x${want_edje_calc_cache}" = "xyes" ; then
137 AC_DEFINE([EDJE_CALC_CACHE], [1], [Cache result of edje_part_recalc - this uses up extra ram with the gain of reducing CPU usage when edje object are not resized])
140 # Enable Fixed Point use
141 want_fixed_point="no"
143 AC_ARG_ENABLE([fixed-point],
145 [--enable-fixed-point],
146 [reduce use of FPU by using Fixed Point provided by Eina and Eet, [[default=disabled]]]
148 [want_fixed_point=$enableval]
150 AM_CONDITIONAL([BUILD_EDJE_FP], [test "x${want_fixed_point}" = "xyes"])
152 if test "x${want_fixed_point}" = "xyes" ; then
153 AC_DEFINE([BUILD_EDJE_FP], [1], [Use Fixed Point instead of FPU])
158 [AC_HELP_STRING([--with-vim=DIR], [Location of Vim data files [[autodetect]]])],
160 if test -d "${withval}"; then
166 if test "x${vimdir}" = "x" ; then
167 if test -d "${prefix}/share/vim"; then
168 vimdir="${prefix}/share/vim"
169 elif test -d "/usr/share/vim"; then
170 vimdir="/usr/share/vim"
171 elif test -d "/usr/local/share/vim"; then
172 vimdir="/usr/local/share/vim"
173 elif test -d "/opt/share/vim"; then
174 vimdir="/opt/share/vim"
180 AC_MSG_CHECKING([for location of Vim data files])
182 if test "${install_vim}" = "yes"; then
183 AC_MSG_RESULT([$vimdir])
185 AC_MSG_RESULT([Not found, EDC syntax file will not be installed])
190 ### Checks for programs
193 # doxygen program for documentation building
195 EFL_CHECK_DOXYGEN([build_doc="yes"], [build_doc="no"])
199 AM_PATH_PYTHON([2.5], , [:])
200 AM_CONDITIONAL([HAVE_PYTHON], [test "$PYTHON" != : ])
206 # Check whether pkg-config supports Requires.private
208 if $PKG_CONFIG --atleast-pkgconfig-version 0.22; then
209 pkgconfig_requires_private="Requires.private"
211 pkgconfig_requires_private="Requires"
213 AC_SUBST(pkgconfig_requires_private)
216 ### Checks for libraries
218 # Evil library for compilation on Windows
223 PKG_CHECK_MODULES([EVIL], [evil >= 1.0.0])
224 AC_DEFINE([HAVE_EVIL], [1], [Set to 1 if Evil library is installed])
225 requirement_edje="evil ${requirement_edje}"
226 EFL_EDJE_BUILD="-DEFL_EDJE_BUILD"
229 AC_SUBST(EFL_EDJE_BUILD)
231 # Dependencies for the library
233 # Lua pkg-config hack for different naming conventions
237 PKG_CHECK_MODULES([LUA], [lua >= 5.1.0], requirement_lua="lua",
238 [PKG_CHECK_MODULES([LUA], [lua5.1 >= 5.1.0], requirement_lua="lua5.1",
239 [PKG_CHECK_MODULES([LUA], [lua-5.1 >= 5.1.0], requirement_lua="lua-5.1",
240 [PKG_CHECK_MODULES([LUA], [lua51 >= 5.1.0], requirement_lua="lua51",
241 [have_lua="no"])])])])
243 if test "x${have_lua}" = "xno" ; then
244 AC_MSG_CHECKING([whether lua_newstate() is in liblua])
245 AC_CHECK_LIB([lua], [lua_newstate],
251 AC_MSG_RESULT([${have_lua}])
255 if test "x${have_lua}" = "xno" ; then
256 AC_MSG_ERROR([Cannot find lua library. Be sure that you have installed it and set CFLAGS and LDFLAGS correctly])
259 PKG_CHECK_MODULES([MINIMAL],
265 PKG_CHECK_MODULES([EDJE],
276 EDJE_LIBS="${EDJE_LIBS} ${LUA_LIBS} ${lua_libs}"
277 EDJE_CFLAGS="${EDJE_CFLAGS} ${LUA_CFLAGS}"
279 requirement_edje="embryo >= 1.1.0 ecore-evas >= 1.1.0 ecore >= 1.1.0 evas >= 1.1.0 eet >= 1.5.0 eina >= 1.1.0 ${requirement_edje}"
280 requirement_edje="${requirement_lua} ${requirement_edje}"
283 PKG_CHECK_MODULES([ECORE_IMF],
286 ecore-imf-evas >= 1.1.0
289 AC_DEFINE([HAVE_ECORE_IMF], [1], [Input Method Support for Edje Entry])
291 requirement_edje="ecore-imf-evas >= 1.1.0 ecore-imf >= 1.1.0 ${requirement_edje}"
293 [have_ecore_imf="no"])
295 # Enable Multisense use
296 want_multisense="yes"
297 AC_ARG_ENABLE([multisense],
299 [--enable-multisense],
300 [multisense provides sound. tone and haptic effects support, [[default=disabled]]]
302 [want_multisense=$enableval]
304 AM_CONDITIONAL([ENABLE_MULTISENSE], [test "x${want_multisense}" = "xyes"])
309 AC_ARG_ENABLE([sndfile],
310 [AC_HELP_STRING([--disable-sndfile], [disable sndfile support. @<:@default=detect@:>@])],
311 [want_sndfile=$enableval], [])
313 if test "x${want_multisense}" = "xyes" -a "x$want_sndfile" != "xno"; then
315 PKG_CHECK_MODULES([SNDFILE],
318 AC_DEFINE(HAVE_LIBSNDFILE, 1, [sndfile support for Edje])
320 requirement_edje="sndfile >= 1.0.21 ${requirement_edje}"
322 [have_sndfile="no"; want_multisense="no"]
325 if test "x$want_sndfile" = "xyes" -a "x$have_sndfile" = "xno"; then
326 AC_MSG_ERROR([sndfile support requested, but not found by pkg-config.])
329 AM_CONDITIONAL([HAVE_LIBSNDFILE], [test "x${have_sndfile}" = "xyes"])
334 AC_ARG_ENABLE([remix],
335 [AC_HELP_STRING([--disable-remix], [disable remix support. @<:@default=detect@:>@])],
336 [want_libremix=$enableval], [])
338 if test "x${want_multisense}" = "xyes" -a "x$want_libremix" != "xno"; then
339 PKG_CHECK_MODULES([REMIX],
342 AC_DEFINE(HAVE_LIBREMIX, 1, [remix support for Edje])
344 requirement_edje="remix >= 0.2.4 ${requirement_edje}"
345 AC_DEFINE(__REMIX_PLUGIN__, 1, "Set to REMIX Plugin type")
346 REMIX_PLUGIN_DIR=`pkg-config --variable=libdir remix`"/remix"
347 AC_SUBST(REMIX_PLUGIN_DIR)
348 AC_DEFINE_UNQUOTED(REMIX_PLUGIN_DIR, "$REMIX_PLUGIN_DIR", [Set the remix plugin directory])
350 [have_libremix="no"; want_multisense="no"]
353 if test "x$want_libremix" = "xyes" -a "x$have_libremix" = "xno"; then
354 AC_MSG_ERROR([remix support requested, but not found by pkg-config.])
357 AM_CONDITIONAL([HAVE_LIBREMIX], [test "x${have_libremix}" = "xyes"])
362 AC_ARG_ENABLE([vorbisenc],
363 [AC_HELP_STRING([--disable-vorbis], [disable ogg-vorbis support. @<:@default=detect@:>@])],
364 [want_vorbis=$enableval], [])
366 if test "x${want_multisense}" = "xyes" -a "x$want_vorbis" != "xno"; then
367 PKG_CHECK_MODULES([VORBISENC],
374 AC_DEFINE(HAVE_VORBIS, 1, [vorbis support for Edje])
376 requirement_edje="ogg >= 1.1.4 vorbis >= 1.2.3 vorbisenc >= 1.2.3 ${requirement_edje}"
378 [have_vorbis="no"; want_multisense="no"]
381 if test "x$want_vorbis" = "xyes" -a "x$have_vorbis" = "xno"; then
382 AC_MSG_ERROR([vorbisenc support requested, but not found by pkg-config.])
389 AC_ARG_ENABLE([flac],
390 [AC_HELP_STRING([--disable-alsa], [disable alsa support. @<:@default=detect@:>@])],
391 [want_alsa_lib=$enableval], [])
393 if test "x${want_multisense}" = "xyes" -a "x$want_alsa_lib" != "xno"; then
394 PKG_CHECK_MODULES([ALSA],
399 AC_DEFINE(HAVE_LIBALSA, 1, [ALSA support for Edje])
401 requirement_edje="alsa >= 1.0.21 ${requirement_edje}"
403 [have_alsa_lib="no"; want_multisense="no"]
406 if test "x$want_alsa_lib" = "xyes" -a "x$have_alsa_lib" = "xno"; then
407 AC_MSG_ERROR([alsa support requested, but not found by pkg-config.])
410 AM_CONDITIONAL([HAVE_LIBALSA], [test "x${have_alsa_lib}" = "xyes"])
416 AC_ARG_ENABLE([flac],
417 [AC_HELP_STRING([--disable-flac], [disable flac support. @<:@default=detect@:>@])],
418 [want_flac_lib=$enableval], [])
420 if test "x${want_multisense}" = "xyes" -a "x$want_flac_lib" != "xno"; then
421 PKG_CHECK_MODULES([FLAC],
426 AC_DEFINE(HAVE_LIBFLAC, 1, [flac support for Edje])
428 # disabled because this adds flac include dirs to cflags... and
429 # FLAC has an assert.h in its include dirs that ends up
430 # overriding the system assert.h and thus causes all sorts of
432 #requirement_edje="flac >= 1.2.1 ${requirement_edje}"
434 [have_flac_lib="no"; want_multisense="no"]
436 if test "x$want_flac_lib" = "xyes" -a "x$have_flac_lib" = "xno"; then
437 AC_MSG_ERROR([flac support requested, but not found by pkg-config.])
441 if test "x${want_multisense}" = "xyes" ; then
442 AC_DEFINE([ENABLE_MULTISENSE], [1], [Use Multisense])
445 # Dependencies for the binaries
447 if test "x$have_edje_cc" = "xyes"; then
448 PKG_CHECK_MODULES([EDJE_CC], [ecore-file >= 1.1.0 ecore-evas >= 1.1.0 ecore >= 1.1.0 evas >= 1.1.0 eet >= 1.5.0 eina >= 1.1.0])
449 EDJE_CC_LIBS="${EDJE_CC_LIBS} ${LUA_LIBS} ${lua_libs}"
452 AM_CONDITIONAL([BUILD_EPP], [test "x$have_edje_cc" = "xyes"])
454 if test "x$have_edje_decc" = "xyes"; then
455 PKG_CHECK_MODULES([EDJE_DECC], [ecore-file >= 1.1.0 ecore-evas >= 1.1.0 ecore >= 1.1.0 evas >= 1.1.0 eet >= 1.5.0 eina >= 1.1.0])
458 if test "x$have_edje_player" = "xyes"; then
459 PKG_CHECK_MODULES([EDJE_PLAYER], [ecore-evas >= 1.1.0 ecore >= 1.1.0 evas >= 1.1.0 eina >= 1.1.0])
462 if test "x$have_edje_inspector" = "xyes"; then
463 PKG_CHECK_MODULES([EDJE_INSPECTOR], [ecore-evas >= 1.1.0 ecore >= 1.1.0 evas >= 1.1.0 eina >= 1.1.0])
466 if test "x$have_edje_external_inspector" = "xyes"; then
467 PKG_CHECK_MODULES([EDJE_EXTERNAL_INSPECTOR], [ecore >= 1.1.0 evas >= 1.1.0 eina >= 1.1.0])
471 ### Checks for header files
472 AC_CHECK_HEADERS([locale.h sys/resource.h])
480 ### Checks for structures
483 ### Checks for compiler characteristics
492 EDJE_CFLAGS="${EDJE_CFLAGS} -D_WIN32_WCE=0x0420"
495 EDJE_CFLAGS="${EDJE_CFLAGS} -mwin32 -D_WIN32_WCE=0x0420"
500 ### Checks for linker characteristics
502 lt_enable_auto_import=""
505 lt_enable_auto_import="-Wl,--enable-auto-import"
508 AC_SUBST(lt_enable_auto_import)
511 ### Checks for library functions
519 AC_DEFINE([HAVE_REALPATH], [1], [Define to 1 if you have the `realpath' function.])
522 AC_CHECK_FUNCS([realpath])
526 ### Unit tests, coverage and benchmarking
528 EFL_CHECK_TESTS([enable_tests="yes"], [enable_tests="no"])
530 EFL_CHECK_COVERAGE([${enable_tests}], [enable_coverage="yes"], [enable_coverage="no"])
531 EDJE_CFLAGS="${EDJE_CFLAGS} ${EFL_COVERAGE_CFLAGS}"
532 EDJE_LIBS="${EDJE_LIBS} ${EFL_COVERAGE_LIBS}"
533 if test "x$enable_coverage" = "xyes" ; then
534 EDJE_CFLAGS="${EDJE_CFLAGS} ${EFL_DEBUG_CFLAGS}"
540 AC_ARG_ENABLE([build-examples],
541 AC_HELP_STRING([--enable-build-examples],
542 [Enable building examples. This requires extra denpendencies. If you don't have them installed yet, don't build with this option or it will fail. Build again when you have it, overriding the previous installation). @<:@default==disabled@:>@]),
544 if test "x${enableval}" = "xyes" ; then
550 [build_examples="no"])
551 AM_CONDITIONAL([BUILD_EXAMPLES], [test "x${build_examples}" = "xyes"])
553 AC_SUBST(requirement_edje)
560 data/include/Makefile
568 src/modules/alsa_snd_player/Makefile
569 src/modules/eet_snd_reader/Makefile
570 src/modules/multisense_factory/Makefile
573 src/examples/Makefile
577 #####################################################################
583 echo "------------------------------------------------------------------------"
584 echo "$PACKAGE $VERSION"
585 echo "------------------------------------------------------------------------"
587 echo "Configuration Options Summary:"
589 echo " Amalgamation.........: ${do_amalgamation}"
590 echo " Ecore IMF............: $have_ecore_imf"
591 echo " Multisense...........: $want_multisense"
593 if test "x${want_multisense}" = "xyes" ; then
594 echo " LibRemix.............: $have_libremix"
595 echo " Libsndfile...........: $have_sndfile"
596 echo " Ogg/Vorbis...........: $have_vorbis"
597 echo " LibFLAC..............: $have_flac_lib"
598 echo " LibALSA..............: $have_alsa_lib"
601 echo " EDJE_PROGRAM_CACHE...: $want_edje_program_cache"
602 echo " EDJE_CALC_CACHE......: $want_edje_calc_cache"
603 echo " Fixed point..........: $want_fixed_point"
604 echo " Documentation........: ${build_doc}"
605 echo " Tests................: ${enable_tests}"
606 echo " Coverage.............: ${enable_coverage}"
607 echo " Examples.............: install:${install_examples} build:${build_examples}"
611 echo " Build edje_cc................: $have_edje_cc"
612 echo " Build edje_decc..............: $have_edje_decc"
613 echo " Build edje_recc..............: $have_edje_recc"
614 echo " Build edje_player............: $have_edje_player"
615 echo " Build edje_inspector.........: $have_edje_inspector"
616 echo " Build edje_external_inspector: $have_edje_external_inspector"
618 echo "Compilation............: make (or gmake)"
619 echo " CPPFLAGS.............: $CPPFLAGS"
620 echo " CFLAGS...............: $CFLAGS"
621 echo " LDFLAGS..............: $LDFLAGS"
623 echo "Installation...........: make install (as root if needed, with 'su' or 'sudo')"
624 echo " prefix...............: $prefix"