Add support for reading config directory from dbus-1.pc
authorMarcel Holtmann <marcel@holtmann.org>
Thu, 8 Jan 2009 20:17:41 +0000 (21:17 +0100)
committerMarcel Holtmann <marcel@holtmann.org>
Thu, 8 Jan 2009 20:17:41 +0000 (21:17 +0100)
configure.ac
src/Makefile.am

index a6cc07cc135969e6eedcffd4939d3bb701c5f17f..96d3758975b6809ab45a35d3afe28258efd6cfca 100644 (file)
@@ -167,6 +167,13 @@ PKG_CHECK_MODULES(DBUS, dbus-1 >= 1.0, dummy=yes,
                                AC_MSG_ERROR(libdbus is required))
 AC_SUBST(DBUS_CFLAGS)
 AC_SUBST(DBUS_LIBS)
+DBUS_DATADIR="`pkg-config --variable=sysconfdir dbus-1`"
+if (test -z "{DBUS_DATADIR}"); then
+       DBUS_DATADIR="${sysconfdir}/dbus-1/system.d"
+else
+       DBUS_DATADIR="$DBUS_DATADIR/dbus-1/system.d"
+fi
+AC_SUBST(DBUS_DATADIR)
 
 AC_SUBST([GDBUS_CFLAGS], ['$(DBUS_CFLAGS) -I$(top_srcdir)/gdbus'])
 AC_SUBST([GDBUS_LIBS], ['$(top_builddir)/gdbus/libgdbus.la $(DBUS_LIBS)'])
index 5a11f4ffca38581e50aeedb1345790f4af18a55d..363cfc33ac2cd29f2e81b77b5fbff924beb2d151 100644 (file)
@@ -1,5 +1,5 @@
 
-dbusdir = $(sysconfdir)/dbus-1/system.d
+dbusdir = @DBUS_DATADIR@
 
 dbus_DATA = connman.conf