summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSiarhei Siamashka <siarhei.siamashka@gmail.com>2012-12-12 02:41:55 +0200
committerSiarhei Siamashka <siarhei.siamashka@gmail.com>2012-12-15 08:08:26 +0200
commit83e5b874eb8808a05c3096187a65829be1417768 (patch)
treeff87f1668fe2a058aa210a35fc987bf41a5036a4
parentad9968bd6f7537b85bf35f62d5891f29788a3771 (diff)
configure.ac: Added detection for __float128 support
GCC supports 128-bit floating point data type on some platforms (including but not limited to x86 and x86-64). This may be useful for tests, which need prefectly accurate reference implementations of certain algorithms.
-rw-r--r--configure.ac16
1 files changed, 16 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 81f068d..529ed0a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -968,6 +968,22 @@ fi
AC_MSG_RESULT($support_for_attribute_constructor)
AC_SUBST(TOOLCHAIN_SUPPORTS_ATTRIBUTE_CONSTRUCTOR)
+dnl =====================================
+dnl __float128
+
+support_for_float128=no
+
+AC_MSG_CHECKING(for __float128)
+AC_LINK_IFELSE([AC_LANG_SOURCE([[
+__float128 a = 1.0Q, b = 2.0Q; int main (void) { return a + b; }
+]])], support_for_float128=yes)
+
+if test x$support_for_float128 = xyes; then
+ AC_DEFINE([HAVE_FLOAT128], [], [Whether the tool chain supports __float128])
+fi
+
+AC_MSG_RESULT($support_for_float128)
+
dnl ==================
dnl libpng