diff --git a/configure b/configure index deb702695b..1cc233dfa2 100755 --- a/configure +++ b/configure @@ -20415,7 +20415,8 @@ if test "x$wxUSE_MACOSX_VERSION_MIN" != "x"; then fi if test "$HAVE_CXX11" = "1" ; then - CXX="$CXX -stdlib=libc++" + CXXFLAGS="$CXXFLAGS -stdlib=libc++" + LDFLAGS="$LDFLAGS -stdlib=libc++" fi if test "x$retest_macosx_linking" = "xyes"; then diff --git a/configure.in b/configure.in index 0ac57f3fd7..8457112a47 100644 --- a/configure.in +++ b/configure.in @@ -1233,8 +1233,9 @@ fi if test "$HAVE_CXX11" = "1" ; then dnl We also need to use libc++ standard library instead of libstdc++ for - dnl C++11 support. - CXX="$CXX -stdlib=libc++" + dnl C++11 support, both when compiling and when linking. + CXXFLAGS="$CXXFLAGS -stdlib=libc++" + LDFLAGS="$LDFLAGS -stdlib=libc++" fi dnl If either an SDK or a version option was added, make sure that we can