summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLubomir Rintel <lkundrak@v3.sk>2022-02-16 12:30:39 +0100
committerLubomir Rintel <lkundrak@v3.sk>2022-02-17 10:44:28 +0100
commit3d34f1b6b63687df017e1bda5346ffaa292ab34a (patch)
treed6096dcb7bb16f4d8b4b070d7893f8386c96998b
parent413e5228675ca92adc52d41e2b835424a94e38fd (diff)
downloadNetworkManager-3d34f1b6b63687df017e1bda5346ffaa292ab34a.tar.gz
configure: determine the systemd unit directory from pkg-config
Ask systemd instead of hardcoding the path. While this is a bit nicer, it should have precisely zero effect as the discovered path should be the same as we were hard-coding. We default to placing the unit file under the same $prefix as the user is installing into. This seems to be the correct thing to do if the user is installing to /usr/local (according to systemd-path(1), /usr/local/lib/systemd/system is all right), but can install the unit file into wrong path if the user chooses to install into some obscure location. I guess it's their responsibility in the end. https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1101
-rw-r--r--configure.ac2
1 files changed, 1 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index eefaf5f8e5..6146693c60 100644
--- a/configure.ac
+++ b/configure.ac
@@ -321,7 +321,7 @@ AC_ARG_WITH([systemdsystemunitdir],
[Directory for systemd service files]))
# default location
AS_IF([test -z "$with_systemdsystemunitdir" && $PKG_CONFIG systemd],
- with_systemdsystemunitdir="\$(prefix)/lib/systemd/system")
+ with_systemdsystemunitdir=`$PKG_CONFIG systemd '--define-variable=prefix=${prefix}' '--define-variable=root_prefix=${prefix}' --variable systemdsystemunitdir`)
AS_IF([test -z "$with_systemdsystemunitdir"], with_systemdsystemunitdir=no)
# add conditional and subst
AM_CONDITIONAL(HAVE_SYSTEMD, [test "$with_systemdsystemunitdir" != no])