summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorRaymond Lu <songyulu@hdfgroup.org>2005-07-19 18:16:33 (GMT)
committerRaymond Lu <songyulu@hdfgroup.org>2005-07-19 18:16:33 (GMT)
commitbd92e1e2a0ad218875243ef6a8476b8f9b81bd0c (patch)
tree214e99d2206352b5b4a219e15ccff3002c6879ca /configure
parentf700613f562d26417d36686eefdb11e2c9ab72ab (diff)
downloadhdf5-bd92e1e2a0ad218875243ef6a8476b8f9b81bd0c.zip
hdf5-bd92e1e2a0ad218875243ef6a8476b8f9b81bd0c.tar.gz
hdf5-bd92e1e2a0ad218875243ef6a8476b8f9b81bd0c.tar.bz2
[svn-r11087] Purpose: Bug fix.
Description: When converting floating-point numbers to integers and the values of floating-point number are greater than the maximal value of integer, Cray X1 generates floating exception. Solution: Added a test in configure to detect Cray X1's exception. Set a flag to indicate the machine that can handle overflow converting all floating-point to all integer types. This flag should be set for all machines, except for Cray X1 where floating exception is generated when the floating-point value is greater than the maximal integer value. Platforms tested: Cray X1 and h5committest.
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure70
1 files changed, 70 insertions, 0 deletions
diff --git a/configure b/configure
index 4c0f1ab..226019a 100755
--- a/configure
+++ b/configure
@@ -50545,6 +50545,76 @@ else
echo "${ECHO_T}no" >&6
fi
+echo "$as_me:$LINENO: checking if overflows normally converting floating-point to integer values" >&5
+echo $ECHO_N "checking if overflows normally converting floating-point to integer values... $ECHO_C" >&6
+
+if test "${hdf5_cv_fp_to_integer_overflow_works+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
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+ int main(void)
+ {
+ float f = 2147483648.0f;
+ int i;
+
+ i = (int)f;
+
+done:
+ exit(0);
+ }
+
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ hdf5_cv_fp_to_integer_overflow_works=yes
+else
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+hdf5_cv_fp_to_integer_overflow_works=no
+fi
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+fi
+
+
+if test ${hdf5_cv_fp_to_integer_overflow_works} = "yes"; then
+
+cat >>confdefs.h <<\_ACEOF
+#define FP_TO_INTEGER_OVERFLOW_WORKS 1
+_ACEOF
+
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
H5_VERSION="`cut -d' ' -f3 $srcdir/README.txt | head -1`"