mirror of
https://github.com/monitoring-plugins/monitoring-plugins.git
synced 2026-06-11 09:40:05 -04:00
Somehow this fixes detection of the availability of struct timeval for me
This commit is contained in:
parent
719e27ddc2
commit
bc2d1e4b5e
1 changed files with 10 additions and 6 deletions
16
configure.ac
16
configure.ac
|
|
@ -645,12 +645,16 @@ AC_TRY_COMPILE([#include <sys/time.h>],
|
|||
[struct timeval *tv;
|
||||
struct timezone *tz;],
|
||||
AC_DEFINE(HAVE_STRUCT_TIMEVAL,1,[Define if we have a timeval structure])
|
||||
AC_TRY_COMPILE([#include <sys/time.h>],
|
||||
[struct timeval *tv;
|
||||
struct timezone *tz;
|
||||
gettimeofday(tv, tz);],
|
||||
AC_DEFINE(HAVE_GETTIMEOFDAY,1,[Define if gettimeofday is found]),
|
||||
AC_DEFINE(NEED_GETTIMEOFDAY,1,[Define if gettimeofday is needed])))
|
||||
FOUND_STRUCT_TIMEVAL="yes")
|
||||
|
||||
if test x$FOUND_STRUCT_TIMEVAL = x"yes"; then
|
||||
AC_TRY_COMPILE([#include <sys/time.h>],
|
||||
[struct timeval *tv;
|
||||
struct timezone *tz;
|
||||
gettimeofday(tv, tz);],
|
||||
AC_DEFINE(HAVE_GETTIMEOFDAY,1,[Define if gettimeofday is found]),
|
||||
AC_DEFINE(NEED_GETTIMEOFDAY,1,[Define if gettimeofday is needed]))
|
||||
fi
|
||||
|
||||
dnl Checks for library functions.
|
||||
AC_CHECK_FUNCS(memmove select socket strdup strstr strtol strtoul floor)
|
||||
|
|
|
|||
Loading…
Reference in a new issue