summaryrefslogtreecommitdiffstats
path: root/configure.in
diff options
context:
space:
mode:
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in31
1 files changed, 31 insertions, 0 deletions
diff --git a/configure.in b/configure.in
index b9c3846..7790aab 100644
--- a/configure.in
+++ b/configure.in
@@ -2734,6 +2734,37 @@ else
AC_MSG_RESULT([no])
fi
+dnl ----------------------------------------------------------------------
+dnl Set the flag to indicate that the machine can accurately convert
+dnl 'long double' to 'unsigned int' values. (This flag should be set for
+dnl all machines, except for some Intel compilers on some Linux.)
+dnl
+AC_MSG_CHECKING([if converting long double to unsigned int values works])
+
+AC_CACHE_VAL([hdf5_cv_ldouble_to_uint_works],
+ [AC_TRY_RUN([
+ 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);
+ }
+ ], [hdf5_cv_ldouble_to_uint_works=yes], [hdf5_cv_ldouble_to_uint_works=no],)])
+
+if test ${hdf5_cv_ldouble_to_uint_works} = "yes"; then
+ AC_DEFINE([CV_LDOUBLE_TO_UINT_WORKS], [1],
+ [Define if your system can convert long double to unsigned int values correctly.])
+ AC_MSG_RESULT([yes])
+else
+ AC_MSG_RESULT([no])
+fi
dnl ----------------------------------------------------------------------
dnl Set the flag to indicate that the machine can _compile_