diff options
author | Quentin Young <qlyoung@users.noreply.github.com> | 2019-05-07 22:53:17 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-07 22:53:17 +0200 |
commit | 6915af74fd47378c422b24dc87579103a90ede86 (patch) | |
tree | 4235c445ab0a720d8c7d84fbe7f3adc0d98c7e00 /configure.ac | |
parent | Merge pull request #4215 from Orange-OpenSource/TE (diff) | |
parent | lib: add new gRPC-based northbound plugin (diff) | |
download | frr-6915af74fd47378c422b24dc87579103a90ede86.tar.xz frr-6915af74fd47378c422b24dc87579103a90ede86.zip |
Merge pull request #4082 from opensourcerouting/grpc-nb-plugin
gRPC northbound plugin
Diffstat (limited to 'configure.ac')
-rwxr-xr-x | configure.ac | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 1a1c60e5f..fe60ba2a7 100755 --- a/configure.ac +++ b/configure.ac @@ -126,12 +126,15 @@ dnl Check CC and friends dnl -------------------- dnl note orig_cflags is also used further down orig_cflags="$CFLAGS" +orig_cxxflags="$CXXFLAGS" AC_LANG([C]) AC_PROG_CC AC_PROG_CPP +AC_PROG_CXX AM_PROG_CC_C_O dnl remove autoconf default "-g -O2" CFLAGS="$orig_cflags" +CXXFLAGS="$orig_cxxflags" AC_PROG_CC_C99 dnl NB: see C11 below @@ -447,6 +450,8 @@ AC_ARG_ENABLE([confd], AS_HELP_STRING([--enable-confd=ARG], [enable confd integration])) AC_ARG_ENABLE([sysrepo], AS_HELP_STRING([--enable-sysrepo], [enable sysrepo integration])) +AC_ARG_ENABLE([grpc], + AS_HELP_STRING([--enable-grpc], [enable the gRPC northbound plugin])) AC_ARG_ENABLE([zeromq], AS_HELP_STRING([--enable-zeromq], [enable ZeroMQ handler (libfrrzmq)])) AC_ARG_WITH([libpam], @@ -1735,6 +1740,25 @@ fi AM_CONDITIONAL([SYSREPO], [test "x$enable_sysrepo" = "xyes"]) dnl --------------- +dnl gRPC +dnl --------------- +if test "$enable_grpc" = "yes"; then + PKG_CHECK_MODULES([GRPC], [grpc grpc++ protobuf], [ + AC_CHECK_PROGS([PROTOC], [protoc], [/bin/false]) + if test "$PROTOC" = "/bin/false"; then + AC_MSG_FAILURE([grpc requested but protoc not found.]) + fi + + AC_DEFINE([HAVE_GRPC], [1], [Enable the gRPC northbound plugin]) + GRPC=true + ], [ + GRPC=false + AC_MSG_ERROR([grpc/grpc++ were not found on your system.]) + ]) +fi +AM_CONDITIONAL([GRPC], [test "x$enable_grpc" = "xyes"]) + +dnl --------------- dnl math dnl --------------- AC_SEARCH_LIBS([sqrt], [m]) |