File: use-default-cxx-std.patch

package info (click to toggle)
dosbox-x 2025.05.03%2Bdfsg-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 47,920 kB
  • sloc: cpp: 438,713; ansic: 165,044; sh: 1,337; makefile: 963; perl: 385; python: 106; asm: 57
file content (61 lines) | stat: -rw-r--r-- 2,196 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
Description: Use default C++ standard
Author: Stephen Kitt <skitt@debian.org>

gtest requires C++17 or later; instead of forcing a standard, this
relies on the compiler default, which is good enough in Debian.

--- a/configure.ac
+++ b/configure.ac
@@ -123,52 +123,6 @@
 #endif
 ])
 
-dnl C++11 is deprecated in this codebase.
-dnl C++14 is recommended at this time, will eventually become mandatory.
-
-dnl AC_CHECK_CXXFLAGS will prepend gnu++11 to CXXFLAGS if supported, for us.
-OLDCFLAGS="$CFLAGS"
-OLDCPPFLAGS="$CPPFLAGS"
-OLDCXXFLAGS="$CXXFLAGS"
-
-AC_MSG_CHECKING([checking for C++14 support])
-AC_CHECK_CXXFLAGS([ -std=gnu++14 ], [  ], [
-    warn_cpp11=1
-])
-
-CXXFLAGS="$OLDCXXFLAGS"
-CPPFLAGS="$OLDCPPFLAGS"
-CFLAGS="$OLDCFLAGS"
-
-AC_MSG_CHECKING([checking for C++11 support])
-AC_CHECK_CXXFLAGS([ -std=gnu++11 ], [  ], [
-    warn_cpp0x=1
-])
-
-CXXFLAGS="$OLDCXXFLAGS"
-CPPFLAGS="$OLDCPPFLAGS"
-CFLAGS="$OLDCFLAGS"
-
-if test x$warn_cpp0x = x1; then
-    AC_MSG_ERROR([ Your compiler must support C++11 or better ])
-fi
-
-dnl Allow devs to force compile as C++11 as long as this code supports C++11 as a baseline
-AC_ARG_ENABLE(force-cxx11,AC_HELP_STRING([--enable-force-cxx11],[Force compile as C++11]),force_cxx11=yes)
-
-if test x$warn_cpp11 = x1; then
-    AC_MSG_WARN([ Your compiler does not support C++14. Currently it is recommended. At some point in the future, it will be required ])
-    CFLAGS="$CFLAGS -std=gnu11";
-    CXXFLAGS="$CXXFLAGS -std=gnu++11";
-elif test x$force_cxx11 = xyes; then
-    CFLAGS="$CFLAGS -std=gnu11";
-    CXXFLAGS="$CXXFLAGS -std=gnu++11";
-else
-    AC_MSG_WARN([ DOSBox-X is still intended to support compilation as C++11. If you add new code please make sure it works as C++11 by running ./configure with --enable-force-cxx11 ])
-    CFLAGS="$CFLAGS -std=gnu11"; # no such "gnu14"
-    CXXFLAGS="$CXXFLAGS -std=gnu++14";
-fi
-
 dnl Allow the SDL drawn menu to be enabled on Windows or macOS instead of their native menu system.
 AH_TEMPLATE(C_FORCE_MENU_SDLDRAW,[Define to 1 to force SDL-drawn menus])
 AC_ARG_ENABLE(force-menu-sdldraw,AC_HELP_STRING([--enable-force-menu-sdldraw],[Force SDL drawn menus]),enable_force_menu_sdldraw=yes)