summaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorVladislav Vaintroub <vvaintroub@mysql.com>2010-02-23 12:32:57 +0100
committerVladislav Vaintroub <vvaintroub@mysql.com>2010-02-23 12:32:57 +0100
commita4af6e87083aec7f27c70ccc6c669e3d3fbcaf0d (patch)
tree4f9c1f81a4ebb7e603667f81a216eec55951653d /cmake
parent71f8615fd66c03af06c8b8547153d35494c1ac2a (diff)
downloadmariadb-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.pl13
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);