diff options
-rw-r--r-- | ChangeLog | 6 | ||||
-rwxr-xr-x | tool/mkconfig.rb | 5 |
2 files changed, 10 insertions, 1 deletions
@@ -1,3 +1,9 @@ +Fri Jan 11 16:56:29 2013 Nobuyoshi Nakada <nobu@ruby-lang.org> + + * tool/mkconfig.rb: use configured libdir value to fix + --enable-load-relative on systems where libdir is not default value, + overridden in config.site files. [ruby-core:47267] [Bug #6903] + Fri Jan 11 11:59:32 2013 NARUSE, Yui <naruse@ruby-lang.org> * string.c (dispose_string): use rb_str_free for freeing string in diff --git a/tool/mkconfig.rb b/tool/mkconfig.rb index a407ccfedb..e73cd29d62 100755 --- a/tool/mkconfig.rb +++ b/tool/mkconfig.rb @@ -39,6 +39,7 @@ win32 = /mswin/ =~ arch universal = /universal.*darwin/ =~ arch v_fast = [] v_others = [] +v_runtime = {} vars = {} continued_name = nil continued_line = nil @@ -115,6 +116,8 @@ File.foreach "config.status" do |line| if name == "configure_args" val.gsub!(/ +(?!-)/, "=") if win32 val.gsub!(/--with-out-ext/, "--without-ext") + elsif name == "libdir" + v_runtime[:libdir] = val[/\$(\(exec_prefix\)|\{exec_prefix\})\/(.*)/, 2] end val = val.gsub(/\$(?:\$|\{?(\w+)\}?)/) {$1 ? "$(#{$1})" : $&}.dump case name @@ -146,7 +149,7 @@ end drive = File::PATH_SEPARATOR == ';' -prefix = "/lib/ruby/#{version}/#{arch}" +prefix = "/#{v_runtime[:libdir] || 'lib'}/ruby/#{version}/#{arch}" print " TOPDIR = File.dirname(__FILE__).chomp!(#{prefix.dump})\n" print " DESTDIR = ", (drive ? "TOPDIR && TOPDIR[/\\A[a-z]:/i] || " : ""), "'' unless defined? DESTDIR\n" print <<'ARCH' if universal |