From e57efd6fbb0a25a61bd841cb1f81ebbd53528a0c Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Tue, 11 Dec 2012 17:55:24 +0100 Subject: [PATCH] build: Add option for D-Bus system bus services directory --- Makefile.am | 7 +++---- configure.ac | 13 +++++++++++++ 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/Makefile.am b/Makefile.am index 17b3707de..fb103a664 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 50927e4ef..203d6473f 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") -- 2.47.3