]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Fix C++ header directory detection for non-standard paths.
authorAdam Conrad <adconrad@0c3.net>
Sun, 25 Nov 2012 06:58:38 +0000 (23:58 -0700)
committerAdam Conrad <adconrad@0c3.net>
Sun, 25 Nov 2012 06:58:38 +0000 (23:58 -0700)
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.

ChangeLog
configure
configure.in

index b4f6e0686c6864af98f7cce6b299d9d7af5db30f..bca890ac38a829cf0550919d32b11cf240da7516 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2012-11-24  Adam Conrad  <adconrad@0c3.net>
+
+       * configure.in: Autodetect C++ header directories.
+       * configure: Regenerated.
+
 2012-11-23  Mike Frysinger  <vapier@gentoo.org>
 
        * elf/Makefile ($(objpfx)ld.so): Change readelf to $(READELF).
index ff2d34ca9cc957930a982910584cebcd7a14956b..8799b7de785e813e5a6d458153213876a5a9a741 100755 (executable)
--- 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
 
index a7f7198818cd6571e9d8cf33f7bc6755d029008a..d369382264e5dd3d59ceb424462ab3da077c6b04 100644 (file)
@@ -995,12 +995,11 @@ if test -n "$sysheaders"; then
 -isystem `echo $sysheaders | sed 's/:/ -isystem /g'`"
   if test -n "$CXX"; then
     CXX_SYSINCLUDES=
-    cxxmachine=`$CXX -dumpmachine 2>&AS_MESSAGE_LOG_FD` &&
-    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
 AC_SUBST(SYSINCLUDES)