Move waf into third_party/.
[obnox/samba/samba-obnox.git] / lib / tevent / wscript
index 684286d8c4ee7c80f69a64357be42cabc7b9df0c..026cd9a1c1b4f996eb46875d40a923de94c960b2 100755 (executable)
@@ -1,7 +1,7 @@
 #!/usr/bin/env python
 
 APPNAME = 'tevent'
-VERSION = '0.9.17'
+VERSION = '0.9.24'
 
 blddir = 'bin'
 
@@ -10,12 +10,12 @@ import sys, os
 # find the buildtools directory
 srcdir = '.'
 while not os.path.exists(srcdir+'/buildtools') and len(srcdir.split('/')) < 5:
-    srcdir = '../' + srcdir
+    srcdir = srcdir + '/..'
 sys.path.insert(0, srcdir + '/buildtools/wafsamba')
 
 import wafsamba, samba_dist, Options, Logs
 
-samba_dist.DIST_DIRS('lib/tevent:. lib/replace:lib/replace lib/talloc:lib/talloc buildtools:buildtools')
+samba_dist.DIST_DIRS('lib/tevent:. lib/replace:lib/replace lib/talloc:lib/talloc buildtools:buildtools third_party/waf:third_party/waf')
 
 def set_options(opt):
     opt.BUILTIN_DEFAULT('replace')
@@ -44,6 +44,23 @@ def configure(conf):
     if conf.CHECK_FUNCS('epoll_create', headers='sys/epoll.h'):
         conf.DEFINE('HAVE_EPOLL', 1)
 
+    tevent_num_signals = 64
+    v = conf.CHECK_VALUEOF('NSIG', headers='signal.h')
+    if v is not None:
+        tevent_num_signals = max(tevent_num_signals, v)
+    v = conf.CHECK_VALUEOF('_NSIG', headers='signal.h')
+    if v is not None:
+        tevent_num_signals = max(tevent_num_signals, v)
+    v = conf.CHECK_VALUEOF('SIGRTMAX', headers='signal.h')
+    if v is not None:
+        tevent_num_signals = max(tevent_num_signals, v)
+    v = conf.CHECK_VALUEOF('SIGRTMIN', headers='signal.h')
+    if v is not None:
+        tevent_num_signals = max(tevent_num_signals, v*2)
+
+    if not conf.CONFIG_SET('USING_SYSTEM_TEVENT'):
+        conf.DEFINE('TEVENT_NUM_SIGNALS', tevent_num_signals)
+
     conf.env.disable_python = getattr(Options.options, 'disable_python', False)
 
     if not conf.env.disable_python:
@@ -72,6 +89,9 @@ def build(bld):
     if bld.CONFIG_SET('HAVE_EPOLL'):
         SRC += ' tevent_epoll.c'
 
+    if bld.CONFIG_SET('HAVE_SOLARIS_PORTS'):
+        SRC += ' tevent_port.c'
+
     if bld.env.standalone_tevent:
         bld.env.PKGCONFIGDIR = '${LIBDIR}/pkgconfig'
         private_library = False
@@ -92,7 +112,7 @@ def build(bld):
                           pc_files='tevent.pc',
                           private_library=private_library)
 
-    if not bld.CONFIG_SET('USING_SYSTEM_PYTEVENT'):
+    if not bld.CONFIG_SET('USING_SYSTEM_PYTEVENT') and not bld.env.disable_python:
         bld.SAMBA_PYTHON('pytevent',
                          'pytevent.c',
                          deps='tevent',