summaryrefslogtreecommitdiff
path: root/m4/efl.m4
diff options
context:
space:
mode:
Diffstat (limited to 'm4/efl.m4')
-rw-r--r--m4/efl.m442
1 files changed, 42 insertions, 0 deletions
diff --git a/m4/efl.m4 b/m4/efl.m4
new file mode 100644
index 0000000000..d4a4d1ad62
--- /dev/null
+++ b/m4/efl.m4
@@ -0,0 +1,42 @@
1dnl file to manage modules in efl
2
3dnl EFL_DEPEND_PKG(EFL, NAME, PACKAGE, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
4dnl Adds a pkg-config dependency to an efl, AC_DEFINE() HAVE_NAME,
5dnl and inserts dependencies in proper variables
6AC_DEFUN([EFL_DEPEND_PKG],
7[
8m4_pushdef([UPEFL], m4_translit([$1], [-a-z], [_A-Z]))dnl
9m4_pushdef([DOWNEFL], m4_translit([$1], [-A-Z], [_a-z]))dnl
10m4_pushdef([UPNAME], m4_translit([$2], [-a-z], [_A-Z]))dnl
11m4_pushdef([DOWNNAME], m4_translit([$2], [-A-Z], [_a-z]))dnl
12
13 have_[]m4_defn([DOWNNAME])="no"
14
15 EFL_PKG_CHECK_STRICT([$3], [
16 AC_DEFINE([HAVE_]m4_defn([UPNAME]), [1], [Have `]m4_defn([DOWNNAME])[' pkg-config installed.])
17 requirements_pc_[]m4_defn([DOWNEFL])="$3 ${requirements_pc_[][]m4_defn([DOWNEFL])}"
18 requirements_pc_deps_[]m4_defn([DOWNEFL])="$3 ${requirements_pc_deps_[]m4_defn([DOWNEFL])}"
19 have_[]m4_defn([DOWNNAME])="yes"
20
21 $4
22
23 ], [$5])
24
25m4_popdef([DOWNNAME])
26m4_popdef([UPNAME])
27m4_popdef([DOWNEFL])
28m4_popdef([UPEFL])
29])
30
31dnl EFL_OPTIONAL_DEPEND_PKG(EFL, VARIABLE, NAME, PACKAGE, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
32AC_DEFUN([EFL_OPTIONAL_DEPEND_PKG],
33[
34m4_pushdef([DOWN], m4_translit([$3], [-A-Z], [_a-z]))dnl
35
36 have_[]m4_defn([DOWN])="no"
37 if test "x$2" = "xyes"; then
38 EFL_DEPEND_PKG([$1], [$3], [$4], [$5], [$6])
39 fi
40
41m4_popdef([DOWN])
42])