[PATCH 03/10] build-sys: Reset CFLAGS after DBUS check

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



---
 configure.ac    |    8 ++++----
 src/Makefile.am |    5 +++++
 2 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/configure.ac b/configure.ac
index 4e03996..f5e2f5a 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 4990ac3..b76cb40 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- at PA_MAJORMINOR@.la libpulsecommon- at 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- at PA_MAJORMINOR@.la libpulsecommon- at 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
-- 
1.7.4.1



[Index of Archives]     [Linux Audio Users]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux