summaryrefslogtreecommitdiff
path: root/legacy/emotion
diff options
context:
space:
mode:
authorVincent Torri <vincent.torri@gmail.com>2010-04-21 19:51:16 +0000
committerVincent Torri <vincent.torri@gmail.com>2010-04-21 19:51:16 +0000
commit00364256fde9c6a4d496fb42294e5fca2d03705f (patch)
tree445bcbb7c6cd50eaec4d7401d284b828cc5ca21c /legacy/emotion
parentc3673ba4817e61ddab45580c7fdb53c2c1b1daa1 (diff)
use a macro for edje external support
SVN revision: 48211
Diffstat (limited to 'legacy/emotion')
-rw-r--r--legacy/emotion/configure.ac25
-rw-r--r--legacy/emotion/m4/efl_edje_external.m448
2 files changed, 50 insertions, 23 deletions
diff --git a/legacy/emotion/configure.ac b/legacy/emotion/configure.ac
index 934a20e64c..66c1f8ea72 100644
--- a/legacy/emotion/configure.ac
+++ b/legacy/emotion/configure.ac
@@ -108,28 +108,7 @@ PKG_CHECK_EXISTS([evas-opengl-x11], [AC_DEFINE(HAVE_EVAS_OPENGL_X11, 1, [Evas Op
108 108
109PKG_CHECK_EXISTS([evas-fb], [AC_DEFINE(HAVE_EVAS_FB, 1, [Evas Framebuffer Engine Support])]) 109PKG_CHECK_EXISTS([evas-fb], [AC_DEFINE(HAVE_EVAS_FB, 1, [Evas Framebuffer Engine Support])])
110 110
111enable_edje_external="yes" 111EFL_EDJE_EXTERNAL([have_edje_external="yes"], [have_edje_external="no"])
112want_edje_external="auto"
113AC_MSG_CHECKING([if should provide Edje EXTERNAL support...])
114AC_ARG_ENABLE([edje-external],
115 [AC_HELP_STRING([--disable-edje-external], [disable providing Edje EXTERNAL support. @<:@default=detect@:>@])],
116 [want_edje_external=$enableval], [])
117AC_MSG_RESULT([${enable_edje_external}])
118if test "x$want_edje_external" != "xno"; then
119 PKG_CHECK_MODULES([EDJE_EXTERNAL],
120 [edje],
121 [enable_edje_external="yes"],
122 [enable_edje_external="no"]
123 )
124else
125 enable_edje_external="no"
126fi
127if test "x$want_edje_external" = "xyes" -a "x$enable_edje_external" = "xno"; then
128 AC_MSG_ERROR([Edje EXTERNAL support requested, but Edje not found by pkg-config.])
129fi
130AM_CONDITIONAL(ENABLE_EDJE_EXTERNAL, test "x$enable_edje_external" = "xyes")
131AC_SUBST(EDJE_EXTERNAL_CFLAGS)
132AC_SUBST(EDJE_EXTERNAL_LIBS)
133 112
134 113
135### Checks for header files 114### Checks for header files
@@ -225,7 +204,7 @@ echo
225echo " Build emotion_test...: $have_emotion_test" 204echo " Build emotion_test...: $have_emotion_test"
226echo " edje_cc..............: ${edje_cc}" 205echo " edje_cc..............: ${edje_cc}"
227echo 206echo
228echo " Edje EXTERNAL support: ${enable_edje_external}" 207echo " Edje EXTERNAL support: ${have_edje_external}"
229echo 208echo
230echo "Compilation............: make (or gmake)" 209echo "Compilation............: make (or gmake)"
231echo " CPPFLAGS.............: $CPPFLAGS" 210echo " CPPFLAGS.............: $CPPFLAGS"
diff --git a/legacy/emotion/m4/efl_edje_external.m4 b/legacy/emotion/m4/efl_edje_external.m4
new file mode 100644
index 0000000000..fb489963d3
--- /dev/null
+++ b/legacy/emotion/m4/efl_edje_external.m4
@@ -0,0 +1,48 @@
1dnl Copyright (C) 2010 Vincent Torri <vtorri at univ-evry dot fr>
2dnl That code is public domain and can be freely used or copied.
3
4dnl Macro that check if edje external should be enabled or not
5
6dnl Usage: EFL_EDJE_EXTERNAL([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
7dnl Call AC_SUBST(EDJE_EXTERNAL_CFLAGS)
8dnl Call AC_SUBST(EDJE_EXTERNAL_LIBS)
9dnl Define conditional ENABLE_EDJE_EXTERNAL
10
11AC_DEFUN([EFL_EDJE_EXTERNAL],
12[
13
14AC_ARG_ENABLE([edje-external],
15 [AC_HELP_STRING([--disable-edje-external],
16 [disable providing Edje EXTERNAL support. @<:@default=enabled@:>@])],
17 [
18 if test "x${enableval}" = "xyes" ; then
19 _efl_want_edje_external="yes"
20 else
21 _efl_want_edje_external="no"
22 fi
23 ],
24 [_efl_want_edje_external="auto"])
25
26AC_MSG_CHECKING([if should provide Edje EXTERNAL support...])
27AC_MSG_RESULT([${_efl_want_edje_external}])
28
29_efl_enable_edje_external="no"
30if ! test "x${_efl_want_edje_external}" = "xno" ; then
31 PKG_CHECK_MODULES([EDJE_EXTERNAL],
32 [edje],
33 [_efl_enable_edje_external="yes"],
34 [_efl_enable_edje_external="no"])
35else
36 AC_SUBST(EDJE_EXTERNAL_CFLAGS)
37 AC_SUBST(EDJE_EXTERNAL_LIBS)
38fi
39
40if test "x${_efl_want_edje_external}" = "xyes" && test "x${_efl_enable_edje_external}" = "xno" ; then
41 AC_MSG_ERROR([Edje EXTERNAL support requested, but Edje not found by pkg-config.])
42fi
43
44AM_CONDITIONAL([ENABLE_EDJE_EXTERNAL], [test "x${_efl_enable_edje_external}" = "xyes"])
45
46AS_IF([test "x${_efl_enable_edje_external}" = "xyes"], [$1], [$2])
47
48])