Sha256: 187577745e6204b1234095977f2d4b1a81cdec8a9533b46483bab4c390e832eb

Contents?: true

Size: 1.98 KB

Versions: 4

Compression:

Stored size: 1.98 KB

Contents

if defined?(RUBY_ENGINE) && RUBY_ENGINE != 'ruby'
  # create dummy Makefile to indicate success
  f = File.open(File.join(File.dirname(__FILE__), "Makefile"), "w")
  f.write("all:\n\techo all\ninstall:\n\techo installed\n")
  f.close
  return
end

# autodetect ruby headers
unless ARGV.any? {|arg| arg.include?('--with-ruby-include') }
  require 'rbconfig'
  bindir = RbConfig::CONFIG['bindir']
  if bindir =~ %r{(^.*/\.rbenv/versions)/([^/]+)/bin$}
    ruby_include = "#{$1}/#{$2}/include/ruby-1.9.1/ruby-#{$2}"
    ruby_include = "#{ENV['RBENV_ROOT']}/sources/#{$2}/ruby-#{$2}" unless File.exist?(ruby_include)
    ARGV << "--with-ruby-include=#{ruby_include}"
  elsif bindir =~ %r{(^.*/\.rvm/rubies)/([^/]+)/bin$}
    ruby_include = "#{$1}/#{$2}/include/ruby-1.9.1/#{$2}"
    ruby_include = "#{ENV['rvm_path']}/src/#{$2}" unless File.exist?(ruby_include)
    ARGV << "--with-ruby-include=#{ruby_include}"
  end
end

require "mkmf"

RbConfig::MAKEFILE_CONFIG['CC'] = ENV['CC'] if ENV['CC']

require "debase/ruby_core_source"

hdrs = proc {
  have_header("vm_core.h") and
  (have_header("iseq.h") or have_header("iseq.h", ["vm_core.h"])) and
  have_header("version.h")
}

# Allow use customization of compile options. For example, the
# following lines could be put in config_options to to turn off
# optimization:
#   $CFLAGS='-fPIC -fno-strict-aliasing -g3 -ggdb -O2 -fPIC'
config_file = File.join(File.dirname(__FILE__), 'config_options.rb')
load config_file if File.exist?(config_file)

if ENV['debase_debug']
  $CFLAGS+=' -Wall -Werror' 
  $CFLAGS+=' -g3'
end

dir_config("ruby")
if !Debase::RubyCoreSource.create_makefile_with_core(hdrs, "attach")
  STDERR.print("Makefile creation failed\n")
  STDERR.print("*************************************************************\n\n")
  STDERR.print("  NOTE: If your headers were not found, try passing\n")
  STDERR.print("        --with-ruby-include=PATH_TO_HEADERS      \n\n")
  STDERR.print("*************************************************************\n\n")
  exit(1)
end

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
avalara_sdk-24.12.0 vendor/bundle/ruby/2.7.0/gems/debase-0.2.8/ext/attach/extconf.rb
debase-0.2.8 ext/attach/extconf.rb
debase-0.2.7 ext/attach/extconf.rb
debase-0.2.6 ext/attach/extconf.rb