Sha256: bcdfed8bcf42b291a192f7fedc6c0e8d50848deb721474b1e9f51be7afe57745

Contents?: true

Size: 1.46 KB

Versions: 73

Compression:

Stored size: 1.46 KB

Contents

require 'mkmf'

fail = false

def create_dummy_makefile
  File.open("Makefile", 'w') do |f|
    f.puts "all:"
    f.puts "install:"
  end
end

case RUBY_PLATFORM
when /bsd/i, /darwin/i
  unless have_header('sys/event.h')
    puts
    puts "Missing 'sys/event.h' header"
    fail = true
  end
  
  if fail
    puts
    puts "Events handler could not be compiled (see above error). Your god installation will not support event conditions."
    create_dummy_makefile
  else
    create_makefile 'kqueue_handler_ext'
  end
when /linux/i
  unless have_header('linux/netlink.h')
    puts
    puts "Missing 'linux/netlink.h' header(s)"
    puts "You may need to install a header package for your system"
    fail = true
  end
  
  unless have_header('linux/connector.h') && have_header('linux/cn_proc.h')
    puts
    puts "Missing 'linux/connector.h', or 'linux/cn_proc.h' header(s)"
    puts "These are only available in Linux kernel 2.6.15 and later (run `uname -a` to find yours)"
    puts "You may need to install a header package for your system"
    fail = true
  end
  
  if fail
    puts
    puts "Events handler could not be compiled (see above error). Your god installation will not support event conditions."
    create_dummy_makefile
  else
    create_makefile 'netlink_handler_ext'
  end
else
  puts
  puts "Unsupported platform '#{RUBY_PLATFORM}'. Supported platforms are BSD, DARWIN, and LINUX."
  puts "Your god installation will not support event conditions."
  create_dummy_makefile
end

Version data entries

73 entries across 73 versions & 21 rubygems

Version Path
god-0.9.0 ext/god/extconf.rb
olgen-god-0.9.2 ext/god/extconf.rb
olgen-god-0.9.1 ext/god/extconf.rb
olgen-god-0.9.0 ext/god/extconf.rb
god-0.8.0 ext/god/extconf.rb
olgen-god-0.8.2 ext/god/extconf.rb
olgen-god-0.8.1 ext/god/extconf.rb
olgen-god-0.8.0 ext/god/extconf.rb
god-0.7.22 ext/god/extconf.rb
god-0.7.21 ext/god/extconf.rb
god-0.7.20 ext/god/extconf.rb
god-0.7.19 ext/god/extconf.rb
god-0.7.18 ext/god/extconf.rb
god-0.7.17 ext/god/extconf.rb
god-0.7.16 ext/god/extconf.rb
god-0.7.15 ext/god/extconf.rb
god-0.7.14 ext/god/extconf.rb
god-0.6.0 ext/god/extconf.rb
god-0.4.3 ext/god/extconf.rb
god-0.4.1 ext/god/extconf.rb