summaryrefslogtreecommitdiff
path: root/lib/tevent/wscript
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2013-02-22 14:26:16 +0100
committerJeremy Allison <jra@samba.org>2013-03-01 11:58:49 -0800
commitd5f92571083c82347f58a415db828b064e377522 (patch)
tree7b8940fce6c8744c76ec94f75ddd7592527e84a6 /lib/tevent/wscript
parent602cd7f6c6744c2468fb3350eb80ac15f5b9400c (diff)
downloadsamba-d5f92571083c82347f58a415db828b064e377522.tar.gz
samba-d5f92571083c82347f58a415db828b064e377522.tar.bz2
samba-d5f92571083c82347f58a415db828b064e377522.zip
tevent: define TEVENT_NUM_SIGNALS based on configure checks
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'lib/tevent/wscript')
-rwxr-xr-xlib/tevent/wscript17
1 files changed, 17 insertions, 0 deletions
diff --git a/lib/tevent/wscript b/lib/tevent/wscript
index 684286d8c4..c62c3de317 100755
--- a/lib/tevent/wscript
+++ b/lib/tevent/wscript
@@ -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: