summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorJan Wagner <waja@cyconet.org>2023-10-17 13:39:37 +0200
committerJan Wagner <waja@cyconet.org>2023-10-17 13:39:37 +0200
commit2a047014385022c8dc06dad4da0428db14898689 (patch)
tree00abea46325decf0c72870ee8f9ec1472e8e5344 /configure.ac
parentf39211c26408af582121f519d89c8abf70e6d437 (diff)
parente23a75d954311b3be429a9020e4d317b89615ee7 (diff)
downloadmonitoring-plugins-2a04701.tar.gz
Merge branch 'master' of github.com:monitoring-plugins/monitoring-plugins
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac36
1 files changed, 29 insertions, 7 deletions
diff --git a/configure.ac b/configure.ac
index 069cc625..b5374b23 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*)
@@ -602,7 +621,6 @@ AC_C_CONST
602AC_STRUCT_TM 621AC_STRUCT_TM
603AC_TYPE_PID_T 622AC_TYPE_PID_T
604AC_TYPE_SIZE_T 623AC_TYPE_SIZE_T
605AC_TYPE_SIGNAL
606 624
607AC_CACHE_CHECK([for va_copy],ac_cv_HAVE_VA_COPY,[ 625AC_CACHE_CHECK([for va_copy],ac_cv_HAVE_VA_COPY,[
608AC_TRY_LINK([#include <stdarg.h> 626AC_TRY_LINK([#include <stdarg.h>
@@ -626,12 +644,16 @@ AC_TRY_COMPILE([#include <sys/time.h>],
626 [struct timeval *tv; 644 [struct timeval *tv;
627 struct timezone *tz;], 645 struct timezone *tz;],
628 AC_DEFINE(HAVE_STRUCT_TIMEVAL,1,[Define if we have a timeval structure]) 646 AC_DEFINE(HAVE_STRUCT_TIMEVAL,1,[Define if we have a timeval structure])
629 AC_TRY_COMPILE([#include <sys/time.h>], 647 FOUND_STRUCT_TIMEVAL="yes")
630 [struct timeval *tv; 648
631 struct timezone *tz; 649if test x"$FOUND_STRUCT_TIMEVAL" = x"yes"; then
632 gettimeofday(tv, tz);], 650 AC_TRY_COMPILE([#include <sys/time.h>],
633 AC_DEFINE(HAVE_GETTIMEOFDAY,1,[Define if gettimeofday is found]), 651 [struct timeval *tv;
634 AC_DEFINE(NEED_GETTIMEOFDAY,1,[Define if gettimeofday is needed]))) 652 struct timezone *tz;
653 gettimeofday(tv, tz);],
654 AC_DEFINE(HAVE_GETTIMEOFDAY,1,[Define if gettimeofday is found]),
655 AC_DEFINE(NEED_GETTIMEOFDAY,1,[Define if gettimeofday is needed]))
656fi
635 657
636dnl Checks for library functions. 658dnl Checks for library functions.
637AC_CHECK_FUNCS(memmove select socket strdup strstr strtol strtoul floor) 659AC_CHECK_FUNCS(memmove select socket strdup strstr strtol strtoul floor)