From eae8abbc188db559bb1509dbcab6807252edc32e Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Tue, 14 Jan 2014 15:30:35 +0100 Subject: 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 Reviewed-by: Oswald Buddenhagen --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- cgit v1.2.3