summaryrefslogtreecommitdiff
path: root/m4/eina_check.m4
diff options
context:
space:
mode:
authorMarcel Hollerbach <mail@marcel-hollerbach.de>2019-06-18 08:12:44 +0200
committerMarcel Hollerbach <mail@marcel-hollerbach.de>2019-06-18 08:12:53 +0200
commit4f8e15c16c4f68b6fae8708b177ce672daefc59c (patch)
tree8c1bf8d808e0939bbd83291855961512ee42e70c /m4/eina_check.m4
parente8c69667b01e2795c1e4ead0536652f935ffa674 (diff)
Revert "autotools: REMOVAL!"
This reverts commit e8c69667b01e2795c1e4ead0536652f935ffa674. git push on a wrong branch, sorry. This will land today, but not now.
Diffstat (limited to 'm4/eina_check.m4')
-rw-r--r--m4/eina_check.m449
1 files changed, 49 insertions, 0 deletions
diff --git a/m4/eina_check.m4 b/m4/eina_check.m4
new file mode 100644
index 0000000..251d4cb
--- /dev/null
+++ b/m4/eina_check.m4
@@ -0,0 +1,49 @@
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
7# AC_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])
21enable_module=$2
22
23have_module="no"
24if test "x${enable_module}" = "xyes" || test "x${enable_module}" = "xstatic" ; then
25 have_module="yes"
26fi
27
28AC_MSG_CHECKING([whether to enable $3 built])
29AC_MSG_RESULT([${have_module}])
30
31static_module="no"
32if test "x${enable_module}" = "xstatic" ; then
33 static_module="yes"
34 have_static_module="yes"
35 AC_DEFINE(EINA_STATIC_BUILD_[]UP, 1, [Set to 1 if $2 is statically built])
36fi
37
38if ! test "x${enable_module}" = "xno" ; then
39 AC_DEFINE(EINA_BUILD_[]UP, 1, [Set to 1 if $2 is built])
40fi
41
42AM_CONDITIONAL(EINA_BUILD_[]UP, [test "x${have_module}" = "xyes"])
43AM_CONDITIONAL(EINA_STATIC_BUILD_[]UP, [test "x${static_module}" = "xyes"])
44
45enable_[]DOWN=${enable_module}
46
47m4_popdef([UP])
48m4_popdef([DOWN])
49])