From a4acfaf4f942f702606e660990c873c9ff5b0395 Mon Sep 17 00:00:00 2001 From: Trent Lloyd Date: Sun, 14 Aug 2005 15:51:54 +0000 Subject: [PATCH] * Fix docs/INSTALL for the right dbus path for debian (Thanks sebest) * Put -DDBUS_API_SUBJECT_TO_CHANGE in DBUS_CFLAGS and remove from individual files * Add avahi-client to the C++ test runs, compile with DBUS flags * Fix avahi-client to compile with C++ compilers. git-svn-id: file:///home/lennart/svn/public/avahi/trunk@323 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe --- avahi-client/browser.c | 1 - avahi-client/client.c | 1 - avahi-client/entrygroup.c | 1 - avahi-client/internal.h | 1 + avahi-daemon/dbus-protocol.c | 1 - configure.ac | 5 ++-- docs/INSTALL | 4 +-- tests/Makefile.am | 4 +++ tests/c-plus-plus-test-gen.py | 1 + tests/c-plus-plus-test.cc | 48 ++++++++++++++++++----------------- 10 files changed, 36 insertions(+), 31 deletions(-) diff --git a/avahi-client/browser.c b/avahi-client/browser.c index 6f6e447..a20b5d2 100644 --- a/avahi-client/browser.c +++ b/avahi-client/browser.c @@ -31,7 +31,6 @@ #include #include -#define DBUS_API_SUBJECT_TO_CHANGE #include #include diff --git a/avahi-client/client.c b/avahi-client/client.c index 8cff69a..ad64946 100644 --- a/avahi-client/client.c +++ b/avahi-client/client.c @@ -31,7 +31,6 @@ #include #include -#define DBUS_API_SUBJECT_TO_CHANGE #include #include diff --git a/avahi-client/entrygroup.c b/avahi-client/entrygroup.c index 2748d86..93c3fd6 100644 --- a/avahi-client/entrygroup.c +++ b/avahi-client/entrygroup.c @@ -31,7 +31,6 @@ #include #include -#define DBUS_API_SUBJECT_TO_CHANGE #include #include diff --git a/avahi-client/internal.h b/avahi-client/internal.h index 722da2d..d37958e 100644 --- a/avahi-client/internal.h +++ b/avahi-client/internal.h @@ -23,6 +23,7 @@ ***/ #include +#include "client.h" struct _AvahiClient { diff --git a/avahi-daemon/dbus-protocol.c b/avahi-daemon/dbus-protocol.c index 9b83da9..8d0226f 100644 --- a/avahi-daemon/dbus-protocol.c +++ b/avahi-daemon/dbus-protocol.c @@ -30,7 +30,6 @@ #include #include -#define DBUS_API_SUBJECT_TO_CHANGE #include #include diff --git a/configure.ac b/configure.ac index 7aa4fa4..cd4d3dd 100644 --- a/configure.ac +++ b/configure.ac @@ -159,8 +159,9 @@ if test "x$ENABLE_DBUS" = "xyes"; then DBUS_SYS_DIR="${sysconfdir}/dbus-1/system.d" fi AC_SUBST(DBUS_SYS_DIR) - - AC_SUBST(DBUS_CFLAGS) + + DBUS_CFLAGS="$DBUS_CFLAGS -DDBUS_API_SUBJECT_TO_CHANGE" + AC_SUBST(DBUS_CFLAGS) AC_SUBST(DBUS_LIBS) fi diff --git a/docs/INSTALL b/docs/INSTALL index eeb2c88..802ad45 100644 --- a/docs/INSTALL +++ b/docs/INSTALL @@ -41,8 +41,8 @@ Optionally start the unicast DNS configuration daemon: To start the two daemons at boot time on Debian based distributions: with DBUS support: - # ln -s /etc/init.d/avahi-daemon /etc/dbus/event.d/75avahi-daemon - # ln -s /etc/init.d/avahi-dnsconfd /etc/dbus/event.d/76avahi-dnsconfd + # ln -s /etc/init.d/avahi-daemon /etc/dbus-1/event.d/75avahi-daemon + # ln -s /etc/init.d/avahi-dnsconfd /etc/dbus-1/event.d/76avahi-dnsconfd without DBUS support: # update-rc.d avahi-daemon defaults 25 15 diff --git a/tests/Makefile.am b/tests/Makefile.am index d37ce42..5b146c0 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -24,6 +24,10 @@ AM_CFLAGS= \ AM_CFLAGS+=$(GLIB20_CFLAGS) AM_LDADD=$(GLIB20_LIBS) +# DBUS +AM_CFLAGS+=$(DBUS_CFLAGS) +AM_LDADD+=$(DBUS_LIBS) + noinst_PROGRAMS = \ c-plus-plus-test diff --git a/tests/c-plus-plus-test-gen.py b/tests/c-plus-plus-test-gen.py index 62498f5..b1d6aae 100755 --- a/tests/c-plus-plus-test-gen.py +++ b/tests/c-plus-plus-test-gen.py @@ -54,6 +54,7 @@ print """/* $Id$ */ print_includes("avahi-common") print_includes("avahi-core") +print_includes("avahi-client") print """ int main(int argc, char*argv[]) { diff --git a/tests/c-plus-plus-test.cc b/tests/c-plus-plus-test.cc index 483ff5b..e87ef25 100644 --- a/tests/c-plus-plus-test.cc +++ b/tests/c-plus-plus-test.cc @@ -19,40 +19,42 @@ USA. ***/ -#include -#include +#include +#include +#include +#include #include #include #include -#include -#include -#include -#include #include -#include -#include #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include #include -#include -#include -#include #include -#include +#include +#include #include -#include +#include +#include +#include +#include #include -#include -#include +#include +#include #include -#include -#include +#include #include -#include +#include +#include +#include +#include int main(int argc, char*argv[]) { return 0; -- 2.39.5