summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorngoto <ngoto@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-06-10 13:37:03 +0000
committerngoto <ngoto@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-06-10 13:37:03 +0000
commitedb8c7a9f3a9e862355a0c30ea7ba040d48759ff (patch)
treea8fe83a874d03e28e6c2164d131094f611ba8d35 /lib
parent258c1ba5fb95f9a971920cb65273e25cf4082c38 (diff)
* lib/mkmf.rb: revert r50804 because of build failure when specifying
LDFLAGS during configure, observed on Solaris with GCC 4.6. [Bug #11245] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50815 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r--lib/mkmf.rb12
1 files changed, 9 insertions, 3 deletions
diff --git a/lib/mkmf.rb b/lib/mkmf.rb
index 415f149fe4..0d19562db6 100644
--- a/lib/mkmf.rb
+++ b/lib/mkmf.rb
@@ -98,16 +98,22 @@ module MakeMakefile
arg, val = arg.split('=', 2)
next unless arg
arg.tr!('_', '-')
- next if /\A(--)?(?:top|topsrc|src|cur)dir\z/i =~ arg
+ if arg.sub!(/^(?!--)/, '--')
+ val or next
+ arg.downcase!
+ end
+ next if /^--(?:top|topsrc|src|cur)dir$/ =~ arg
$configure_args[arg] = val || true
- $configure_args["--#{arg.downcase}"] = val if val and /\A--/ !~ arg
end
for arg in ARGV
arg, val = arg.split('=', 2)
next unless arg
arg.tr!('_', '-')
+ if arg.sub!(/^(?!--)/, '--')
+ val or next
+ arg.downcase!
+ end
$configure_args[arg] = val || true
- $configure_args["--#{arg.downcase}"] = val if val and /\A--/ !~ arg
end
end