summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorRaymond Lu <songyulu@hdfgroup.org>2005-01-14 20:15:34 (GMT)
committerRaymond Lu <songyulu@hdfgroup.org>2005-01-14 20:15:34 (GMT)
commit105bee4ead610d183af62e08b4f7c219ba0ea6a9 (patch)
tree5f2525c1045a9dfa3f8731b84bedfa0b80ad3e4e /configure
parent23130b569c3846a1fd098841bb2f9912dd9040de (diff)
downloadhdf5-105bee4ead610d183af62e08b4f7c219ba0ea6a9.zip
hdf5-105bee4ead610d183af62e08b4f7c219ba0ea6a9.tar.gz
hdf5-105bee4ead610d183af62e08b4f7c219ba0ea6a9.tar.bz2
[svn-r9826] Purpose: Bug fix
Description: Intel compiler on Linux has some problem to convert long double to unsigned int correctly. Solution: Detect the problem in configure and define a macro to skip this test if it happens. Platforms tested: eirene and fuss. Simple change.
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure66
1 files changed, 66 insertions, 0 deletions
diff --git a/configure b/configure
index e8434da..4c9ed5f 100755
--- a/configure
+++ b/configure
@@ -33914,6 +33914,72 @@ else
echo "${ECHO_T}no" >&6
fi
+echo "$as_me:$LINENO: checking if converting long double to unsigned int values works" >&5
+echo $ECHO_N "checking if converting long double to unsigned int values works... $ECHO_C" >&6
+
+if test "${hdf5_cv_ldouble_to_uint_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" >&5
+echo "$as_me: error: cannot run test program while cross compiling" >&2;}
+ { (exit 1); exit 1; }; }
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+ int main(void)
+ {
+ long double ld = 2733248032.9183987530L;
+ unsigned int i;
+ int ret = 0;
+
+ i = (unsigned int)ld;
+ if(i!=2733248032 && i!=2733248031 && i!=2733248033)
+ ret = 1;
+
+done:
+ exit(ret);
+ }
+
+_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_ldouble_to_uint_works=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_cv_ldouble_to_uint_works=no
+fi
+rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+fi
+
+
+if test ${hdf5_cv_ldouble_to_uint_works} = "yes"; then
+
+cat >>confdefs.h <<\_ACEOF
+#define CV_LDOUBLE_TO_UINT_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
echo "$as_me:$LINENO: checking if compiling unsigned long long to floating-point typecasts work" >&5
echo $ECHO_N "checking if compiling unsigned long long to floating-point typecasts work... $ECHO_C" >&6