build: assume we have at least systemd v200

systemd v200 was released over 10 years ago.
It is thus reasonable to no longer support versions older than that and
simplify the build system a bit.
This commit is contained in:
Michael Biebl
2023-10-20 15:16:50 +02:00
committed by Íñigo Huguet
parent e3b21780b6
commit 886cd58658
5 changed files with 1 additions and 30 deletions

View File

@@ -5554,13 +5554,8 @@ systemdsystemunit_DATA += \
data/NetworkManager.service: $(srcdir)/data/NetworkManager.service.in
$(AM_V_GEN) $(data_edit) $< >$@
if HAVE_SYSTEMD_200
data/NetworkManager-wait-online.service: $(srcdir)/data/NetworkManager-wait-online.service.in
$(AM_V_GEN) $(data_edit) $< >$@
else
data/NetworkManager-wait-online.service: $(srcdir)/data/NetworkManager-wait-online-systemd-pre200.service.in
$(AM_V_GEN) $(data_edit) $< >$@
endif
data/NetworkManager-dispatcher.service: $(srcdir)/data/NetworkManager-dispatcher.service.in
$(AM_V_GEN) $(data_edit) $< >$@

View File

@@ -334,9 +334,6 @@ if test "$with_systemdsystemunitdir" != no; then
AC_SUBST([systemdsystemunitdir], [$with_systemdsystemunitdir])
fi
PKG_CHECK_MODULES(SYSTEMD_200, [systemd >= 200], [have_systemd_200=yes], [have_systemd_200=no])
AM_CONDITIONAL(HAVE_SYSTEMD_200, test "${have_systemd_200}" = "yes")
# Hostname persist mode
AC_ARG_WITH(hostname-persist,
AS_HELP_STRING([--with-hostname-persist=default|suse|gentoo|slackware],

View File

@@ -1,15 +0,0 @@
[Unit]
Description=Network Manager Wait Online
Documentation=man:nm-online(1)
Requisite=NetworkManager.service
After=NetworkManager.service
Wants=network.target
Before=network.target
[Service]
Type=oneshot
ExecStart=@bindir@/nm-online -s -q --timeout=30
RemainAfterExit=yes
[Install]
WantedBy=network.target

View File

@@ -12,14 +12,9 @@ if install_systemdunitdir
'NetworkManager-dispatcher.service.in',
'NetworkManager.service.in',
'nm-priv-helper.service.in',
'NetworkManager-wait-online.service.in',
]
if have_systemd_200
services += ['NetworkManager-wait-online.service.in']
else
services += ['NetworkManager-wait-online-systemd-pre200.service.in']
endif
foreach service: services
configure_file(
input: service,

View File

@@ -273,7 +273,6 @@ libsystemd_login_dep = dependency('libsystemd-login', version: '>= 183', require
config_h.set10('HAVE_LIBSYSTEMD', libsystemd_dep.found())
systemd_dep = dependency('systemd', required: false)
have_systemd_200 = systemd_dep.found() and systemd_dep.version().version_compare('>= 200')
gio_unix_dep = dependency('gio-unix-2.0', version: '>= 2.40')