configure.ac: fix installation of pam_namespace service file

Commit 95b464f841 ("configure.ac: add --with-systemdunitdir option")
aka v1.5.2~51 introduced a regression: if --with-systemdunitdir is not
specified, then the pam_namespace service file is no longer installed.

Fixes: 95b464f841 ("configure.ac: add --with-systemdunitdir option")
This commit is contained in:
Dmitry V. Levin 2024-08-27 08:00:00 +00:00
parent 3f4b8cd77c
commit 0b3eff3649

View File

@ -726,10 +726,11 @@ AC_DEFINE_UNQUOTED(PAM_USERTYPE_OVERFLOW_UID, $opt_kerneloverflowuid, [Kernel ov
AC_ARG_WITH([systemdunitdir],
AS_HELP_STRING([--with-systemdunitdir=DIR], [path to systemd service directory]),
[],
[
PKG_CHECK_EXISTS([systemd],
[with_systemdunitdir=$($PKG_CONFIG --variable=systemdunitdir systemd)],
[with_systemdunitdir='${prefix}/lib/systemd/system'])
[AC_MSG_CHECKING([systemd service directory])
with_systemdunitdir='${prefix}/lib/systemd/system'
PKG_CHECK_EXISTS([systemd],
[with_systemdunitdir=$($PKG_CONFIG --variable=systemdunitdir systemd)])
AC_MSG_RESULT([$with_systemdunitdir])
])
AC_SUBST([systemdunitdir], [$with_systemdunitdir])