From c4e85184d2ded3f6a259948098a0c297a9cf0be6 Mon Sep 17 00:00:00 2001 From: Allan McRae Date: Thu, 6 Sep 2012 00:16:24 +1000 Subject: Improve C++ header location detection (bug 13966) --- configure | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'configure') diff --git a/configure b/configure index 6718bee0da..d159ce0e7b 100755 --- a/configure +++ b/configure @@ -5345,13 +5345,11 @@ if test -n "$sysheaders"; then CXX_SYSINCLUDES= cxxversion=`$CXX -dumpversion 2>&5` && cxxmachine=`$CXX -dumpmachine 2>&5` && - for d in include "$cxxmachine/include"; do - i=../../../../$d/c++/$cxxversion - cxxheaders=`$CXX -print-file-name="$i"` && - test "x$cxxheaders" != x && test "x$i" != "x$cxxheaders" && - CXX_SYSINCLUDES="$CXX_SYSINCLUDES -isystem $cxxheaders \ + cxxplus=`$CXX -print-prog-name=cc1plus` + cxxheaders=`$cxxplus -v /dev/null 2>&1 | sed -n '/ \//{p;q;}' | sed 's/ //'` + test "x$cxxheaders" != x && test "x$i" != "x$cxxheaders" && + CXX_SYSINCLUDES="$CXX_SYSINCLUDES -isystem $cxxheaders \ -isystem $cxxheaders/$cxxmachine -isystem $cxxheaders/backward" - done fi fi -- cgit v1.2.3