s4-waf: mark the wscript files as python so vim/emacs knows how to highlight them
[nivanova/samba-autobuild/.git] / lib / tevent / wscript
1 #!/usr/bin/env python
2
3 VERSION = '0.9.8'
4
5 srcdir = '../..'
6 blddir = 'bin'
7
8 import sys
9 sys.path.insert(0, srcdir+"/buildtools/wafsamba")
10 import wafsamba
11
12 LIBREPLACE_DIR= srcdir + '/lib/replace'
13 LIBTALLOC_DIR=  srcdir + '/lib/talloc'
14
15 def set_options(opt):
16     opt.recurse(LIBREPLACE_DIR)
17     opt.recurse(LIBTALLOC_DIR)
18
19 def configure(conf):
20     conf.sub_config(LIBREPLACE_DIR)
21     conf.sub_config(LIBTALLOC_DIR)
22
23     if conf.CHECK_FUNCS('epoll_create', headers='sys/epoll.h'):
24         conf.DEFINE('HAVE_EPOLL', 1)
25
26     conf.SAMBA_CONFIG_H()
27
28 def build(bld):
29     bld.BUILD_SUBDIR(LIBREPLACE_DIR)
30     bld.BUILD_SUBDIR(LIBTALLOC_DIR)
31
32     SRC = '''tevent.c tevent_debug.c tevent_fd.c tevent_immediate.c
33              tevent_queue.c tevent_req.c tevent_select.c
34              tevent_signal.c tevent_standard.c tevent_timed.c tevent_util.c tevent_wakeup.c'''
35
36     if bld.CONFIG_SET('HAVE_EPOLL'):
37         SRC += ' tevent_epoll.c'
38
39     bld.SAMBA_LIBRARY('tevent',
40                       SRC,
41                       deps='replace talloc',
42                       vnum=VERSION)