dcerpc-gssapi: add function to extract authtime
[Samba.git] / lib / tevent / wscript
blobaae0d1ef9983b5f9521dea0231030d43e3f042ff
1 #!/usr/bin/env python
3 APPNAME = 'tevent'
4 VERSION = '0.9.9'
6 blddir = 'bin'
8 import sys, os
10 # find the buildtools directory
11 srcdir = '.'
12 while not os.path.exists(srcdir+'/buildtools') and len(srcdir.split('/')) < 5:
13 srcdir = '../' + srcdir
14 sys.path.insert(0, srcdir + '/buildtools/wafsamba')
16 import wafsamba, samba_dist
18 samba_dist.DIST_DIRS('lib/tevent:. lib/replace:lib/replace lib/talloc:lib/talloc buildtools:buildtools')
20 def set_options(opt):
21 opt.BUILTIN_DEFAULT('replace')
22 opt.BUNDLED_EXTENSION_DEFAULT('tevent', noextension='tevent')
23 opt.RECURSE('lib/replace')
24 opt.RECURSE('lib/talloc')
26 def configure(conf):
27 conf.RECURSE('lib/replace')
28 conf.RECURSE('lib/talloc')
30 conf.env.standalone_tevent = conf.IN_LAUNCH_DIR()
32 if not conf.env.standalone_tevent:
33 if conf.CHECK_BUNDLED_SYSTEM('tevent', minversion=VERSION,
34 onlyif='talloc', implied_deps='replace talloc'):
35 conf.define('USING_SYSTEM_TEVENT', 1)
37 if conf.CHECK_FUNCS('epoll_create', headers='sys/epoll.h'):
38 conf.DEFINE('HAVE_EPOLL', 1)
40 conf.SAMBA_CONFIG_H()
42 def build(bld):
43 bld.RECURSE('lib/replace')
44 bld.RECURSE('lib/talloc')
46 SRC = '''tevent.c tevent_debug.c tevent_fd.c tevent_immediate.c
47 tevent_queue.c tevent_req.c tevent_select.c
48 tevent_signal.c tevent_standard.c tevent_timed.c tevent_util.c tevent_wakeup.c'''
50 if bld.CONFIG_SET('HAVE_EPOLL'):
51 SRC += ' tevent_epoll.c'
53 if not bld.CONFIG_SET('USING_SYSTEM_TEVENT'):
54 bld.SAMBA_LIBRARY('tevent',
55 SRC,
56 deps='replace talloc',
57 enabled= not bld.CONFIG_SET('USING_SYSTEM_TEVENT'),
58 abi_file='ABI/tevent-%s.sigs' % VERSION,
59 abi_match='tevent_* _tevent_*',
60 vnum=VERSION,
61 is_bundled=not bld.env.standalone_tevent)
63 if bld.env.standalone_tevent:
64 bld.env.PKGCONFIGDIR = '${LIBDIR}/pkgconfig'
65 bld.PKG_CONFIG_FILES('tevent.pc', vnum=VERSION)
66 bld.INSTALL_FILES('${INCLUDEDIR}', 'tevent.h')
68 def test(ctx):
69 '''test tevent'''
70 print("The tevent testsuite is part of smbtorture in samba4")
73 def dist():
74 '''makes a tarball for distribution'''
75 samba_dist.dist()