summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorGustavo Sverzut Barbieri <barbieri@gmail.com>2013-01-10 03:43:32 +0000
committerGustavo Sverzut Barbieri <barbieri@gmail.com>2013-01-10 03:43:32 +0000
commitdfb84c1657bfb14a5236b881193b81f4c0b8a69b (patch)
treeb51b210fc88a21eec8e5907b8bbfe12ebc669f90 /m4
parent532284dbbe4259a9f2291f44d3eff376849e8031 (diff)
efl: merge emotion.
this one was quite a huge work, but hopefully it's correct. NOTES: * removed vlc generic module, it should go into a separate package. * gstreamer is enabled by default (see --disable-gstreamer) * xine is disabled by default (see --enable-gstreamer) * generic is always built statically if supported * gstreamer and xine can't be configured as static (just lacks command line options, build system supports it) * v4l2 is enabled by default on linux if eeze is built (see --disable-v4l2) * emotion_test moved to src/tests/emotion and depends on EFL_ENABLE_TESTS (--with-tests), but is still installed if enabled. TODO (need your help!): * fix warnings with gstreamer and xine engine * call engine shutdown functions if building as static * remove direct usage of PACKAGE_*_DIR and use eina_prefix * add eina_prefix checkme file as evas and others * add support for $EFL_RUN_IN_TREE * create separate package for emotion_generic_modules * check docs hierarchy (doxygen is segv'in here) SVN revision: 82501
Diffstat (limited to 'm4')
-rw-r--r--m4/emotion_module.m496
1 files changed, 96 insertions, 0 deletions
diff --git a/m4/emotion_module.m4 b/m4/emotion_module.m4
new file mode 100644
index 0000000..a7064de
--- /dev/null
+++ b/m4/emotion_module.m4
@@ -0,0 +1,96 @@
1dnl use: EMOTION_MODULE_DEP_CHECK_XINE(want_engine)
2dnl where want_engine = yes or static
3AC_DEFUN([EMOTION_MODULE_DEP_CHECK_XINE],
4[dnl
5 requirements="libxine >= 1.1.1"
6 if test "$1" = "static"; then
7 EFL_DEPEND_PKG([EMOTION], [EMOTION_MODULE_XINE], [${requirements}])
8 else
9 PKG_CHECK_MODULES([EMOTION_MODULE_XINE], [${requirements}])
10 fi
11])
12
13dnl use: EMOTION_MODULE_DEP_CHECK_GSTREAMER(want_static)
14dnl where want_engine = yes or static
15AC_DEFUN([EMOTION_MODULE_DEP_CHECK_GSTREAMER],
16[dnl
17 GST_VER=0.10.2
18 requirements="gstreamer-0.10 >= ${GST_VER} gstreamer-plugins-base-0.10 >= ${GST_VER} gstreamer-video-0.10 >= ${GST_VER} gstreamer-interfaces-0.10 >= ${GST_VER}"
19 have_gst_xoverlay="no"
20 if test "$1" = "static"; then
21 EFL_DEPEND_PKG([EMOTION], [EMOTION_MODULE_GSTREAMER], [${requirements}])
22 else
23 PKG_CHECK_MODULES([EMOTION_MODULE_GSTREAMER], [${requirements}])
24 fi
25
26 if test "${want_x11_any}" = "yes"; then
27 if test "$1" = "static"; then # we need gstreamer cflags and libs to test xoverlay support
28 PKG_CHECK_MODULES([EMOTION_MODULE_GSTREAMER], [${requirements}])
29 fi
30 CFLAGS_save="${CFLAGS}"
31 CFLAGS="${CFLAGS} ${EMOTION_MODULE_GSTREAMER_CFLAGS}"
32 AC_CHECK_HEADER([gst/interfaces/xoverlay.h],
33 [have_gst_xoverlay="old" # will check for "new" later with AC_CHECK_LIB()
34 AC_DEFINE(HAVE_XOVERLAY_H, 1, [Build with Gstreamer Xoverlay support])],
35 [AC_MSG_WARN([Building Gstreamer with X11 but no gst/interfaces/xoverlay.h found])],
36 [#include <gst/gst.h>])
37 CFLAGS="${CFLAGS_save}"
38
39 LDFLAGS_save=${LDFLAGS}
40 LDFLAGS="${LDFLAGS} ${EMOTION_MODULE_GSTREAMER_LIBS}"
41 AC_CHECK_LIB([gstinterfaces-0.10], [gst_x_overlay_set_window_handle],
42 [have_gst_xoverlay="new"
43 AC_DEFINE([HAVE_X_OVERLAY_SET], [1], [Use gst_x_overlay_set_window_handle instead of old deprecated gst_x_overlay_set_xwindow_id])])
44 LDFLAGS="${LDFLAGS_save}"
45 fi
46])
47
48dnl use: EMOTION_MODULE_DEP_CHECK_GENERIC(want_static)
49dnl where want_engine = yes or static
50AC_DEFUN([EMOTION_MODULE_DEP_CHECK_GENERIC], [])
51
52dnl use: EMOTION_MODULE(name, want_engine)
53dnl
54dnl defines EMOTION_BUILD_NAME if it should be built
55dnl defines EMOTION_STATIC_BUILD_NAME if should be built statically
56dnl
57AC_DEFUN([EMOTION_MODULE],
58[
59m4_pushdef([UP], m4_translit([$1], [-a-z], [_A-Z]))dnl
60m4_pushdef([DOWN], m4_translit([$1], [-A-Z], [_a-z]))dnl
61
62want_engine="$2"
63want_static_engine="no"
64have_engine="no"
65have_emotion_module_[]DOWN="no"
66
67EMOTION_MODULE_[]m4_defn([UP])[]_CFLAGS=""
68EMOTION_MODULE_[]m4_defn([UP])[]_LIBS=""
69
70if test "x${want_engine}" = "xyes" -o "x${want_engine}" = "xstatic"; then
71
72 m4_default([EMOTION_MODULE_DEP_CHECK_]m4_defn([UP]))([${want_engine}])
73
74 have_engine="yes"
75 if test "x${want_engine}" = "xstatic" ; then
76 have_emotion_module_[]DOWN="static"
77 want_static_engine="yes"
78 else
79 have_emotion_module_[]DOWN="yes"
80 fi
81fi
82
83AC_DEFINE_IF(EMOTION_BUILD_[]UP, [test "${have_engine}" = "yes"],
84 [1], [Build $1 Evas engine])
85AM_CONDITIONAL(EMOTION_BUILD_[]UP, [test "${have_engine}" = "yes"])
86
87AC_DEFINE_IF(EMOTION_STATIC_BUILD_[]UP, [test "${want_static_engine}" = "yes"],
88 [1], [Build $1 Evas engine inside libevas])
89AM_CONDITIONAL(EMOTION_STATIC_BUILD_[]UP, [test "${want_static_engine}" = "yes"])
90
91AC_SUBST([EMOTION_MODULE_]m4_defn([UP])[_CFLAGS])
92AC_SUBST([EMOTION_MODULE_]m4_defn([UP])[_LIBS])
93
94m4_popdef([UP])
95m4_popdef([DOWN])
96])