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>2013-01-27 20:50:26 +0200
commit09600ae7e34eb777471c931cd4c3a8cdbda6e84a (patch)
treeb8b1f36585c73e863f2e4554d84987a347dc92d7
parentc3deb8334a71998b986a7b8d5b74bedf26cc23aa (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 515e312..a93e290 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