summaryrefslogtreecommitdiff
path: root/legacy/ecore/m4/ecore_check_module.m4
diff options
context:
space:
mode:
authorVincent Torri <vincent.torri@gmail.com>2009-03-13 16:35:16 +0000
committerVincent Torri <vincent.torri@gmail.com>2009-03-13 16:35:16 +0000
commitd9d7c7d23b13c216d2d852cc089e38abed41ccc4 (patch)
treefce0d5d23e2320541e383c22cdf4f8f0eee9ad28 /legacy/ecore/m4/ecore_check_module.m4
parenta510f6a59357cef348c9aeb805bf359aa5a8c6fe (diff)
* update configure.ac so that default options are chosen according to the host
* fix requirements * fix configuration on mac os x (problem with automake 1.9) and add missing values/macro for quartz support * small typo in ecore_evas_win32 api * use m4 api in m4 files SVN revision: 39471
Diffstat (limited to 'legacy/ecore/m4/ecore_check_module.m4')
-rw-r--r--legacy/ecore/m4/ecore_check_module.m4140
1 files changed, 73 insertions, 67 deletions
diff --git a/legacy/ecore/m4/ecore_check_module.m4 b/legacy/ecore/m4/ecore_check_module.m4
index 8859c5211f..8972219d07 100644
--- a/legacy/ecore/m4/ecore_check_module.m4
+++ b/legacy/ecore/m4/ecore_check_module.m4
@@ -1,99 +1,105 @@
1dnl use: ECORE_CHECK_MODULE(Foo, default-enabled[, dependancy[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]]) 1dnl use: ECORE_CHECK_MODULE(Foo, default-enabled[, dependancy[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]])
2AC_DEFUN([ECORE_CHECK_MODULE], 2AC_DEFUN([ECORE_CHECK_MODULE],
3[ 3[
4pushdef([UP], translit([$1], [a-z], [A-Z]))dnl 4m4_pushdef([UP], m4_toupper([[$1]]))dnl
5pushdef([DOWN], translit([$1], [A-Z], [a-z]))dnl 5m4_pushdef([DOWN], m4_tolower([[$1]]))dnl
6 6
7have_ecore_[]DOWN="no" 7have_ecore_[]m4_defn([DOWN])=no
8ecore_[]DOWN[]_cflags="" 8ecore_[]m4_defn([DOWN])[]_cflags=
9ecore_[]DOWN[]_libs="" 9ecore_[]m4_defn([DOWN])[]_libs=
10want_module=$2
10 11
11ifelse("x$2", "xno", 12if test "x${want_module}" = "xno" ; then
12[ 13 AC_ARG_ENABLE(ecore-[]m4_defn([DOWN]),
13 AC_ARG_ENABLE(ecore-[]DOWN, 14 [AC_HELP_STRING(
14 AC_HELP_STRING( 15 [--enable-ecore-[]m4_defn([DOWN])],
15 [--enable-ecore-[]DOWN], 16 [enable the ecore_]m4_defn([DOWN])[ module. [[default=disabled]]])],
16 [enable the ecore_[]DOWN module. [[default=disabled]]] 17 [want_module=$enableval],
17 ), 18 [want_module=no])
18 [ want_ecore_[]DOWN=$enableval ], 19else
19 [ want_ecore_[]DOWN=no ]) 20 AC_ARG_ENABLE(ecore-[]m4_defn([DOWN]),
20], 21 [AC_HELP_STRING(
21[ 22 [--disable-ecore-[]m4_defn([DOWN])],
22 AC_ARG_ENABLE(ecore-[]DOWN, 23 [disable the ecore_]m4_defn([DOWN])[ module. [[default=enabled]]])],
23 AC_HELP_STRING( 24 [want_module=$enableval],
24 [--disable-ecore-[]DOWN], 25 [want_module=yes])
25 [disable the ecore_[]DOWN module. [[default=enabled]]] 26fi
26 ),
27 [ want_ecore_[]DOWN=$enableval ],
28 [ want_ecore_[]DOWN=yes ])
29])
30 27
31AC_MSG_CHECKING(whether ecore_[]DOWN module is to be built) 28AC_MSG_CHECKING([whether ecore_]m4_defn([DOWN])[ module is to be built])
32 29
33if test "x$want_ecore_[]DOWN" = "xyes" ; then 30if test "x${want_module}" = "xyes" ; then
34 if test "x$3" = "x" -o "x$3" = "xyes" ; then 31 if test "x$3" = "x" -o "x$3" = "xyes" ; then
35 AC_DEFINE(BUILD_ECORE_[]UP, 1, [Build Ecore_$1 Module]) 32 AC_DEFINE([BUILD_ECORE_]m4_defn([UP]), [1], [Build Ecore_$1 Module])
36 have_ecore_[]DOWN="yes" 33 have_ecore_[]m4_defn([DOWN])="yes"
37 ecore_[]DOWN[]_libs="-lecore_[]DOWN" 34 ecore_[]m4_defn([DOWN])[]_libs="-lecore_[]m4_defn([DOWN])"
38 AC_MSG_RESULT([yes]) 35 AC_MSG_RESULT([yes])
39 else 36 else
40 AC_MSG_RESULT([no (dependancy failed)]) 37 AC_MSG_RESULT([no (dependency failed)])
41 fi 38 fi
42else 39else
43 AC_MSG_RESULT([no]) 40 AC_MSG_RESULT([no])
44fi 41fi
45 42
46AM_CONDITIONAL(BUILD_ECORE_[]UP, test "x$have_ecore_[]DOWN" = "xyes") 43AM_CONDITIONAL([BUILD_ECORE_]UP, [test "x$have_ecore_]DOWN[" = "xyes"])
47 44
48if test "x$have_ecore_[]DOWN" = "xyes" ; then 45if test "x$have_ecore_[]m4_defn([DOWN])" = "xyes" ; then
49 ifelse([$4], , :, [$4]) 46 m4_default([$4], [:])
50else 47else
51 ifelse([$5], , :, [$5]) 48 m4_default([$5], [:])
52fi 49fi
53 50
54AC_SUBST(ecore_[]DOWN[]_cflags) 51AC_SUBST(ecore_[]m4_defn([DOWN])[]_cflags)
55AC_SUBST(ecore_[]DOWN[]_libs) 52AC_SUBST(ecore_[]m4_defn([DOWN])[]_libs)
56 53
57popdef([UP]) 54m4_popdef([UP])
58popdef([DOWN]) 55m4_popdef([DOWN])
59]) 56])
60 57
61dnl use: ECORE_EVAS_CHECK_MODULE(foo-bar, want, description, backend[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) 58dnl use: ECORE_EVAS_CHECK_MODULE(foo-bar, want, description, backend[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
62AC_DEFUN([ECORE_EVAS_CHECK_MODULE], 59AC_DEFUN([ECORE_EVAS_CHECK_MODULE],
63[ 60[
64pushdef([UP], translit([$1], [-a-z], [_A-Z]))dnl 61m4_pushdef([UP], m4_translit([[$1]], [-a-z], [_A-Z]))dnl
65pushdef([DOWN], translit([$1], [-A-Z], [_a-z]))dnl 62m4_pushdef([DOWN], m4_translit([[$1]], [-A-Z], [_a-z]))dnl
66 63
67have_ecore_evas_[]DOWN="no" 64have_ecore_evas_[]m4_defn([DOWN])="no"
68want_module="$2" 65want_module="$2"
69 66
70AC_ARG_ENABLE(ecore-$1, 67if test "x${want_module}" = "xno" ; then
71 AC_HELP_STRING( 68 AC_ARG_ENABLE(ecore-evas-$1,
72 [--enable-ecore-evas-$1], 69 [AC_HELP_STRING(
73 [enable $3 support in the ecore_evas module.] 70 [--enable-ecore-evas-$1],
74 ), 71 [enable $3 support in the ecore_evas module.])],
75 [ want_module=$enableval ] 72 [want_module=$enableval])
76) 73else
77AC_MSG_CHECKING(whether ecore_evas $3 support is to be built) 74 AC_ARG_ENABLE(ecore-evas-$1,
78AC_MSG_RESULT($want_module) 75 [AC_HELP_STRING(
76 [--disable-ecore-evas-$1],
77 [disable $3 support in the ecore_evas module.])],
78 [want_module=$enableval])
79fi
80
81AC_MSG_CHECKING([whether ecore_evas $3 support is to be built])
82AC_MSG_RESULT([${want_module}])
79 83
80if test "x$4" = "xyes" -a \ 84if test "x$4" = "xyes" -a \
81 "x$have_ecore_evas" = "xyes" -a \ 85 "x$have_ecore_evas" = "xyes" -a \
82 "x$want_module" = "xyes" ; then 86 "x$want_module" = "xyes" ; then
83 PKG_CHECK_MODULES(EVAS_[]UP, evas-$1, 87 PKG_CHECK_EXISTS([evas-$1],
84 [ 88 [
85 AC_DEFINE(BUILD_ECORE_EVAS_[]UP, 1, [Support for $3 Engine in Ecore_Evas]) 89 AC_DEFINE([BUILD_ECORE_EVAS_]m4_defn([UP]), [1], [Support for $3 Engine in Ecore_Evas])
86 have_ecore_evas_[]DOWN="yes"; 90 have_ecore_evas_[]m4_defn([DOWN])="yes"
87 ] 91 ])
88 )
89fi 92fi
90 93
91if test "x$have_ecore_evas_[]DOWN" = "xyes" ; then 94AC_MSG_CHECKING([whether ecore_evas $3 support is built])
92 ifelse([$5], , :, [$5]) 95AC_MSG_RESULT([$have_ecore_evas_]m4_defn([DOWN]))
96
97if test "x$have_ecore_evas_[]m4_defn([DOWN])" = "xyes" ; then
98 m4_default([$5], [:])
93else 99else
94 ifelse([$6], , :, [$6]) 100 m4_default([$6], [:])
95fi 101fi
96 102
97popdef([UP]) 103m4_popdef([UP])
98popdef([DOWN]) 104m4_popdef([DOWN])
99]) 105])