From 7b343e567f648ac4643325cdac272bf0c834c750 Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Wed, 10 Aug 2016 14:43:42 +0200 Subject: [PATCH] Build system: set CPPFLAGS when checking for --- configure.ac | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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++) -- 2.30.2