1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
Add a conditional to switch off the build of the package examples.
--- configure.ac 2008-09-17 16:15:35.000000000 +0200
+++ configure.ac.new 2008-09-17 16:19:07.000000000 +0200
@@ -47,6 +47,7 @@
AC_ISC_POSIX
AC_HEADER_STDC
+AC_ARG_ENABLE(examples, AS_HELP_STRING([--enable-examples],[compile example code]),enable_examples=$enableval,enable_examples=$USE_MAINTAINER_MODE)
AC_ARG_ENABLE(tests, AS_HELP_STRING([--enable-tests],[enable unit test code]),enable_tests=$enableval,enable_tests=$USE_MAINTAINER_MODE)
AC_ARG_ENABLE(ansi, AS_HELP_STRING([--enable-ansi],[enable -ansi -pedantic gcc flags]),enable_ansi=$enableval,enable_ansi=no)
AC_ARG_ENABLE(verbose-mode, AS_HELP_STRING([--enable-verbose-mode],[support verbose debug mode]),enable_verbose_mode=$enableval,enable_verbose_mode=$USE_MAINTAINER_MODE)
@@ -59,6 +60,13 @@
AC_ARG_WITH(introspect-xml, AS_HELP_STRING([--with-introspect-xml=[filename]],[Pass in a pregenerated dbus daemon introspection xml file (as generated by 'dbus-daemon --introspect') to use instead of querying the installed dbus daemon]))
+dnl DBUS_BUILD_EXAMPLES controls wether we want to built the examples
+dnl in the examples/ subdir
+AM_CONDITIONAL(DBUS_BUILD_EXAMPLES, test x$enable_examples = xyes)
+if test x$enable_examples = xyes; then
+ AC_DEFINE(DBUS_BUILD_EXAMPLES,1,[Build example code])
+fi
+
dnl DBUS_BUILD_TESTS controls unit tests built in to .c files
dnl and also some stuff in the test/ subdir
AM_CONDITIONAL(DBUS_BUILD_TESTS, test x$enable_tests = xyes)
@@ -861,6 +869,7 @@
echo "
Maintainer mode: ${USE_MAINTAINER_MODE}
gcc coverage profiling: ${enable_gcov}
+ Building example code: ${enable_examples}
Building unit tests: ${enable_tests}
Building verbose mode: ${enable_verbose_mode}
Building assertions: ${enable_asserts}
--- dbus/Makefile.am 2008-05-14 12:21:15.000000000 +0200
+++ dbus/Makefile.am.new 2008-09-17 16:34:01.000000000 +0200
@@ -1,4 +1,8 @@
+if DBUS_BUILD_EXAMPLES
SUBDIRS = . examples
+else
+SUBDIRS =
+endif
INCLUDES = \
-I$(top_srcdir) \
|