1 ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
2 ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
3 m4_define([v_maj], [1])
4 m4_define([v_min], [7])
5 m4_define([v_mic], [0])
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
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])
107 EFL_ENABLE_BIN([edje-watch])
109 # Optional EDJE_PROGRAM_CACHE (use much more ram, but increase speed in some cases)
110 want_edje_program_cache="no"
112 AC_ARG_ENABLE([edje-program-cache],
114 [--enable-edje-program-cache],
115 [enable EDJE_PROGRAM_CACHE support. [[default=disabled]]]
117 [want_edje_program_cache=$enableval]
119 AM_CONDITIONAL([EDJE_PROGRAM_CACHE], [test "x${want_edje_program_cache}" = "xyes"])
121 if test "x${want_edje_program_cache}" = "xyes" ; then
122 AC_DEFINE([EDJE_PROGRAM_CACHE], [1], [Cache result of program glob matches - this uses up extra ram with the gain of faster program matching])
125 # Optional EDJE_CALC_CACHE (use more ram, but increase speed by reducing the need to recalculate static stuff)
126 want_edje_calc_cache="yes"
128 AC_ARG_ENABLE([edje-calc-cache],
130 [--enable-edje-calc-cache],
131 [enable EDJE_CALC_CACHE support. [[default=disabled]]]
133 [want_edje_calc_cache=$enableval]
135 AM_CONDITIONAL([EDJE_CALC_CACHE], [test "x${want_edje_calc_cache}" = "xyes"])
137 if test "x${want_edje_calc_cache}" = "xyes" ; then
138 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])
141 # Enable Fixed Point use
142 want_fixed_point="no"
144 AC_ARG_ENABLE([fixed-point],
146 [--enable-fixed-point],
147 [reduce use of FPU by using Fixed Point provided by Eina and Eet, [[default=disabled]]]
149 [want_fixed_point=$enableval]
151 AM_CONDITIONAL([BUILD_EDJE_FP], [test "x${want_fixed_point}" = "xyes"])
153 if test "x${want_fixed_point}" = "xyes" ; then
154 AC_DEFINE([BUILD_EDJE_FP], [1], [Use Fixed Point instead of FPU])
159 [AC_HELP_STRING([--with-vim=DIR], [Location of Vim data files [[autodetect]]])],
161 if test -d "${withval}"; then
167 if test "x${vimdir}" = "x" ; then
168 if test -d "${prefix}/share/vim"; then
169 vimdir="${prefix}/share/vim"
170 elif test -d "/usr/share/vim"; then
171 vimdir="/usr/share/vim"
172 elif test -d "/usr/local/share/vim"; then
173 vimdir="/usr/local/share/vim"
174 elif test -d "/opt/share/vim"; then
175 vimdir="/opt/share/vim"
181 AC_MSG_CHECKING([for location of Vim data files])
183 if test "${install_vim}" = "yes"; then
184 AC_MSG_RESULT([$vimdir])
186 AC_MSG_RESULT([Not found, EDC syntax file will not be installed])
191 ### Checks for programs
194 # doxygen program for documentation building
196 EFL_CHECK_DOXYGEN([build_doc="yes"], [build_doc="no"])
200 AM_PATH_PYTHON([2.5], , [:])
201 AM_CONDITIONAL([HAVE_PYTHON], [test "$PYTHON" != : ])
207 # Check whether pkg-config supports Requires.private
209 if $PKG_CONFIG --atleast-pkgconfig-version 0.22; then
210 pkgconfig_requires_private="Requires.private"
212 pkgconfig_requires_private="Requires"
214 AC_SUBST(pkgconfig_requires_private)
217 ### Checks for libraries
219 # Evil library for compilation on Windows
224 PKG_CHECK_MODULES([EVIL], [evil >= 1.6.99])
225 AC_DEFINE([HAVE_EVIL], [1], [Set to 1 if Evil library is installed])
226 requirement_edje="evil ${requirement_edje}"
227 EFL_EDJE_BUILD="-DEFL_EDJE_BUILD"
230 AC_SUBST(EFL_EDJE_BUILD)
232 # Dependencies for the library
234 # Lua pkg-config hack for different naming conventions
238 PKG_CHECK_MODULES([LUA], [lua >= 5.1.0], requirement_lua="lua",
239 [PKG_CHECK_MODULES([LUA], [lua5.1 >= 5.1.0], requirement_lua="lua5.1",
240 [PKG_CHECK_MODULES([LUA], [lua-5.1 >= 5.1.0], requirement_lua="lua-5.1",
241 [PKG_CHECK_MODULES([LUA], [lua51 >= 5.1.0], requirement_lua="lua51",
242 [have_lua="no"])])])])
244 if test "x${have_lua}" = "xno" ; then
245 AC_MSG_CHECKING([whether lua_newstate() is in liblua])
246 AC_CHECK_LIB([lua], [lua_newstate],
252 AC_MSG_RESULT([${have_lua}])
256 if test "x${have_lua}" = "xno" ; then
257 AC_MSG_ERROR([Cannot find lua library. Be sure that you have installed it and set CFLAGS and LDFLAGS correctly])
260 PKG_CHECK_MODULES([MINIMAL],
266 PKG_CHECK_MODULES([EDJE],
274 ecore-input >= 1.6.99
278 EDJE_LIBS="${EDJE_LIBS} ${LUA_LIBS} ${lua_libs}"
279 EDJE_CFLAGS="${EDJE_CFLAGS} ${LUA_CFLAGS}"
281 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}"
282 requirement_edje="${requirement_lua} ${requirement_edje}"
285 PKG_CHECK_MODULES([ECORE_IMF],
288 ecore-imf-evas >= 1.6.99
291 AC_DEFINE([HAVE_ECORE_IMF], [1], [Input Method Support for Edje Entry])
293 requirement_edje="ecore-imf-evas >= 1.6.99 ecore-imf >= 1.6.99 ${requirement_edje}"
295 [have_ecore_imf="no"])
297 PKG_CHECK_MODULES([EIO],
300 AC_DEFINE([HAVE_EIO], [1], [Eio is available for monitoring file assynchronously])
302 requirement_edje="eio >= 1.6.99 ${requirement_edje}"
306 # Enable Multisense use
308 dnl AC_ARG_ENABLE([multisense],
310 dnl [--enable-multisense],
311 dnl [multisense provides sound. tone and haptic effects support, [[default=disabled]]]
313 dnl [want_multisense=$enableval]
315 AM_CONDITIONAL([ENABLE_MULTISENSE], [test "x${want_multisense}" = "xyes"])
320 AC_ARG_ENABLE([sndfile],
321 [AC_HELP_STRING([--disable-sndfile], [disable sndfile support. @<:@default=detect@:>@])],
322 [want_sndfile=$enableval], [])
324 if test "x${want_multisense}" = "xyes" -a "x$want_sndfile" != "xno"; then
326 PKG_CHECK_MODULES([SNDFILE],
329 AC_DEFINE(HAVE_LIBSNDFILE, 1, [sndfile support for Edje])
331 requirement_edje="sndfile >= 1.0.21 ${requirement_edje}"
333 [have_sndfile="no"; want_multisense="no"]
336 if test "x$want_sndfile" = "xyes" -a "x$have_sndfile" = "xno"; then
337 AC_MSG_ERROR([sndfile support requested, but not found by pkg-config.])
340 AM_CONDITIONAL([HAVE_LIBSNDFILE], [test "x${have_sndfile}" = "xyes"])
345 AC_ARG_ENABLE([remix],
346 [AC_HELP_STRING([--disable-remix], [disable remix support. @<:@default=detect@:>@])],
347 [want_libremix=$enableval], [])
349 if test "x${want_multisense}" = "xyes" -a "x$want_libremix" != "xno"; then
350 PKG_CHECK_MODULES([REMIX],
353 AC_DEFINE(HAVE_LIBREMIX, 1, [remix support for Edje])
355 requirement_edje="remix >= 0.2.4 ${requirement_edje}"
356 AC_DEFINE(__REMIX_PLUGIN__, 1, "Set to REMIX Plugin type")
357 REMIX_PLUGIN_DIR=`pkg-config --variable=libdir remix`"/remix"
358 AC_SUBST(REMIX_PLUGIN_DIR)
359 AC_DEFINE_UNQUOTED(REMIX_PLUGIN_DIR, "$REMIX_PLUGIN_DIR", [Set the remix plugin directory])
361 [have_libremix="no"; want_multisense="no"]
364 if test "x$want_libremix" = "xyes" -a "x$have_libremix" = "xno"; then
365 AC_MSG_ERROR([remix support requested, but not found by pkg-config.])
368 AM_CONDITIONAL([HAVE_LIBREMIX], [test "x${have_libremix}" = "xyes"])
373 AC_ARG_ENABLE([vorbisenc],
374 [AC_HELP_STRING([--disable-vorbis], [disable ogg-vorbis support. @<:@default=detect@:>@])],
375 [want_vorbis=$enableval], [])
377 if test "x${want_multisense}" = "xyes" -a "x$want_vorbis" != "xno"; then
378 PKG_CHECK_MODULES([VORBISENC],
385 AC_DEFINE(HAVE_VORBIS, 1, [vorbis support for Edje])
387 requirement_edje="ogg >= 1.1.4 vorbis >= 1.2.3 vorbisenc >= 1.2.3 ${requirement_edje}"
389 [have_vorbis="no"; want_multisense="no"]
392 if test "x$want_vorbis" = "xyes" -a "x$have_vorbis" = "xno"; then
393 AC_MSG_ERROR([vorbisenc support requested, but not found by pkg-config.])
400 AC_ARG_ENABLE([alsa],
401 [AC_HELP_STRING([--disable-alsa], [disable alsa support. @<:@default=detect@:>@])],
402 [want_alsa_lib=$enableval], [])
404 if test "x${want_multisense}" = "xyes" -a "x$want_alsa_lib" != "xno"; then
405 PKG_CHECK_MODULES([ALSA],
410 AC_DEFINE(HAVE_LIBALSA, 1, [ALSA support for Edje])
412 requirement_edje="alsa >= 1.0.21 ${requirement_edje}"
414 [have_alsa_lib="no"; want_multisense="no"]
417 if test "x$want_alsa_lib" = "xyes" -a "x$have_alsa_lib" = "xno"; then
418 AC_MSG_ERROR([alsa support requested, but not found by pkg-config.])
421 AM_CONDITIONAL([HAVE_LIBALSA], [test "x${have_alsa_lib}" = "xyes"])
427 AC_ARG_ENABLE([flac],
428 [AC_HELP_STRING([--disable-flac], [disable flac support. @<:@default=detect@:>@])],
429 [want_flac_lib=$enableval], [])
431 if test "x${want_multisense}" = "xyes" -a "x$want_flac_lib" != "xno"; then
432 PKG_CHECK_MODULES([FLAC],
437 AC_DEFINE(HAVE_LIBFLAC, 1, [flac support for Edje])
439 # disabled because this adds flac include dirs to cflags... and
440 # FLAC has an assert.h in its include dirs that ends up
441 # overriding the system assert.h and thus causes all sorts of
443 #requirement_edje="flac >= 1.2.1 ${requirement_edje}"
445 [have_flac_lib="no"; want_multisense="no"]
447 if test "x$want_flac_lib" = "xyes" -a "x$have_flac_lib" = "xno"; then
448 AC_MSG_ERROR([flac support requested, but not found by pkg-config.])
452 if test "x${want_multisense}" = "xyes" ; then
453 AC_DEFINE([ENABLE_MULTISENSE], [1], [Use Multisense])
455 AC_SUBST([want_multisense])
457 # Dependencies for the binaries
459 if test "x${have_edje_cc}" = "xyes" ; then
460 PKG_CHECK_MODULES([EDJE_CC],
461 [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])
462 EDJE_CC_LIBS="${EDJE_CC_LIBS} ${LUA_LIBS} ${lua_libs}"
465 AM_CONDITIONAL([BUILD_EPP], [test "x${have_edje_cc}" = "xyes"])
467 if test "x${have_edje_decc}" = "xyes" ; then
468 PKG_CHECK_MODULES([EDJE_DECC],
469 [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])
472 if test "x${have_edje_player}" = "xyes" ; then
473 PKG_CHECK_MODULES([EDJE_PLAYER],
474 [ecore-evas >= 1.6.99 ecore >= 1.6.99 evas >= 1.6.99 eina >= 1.6.99])
477 if test "x${have_edje_inspector}" = "xyes" ; then
478 PKG_CHECK_MODULES([EDJE_INSPECTOR],
479 [ecore-evas >= 1.6.99 ecore >= 1.6.99 evas >= 1.6.99 eina >= 1.6.99])
482 if test "x${have_edje_external_inspector}" = "xyes" ; then
483 PKG_CHECK_MODULES([EDJE_EXTERNAL_INSPECTOR],
484 [ecore >= 1.6.99 evas >= 1.6.99 eina >= 1.6.99])
487 if test "x${have_edje_watch}" = "xyes" ; then
488 PKG_CHECK_MODULES([EDJE_WATCH],
489 [ecore >= 1.6.99 eina >= 1.6.99 eio >= 1.6.99],
490 [have_edje_watch="yes"],
491 [have_edje_watch="no"])
494 AM_CONDITIONAL([BUILD_EDJE_WATCH], [test "x${have_edje_watch}" = "xyes"])
496 ### Checks for header files
497 AC_CHECK_HEADERS([locale.h sys/resource.h])
505 ### Checks for structures
508 ### Checks for compiler characteristics
517 EDJE_CFLAGS="${EDJE_CFLAGS} -D_WIN32_WCE=0x0420"
522 ### Checks for linker characteristics
524 lt_enable_auto_import=""
527 lt_enable_auto_import="-Wl,--enable-auto-import"
530 AC_SUBST(lt_enable_auto_import)
533 ### Checks for library functions
541 AC_DEFINE([HAVE_REALPATH], [1], [Define to 1 if you have the `realpath' function.])
544 AC_CHECK_FUNCS([realpath])
548 ### Unit tests, coverage and benchmarking
550 EFL_CHECK_TESTS([enable_tests="yes"], [enable_tests="no"])
552 EFL_CHECK_COVERAGE([${enable_tests}], [enable_coverage="yes"], [enable_coverage="no"])
553 EDJE_CFLAGS="${EDJE_CFLAGS} ${EFL_COVERAGE_CFLAGS}"
554 EDJE_LIBS="${EDJE_LIBS} ${EFL_COVERAGE_LIBS}"
555 if test "x$enable_coverage" = "xyes" ; then
556 EDJE_CFLAGS="${EDJE_CFLAGS} ${EFL_DEBUG_CFLAGS}"
562 AC_ARG_ENABLE([build-examples],
563 AC_HELP_STRING([--enable-build-examples],
564 [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@:>@]),
566 if test "x${enableval}" = "xyes" ; then
572 [build_examples="no"])
573 AM_CONDITIONAL([BUILD_EXAMPLES], [test "x${build_examples}" = "xyes"])
575 AC_SUBST(requirement_edje)
582 data/include/Makefile
590 src/modules/alsa_snd_player/Makefile
591 src/modules/eet_snd_reader/Makefile
592 src/modules/multisense_factory/Makefile
595 src/examples/Makefile
599 #####################################################################
605 echo "------------------------------------------------------------------------"
606 echo "$PACKAGE $VERSION"
607 echo "------------------------------------------------------------------------"
609 echo "Configuration Options Summary:"
611 echo " Amalgamation.........: ${do_amalgamation}"
612 echo " Ecore IMF............: $have_ecore_imf"
613 dnl echo " Multisense...........: $want_multisense"
615 if test "x${want_multisense}" = "xyes" ; then
616 echo " LibRemix.............: $have_libremix"
617 echo " Libsndfile...........: $have_sndfile"
618 echo " Ogg/Vorbis...........: $have_vorbis"
619 echo " LibFLAC..............: $have_flac_lib"
620 echo " LibALSA..............: $have_alsa_lib"
623 echo " EDJE_PROGRAM_CACHE...: $want_edje_program_cache"
624 echo " EDJE_CALC_CACHE......: $want_edje_calc_cache"
625 echo " Fixed point..........: $want_fixed_point"
626 echo " Documentation........: ${build_doc}"
627 echo " Tests................: ${enable_tests}"
628 echo " Coverage.............: ${enable_coverage}"
629 echo " Examples.............: install:${install_examples} build:${build_examples}"
633 echo " Build edje_cc................: $have_edje_cc"
634 echo " Build edje_decc..............: $have_edje_decc"
635 echo " Build edje_recc..............: $have_edje_recc"
636 echo " Build edje_player............: $have_edje_player"
637 echo " Build edje_inspector.........: $have_edje_inspector"
638 echo " Build edje_external_inspector: $have_edje_external_inspector"
639 echo " Build edje_watch.............: $have_edje_watch"
641 echo "Compilation............: make (or gmake)"
642 echo " CPPFLAGS.............: $CPPFLAGS"
643 echo " CFLAGS...............: $CFLAGS"
644 echo " LDFLAGS..............: $LDFLAGS"
646 echo "Installation...........: make install (as root if needed, with 'su' or 'sudo')"
647 echo " prefix...............: $prefix"