summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorOlivier Goffart <ogoffart@woboq.com>2014-01-14 15:30:35 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-01-18 09:18:01 +0100
commiteae8abbc188db559bb1509dbcab6807252edc32e (patch)
treea67ea77b13bd9da70235a8a46cc8d613e13c6e30 /configure
parente0484dca75de97c11f2aaad6df33e4de8aa733c0 (diff)
Fix detecting the system path
The normalize function don't do well it's job. Given a path like that, the regexp "/[^/]+/.." will match 3 times /usr/lib/gcc/x86_64-unknown-linux-gnu/4.8.2/../../../../include/c++/4.8.2 [ ][ ][ ] The second match is wrong as it will remove /../.. Use sub instead of gsub which only remove one match at the time. Change-Id: I0657bc603e521c9e53b9f50d2481dce184b64bad Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure2
1 files changed, 1 insertions, 1 deletions
diff --git a/configure b/configure
index 9646fd31e5..90c349cfc7 100755
--- a/configure
+++ b/configure
@@ -3508,7 +3508,7 @@ function normalize(dir)
{
do {
odir = dir
- gsub(/\/[^\/]+\/\.\./, "", dir)
+ sub(/\/[^\/]+\/\.\./, "", dir)
} while (dir != odir);
do {
odir = dir