Bug #18000 » rb_prefix_hack.diff
lib/mkmf.rb | ||
---|---|---|
#
|
||
def have_func(func, headers = nil, opt = "", &b)
|
||
checking_for checking_message(func.funcall_style, headers, opt) do
|
||
if try_func(func, $libs, headers, opt, &b)
|
||
if func.start_with?('rb_') && !RbConfig::CONFIG["LIBRUBYARG"].include?('-lruby')
|
||
# HACK: Assume calling to check for methods that are already defined.
|
||
# Cannot test as there is no libruby to link against.
|
||
$defs << "-DHAVE_#{func.sans_arguments.tr_cpp}"
|
||
true
|
||
elsif try_func(func, $libs, headers, opt, &b)
|
||
$defs << "-DHAVE_#{func.sans_arguments.tr_cpp}"
|
||
true
|
||
else
|
tool/mkconfig.rb | ||
---|---|---|
install_name = nil
|
||
so_name = nil
|
||
platform = nil
|
||
disable_install_static_library = nil
|
||
File.foreach "config.status" do |line|
|
||
next if /^#/ =~ line
|
||
name = nil
|
||
... | ... | |
eq = win32 && vars[name] ? '<< "\n"' : '='
|
||
vars[name] = val
|
||
if name == "configure_args"
|
||
if val.include?('--disable-install-static-library')
|
||
disable_install_static_library = true
|
||
end
|
||
val.gsub!(/--with-out-ext/, "--without-ext")
|
||
end
|
||
val = val.gsub(/\$(?:\$|\{?(\w+)\}?)/) {$1 ? "$(#{$1})" : $&}.dump
|
||
... | ... | |
end
|
||
when /^includedir$/
|
||
val = '"$(SDKROOT)"'+val if /darwin/ =~ arch
|
||
when /^LIBRUBYARG_STATIC$/
|
||
if disable_install_static_library
|
||
val.sub!('-l$(RUBY_SO_NAME)-static ', '')
|
||
end
|
||
end
|
||
v = " CONFIG[\"#{name}\"] #{eq} #{val}\n"
|
||
if fast[name]
|
- « Previous
- 1
- 2
- Next »