From d1c84c820ce180eabb57b83da3569a4de24c3ac4 Mon Sep 17 00:00:00 2001 From: Emanuele Aina Date: Mon, 6 May 2013 14:47:22 +0100 Subject: [Build] Install the .service file in $(datadir)/dbus-1/services Calling `pkg-config --variable=session_bus_services_dir dbus-1` under JHBuild results in the system-installed dbus-1.pc being parsed and our .service file will be put under the /usr prefix instead of the JHBuild one. To avoid that, take $(datadir) in account and install it under $(datadir)/dbus-1/services by default like other packages do (eg. gvfs). For those with different needs a --with-dbus-service-dir configure flag is provided. Signed-off-by: Emanuele Aina --- configure.ac | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 623b9a8..4b09da3 100644 --- a/configure.ac +++ b/configure.ac @@ -185,6 +185,11 @@ AC_ARG_WITH(ua-prefix, [with_ua_prefix = "$withval"; AC_DEFINE_UNQUOTED([UA_PREFIX], "$with_ua_prefix", [User Agent prefix])], []) +AC_ARG_WITH(dbus_service_dir, + AS_HELP_STRING([--with-dbus-service-dir=PATH],[choose directory for dbus service files, [default=PREFIX/share/dbus-1/services]]), + with_dbus_service_dir="$withval", with_dbus_service_dir=$datadir/dbus-1/services) +DBUS_SERVICE_DIR=$with_dbus_service_dir +AC_SUBST(DBUS_SERVICE_DIR) AC_ARG_ENABLE(lib-only, AS_HELP_STRING( @@ -194,11 +199,8 @@ AC_ARG_ENABLE(lib-only, [enable_lib_only=no]) AS_IF([test "x$enable_lib_only" = "xno"], - [PKG_CHECK_MODULES([DBUS], [dbus-1], - [DBUS_SESSION_DIR=`$PKG_CONFIG --variable=session_bus_services_dir dbus-1`; - AC_SUBST(DBUS_SESSION_DIR) - ], - [enable_lib_only=yes]); + [ + PKG_CHECK_MODULES([DBUS], [dbus-1], [], [enable_lib_only=yes]); PKG_CHECK_MODULES([DLEYNA_CONNECTOR_DBUS], [dleyna-connector-dbus-1.0]) ]) -- cgit v1.2.1