diff options
author | Vincent Torri <vincent.torri@gmail.com> | 2010-04-21 19:51:16 +0000 |
---|---|---|
committer | Vincent Torri <vincent.torri@gmail.com> | 2010-04-21 19:51:16 +0000 |
commit | 00364256fde9c6a4d496fb42294e5fca2d03705f (patch) | |
tree | 445bcbb7c6cd50eaec4d7401d284b828cc5ca21c /legacy/emotion | |
parent | c3673ba4817e61ddab45580c7fdb53c2c1b1daa1 (diff) |
use a macro for edje external support
SVN revision: 48211
Diffstat (limited to 'legacy/emotion')
-rw-r--r-- | legacy/emotion/configure.ac | 25 | ||||
-rw-r--r-- | legacy/emotion/m4/efl_edje_external.m4 | 48 |
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 | ||
109 | PKG_CHECK_EXISTS([evas-fb], [AC_DEFINE(HAVE_EVAS_FB, 1, [Evas Framebuffer Engine Support])]) | 109 | PKG_CHECK_EXISTS([evas-fb], [AC_DEFINE(HAVE_EVAS_FB, 1, [Evas Framebuffer Engine Support])]) |
110 | 110 | ||
111 | enable_edje_external="yes" | 111 | EFL_EDJE_EXTERNAL([have_edje_external="yes"], [have_edje_external="no"]) |
112 | want_edje_external="auto" | ||
113 | AC_MSG_CHECKING([if should provide Edje EXTERNAL support...]) | ||
114 | AC_ARG_ENABLE([edje-external], | ||
115 | [AC_HELP_STRING([--disable-edje-external], [disable providing Edje EXTERNAL support. @<:@default=detect@:>@])], | ||
116 | [want_edje_external=$enableval], []) | ||
117 | AC_MSG_RESULT([${enable_edje_external}]) | ||
118 | if 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 | ) | ||
124 | else | ||
125 | enable_edje_external="no" | ||
126 | fi | ||
127 | if 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.]) | ||
129 | fi | ||
130 | AM_CONDITIONAL(ENABLE_EDJE_EXTERNAL, test "x$enable_edje_external" = "xyes") | ||
131 | AC_SUBST(EDJE_EXTERNAL_CFLAGS) | ||
132 | AC_SUBST(EDJE_EXTERNAL_LIBS) | ||
133 | 112 | ||
134 | 113 | ||
135 | ### Checks for header files | 114 | ### Checks for header files |
@@ -225,7 +204,7 @@ echo | |||
225 | echo " Build emotion_test...: $have_emotion_test" | 204 | echo " Build emotion_test...: $have_emotion_test" |
226 | echo " edje_cc..............: ${edje_cc}" | 205 | echo " edje_cc..............: ${edje_cc}" |
227 | echo | 206 | echo |
228 | echo " Edje EXTERNAL support: ${enable_edje_external}" | 207 | echo " Edje EXTERNAL support: ${have_edje_external}" |
229 | echo | 208 | echo |
230 | echo "Compilation............: make (or gmake)" | 209 | echo "Compilation............: make (or gmake)" |
231 | echo " CPPFLAGS.............: $CPPFLAGS" | 210 | echo " 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 @@ | |||
1 | dnl Copyright (C) 2010 Vincent Torri <vtorri at univ-evry dot fr> | ||
2 | dnl That code is public domain and can be freely used or copied. | ||
3 | |||
4 | dnl Macro that check if edje external should be enabled or not | ||
5 | |||
6 | dnl Usage: EFL_EDJE_EXTERNAL([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]) | ||
7 | dnl Call AC_SUBST(EDJE_EXTERNAL_CFLAGS) | ||
8 | dnl Call AC_SUBST(EDJE_EXTERNAL_LIBS) | ||
9 | dnl Define conditional ENABLE_EDJE_EXTERNAL | ||
10 | |||
11 | AC_DEFUN([EFL_EDJE_EXTERNAL], | ||
12 | [ | ||
13 | |||
14 | AC_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 | |||
26 | AC_MSG_CHECKING([if should provide Edje EXTERNAL support...]) | ||
27 | AC_MSG_RESULT([${_efl_want_edje_external}]) | ||
28 | |||
29 | _efl_enable_edje_external="no" | ||
30 | if ! 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"]) | ||
35 | else | ||
36 | AC_SUBST(EDJE_EXTERNAL_CFLAGS) | ||
37 | AC_SUBST(EDJE_EXTERNAL_LIBS) | ||
38 | fi | ||
39 | |||
40 | if 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.]) | ||
42 | fi | ||
43 | |||
44 | AM_CONDITIONAL([ENABLE_EDJE_EXTERNAL], [test "x${_efl_enable_edje_external}" = "xyes"]) | ||
45 | |||
46 | AS_IF([test "x${_efl_enable_edje_external}" = "xyes"], [$1], [$2]) | ||
47 | |||
48 | ]) | ||