From 9ce8cb6bb0d923cd523e16304b226674355e171d Mon Sep 17 00:00:00 2001 From: "cmp%mozilla.org" Date: Tue, 30 Nov 2004 23:08:55 +0000 Subject: [PATCH] Bug 80631. Fix missing double quotes in ac options that (as-input) have spaces. git-svn-id: svn://10.0.0.236/trunk@165968 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/webtools/build/config.cgi | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/mozilla/webtools/build/config.cgi b/mozilla/webtools/build/config.cgi index b8432f15deb..f98ebed16ad 100755 --- a/mozilla/webtools/build/config.cgi +++ b/mozilla/webtools/build/config.cgi @@ -198,11 +198,16 @@ sub print_script { $out .= "\n" if $have_client_mk_options; foreach $param ($query->param()) { if ($param =~ /^--/) { - next if $query->param($param) eq ''; + my $value = $query->param($param); + next if $value eq ''; + + # Wrap in double quotes if $value contains a space. + $value = "\"$value\"" if $value =~ /\s/; + $out .= "# Options for 'configure' (same as command-line options).\n" if not $have_configure_options; $out .= "ac_add_options $param"; - $out .= "=".$query->param($param) if $query->param($param) ne "yes"; + $out .= "=".$value if $value ne "yes"; $out .= "\n"; $have_configure_options = 1; }