From: Florian Forster Date: Wed, 10 Aug 2016 12:43:42 +0000 (+0200) Subject: Build system: set CPPFLAGS when checking for X-Git-Tag: collectd-5.6.0~62 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=7b343e567f648ac4643325cdac272bf0c834c750;p=collectd.git Build system: set CPPFLAGS when checking for --- diff --git a/configure.ac b/configure.ac index 1bacddd1..44351937 100644 --- a/configure.ac +++ b/configure.ac @@ -2376,7 +2376,7 @@ if test "x$with_libgrpcpp" = "xyes" then AC_LANG_PUSH(C++) SAVE_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="$with_libgrpcpp_cppflags $GRPCPP_CFLAGS $CPPFLAGS -std=c++11" + CPPFLAGS="-std=c++11 $with_libgrpcpp_cppflags $GRPCPP_CFLAGS $CPPFLAGS" AC_CHECK_HEADERS([grpc++/grpc++.h], [], [with_libgrpcpp="no ( not found)"] ) @@ -2386,8 +2386,10 @@ fi if test "x$with_libgrpcpp" = "xyes" then AC_LANG_PUSH(C++) + SAVE_CPPFLAGS="$CPPFLAGS" SAVE_LDFLAGS="$LDFLAGS" SAVE_LIBS="$LIBS" + CPPFLAGS="-std=c++11 $with_libgrpcpp_cppflags $GRPCPP_CFLAGS $CPPFLAGS" LDFLAGS="$with_libgrpcpp_ldflags" if test "x$GRPCPP_LIBS" = "x" then @@ -2409,6 +2411,7 @@ then ], [with_libgrpcpp="no (libgrpc++ not found)"] ) + CPPFLAGS="$SAVE_CPPFLAGS" LDFLAGS="$SAVE_LDFLAGS" LIBS="$SAVE_LIBS" AC_LANG_POP(C++)