1 ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
2 ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
3 m4_define([v_maj], [1])
4 m4_define([v_min], [7])
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])
100 EFL_WITH_BIN([edje], [edje-codegen], [edje_codegen])
102 EFL_ENABLE_BIN([edje-cc])
103 EFL_ENABLE_BIN([edje-decc])
104 EFL_ENABLE_BIN([edje-recc])
105 EFL_ENABLE_BIN([edje-player])
106 EFL_ENABLE_BIN([edje-inspector])
107 EFL_ENABLE_BIN([edje-external-inspector])
108 EFL_ENABLE_BIN([edje-watch])
109 EFL_ENABLE_BIN([edje-codegen])
111 # Optional EDJE_PROGRAM_CACHE (use much more ram, but increase speed in some cases)
112 want_edje_program_cache="no"
114 AC_ARG_ENABLE([edje-program-cache],
116 [--enable-edje-program-cache],
117 [enable EDJE_PROGRAM_CACHE support. [[default=disabled]]]
119 [want_edje_program_cache=$enableval]
121 AM_CONDITIONAL([EDJE_PROGRAM_CACHE], [test "x${want_edje_program_cache}" = "xyes"])
123 if test "x${want_edje_program_cache}" = "xyes" ; then
124 AC_DEFINE([EDJE_PROGRAM_CACHE], [1], [Cache result of program glob matches - this uses up extra ram with the gain of faster program matching])
127 # Optional EDJE_CALC_CACHE (use more ram, but increase speed by reducing the need to recalculate static stuff)
128 want_edje_calc_cache="yes"
130 AC_ARG_ENABLE([edje-calc-cache],
132 [--enable-edje-calc-cache],
133 [enable EDJE_CALC_CACHE support. [[default=disabled]]]
135 [want_edje_calc_cache=$enableval]
137 AM_CONDITIONAL([EDJE_CALC_CACHE], [test "x${want_edje_calc_cache}" = "xyes"])
139 if test "x${want_edje_calc_cache}" = "xyes" ; then
140 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])
143 # Enable Fixed Point use
144 want_fixed_point="no"
146 AC_ARG_ENABLE([fixed-point],
148 [--enable-fixed-point],
149 [reduce use of FPU by using Fixed Point provided by Eina and Eet, [[default=disabled]]]
151 [want_fixed_point=$enableval]
153 AM_CONDITIONAL([BUILD_EDJE_FP], [test "x${want_fixed_point}" = "xyes"])
155 if test "x${want_fixed_point}" = "xyes" ; then
156 AC_DEFINE([BUILD_EDJE_FP], [1], [Use Fixed Point instead of FPU])
161 [AC_HELP_STRING([--with-vim=DIR], [Location of Vim data files [[autodetect]]])],
163 if test -d "${withval}"; then
169 if test "x${vimdir}" = "x" ; then
170 if test -d "${prefix}/share/vim"; then
171 vimdir="${prefix}/share/vim"
172 elif test -d "/usr/share/vim"; then
173 vimdir="/usr/share/vim"
174 elif test -d "/usr/local/share/vim"; then
175 vimdir="/usr/local/share/vim"
176 elif test -d "/opt/share/vim"; then
177 vimdir="/opt/share/vim"
183 AC_MSG_CHECKING([for location of Vim data files])
185 if test "${install_vim}" = "yes"; then
186 AC_MSG_RESULT([$vimdir])
188 AC_MSG_RESULT([Not found, EDC syntax file will not be installed])
193 ### Checks for programs
196 # doxygen program for documentation building
198 EFL_CHECK_DOXYGEN([build_doc="yes"], [build_doc="no"])
202 AM_PATH_PYTHON([2.5], , [:])
203 AM_CONDITIONAL([HAVE_PYTHON], [test "$PYTHON" != : ])
209 # Check whether pkg-config supports Requires.private
211 if $PKG_CONFIG --atleast-pkgconfig-version 0.22; then
212 pkgconfig_requires_private="Requires.private"
214 pkgconfig_requires_private="Requires"
216 AC_SUBST(pkgconfig_requires_private)
219 ### Checks for libraries
221 # Evil library for compilation on Windows
226 PKG_CHECK_MODULES([EVIL], [evil >= 1.6.99])
227 AC_DEFINE([HAVE_EVIL], [1], [Set to 1 if Evil library is installed])
228 requirement_edje="evil ${requirement_edje}"
229 EFL_EDJE_BUILD="-DEFL_EDJE_BUILD"
232 AC_SUBST(EFL_EDJE_BUILD)
234 # Dependencies for the library
236 # Lua pkg-config hack for different naming conventions
240 PKG_CHECK_MODULES([LUA], [lua >= 5.1.0], requirement_lua="lua",
241 [PKG_CHECK_MODULES([LUA], [lua5.1 >= 5.1.0], requirement_lua="lua5.1",
242 [PKG_CHECK_MODULES([LUA], [lua-5.1 >= 5.1.0], requirement_lua="lua-5.1",
243 [PKG_CHECK_MODULES([LUA], [lua51 >= 5.1.0], requirement_lua="lua51",
244 [have_lua="no"])])])])
246 if test "x${have_lua}" = "xno" ; then
247 AC_MSG_CHECKING([whether lua_newstate() is in liblua])
248 AC_CHECK_LIB([lua], [lua_newstate],
254 AC_MSG_RESULT([${have_lua}])
258 if test "x${have_lua}" = "xno" ; then
259 AC_MSG_ERROR([Cannot find lua library. Be sure that you have installed it and set CFLAGS and LDFLAGS correctly])
262 PKG_CHECK_MODULES([MINIMAL],
268 PKG_CHECK_MODULES([EDJE],
276 ecore-input >= 1.6.99
280 EDJE_LIBS="${EDJE_LIBS} ${LUA_LIBS} ${lua_libs}"
281 EDJE_CFLAGS="${EDJE_CFLAGS} ${LUA_CFLAGS}"
283 requirement_edje="embryo >= 1.6.99 ecore-evas >= 1.6.99 ecore >= 1.6.99 evas >= 1.6.99 eet >= 1.6.99 eina >= 1.6.99 ${requirement_edje}"
284 requirement_edje="${requirement_lua} ${requirement_edje}"
286 want_ecore_imf="auto"
288 AC_ARG_ENABLE([ecore-imf],
289 [AC_HELP_STRING([--disable-ecore-imf], [Disable build with ecore-imf])],
290 [want_ecore_imf="${enableval}"])
292 if test "x${want_ecore_imf}" != "xno"; then
293 PKG_CHECK_MODULES([ECORE_IMF],
296 ecore-imf-evas >= 1.6.99
299 AC_DEFINE([HAVE_ECORE_IMF], [1], [Input Method Support for Edje Entry])
301 requirement_edje="ecore-imf-evas >= 1.6.99 ecore-imf >= 1.6.99 ${requirement_edje}"
303 [have_ecore_imf="no"])
305 if test "x${want_ecore_imf}" = "xyes" -a "x${have_ecore_imf}" = "xno"; then
306 AC_MSG_ERROR([Ecore-IMF required, but not found])
312 [AC_HELP_STRING([--disable-eio], [Disable build with eio])],
313 [want_eio="${enableval}"])
315 if test "x${want_eio}" != "xno"; then
316 PKG_CHECK_MODULES([EIO],
319 AC_DEFINE([HAVE_EIO], [1], [Eio is available for monitoring file assynchronously])
321 requirement_edje="eio >= 1.6.99 ${requirement_edje}"
325 if test "x${want_eio}" = "xyes" -a "x${have_eio}" = "xno"; then
326 AC_MSG_ERROR([Eio required, but not found])
330 # Enable Multisense use
331 want_multisense="yes"
332 AC_ARG_ENABLE([multisense],
334 [--disable-multisense],
335 [multisense provides sound and tone play support, [[default=enabled]]]
337 [want_multisense=$enableval]
339 AM_CONDITIONAL([ENABLE_MULTISENSE], [test "x${want_multisense}" = "xyes"])
344 AC_ARG_ENABLE([sndfile],
345 [AC_HELP_STRING([--disable-sndfile], [disable sndfile support. @<:@default=detect@:>@])],
346 [want_sndfile=$enableval], [])
348 if test "x${want_multisense}" = "xyes" -a "x$want_sndfile" != "xno"; then
350 PKG_CHECK_MODULES([SNDFILE],
353 AC_DEFINE(HAVE_LIBSNDFILE, 1, [sndfile support for Edje])
355 requirement_edje="sndfile >= 1.0.21 ${requirement_edje}"
357 [have_sndfile="no"; want_multisense="no"]
360 if test "x$want_sndfile" = "xyes" -a "x$have_sndfile" = "xno"; then
361 AC_MSG_ERROR([sndfile support requested, but not found by pkg-config.])
364 AM_CONDITIONAL([HAVE_LIBSNDFILE], [test "x${have_sndfile}" = "xyes"])
369 AC_ARG_ENABLE([remix],
370 [AC_HELP_STRING([--disable-remix], [disable remix support. @<:@default=detect@:>@])],
371 [want_libremix=$enableval], [])
373 if test "x${want_multisense}" = "xyes" -a "x$want_libremix" != "xno"; then
374 PKG_CHECK_MODULES([REMIX],
377 AC_DEFINE(HAVE_LIBREMIX, 1, [remix support for Edje])
379 requirement_edje="remix >= 0.2.4 ${requirement_edje}"
380 AC_DEFINE(__REMIX_PLUGIN__, 1, "Set to REMIX Plugin type")
381 REMIX_PLUGIN_DIR=`pkg-config --variable=libdir remix`"/remix"
382 AC_SUBST(REMIX_PLUGIN_DIR)
383 AC_DEFINE_UNQUOTED(REMIX_PLUGIN_DIR, "$REMIX_PLUGIN_DIR", [Set the remix plugin directory])
385 [have_libremix="no"; want_multisense="no"]
388 if test "x$want_libremix" = "xyes" -a "x$have_libremix" = "xno"; then
389 AC_MSG_ERROR([remix support requested, but not found by pkg-config.])
392 AM_CONDITIONAL([HAVE_LIBREMIX], [test "x${have_libremix}" = "xyes"])
397 AC_ARG_ENABLE([vorbisenc],
398 [AC_HELP_STRING([--disable-vorbis], [disable ogg-vorbis support. @<:@default=detect@:>@])],
399 [want_vorbis=$enableval], [])
401 if test "x${want_multisense}" = "xyes" -a "x$want_vorbis" != "xno"; then
402 PKG_CHECK_MODULES([VORBISENC],
409 AC_DEFINE(HAVE_VORBIS, 1, [vorbis support for Edje])
411 requirement_edje="ogg >= 1.1.4 vorbis >= 1.2.3 vorbisenc >= 1.2.3 ${requirement_edje}"
416 if test "x$want_vorbis" = "xyes" -a "x$have_vorbis" = "xno"; then
417 AC_MSG_ERROR([vorbisenc support requested, but not found by pkg-config.])
424 AC_ARG_ENABLE([alsa],
425 [AC_HELP_STRING([--disable-alsa], [disable alsa support. @<:@default=detect@:>@])],
426 [want_alsa_lib=$enableval], [])
428 if test "x${want_multisense}" = "xyes" -a "x$want_alsa_lib" != "xno"; then
429 PKG_CHECK_MODULES([ALSA],
434 AC_DEFINE(HAVE_LIBALSA, 1, [ALSA support for Edje])
436 requirement_edje="alsa >= 1.0.21 ${requirement_edje}"
441 if test "x$want_alsa_lib" = "xyes" -a "x$have_alsa_lib" = "xno"; then
442 AC_MSG_ERROR([alsa support requested, but not found by pkg-config.])
445 AM_CONDITIONAL([HAVE_LIBALSA], [test "x${have_alsa_lib}" = "xyes"])
447 ##pulse audio library
450 AC_ARG_ENABLE([pulseaudio],
451 [AC_HELP_STRING([--disable-pa], [disable pulse audio support. @<:@default=detect@:>@])],
452 [want_pa_lib=$enableval], [])
454 if test "x${want_multisense}" = "xyes" -a "x$want_pa_lib" != "xno"; then
455 PKG_CHECK_MODULES([PA],
458 libpulse-simple >= 0.9.21
461 AC_DEFINE(HAVE_LIBPA, 1, [Pulse Audio support for Edje])
463 requirement_edje="libpulse >= 0.9.21 ${requirement_edje}"
468 if test "x$want_pa_lib" = "xyes" -a "x$have_pa_lib" = "xno"; then
469 AC_MSG_ERROR([pulse audio support requested, but not found by pkg-config.])
472 AM_CONDITIONAL([HAVE_LIBPA], [test "x${have_pa_lib}" = "xyes"])
478 AC_ARG_ENABLE([flac],
479 [AC_HELP_STRING([--disable-flac], [disable flac support. @<:@default=detect@:>@])],
480 [want_flac_lib=$enableval], [])
482 if test "x${want_multisense}" = "xyes" -a "x$want_flac_lib" != "xno"; then
483 PKG_CHECK_MODULES([FLAC],
488 AC_DEFINE(HAVE_LIBFLAC, 1, [flac support for Edje])
490 # disabled because this adds flac include dirs to cflags... and
491 # FLAC has an assert.h in its include dirs that ends up
492 # overriding the system assert.h and thus causes all sorts of
494 #requirement_edje="flac >= 1.2.1 ${requirement_edje}"
498 if test "x$want_flac_lib" = "xyes" -a "x$have_flac_lib" = "xno"; then
499 AC_MSG_ERROR([flac support requested, but not found by pkg-config.])
503 if test "x${want_multisense}" = "xyes" ; then
504 AC_DEFINE([ENABLE_MULTISENSE], [1], [Use Multisense])
506 AC_SUBST([want_multisense])
508 # Dependencies for the binaries
510 if test "x${have_edje_cc}" = "xyes" ; then
511 PKG_CHECK_MODULES([EDJE_CC],
512 [ecore-file >= 1.6.99 ecore-evas >= 1.6.99 ecore >= 1.6.99 evas >= 1.6.99 eet >= 1.6.0 eina >= 1.6.99])
513 EDJE_CC_LIBS="${EDJE_CC_LIBS} ${LUA_LIBS} ${lua_libs}"
516 AM_CONDITIONAL([BUILD_EPP], [test "x${have_edje_cc}" = "xyes"])
518 # TODO: Add disable flag option
519 AM_CONDITIONAL([BUILD_PNG2ETC], [test "x${have_edje_cc}" = "xyes"])
521 if test "x${have_edje_decc}" = "xyes" ; then
522 PKG_CHECK_MODULES([EDJE_DECC],
523 [ecore-file >= 1.6.99 ecore-evas >= 1.6.99 ecore >= 1.6.99 evas >= 1.6.99 eet >= 1.6.99 eina >= 1.6.99])
526 if test "x${have_edje_player}" = "xyes" ; then
527 PKG_CHECK_MODULES([EDJE_PLAYER],
528 [ecore-evas >= 1.6.99 ecore >= 1.6.99 evas >= 1.6.99 eina >= 1.6.99])
531 if test "x${have_edje_inspector}" = "xyes" ; then
532 PKG_CHECK_MODULES([EDJE_INSPECTOR],
533 [ecore-evas >= 1.6.99 ecore >= 1.6.99 evas >= 1.6.99 eina >= 1.6.99])
536 if test "x${have_edje_external_inspector}" = "xyes" ; then
537 PKG_CHECK_MODULES([EDJE_EXTERNAL_INSPECTOR],
538 [ecore >= 1.6.99 evas >= 1.6.99 eina >= 1.6.99])
541 if test "x${have_edje_watch}" = "xyes" ; then
542 PKG_CHECK_MODULES([EDJE_WATCH],
543 [ecore >= 1.6.99 eina >= 1.6.99 eio >= 1.6.99],
544 [have_edje_watch="yes"],
545 [have_edje_watch="no"])
548 if test "x${have_edje_codegen}" = "xyes" ; then
549 PKG_CHECK_MODULES([EDJE_CODEGEN],
550 [ecore >= 1.6.99 eina >= 1.6.99],
551 [have_edje_codegen="yes"],
552 [have_edje_codegen="no"])
555 AM_CONDITIONAL([BUILD_EDJE_WATCH], [test "x${have_edje_watch}" = "xyes"])
557 ### Checks for header files
558 AC_CHECK_HEADERS([locale.h sys/resource.h])
566 ### Checks for structures
569 ### Checks for compiler characteristics
578 EDJE_CFLAGS="${EDJE_CFLAGS} -D_WIN32_WCE=0x0420"
583 ### Checks for linker characteristics
585 lt_enable_auto_import=""
588 lt_enable_auto_import="-Wl,--enable-auto-import"
591 AC_SUBST(lt_enable_auto_import)
594 ### Checks for library functions
602 AC_DEFINE([HAVE_REALPATH], [1], [Define to 1 if you have the `realpath' function.])
605 AC_CHECK_FUNCS([realpath])
609 ### Unit tests, coverage and benchmarking
611 EFL_CHECK_TESTS([enable_tests="yes"], [enable_tests="no"])
613 EFL_CHECK_COVERAGE([${enable_tests}], [enable_coverage="yes"], [enable_coverage="no"])
614 EDJE_CFLAGS="${EDJE_CFLAGS} ${EFL_COVERAGE_CFLAGS}"
615 EDJE_LIBS="${EDJE_LIBS} ${EFL_COVERAGE_LIBS}"
616 if test "x$enable_coverage" = "xyes" ; then
617 EDJE_CFLAGS="${EDJE_CFLAGS} ${EFL_DEBUG_CFLAGS}"
623 AC_ARG_ENABLE([build-examples],
624 AC_HELP_STRING([--enable-build-examples],
625 [Enable building examples. This requires extra dependencies. 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@:>@]),
627 if test "x${enableval}" = "xyes" ; then
633 [build_examples="no"])
634 AM_CONDITIONAL([BUILD_EXAMPLES], [test "x${build_examples}" = "xyes"])
636 AC_SUBST(requirement_edje)
643 data/include/Makefile
652 src/modules/alsa_snd_player/Makefile
653 src/modules/pa_snd_player/Makefile
654 src/modules/eet_snd_reader/Makefile
655 src/modules/multisense_factory/Makefile
658 src/examples/Makefile
662 #####################################################################
668 echo "------------------------------------------------------------------------"
669 echo "$PACKAGE $VERSION"
670 echo "------------------------------------------------------------------------"
672 echo "Configuration Options Summary:"
674 echo " Amalgamation.........: ${do_amalgamation}"
675 echo " Ecore IMF............: $have_ecore_imf"
676 echo " EIO..................: $have_eio"
677 dnl echo " Multisense...........: $want_multisense"
679 if test "x${want_multisense}" = "xyes" ; then
680 echo " LibRemix.............: $have_libremix"
681 echo " Libsndfile...........: $have_sndfile"
682 echo " Ogg/Vorbis...........: $have_vorbis"
683 echo " LibFLAC..............: $have_flac_lib"
684 echo " LibALSA..............: $have_alsa_lib"
685 echo " LibPA................: $have_pa_lib"
688 echo " EDJE_PROGRAM_CACHE...: $want_edje_program_cache"
689 echo " EDJE_CALC_CACHE......: $want_edje_calc_cache"
690 echo " Fixed point..........: $want_fixed_point"
691 echo " Documentation........: ${build_doc}"
692 echo " Tests................: ${enable_tests}"
693 echo " Coverage.............: ${enable_coverage}"
694 echo " Examples.............: install:${install_examples} build:${build_examples}"
698 echo " Build edje_cc................: $have_edje_cc"
699 echo " Build edje_decc..............: $have_edje_decc"
700 echo " Build edje_recc..............: $have_edje_recc"
701 echo " Build edje_player............: $have_edje_player"
702 echo " Build edje_inspector.........: $have_edje_inspector"
703 echo " Build edje_external_inspector: $have_edje_external_inspector"
704 echo " Build edje_watch.............: $have_edje_watch"
705 echo " Build edje_codegen...........: $have_edje_codegen"
707 echo "Compilation............: make (or gmake)"
708 echo " CPPFLAGS.............: $CPPFLAGS"
709 echo " CFLAGS...............: $CFLAGS"
710 echo " LDFLAGS..............: $LDFLAGS"
712 echo "Installation...........: make install (as root if needed, with 'su' or 'sudo')"
713 echo " prefix...............: $prefix"