[PATCH] Get D-Bus flags from pkg-config.
Dmitri Paduchikh
dpaduchikh на gmail.com
Пт Ноя 18 12:11:42 UTC 2011
---
configure.in | 11 +++++++----
src/console_client/makefile.am | 2 +-
src/daemon/main/makefile.am | 2 +-
3 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/configure.in b/configure.in
index d8628dc..af10936 100644
--- a/configure.in
+++ b/configure.in
@@ -15,11 +15,14 @@ AC_PROG_CC
AC_PROG_CXX
AC_PROG_RANLIB
-AC_SUBST(MUSITORIUS_INCLUDES, '-I$(top_srcdir)/src/utils -I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include')
-AC_SUBST(MUSITORIUS_DAEMON_INCLUDES, '$(MUSITORIUS_INCLUDES) -I$(top_srcdir)/src/daemon -I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include')
+PKG_CHECK_MODULES(DBUS, dbus-1)
+AC_SUBST(DBUS_LIBS)
-AC_SUBST(MUSITORIUS_CFLAGS, '-Wall -pedantic -fpic -DMUSITORIUS_DATADIR=\"$(pkgdatadir)\"')
-AC_SUBST(MUSITORIUS_CXXFLAGS, '-Wall -pedantic -fpic -fno-rtti -DMUSITORIUS_DATADIR=\"$(pkgdatadir)\"')
+AC_SUBST(MUSITORIUS_INCLUDES, '-I$(top_srcdir)/src/utils')
+AC_SUBST(MUSITORIUS_DAEMON_INCLUDES, '$(MUSITORIUS_INCLUDES) -I$(top_srcdir)/src/daemon')
+
+AC_SUBST(MUSITORIUS_CFLAGS, '-Wall -pedantic -fpic -DMUSITORIUS_DATADIR=\"$(pkgdatadir)\" '"$DBUS_CFLAGS")
+AC_SUBST(MUSITORIUS_CXXFLAGS, '-Wall -pedantic -fpic -fno-rtti -DMUSITORIUS_DATADIR=\"$(pkgdatadir)\" '"$DBUS_CFLAGS")
AC_SUBST(MUSITORIUS_DAEMON_CFLAGS, '$(MUSITORIUS_CFLAGS) -DMUSITORIUS_DEFAULT_CONFIG=\"$(sysconfdir)/musitorius.conf\"')
AC_SUBST(MUSITORIUS_DAEMON_CXXFLAGS, '$(MUSITORIUS_CXXFLAGS) -DMUSITORIUS_DEFAULT_CONFIG=\"$(sysconfdir)/musitorius.conf\"')
diff --git a/src/console_client/makefile.am b/src/console_client/makefile.am
index a450ee3..6ae422b 100644
--- a/src/console_client/makefile.am
+++ b/src/console_client/makefile.am
@@ -1,6 +1,6 @@
AM_CXXFLAGS = $(MUSITORIUS_CXXFLAGS) $(MUSITORIUS_INCLUDES) -I${top_srcdir}/src/libmusitorius
-LIBS=-ldbus-1
+LIBS = $(DBUS_LIBS)
bin_PROGRAMS = musitorius
diff --git a/src/daemon/main/makefile.am b/src/daemon/main/makefile.am
index 8f3d399..66f07d9 100644
--- a/src/daemon/main/makefile.am
+++ b/src/daemon/main/makefile.am
@@ -1,6 +1,6 @@
AM_CXXFLAGS = $(MUSITORIUS_DAEMON_CXXFLAGS) $(MUSITORIUS_DAEMON_INCLUDES)
-LIBS+=-ldbus-1
+LIBS += $(DBUS_LIBS)
bin_PROGRAMS = musitoriusd
--
1.7.7.3
--=-=-=--
Подробная информация о списке рассылки Homeros