From 232e8677b1f74e2d292db88beb8ac3273d5164ce Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 5 Jul 2020 19:50:24 +0200 Subject: [PATCH] Enforce using C++11 under macOS in configure There is no reason not to turn it on there, as all compilers/compiler versions supported under this platform support C++11 too. --- configure | 4 ++++ configure.in | 7 +++++++ 2 files changed, 11 insertions(+) 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.