aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/libraries/eina/m4/eina_check.m4
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--libraries/eina/m4/eina_check.m448
1 files changed, 48 insertions, 0 deletions
diff --git a/libraries/eina/m4/eina_check.m4 b/libraries/eina/m4/eina_check.m4
new file mode 100644
index 0000000..f8a4f8c
--- /dev/null
+++ b/libraries/eina/m4/eina_check.m4
@@ -0,0 +1,48 @@
1dnl use: EINA_CHECK_MODULE(foo-bar, have_dependency, description)
2AC_DEFUN([EINA_CHECK_MODULE],
3[
4m4_pushdef([UP], m4_translit([$1], [-a-z], [_A-Z]))dnl
5m4_pushdef([DOWN], m4_translit([$1], [-A-Z], [_a-z]))dnl
6
7AC_ARG_ENABLE([mempool-$1],
8 [AC_HELP_STRING([--enable-mempool-$1], [enable build of $3 @<:@default=$2@:>@])],
9 [
10 if test "x${enableval}" = "xyes" ; then
11 enable_module="yes"
12 else
13 if test "x${enableval}" = "xstatic" ; then
14 enable_module="static"
15 else
16 enable_module="no"
17 fi
18 fi
19 ],
20 [enable_module=$2])
21
22have_module="no"
23if test "x${enable_module}" = "xyes" || test "x${enable_module}" = "xstatic" ; then
24 have_module="yes"
25fi
26
27AC_MSG_CHECKING([whether to enable $3 built])
28AC_MSG_RESULT([${have_module}])
29
30static_module="no"
31if test "x${enable_module}" = "xstatic" ; then
32 static_module="yes"
33 have_static_module="yes"
34 AC_DEFINE(EINA_STATIC_BUILD_[]UP, 1, [Set to 1 if $2 is statically built])
35fi
36
37if ! test "x${enable_module}" = "xno" ; then
38 AC_DEFINE(EINA_BUILD_[]UP, 1, [Set to 1 if $2 is built])
39fi
40
41AM_CONDITIONAL(EINA_BUILD_[]UP, [test "x${have_module}" = "xyes"])
42AM_CONDITIONAL(EINA_STATIC_BUILD_[]UP, [test "x${static_module}" = "xyes"])
43
44enable_[]DOWN=${enable_module}
45
46m4_popdef([UP])
47m4_popdef([DOWN])
48])