fix corner case with edje - where u check for existens of parts in a edje but
[edje_lua.git] / configure.ac
blob97363d5d91ade6b2bf3d267dd3adfceca342422d
1 dnl Process this file with autoconf to produce a configure script.
3 # get rid of that stupid cache mechanism
4 rm -f config.cache
6 AC_INIT(edje, 0.9.92.060, enlightenment-devel@lists.sourceforge.net)
7 AC_PREREQ(2.52)
8 AC_CONFIG_SRCDIR([configure.ac])
9 AC_CONFIG_MACRO_DIR([m4])
10 AC_CANONICAL_BUILD
11 AC_CANONICAL_HOST
12 AC_ISC_POSIX
14 AM_INIT_AUTOMAKE(1.6 dist-bzip2)
15 AM_CONFIG_HEADER(config.h)
17 AC_LIBTOOL_WIN32_DLL
18 define([AC_LIBTOOL_LANG_CXX_CONFIG], [:])dnl
19 define([AC_LIBTOOL_LANG_F77_CONFIG], [:])dnl
20 AC_PROG_LIBTOOL
22 VMAJ=`echo $PACKAGE_VERSION | awk -F. '{printf("%s", $1);}'`
23 VMIN=`echo $PACKAGE_VERSION | awk -F. '{printf("%s", $2);}'`
24 VMIC=`echo $PACKAGE_VERSION | awk -F. '{printf("%s", $3);}'`
25 SNAP=`echo $PACKAGE_VERSION | awk -F. '{printf("%s", $4);}'`
26 version_info=`expr $VMAJ + $VMIN`":$VMIC:$VMIN"
27 release="ver-pre-svn-01"
28 release_info="-release $release"
29 AC_SUBST(version_info)
30 AC_SUBST(release_info)
33 ### Default options with respect to host
35 case "$host_os" in
36    mingw32ce* | cegcc*)
37       install_vim="no"
38       have_edje_cc="no"
39       ;;
40    *)
41       install_vim="yes"
42       have_edje_cc="yes"
43       ;;
44 esac
46 want_edje_program_cache="no"
48 requirement_edje=""
51 ### Additional options to configure
53 AC_ARG_ENABLE([edje-cc],
54    [AC_HELP_STRING([--disable-edje-cc], [disable building of edje_cc])],
55    [
56     if test "x${enableval}" = "xyes" ; then
57        have_edje_cc="yes"
58     else
59        have_edje_cc="no"
60     fi
61    ]
63 AC_MSG_CHECKING(whether to build edje_cc)
64 AC_MSG_RESULT([${have_edje_cc}])
66 AM_CONDITIONAL(BUILD_EDJE_CC, test "x${have_edje_cc}" = "xyes")
67 AM_CONDITIONAL(BUILD_EDJE_DECC, test "x${have_edje_cc}" = "xyes")
69 EDJE_CC_PRG=""
70 EDJE_DECC_PRG=""
71 EDJE_RECC_PRG=""
72 if test "x${have_edje_cc}" = "xyes"; then
73    EDJE_CC_PRG="edje_cc"
74    EDJE_DECC_PRG="edje_decc"
75    EDJE_RECC_PRG="edje_recc"
77 AC_SUBST(EDJE_CC_PRG)
78 AC_SUBST(EDJE_DECC_PRG)
79 AC_SUBST(EDJE_RECC_PRG)
81 # Optional EDJE_PROGRAM_CACHE (use much more ram, but increase speed in some cases)
82 AC_ARG_ENABLE([edje-program-cache],
83    [AC_HELP_STRING(
84        [--enable-edje-program-cache],
85        [enable EDJE_PROGRAM_CACHE support. [[default=disabled]]]
86     )],
87    [want_edje_program_cache=$enableval]
89 AM_CONDITIONAL(EDJE_PROGRAM_CACHE, test "x${want_edje_program_cache}" = "xyes")
91 if test "x${want_edje_program_cache}" = "xyes" ; then
92    AC_DEFINE(EDJE_PROGRAM_CACHE, 1, [Cache result of program glob matches - this uses up extra ram with the gain of faster program matching])
95 install_vim="yes"
96 AC_ARG_WITH([vim],
97     [AC_HELP_STRING([--with-vim=DIR], [Location of Vim data files [[autodetect]]])],
98     [
99      if test -d "${withval}"; then
100         vimdir="${withval}"
101      fi
102     ]
105 if test "x${vimdir}" = "x" ; then
106    if test -d "${prefix}/share/vim"; then
107       vimdir="${prefix}/share/vim"
108    elif test -d "/usr/share/vim"; then
109       vimdir="/usr/share/vim"
110    elif test -d "/usr/local/share/vim"; then
111       vimdir="/usr/local/share/vim"
112    elif test -d "/opt/share/vim"; then
113       vimdir="/opt/share/vim"
114    else
115       install_vim="no"
116    fi
119 AC_MSG_CHECKING([for location of Vim data files])
121 if test "${install_vim}" = "yes"; then
122    AC_MSG_RESULT([$vimdir])
123 else
124    AC_MSG_RESULT([Not found, EDC syntax file will not be installed])
127 AC_SUBST(vimdir)
129 ### Checks for programs
130 AC_PROG_CC
132 # doxygen program for documentation building
134 EFL_CHECK_DOXYGEN([build_doc="yes"], [build_doc="no"])
136 # python
138 AM_PATH_PYTHON([2.5], , [:])
139 AM_CONDITIONAL([HAVE_PYTHON], [test "$PYTHON" != : ])
142 ### Checks for libraries
144 PKG_PROG_PKG_CONFIG
146 # Evil library for compilation on Windows
148 EFL_EDJE_BUILD=""
149 case "$host_os" in
150    mingw* | cegcc*)
151       PKG_CHECK_MODULES([EVIL], [evil])
152       AC_DEFINE(HAVE_EVIL, 1, [Set to 1 if Evil library is installed])
153       requirement_edje="evil ${requirement_edje}"
154       EFL_EDJE_BUILD="-DEFL_EDJE_BUILD"
155    ;;
156 esac
157 AC_SUBST(EFL_EDJE_BUILD)
159 # Dependencies for the library
161 PKG_CHECK_MODULES([EDJE],
162    [
163     eina-0
164     eet >= 1.0.1
165     evas >= 0.9.9
166     ecore >= 0.9.9
167     ecore-job >= 0.9.9
168     embryo >= 0.9.1
169    ]
172 requirement_edje="embryo ecore-job ecore evas eet eina-0 ${requirement_edje}"
174 # Dependencies for the binaries
176 if test "x$have_edje_cc" = "xyes"; then
177    PKG_CHECK_MODULES([ECORE_FILE], [ecore-file >= 0.9.9])
178    PKG_CHECK_MODULES([ECORE_EVAS], [ecore-evas >= 0.9.9])
182 ### Checks for header files
183 AC_CHECK_HEADERS([locale.h])
186 ### Checks for types
189 ### Checks for structures
192 ### Checks for compiler characteristics
193 AM_PROG_CC_C_O
194 AC_C_CONST
195 AC_PROG_CC_STDC
196 AC_HEADER_STDC
197 AC_C___ATTRIBUTE__
199 case "$host_os" in
200    mingw32ce*)
201       EDJE_CFLAGS="${EDJE_CFLAGS} -D_WIN32_WCE=0x0420"
202       ;;
203    cegcc*)
204       EDJE_CFLAGS="${EDJE_CFLAGS} -mwin32 -D_WIN32_WCE=0x0420"
205       ;;
206 esac
209 ### Checks for linker characteristics
211 lt_enable_auto_import=""
212 case "$host_os" in
213    mingw* | cegcc*)
214       lt_enable_auto_import="-Wl,--enable-auto-import"
215       ;;
216 esac
217 AC_SUBST(lt_enable_auto_import)
220 ### Checks for library functions
221 AC_FUNC_ALLOCA
223 case "$host_os" in
224    mingw* | cegcc*)
225       AC_DEFINE(HAVE_REALPATH, 1, [Define to 1 if you have the `realpath' function.])
226       ;;
227    *)
228       AC_CHECK_FUNCS([realpath])
229       ;;
230 esac
233 AC_SUBST(requirement_edje)
235 AC_OUTPUT([
236 edje.pc
237 edje.spec
238 Makefile
239 data/Makefile
240 data/include/Makefile
241 doc/Makefile
242 doc/edje.dox
243 src/Makefile
244 src/lib/Makefile
245 src/bin/Makefile
246 utils/Makefile
250 #####################################################################
251 ## Info
253 echo
254 echo
255 echo
256 echo "------------------------------------------------------------------------"
257 echo "$PACKAGE $VERSION"
258 echo "------------------------------------------------------------------------"
259 echo
260 echo "Configuration Options Summary:"
261 echo
262 echo "  EDJE_PROGRAM_CACHE...: $want_edje_program_cache"
263 echo
264 echo "  Build binaries.......: $have_edje_cc"
265 echo
266 echo "  Documentation........: ${enable_doc}"
267 echo
268 echo "  Compilation..........: make"
269 echo
270 echo "  Installation.........: make install"
271 echo
272 echo "    prefix.............: $prefix"
273 echo