summaryrefslogtreecommitdiff
path: root/lib/util/time.m4
diff options
context:
space:
mode:
Diffstat (limited to 'lib/util/time.m4')
-rw-r--r--lib/util/time.m49
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/util/time.m4 b/lib/util/time.m4
new file mode 100644
index 0000000000..f61ae4cd25
--- /dev/null
+++ b/lib/util/time.m4
@@ -0,0 +1,9 @@
+AC_CACHE_CHECK([if gettimeofday takes tz argument],samba_cv_HAVE_GETTIMEOFDAY_TZ,[
+AC_TRY_RUN([
+#include <sys/time.h>
+#include <unistd.h>
+main() { struct timeval tv; exit(gettimeofday(&tv, NULL));}],
+ samba_cv_HAVE_GETTIMEOFDAY_TZ=yes,samba_cv_HAVE_GETTIMEOFDAY_TZ=no,samba_cv_HAVE_GETTIMEOFDAY_TZ=cross)])
+if test x"$samba_cv_HAVE_GETTIMEOFDAY_TZ" = x"yes"; then
+ AC_DEFINE(HAVE_GETTIMEOFDAY_TZ,1,[Whether gettimeofday() is available])
+fi