mirror of
https://github.com/joncampbell123/dosbox-x.git
synced 2025-10-14 02:17:36 +08:00
Begin transition to C++11 by warning if using a pre-C++11 GCC compiler
This commit is contained in:
12
configure.ac
12
configure.ac
@@ -119,10 +119,20 @@ AC_COMPILE_IFELSE([AC_LANG_SOURCE([
|
||||
#endif
|
||||
])],[],[AC_DEFINE([socklen_t],[int],[Define to `int` if you don't have socklen_t])])
|
||||
|
||||
dnl C++0x is now considered deprecated.
|
||||
dnl This warning will stay here for a long enough period of time before making C++11 mandatory.
|
||||
|
||||
dnl AC_CHECK_CXXFLAGS will prepend gnu++11 to CXXFLAGS if supported, for us.
|
||||
dnl our code adds -std=gnu++0x if not supported where the function would not do anything.
|
||||
AC_MSG_CHECKING([checking for C++11 support])
|
||||
AC_CHECK_CXXFLAGS([ -std=gnu++11 ], [ ], [ CXXFLAGS="$CXXFLAGS -std=gnu++0x" ])
|
||||
AC_CHECK_CXXFLAGS([ -std=gnu++11 ], [ ], [
|
||||
CXXFLAGS="$CXXFLAGS -std=gnu++0x";
|
||||
warn_cpp0x=1
|
||||
])
|
||||
|
||||
if test x$warn_cpp0x = x1; then
|
||||
AC_MSG_WARN([ C++0x is considered deprecated. Please use a C++11 compiler. C++0x support will be removed at a future date. ])
|
||||
fi
|
||||
|
||||
dnl TEST: Environ can be included
|
||||
AC_MSG_CHECKING(if environ can be included)
|
||||
|
Reference in New Issue
Block a user