From 7872cfb09feb6f4aabb62a8aea8035e6c3ce2ddb Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Sat, 15 Oct 2011 20:08:45 +0200 Subject: Fix searching for C++ system headers for cross compilers --- configure.in | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'configure.in') diff --git a/configure.in b/configure.in index b2949b4958..6977fe1015 100644 --- a/configure.in +++ b/configure.in @@ -1061,11 +1061,16 @@ if test -n "$sysheaders"; then SYSINCLUDES="$SYSINCLUDES \ -isystem `echo $sysheaders | sed 's/:/ -isystem /g'`" if test -n "$CXX"; then + CXX_SYSINCLUDES= cxxversion=`$CXX -dumpversion 2>&AS_MESSAGE_LOG_FD` && cxxmachine=`$CXX -dumpmachine 2>&AS_MESSAGE_LOG_FD` && - cxxheaders=`$CXX -print-file-name=../../../../include/c++/`"$cxxversion" && - CXX_SYSINCLUDES="-isystem $cxxheaders \ + 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 \ -isystem $cxxheaders/$cxxmachine -isystem $cxxheaders/backward" + done fi fi AC_SUBST(SYSINCLUDES) -- cgit v1.2.1