ry / ebb fork watch download tarball
public
Description: web server
Homepage: http://ebb.rubyforge.org
Clone URL: git://github.com/ry/ebb.git
Ryan Dahl (author)
Fri Mar 14 17:51:28 -0700 2008
commit  b128ee31d3751baae5229187a8f6ad865dba63d1
tree    188fbde21cd4b1b860eb691df212bf3d981f380f
parent  26e7c927f672e4a589e50387ec846c4d89a6b81e
ebb / src / extconf.rb
100644 46 lines (32 sloc) 0.869 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
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')