aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorAdam Cozzette <acozzette@google.com>2018-05-31 10:07:28 -0700
committerJan Tattermusch <jtattermusch@google.com>2018-06-01 09:44:36 +0200
commit5f418d4776099868bb7504ecf74f78ac4690e0d6 (patch)
tree9b874eebc051be31d6627d1d13c2a1fe1233450c /configure.ac
parentf8262db9191280d9e8ed0b2f4a77f71f86960c46 (diff)
downloadprotobuf-5f418d4776099868bb7504ecf74f78ac4690e0d6.tar.gz
protobuf-5f418d4776099868bb7504ecf74f78ac4690e0d6.tar.bz2
protobuf-5f418d4776099868bb7504ecf74f78ac4690e0d6.zip
Require C++11 and pass -std=c++11
This commit updates the Autotools build to require a C++11 compiler and explicitly pass -std=c++11. This seems to be necessary for enabling C++11 support in older compilers.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac4
1 files changed, 2 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index 7a5e3ab2..634c0a69 100644
--- a/configure.ac
+++ b/configure.ac
@@ -88,7 +88,7 @@ AS_IF([test "x${ac_cv_env_CXXFLAGS_set}" = "x"],[
# Protocol Buffers contains several checks that are intended to be used only
# for debugging and which might hurt performance. Most users are probably
# end users who don't want these checks, so add -DNDEBUG by default.
- CXXFLAGS="$CXXFLAGS -DNDEBUG"
+ CXXFLAGS="$CXXFLAGS -std=c++11 -DNDEBUG"
AC_MSG_RESULT([use default: $PROTOBUF_OPT_FLAG $CXXFLAGS])
],[
@@ -207,7 +207,7 @@ case "$target_os" in
esac
AM_CONDITIONAL([OBJC_CONFORMANCE_TEST], [test $OBJC_CONFORMANCE_TEST = 1])
-AX_CXX_COMPILE_STDCXX([11], [noext], [optional])
+AX_CXX_COMPILE_STDCXX([11], [noext], [mandatory])
# HACK: Make gmock's configure script pick up our copy of CFLAGS and CXXFLAGS,
# since the flags added by ACX_CHECK_SUNCC must be used when compiling gmock