3 common_util_sources = '''talloc_stack.c smb_threads.c xfile.c data_blob.c
4 util_file.c time.c rbtree.c rfc1738.c select.c
5 genrand.c fsusage.c blocking.c become_daemon.c
6 signal.c system.c params.c util.c util_id.c util_net.c
7 util_strlist.c idtree.c debug.c fault.c base64.c
8 util_str.c util_str_common.c substitute.c ms_fnmatch.c'''
10 common_util_headers = 'debug.h'
11 common_util_public_deps = 'talloc pthread LIBCRYPTO'
12 s4_util_sources = '''dprintf.c parmlist.c'''
13 s4_util_deps = 'DYNCONFIG'
14 s4_util_public_deps = 'talloc CHARSET execinfo uid_wrapper'
15 s4_util_public_headers = 'attr.h byteorder.h data_blob.h memory.h safe_string.h time.h talloc_stack.h xfile.h dlinklist.h util.h string_wrappers.h'
16 s4_util_header_path = [ ('dlinklist.h util.h', '.'), ('*', 'util') ]
18 if bld.env._SAMBA_BUILD_ == 3:
19 # as we move files into common between samba-util and samba-util3, move them here.
20 # Both samba-util and samba-util3 depend on this private library
21 bld.SAMBA_LIBRARY('samba-util-common',
22 source=common_util_sources,
23 public_deps=common_util_public_deps,
24 # until we get all the dependencies in this library in common
25 # we need to allow this library to be built with unresolved symbols
26 allow_undefined_symbols=True,
28 public_headers=common_util_headers,
29 header_path= [('*', 'util') ],
34 bld.SAMBA_LIBRARY('samba-util',
35 source=s4_util_sources + " " + common_util_sources,
37 public_deps=s4_util_public_deps + ' ' + common_util_public_deps,
38 public_headers=s4_util_public_headers + ' ' + common_util_headers,
39 header_path= s4_util_header_path,
42 pc_files='samba-util.pc'
45 # dummy subsystem for avoid wider deps changes.
46 bld.SAMBA_SUBSYSTEM('samba-util-common',
51 bld.SAMBA_LIBRARY('asn1util',
53 deps='talloc samba-util-common',
58 bld.SAMBA_SUBSYSTEM('UNIX_PRIVS',
59 source='unix_privs.c',
60 autoproto='unix_privs.h',
61 deps='replace talloc',
66 bld.SAMBA_LIBRARY('wrap_xattr',
67 source='wrap_xattr.c',
75 bld.SAMBA_LIBRARY('UTIL_TDB',
78 public_deps='tdb talloc',
82 bld.SAMBA_SUBSYSTEM('UTIL_TEVENT',
83 source='tevent_unix.c tevent_ntstatus.c tevent_werror.c',
86 public_headers='tevent_ntstatus.h tevent_unix.h tevent_werror.h',
87 header_path=[ ('*', 'util') ],
91 if bld.env._SAMBA_BUILD_ == 4:
92 bld.SAMBA_SUBSYSTEM('util_ldb',
96 public_headers='util_ldb.h'
100 bld.SAMBA_SUBSYSTEM('UTIL_RUNCMD',
101 source='util_runcmd.c',
106 bld.SAMBA_SUBSYSTEM('UTIL_PW',
113 bld.SAMBA_LIBRARY('tdb-wrap',
115 deps='tdb talloc samba-util',
116 public_headers='tdb_wrap.h',
117 private_library=True,