summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorVincent Torri <vincent dot torri at gmail dot com>2014-09-01 10:35:49 +0200
committerTom Hacohen <tom@stosb.com>2014-09-02 10:29:51 +0100
commit578124dbe00869f85e4962ea5655a8494c252cb8 (patch)
tree3bfa4b305bbd64d6a520f7abad45770387ed6fda /m4
parent0986814381b64b6fb217889c39a840cf324a9d0c (diff)
configure.ac: Clean up and add macros for backend-checks.
Add an m4 macro and start using it (also fixes some issues).
Diffstat (limited to 'm4')
-rw-r--r--m4/elm_check_backend.m438
1 files changed, 38 insertions, 0 deletions
diff --git a/m4/elm_check_backend.m4 b/m4/elm_check_backend.m4
new file mode 100644
index 000000000..476f60924
--- /dev/null
+++ b/m4/elm_check_backend.m4
@@ -0,0 +1,38 @@
1
2dnl use: ELM_CHECK_BACKEND(engine)
3AC_DEFUN([ELM_CHECK_BACKEND],
4[dnl
5m4_pushdef([UP], m4_translit([$1], [-a-z], [_A-Z]))dnl
6m4_pushdef([DOWN], m4_translit([$1], [-A-Z], [_a-z]))dnl
7
8have_elementary_[]DOWN="no"
9
10AC_ARG_ENABLE([ecore-]DOWN,
11 [AC_HELP_STRING([--disable-ecore-]DOWN, [disable ecore-]DOWN[ support. @<:@default=detect@:>@])],
12 [want_backend=$enableval],
13 [want_backend="auto"])
14
15AC_MSG_CHECKING([whether to enable $1 backend])
16AC_MSG_RESULT([${want_backend}])
17
18if test "x${want_backend}" != "xno"; then
19 PKG_CHECK_EXISTS([ecore-]DOWN[ >= efl_version],
20 [
21 AC_DEFINE([HAVE_ELEMENTARY_]UP, [1], [$1 support for Elementary])
22 have_elementary_[]DOWN="yes"
23 requirement_elm="ecore-[]DOWN >= efl_version ${requirement_elm}"
24 ],
25 [have_elementary_]DOWN[="no"]
26 )
27fi
28
29AC_MSG_CHECKING([whether to build $1 backend])
30AC_MSG_RESULT([${have_elementary_[]DOWN}])
31
32if test "x${want_backend}" = "xyes" && test "x$have_elementary_[]DOWN" = "xno"; then
33 AC_MSG_ERROR([ecore-]DOWN[ support requested, but ecore-]DOWN[ was not found by pkg-config.])
34fi
35
36m4_popdef([UP])dnl
37m4_popdef([DOWN])dnl
38])