summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorRincewindsHat <12514511+RincewindsHat@users.noreply.github.com>2023-09-23 21:41:50 +0200
committerRincewindsHat <12514511+RincewindsHat@users.noreply.github.com>2023-09-23 21:41:50 +0200
commitbc2d1e4b5ecd5fc9270b8d8a65cbd445b7fb783f (patch)
tree7eeed01f0f612364f572feea012e77b8ae0f647a /configure.ac
parent719e27ddc2f0b48bcd7fe5584b23e3ce83ddf291 (diff)
downloadmonitoring-plugins-bc2d1e4b5ecd5fc9270b8d8a65cbd445b7fb783f.tar.gz
Somehow this fixes detection of the availability of struct timeval for me
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac16
1 files changed, 10 insertions, 6 deletions
diff --git a/configure.ac b/configure.ac
index a294b00f..2ddc5035 100644
--- a/configure.ac
+++ b/configure.ac
@@ -645,12 +645,16 @@ AC_TRY_COMPILE([#include <sys/time.h>],
645 [struct timeval *tv; 645 [struct timeval *tv;
646 struct timezone *tz;], 646 struct timezone *tz;],
647 AC_DEFINE(HAVE_STRUCT_TIMEVAL,1,[Define if we have a timeval structure]) 647 AC_DEFINE(HAVE_STRUCT_TIMEVAL,1,[Define if we have a timeval structure])
648 AC_TRY_COMPILE([#include <sys/time.h>], 648 FOUND_STRUCT_TIMEVAL="yes")
649 [struct timeval *tv; 649
650 struct timezone *tz; 650if test x$FOUND_STRUCT_TIMEVAL = x"yes"; then
651 gettimeofday(tv, tz);], 651 AC_TRY_COMPILE([#include <sys/time.h>],
652 AC_DEFINE(HAVE_GETTIMEOFDAY,1,[Define if gettimeofday is found]), 652 [struct timeval *tv;
653 AC_DEFINE(NEED_GETTIMEOFDAY,1,[Define if gettimeofday is needed]))) 653 struct timezone *tz;
654 gettimeofday(tv, tz);],
655 AC_DEFINE(HAVE_GETTIMEOFDAY,1,[Define if gettimeofday is found]),
656 AC_DEFINE(NEED_GETTIMEOFDAY,1,[Define if gettimeofday is needed]))
657fi
654 658
655dnl Checks for library functions. 659dnl Checks for library functions.
656AC_CHECK_FUNCS(memmove select socket strdup strstr strtol strtoul floor) 660AC_CHECK_FUNCS(memmove select socket strdup strstr strtol strtoul floor)