diff options
author | Donald Sharp <sharpd@cumulusnetworks.com> | 2019-12-10 20:06:33 +0100 |
---|---|---|
committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2019-12-15 15:37:51 +0100 |
commit | fd193241e9d404cb9b730ea82ebbd93977b500f0 (patch) | |
tree | 7dced8697412c939eabf489e1bbae7ab7cc6b4f2 /configure.ac | |
parent | zebra: Allow zebra_mlag to compile with no j factor (diff) | |
download | frr-fd193241e9d404cb9b730ea82ebbd93977b500f0.tar.xz frr-fd193241e9d404cb9b730ea82ebbd93977b500f0.zip |
zebra: Do not build mlag protobuf support if version 3 is not avail
Older versions of protobuf-c do not support version 3 of the
protocol. Add a check into the system to see if we have
version 3 available and if so, compile it in.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'configure.ac')
-rwxr-xr-x | configure.ac | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac index 34c8bb693..0bfcc833f 100755 --- a/configure.ac +++ b/configure.ac @@ -1159,6 +1159,7 @@ dnl ########################################################################## # # Logic for protobuf support. # +PROTO3=false if test "$enable_protobuf" = "yes"; then # Check for protoc & protoc-c @@ -1173,9 +1174,15 @@ if test "$enable_protobuf" = "yes"; then PKG_CHECK_MODULES([PROTOBUF_C], [libprotobuf-c >= 0.14],, [ AC_MSG_FAILURE([protobuf requested but libprotobuf-c not found. Install protobuf-c.]) ]) - AC_CHECK_HEADER([google/protobuf-c/protobuf-c.h], [], [ - AC_MSG_FAILURE([protobuf requested but protobuf-c.h not found. Install protobuf-c.]) - ]) + + PROTO3=true + AC_CHECK_HEADER([google/protobuf-c/protobuf-c.h], + [AC_CHECK_DECLS(PROTOBUF_C_LABEL_NONE, + AC_DEFINE([HAVE_PROTOBUF_VERSION_3], + [1], [Have Protobuf version 3]), + [PROTO3=false], + [#include <google/protobuf-c/protobuf-c.h>])], + [PROTO3=false && AC_MSG_FAILURE([protobuf requested but protobuf-c.h not found. Install protobuf-c.])]) AC_DEFINE([HAVE_PROTOBUF], [1], [protobuf]) fi @@ -2271,6 +2278,7 @@ AM_CONDITIONAL([SNMP], [test "x$SNMP_METHOD" = "xagentx"]) AM_CONDITIONAL([IRDP], [$IRDP]) AM_CONDITIONAL([FPM], [test "x$enable_fpm" = "xyes"]) AM_CONDITIONAL([HAVE_PROTOBUF], [test "x$enable_protobuf" = "xyes"]) +AM_CONDITIONAL([HAVE_PROTOBUF3], [$PROTO3]) dnl daemons AM_CONDITIONAL([VTYSH], [test "x$VTYSH" = "xvtysh"]) AM_CONDITIONAL([ZEBRA], [test "${enable_zebra}" != "no"]) |