1 ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
2 ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
3 m4_define([v_maj], [1])
4 m4_define([v_min], [0])
5 m4_define([v_mic], [99])
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 ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
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.2.0 evas >= 1.2.0 eet >= 1.6.0 eina >= 1.2.0"
112 PKG_CHECK_MODULES(EMOTION, [${requirement_emotion}])
115 if test "x${have_emotion_test}" = "xyes" ; then
116 PKG_CHECK_MODULES(EMOTION_BIN, [eina >= 1.2.0 evas >= 1.2.0 ecore >= 1.2.0 ecore-evas >= 1.2.0 edje >= 1.2.0])
119 PKG_CHECK_MODULES(ECORE_X, [ecore-x >= 1.2.0 ecore-evas >= 1.2.0], [have_ecore_x="yes"], [have_ecore_x="no"])
121 PKG_CHECK_MODULES(ECORE_FB, [ecore-fb >= 1.2.0], [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.2.0], [AC_DEFINE(HAVE_EVAS_SOFWARE_X11, 1, [Evas Software Xlib Engine Support])])
133 PKG_CHECK_EXISTS([evas-xrender-x11 >= 1.2.0], [AC_DEFINE(HAVE_EVAS_XRENDER_X11, 1, [Evas Software Xlib Engine Support])])
135 PKG_CHECK_EXISTS([evas-opengl-x11 >= 1.2.0], [AC_DEFINE(HAVE_EVAS_OPENGL_X11, 1, [Evas OpenGL Xlib Engine Support])])
137 PKG_CHECK_EXISTS([evas-fb >= 1.2.0], [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.0.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.0.99"
148 PKG_CHECK_MODULES([EIO], [eio >= 1.0.0], [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.0.0 ${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.2.0 ${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 # Check if gstreamer X Overlay is available
190 if test "x${enable_gstreamer}" = "xyes" ; then
191 PKG_CHECK_MODULES([GSTREAMER_INTERFACE],
192 [gstreamer-interfaces-0.10 >= 0.10.34],
193 [build_xoverlay="yes"],
194 [build_xoverlay="no"])
195 if test "x${build_xoverlay}" = "xyes" ; then
196 save_CPPFLAGS=$CPPFLAGS
197 CPPFLAGS="$CPPFLAGS ${GSTREAMER_CFLAGS} ${GSTREAMER_INTERFACE_CFLAGS}"
198 AC_CHECK_HEADER([gst/interfaces/xoverlay.h],
200 AC_DEFINE(HAVE_XOVERLAY_H, 1, [Build with Gstreamer Xoverlay support])
203 [build_xoverlay="no"])
204 CPPFLAGS=$save_CPPFLAGS
206 save_LDFLAGS=${LDFLAGS}
207 LDFLAGS="${LDFLAGS} ${GSTREAMER_INTERFACES}"
208 AC_CHECK_LIB([gstinterfaces-0.10],
209 [gst_x_overlay_set_window_handle],
210 [AC_DEFINE([HAVE_X_OVERLAY_SET], [1], [Use gst_x_overlay_set_window_handle instead of old deprecated gst_x_overlay_set_xwindow_id])])
211 LDFLAGS=$sava_LDFLAGS
215 ### Checks for header files
217 AC_CHECK_HEADERS([unistd.h])
219 # Check for video4linux
221 AC_MSG_CHECKING([for V4L2])
226 #include <linux/videodev2.h>
229 fprintf(stdout, "%i\n", V4L2_CAP_VIDEO_CAPTURE);
232 AC_DEFINE(HAVE_V4L2, 1, [Define to 1 if you have Video4Linux 2 available])
236 AC_MSG_RESULT([${have_v4l2}])
241 ### Checks for structures
244 ### Checks for compiler characteristics
251 EMOTION_CPPFLAGS="-D_WIN32_WCE=0x0420"
252 EFL_EMOTION_BUILD="-DEFL_EMOTION_BUILD"
255 EMOTION_CPPFLAGS="-D_WIN32_WINNT=0x0501"
256 EFL_EMOTION_BUILD="-DEFL_EMOTION_BUILD"
259 AC_SUBST(EFL_EMOTION_BUILD)
260 AC_SUBST(EMOTION_CPPFLAGS)
263 ### Checks for linker characteristics
265 # use --enable-auto-import on Windows
267 lt_enable_auto_import=""
270 lt_enable_auto_import="-Wl,--enable-auto-import"
273 AC_SUBST(lt_enable_auto_import)
276 ### Checks for library functions
282 EMOTION_CHECK_MODULE([Xine], [${want_xine}])
283 EMOTION_CHECK_MODULE([Gstreamer], [${want_gstreamer}])
284 EMOTION_CHECK_MODULE([Generic], [${want_generic}])
286 EMOTION_CHECK_GENERIC_PLAYER([VLC], [${want_generic_vlc}])
288 if test "x${enable_xine}" = "xno" && test "x${enable_gstreamer}" = "xno" && test "x${enable_generic}" = "xno" ; then
289 AC_MSG_ERROR([Xine, Gstreamer or Generic backends must be selected to build Emotion])
293 ### install and build examples
295 EFL_CHECK_BUILD_EXAMPLES([enable_build_examples="yes"], [enable_build_examples="no"])
296 EFL_CHECK_INSTALL_EXAMPLES([enable_install_examples="yes"], [enable_install_examples="no"])
298 AC_SUBST(requirement_emotion)
307 src/modules/xine/Makefile
308 src/modules/gstreamer/Makefile
309 src/modules/generic/Makefile
310 src/edje_external/Makefile
311 src/generic_players/Makefile
312 src/generic_players/vlc/Makefile
314 src/examples/Makefile
321 #####################################################################
327 echo "------------------------------------------------------------------------"
328 echo "$PACKAGE $VERSION"
329 echo "------------------------------------------------------------------------"
331 echo "Configuration Options Summary:"
334 echo " Xine...............: ${enable_xine}"
335 echo " Gstreamer..........: ${enable_gstreamer} (X: ${have_ecore_x}/${build_xoverlay})"
336 echo " Generic............: ${enable_generic}"
338 if test "x${enable_generic}" = "xyes" || test "x${enable_generic}" = "xstatic"; then
340 echo " Generic Players:"
341 echo " VLC................: ${enable_generic_vlc}"
345 echo " Build emotion_test...: $have_emotion_test"
346 echo " edje_cc..............: ${edje_cc}"
348 echo " Edje EXTERNAL support: ${have_edje_external}"
350 echo " Eio..................: ${have_eio}"
351 echo " V4L2.................: ${have_v4l2}"
353 echo "Documentation..........: ${build_doc}"
354 echo "Examples.............: ${enable_build_examples}"
355 echo "Examples installed...: ${enable_install_examples}"
357 echo "Compilation............: make (or gmake)"
358 echo " CPPFLAGS.............: $CPPFLAGS"
359 echo " CFLAGS...............: $CFLAGS"
360 echo " LDFLAGS..............: $LDFLAGS"
362 echo "Installation...........: make install (as root if needed, with 'su' or 'sudo')"
363 echo " prefix...............: $prefix"
365 if test "x${have_static_module}" = "xyes" ; then
366 echo -e "\0033\01331;31mWarning\0033\01331;0m: You are trying to link statically one or more modules to Emotion."
367 echo " You must know what you are doing, or else you will have a lot of problems."
368 echo " And asparagus will disappear from the earth."
369 echo " Think about that."