Diff between 7ef17a931b2c97c8c1d26bdd5cd2b5e508a01489 and e57efd6fbb0a25a61bd841cb1f81ebbd53528a0c

Changed Files

File Additions Deletions Status
Makefile.am +3 -4 modified
configure.ac +13 -0 modified

Full Patch

diff --git a/Makefile.am b/Makefile.am
index 17b3707..fb103a6 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -32,9 +32,6 @@ if DATAFILES
 dbusdir = @DBUS_CONFDIR@/dbus-1/system.d
 dbus_DATA = src/bluetooth.conf
 
-dbusservicedir = $(datadir)/dbus-1/system-services
-dbusservice_DATA = src/org.bluez.service
-
 confdir = $(sysconfdir)/bluetooth
 conf_DATA =
 
@@ -44,8 +41,10 @@ endif
 
 if SYSTEMD
 systemdsystemunitdir = @SYSTEMD_SYSTEMUNITDIR@
-
 systemdsystemunit_DATA = src/bluetooth.service
+
+dbussystembusdir = @DBUS_SYSTEMBUSDIR@
+dbussystembus_DATA = src/org.bluez.service
 endif
 
 EXTRA_DIST += src/bluetooth.service.in
diff --git a/configure.ac b/configure.ac
index 50927e4..203d647 100644
--- a/configure.ac
+++ b/configure.ac
@@ -74,6 +74,19 @@ if (test -z "${path_dbusconfdir}"); then
 	AC_SUBST(DBUS_CONFDIR, [${path_dbusconfdir}])
 fi
 
+AC_ARG_WITH([dbussystembusdir], AC_HELP_STRING([--with-dbussystembusdir=DIR],
+				[path to D-Bus system bus services directory]),
+					[path_dbussystembusdir=${withval}])
+if (test -z "${path_dbussystembusdir}"); then
+	AC_MSG_CHECKING([D-Bus system bus services dir])
+	path_dbussystembusdir="`$PKG_CONFIG --variable=system_bus_services_dir dbus-1`"
+	if (test -z "${path_dbusconfdir}"); then
+		AC_MSG_ERROR([D-Bus system bus services directory is required])
+	fi
+	AC_MSG_RESULT([${path_dbussystembusdir}])
+	AC_SUBST(DBUS_SYSTEMBUSDIR, [${path_dbussystembusdir}])
+fi
+
 AC_ARG_ENABLE(library, AC_HELP_STRING([--enable-library],
 		[install Bluetooth library]), [enable_library=${enableval}])
 AM_CONDITIONAL(LIBRARY, test "${enable_library}" = "yes")