aboutsummaryrefslogtreecommitdiffstats
path: root/m4
diff options
context:
space:
mode:
authorGustavo Sverzut Barbieri <barbieri@gmail.com>2012-12-07 17:18:17 +0000
committerGustavo Sverzut Barbieri <barbieri@gmail.com>2012-12-07 17:18:17 +0000
commit892c64297ece6c9f1ef1bbb8cdd0355de69133ec (patch)
treedf933358ff4cdf5ca9491c8acf9f1e8a9b9b9c59 /m4
parent65507985183367fc2376daddaa366630fae81431 (diff)
downloadefl-892c64297ece6c9f1ef1bbb8cdd0355de69133ec.tar.gz
efl-892c64297ece6c9f1ef1bbb8cdd0355de69133ec.tar.xz
efl-892c64297ece6c9f1ef1bbb8cdd0355de69133ec.zip
efl: begin (still partial!) to make an uniform choice of engines ecore/evas
still lots to do, but some improvements: - ecore_evas does not inherit pkg-config from modules since modules are SO - renamed internal ecore evas define from SOFTWARE_BUFFER to BUFFER, to make consistent. SVN revision: 80473
Diffstat (limited to 'm4')
-rw-r--r--m4/ecore_check_module.m424
-rw-r--r--m4/evas_check_engine.m4120
2 files changed, 73 insertions, 71 deletions
diff --git a/m4/ecore_check_module.m4 b/m4/ecore_check_module.m4
index 8d0d76bf3..2ceda7944 100644
--- a/m4/ecore_check_module.m4
+++ b/m4/ecore_check_module.m4
@@ -48,6 +48,30 @@ m4_popdef([UP])
m4_popdef([DOWN])
])
+dnl use: ECORE_EVAS_MODULE(name, want, [DEPENDENCY-CHECK-CODE])
+AC_DEFUN([ECORE_EVAS_MODULE],
+[
+m4_pushdef([UP], m4_translit([[$1]], [-a-z], [_A-Z]))dnl
+m4_pushdef([DOWN], m4_translit([[$1]], [-A-Z], [_a-z]))dnl
+
+have_ecore_evas_[]m4_defn([DOWN])="no"
+want_module="$2"
+
+if test "x$have_ecore_evas" = "xyes"; then
+ if test "x$want_module" = "xyes" || test "x$want_module" = "xstatic"; then
+ $3
+
+ AC_DEFINE([BUILD_ECORE_EVAS_]m4_defn([UP]), [1], [Support for $1 Engine in Ecore_Evas])
+ have_ecore_evas_[]m4_defn([DOWN])="yes"
+ fi
+fi
+
+AM_CONDITIONAL([BUILD_ECORE_EVAS_]UP, [test "x$have_ecore_evas_]m4_defn([DOWN])[" = "xyes"])
+
+m4_popdef([UP])
+m4_popdef([DOWN])
+])
+
dnl use: ECORE_EVAS_CHECK_MODULE_FULL(foo-bar, evas-module, want, description, backend[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
AC_DEFUN([ECORE_EVAS_CHECK_MODULE_FULL],
[
diff --git a/m4/evas_check_engine.m4 b/m4/evas_check_engine.m4
index 73623776e..4a654c5b0 100644
--- a/m4/evas_check_engine.m4
+++ b/m4/evas_check_engine.m4
@@ -1,20 +1,4 @@
-dnl use: EVAS_CHECK_ENGINE_DEP_BUFFER(engine, simple, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
-
-AC_DEFUN([EVAS_CHECK_ENGINE_DEP_BUFFER],
-[
-
-have_dep="yes"
-evas_engine_[]$1[]_cflags=""
-evas_engine_[]$1[]_libs=""
-
-AC_SUBST([evas_engine_$1_cflags])
-AC_SUBST([evas_engine_$1_libs])
-
-AS_IF([test "x${have_dep}" = "xyes"], [$4], [$5])
-
-])
-
dnl use: EVAS_CHECK_ENGINE_DEP_SOFTWARE_XLIB(engine, simple, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
AC_DEFUN([EVAS_CHECK_ENGINE_DEP_SOFTWARE_XLIB],
@@ -581,60 +565,6 @@ AS_IF([test "x${have_dep}" = "xyes"], [$4], [$5])
])
-dnl use: EVAS_CHECK_ENGINE_DEP_FB(engine, simple, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
-
-AC_DEFUN([EVAS_CHECK_ENGINE_DEP_FB],
-[
-
-have_dep="no"
-evas_engine_[]$1[]_cflags=""
-evas_engine_[]$1[]_libs=""
-
-AC_CHECK_HEADER([linux/fb.h], [have_dep="yes"])
-
-AC_SUBST([evas_engine_$1_cflags])
-AC_SUBST([evas_engine_$1_libs])
-
-AS_IF([test "x${have_dep}" = "xyes"], [$4], [$5])
-
-])
-
-
-dnl use: EVAS_CHECK_ENGINE_DEP_PSL1GHT(engine, simple, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
-
-AC_DEFUN([EVAS_CHECK_ENGINE_DEP_PSL1GHT],
-[
-
-have_dep="no"
-evas_engine_[]$1[]_cflags=""
-evas_engine_[]$1[]_libs=""
-
-AC_CHECK_HEADER([rsx/rsx.h], [have_dep="yes"])
-
-AC_SUBST([evas_engine_$1_cflags])
-AC_SUBST([evas_engine_$1_libs])
-
-AS_IF([test "x${have_dep}" = "xyes"], [$4], [$5])
-
-])
-
-
-dnl use: EVAS_CHECK_ENGINE_DEP_WAYLAND_SHM(engine, simple, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
-
-AC_DEFUN([EVAS_CHECK_ENGINE_DEP_WAYLAND_SHM],
-[
-
-have_dep="yes"
-evas_engine_[]$1[]_cflags=""
-evas_engine_[]$1[]_libs=""
-
-AC_SUBST([evas_engine_$1_cflags])
-AC_SUBST([evas_engine_$1_libs])
-
-AS_IF([test "x${have_dep}" = "xyes"], [$4], [$5])
-
-])
-
dnl use: EVAS_CHECK_ENGINE_DEP_WAYLAND_EGL(engine, simple, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
@@ -678,9 +608,57 @@ AS_IF([test "x${have_dep}" = "xyes"], [$4], [$5])
])
-dnl use: EVAS_CHECK_ENGINE(engine, want_engine, simple, description)
+dnl use: EVAS_ENGINE(name, want_engine, [DEPENDENCY-CHECK-CODE])
+dnl
+dnl defines BUILD_ENGINE_NAME if it should be built
+dnl defines BUILD_STATIC_BUILD_NAME if should be built statically
+dnl
+dnl will call DEPENDENCY-CHECK-CODE if it should be built,
+dnl if some dependency fail just call AC_MSG_ERROR() to abort.
+AC_DEFUN([EVAS_ENGINE],
+[
+m4_pushdef([UP], m4_translit([$1], [-a-z], [_A-Z]))dnl
+m4_pushdef([DOWN], m4_translit([$1], [-A-Z], [_a-z]))dnl
+want_engine="$2"
+want_static_engine="no"
+have_engine="no"
+have_evas_engine_[]DOWN="no"
+
+evas_engine_[]m4_defn([DOWN])[]_cflags=""
+evas_engine_[]m4_defn([DOWN])[]_libs=""
+
+if test "x${want_engine}" = "xyes" -o "x${want_engine}" = "xstatic"; then
+ $3
+
+ have_engine="yes"
+ if test "x${want_engine}" = "xstatic" ; then
+ have_evas_engine_[]DOWN="static"
+ want_static_engine="yes"
+ else
+ have_evas_engine_[]DOWN="yes"
+ fi
+fi
+
+AC_DEFINE_IF(BUILD_ENGINE_[]UP, [test "${have_engine}" = "yes"],
+ [1], [Build $1 Evas engine])
+AM_CONDITIONAL(BUILD_ENGINE_[]UP, [test "${have_engine}" = "yes"])
+
+AC_DEFINE_IF(EVAS_STATIC_BUILD_[]UP, [test "${want_static_engine}" = "yes"],
+ [1], [Build $1 Evas engine inside libevas])
+AM_CONDITIONAL(EVAS_STATIC_BUILD_[]UP, [test "${want_static_engine}" = "yes"])
+
+AC_SUBST([evas_engine_]m4_defn([DOWN])[_cflags])
+AC_SUBST([evas_engine_]m4_defn([DOWN])[_libs])
+
+m4_popdef([UP])
+m4_popdef([DOWN])
+])
+
+
+
+dnl use: EVAS_CHECK_ENGINE(engine, want_engine, simple, description)
AC_DEFUN([EVAS_CHECK_ENGINE],
[