summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScot Breitenfeld <brtnfld@hdfgroup.org>2015-06-17 16:47:17 (GMT)
committerScot Breitenfeld <brtnfld@hdfgroup.org>2015-06-17 16:47:17 (GMT)
commit3bf582bae9fa8f7d35ba88280cfb8d9dff0abe5a (patch)
tree03f5e6427f5801f5b72ca79cd1582f798f08b80a
parentf51fcf3ffa96b31b3d94434aec6a20ed0432975d (diff)
downloadhdf5-3bf582bae9fa8f7d35ba88280cfb8d9dff0abe5a.zip
hdf5-3bf582bae9fa8f7d35ba88280cfb8d9dff0abe5a.tar.gz
hdf5-3bf582bae9fa8f7d35ba88280cfb8d9dff0abe5a.tar.bz2
[svn-r27226] restricted __float128 to gnu compilers
-rwxr-xr-xconfigure15
-rw-r--r--configure.ac25
2 files changed, 22 insertions, 18 deletions
diff --git a/configure b/configure
index 692388f..31a20bb 100755
--- a/configure
+++ b/configure
@@ -5714,20 +5714,15 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
fi
-if test "$ac_cv_sizeof___float128" != 0; then
-## Check if __float128 and c_long_double are the same size and precision
- if test "$ac_cv_sizeof___float128" = "$ac_cv_sizeof_long_double" && test "$LDBL_DIG" = "$FLT128_DIG"; then
-
-$as_echo "#define HAVE_FLOAT128 0" >>confdefs.h
- PAC_C_MAX_REAL_PRECISION=$LDBL_DIG
- else
+## __float seems to work for __float128, but it should be _Quad type instead
+if test "$ac_cv_sizeof___float128" != 0 && test "$cc_vendor" = "gcc"; then
+## Check if __float128 and c_long_double are the same size and precision
$as_echo "#define HAVE_FLOAT128 1" >>confdefs.h
- PAC_C_MAX_REAL_PRECISION=$FLT128_DIG
- fi
-else
+ PAC_C_MAX_REAL_PRECISION=$FLT128_DIG
+ else
PAC_C_MAX_REAL_PRECISION=$LDBL_DIG
fi
diff --git a/configure.ac b/configure.ac
index 3842734..0279d3c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -366,17 +366,26 @@ HAVE_FLOAT128=0
HAVE_QUADMATH=0
AC_CHECK_HEADERS([quadmath.h], [HAVE_QUADMATH=1], [])
PAC_LDBL_DIG
-if test "$ac_cv_sizeof___float128" != 0; then
+
+## __float seems to work for __float128, but it should be _Quad type instead
+if test "$ac_cv_sizeof___float128" != 0 && test "$cc_vendor" = "gcc"; then
## Check if __float128 and c_long_double are the same size and precision
- if test "$ac_cv_sizeof___float128" = "$ac_cv_sizeof_long_double" && test "$LDBL_DIG" = "$FLT128_DIG"; then
- AC_DEFINE([HAVE_FLOAT128], [0], [Determine if __float128 is available])
- PAC_C_MAX_REAL_PRECISION=$LDBL_DIG
- else
- AC_DEFINE([HAVE_FLOAT128], [1], [Determine if __float128 is available])
- PAC_C_MAX_REAL_PRECISION=$FLT128_DIG
+ dnl if test "$ac_cv_sizeof___float128" = "$ac_cv_sizeof_long_double"; then
+ dnl if test "$LDBL_DIG" = "$FLT128_DIG"; then
+ dnl AC_DEFINE([HAVE_FLOAT128], [0], [Determine if __float128 is available])
+ dnl PAC_C_MAX_REAL_PRECISION=$LDBL_DIG
+ dnl else
+ dnl if test "$FLT128_DIG" > "$LDBL_DIG";then
+ dnl choose the larger precision
+ AC_DEFINE([HAVE_FLOAT128], [1], [Determine if __float128 is available])
+ PAC_C_MAX_REAL_PRECISION=$FLT128_DIG
+ dnl else
+ dnl AC_DEFINE([HAVE_FLOAT128], [0], [Determine if __float128 is available])
+ dnl PAC_C_MAX_REAL_PRECISION=$LDBL_DIG
+ dnl fi
dnl AC_MSG_CHECKING([for quadmath.h])
dnl AC_MSG_RESULT([$HAVE_QUADMATH])
- fi
+ dnl fi
else
PAC_C_MAX_REAL_PRECISION=$LDBL_DIG
fi