From: Peter Maydell Date: Mon, 26 Jun 2017 15:25:24 +0000 (+0100) Subject: configure: Handle having no c++ compiler in FORTIFY_SOURCE check X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=e189091fba4481fa4c9d760f0bf9037620a51989;p=qemu.git configure: Handle having no c++ compiler in FORTIFY_SOURCE check Our FORTIFY_SOURCE check assumes that $cxx refers to a working C++ compiler, with the result that if you don't happen to have one then configure will spuriously print configure: line 4685: c++: command not found Fix this by adding a 'has $cxx' check. Signed-off-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Michael Tokarev --- diff --git a/configure b/configure index ce7e8aa842..08ef54103e 100755 --- a/configure +++ b/configure @@ -4771,7 +4771,7 @@ fi if test "$fortify_source" != "no"; then if echo | $cc -dM -E - | grep __clang__ > /dev/null 2>&1 ; then fortify_source="no"; - elif test -n "$cxx" && + elif test -n "$cxx" && has $cxx && echo | $cxx -dM -E - | grep __clang__ >/dev/null 2>&1 ; then fortify_source="no"; else