From bc2d1e4b5ecd5fc9270b8d8a65cbd445b7fb783f Mon Sep 17 00:00:00 2001 From: RincewindsHat <12514511+RincewindsHat@users.noreply.github.com> Date: Sat, 23 Sep 2023 21:41:50 +0200 Subject: Somehow this fixes detection of the availability of struct timeval for me --- configure.ac | 16 ++++++++++------ 1 file 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 ], [struct timeval *tv; struct timezone *tz;], AC_DEFINE(HAVE_STRUCT_TIMEVAL,1,[Define if we have a timeval structure]) - AC_TRY_COMPILE([#include ], - [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 ], + [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) -- cgit v1.2.3-74-g34f1 From dbd49978afb1accb78b083d788fd2a7f4b0edef8 Mon Sep 17 00:00:00 2001 From: Lorenz Kästle <12514511+RincewindsHat@users.noreply.github.com> Date: Fri, 13 Oct 2023 01:38:42 +0200 Subject: Update configure.ac Co-authored-by: waja --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 58a299ff..b5374b23 100644 --- a/configure.ac +++ b/configure.ac @@ -646,7 +646,7 @@ AC_TRY_COMPILE([#include ], AC_DEFINE(HAVE_STRUCT_TIMEVAL,1,[Define if we have a timeval structure]) FOUND_STRUCT_TIMEVAL="yes") -if test x$FOUND_STRUCT_TIMEVAL = x"yes"; then +if test x"$FOUND_STRUCT_TIMEVAL" = x"yes"; then AC_TRY_COMPILE([#include ], [struct timeval *tv; struct timezone *tz; -- cgit v1.2.3-74-g34f1