class Object
Constants
- EM
Alias for {EventMachine}
- GNU_CHAIN
- OS_UNIX
- OS_WIN32
- SSL_HEADS
- SSL_LIBS
- SSL_LIBS_WIN
OpenSSL 1.1.0 and above for Windows use the Unix library names OpenSSL 0.9.8 and 1.0.x for Windows use the *eay32 library names
Public Instance Methods
add_define(name)
click to toggle source
# File ext/extconf.rb, line 15 def add_define(name) $defs.push("-D#{name}") end
append_library(libs, lib)
click to toggle source
override append_library
, so it actually appends (instead of prepending) this fixes issues with linking ssl, since libcrypto depends on symbols in libssl
# File ext/extconf.rb, line 24 def append_library(libs, lib) libs + " " + format(LIBARG, lib) end
check_heads(heads = [], fatal = false)
click to toggle source
# File ext/extconf.rb, line 11 def check_heads heads = [], fatal = false heads.all? { |head| have_header(head) || (abort("could not find header: #{head}") if fatal)} end
check_libs(libs = [], fatal = false)
click to toggle source
# File ext/extconf.rb, line 7 def check_libs libs = [], fatal = false libs.all? { |lib| have_library(lib) || (abort("could not find library: #{lib}") if fatal) } end
dir_config_search(pretty_name, name, paths) { || ... }
click to toggle source
# File ext/extconf.rb, line 54 def dir_config_search(pretty_name, name, paths, &b) paths.each do |p| if dir_config_wrapper('OpenSSL', 'ssl', p + '/include', p + '/lib') && yield warn "-----\nFound #{pretty_name} in path #{p}\n-----" return true end end false end
dir_config_wrapper(pretty_name, name, idefault=nil, ldefault=nil)
click to toggle source
# File ext/extconf.rb, line 34 def dir_config_wrapper(pretty_name, name, idefault=nil, ldefault=nil) inc, lib = dir_config(name, idefault, ldefault) if inc && lib # TODO: Remove when 2.0.0 is the minimum supported version # Ruby versions not incorporating the mkmf fix at # https://bugs.ruby-lang.org/projects/ruby-trunk/repository/revisions/39717 # do not properly search for lib directories, and must be corrected unless lib && lib[-3, 3] == 'lib' @libdir_basename = 'lib' inc, lib = dir_config(name, idefault, ldefault) end unless idefault && ldefault abort "-----\nCannot find #{pretty_name} include path #{inc}\n-----" unless inc && inc.split(File::PATH_SEPARATOR).any? { |dir| File.directory?(dir) } abort "-----\nCannot find #{pretty_name} library path #{lib}\n-----" unless lib && lib.split(File::PATH_SEPARATOR).any? { |dir| File.directory?(dir) } warn "-----\nUsing #{pretty_name} in path #{File.dirname inc}\n-----" end true end end
pkg_config_wrapper(pretty_name, name)
click to toggle source
# File ext/extconf.rb, line 64 def pkg_config_wrapper(pretty_name, name) cflags, ldflags, libs = pkg_config(name) unless [cflags, ldflags, libs].any?(&:nil?) || [cflags, ldflags, libs].any?(&:empty?) warn "-----\nUsing #{pretty_name} from pkg-config #{cflags} && #{ldflags} && #{libs}\n-----" true end end