From 6c3f05574a586887b9f2186e7730bec5a760ae4a Mon Sep 17 00:00:00 2001 From: Maarten Bosmans Date: Wed, 8 Jun 2011 17:24:16 +0200 Subject: build-sys: Reset CFLAGS after DBUS check --- configure.ac | 8 ++++---- src/Makefile.am | 5 +++++ 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/configure.ac b/configure.ac index 4e03996c..f5e2f5a0 100644 --- a/configure.ac +++ b/configure.ac @@ -971,11 +971,11 @@ AS_IF([test "x$enable_dbus" = "xyes" && test "x$HAVE_DBUS" = "x0"], AS_IF([test "x$HAVE_DBUS" = "x1"], [ - saved_LIBS="$LIBS" - LIBS="$LIBS $DBUS_LIBS" - CFLAGS="$CFLAGS $DBUS_CFLAGS" + save_CFLAGS="$CFLAGS"; CFLAGS="$CFLAGS $DBUS_CFLAGS" + save_LIBS="$LIBS"; LIBS="$LIBS $DBUS_LIBS" AC_CHECK_FUNCS(dbus_watch_get_unix_fd) - LIBS="$saved_LIBS" + CFLAGS="$save_CFLAGS" + LIBS="$save_LIBS" ]) AC_SUBST(DBUS_CFLAGS) diff --git a/src/Makefile.am b/src/Makefile.am index 4990ac35..b76cb400 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -998,8 +998,13 @@ libprotocol_http_la_LDFLAGS = $(AM_LDFLAGS) -avoid-version libprotocol_http_la_LIBADD = $(AM_LIBADD) libpulsecore-@PA_MAJORMINOR@.la libpulsecommon-@PA_MAJORMINOR@.la libpulse.la libprotocol_native_la_SOURCES = pulsecore/protocol-native.c pulsecore/protocol-native.h pulsecore/native-common.h +libprotocol_native_la_CFLAGS = $(AM_CFLAGS) libprotocol_native_la_LDFLAGS = $(AM_LDFLAGS) -avoid-version libprotocol_native_la_LIBADD = $(AM_LIBADD) libpulsecore-@PA_MAJORMINOR@.la libpulsecommon-@PA_MAJORMINOR@.la libpulse.la +if HAVE_DBUS +libprotocol_native_la_CFLAGS += $(DBUS_CFLAGS) +libprotocol_native_la_LIBADD += $(DBUS_LIBS) +endif libprotocol_esound_la_SOURCES = pulsecore/protocol-esound.c pulsecore/protocol-esound.h pulsecore/esound.h libprotocol_esound_la_LDFLAGS = $(AM_LDFLAGS) -avoid-version -- cgit