charon-nm: Use better default directory for D-Bus policy file
Also makes it configurable via configure script. Depending on `$datadir` is not ideal as package maintainers might set that to a custom value. Depending on `$datarootdir` might have been better, the default if pkg-config fails is now based on that. References #3339.
This commit is contained in:
@@ -77,6 +77,15 @@ fi
|
|||||||
ARG_WITH_SET([systemdsystemunitdir], [$systemdsystemunitdir_default], [directory for systemd service files])
|
ARG_WITH_SET([systemdsystemunitdir], [$systemdsystemunitdir_default], [directory for systemd service files])
|
||||||
AC_SUBST(systemdsystemunitdir)
|
AC_SUBST(systemdsystemunitdir)
|
||||||
|
|
||||||
|
AC_ARG_WITH(
|
||||||
|
[dbuspolicydir],
|
||||||
|
AS_HELP_STRING([--with-dbuspolicydir=arg],[directory for D-Bus policies (default: ${dbusdatadir|datarootdir}/dbus-1/system.d)]),
|
||||||
|
[dbuspolicydir="$withval"],
|
||||||
|
[PKG_CHECK_VAR([dbusdatadir], [dbus-1], [datadir], , [dbusdatadir="${datarootdir}"])
|
||||||
|
dbuspolicydir="${dbusdatadir}/dbus-1/system.d"]
|
||||||
|
)
|
||||||
|
AC_SUBST(dbuspolicydir)
|
||||||
|
|
||||||
AC_ARG_WITH(
|
AC_ARG_WITH(
|
||||||
[user],
|
[user],
|
||||||
AS_HELP_STRING([--with-user=user],[change user of the daemons to "user" after startup (default is "root").]),
|
AS_HELP_STRING([--with-user=user],[change user of the daemons to "user" after startup (default is "root").]),
|
||||||
@@ -1192,6 +1201,13 @@ if test x$nm = xtrue; then
|
|||||||
PKG_CHECK_MODULES(nm, [gthread-2.0 libnm])
|
PKG_CHECK_MODULES(nm, [gthread-2.0 libnm])
|
||||||
AC_SUBST(nm_CFLAGS)
|
AC_SUBST(nm_CFLAGS)
|
||||||
AC_SUBST(nm_LIBS)
|
AC_SUBST(nm_LIBS)
|
||||||
|
|
||||||
|
AC_MSG_CHECKING([for D-Bus policy directory])
|
||||||
|
if test -n "$dbuspolicydir" -a "x$dbuspolicydir" != xno; then
|
||||||
|
AC_MSG_RESULT([$dbuspolicydir])
|
||||||
|
else
|
||||||
|
AC_MSG_ERROR([not found (try --with-dbuspolicydir)])
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test x$xauth_pam = xtrue; then
|
if test x$xauth_pam = xtrue; then
|
||||||
|
|||||||
@@ -23,7 +23,6 @@ charon_nm_LDADD = \
|
|||||||
$(top_builddir)/src/libcharon/libcharon.la \
|
$(top_builddir)/src/libcharon/libcharon.la \
|
||||||
-lm $(PTHREADLIB) $(ATOMICLIB) $(DLLIB) ${nm_LIBS}
|
-lm $(PTHREADLIB) $(ATOMICLIB) $(DLLIB) ${nm_LIBS}
|
||||||
|
|
||||||
dbusservicedir = $(datadir)/dbus-1/system.d
|
dbuspolicy_DATA = nm-strongswan-service.conf
|
||||||
dbusservice_DATA = nm-strongswan-service.conf
|
|
||||||
|
|
||||||
EXTRA_DIST = $(dbusservice_DATA)
|
EXTRA_DIST = $(dbuspolicy_DATA)
|
||||||
|
|||||||
Reference in New Issue
Block a user