ry / ebb
watch download tarball
public
Description: web server
Homepage: http://ebb.rubyforge.org
Clone URL: git://github.com/ry/ebb.git
ebb / ext / extconf.rb
100644 49 lines (34 sloc) 0.947 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
47
48
49
require 'mkmf'
 
flags = []
 
if pkg_config("gnutls")
  flags << '-DHAVE_GNUTLS'
end
 
flags << '-DEV_USE_MONOTONIC=0'
 
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 << " -lefence "
$CFLAGS << " -I#{libev_dir} " << flags.join(' ')
$defs << "-DRUBY_VERSION_CODE=#{RUBY_VERSION.gsub(/\D/, '')}"
 
$srcs = ['ebb_ffi.c', "ebb.c", "ebb_request_parser.c", "rbtree.c"]
$objs = ['ebb_ffi.o', "ebb.o", "ebb_request_parser.o", "rbtree.o"]
 
CONFIG['warnflags'] = ""
 
dir_config('ebb_ffi')
create_makefile('ebb_ffi')