summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/lib/pthreadpool/wscript_build11
-rw-r--r--source3/wscript7
-rwxr-xr-xsource3/wscript_build7
3 files changed, 21 insertions, 4 deletions
diff --git a/source3/lib/pthreadpool/wscript_build b/source3/lib/pthreadpool/wscript_build
new file mode 100644
index 0000000000..7679b58c44
--- /dev/null
+++ b/source3/lib/pthreadpool/wscript_build
@@ -0,0 +1,11 @@
+#!/usr/bin/env python
+
+bld.SAMBA3_SUBSYSTEM('PTHREADPOOL',
+ source='pthreadpool.c',
+ deps='pthread',
+ enabled=bld.env.WITH_PTHREADPOOL)
+
+bld.SAMBA3_BINARY('pthreadpooltest',
+ source='tests.c',
+ deps='PTHREADPOOL',
+ enabled=bld.env.WITH_PTHREADPOOL)
diff --git a/source3/wscript b/source3/wscript
index 3f9dfd9303..7f178a4c55 100644
--- a/source3/wscript
+++ b/source3/wscript
@@ -1669,6 +1669,13 @@ main() {
conf.CHECK_HEADERS('pthread.h')
conf.DEFINE('HAVE_PTHREAD', '1')
+ if Options.options.with_pthreadpool:
+ if conf.CONFIG_SET('HAVE_PTHREAD'):
+ conf.DEFINE('WITH_PTHREADPOOL', '1')
+ else:
+ Logs.warn("pthreadpool support cannot be enabled when pthread support was not found")
+ conf.undefine('WITH_PTHREADPOOL')
+
default_static_modules=TO_LIST('''pdb_smbpasswd pdb_tdbsam pdb_wbc_sam
auth_sam auth_unix auth_winbind auth_wbc auth_server
auth_domain auth_builtin vfs_default
diff --git a/source3/wscript_build b/source3/wscript_build
index ca37ce3ed1..a6ce559e58 100755
--- a/source3/wscript_build
+++ b/source3/wscript_build
@@ -57,8 +57,6 @@ LIBCLI_WINREG_SRC = '''rpc_client/cli_winreg.c
# that requires knowledge of security contexts
REG_PARSE_PRS_SRC = '''registry/reg_parse_prs.c'''
-PTHREADPOOL_SRC = ''
-
LIB_SRC = '''
lib/messages.c lib/messages_local.c
lib/messages_ctdbd.c lib/packet.c lib/ctdbd_conn.c
@@ -91,7 +89,7 @@ LIB_SRC = '''
lib/module.c lib/events.c
lib/server_contexts.c
lib/ldap_escape.c
- lib/secdesc.c ${PTHREADPOOL_SRC}
+ lib/secdesc.c
lib/fncall.c
libads/krb5_errs.c lib/system_smbd.c lib/audit.c
lib/file_id.c lib/idmap_cache.c'''
@@ -780,7 +778,7 @@ bld.SAMBA3_SUBSYSTEM('KRBCLIENT',
bld.SAMBA3_LIBRARY('samba3core',
source=LIB_SRC,
- deps='LIBCRYPTO ndr ndr-util security NDR_SECURITY charset NDR_MESSAGING LIBASYNC_REQ tdb-wrap3 CHARSET3 UTIL_TDB UTIL_PW SAMBA_VERSION krb5 flag_mapping util_reg passdb',
+ deps='LIBCRYPTO ndr ndr-util security NDR_SECURITY charset NDR_MESSAGING LIBASYNC_REQ tdb-wrap3 CHARSET3 UTIL_TDB UTIL_PW SAMBA_VERSION krb5 flag_mapping util_reg passdb PTHREADPOOL',
private_library=True,
vars=locals())
@@ -1361,6 +1359,7 @@ bld.RECURSE('../nsswitch')
bld.RECURSE('../nsswitch/libwbclient')
bld.RECURSE('auth')
bld.RECURSE('libgpo/gpext')
+bld.RECURSE('lib/pthreadpool')
bld.RECURSE('librpc')
bld.RECURSE('librpc/idl')
bld.RECURSE('modules')