build: Add option for D-Bus system bus services directory

This commit is contained in:
Marcel Holtmann 2012-12-11 17:55:24 +01:00
parent 7ef17a931b
commit e57efd6fbb
2 changed files with 16 additions and 4 deletions

View File

@ -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

View File

@ -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")