diff options
| author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-08-20 21:42:21 +0000 |
|---|---|---|
| committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-08-20 21:42:21 +0000 |
| commit | 4000c6fd5aa5af4c86f6bbf2b06c7a9a7260374b (patch) | |
| tree | 438c8a4354be0d738f3b09d944ea66953d56c477 /lib | |
| parent | 9a59a63c193b09c20482999ce9299a04b5cdf7d2 (diff) | |
| download | ruby-4000c6fd5aa5af4c86f6bbf2b06c7a9a7260374b.tar.gz ruby-4000c6fd5aa5af4c86f6bbf2b06c7a9a7260374b.tar.xz ruby-4000c6fd5aa5af4c86f6bbf2b06c7a9a7260374b.zip | |
* ext/tcltklib/extconf.rb (find_tcl, find_tk): find stub library.
* lib/mkmf.rb (arg_config, with_config): deal with '-' and '_'
uniformly. [ruby-dev:24118]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@6802 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/mkmf.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/mkmf.rb b/lib/mkmf.rb index ec5cbf4bb..316bfe350 100644 --- a/lib/mkmf.rb +++ b/lib/mkmf.rb @@ -20,6 +20,7 @@ unless defined? $configure_args for arg in Shellwords::shellwords(args) arg, val = arg.split('=', 2) next unless arg + arg.tr!('_', '-') if arg.sub!(/^(?!--)/, '--') val or next arg.downcase! @@ -30,6 +31,7 @@ unless defined? $configure_args for arg in ARGV arg, val = arg.split('=', 2) next unless arg + arg.tr!('_', '-') if arg.sub!(/^(?!--)/, '--') val or next arg.downcase! @@ -603,11 +605,11 @@ def find_executable(bin, path = nil) end def arg_config(config, default=nil) - $configure_args.fetch(config, default) + $configure_args.fetch(config.tr('_', '-'), default) end def with_config(config, default=nil) - unless /^--with-/ =~ config + unless /^--with[-_]/ =~ config config = '--with-' + config end arg_config(config, default) |
