summaryrefslogtreecommitdiffstats
path: root/configure.in
diff options
context:
space:
mode:
authorDana Robinson <derobins@hdfgroup.org>2011-10-11 19:04:46 (GMT)
committerDana Robinson <derobins@hdfgroup.org>2011-10-11 19:04:46 (GMT)
commit3674c78a6ee2be3292bafd3d7dae28a90a52b699 (patch)
treee15f512a20af6de2c687c4fce6f44a6efd323967 /configure.in
parent4eab5f7e31f8b08016dbaec1cf0e91f525311bab (diff)
downloadhdf5-3674c78a6ee2be3292bafd3d7dae28a90a52b699.zip
hdf5-3674c78a6ee2be3292bafd3d7dae28a90a52b699.tar.gz
hdf5-3674c78a6ee2be3292bafd3d7dae28a90a52b699.tar.bz2
[svn-r21517] - Added checks for clock_gettime() to configure.in.
Tested on Linux, FreeBSD, Solaris, MacOSX to ensure they are found correctly and everything builds. No code currently relys on clock_gettime(). - Brought Windows and VMS H5pubconf.h files into sync with the Linux file. Tested on Windows. Ray will test on VMS when this is pushed to the 1.8.x branch.
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in13
1 files changed, 11 insertions, 2 deletions
diff --git a/configure.in b/configure.in
index 10386b8..e7e292a 100644
--- a/configure.in
+++ b/configure.in
@@ -1344,11 +1344,14 @@ AC_HEADER_STDC
AC_HEADER_TIME
dnl ----------------------------------------------------------------------
-dnl Check for these two functions before <sys/time.h> is checked for, otherwise
-dnl they are not detected correctly on Solaris [2.6].
+dnl Check for these two functions before the time headers are checked
+dnl for, otherwise they are not detected correctly on Solaris (the
+dnl configure test will fail due to multiply-defined symbols).
dnl
AC_CHECK_FUNCS(difftime)
AC_CHECK_FUNCS(gettimeofday, [have_gettime="yes"], [have_gettime="no"])
+AC_SEARCH_LIBS([clock_gettime], [rt posix4])
+AC_CHECK_FUNCS([clock_gettime],[have_clock_gettime="yes"],[have_clock_gettime="no"])
dnl Unix
AC_CHECK_HEADERS([sys/resource.h sys/time.h unistd.h sys/ioctl.h sys/stat.h])
@@ -2074,6 +2077,12 @@ if test "X$THREADSAFE" = "Xyes"; then
fi
dnl ----------------------------------------------------------------------
+dnl Check for MONOTONIC_TIMER support (used in clock_gettime). This has
+dnl to be done after any POSIX/BSD defines to ensure that the test gets
+dnl the correct POSIX level on linux.
+AC_CHECK_DECL(CLOCK_MONOTONIC,[have_clock_monotonic="yes"],[have_clock_monotonic="no"],[[#include <time.h>]])
+
+dnl ----------------------------------------------------------------------
dnl How does one figure out the local time zone? Anyone know of a
dnl Posix way to do this?
dnl