From: Florian Forster Date: Wed, 6 Dec 2017 08:58:06 +0000 (+0100) Subject: configure: Improve detection of grpc_cpp_plugin. X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=dcabeb2048562ad86822a85d88875e9c0cb1b131;p=collectd.git configure: Improve detection of grpc_cpp_plugin. When the `--with-libgrpc++=` command line argument is given, add `/bin` to the search path for grpc_cpp_plugin. --- diff --git a/configure.ac b/configure.ac index e869a6a0..6f947be0 100644 --- a/configure.ac +++ b/configure.ac @@ -2635,6 +2635,7 @@ AC_ARG_WITH([libgrpc++], if test "x$withval" != "xno" && test "x$withval" != "xyes"; then with_libgrpcpp_cppflags="-I$withval/include" with_libgrpcpp_ldflags="-L$withval/lib" + with_libgrpcpp_bin="$withval/bin" with_libgrpcpp="yes" fi if test "x$withval" = "xno"; then @@ -2714,7 +2715,11 @@ AC_SUBST([BUILD_WITH_LIBGRPCPP_LIBS]) # }}} AC_ARG_VAR([GRPC_CPP_PLUGIN], [path to the grpc_cpp_plugin binary]) -AC_PATH_PROG([GRPC_CPP_PLUGIN], [grpc_cpp_plugin]) +if test "x$with_libgrpcpp_bin" = "x"; then + AC_PATH_PROG([GRPC_CPP_PLUGIN], [grpc_cpp_plugin]) +else + AC_PATH_PROG([GRPC_CPP_PLUGIN], [grpc_cpp_plugin], [], "$with_libgrpcpp_bin:$PATH") +fi AM_CONDITIONAL([HAVE_GRPC_CPP], [test "x$GRPC_CPP_PLUGIN" != "x"]) # --with-libiptc {{{