summary refs log tree commit diff
path: root/configure
diff options
context:
space:
mode:
authorAdam Conrad <adconrad@0c3.net>2012-11-24 23:58:38 -0700
committerAdam Conrad <adconrad@0c3.net>2012-11-24 23:58:38 -0700
commit6706074627da7734d21f0024b6f7fb58b5629d6b (patch)
tree2778204c50c60008f0aae9e50ba1cefe42d8472c /configure
parent800938a1268309932c20dc523bb226bcab4bfe18 (diff)
downloadglibc-6706074627da7734d21f0024b6f7fb58b5629d6b.tar.gz
glibc-6706074627da7734d21f0024b6f7fb58b5629d6b.tar.xz
glibc-6706074627da7734d21f0024b6f7fb58b5629d6b.zip
Fix C++ header directory detection for non-standard paths.
Stop assuming specific path layouts for C++ headers, and instead
use an autodetection method that looks for paths with '/[cg]++'
in the g++ include list.
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure11
1 files changed, 5 insertions, 6 deletions
diff --git a/configure b/configure
index ff2d34ca9c..8799b7de78 100755
--- a/configure
+++ b/configure
@@ -5423,12 +5423,11 @@ if test -n "$sysheaders"; then
 -isystem `echo $sysheaders | sed 's/:/ -isystem /g'`"
   if test -n "$CXX"; then
     CXX_SYSINCLUDES=
-    cxxmachine=`$CXX -dumpmachine 2>&5` &&
-    cxxheaders=`$CXX -v -S -x c++ /dev/null -o /dev/null 2>&1 \
-	| sed -n -e '1,/#include/d' -e '/^ \//{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"
+    for cxxheaders in `$CXX -v -S -x c++ /dev/null -o /dev/null 2>&1 \
+    | sed -n -e '1,/#include/d' -e 's/^ \(\/.*\/[cg]++\)/\1/p'`; do
+      test "x$cxxheaders" != x &&
+      CXX_SYSINCLUDES="$CXX_SYSINCLUDES -isystem $cxxheaders"
+    done
   fi
 fi