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
This commit is contained in:
parent
f4284ba6bd
commit
c88200172e
@ -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
|
||||
if test "$HAVE_CMAKE" = "no"
|
||||
then
|
||||
sh ./configure.am $@
|
||||
sh ./configure.am "$@"
|
||||
else
|
||||
perl ./cmake/configure.pl $@
|
||||
perl ./cmake/configure.pl "$@"
|
||||
fi
|
||||
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user