diff --git a/configure b/configure index 9e3b20f6b7..958846b142 100755 --- a/configure +++ b/configure @@ -20419,9 +20419,7 @@ if test "x$wxUSE_MACOSX_VERSION_MIN" != "x"; then fi if test "$HAVE_CXX11" = "1" ; then - CXXFLAGS="$CXXFLAGS -stdlib=libc++" - OBJCXXFLAGS="$OBJCXXFLAGS -stdlib=libc++" - LDFLAGS="$LDFLAGS -stdlib=libc++" + eval "CXX=\"$CXX -stdlib=libc++\"" fi if test "x$retest_macosx_linking" = "xyes"; then diff --git a/configure.in b/configure.in index 6804f244bc..cb95fb6fb1 100644 --- a/configure.in +++ b/configure.in @@ -1239,11 +1239,11 @@ fi if test "$HAVE_CXX11" = "1" ; then dnl We also need to use libc++ standard library instead of libstdc++ for - dnl C++11 support, both when compiling (for both C++ and Objective-C++) and - dnl when linking. - CXXFLAGS="$CXXFLAGS -stdlib=libc++" - OBJCXXFLAGS="$OBJCXXFLAGS -stdlib=libc++" - LDFLAGS="$LDFLAGS -stdlib=libc++" + dnl C++11 support, both when compiling (for both C++ and Objective-C++, so + dnl putting this in just CXXFLAGS wouldn't be enough) and when linking + dnl (both libraries and plugins, using bakefile shared-ld-sh script which + dnl doesn't handle this option, so putting it in LDFLAGS wouldn't work). + eval "CXX=\"$CXX -stdlib=libc++\"" fi dnl If either an SDK or a version option was added, make sure that we can