summaryrefslogtreecommitdiff
path: root/m4/efl_enable.m4
diff options
context:
space:
mode:
authorVincent Torri <vincent.torri@gmail.com>2012-09-25 08:01:31 +0000
committerVincent Torri <vincent.torri@gmail.com>2012-09-25 08:01:31 +0000
commit4b81a0b3de5ead6b311766d1bb369ba9b4fd52a9 (patch)
tree240f9d4f777d64e5ff9a6d7e6d03b06a163bf7bb /m4/efl_enable.m4
parent469f6ef303131f9b9266cb3077f4d1123b38c61e (diff)
merge: minor fix
SVN revision: 77045
Diffstat (limited to 'm4/efl_enable.m4')
-rw-r--r--m4/efl_enable.m434
1 files changed, 34 insertions, 0 deletions
diff --git a/m4/efl_enable.m4 b/m4/efl_enable.m4
new file mode 100644
index 0000000000..78f6e0ab93
--- /dev/null
+++ b/m4/efl_enable.m4
@@ -0,0 +1,34 @@
1dnl Copyright (C) 2012 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 allows an EFL to not be built
5
6dnl Usage: EFL_ENABLE_LIB(lib, want)
7dnl Call AC_SUBST(BINARY_PRG) (BINARY is the uppercase of binary, - being transformed into _)
8dnl Define have_lib (- is transformed into _)
9dnl Define conditional EFL_BUILD_LIB (LIB is the uppercase of lib, - being transformed into _)
10
11AC_DEFUN([EFL_ENABLE_LIB],
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
17dnl configure option
18
19AC_ARG_ENABLE([build-$1],
20 [AC_HELP_STRING([--disable-build-$1], [disable building of ]DOWN)],
21 [
22 if test "x${enableval}" = "xyes" ; then
23 efl_want_build_[]m4_defn([DOWN])="yes"
24 else
25 efl_want_build_[]m4_defn([DOWN])="no"
26 fi
27 ],
28 [efl_want_build_[]m4_defn([DOWN])=$2])
29
30AC_MSG_CHECKING([whether to build ]DOWN[ binary])
31AC_MSG_RESULT([${efl_want_build_[]m4_defn([DOWN])}])
32
33AM_CONDITIONAL(EFL_BUILD_[]UP, test "x${efl_want_build_[]m4_defn([DOWN])}" = "xyes")
34])