From 111fb298f3b5c68e11b438cea4a439cb65dd46d9 Mon Sep 17 00:00:00 2001 From: amorris Date: Thu, 7 May 2009 20:51:35 +0000 Subject: [PATCH] Fixed leading/trailing spaces in options that confuse configure. git-svn-id: file:///mnt/fast/tau2git/svnroot/trunk/tau2@7183 a8e31b63-e6ca-409b-a01b-2eec1b506579 --- upgradetau | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/upgradetau b/upgradetau index b188dffc0..456547c42 100755 --- a/upgradetau +++ b/upgradetau @@ -51,6 +51,10 @@ foreach $config (@allConfigs) { foreach $opt (@oldopts) { + # remove leading and trailing whitespace + $opt =~ s/^\s+//; + $opt =~ s/\s+$//; + # get the base option (e.g. -mpiinc for -mpiinc=/usr/local/...) $base = $opt; $base =~ s/=.*//g; @@ -70,9 +74,13 @@ foreach $config (@allConfigs) { } else { # no match, add to $newopt $newopt = $newopt . " " . $opt; + + # remove leading and trailing whitespace + $newopt =~ s/^\s+//; + $newopt =~ s/\s+$//; } } - + # flush the last option if (!($newopt eq "")) { if ($newopt =~ / /) {