diff options
author | James Laird <jlaird@hdfgroup.org> | 2004-08-11 01:51:50 (GMT) |
---|---|---|
committer | James Laird <jlaird@hdfgroup.org> | 2004-08-11 01:51:50 (GMT) |
commit | 1b47c2a6774bf7cf94c124d5814ef1290cf28bd5 (patch) | |
tree | 011bd3908b403872532c8622fc10dc1267b06e02 /configure.in | |
parent | 92f2899160b57f55b8c3a846fd6f37bf8d8e99f8 (diff) | |
download | hdf5-1b47c2a6774bf7cf94c124d5814ef1290cf28bd5.zip hdf5-1b47c2a6774bf7cf94c124d5814ef1290cf28bd5.tar.gz hdf5-1b47c2a6774bf7cf94c124d5814ef1290cf28bd5.tar.bz2 |
[svn-r9062]
Purpose:
Bug fix
Description:
Fixed configure script so that gettimeofday test uses cached variables
Platforms tested:
sleipnir, copper, arabica, verbena
Misc. update:
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 35 |
1 files changed, 18 insertions, 17 deletions
diff --git a/configure.in b/configure.in index 745cdc2..cbcc32b 100644 --- a/configure.in +++ b/configure.in @@ -1501,23 +1501,24 @@ dnl If gettimeofday() is going to be used, make sure it uses the timezone struct if test "$have_gettime" = "yes" -a "$have_struct_tz" = "yes"; then AC_MSG_CHECKING(whether gettimeofday() gives timezone) - AC_TRY_RUN([ - #include <time.h> - #include <sys/time.h> - int main(void) - { - struct timeval tv; - struct timezone tz; - tz.tz_minuteswest = 7777; /* Initialize to an unreasonable number */ - tz.tz_dsttime = 7; - gettimeofday(&tv, &tz); - /* Check whether the function returned any value at all */ - if(tz.tz_minuteswest == 7777 && tz.tz_dsttime == 7) - exit(1); - else exit (0); - }], [hdf5_use_tz="yes"], [hdf5_use_tz="no"],) - - if test "$hdf5_use_tz" = "yes"; then + AC_CACHE_VAL([hdf5_cv_gettimeofday_tz], + [AC_TRY_RUN([ + #include <time.h> + #include <sys/time.h> + int main(void) + { + struct timeval tv; + struct timezone tz; + tz.tz_minuteswest = 7777; /* Initialize to an unreasonable number */ + tz.tz_dsttime = 7; + gettimeofday(&tv, &tz); + /* Check whether the function returned any value at all */ + if(tz.tz_minuteswest == 7777 && tz.tz_dsttime == 7) + exit(1); + else exit (0); + }], [hdf5_cv_gettimeofday_tz=yes], [hdf5_cv_gettimeofday_tz=no],)]) + + if test ${hdf5_cv_gettimeofday_tz} = "yes"; then AC_MSG_RESULT([yes]) AC_DEFINE([GETTIMEOFDAY_GIVES_TZ], [1], [Define if gettimeofday() populates the tz pointer passed in]) |