390b42c
From 86fc0d43cdcf3232ae0e4e6f4f28cf8f1a45ede5 Mon Sep 17 00:00:00 2001
390b42c
From: Benjamin Reed <rangerrick@befunk.com>
390b42c
Date: Tue, 19 Feb 2008 17:37:37 +0100
390b42c
Subject: [PATCH 04/13] This patch adds support for using -isystem to allow putting an include
390b42c
 directory at the end of the compiler's header search path.
390b42c
390b42c
I don't have the exact output anymore (I've since patched Qt's configure) but
390b42c
essentially, since I have pcre.h in /opt/kde4-deps/include, it was
390b42c
conflicting with Qt's (modified) pcre.h in the WebKit bits, since
390b42c
-I /opt/kde4-deps/include ends up in CXXFLAGS in the generated makefiles, it
390b42c
comes *before* the specific locations in INCPATH on the compile line, and you
390b42c
end up with a conflict with the system-installed pcre.h.
390b42c
390b42c
Presumably, if your pcre.h is in /usr/include as on most Linux systems, you
390b42c
wouldn't notice this issue since /usr/include's already in your include path
390b42c
and people likely don't pass -I /usr/include to configure.  I suspect that on
390b42c
any platform with a regular, system-installed pcre.h (or clucene headers),
390b42c
adding -I /usr/include would exhibit this bug, just as a custom-installed
390b42c
pcre/clucene in another root would.
390b42c
390b42c
qt-bugs@ issue : 199610
390b42c
Trolltech task ID :
390b42c
bugs.kde.org number :
390b42c
---
390b42c
 configure |    8 ++++++++
390b42c
 1 files changed, 8 insertions(+), 0 deletions(-)
390b42c
390b42c
diff --git a/configure b/configure
390b42c
index 2c108ad..610a201 100755
390b42c
--- a/configure
390b42c
+++ b/configure
390b42c
@@ -927,6 +927,11 @@ while [ "$#" -gt 0 ]; do
390b42c
             VAL=`echo $1 | sed 's,-D,,'`
390b42c
         fi
390b42c
         ;;
390b42c
+    -isystem)
390b42c
+        VAR="add_isystempath"
390b42c
+        shift
390b42c
+        VAL="$1"
390b42c
+        ;;
390b42c
     -I?*|-I)
390b42c
         VAR="add_ipath"
390b42c
         if [ "$1" = "-I" ]; then
390b42c
@@ -1890,6 +1895,9 @@ while [ "$#" -gt 0 ]; do
390b42c
     add_ipath)
390b42c
         I_FLAGS="$I_FLAGS -I\"${VAL}\""
390b42c
         ;;
390b42c
+    add_isystempath)
390b42c
+        I_FLAGS="$I_FLAGS -isystem \"${VAL}\""
390b42c
+        ;;
390b42c
     add_lpath)
390b42c
         L_FLAGS="$L_FLAGS -L\"${VAL}\""
390b42c
         ;;
390b42c
-- 
390b42c
1.6.5.1
390b42c