1 ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
2 ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
3 m4_define([v_maj], [1])
4 m4_define([v_min], [7])
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 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 ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
67 want_generic_vlc="yes"
71 requirement_emotion=""
73 ### Additional options to configure
75 EFL_ENABLE_BIN([emotion-test])
79 AC_ARG_WITH([edje-cc],
80 [AC_HELP_STRING([--with-edje-cc=PATH], [specify a specific path to edje_cc])],
84 echo " Enlightenment edje_cc explicitly set to "$edje_cc;
86 [edje_cc=$(pkg-config --variable=prefix edje)/bin/edje_cc])
90 ### Checks for programs
96 # Check whether pkg-config supports Requires.private
97 if $PKG_CONFIG --atleast-pkgconfig-version 0.22; then
98 pkgconfig_requires_private="Requires.private"
100 pkgconfig_requires_private="Requires"
102 AC_SUBST(pkgconfig_requires_private)
104 # doxygen program for documentation building
106 EFL_CHECK_DOXYGEN([build_doc="yes"], [build_doc="no"])
109 ### Checks for libraries
111 requirement_emotion="ecore >= 1.6.99 evas >= 1.6.99 eet >= 1.6.99 eina >= 1.6.99"
112 PKG_CHECK_MODULES(EMOTION, [${requirement_emotion}])
115 if test "x${have_emotion_test}" = "xyes" ; then
116 PKG_CHECK_MODULES(EMOTION_BIN, [eina >= 1.6.99 evas >= 1.6.99 ecore >= 1.6.99 ecore-evas >= 1.6.99 edje >= 1.6.99])
119 PKG_CHECK_MODULES(ECORE_X, [ecore-x >= 1.6.99 ecore-evas >= 1.6.99], [have_ecore_x="yes"], [have_ecore_x="no"])
121 PKG_CHECK_MODULES(ECORE_FB, [ecore-fb >= 1.6.99], [have_ecore_fb="yes"], [have_ecore_fb="no"])
123 if test "x${have_ecore_x}" = "xyes" ; then
124 AC_DEFINE(EMOTION_HAVE_ECORE_X, 1, [Define to 1 if Ecore_X is enabled])
127 if test "x${have_ecore_fb}" = "xyes" ; then
128 AC_DEFINE(EMOTION_HAVE_ECORE_FB, 1, [Define to 1 if Ecore_Fb is enabled])
131 PKG_CHECK_EXISTS([evas-software-x11 >= 1.6.99], [AC_DEFINE(HAVE_EVAS_SOFWARE_X11, 1, [Evas Software Xlib Engine Support])])
133 PKG_CHECK_EXISTS([evas-xrender-x11 >= 1.6.99], [AC_DEFINE(HAVE_EVAS_XRENDER_X11, 1, [Evas Software Xlib Engine Support])])
135 PKG_CHECK_EXISTS([evas-opengl-x11 >= 1.6.99], [AC_DEFINE(HAVE_EVAS_OPENGL_X11, 1, [Evas OpenGL Xlib Engine Support])])
137 PKG_CHECK_EXISTS([evas-fb >= 1.6.99], [AC_DEFINE(HAVE_EVAS_FB, 1, [Evas Framebuffer Engine Support])])
139 EFL_EDJE_EXTERNAL([have_edje_external="yes"], [have_edje_external="no"])
141 PKG_CHECK_MODULES(EEZE, [eeze >= 1.6.99], [have_eeze="yes"], [have_eeze="no"])
143 if test "x${have_eeze}" = "xyes"; then
144 AC_DEFINE(EMOTION_HAVE_EEZE, 1, [Define to 1 if Eeze is available])
145 requirement_emotion="${requirement_emotion} eeze >= 1.6.99"
148 PKG_CHECK_MODULES([EIO], [eio >= 1.6.99], [have_eio="yes"], [have_eio="no"])
149 if test "x${have_eio}" = "xyes"; then
150 AC_DEFINE(HAVE_EIO, 1, [Use EIO for asynchronous file access])
151 requirement_emotion="eio >= 1.6.99 ${requirement_emotion}"
154 AM_CONDITIONAL([HAVE_EIO], [test "x${have_eio}" = "xyes"])
156 # ecore-x availability, used for XV, VAAPI, VDPAU output.
159 AC_ARG_ENABLE([ecore-x],
160 [AC_HELP_STRING([--disable-ecore-x], [disable ecore-x support. @<:@default=detect@:>@])],
162 if test "x${enableval}" = "xyes" || test "x${enableval}" = "xauto" ; then
163 want_ecore_x=${enableval}
168 [want_ecore_x="auto"])
170 if ! test "x$want_ecore_x" = "xno" ; then
171 PKG_CHECK_MODULES([ECORE_X],
174 AC_DEFINE(HAVE_ECORE_X, 1, [X11 support for Ecore])
176 requirement_elm="ecore-x >= 1.6.99 ${requirement_elm}"
184 if test "x$want_ecore_x" = "xyes" && test "x$have_ecore_x" = "xno" ; then
185 AC_MSG_ERROR([ecore-x support requested, but not found by pkg-config.])
188 ### Checks for header files
190 AC_CHECK_HEADERS([unistd.h])
192 # Check for video4linux
194 AC_MSG_CHECKING([for V4L2])
199 #include <linux/videodev2.h>
202 fprintf(stdout, "%i\n", V4L2_CAP_VIDEO_CAPTURE);
205 AC_DEFINE(HAVE_V4L2, 1, [Define to 1 if you have Video4Linux 2 available])
209 AC_MSG_RESULT([${have_v4l2}])
214 ### Checks for structures
217 ### Checks for compiler characteristics
224 EMOTION_CPPFLAGS="-D_WIN32_WCE=0x0420"
225 EFL_EMOTION_BUILD="-DEFL_EMOTION_BUILD"
228 EMOTION_CPPFLAGS="-D_WIN32_WINNT=0x0501"
229 EFL_EMOTION_BUILD="-DEFL_EMOTION_BUILD"
232 AC_SUBST(EFL_EMOTION_BUILD)
233 AC_SUBST(EMOTION_CPPFLAGS)
236 ### Checks for linker characteristics
238 # use --enable-auto-import on Windows
240 lt_enable_auto_import=""
243 lt_enable_auto_import="-Wl,--enable-auto-import"
246 AC_SUBST(lt_enable_auto_import)
249 ### Checks for library functions
255 EMOTION_CHECK_MODULE([Xine], [${want_xine}])
256 EMOTION_CHECK_MODULE([Gstreamer], [${want_gstreamer}])
257 EMOTION_CHECK_MODULE([Generic], [${want_generic}])
259 EMOTION_CHECK_GENERIC_PLAYER([VLC], [${want_generic_vlc}])
261 if test "x${enable_xine}" = "xno" && test "x${enable_gstreamer}" = "xno" && test "x${enable_generic}" = "xno" ; then
262 AC_MSG_ERROR([Xine, Gstreamer or Generic backends must be selected to build Emotion])
265 # Check if gstreamer X Overlay is available
267 if test "x${enable_gstreamer}" = "xyes" ; then
268 PKG_CHECK_MODULES([GSTREAMER_INTERFACE],
269 [gstreamer-interfaces-0.10 >= 0.10.34],
270 [build_xoverlay="yes"],
271 [build_xoverlay="no"])
272 if test "x${build_xoverlay}" = "xyes" ; then
273 save_CPPFLAGS=$CPPFLAGS
274 CPPFLAGS="$CPPFLAGS ${GSTREAMER_CFLAGS} ${GSTREAMER_INTERFACE_CFLAGS}"
275 AC_CHECK_HEADER([gst/interfaces/xoverlay.h],
277 AC_DEFINE(HAVE_XOVERLAY_H, 1, [Build with Gstreamer Xoverlay support])
280 [build_xoverlay="no"])
281 CPPFLAGS=$save_CPPFLAGS
283 save_LDFLAGS=${LDFLAGS}
284 LDFLAGS="${LDFLAGS} ${GSTREAMER_INTERFACES}"
285 AC_CHECK_LIB([gstinterfaces-0.10],
286 [gst_x_overlay_set_window_handle],
287 [AC_DEFINE([HAVE_X_OVERLAY_SET], [1], [Use gst_x_overlay_set_window_handle instead of old deprecated gst_x_overlay_set_xwindow_id])])
288 LDFLAGS=$sava_LDFLAGS
292 ### install and build examples
294 EFL_CHECK_BUILD_EXAMPLES([enable_build_examples="yes"], [enable_build_examples="no"])
295 EFL_CHECK_INSTALL_EXAMPLES([enable_install_examples="yes"], [enable_install_examples="no"])
297 AC_SUBST(requirement_emotion)
306 src/modules/xine/Makefile
307 src/modules/gstreamer/Makefile
308 src/modules/generic/Makefile
309 src/edje_external/Makefile
310 src/generic_players/Makefile
311 src/generic_players/vlc/Makefile
313 src/examples/Makefile
320 #####################################################################
326 echo "------------------------------------------------------------------------"
327 echo "$PACKAGE $VERSION"
328 echo "------------------------------------------------------------------------"
330 echo "Configuration Options Summary:"
333 echo " Xine...............: ${enable_xine}"
334 echo " Gstreamer..........: ${enable_gstreamer} (X: ${have_ecore_x}/${build_xoverlay})"
335 echo " Generic............: ${enable_generic}"
337 if test "x${enable_generic}" = "xyes" || test "x${enable_generic}" = "xstatic"; then
339 echo " Generic Players:"
340 echo " VLC................: ${enable_generic_vlc}"
344 echo " Build emotion_test...: $have_emotion_test"
345 echo " edje_cc..............: ${edje_cc}"
347 echo " Edje EXTERNAL support: ${have_edje_external}"
349 echo " Eio..................: ${have_eio}"
350 echo " V4L2.................: ${have_v4l2}"
352 echo "Documentation..........: ${build_doc}"
353 echo "Examples.............: ${enable_build_examples}"
354 echo "Examples installed...: ${enable_install_examples}"
356 echo "Compilation............: make (or gmake)"
357 echo " CPPFLAGS.............: $CPPFLAGS"
358 echo " CFLAGS...............: $CFLAGS"
359 echo " LDFLAGS..............: $LDFLAGS"
361 echo "Installation...........: make install (as root if needed, with 'su' or 'sudo')"
362 echo " prefix...............: $prefix"
364 if test "x${have_static_module}" = "xyes" ; then
365 echo -e "\0033\01331;31mWarning\0033\01331;0m: You are trying to link statically one or more modules to Emotion."
366 echo " You must know what you are doing, or else you will have a lot of problems."
367 echo " And asparagus will disappear from the earth."
368 echo " Think about that."