Commit a4af6e87 authored by Vladislav Vaintroub's avatar Vladislav Vaintroub

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
parent 71f8615f
...@@ -7,8 +7,8 @@ cmake -P cmake/check_minimal_version.cmake >/dev/null 2>&1 || HAVE_CMAKE=no ...@@ -7,8 +7,8 @@ cmake -P cmake/check_minimal_version.cmake >/dev/null 2>&1 || HAVE_CMAKE=no
perl --version >/dev/null 2>&1 || HAVE_CMAKE=no perl --version >/dev/null 2>&1 || HAVE_CMAKE=no
if test "$HAVE_CMAKE" = "no" if test "$HAVE_CMAKE" = "no"
then then
sh ./configure.am $@ sh ./configure.am "$@"
else else
perl ./cmake/configure.pl $@ perl ./cmake/configure.pl "$@"
fi fi
...@@ -72,10 +72,21 @@ check_compiler("CXX", "CXXFLAGS"); ...@@ -72,10 +72,21 @@ check_compiler("CXX", "CXXFLAGS");
foreach my $option (@ARGV) foreach my $option (@ARGV)
{ {
if (substr ($option, 0, 2) == "--") if (substr ($option, 0, 2) eq "--")
{ {
$option = substr($option, 2); $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/) if($option =~ /srcdir/)
{ {
$srcdir = substr($option,7); $srcdir = substr($option,7);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment