class Object
Public Instance Methods
system_libffi_usable?()
click to toggle source
# File ext/ffi_c/extconf.rb, line 7 def system_libffi_usable? # We need pkg_config or ffi.h libffi_ok = pkg_config("libffi") || have_header("ffi.h") || find_header("ffi.h", "/usr/local/include", "/usr/include/ffi", "/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/ffi", "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/ffi") || (find_header("ffi.h", `xcrun --sdk macosx --show-sdk-path`.strip + "/usr/include/ffi") rescue false) # Ensure we can link to ffi_prep_closure_loc libffi_ok &&= have_library("ffi", "ffi_prep_closure_loc", [ "ffi.h" ]) || have_library("libffi", "ffi_prep_closure_loc", [ "ffi.h" ]) || have_library("libffi-8", "ffi_prep_closure_loc", [ "ffi.h" ]) if RbConfig::CONFIG['host_os'] =~ /mswin/ have_library('libffi_convenience') have_library('shlwapi') end libffi_ok end