1 ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
2 ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
3 m4_define([v_maj], [0])
4 m4_define([v_min], [9])
5 m4_define([v_mic], [99])
6 m4_define([v_rev], m4_esyscmd([(svnversion "${SVN_REPO_PATH:-.}" | grep -v export || 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 m4_define([relname], [ver-pre-svn-07])
12 m4_define([v_rel], [-release relname])
13 ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
14 m4_ifdef([v_rev], [m4_define([v_ver], [v_maj.v_min.v_mic.v_rev])],
15 [m4_define([v_ver], [v_maj.v_min.v_mic])])
16 m4_define([lt_rev], m4_eval(v_maj + v_min))
17 m4_define([lt_cur], v_mic)
18 m4_define([lt_age], v_min)
19 ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
20 ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
22 AC_INIT([edje], [v_ver], [enlightenment-devel@lists.sourceforge.net])
24 AC_CONFIG_SRCDIR([configure.ac])
25 AC_CONFIG_MACRO_DIR([m4])
30 AM_INIT_AUTOMAKE([1.6 dist-bzip2])
31 AM_CONFIG_HEADER([config.h])
32 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
35 define([AC_LIBTOOL_LANG_CXX_CONFIG], [:])dnl
36 define([AC_LIBTOOL_LANG_F77_CONFIG], [:])dnl
39 ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
40 ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
41 m4_ifdef([v_rev], , [m4_define([v_rev], [0])])
42 m4_ifdef([v_rel], , [m4_define([v_rel], [])])
43 AC_DEFINE_UNQUOTED(VMAJ, [v_maj], [Major version])
44 AC_DEFINE_UNQUOTED(VMIN, [v_min], [Minor version])
45 AC_DEFINE_UNQUOTED(VMIC, [v_mic], [Micro version])
46 AC_DEFINE_UNQUOTED(VREV, [v_rev], [Revison])
47 version_info="lt_rev:lt_cur:lt_age"
49 AC_SUBST(version_info)
50 AC_SUBST(release_info)
51 ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
52 ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
56 AC_DEFINE_UNQUOTED([SHARED_LIB_SUFFIX], ["$shrext_cmds"], [Suffix for shared objects])
60 ### Default options with respect to host
76 ### Additional options to configure
78 AC_ARG_ENABLE([amalgamation],
79 [AC_HELP_STRING([--enable-amalgamation], [enable generation of one single file with all source code in it, helps compiler optimizations.])],
80 [if test "x${enableval}" = "xyes"; then
86 [do_amalgamation="no"]
88 AM_CONDITIONAL([EDJE_AMALGAMATION], [test "x${do_amalgamation}" = "xyes"])
90 EFL_ENABLE_BIN([edje-cc])
91 EFL_ENABLE_BIN([edje-decc])
92 EFL_ENABLE_BIN([edje-recc])
93 EFL_ENABLE_BIN([edje-player])
95 # Optional EDJE_PROGRAM_CACHE (use much more ram, but increase speed in some cases)
96 want_edje_program_cache="no"
98 AC_ARG_ENABLE([edje-program-cache],
100 [--enable-edje-program-cache],
101 [enable EDJE_PROGRAM_CACHE support. [[default=disabled]]]
103 [want_edje_program_cache=$enableval]
105 AM_CONDITIONAL([EDJE_PROGRAM_CACHE], [test "x${want_edje_program_cache}" = "xyes"])
107 if test "x${want_edje_program_cache}" = "xyes" ; then
108 AC_DEFINE([EDJE_PROGRAM_CACHE], [1], [Cache result of program glob matches - this uses up extra ram with the gain of faster program matching])
111 # Optional EDJE_CALC_CACHE (use more ram, but increase speed by reducing the need to recalculate static stuff)
112 want_edje_calc_cache="yes"
114 AC_ARG_ENABLE([edje-calc-cache],
116 [--enable-edje-calc-cache],
117 [enable EDJE_CALC_CACHE support. [[default=disabled]]]
119 [want_edje_calc_cache=$enableval]
121 AM_CONDITIONAL([EDJE_CALC_CACHE], [test "x${want_edje_calc_cache}" = "xyes"])
123 if test "x${want_edje_calc_cache}" = "xyes" ; then
124 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])
127 # Enable Fixed Point use
128 want_fixed_point="no"
130 AC_ARG_ENABLE([fixed-point],
132 [--enable-fixed-point],
133 [reduce use of FPU by using Fixed Point provided by Eina and Eet, [[default=disabled]]]
135 [want_fixed_point=$enableval]
137 AM_CONDITIONAL([BUILD_EDJE_FP], [test "x${want_fixed_point}" = "xyes"])
139 if test "x${want_fixed_point}" = "xyes" ; then
140 AC_DEFINE([BUILD_EDJE_FP], [1], [Use Fixed Point instead of FPU])
145 [AC_HELP_STRING([--with-vim=DIR], [Location of Vim data files [[autodetect]]])],
147 if test -d "${withval}"; then
153 if test "x${vimdir}" = "x" ; then
154 if test -d "${prefix}/share/vim"; then
155 vimdir="${prefix}/share/vim"
156 elif test -d "/usr/share/vim"; then
157 vimdir="/usr/share/vim"
158 elif test -d "/usr/local/share/vim"; then
159 vimdir="/usr/local/share/vim"
160 elif test -d "/opt/share/vim"; then
161 vimdir="/opt/share/vim"
167 AC_MSG_CHECKING([for location of Vim data files])
169 if test "${install_vim}" = "yes"; then
170 AC_MSG_RESULT([$vimdir])
172 AC_MSG_RESULT([Not found, EDC syntax file will not be installed])
177 ### Checks for programs
180 # doxygen program for documentation building
182 EFL_CHECK_DOXYGEN([build_doc="yes"], [build_doc="no"])
186 AM_PATH_PYTHON([2.5], , [:])
187 AM_CONDITIONAL([HAVE_PYTHON], [test "$PYTHON" != : ])
193 # Check whether pkg-config supports Requires.private
195 if $PKG_CONFIG --atleast-pkgconfig-version 0.22; then
196 pkgconfig_requires_private="Requires.private"
198 pkgconfig_requires_private="Requires"
200 AC_SUBST(pkgconfig_requires_private)
203 ### Checks for libraries
205 # Evil library for compilation on Windows
210 PKG_CHECK_MODULES([EVIL], [evil])
211 AC_DEFINE([HAVE_EVIL], [1], [Set to 1 if Evil library is installed])
212 requirement_edje="evil ${requirement_edje}"
213 EFL_EDJE_BUILD="-DEFL_EDJE_BUILD"
216 AC_SUBST(EFL_EDJE_BUILD)
218 # Dependencies for the library
220 # Lua pkg-config hack for different naming conventions
224 PKG_CHECK_MODULES([LUA], [lua >= 5.1.0], requirement_lua="lua",
225 [PKG_CHECK_MODULES([LUA], [lua5.1 >= 5.1.0], requirement_lua="lua5.1",
226 [PKG_CHECK_MODULES([LUA], [lua-5.1 >= 5.1.0], requirement_lua="lua-5.1",
227 [PKG_CHECK_MODULES([LUA], [lua51 >= 5.1.0], requirement_lua="lua51",
228 [have_lua="no"])])])])
230 if test "x${have_lua}" = "xno" ; then
231 AC_MSG_CHECKING([whether lua_newstate() is in liblua])
232 AC_CHECK_LIB([lua], [lua_newstate],
238 AC_MSG_RESULT([${have_lua}])
242 if test "x${have_lua}" = "xno" ; then
243 AC_MSG_ERROR([Cannot find lua library. Be sure that you have installed it and set CFLAGS and LDFLAGS correctly])
246 PKG_CHECK_MODULES([EDJE],
256 EDJE_LIBS="${EDJE_LIBS} ${LUA_LIBS} ${lua_libs}"
257 EDJE_CFLAGS="${EDJE_CFLAGS} ${LUA_CFLAGS}"
259 requirement_edje="embryo ecore evas eet eina-0 ${requirement_edje}"
260 requirement_edje="${requirement_lua} ${requirement_edje}"
263 PKG_CHECK_MODULES([ECORE_IMF],
266 ecore-imf-evas >= 0.9.9
269 AC_DEFINE([HAVE_ECORE_IMF], [1], [Input Method Support for Edje Entry])
271 requirement_edje="ecore-imf-evas ecore-imf ${requirement_edje}"
273 [have_ecore_imf="no"])
275 # Dependencies for the binaries
277 if test "x$have_edje_cc" = "xyes"; then
278 PKG_CHECK_MODULES([ECORE_FILE], [ecore-file >= 0.9.9])
279 PKG_CHECK_MODULES([ECORE_EVAS], [ecore-evas >= 0.9.9])
282 if test "x$have_edje_player" = "xyes"; then
283 PKG_CHECK_MODULES([ECORE_EVAS], [ecore-evas >= 0.9.9])
287 ### Checks for header files
288 AC_CHECK_HEADERS([locale.h])
294 ### Checks for structures
297 ### Checks for compiler characteristics
306 EDJE_CFLAGS="${EDJE_CFLAGS} -D_WIN32_WCE=0x0420"
309 EDJE_CFLAGS="${EDJE_CFLAGS} -mwin32 -D_WIN32_WCE=0x0420"
314 ### Checks for linker characteristics
316 lt_enable_auto_import=""
319 lt_enable_auto_import="-Wl,--enable-auto-import"
322 AC_SUBST(lt_enable_auto_import)
325 ### Checks for library functions
330 AC_DEFINE([HAVE_REALPATH], [1], [Define to 1 if you have the `realpath' function.])
333 AC_CHECK_FUNCS([realpath])
338 AC_SUBST(requirement_edje)
345 data/include/Makefile
355 #####################################################################
361 echo "------------------------------------------------------------------------"
362 echo "$PACKAGE $VERSION"
363 echo "------------------------------------------------------------------------"
365 echo "Configuration Options Summary:"
367 echo " Amalgamation.........: ${do_amalgamation}"
368 echo " Ecore IMF............: $have_ecore_imf"
369 echo " EDJE_PROGRAM_CACHE...: $want_edje_program_cache"
370 echo " EDJE_CALC_CACHE......: $want_edje_calc_cache"
371 echo " Fixed point..........: $want_fixed_point"
373 echo " Build edje_cc........: $have_edje_cc"
374 echo " Build edje_decc......: $have_edje_decc"
375 echo " Build edje_recc......: $have_edje_recc"
376 echo " Build edje_player....: $have_edje_player"
378 echo " Documentation........: ${build_doc}"
380 echo "Compilation............: make (or gmake)"
381 echo " CPPFLAGS.............: $CPPFLAGS"
382 echo " CFLAGS...............: $CFLAGS"
383 echo " LDFLAGS..............: $LDFLAGS"
385 echo "Installation...........: make install (as root if needed, with 'su' or 'sudo')"
386 echo " prefix...............: $prefix"