ry / ebb fork watch download tarball
public
Description: web server
Homepage: http://ebb.rubyforge.org
Clone URL: git://github.com/ry/ebb.git
Search Repo:
Ryan Dahl (author)
Fri Feb 29 10:42:59 -0800 2008
commit  05fac9f1f72ec39478d06178699d31fe8dd910e3
tree    091a9b8b93cdf1fe6706e3f6079e77fb265885bf
parent  55f770d3cc40a4c2a6d5b2005c48c52c1407c8d7
ebb / src / extconf.rb
100644 43 lines (30 sloc) 0.791 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
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 << " -std=c99 -I#{libev_dir} " << flags.join(' ')
$defs << "-DRUBY_VERSION_CODE=#{RUBY_VERSION.gsub(/\D/, '')}"
 
 
dir_config('ebb_ext')
create_makefile('ebb_ext')