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 | |
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')
-rwxr-xr-x | configure | 41 |
1 files changed, 23 insertions, 18 deletions
@@ -29211,7 +29211,10 @@ rm -f conftest.$ac_objext conftest.$ac_ext if test "$have_gettime" = "yes" -a "$have_struct_tz" = "yes"; then echo "$as_me:$LINENO: checking whether gettimeofday() gives timezone" >&5 echo $ECHO_N "checking whether gettimeofday() gives timezone... $ECHO_C" >&6 - if test "$cross_compiling" = yes; then + if test "${hdf5_cv_gettimeofday_tz+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$cross_compiling" = yes; then { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5 echo "$as_me: error: cannot run test program while cross compiling" >&2;} { (exit 1); exit 1; }; } @@ -29220,20 +29223,20 @@ else #line $LINENO "configure" #include "confdefs.h" - #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); - } + #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); + } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 @@ -29246,18 +29249,20 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - hdf5_use_tz="yes" + hdf5_cv_gettimeofday_tz=yes else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 ( exit $ac_status ) -hdf5_use_tz="no" +hdf5_cv_gettimeofday_tz=no fi rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi +fi + - if test "$hdf5_use_tz" = "yes"; then + if test ${hdf5_cv_gettimeofday_tz} = "yes"; then echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 |