From e8662248c8bf7dfc830ce34f301f30f59e600cd8 Mon Sep 17 00:00:00 2001 From: Björn Jacke Date: Mon, 30 Aug 2010 14:35:49 +0200 Subject: libreplace: move gettimeofday TZ arg check here --- lib/replace/system/config.m4 | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'lib/replace/system') diff --git a/lib/replace/system/config.m4 b/lib/replace/system/config.m4 index b8568a5165..04364bc3a1 100644 --- a/lib/replace/system/config.m4 +++ b/lib/replace/system/config.m4 @@ -11,6 +11,16 @@ AC_CHECK_HEADERS(sys/time.h utime.h) AC_HEADER_TIME AC_CHECK_FUNCS(utime utimes) +AC_CACHE_CHECK([if gettimeofday takes TZ argument],libreplace_cv_HAVE_GETTIMEOFDAY_TZ,[ +AC_TRY_RUN([ +#include +#include +main() { struct timeval tv; exit(gettimeofday(&tv, NULL));}], + libreplace_cv_HAVE_GETTIMEOFDAY_TZ=yes,libreplace_cv_HAVE_GETTIMEOFDAY_TZ=no,libreplace_cv_HAVE_GETTIMEOFDAY_TZ=yes)]) +if test x"$libreplace_cv_HAVE_GETTIMEOFDAY_TZ" = x"yes"; then + AC_DEFINE(HAVE_GETTIMEOFDAY_TZ,1,[Whether gettimeofday() is available]) +fi + # wait AC_HEADER_SYS_WAIT -- cgit