summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorThorsten Kukuk <kukuk@suse.com>2023-06-16 07:28:21 (GMT)
committerThorsten Kukuk <5908016+thkukuk@users.noreply.github.com>2023-08-28 12:55:56 (GMT)
commit801784ae89224d004dc79af95545acbdf547ce64 (patch)
treea168eac393325f52698cc2bc59bfccece86524c1 /configure.ac
parent43131b73d69e77a3faee69814dac1bbc88162887 (diff)
downloadmonitoring-plugins-801784ae89224d004dc79af95545acbdf547ce64.tar.gz
check_users: prefer systemd-logind over utmprefs/pull/1888/head
Prefer systemd-logind over utmp to get the number of logged in users. utmp is not reliable for this (e.g. some terminals create utmp entries, other not) and utmp is not Y2038 safe with glibc on Linux.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac19
1 files changed, 19 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 069cc62..a294b00 100644
--- a/configure.ac
+++ b/configure.ac
@@ -328,6 +328,25 @@ AS_IF([test "x$with_ldap" != "xno"], [
328 LIBS="$_SAVEDLIBS" 328 LIBS="$_SAVEDLIBS"
329]) 329])
330 330
331
332AC_ARG_WITH([systemd], [AS_HELP_STRING([--without-systemd], [Skips systemd support])])
333
334dnl Check for libsystemd
335AS_IF([test "x$with_systemd" != "xno"], [
336 _SAVEDLIBS="$LIBS"
337 AC_CHECK_LIB(systemd,sd_get_sessions,,,-lsystemd)
338 if test "$ac_cv_lib_systemd_sd_get_sessions" = "yes"; then
339 SYSTEMDLIBS="-lsystemd"
340 SYSTEMDINCLUDE=""
341 AC_SUBST(SYSTEMDLIBS)
342 AC_SUBST(SYSTEMDINCLUDE)
343 else
344 AC_MSG_WARN([Skipping systemd support])
345 fi
346 LIBS="$_SAVEDLIBS"
347])
348
349
331dnl Check for headers used by check_ide_smart 350dnl Check for headers used by check_ide_smart
332case $host in 351case $host in
333 *linux*) 352 *linux*)