summaryrefslogtreecommitdiff
path: root/legacy/ecore/m4/ecore_check_module.m4
diff options
context:
space:
mode:
authordoursse <doursse>2008-07-17 05:40:08 +0000
committerdoursse <doursse@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>2008-07-17 05:40:08 +0000
commit0b77c43fb85a36c4a7bc96af1b162e85ba98ddbe (patch)
tree289702876a5fa0d44b4419505515a5bbd2de7428 /legacy/ecore/m4/ecore_check_module.m4
parent913d17fcffcdf2243863ea42042376d93d447d49 (diff)
add ECORE_EVAS_CHECK_MODULE m4 macro to check availability of an ecore evas module
SVN revision: 35136
Diffstat (limited to 'legacy/ecore/m4/ecore_check_module.m4')
-rw-r--r--legacy/ecore/m4/ecore_check_module.m442
1 files changed, 41 insertions, 1 deletions
diff --git a/legacy/ecore/m4/ecore_check_module.m4 b/legacy/ecore/m4/ecore_check_module.m4
index b5b8e5801d..8859c5211f 100644
--- a/legacy/ecore/m4/ecore_check_module.m4
+++ b/legacy/ecore/m4/ecore_check_module.m4
@@ -43,7 +43,7 @@ else
43 AC_MSG_RESULT([no]) 43 AC_MSG_RESULT([no])
44fi 44fi
45 45
46AM_CONDITIONAL(BUILD_ECORE_[]UP, test $have_ecore_[]DOWN = yes) 46AM_CONDITIONAL(BUILD_ECORE_[]UP, test "x$have_ecore_[]DOWN" = "xyes")
47 47
48if test "x$have_ecore_[]DOWN" = "xyes" ; then 48if test "x$have_ecore_[]DOWN" = "xyes" ; then
49 ifelse([$4], , :, [$4]) 49 ifelse([$4], , :, [$4])
@@ -57,3 +57,43 @@ AC_SUBST(ecore_[]DOWN[]_libs)
57popdef([UP]) 57popdef([UP])
58popdef([DOWN]) 58popdef([DOWN])
59]) 59])
60
61dnl use: ECORE_EVAS_CHECK_MODULE(foo-bar, want, description, backend[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
62AC_DEFUN([ECORE_EVAS_CHECK_MODULE],
63[
64pushdef([UP], translit([$1], [-a-z], [_A-Z]))dnl
65pushdef([DOWN], translit([$1], [-A-Z], [_a-z]))dnl
66
67have_ecore_evas_[]DOWN="no"
68want_module="$2"
69
70AC_ARG_ENABLE(ecore-$1,
71 AC_HELP_STRING(
72 [--enable-ecore-evas-$1],
73 [enable $3 support in the ecore_evas module.]
74 ),
75 [ want_module=$enableval ]
76)
77AC_MSG_CHECKING(whether ecore_evas $3 support is to be built)
78AC_MSG_RESULT($want_module)
79
80if test "x$4" = "xyes" -a \
81 "x$have_ecore_evas" = "xyes" -a \
82 "x$want_module" = "xyes" ; then
83 PKG_CHECK_MODULES(EVAS_[]UP, evas-$1,
84 [
85 AC_DEFINE(BUILD_ECORE_EVAS_[]UP, 1, [Support for $3 Engine in Ecore_Evas])
86 have_ecore_evas_[]DOWN="yes";
87 ]
88 )
89fi
90
91if test "x$have_ecore_evas_[]DOWN" = "xyes" ; then
92 ifelse([$5], , :, [$5])
93else
94 ifelse([$6], , :, [$6])
95fi
96
97popdef([UP])
98popdef([DOWN])
99])