diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2013-08-30 16:58:41 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2013-08-30 17:02:26 +0200 |
commit | 0f3895a78ecf1f9730f41a41f3c2f2fecd0d8b83 (patch) | |
tree | a628dea747767e7d406b3364a9dfb8bb5dbfae70 /configure.ac | |
parent | Set path and not url for FIREBIRD_[TMP|LOCK]. (firebird-sdbc) (diff) | |
download | core-0f3895a78ecf1f9730f41a41f3c2f2fecd0d8b83.tar.gz core-0f3895a78ecf1f9730f41a41f3c2f2fecd0d8b83.zip |
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
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 39 |
1 files changed, 16 insertions, 23 deletions
diff --git a/configure.ac b/configure.ac index 5b7b264785dc..329350a7213e 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 |