summaryrefslogtreecommitdiff
path: root/legacy/ecore/m4/ecore_check_module.m4
diff options
context:
space:
mode:
authordoursse <doursse>2007-03-31 11:11:02 +0000
committerdoursse <doursse@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>2007-03-31 11:11:02 +0000
commitdadd53df2c4125f2f7ef7f8f14dec76e2a803e85 (patch)
tree222793b4096b08a607c02988d8571f245dc8f17f /legacy/ecore/m4/ecore_check_module.m4
parentc38e060fb2cf02c760f71f0a1314bfc4bac6bc50 (diff)
use an m4 macro to check all the modules (except evaso_evas engine modules)
SVN revision: 29282
Diffstat (limited to 'legacy/ecore/m4/ecore_check_module.m4')
-rw-r--r--legacy/ecore/m4/ecore_check_module.m456
1 files changed, 56 insertions, 0 deletions
diff --git a/legacy/ecore/m4/ecore_check_module.m4 b/legacy/ecore/m4/ecore_check_module.m4
new file mode 100644
index 0000000000..8e97ff1434
--- /dev/null
+++ b/legacy/ecore/m4/ecore_check_module.m4
@@ -0,0 +1,56 @@
1dnl use: AC_CHECK_ECORE_MODULE(Foo, default-enabled[, dependancy[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]])
2AC_DEFUN([ECORE_CHECK_MODULE],
3[
4pushdef([UP], translit([$1], [a-z], [A-Z]))dnl
5pushdef([DOWN], translit([$1], [A-Z], [a-z]))dnl
6
7have_ecore_[]DOWN="no"
8ecore_[]DOWN[]_cflags=""
9ecore_[]DOWN[]_libs=""
10
11ifelse("x$2", "xno",
12[
13 AC_ARG_ENABLE(ecore-[]DOWN,
14 AC_HELP_STRING(
15 [--enable-ecore-[]DOWN],
16 [enable the ecore_[]DOWN module. [[default=disabled]]]
17 ),
18 [ want_ecore_[]DOWN=$enableval ],
19 [ want_ecore_[]DOWN=no ])
20],
21[
22 AC_ARG_ENABLE(ecore-[]DOWN,
23 AC_HELP_STRING(
24 [--disable-ecore-[]DOWN],
25 [disable the ecore_[]DOWN module. [[default=enabled]]]
26 ),
27 [ want_ecore_[]DOWN=$enableval ],
28 [ want_ecore_[]DOWN=yes ])
29])
30
31AC_MSG_CHECKING(whether ecore_[]DOWN module is to be built)
32
33if test "x$want_ecore_[]DOWN" = "xyes" ; then
34 if test "x$3" = "x" -o "x$3" = "xyes" ; then
35 have_ecore_[]DOWN="yes"
36 ecore_[]DOWN[]_libs="-lecore_[]DOWN"
37 AC_MSG_RESULT([yes])
38 else
39 AC_MSG_RESULT([no (dependancy failed)])
40 fi
41fi
42
43AM_CONDITIONAL(BUILD_ECORE_[]UP, test $have_ecore_[]DOWN = yes)
44
45if test "x$have_ecore_[]DOWN" = "xyes" ; then
46 ifelse([$4], , :, [$4])
47else
48 ifelse([$5], , :, [$5])
49fi
50
51AC_SUBST(ecore_[]DOWN[]_cflags)
52AC_SUBST(ecore_[]DOWN[]_libs)
53
54popdef([UP])
55popdef([DOWN])
56])