[Libreoffice-commits] .: configure.in set_soenv.in
Caolán McNamara
caolan at kemper.freedesktop.org
Wed Dec 8 01:25:20 PST 2010
configure.in | 43 ++++++++++++++++++++++++++++++++++++++++++-
set_soenv.in | 1 +
2 files changed, 43 insertions(+), 1 deletion(-)
New commits:
commit 456f8716aa0fee6f91852b7b275c34c5bd45c1da
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Dec 8 09:24:49 2010 +0000
configure check for C++0x without Language Defect 757
diff --git a/configure.in b/configure.in
index 0e60fdd..1510d03 100644
--- a/configure.in
+++ b/configure.in
@@ -3161,7 +3161,7 @@ AC_SUBST(STLPORT_VER)
AC_SUBST(USE_SYSTEM_STL)
dnl ===================================================================
-dnl visibility feature
+dnl visibility and c++0x features
dnl ===================================================================
if test "$GCC" = "yes"; then
AC_MSG_CHECKING([whether $CC supports -fvisibility=hidden])
@@ -3174,8 +3174,49 @@ if test "$GCC" = "yes"; then
else
AC_MSG_RESULT([no])
fi
+
+ AC_MSG_CHECKING([whether $CC supports -std=c++0x without Language Defect 757])
+ save_CXXFLAGS=$CFLAGS
+ CXXFLAGS="$CXXFLAGS -std=c++0x"
+ AC_LANG_PUSH([C++])
+
+ AC_TRY_COMPILE([
+#include <stddef.h>
+
+template <typename T, size_t S> char (&sal_n_array_size( T(&)[S] ))[S];
+
+namespace
+{
+ struct b
+ {
+ int i;
+ int j;
+ };
+}
+],[
+struct a
+{
+ int i;
+ int j;
+};
+a thinga[]={{0,0}, {1,1}};
+b thingb[]={{0,0}, {1,1}};
+size_t i = sizeof(sal_n_array_size(thinga));
+size_t j = sizeof(sal_n_array_size(thingb));
+return !(i != 0 && j != 0);
+], HAVE_CXX0X=TRUE,)
+
+ AC_LANG_POP([C++])
+ CXXFLAGS=$save_CXXFLAGS
+ if test "$HAVE_CXX0X" = "TRUE"; then
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_RESULT([no])
+ fi
fi
+AC_SUBST(HAVE_CXX0X)
+
# ===================================================================
# use --ccache-skip?
# ===================================================================
diff --git a/set_soenv.in b/set_soenv.in
index 88dd5f1..cc41e61 100644
--- a/set_soenv.in
+++ b/set_soenv.in
@@ -1856,6 +1856,7 @@ ToFile( "HAVE_GCC_VISIBILITY_BROKEN",
ToFile( "HAVE_LD_HASH_STYLE","@HAVE_LD_HASH_STYLE@","e" );
ToFile( "HAVE_LD_BSYMBOLIC_FUNCTIONS",
"@HAVE_LD_BSYMBOLIC_FUNCTIONS@","e" );
+ToFile( "HAVE_CXX0X", "@HAVE_CXX0X@", "e" );
ToFile( "CXX", $CXX, "e" );
ToFile( "USE_CCACHE", "@USE_CCACHE@", "e" );
ToFile( "MINGWCXX", "@MINGWCXX@", "e" );
More information about the Libreoffice-commits
mailing list