diff --git a/configure b/configure index af6a54f13d..c4eadcb9cb 100755 --- a/configure +++ b/configure @@ -15152,6 +15152,10 @@ if test "$CXX" = "g++" -a "$GXX" != "yes"; then as_fn_error $? "C++ compiler is needed to build wxWidgets" "$LINENO" 5 fi +if test "$wxUSE_MAC" = 1 -a -z "$wxWITH_CXX"; then + wxWITH_CXX=11 +fi + if test -n "$wxWITH_CXX"; then case "$wxWITH_CXX" in 11) diff --git a/configure.in b/configure.in index a34c80a94b..47129cd400 100644 --- a/configure.in +++ b/configure.in @@ -1098,6 +1098,13 @@ if test "$CXX" = "g++" -a "$GXX" != "yes"; then AC_MSG_ERROR([C++ compiler is needed to build wxWidgets]) fi +dnl Always use C++11 under macOS, there are no supported compilers not +dnl supporting it there, but don't prevent a latest version of C++ from being +dnl used. +if test "$wxUSE_MAC" = 1 -a -z "$wxWITH_CXX"; then + wxWITH_CXX=11 +fi + if test -n "$wxWITH_CXX"; then dnl AX_CXX_COMPILE_STDCXX requires its VERSION argument to be specified at dnl autoconf, not run, time.