summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
Diffstat (limited to 'm4')
-rw-r--r--m4/expedite_check_engine.m441
1 files changed, 41 insertions, 0 deletions
diff --git a/m4/expedite_check_engine.m4 b/m4/expedite_check_engine.m4
new file mode 100644
index 0000000..2909a0d
--- /dev/null
+++ b/m4/expedite_check_engine.m4
@@ -0,0 +1,41 @@
1dnl use: EXPEDITE_CHECK_ENGINE(Engine, Description, want[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
2AC_DEFUN([EXPEDITE_CHECK_ENGINE],
3[
4pushdef([UP], translit([$1], [-a-z], [_A-Z]))dnl
5pushdef([DOWN], translit([$1], [-A-Z], [_a-z]))dnl
6
7want_[]DOWN=$3
8have_[]DOWN="no"
9
10AC_ARG_ENABLE($1,
11 AC_HELP_STRING([--enable-$1], [enable $2 engine]),
12 [ want_[]DOWN=$enableval ]
13)
14
15AC_MSG_CHECKING([whether $2 engine is to be built])
16AC_MSG_RESULT($want_[]DOWN)
17
18if test "x$want_[]DOWN" = "xyes"; then
19 PKG_CHECK_EXISTS([evas-$1],
20 [
21 AC_DEFINE(HAVE_EVAS_[]UP, 1, [Evas $2 Engine Support])
22 have_[]DOWN="yes"
23 ],
24 [ have_[]DOWN="no" ]
25 )
26fi
27
28AC_MSG_CHECKING([whether $2 engine is available])
29AC_MSG_RESULT($have_[]DOWN)
30
31AM_CONDITIONAL(BUILD_[]UP, [test "x$have_[]DOWN" = "xyes"])
32
33if test "x$have_[]DOWN" = "xyes" ; then
34 ifelse([$4], , :, [$4])
35else
36 ifelse([$5], , :, [$5])
37fi
38
39popdef([UP])
40popdef([DOWN])
41])