summaryrefslogtreecommitdiff
path: root/legacy/elementary/m4
diff options
context:
space:
mode:
authorVincent Torri <vincent.torri@gmail.com>2010-08-22 07:19:29 +0000
committerVincent Torri <vincent.torri@gmail.com>2010-08-22 07:19:29 +0000
commit0f5c7a96f2575719cbafc77beb05e34480bd2cc6 (patch)
treeb3e81eb38c06b2409787dbd2e706726b75e58e43 /legacy/elementary/m4
parentf54ec7ad851b8b61ff23ffa8b649af931f53c062 (diff)
Use a macro to add a specific path for efl tools (edje_cc and eet, here)
See usage in efl_binary.m4 SVN revision: 51514
Diffstat (limited to 'legacy/elementary/m4')
-rw-r--r--legacy/elementary/m4/efl_binary.m471
1 files changed, 71 insertions, 0 deletions
diff --git a/legacy/elementary/m4/efl_binary.m4 b/legacy/elementary/m4/efl_binary.m4
new file mode 100644
index 0000000..119c854
--- /dev/null
+++ b/legacy/elementary/m4/efl_binary.m4
@@ -0,0 +1,71 @@
1dnl Copyright (C) 2010 Vincent Torri <vtorri at univ-evry dot fr>
2dnl That code is public domain and can be freely used or copied.
3
4dnl Macro that check if a binary is built or not
5
6dnl Usage: EFL_ENABLE_BIN(binary)
7dnl Call AC_SUBST(BINARY_PRG) (BINARY is the uppercase of binary, - being tranformed into _)
8dnl Define have_binary (- is tranformed into _)
9dnl Define conditional BUILD_BINARY (BINARY is the uppercase of binary, - being tranformed into _)
10
11AC_DEFUN([EFL_ENABLE_BIN],
12[
13
14m4_pushdef([UP], m4_translit([[$1]], [-a-z], [_A-Z]))dnl
15m4_pushdef([DOWN], m4_translit([[$1]], [-A-Z], [_a-z]))dnl
16
17have_[]m4_defn([DOWN])="yes"
18
19dnl configure option
20
21AC_ARG_ENABLE([$1],
22 [AC_HELP_STRING([--disable-$1], [disable building of ]DOWN)],
23 [
24 if test "x${enableval}" = "xyes" ; then
25 have_[]m4_defn([DOWN])="yes"
26 else
27 have_[]m4_defn([DOWN])="no"
28 fi
29 ])
30
31AC_MSG_CHECKING([whether to build ]DOWN[ binary])
32AC_MSG_RESULT([$have_[]m4_defn([DOWN])])
33
34if test "x$have_[]m4_defn([DOWN])" = "xyes"; then
35 UP[]_PRG=DOWN[${EXEEXT}]
36fi
37
38AC_SUBST(UP[]_PRG)
39
40AM_CONDITIONAL(BUILD_[]UP, test "x$have_[]m4_defn([DOWN])" = "xyes")
41
42AS_IF([test "x$have_[]m4_defn([DOWN])" = "xyes"], [$2], [$3])
43
44])
45
46
47dnl Macro that check if a binary is built or not
48
49dnl Usage: EFL_WITH_BIN(package, binary, default_value)
50dnl Call AC_SUBST(_binary) (_binary is the lowercase of binary, - being tranformed into _ by default, or the value set by the user)
51
52AC_DEFUN([EFL_WITH_BIN],
53[
54
55m4_pushdef([DOWN], m4_translit([[$2]], [-A-Z], [_a-z]))dnl
56
57dnl configure option
58
59AC_ARG_WITH([$2],
60 [AC_HELP_STRING([--with-$2=PATH], [specify a specific path to ]DOWN[ @<:@default=$3@:>@])],
61 [_efl_with_binary=${withval}],
62 [_efl_with_binary=$(pkg-config --variable=prefix $1)/bin/$3])
63
64DOWN=${_efl_with_binary}
65AC_MSG_NOTICE(DOWN[ set to ${_efl_with_binary}])
66
67with_binary_[]m4_defn([DOWN])=${_efl_with_binary}
68
69AC_SUBST(DOWN)
70
71])