summaryrefslogtreecommitdiff
path: root/m4/elm_check_option.m4
diff options
context:
space:
mode:
Diffstat (limited to 'm4/elm_check_option.m4')
-rw-r--r--m4/elm_check_option.m460
1 files changed, 0 insertions, 60 deletions
diff --git a/m4/elm_check_option.m4 b/m4/elm_check_option.m4
deleted file mode 100644
index 999636a..0000000
--- a/m4/elm_check_option.m4
+++ /dev/null
@@ -1,60 +0,0 @@
1
2dnl use: ELM_CHECK_OPTION_DEP(option, pkgver)
3AC_DEFUN([ELM_CHECK_OPTION_DEP],
4[dnl
5
6m4_pushdef([UP], m4_translit([$1], [-a-z], [_A-Z]))dnl
7m4_pushdef([DOWN], m4_translit([$1], [-A-Z], [_a-z]))dnl
8
9ELM_[]UP[]_DEF="#undef"
10have_elementary_[]DOWN="no"
11
12AC_ARG_ENABLE(DOWN,
13 [AS_HELP_STRING([--disable-]DOWN, [disable ]DOWN[ support. @<:@default=detect@:>@])],
14 [want_option=$enableval],
15 [want_option="auto"])
16
17AC_MSG_CHECKING([whether to enable $1 option])
18AC_MSG_RESULT([${want_option}])
19
20if test "x${want_option}" != "xno"; then
21 PKG_CHECK_EXISTS(DOWN[ >= $2],
22 [
23 AC_DEFINE([HAVE_ELEMENTARY_]UP, [1], [$1 support for Elementary])
24 have_elementary_[]DOWN="yes"
25 ELM_[]UP[]_DEF="#define"
26 requirement_elm_pc="[]DOWN >= $2 ${requirement_elm_pc}"
27 ],
28 [have_elementary_]DOWN[="no"]
29 )
30fi
31
32AC_MSG_CHECKING([whether to build $1 option])
33AC_MSG_RESULT([${have_elementary_[]DOWN}])
34
35if test "x${want_elementary_[]DOWN}" = "xyes" && test "x${have_elementary_[]DOWN}" = "xno"; then
36 AC_MSG_ERROR([$1 support requested, but $1 was not found by pkg-config.])
37fi
38
39AC_SUBST([ELM_]UP[_DEF])
40
41m4_popdef([UP])dnl
42m4_popdef([DOWN])dnl
43])
44
45dnl use: ELM_CHECK_OPTION(option, pkgver)
46AC_DEFUN([ELM_CHECK_OPTION],
47[dnl
48
49m4_pushdef([UP], m4_translit([$1], [-a-z], [_A-Z]))dnl
50m4_pushdef([DOWN], m4_translit([$1], [-A-Z], [_a-z]))dnl
51
52if test "x$1" = "xeweb" ; then
53 ELM_CHECK_OPTION_DEP_EWK2
54else
55 ELM_CHECK_OPTION_DEP($1, $2)
56fi
57
58m4_popdef([UP])dnl
59m4_popdef([DOWN])dnl
60])