3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-11-21 22:09:23 +01:00

build: Separate between D-Bus policy and data directory

This commit is contained in:
Marcel Holtmann 2018-02-09 16:36:12 +01:00
parent 41936468ed
commit 1f7d44056c
3 changed files with 18 additions and 18 deletions

View File

@ -8,9 +8,9 @@ builtin_sources =
noinst_LTLIBRARIES = ell/libell-internal.la
if DBUSCONF
dbusdir = @DBUS_CONFDIR@/dbus-1/system.d
dist_dbus_DATA = src/iwd-dbus.conf
if DBUS_POLICY
dbus_datadir = @DBUS_DATADIR@/dbus-1/system.d
dist_dbus_data_DATA = src/iwd-dbus.conf
endif
ell_sources = ell/ell.h ell/private.h ell/missing.h \
@ -271,7 +271,7 @@ EXTRA_DIST = src/genbuiltin doc/main.conf $(manual_pages:.1=.txt)
AM_CFLAGS = -fvisibility=hidden
DISTCHECK_CONFIGURE_FLAGS = --disable-dbusconf
DISTCHECK_CONFIGURE_FLAGS = --disable-dbus-policy
DISTCLEANFILES = $(BUILT_SOURCES) $(unit_tests) $(manual_pages)

View File

@ -9,4 +9,4 @@ fi
--enable-debug \
--prefix=/usr \
--localstatedir=/var \
--disable-dbusconf $*
--disable-dbus-policy $*

View File

@ -89,23 +89,23 @@ AC_CHECK_HEADERS(linux/types.h linux/if_alg.h)
AC_CHECK_HEADERS(readline/readline.h, enable_readline=yes,
AC_MSG_ERROR(readline header files are required))
AC_ARG_ENABLE([dbusconf], AC_HELP_STRING([--disable-dbusconf],
AC_ARG_ENABLE([dbus-policy], AC_HELP_STRING([--disable-dbus-policy],
[don't install D-Bus system policy file]),
[enable_dbusconf=${enableval}])
AM_CONDITIONAL(DBUSCONF, test "${enable_dbusconf}" != "no")
[enable_dbus_policy=${enableval}])
AM_CONDITIONAL(DBUS_POLICY, test "${enable_dbus_policy}" != "no")
AC_ARG_WITH([dbusconfdir], AC_HELP_STRING([--with-dbusconfdir=DIR],
[path to D-Bus configuration directory]),
[path_dbusconfdir=${withval}])
if (test "${enable_dbusconf}" != "no" && test -z "${path_dbusconfdir}"); then
AC_MSG_CHECKING([D-Bus configuration directory])
path_dbusconfdir="`$PKG_CONFIG --variable=sysconfdir dbus-1`"
if (test -z "${path_dbusconfdir}"); then
AC_MSG_ERROR([D-Bus configuration directory is required])
AC_ARG_WITH([dbus-datadir], AC_HELP_STRING([--with-dbus-datadir=DIR],
[path to D-Bus data directory]),
[path_dbus_datadir=${withval}])
if (test "${enable_dbus_policy}" != "no" && test -z "${path_dbus_datadir}"); then
AC_MSG_CHECKING([D-Bus data directory])
path_dbus_datadir="`$PKG_CONFIG --variable=datadir dbus-1`"
if (test -z "${path_dbus_datadir}"); then
AC_MSG_ERROR([D-Bus data directory is required])
fi
AC_MSG_RESULT([${path_dbusconfdir}])
AC_MSG_RESULT([${path_dbus_datadir}])
fi
AC_SUBST(DBUS_CONFDIR, [${path_dbusconfdir}])
AC_SUBST(DBUS_DATADIR, [${path_dbus_datadir}])
AC_ARG_ENABLE([docs], AC_HELP_STRING([--enable-docs],
[build documentation and manual pages]),