diff options
| author | Jan Wagner <waja@cyconet.org> | 2023-10-17 13:39:37 +0200 |
|---|---|---|
| committer | Jan Wagner <waja@cyconet.org> | 2023-10-17 13:39:37 +0200 |
| commit | 2a047014385022c8dc06dad4da0428db14898689 (patch) | |
| tree | 00abea46325decf0c72870ee8f9ec1472e8e5344 /configure.ac | |
| parent | f39211c26408af582121f519d89c8abf70e6d437 (diff) | |
| parent | e23a75d954311b3be429a9020e4d317b89615ee7 (diff) | |
| download | monitoring-plugins-2a04701.tar.gz | |
Merge branch 'master' of github.com:monitoring-plugins/monitoring-plugins
Diffstat (limited to 'configure.ac')
| -rw-r--r-- | configure.ac | 36 |
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 | |||
| 332 | AC_ARG_WITH([systemd], [AS_HELP_STRING([--without-systemd], [Skips systemd support])]) | ||
| 333 | |||
| 334 | dnl Check for libsystemd | ||
| 335 | AS_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 | |||
| 331 | dnl Check for headers used by check_ide_smart | 350 | dnl Check for headers used by check_ide_smart |
| 332 | case $host in | 351 | case $host in |
| 333 | *linux*) | 352 | *linux*) |
| @@ -602,7 +621,6 @@ AC_C_CONST | |||
| 602 | AC_STRUCT_TM | 621 | AC_STRUCT_TM |
| 603 | AC_TYPE_PID_T | 622 | AC_TYPE_PID_T |
| 604 | AC_TYPE_SIZE_T | 623 | AC_TYPE_SIZE_T |
| 605 | AC_TYPE_SIGNAL | ||
| 606 | 624 | ||
| 607 | AC_CACHE_CHECK([for va_copy],ac_cv_HAVE_VA_COPY,[ | 625 | AC_CACHE_CHECK([for va_copy],ac_cv_HAVE_VA_COPY,[ |
| 608 | AC_TRY_LINK([#include <stdarg.h> | 626 | AC_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; | 649 | if 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])) | ||
| 656 | fi | ||
| 635 | 657 | ||
| 636 | dnl Checks for library functions. | 658 | dnl Checks for library functions. |
| 637 | AC_CHECK_FUNCS(memmove select socket strdup strstr strtol strtoul floor) | 659 | AC_CHECK_FUNCS(memmove select socket strdup strstr strtol strtoul floor) |
