diff --git a/configure.ac b/configure.ac index b2b190c46..750c0f6c7 100644 --- a/configure.ac +++ b/configure.ac @@ -22,8 +22,12 @@ AS_IF([test x"$PROTOC" = x], m4_ifdef([AM_PROG_AR], [AM_PROG_AR]) # Protobuf 3.6+ requires C++11. -AS_IF([pkg-config --atleast-version 3.6.0 protobuf], - [AX_CXX_COMPILE_STDCXX([11])]) +# Protobuf 22+ requires C++14 nominally, but building with C++ <17 fails on my machine. +AS_IF([pkg-config --atleast-version 22.0.0 protobuf], + [AX_CXX_COMPILE_STDCXX([17])], + [pkg-config --atleast-version 3.6.0 protobuf], + [AX_CXX_COMPILE_STDCXX([11])] + ) WARNING_CXXFLAGS="" PICKY_CXXFLAGS=""