about summary refs log tree commit diff
path: root/configure.in
diff options
context:
space:
mode:
authorAllan McRae <allan@archlinux.org>2012-09-06 00:16:24 +1000
committerAllan McRae <allan@archlinux.org>2012-09-06 00:16:24 +1000
commitc4e85184d2ded3f6a259948098a0c297a9cf0be6 (patch)
treeb762d78d613fe19594b52dfbba31b2b8d6631b74 /configure.in
parenta0070b7e7054df5f2a8da0467f15496ef8a3662f (diff)
downloadglibc-c4e85184d2ded3f6a259948098a0c297a9cf0be6.tar.gz
glibc-c4e85184d2ded3f6a259948098a0c297a9cf0be6.tar.xz
glibc-c4e85184d2ded3f6a259948098a0c297a9cf0be6.zip
Improve C++ header location detection (bug 13966)
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in10
1 files changed, 4 insertions, 6 deletions
diff --git a/configure.in b/configure.in
index 7de4b093d4..a174646fab 100644
--- a/configure.in
+++ b/configure.in
@@ -975,13 +975,11 @@ if test -n "$sysheaders"; then
     CXX_SYSINCLUDES=
     cxxversion=`$CXX -dumpversion 2>&AS_MESSAGE_LOG_FD` &&
     cxxmachine=`$CXX -dumpmachine 2>&AS_MESSAGE_LOG_FD` &&
-    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
 AC_SUBST(SYSINCLUDES)