summaryrefslogtreecommitdiff
path: root/legacy/edbus
diff options
context:
space:
mode:
authorLucas De Marchi <lucas.demarchi@profusion.mobi>2012-09-21 22:44:05 +0000
committerLucas De Marchi <lucas.demarchi@profusion.mobi>2012-09-21 22:44:05 +0000
commit97fc82b5ff50208d65c6f583d55ed95f3dd18b6b (patch)
treeb56b6bc10e21e85db90d0a6d9c949c639d87e0bf /legacy/edbus
parent49ea849059cf4c928cd102a0923702fa69c81fe6 (diff)
edbus: Do not build examples by default
It's weird to enable/disable the examples at configure time rather than having a rule "make examples", but this appears to be how it's done in EFL. SVN revision: 77005
Diffstat (limited to 'legacy/edbus')
-rw-r--r--legacy/edbus/Makefile.am2
-rw-r--r--legacy/edbus/configure.ac3
-rw-r--r--legacy/edbus/m4/efl_examples.m463
3 files changed, 68 insertions, 0 deletions
diff --git a/legacy/edbus/Makefile.am b/legacy/edbus/Makefile.am
index 6fe4f0a181..30d2608b13 100644
--- a/legacy/edbus/Makefile.am
+++ b/legacy/edbus/Makefile.am
@@ -78,6 +78,7 @@ libedbus2_la_SOURCES = \
78 src/lib/edbus_service.c \ 78 src/lib/edbus_service.c \
79 src/lib/edbus_signal_handler.c 79 src/lib/edbus_signal_handler.c
80 80
81if EFL_BUILD_EXAMPLES
81noinst_PROGRAMS = \ 82noinst_PROGRAMS = \
82 src/examples/connman-list-services \ 83 src/examples/connman-list-services \
83 src/examples/ofono-dial \ 84 src/examples/ofono-dial \
@@ -110,6 +111,7 @@ src_examples_server_LDADD = $(EXAMPLES_LIBS)
110 111
111src_examples_client_SOURCES = src/examples/client.c 112src_examples_client_SOURCES = src/examples/client.c
112src_examples_client_LDADD = $(EXAMPLES_LIBS) 113src_examples_client_LDADD = $(EXAMPLES_LIBS)
114endif
113 115
114.PHONY: doc 116.PHONY: doc
115 117
diff --git a/legacy/edbus/configure.ac b/legacy/edbus/configure.ac
index e203746353..3fde42418e 100644
--- a/legacy/edbus/configure.ac
+++ b/legacy/edbus/configure.ac
@@ -79,6 +79,9 @@ PKG_CHECK_MODULES([EINA], [eina >= 1.7.0])
79PKG_CHECK_MODULES([ECORE], [ecore]) 79PKG_CHECK_MODULES([ECORE], [ecore])
80PKG_CHECK_MODULES([DBUS], [dbus-1]) 80PKG_CHECK_MODULES([DBUS], [dbus-1])
81 81
82### Build and install examples
83EFL_CHECK_BUILD_EXAMPLES([enable_build_examples="yes"], [enable_build_examples="no"])
84
82with_max_log_level="EINA_LOG_LEVEL_DBG" 85with_max_log_level="EINA_LOG_LEVEL_DBG"
83AC_ARG_WITH(maximum-log-level, 86AC_ARG_WITH(maximum-log-level,
84 [AC_HELP_STRING([--with-maximum-log-level=NUMBER], 87 [AC_HELP_STRING([--with-maximum-log-level=NUMBER],
diff --git a/legacy/edbus/m4/efl_examples.m4 b/legacy/edbus/m4/efl_examples.m4
new file mode 100644
index 0000000000..2a809adff5
--- /dev/null
+++ b/legacy/edbus/m4/efl_examples.m4
@@ -0,0 +1,63 @@
1dnl Copyright (C) 2008 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 building examples is wanted.
5
6dnl Usage: EFL_CHECK_BUILD_EXAMPLES([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
7dnl Defines the automake conditionnal EFL_ENABLE_BUILD_EXAMPLES
8
9AC_DEFUN([EFL_CHECK_BUILD_EXAMPLES],
10[
11
12dnl configure option
13
14AC_ARG_ENABLE([build-examples],
15 [AC_HELP_STRING([--enable-build-examples], [enable building examples @<:@default=disabled@:>@])],
16 [
17 if test "x${enableval}" = "xyes" ; then
18 _efl_enable_build_examples="yes"
19 else
20 _efl_enable_build_examples="no"
21 fi
22 ],
23 [_efl_enable_build_examples="no"])
24
25AC_MSG_CHECKING([whether examples are built])
26AC_MSG_RESULT([${_efl_enable_build_examples}])
27
28AM_CONDITIONAL(EFL_BUILD_EXAMPLES, test "x${_efl_enable_build_examples}" = "xyes")
29
30AS_IF([test "x$_efl_enable_build_examples" = "xyes"], [$1], [$2])
31])
32
33
34dnl Macro that check if installing examples is wanted.
35
36dnl Usage: EFL_CHECK_INSTALL_EXAMPLES([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
37dnl Defines the automake conditionnal EFL_ENABLE_INSTALL_EXAMPLES
38
39AC_DEFUN([EFL_CHECK_INSTALL_EXAMPLES],
40[
41
42dnl configure option
43
44AC_ARG_ENABLE([install-examples],
45 [AC_HELP_STRING([--enable-install-examples], [enable installing example source files @<:@default=disabled@:>@])],
46 [
47 if test "x${enableval}" = "xyes" ; then
48 _efl_enable_install_examples="yes"
49 else
50 _efl_enable_install_examples="no"
51 fi
52 ],
53 [_efl_enable_install_examples="no"])
54
55AC_MSG_CHECKING([whether examples are installed])
56AC_MSG_RESULT([${_efl_enable_install_examples}])
57
58AM_CONDITIONAL(EFL_INSTALL_EXAMPLES, test "x${_efl_enable_install_examples}" = "xyes")
59
60AS_IF([test "x$_efl_enable_install_examples" = "xyes"], [$1], [$2])
61])
62
63dnl End of efl_examples.m4