Sha256: 4ec114c44f8faa13f3abd97738bcf8d98f449460e5d8e73ec2fa053df5bccb55

Contents?: true

Size: 868 Bytes

Versions: 2

Compression:

Stored size: 868 Bytes

Contents

require 'mkmf'

unless pkg_config('glib-2.0')
  abort "Ebb requires glib-2.0 and pkg_config"
end

flags = []

if have_header('sys/select.h')
  flags << '-DEV_USE_SELECT'
end

if have_header('poll.h')
  flags << '-DEV_USE_POLL'
end

if have_header('sys/epoll.h')
  flags << '-DEV_USE_EPOLL'
end

if have_header('sys/event.h') and have_header('sys/queue.h')
  flags << '-DEV_USE_KQUEUE'
end

if have_header('port.h')
  flags << '-DEV_USE_PORT'
end

if have_header('sys/inotify.h')
  flags << '-DEV_USE_INOTIFY'
end

dir = File.dirname(__FILE__)
libev_dir = File.expand_path(dir + '/../libev')

$LDFLAGS << " -lpthread "
$CFLAGS << " -I#{libev_dir} " << flags.join(' ')
$defs << "-DRUBY_VERSION_CODE=#{RUBY_VERSION.gsub(/\D/, '')}"

$srcs = ['ebb.c', 'ebb_ruby.c', 'parser.c']
$objs = ['ebb.o', 'ebb_ruby.o', 'parser.o']

dir_config('ebb_ext')
create_makefile('ebb_ext')

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
ebb-0.2.0 src/extconf.rb
ebb-0.2.1 src/extconf.rb