mirror of
https://github.com/protobuf-c/protobuf-c.git
synced 2024-12-26 21:04:23 +08:00
configure.ac: Require C++17
There are some recent reports of strange build failures that might have been fixed by compiling in C++17 mode, so it might be a good idea to use C++17 in general, and not just when building against very recent protobuf versions. Since it looks like we've lost protobuf < 3.0.0 support, configure.ac can be simplified a bit if we just use C++17 by default.
This commit is contained in:
parent
7582b6e7d6
commit
5b0661f1e8
23
configure.ac
23
configure.ac
@ -75,27 +75,8 @@ AC_ARG_ENABLE([protoc],
|
|||||||
AS_HELP_STRING([--disable-protoc], [Disable building protoc_c (also disables tests)]))
|
AS_HELP_STRING([--disable-protoc], [Disable building protoc_c (also disables tests)]))
|
||||||
if test "x$enable_protoc" != "xno"; then
|
if test "x$enable_protoc" != "xno"; then
|
||||||
AC_LANG_PUSH([C++])
|
AC_LANG_PUSH([C++])
|
||||||
|
AX_CXX_COMPILE_STDCXX(17, noext, mandatory)
|
||||||
# PKG_CHECK_MODULES(prefix, list-of-modules, action-if-found, action-if-not-found)
|
PKG_CHECK_MODULES([protobuf], [protobuf >= 3.0.0], [proto3_supported=yes])
|
||||||
PKG_CHECK_MODULES(
|
|
||||||
[protobuf],
|
|
||||||
[protobuf >= 4.22.0],
|
|
||||||
[
|
|
||||||
proto3_supported=yes
|
|
||||||
AX_CXX_COMPILE_STDCXX(17, noext, mandatory)
|
|
||||||
],
|
|
||||||
[
|
|
||||||
PKG_CHECK_MODULES(
|
|
||||||
[protobuf],
|
|
||||||
[protobuf >= 3.0.0],
|
|
||||||
[
|
|
||||||
proto3_supported=yes
|
|
||||||
AX_CXX_COMPILE_STDCXX(11, noext, mandatory)
|
|
||||||
],
|
|
||||||
[
|
|
||||||
PKG_CHECK_MODULES([protobuf], [protobuf >= 2.6.0])
|
|
||||||
])
|
|
||||||
])
|
|
||||||
|
|
||||||
save_CPPFLAGS="$CPPFLAGS"
|
save_CPPFLAGS="$CPPFLAGS"
|
||||||
CPPFLAGS="$save_CPPFLAGS $protobuf_CFLAGS"
|
CPPFLAGS="$save_CPPFLAGS $protobuf_CFLAGS"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user