Skip to content

Commit 0a7d917

Browse files
committed
configure.ac: use C++14/C++17 for newer Protobufs
1 parent 70d8e8b commit 0a7d917

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

configure.ac

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,16 @@ AS_IF([test x"$PROTOC" = x],
2323
m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
2424

2525
# Protobuf 3.6+ requires C++11.
26-
AS_IF([pkg-config --atleast-version 3.6.0 protobuf],
27-
[AX_CXX_COMPILE_STDCXX([11])])
26+
# Protobuf 22+ requires C++14.
27+
# Protobuf 23+ requires C++17.
28+
AS_IF(
29+
[pkg-config --atleast-version 23.0.0 protobuf],
30+
[AX_CXX_COMPILE_STDCXX([17])],
31+
[pkg-config --atleast-version 22.0.0 protobuf],
32+
[AX_CXX_COMPILE_STDCXX([14])],
33+
[pkg-config --atleast-version 3.6.0 protobuf],
34+
[AX_CXX_COMPILE_STDCXX([11])]
35+
)
2836

2937
WARNING_CXXFLAGS=""
3038
PICKY_CXXFLAGS=""

0 commit comments

Comments
 (0)