summaryrefslogtreecommitdiff
path: root/m4/eina_check.m4
diff options
context:
space:
mode:
authorVincent Torri <vincent.torri@gmail.com>2012-09-16 10:57:48 +0000
committerVincent Torri <vincent.torri@gmail.com>2012-09-16 10:57:48 +0000
commit785f2a6b3a70454ecfe94addc6480ebf20c44c13 (patch)
tree17a195d2c1f022cd480fd0e0b95be5035ad915e2 /m4/eina_check.m4
parentdfc0331373c3f98df7cb996abc588c7dcf44af0a (diff)
merge : add eina
currently, examples, tests and benchmark are not set. That's the next things i'll do SVN revision: 76710
Diffstat (limited to 'm4/eina_check.m4')
-rw-r--r--m4/eina_check.m450
1 files changed, 50 insertions, 0 deletions
diff --git a/m4/eina_check.m4 b/m4/eina_check.m4
new file mode 100644
index 0000000..9f4ffce
--- /dev/null
+++ b/m4/eina_check.m4
@@ -0,0 +1,50 @@
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
7default_value=$2
8
9AC_ARG_ENABLE([mempool-$1],
10 [AC_HELP_STRING([--enable-mempool-$1], [enable build of $3 @<:@default=$@:>@])],
11 [
12 if test "x${enableval}" = "xyes" ; then
13 enable_module="yes"
14 else
15 if test "x${enableval}" = "xstatic" ; then
16 enable_module="static"
17 else
18 enable_module="no"
19 fi
20 fi
21 ],
22 [enable_module=$2])
23
24have_module="no"
25if test "x${enable_module}" = "xyes" || test "x${enable_module}" = "xstatic" ; then
26 have_module="yes"
27fi
28
29AC_MSG_CHECKING([whether to enable $3 built])
30AC_MSG_RESULT([${have_module}])
31
32static_module="no"
33if test "x${enable_module}" = "xstatic" ; then
34 static_module="yes"
35 have_static_module="yes"
36 AC_DEFINE(EINA_STATIC_BUILD_[]UP, 1, [Set to 1 if $2 is statically built])
37fi
38
39if ! test "x${enable_module}" = "xno" ; then
40 AC_DEFINE(EINA_BUILD_[]UP, 1, [Set to 1 if $2 is built])
41fi
42
43AM_CONDITIONAL(EINA_BUILD_[]UP, [test "x${have_module}" = "xyes"])
44AM_CONDITIONAL(EINA_STATIC_BUILD_[]UP, [test "x${static_module}" = "xyes"])
45
46enable_[]DOWN=${enable_module}
47
48m4_popdef([UP])
49m4_popdef([DOWN])
50])