diff options
author | Vladislav Vaintroub <vvaintroub@mysql.com> | 2010-02-23 12:32:57 +0100 |
---|---|---|
committer | Vladislav Vaintroub <vvaintroub@mysql.com> | 2010-02-23 12:32:57 +0100 |
commit | a4af6e87083aec7f27c70ccc6c669e3d3fbcaf0d (patch) | |
tree | 4f9c1f81a4ebb7e603667f81a216eec55951653d /cmake | |
parent | 71f8615fd66c03af06c8b8547153d35494c1ac2a (diff) | |
download | mariadb-git-a4af6e87083aec7f27c70ccc6c669e3d3fbcaf0d.tar.gz |
Bug #51414: Arguments with embedded spaces are not correctly handled by configure wrapper.
The bug was that ./configure was passing paramers to subscripts as $@, and to handle embedded spaces it needs
to be quoted as "$@".
This resulting into a bug when ./configure was called e.g with CFLAGS='-m64 -Xstrconst'..
Additionally, fixed cmake/configure.pl did not handle environment variables passed on the command line.
this is fixed in this push
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/configure.pl | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/cmake/configure.pl b/cmake/configure.pl index 5886a554789..50225a0ef5e 100644 --- a/cmake/configure.pl +++ b/cmake/configure.pl @@ -72,10 +72,21 @@ check_compiler("CXX", "CXXFLAGS"); foreach my $option (@ARGV) { - if (substr ($option, 0, 2) == "--") + if (substr ($option, 0, 2) eq "--") { $option = substr($option, 2); } + else + { + # This must be environment variable + my @v = split('=', $option); + my $name = shift(@v); + if(@v) + { + $ENV{$name} = join('=', @v); + } + next; + } if($option =~ /srcdir/) { $srcdir = substr($option,7); |