populate edje.dox.in from edje.dox (was this intentionally empty?), update from AUTHORS
[framework/uifw/edje.git] / configure.ac
1 ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
2 ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
3 m4_define([v_maj], [1])
4 m4_define([v_min], [0])
5 m4_define([v_mic], [999])
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 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 ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
20
21 AC_INIT([edje], [v_ver], [enlightenment-devel@lists.sourceforge.net])
22 AC_PREREQ([2.52])
23 AC_CONFIG_SRCDIR([configure.ac])
24 AC_CONFIG_MACRO_DIR([m4])
25
26 AC_CONFIG_HEADERS([config.h])
27 AH_TOP([
28 #ifndef EFL_CONFIG_H__
29 #define EFL_CONFIG_H__
30 ])
31 AH_BOTTOM([
32 #endif /* EFL_CONFIG_H__ */
33 ])
34
35 AM_INIT_AUTOMAKE([1.6 dist-bzip2])
36 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
37
38 AC_LIBTOOL_WIN32_DLL
39 define([AC_LIBTOOL_LANG_CXX_CONFIG], [:])dnl
40 define([AC_LIBTOOL_LANG_F77_CONFIG], [:])dnl
41 AC_PROG_LIBTOOL
42
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"
52 release_info="v_rel"
53 AC_SUBST(version_info)
54 AC_SUBST(release_info)
55 ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
56 ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
57 VMAJ=v_maj
58 AC_SUBST(VMAJ)
59
60 AC_DEFINE_UNQUOTED([SHARED_LIB_SUFFIX], ["$shrext_cmds"], [Suffix for shared objects])
61
62 ### Default options with respect to host
63 AC_CANONICAL_BUILD
64 AC_CANONICAL_HOST
65
66
67 case "$host_os" in
68    mingw32ce* | cegcc*)
69       MODULE_ARCH="$host_os-$host_cpu"
70       install_vim="no"
71       have_edje_cc="no"
72       ;;
73    *)
74       MODULE_ARCH="$host_os-$host_cpu-v_maj.0.0"
75       install_vim="yes"
76       have_edje_cc="yes"
77       ;;
78 esac
79
80 requirement_edje=""
81
82 AC_SUBST(MODULE_ARCH)
83 AC_DEFINE_UNQUOTED(MODULE_ARCH, "${MODULE_ARCH}", "Module architecture")
84
85 ### Additional options to configure
86
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
90        do_amalgamation="yes"
91     else
92        do_amalgamation="no"
93     fi
94    ],
95    [do_amalgamation="no"]
96 )
97 AM_CONDITIONAL([EDJE_AMALGAMATION], [test "x${do_amalgamation}" = "xyes"])
98
99 EFL_ENABLE_BIN([edje-cc])
100 EFL_ENABLE_BIN([edje-decc])
101 EFL_ENABLE_BIN([edje-recc])
102 EFL_ENABLE_BIN([edje-player])
103 EFL_ENABLE_BIN([edje-inspector])
104 EFL_ENABLE_BIN([edje-external-inspector])
105
106 # Optional EDJE_PROGRAM_CACHE (use much more ram, but increase speed in some cases)
107 want_edje_program_cache="no"
108
109 AC_ARG_ENABLE([edje-program-cache],
110    [AC_HELP_STRING(
111        [--enable-edje-program-cache],
112        [enable EDJE_PROGRAM_CACHE support. [[default=disabled]]]
113     )],
114    [want_edje_program_cache=$enableval]
115 )
116 AM_CONDITIONAL([EDJE_PROGRAM_CACHE], [test "x${want_edje_program_cache}" = "xyes"])
117
118 if test "x${want_edje_program_cache}" = "xyes" ; then
119    AC_DEFINE([EDJE_PROGRAM_CACHE], [1], [Cache result of program glob matches - this uses up extra ram with the gain of faster program matching])
120 fi
121
122 # Optional EDJE_CALC_CACHE (use more ram, but increase speed by reducing the need to recalculate static stuff)
123 want_edje_calc_cache="yes"
124
125 AC_ARG_ENABLE([edje-calc-cache],
126    [AC_HELP_STRING(
127        [--enable-edje-calc-cache],
128        [enable EDJE_CALC_CACHE support. [[default=disabled]]]
129     )],
130    [want_edje_calc_cache=$enableval]
131 )
132 AM_CONDITIONAL([EDJE_CALC_CACHE], [test "x${want_edje_calc_cache}" = "xyes"])
133
134 if test "x${want_edje_calc_cache}" = "xyes" ; then
135    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])
136 fi
137
138 # Enable Fixed Point use
139 want_fixed_point="no"
140
141 AC_ARG_ENABLE([fixed-point],
142    [AC_HELP_STRING(
143        [--enable-fixed-point],
144        [reduce use of FPU by using Fixed Point provided by Eina and Eet, [[default=disabled]]]
145     )],
146     [want_fixed_point=$enableval]
147 )
148 AM_CONDITIONAL([BUILD_EDJE_FP], [test "x${want_fixed_point}" = "xyes"])
149
150 if test "x${want_fixed_point}" = "xyes" ; then
151    AC_DEFINE([BUILD_EDJE_FP], [1], [Use Fixed Point instead of FPU])
152 fi
153
154 install_vim="yes"
155 AC_ARG_WITH([vim],
156     [AC_HELP_STRING([--with-vim=DIR], [Location of Vim data files [[autodetect]]])],
157     [
158      if test -d "${withval}"; then
159         vimdir="${withval}"
160      fi
161     ]
162 )
163
164 if test "x${vimdir}" = "x" ; then
165    if test -d "${prefix}/share/vim"; then
166       vimdir="${prefix}/share/vim"
167    elif test -d "/usr/share/vim"; then
168       vimdir="/usr/share/vim"
169    elif test -d "/usr/local/share/vim"; then
170       vimdir="/usr/local/share/vim"
171    elif test -d "/opt/share/vim"; then
172       vimdir="/opt/share/vim"
173    else
174       install_vim="no"
175    fi
176 fi
177
178 AC_MSG_CHECKING([for location of Vim data files])
179
180 if test "${install_vim}" = "yes"; then
181    AC_MSG_RESULT([$vimdir])
182 else
183    AC_MSG_RESULT([Not found, EDC syntax file will not be installed])
184 fi
185
186 AC_SUBST(vimdir)
187
188 ### Checks for programs
189 AC_PROG_CC
190
191 # doxygen program for documentation building
192
193 EFL_CHECK_DOXYGEN([build_doc="yes"], [build_doc="no"])
194
195 # python
196
197 AM_PATH_PYTHON([2.5], , [:])
198 AM_CONDITIONAL([HAVE_PYTHON], [test "$PYTHON" != : ])
199
200 # pkg-config
201
202 PKG_PROG_PKG_CONFIG
203
204 # Check whether pkg-config supports Requires.private
205
206 if $PKG_CONFIG --atleast-pkgconfig-version 0.22; then
207    pkgconfig_requires_private="Requires.private"
208 else
209    pkgconfig_requires_private="Requires"
210 fi
211 AC_SUBST(pkgconfig_requires_private)
212
213
214 ### Checks for libraries
215
216 # Evil library for compilation on Windows
217
218 EFL_EDJE_BUILD=""
219 case "$host_os" in
220    mingw* | cegcc*)
221       PKG_CHECK_MODULES([EVIL], [evil])
222       AC_DEFINE([HAVE_EVIL], [1], [Set to 1 if Evil library is installed])
223       requirement_edje="evil ${requirement_edje}"
224       EFL_EDJE_BUILD="-DEFL_EDJE_BUILD"
225    ;;
226 esac
227 AC_SUBST(EFL_EDJE_BUILD)
228
229 # Dependencies for the library
230
231 # Lua pkg-config hack for different naming conventions
232 have_lua="yes"
233 requirement_lua=""
234 lua_libs=""
235 PKG_CHECK_MODULES([LUA], [lua >= 5.1.0], requirement_lua="lua",
236    [PKG_CHECK_MODULES([LUA], [lua5.1 >= 5.1.0], requirement_lua="lua5.1",
237       [PKG_CHECK_MODULES([LUA], [lua-5.1 >= 5.1.0], requirement_lua="lua-5.1",
238          [PKG_CHECK_MODULES([LUA], [lua51 >= 5.1.0], requirement_lua="lua51",
239             [have_lua="no"])])])])
240
241 if test "x${have_lua}" = "xno" ; then
242    AC_MSG_CHECKING([whether lua_newstate() is in liblua])
243    AC_CHECK_LIB([lua], [lua_newstate],
244       [
245        have_lua="yes"
246        lua_libs="-llua"
247       ],
248       [have_lua="no"])
249    AC_MSG_RESULT([${have_lua}])
250 fi
251 AC_SUBST(lua_libs)
252
253 if test "x${have_lua}" = "xno" ; then
254    AC_MSG_ERROR([Cannot find lua library. Be sure that you have installed it and set CFLAGS and LDFLAGS correctly])
255 fi
256
257 PKG_CHECK_MODULES([MINIMAL],
258    [
259     eina >= 1.0.0
260     eet >= 1.4.0
261    ])
262
263 PKG_CHECK_MODULES([EDJE],
264    [
265     eina >= 1.0.0
266     eet >= 1.4.0
267     evas >= 1.0.999
268     ecore >= 1.0.0
269     ecore-file >= 1.0.0
270     embryo >= 1.0.0
271    ])
272
273 EDJE_LIBS="${EDJE_LIBS} ${LUA_LIBS} ${lua_libs}"
274 EDJE_CFLAGS="${EDJE_CFLAGS} ${LUA_CFLAGS}"
275
276 requirement_edje="embryo >= 1.0.0 ecore >= 1.0.0 evas >= 1.0.0 eet >= 1.4.0 eina >= 1.0.0 ${requirement_edje}"
277 requirement_edje="${requirement_lua} ${requirement_edje}"
278
279 have_ecore_imf="no"
280 PKG_CHECK_MODULES([ECORE_IMF],
281    [
282     ecore-imf >= 1.0.0
283     ecore-imf-evas >= 1.0.0
284    ],
285    [
286     AC_DEFINE([HAVE_ECORE_IMF], [1], [Input Method Support for Edje Entry])
287     have_ecore_imf="yes"
288     requirement_edje="ecore-imf-evas >= 1.0.0 ecore-imf >= 1.0.0 ${requirement_edje}"
289    ],
290    [have_ecore_imf="no"])
291
292 # Dependencies for the binaries
293
294 if test "x$have_edje_cc" = "xyes"; then
295    PKG_CHECK_MODULES([EDJE_CC], [ecore-file >= 1.0.0 ecore-evas >= 1.0.0 ecore >= 1.0.0 evas >= 1.0.0 eet >= 1.0.0 eina >= 1.0.0])
296    EDJE_CC_LIBS="${EDJE_CC_LIBS} ${LUA_LIBS} ${lua_libs}"
297 fi
298
299 AM_CONDITIONAL([BUILD_EPP], [test "x$have_edje_cc" = "xyes"])
300
301 if test "x$have_edje_decc" = "xyes"; then
302    PKG_CHECK_MODULES([EDJE_DECC], [ecore-file >= 1.0.0 ecore-evas >= 1.0.0 ecore >= 1.0.0 evas >= 1.0.0 eet >= 1.0.0 eina >= 1.0.0])
303 fi
304
305 if test "x$have_edje_player" = "xyes"; then
306    PKG_CHECK_MODULES([EDJE_PLAYER], [ecore-evas >= 1.0.0 ecore >= 1.0.0 evas >= 1.0.0 eina >= 1.0.0])
307 fi
308
309 if test "x$have_edje_inspector" = "xyes"; then
310    PKG_CHECK_MODULES([EDJE_INSPECTOR], [ecore-evas >= 1.0.0 ecore >= 1.0.0 evas >= 1.0.0 eina >= 1.0.0])
311 fi
312
313 if test "x$have_edje_external_inspector" = "xyes"; then
314    PKG_CHECK_MODULES([EDJE_EXTERNAL_INSPECTOR], [ecore >= 1.0.0 evas >= 1.0.0 eina >= 1.0.0])
315 fi
316
317
318 ### Checks for header files
319 AC_CHECK_HEADERS([locale.h sys/resource.h])
320
321 EFL_CHECK_PATH_MAX
322
323
324 ### Checks for types
325
326
327 ### Checks for structures
328
329
330 ### Checks for compiler characteristics
331 AM_PROG_CC_C_O
332 AC_C_CONST
333 AC_PROG_CC_STDC
334 AC_HEADER_STDC
335 AC_C___ATTRIBUTE__
336
337 case "$host_os" in
338    mingw32ce*)
339       EDJE_CFLAGS="${EDJE_CFLAGS} -D_WIN32_WCE=0x0420"
340       ;;
341    cegcc*)
342       EDJE_CFLAGS="${EDJE_CFLAGS} -mwin32 -D_WIN32_WCE=0x0420"
343       ;;
344 esac
345
346
347 ### Checks for linker characteristics
348
349 lt_enable_auto_import=""
350 case "$host_os" in
351    mingw* | cegcc*)
352       lt_enable_auto_import="-Wl,--enable-auto-import"
353       ;;
354 esac
355 AC_SUBST(lt_enable_auto_import)
356
357
358 ### Checks for library functions
359
360 AC_ISC_POSIX
361
362 AC_FUNC_ALLOCA
363
364 case "$host_os" in
365    mingw* | cegcc*)
366       AC_DEFINE([HAVE_REALPATH], [1], [Define to 1 if you have the `realpath' function.])
367       ;;
368    *)
369       AC_CHECK_FUNCS([realpath])
370       ;;
371 esac
372
373
374 AC_SUBST(requirement_edje)
375
376 AC_OUTPUT([
377 edje.pc
378 edje.spec
379 Makefile
380 data/Makefile
381 data/include/Makefile
382 doc/Makefile
383 doc/Doxyfile
384 doc/edje.dox
385 src/Makefile
386 src/lib/Makefile
387 src/bin/Makefile
388 src/bin/epp/Makefile
389 utils/Makefile
390 ])
391
392
393 #####################################################################
394 ## Info
395
396 echo
397 echo
398 echo
399 echo "------------------------------------------------------------------------"
400 echo "$PACKAGE $VERSION"
401 echo "------------------------------------------------------------------------"
402 echo
403 echo "Configuration Options Summary:"
404 echo
405 echo "  Amalgamation.........: ${do_amalgamation}"
406 echo "  Ecore IMF............: $have_ecore_imf"
407 echo "  EDJE_PROGRAM_CACHE...: $want_edje_program_cache"
408 echo "  EDJE_CALC_CACHE......: $want_edje_calc_cache"
409 echo "  Fixed point..........: $want_fixed_point"
410 echo "  Documentation........: ${build_doc}"
411 echo
412 echo "Programs:"
413 echo
414 echo "  Build edje_cc................: $have_edje_cc"
415 echo "  Build edje_decc..............: $have_edje_decc"
416 echo "  Build edje_recc..............: $have_edje_recc"
417 echo "  Build edje_player............: $have_edje_player"
418 echo "  Build edje_inspector.........: $have_edje_inspector"
419 echo "  Build edje_external_inspector: $have_edje_external_inspector"
420 echo
421 echo "Compilation............: make (or gmake)"
422 echo "  CPPFLAGS.............: $CPPFLAGS"
423 echo "  CFLAGS...............: $CFLAGS"
424 echo "  LDFLAGS..............: $LDFLAGS"
425 echo
426 echo "Installation...........: make install (as root if needed, with 'su' or 'sudo')"
427 echo "  prefix...............: $prefix"
428 echo