To test extended BFP opcodes we need sizeof(long double) == 16.
Certain old versions of GCC don't have that as default. So we must
give -mlong-double-128 on the command line.
Pertains to BZ #352183.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15623 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/configure.ac b/configure.ac
index 9211b95..95bc904 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1847,6 +1847,25 @@
 AC_SUBST(PREFERRED_STACK_BOUNDARY_2)
 
 
+# does this compiler support -mlong-double-128 ?
+AC_MSG_CHECKING([if gcc accepts -mlong-double-128])
+safe_CFLAGS=$CFLAGS
+CFLAGS="-mlong-double-128 -Werror"
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[
+  return 0;
+]])], [
+ac_compiler_supports_mlong_double_128=yes
+AC_MSG_RESULT([yes])
+], [
+ac_compiler_supports_mlong_double_128=no
+AC_MSG_RESULT([no])
+])
+CFLAGS=$safe_CFLAGS
+AM_CONDITIONAL(HAS_MLONG_DOUBLE_128, test x$ac_compiler_supports_mlong_double_128 = xyes)
+FLAG_MLONG_DOUBLE_128="-mlong-double-128"
+AC_SUBST(FLAG_MLONG_DOUBLE_128)
+
+
 # Convenience function to check whether GCC supports a particular
 # warning option. Takes two arguments,
 # first the warning flag name to check (without -W), then the