From a22acca1197b82e52d5f90b53713a9ae31795a34 Mon Sep 17 00:00:00 2001 From: Patryk Obara Date: Fri, 8 Nov 2019 11:28:05 +0100 Subject: [PATCH] Explicitly use C++11 for compilation Otherwise compilation fails on GCC 5.4 in Steam Runtime environment. As of 2019, all up-to-date compilers support C++11, most of them use C++14 as default standard, but C++14 is not fully supported by autoconf in Ubuntu 16.04 LTS. Full C++11 support was introduced in GCC 4.8.1 and Clang 3.3. --- configure.ac | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/configure.ac b/configure.ac index e56d0945..0989ebb4 100644 --- a/configure.ac +++ b/configure.ac @@ -63,20 +63,8 @@ AC_CHECK_SIZEOF(unsigned long) AC_CHECK_SIZEOF(unsigned long long) AC_CHECK_SIZEOF(int *) -dnl check and use C++ circa-2003 language constructs. -AX_CXX_COMPILE_STDCXX_0X(noext, mandatory) -if test "$ax_cv_cxx_compile_cxx0x_native" = no; then - if test "$ax_cv_cxx_compile_cxx0x_cxx" = yes; then - CXXFLAGS="$CXXFLAGS -std=c++0x" - else - AC_MSG_ERROR([A C++ compiler that supports the C++03 standard is required]) - fi -fi -# Note that the above macro is deprecated in favor of AX_CXX_COMPILE_STDCXX_11: -# https://www.gnu.org/software/autoconf-archive/ax_cxx_compile_stdcxx_0x.html -# However we use it anyway because it is suggested that C++03 should -# be the limit for now: https://sourceforge.net/p/dosbox/patches/283/#cb9a - +dnl Require compiler with C++11 support, do not use GNU extensions. +AX_CXX_COMPILE_STDCXX_11(noext, mandatory) dnl some semi complex check for sys/socket so it works on darwin as well AC_CHECK_HEADERS([stdlib.h sys/types.h])