configure.ac | 39 ++++++++++++++++----------------------- 1 file changed, 16 insertions(+), 23 deletions(-)
New commits: commit 0f3895a78ecf1f9730f41a41f3c2f2fecd0d8b83 Author: Stephan Bergmann <sberg...@redhat.com> Date: Fri Aug 30 16:58:41 2013 +0200 Decouple setting -std=gnu++11/c++11 from setting -stdlib=libc++ Forcing -stdlib=c++11 into CXX upon --enable-libc++ instead of only into CXXFLAGS_CXX11 as done normally caused external projects to unexpectedly pick it up, causing build failures in firebird. Change-Id: I588d75ccbde6b9fd4f38e10a0c67c2f6086f8977 diff --git a/configure.ac b/configure.ac index 5b7b2647..329350a 100644 --- a/configure.ac +++ b/configure.ac @@ -2690,8 +2690,7 @@ if test $_os = Darwin; then AC_MSG_ERROR([--enable-libc++ requires --with-macosx-version-min-required >= 10.7]) fi # Use libc++ instead of libstdc++ when possible - # and also compile as C++11 - stdlib="-std=c++11 -stdlib=libc++" + stdlib=-stdlib=libc++ CPP_LIBRARY="LIBCPP" fi if test "$ENABLE_LTO" = TRUE; then @@ -5956,28 +5955,22 @@ if test "$COM" = MSC; then elif test "$GCC" = "yes"; then CXXFLAGS_CXX11= AC_MSG_CHECKING([whether $CXX supports C++11]) - if test "$CPP_LIBRARY" = LIBCPP -a $_os = Darwin; then - : Already set CXX to contain -std=c++11 - HAVE_CXX11=TRUE - AC_MSG_RESULT(yes) - else - for flag in -std=gnu++11 -std=gnu++0x -std=c++11 -std=c++0x ; do - save_CXXFLAGS=$CXXFLAGS - CXXFLAGS="$CXXFLAGS $flag -Werror" - AC_LANG_PUSH([C++]) - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[void f() {}]])],[CXXFLAGS_CXX11=$flag]) - AC_LANG_POP([C++]) - CXXFLAGS=$save_CXXFLAGS - if test -n "$CXXFLAGS_CXX11"; then - HAVE_CXX11=TRUE - break - fi - done - if test "$HAVE_CXX11" = TRUE; then - AC_MSG_RESULT([yes ($CXXFLAGS_CXX11)]) - else - AC_MSG_RESULT(no) + for flag in -std=gnu++11 -std=gnu++0x -std=c++11 -std=c++0x ; do + save_CXXFLAGS=$CXXFLAGS + CXXFLAGS="$CXXFLAGS $flag -Werror" + AC_LANG_PUSH([C++]) + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[void f() {}]])],[CXXFLAGS_CXX11=$flag]) + AC_LANG_POP([C++]) + CXXFLAGS=$save_CXXFLAGS + if test -n "$CXXFLAGS_CXX11"; then + HAVE_CXX11=TRUE + break fi + done + if test "$HAVE_CXX11" = TRUE; then + AC_MSG_RESULT([yes ($CXXFLAGS_CXX11)]) + else + AC_MSG_RESULT(no) fi fi _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits