summaryrefslogtreecommitdiff
path: root/legacy/ecore/m4/ecore_check_module.m4
diff options
context:
space:
mode:
authorVincent Torri <vincent.torri@gmail.com>2010-01-26 08:57:57 +0000
committerVincent Torri <vincent.torri@gmail.com>2010-01-26 08:57:57 +0000
commitf6b734e78cb8721fa4ce965fd11556f4ba66a794 (patch)
tree9388cd4e5a9e9a1629efd59437b508aec50473a2 /legacy/ecore/m4/ecore_check_module.m4
parent82ea9859e8c1ab7917128834f045c4e6cb36b6b2 (diff)
fix help of the configure.
there is only --enable-*** options displayed, with no default value, so if someone wants me to add them, please tell me (it's a bit of work, though :p) SVN revision: 45577
Diffstat (limited to 'legacy/ecore/m4/ecore_check_module.m4')
-rw-r--r--legacy/ecore/m4/ecore_check_module.m478
1 files changed, 33 insertions, 45 deletions
diff --git a/legacy/ecore/m4/ecore_check_module.m4 b/legacy/ecore/m4/ecore_check_module.m4
index 9a14abc42f..3980e5b438 100644
--- a/legacy/ecore/m4/ecore_check_module.m4
+++ b/legacy/ecore/m4/ecore_check_module.m4
@@ -1,35 +1,32 @@
1dnl use: ECORE_CHECK_MODULE(Foo, default-enabled[, dependancy[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]]) 1dnl use: ECORE_CHECK_MODULE(Foo, default-enabled, description[, dependancy[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]])
2AC_DEFUN([ECORE_CHECK_MODULE], 2AC_DEFUN([ECORE_CHECK_MODULE],
3[ 3[
4m4_pushdef([UP], m4_toupper([$1]))dnl 4m4_pushdef([UP], m4_translit([[$1]], [-a-z], [_A-Z]))dnl
5m4_pushdef([DOWN], m4_tolower([$1]))dnl 5m4_pushdef([DOWN], m4_translit([[$1]], [-A-Z], [_a-z]))dnl
6 6
7have_ecore_[]m4_defn([DOWN])=no 7have_ecore_[]m4_defn([DOWN])=no
8ecore_[]m4_defn([DOWN])[]_cflags= 8ecore_[]m4_defn([DOWN])[]_cflags=
9ecore_[]m4_defn([DOWN])[]_libs= 9ecore_[]m4_defn([DOWN])[]_libs=
10want_module=$2 10want_module=$2
11 11
12if test "x${want_module}" = "xno" ; then 12AC_ARG_ENABLE(ecore-$1,
13 AC_ARG_ENABLE(ecore-[]m4_defn([DOWN]), 13 [AC_HELP_STRING(
14 [AC_HELP_STRING( 14 [--enable-ecore-$1],
15 [--enable-ecore-[]m4_defn([DOWN])], 15 [enable the ecore_]m4_defn([DOWN])[ module])],
16 [enable the ecore_]m4_defn([DOWN])[ module. [[default=disabled]]])], 16 [
17 [want_module=$enableval], 17 if test "x${enableval}" = "xyes" ; then
18 [want_module=no]) 18 want_module="yes"
19else 19 else
20 AC_ARG_ENABLE(ecore-[]m4_defn([DOWN]), 20 want_module="no"
21 [AC_HELP_STRING( 21 fi
22 [--disable-ecore-[]m4_defn([DOWN])], 22 ],
23 [disable the ecore_]m4_defn([DOWN])[ module. [[default=enabled]]])], 23 [])
24 [want_module=$enableval], 24
25 [want_module=yes]) 25AC_MSG_CHECKING([whether Ecore_$3 module is to be built])
26fi
27
28AC_MSG_CHECKING([whether ecore_]m4_defn([DOWN])[ module is to be built])
29 26
30if test "x${want_module}" = "xyes" ; then 27if test "x${want_module}" = "xyes" ; then
31 if test "x$3" = "x" -o "x$3" = "xyes" ; then 28 if test "x$4" = "x" || test "x$4" = "xyes" ; then
32 AC_DEFINE([BUILD_ECORE_]m4_defn([UP]), [1], [Build Ecore_$1 Module]) 29 AC_DEFINE([BUILD_ECORE_]m4_defn([UP]), [1], [Build Ecore_$3 Module])
33 have_ecore_[]m4_defn([DOWN])="yes" 30 have_ecore_[]m4_defn([DOWN])="yes"
34 ecore_[]m4_defn([DOWN])[]_libs="-lecore_[]m4_defn([DOWN])" 31 ecore_[]m4_defn([DOWN])[]_libs="-lecore_[]m4_defn([DOWN])"
35 AC_MSG_RESULT([yes]) 32 AC_MSG_RESULT([yes])
@@ -42,11 +39,7 @@ fi
42 39
43AM_CONDITIONAL([BUILD_ECORE_]UP, [test "x$have_ecore_]DOWN[" = "xyes"]) 40AM_CONDITIONAL([BUILD_ECORE_]UP, [test "x$have_ecore_]DOWN[" = "xyes"])
44 41
45if test "x$have_ecore_[]m4_defn([DOWN])" = "xyes" ; then 42AS_IF([test "x$have_ecore_[]m4_defn([DOWN])" = "xyes"], [$5], [$6])
46 m4_default([$4], [:])
47else
48 m4_default([$5], [:])
49fi
50 43
51AC_SUBST(ecore_[]m4_defn([DOWN])[]_cflags) 44AC_SUBST(ecore_[]m4_defn([DOWN])[]_cflags)
52AC_SUBST(ecore_[]m4_defn([DOWN])[]_libs) 45AC_SUBST(ecore_[]m4_defn([DOWN])[]_libs)
@@ -64,19 +57,18 @@ m4_pushdef([DOWN], m4_translit([[$1]], [-A-Z], [_a-z]))dnl
64have_ecore_evas_[]m4_defn([DOWN])="no" 57have_ecore_evas_[]m4_defn([DOWN])="no"
65want_module="$2" 58want_module="$2"
66 59
67if test "x${want_module}" = "xno" ; then 60AC_ARG_ENABLE(ecore-evas-$1,
68 AC_ARG_ENABLE(ecore-evas-$1, 61 [AC_HELP_STRING(
69 [AC_HELP_STRING( 62 [--enable-ecore-evas-$1],
70 [--enable-ecore-evas-$1], 63 [enable $3 support in the ecore_evas module.])],
71 [enable $3 support in the ecore_evas module.])], 64 [
72 [want_module=$enableval]) 65 if test "x${enableval}" = "xyes" ; then
73else 66 want_module="yes"
74 AC_ARG_ENABLE(ecore-evas-$1, 67 else
75 [AC_HELP_STRING( 68 want_module="no"
76 [--disable-ecore-evas-$1], 69 fi
77 [disable $3 support in the ecore_evas module.])], 70 ],
78 [want_module=$enableval]) 71 [])
79fi
80 72
81AC_MSG_CHECKING([whether ecore_evas $3 support is to be built]) 73AC_MSG_CHECKING([whether ecore_evas $3 support is to be built])
82AC_MSG_RESULT([${want_module}]) 74AC_MSG_RESULT([${want_module}])
@@ -94,11 +86,7 @@ fi
94AC_MSG_CHECKING([whether ecore_evas $3 support is built]) 86AC_MSG_CHECKING([whether ecore_evas $3 support is built])
95AC_MSG_RESULT([$have_ecore_evas_]m4_defn([DOWN])) 87AC_MSG_RESULT([$have_ecore_evas_]m4_defn([DOWN]))
96 88
97if test "x$have_ecore_evas_[]m4_defn([DOWN])" = "xyes" ; then 89AS_IF([test "x$have_ecore_evas_[]m4_defn([DOWN])" = "xyes"], [$5], [$6])
98 m4_default([$5], [:])
99else
100 m4_default([$6], [:])
101fi
102 90
103m4_popdef([UP]) 91m4_popdef([UP])
104m4_popdef([DOWN]) 92m4_popdef([DOWN])