summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authordoursse <doursse>2008-03-23 19:39:17 +0000
committerdoursse <doursse@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>2008-03-23 19:39:17 +0000
commit7ec35857f11dee76f1dc7e585e8cb57ac2461e29 (patch)
tree9b835f59ed6611f9c46d05e95a5dc1d37d58185b /m4
parentd806c25459153968ce40489ce3f0375d2cf88fab (diff)
* use an m4 macro to detect engines; faster for adding new engines
(guess which ones ;) ) * update autostuff thingy SVN revision: 34099
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])