1 ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
2 ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
3 m4_define([v_maj], [1])
4 m4_define([v_min], [2])
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 ver-pre-svn-07])
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([embryo], [v_ver]-beta, [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 ### Default options with respect to host
66 embryoincludedir="${datadir}/include"
69 ### Additional options to configure
71 EFL_ENABLE_BIN([embryo-cc])
74 ### Checks for programs
77 # doxygen program for documentation building
79 EFL_CHECK_DOXYGEN([build_doc="yes"], [build_doc="no"])
85 # Check whether pkg-config supports Requires.private
86 if $PKG_CONFIG --atleast-pkgconfig-version 0.22; then
87 pkgconfig_requires_private="Requires.private"
89 pkgconfig_requires_private="Requires"
91 AC_SUBST(pkgconfig_requires_private)
94 ### Checks for libraries
96 # Evil library for compilation on Windows
101 PKG_CHECK_MODULES([EVIL], [evil >= 1.0.0])
102 AC_DEFINE(HAVE_EVIL, 1, [Set to 1 if Evil library is installed])
103 requirement_embryo="evil ${requirement_embryo}"
104 EFL_EMBRYO_BUILD="-DEFL_EMBRYO_BUILD"
107 AC_SUBST(EFL_EMBRYO_BUILD)
109 # For embryo_cc_prefix.c
110 PKG_CHECK_MODULES([EINA], [eina >= 1.2.0])
112 ### Checks for portability layer
114 PKG_CHECK_MODULES([EXOTIC],
116 [enable_exotic="yes"],
117 [enable_exotic="no"])
119 if test "x${enable_exotic}" = "xyes"; then
120 requirement_embryo="exotic ${requirement_embryo}"
122 AC_DEFINE([HAVE_EXOTIC], [1], [Define to 1 if you have Exotic.])
125 ### Checks for header files
127 AC_CHECK_HEADERS([unistd.h])
134 ### Checks for structures
137 ### Checks for compiler characteristics
150 EMBRYO_CPPFLAGS="-D_WIN32_WCE=0x0420"
153 AC_SUBST(EMBRYO_CPPFLAGS)
154 AC_SUBST(EMBRYO_CFLAGS)
157 ### Checks for linker characteristics
159 lt_enable_auto_import=""
162 lt_enable_auto_import="-Wl,--enable-auto-import"
165 AC_SUBST(lt_enable_auto_import)
168 ### Checks for library functions
176 EFL_CHECK_FNMATCH([], [AC_MSG_ERROR([Cannot find fnmatch()])])
179 EFL_CHECK_GETTIMEOFDAY([], [AC_MSG_ERROR([Cannot find gettimeofday()])])
182 AC_SUBST(requirement_embryo)
183 AC_SUBST(embryoincludedir)
199 #####################################################################
205 echo "------------------------------------------------------------------------"
206 echo "$PACKAGE $VERSION"
207 echo "------------------------------------------------------------------------"
209 echo "Configuration Options Summary:"
211 echo " Build embryo_cc......: $have_embryo_cc"
213 echo " Documentation........: ${build_doc}"
215 echo "Compilation............: make (or gmake)"
216 echo " CPPFLAGS.............: $CPPFLAGS"
217 echo " CFLAGS...............: $CFLAGS"
218 echo " LDFLAGS..............: $LDFLAGS"
220 echo "Installation...........: make install (as root if needed, with 'su' or 'sudo')"
221 echo " prefix...............: $prefix"