build: updated configure checks or new syntax
[obnox/samba/samba-obnox.git] / lib / tevent / wscript
1 VERSION = '0.9.8'
2
3 srcdir = '../..'
4 blddir = 'bin'
5
6 import sys
7 sys.path.insert(0, srcdir+"/buildtools/wafsamba")
8 import wafsamba
9
10 LIBREPLACE_DIR= srcdir + '/lib/replace'
11 LIBTALLOC_DIR=  srcdir + '/lib/talloc'
12
13 def set_options(opt):
14     opt.recurse(LIBREPLACE_DIR)
15     opt.recurse(LIBTALLOC_DIR)
16
17 def configure(conf):
18     conf.sub_config(LIBREPLACE_DIR)
19     conf.sub_config(LIBTALLOC_DIR)
20
21     if conf.CHECK_FUNCS('epoll_create', headers='sys/epoll.h'):
22         conf.DEFINE('HAVE_EPOLL', 1)
23
24     conf.SAMBA_CONFIG_H()
25
26 def build(bld):
27     bld.BUILD_SUBDIR(LIBREPLACE_DIR)
28     bld.BUILD_SUBDIR(LIBTALLOC_DIR)
29
30     SRC = '''tevent.c tevent_debug.c tevent_fd.c tevent_immediate.c
31              tevent_queue.c tevent_req.c tevent_select.c
32              tevent_signal.c tevent_standard.c tevent_timed.c tevent_util.c tevent_wakeup.c'''
33
34     if bld.CONFIG_SET('HAVE_EPOLL'):
35         SRC += ' tevent_epoll.c'
36
37     bld.SAMBA_LIBRARY('tevent',
38                       SRC,
39                       deps='replace talloc',
40                       vnum=VERSION)