summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorLorenz Kästle <12514511+RincewindsHat@users.noreply.github.com>2023-10-13 05:37:03 (GMT)
committerGitHub <noreply@github.com>2023-10-13 05:37:03 (GMT)
commitbf70f5f847e3407af572d1768cca747af270b993 (patch)
tree08211cd97c1e961bbfb9b02b30eb2c1068a999a3 /configure.ac
parent56ba2368d93a4fad4a6d874a2c9bfade1f2b37b0 (diff)
parentdbd49978afb1accb78b083d788fd2a7f4b0edef8 (diff)
downloadmonitoring-plugins-bf70f5f847e3407af572d1768cca747af270b993.tar.gz
Merge pull request #1927 from RincewindsHat/autoconf_fix
Somehow this fixes detection of the availability of struct timeval fo…
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 e6a40d3..b5374b2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -644,12 +644,16 @@ AC_TRY_COMPILE([#include <sys/time.h>],
644 [struct timeval *tv; 644 [struct timeval *tv;
645 struct timezone *tz;], 645 struct timezone *tz;],
646 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])
647 AC_TRY_COMPILE([#include <sys/time.h>], 647 FOUND_STRUCT_TIMEVAL="yes")
648 [struct timeval *tv; 648
649 struct timezone *tz; 649if test x"$FOUND_STRUCT_TIMEVAL" = x"yes"; then
650 gettimeofday(tv, tz);], 650 AC_TRY_COMPILE([#include <sys/time.h>],
651 AC_DEFINE(HAVE_GETTIMEOFDAY,1,[Define if gettimeofday is found]), 651 [struct timeval *tv;
652 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
653 657
654dnl Checks for library functions. 658dnl Checks for library functions.
655AC_CHECK_FUNCS(memmove select socket strdup strstr strtol strtoul floor) 659AC_CHECK_FUNCS(memmove select socket strdup strstr strtol strtoul floor)