summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2014-09-11 12:35:52 +0100
committerColin Watson <cjwatson@debian.org>2014-09-11 12:53:50 +0100
commitd84ec58866c50d064938b85e5379c324cf25654a (patch)
tree37630437362362b233398aadd7688b47309874d6 /configure.ac
parent8cabdfbf42bdb94bdc500ae4463d0e498349946f (diff)
Speed up the test suite if we have high-precision file timestamps
* configure.ac: Substitute STAT_HAS_NSEC as "yes" or "no" depending on whether high-precision file timestamps are available. * src/tests/Makefile.am (TESTS_ENVIRONMENT): Export STAT_HAS_NSEC to tests. * src/tests/testlib.sh (next_second): Do nothing if STAT_HAS_NSEC is "yes".
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac11
1 files changed, 11 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 11435df7..b68efba9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -478,6 +478,17 @@ AC_TYPE_PID_T
AC_TYPE_UID_T
AC_TYPE_SIZE_T
+# Do we have any kind of high-precision file timestamps?
+if test "x$ac_cv_member_struct_stat_st_atim_tv_nsec" = xyes || \
+ test "x$ac_cv_member_struct_stat_st_atimespec_tv_nsec" = xyes || \
+ test "x$ac_cv_member_struct_stat_st_atimensec" = xyes || \
+ test "x$ac_cv_member_struct_stat_st_atim_st__tim_tv_nsec" = xyes; then
+ STAT_HAS_NSEC=yes
+else
+ STAT_HAS_NSEC=no
+fi
+AC_SUBST([STAT_HAS_NSEC])
+
# Check for pipeline library.
PKG_CHECK_MODULES([libpipeline], [libpipeline >= 1.3.0])