1 ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
2 ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
3 m4_define([v_maj], [0])
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 || 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([emotion], [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 ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
68 requirement_emotion=""
70 ### Additional options to configure
72 EFL_ENABLE_BIN([emotion-test])
76 AC_ARG_WITH([edje-cc],
77 [AC_HELP_STRING([--with-edje-cc=PATH], [specify a specific path to edje_cc])],
81 echo " Enlightenment edje_cc explicitly set to "$edje_cc;
83 [edje_cc=$(pkg-config --variable=prefix edje)/bin/edje_cc])
87 ### Checks for programs
93 # Check whether pkg-config supports Requires.private
94 if $PKG_CONFIG --atleast-pkgconfig-version 0.22; then
95 pkgconfig_requires_private="Requires.private"
97 pkgconfig_requires_private="Requires"
99 AC_SUBST(pkgconfig_requires_private)
101 # doxygen program for documentation building
103 EFL_CHECK_DOXYGEN([build_doc="yes"], [build_doc="no"])
106 ### Checks for libraries
108 PKG_CHECK_MODULES(EMOTION, [eina >= 1.0.0 evas >= 1.0.0 ecore >= 1.0.0])
109 requirement_emotion="ecore >= 1.0.0 evas >= 1.0.0 eina >= 1.0.0"
111 if test "x${have_emotion_test}" = "xyes" ; then
112 PKG_CHECK_MODULES(EMOTION_BIN, [eina >= 1.0.0 evas >= 1.0.0 ecore >= 1.0.0 ecore-evas >= 1.0.0 edje >= 1.0.0])
115 PKG_CHECK_MODULES(ECORE_X, [ecore-x >= 1.0.0], [have_ecore_x="yes"], [have_ecore_x="no"])
117 PKG_CHECK_MODULES(ECORE_FB, [ecore-fb >= 1.0.0], [have_ecore_fb="yes"], [have_ecore_fb="no"])
119 if test "x${have_ecore_x}" = "xyes" ; then
120 AC_DEFINE(EMOTION_HAVE_ECORE_X, 1, [Define to 1 if Ecore_X is enabled])
123 if test "x${have_ecore_fb}" = "xyes" ; then
124 AC_DEFINE(EMOTION_HAVE_ECORE_FB, 1, [Define to 1 if Ecore_Fb is enabled])
127 PKG_CHECK_EXISTS([evas-software-x11 >= 1.0.0], [AC_DEFINE(HAVE_EVAS_SOFWARE_X11, 1, [Evas Software Xlib Engine Support])])
129 PKG_CHECK_EXISTS([evas-xrender-x11 >= 1.0.0], [AC_DEFINE(HAVE_EVAS_XRENDER_X11, 1, [Evas Software Xlib Engine Support])])
131 PKG_CHECK_EXISTS([evas-opengl-x11 >= 1.0.0], [AC_DEFINE(HAVE_EVAS_OPENGL_X11, 1, [Evas OpenGL Xlib Engine Support])])
133 PKG_CHECK_EXISTS([evas-fb >= 1.0.0], [AC_DEFINE(HAVE_EVAS_FB, 1, [Evas Framebuffer Engine Support])])
135 EFL_EDJE_EXTERNAL([have_edje_external="yes"], [have_edje_external="no"])
137 PKG_CHECK_MODULES(EEZE, [eeze >= 1.0.99], [have_eeze="yes"], [have_eeze="no"])
139 if test "x${have_eeze}" = "xyes"; then
140 AC_DEFINE(EMOTION_HAVE_EEZE, 1, [Define to 1 if Eeze is available])
141 requirement_emotion="${requirement_emotion} eeze >= 1.0.99"
144 ### Checks for header files
150 ### Checks for structures
153 ### Checks for compiler characteristics
162 EMOTION_CPPFLAGS="-D_WIN32_WCE=0x0420"
163 EFL_EMOTION_BUILD="-DEFL_EMOTION_BUILD"
166 EMOTION_CPPFLAGS="-D_WIN32_WINNT=0x0501"
167 EFL_EMOTION_BUILD="-DEFL_EMOTION_BUILD"
170 AC_SUBST(EFL_EMOTION_BUILD)
171 AC_SUBST(EMOTION_CPPFLAGS)
174 ### Checks for linker characteristics
176 # use --enable-auto-import on Windows
178 lt_enable_auto_import=""
181 lt_enable_auto_import="-Wl,--enable-auto-import"
184 AC_SUBST(lt_enable_auto_import)
186 ### Check for extended attribute
192 #include <sys/types.h>
193 #include <sys/xattr.h>
196 size_t tmp = listxattr("/", NULL, 0);
197 tmp = getxattr("/", "user.ethumb.md5", NULL, 0);
198 setxattr("/", "user.ethumb.md5", NULL, 0, 0);
201 AC_DEFINE(HAVE_XATTR, 1, [Define to 1 if you have 'listxattr', 'setxattr' and 'getxattr'])
206 AC_MSG_CHECKING([for Xattr])
207 AC_MSG_RESULT([${have_xattr}])
211 EMOTION_CHECK_MODULE([Xine], [${want_xine}])
212 EMOTION_CHECK_MODULE([Gstreamer], [${want_gstreamer}])
213 EMOTION_CHECK_MODULE([VLC], [${want_vlc}])
216 #if test "x${enable_xine}" = "xno" && test "x${enable_gstreamer}" = "xno" && test "x${enable_vlc}" = "xno" ; then
217 if test "x${enable_xine}" = "xno" && test "x${enable_gstreamer}" = "xno"; then
219 # AC_MSG_ERROR([Xine, Gstreamer or VLC backends must be selected to build Emotion])
220 AC_MSG_ERROR([Xine or Gstreamer backends must be selected to build Emotion])
223 PKG_CHECK_MODULES([EIO],
227 AC_DEFINE(HAVE_EIO, 1, [Use EIO for asynchronous file access])
228 requirement_emotion="eio ${requirement_emotion}"
232 AM_CONDITIONAL([HAVE_EIO], [test "x${have_eio}" = "xyes"])
234 ### install and build examples
236 EFL_CHECK_BUILD_EXAMPLES([enable_build_examples="yes"], [enable_build_examples="no"])
237 EFL_CHECK_INSTALL_EXAMPLES([enable_install_examples="yes"], [enable_install_examples="no"])
239 AC_SUBST(requirement_emotion)
242 #src/modules/vlc/Makefile
251 src/modules/xine/Makefile
252 src/modules/gstreamer/Makefile
253 src/edje_external/Makefile
255 src/examples/Makefile
262 #####################################################################
268 echo "------------------------------------------------------------------------"
269 echo "$PACKAGE $VERSION"
270 echo "------------------------------------------------------------------------"
272 echo "Configuration Options Summary:"
275 echo " Xine...............: ${enable_xine}"
276 #echo " Vlc................: ${enable_vlc}"
277 echo " Gstreamer..........: ${enable_gstreamer}"
279 echo " Build emotion_test...: $have_emotion_test"
280 echo " edje_cc..............: ${edje_cc}"
282 echo " Edje EXTERNAL support: ${have_edje_external}"
284 echo " Xattr................: ${have_xattr}"
285 echo " Eio..................: ${have_eio}"
287 echo "Documentation..........: ${build_doc}"
288 echo "Examples.............: ${enable_build_examples}"
289 echo "Examples installed...: ${enable_install_examples}"
291 echo "Compilation............: make (or gmake)"
292 echo " CPPFLAGS.............: $CPPFLAGS"
293 echo " CFLAGS...............: $CFLAGS"
294 echo " LDFLAGS..............: $LDFLAGS"
296 echo "Installation...........: make install (as root if needed, with 'su' or 'sudo')"
297 echo " prefix...............: $prefix"
299 if test "x${have_static_module}" = "xyes" ; then
300 echo -e "\0033\01331;31mWarning\0033\01331;0m: You are trying to link statically one or more modules to Emotion."
301 echo " You must know what you are doing, or else you will have a lot of problems."
302 echo " And asparagus will disappear from the earth."
303 echo " Think about that."