Rename 'errors' to 'samba-errors' and make it public.
[obnox/samba/samba-obnox.git] / source3 / wscript_build
index 3c3f0ca8b18ac336385eb49baf6ab7da3ab8c264..9d5d0d044a41747f1549c40a402ac184319fa441 100755 (executable)
@@ -105,30 +105,21 @@ bld.SAMBA3_SUBSYSTEM('TLDAP',
 # when modules are not linked statically. In the latter case
 # symbols will not be present in the libpdb anyway so no hurt is
 # done to the version script.
-static_pdb_match = ['tdbsam', 'smbpasswd', 'wbc_sam']
 private_pdb_match = []
-
-# AD DC module when linked statically will pull in few source4/winbind
-# dependencies which are not used outside AD DC module
-static_pdb_match.append('samba_dsdb')
 private_pdb_match.append('!idmap_init')
 private_pdb_match.append('!idmap_sids_to_xids')
 private_pdb_match.append('!idmap_xids_to_sids')
 
-# ldap module is actually three modules merged together: ldapsam, ipa, and nds
-static_pdb_match = static_pdb_match + ['ldap', 'ipa', 'nds']
 ldapsam_pdb_match = ['!priv2ld', '!smbldap_search_domain_info',
                      '!ldapsam_*', '!groupmap_attr_list*', '!get_userattr_list',
                      '!dominfo_attr_list', '!get_attr_key2string',
                      '!sidmap_attr_list', '!attrib_map_*', '!idpool_attr_list',
                      '!get_attr_list']
 private_pdb_match.append('!pdb_nds_*')
-private_pdb_match.append('!pdb_init_ldapsam')
 private_pdb_match.append('!pdb_ldapsam_init*')
+private_pdb_match.append('!pdb_*_init')
 private_pdb_match = private_pdb_match + ldapsam_pdb_match
 
-private_pdb_match = private_pdb_match + map(lambda x: '!pdb_%s_init' % x, static_pdb_match)
-
 bld.SAMBA3_LIBRARY('samba-passdb',
                    source='',
                    deps='pdb',
@@ -142,7 +133,7 @@ bld.SAMBA3_LIBRARY('samba-passdb',
                    passdb/lookup_sid.h''',
                    abi_match=private_pdb_match,
                    abi_directory='passdb/ABI',
-                   vnum='0.24.1')
+                   vnum='0.24.2')
 
 bld.SAMBA3_SUBSYSTEM('pdb',
                    source='''passdb/pdb_get_set.c
@@ -180,7 +171,16 @@ bld.SAMBA3_SUBSYSTEM('param',
                    lib/sharesec.c
                    lib/ldap_debug_handler.c
                    lib/util_names.c''',
-                   deps='samba-util PARAM_UTIL ldap lber LOADPARM_CTX samba3core smbconf param_local.h param_global.h cups''')
+                   deps='''samba-util
+                   PARAM_UTIL
+                   ldap
+                   lber
+                   LOADPARM_CTX
+                   samba3core
+                   smbconf
+                   param_local.h
+                   param_global.h
+                   cups''')
 
 # this includes only the low level parse code, not stuff
 # that requires knowledge of security contexts
@@ -247,11 +247,6 @@ bld.SAMBA3_SUBSYSTEM('KRBCLIENT',
                      source='libads/kerberos.c libads/ads_status.c',
                      public_deps='krb5samba k5crypto gssapi LIBTSOCKET CLDAP LIBNMB')
 
-bld.SAMBA3_LIBRARY('sys_rw',
-                   source='lib/sys_rw.c lib/sys_rw_data.c',
-                   deps='replace iov_buf',
-                   private_library=True)
-
 bld.SAMBA3_SUBSYSTEM('samba3util',
                    source='''lib/system.c
                    lib/sendfile.c
@@ -260,20 +255,20 @@ bld.SAMBA3_SUBSYSTEM('samba3util',
                    lib/util_sid.c
                    lib/util_file.c
                    lib/util.c
+                   lib/util_path.c
+                   lib/util_procid.c
                    lib/util_sock.c
                    lib/util_tsock.c
                    lib/util_transfer_file.c
                    lib/sock_exec.c''',
                    deps='ndr LIBTSOCKET samba-security NDR_SECURITY samba-util util_tdb sys_rw iov_buf')
 
-if bld.CONFIG_GET("CTDB_CFLAGS") and bld.CONFIG_GET("CTDB_INCLUDE"):
+if bld.env.with_ctdb:
     SAMBA_CLUSTER_SUPPORT_SOURCES='''
                      lib/cluster_support.c
                      lib/dbwrap/dbwrap_ctdb.c
                      lib/messages_ctdbd.c
                      lib/ctdbd_conn.c
-                     lib/ctdb_conn.c
-                     torture/test_ctdbconn.c
                    '''
     SAMBA_CLUSTER_SUPPORT_DEPS='''
                      talloc
@@ -293,8 +288,6 @@ else:
 bld.SAMBA3_LIBRARY('samba-cluster-support',
                    source=SAMBA_CLUSTER_SUPPORT_SOURCES,
                    deps=SAMBA_CLUSTER_SUPPORT_DEPS,
-                   cflags=bld.CONFIG_GET("CTDB_CFLAGS"),
-                   includes=bld.CONFIG_GET("CTDB_INCLUDE"),
                    allow_undefined_symbols=True,
                    private_library=True)
 
@@ -306,7 +299,8 @@ bld.SAMBA3_SUBSYSTEM('TDB_LIB',
 
 bld.SAMBA3_LIBRARY('messages_dgm',
                    source='''lib/messages_dgm.c lib/messages_dgm_ref.c''',
-                   deps='talloc UNIX_MSG POLL_FUNCS_TEVENT samba-debug',
+                   deps='''talloc UNIX_MSG POLL_FUNCS_TEVENT samba-debug
+                           genrand''',
                    private_library=True)
 
 bld.SAMBA3_LIBRARY('messages_util',
@@ -512,12 +506,14 @@ bld.SAMBA3_SUBSYSTEM('sysquotas',
                      deps='samba3-util samba-util')
 
 NOTIFY_SOURCES=''
+NOTIFY_DEPS=''
 
 if bld.CONFIG_SET("HAVE_INOTIFY"):
     NOTIFY_SOURCES += ' smbd/notify_inotify.c'
 
 if bld.CONFIG_SET('SAMBA_FAM_LIBS'):
     NOTIFY_SOURCES += ' smbd/notify_fam.c'
+    NOTIFY_DEPS += ' ' + bld.CONFIG_GET('SAMBA_FAM_LIBS')
 
 bld.SAMBA3_LIBRARY('smbd_base',
                    source='''
@@ -639,9 +635,9 @@ bld.SAMBA3_LIBRARY('smbd_base',
                    netapi
                    NDR_IOCTL
                    notifyd
-                   ''' + bld.env['dmapi_lib']
-                   + (bld.CONFIG_GET('SAMBA_FAM_LIBS')
-                         if bld.CONFIG_SET('SAMBA_FAM_LIBS') else ''),
+                   ''' +
+                   bld.env['dmapi_lib'] +
+                   NOTIFY_DEPS,
                    private_library=True)
 
 bld.SAMBA3_SUBSYSTEM('LOCKING',
@@ -811,7 +807,7 @@ bld.SAMBA3_LIBRARY('CHARSET3',
 
 bld.SAMBA3_SUBSYSTEM('errors3',
                      source='libsmb/errormap.c libsmb/smberr.c lib/errmap_unix.c',
-                     deps='errors')
+                     deps='samba-errors')
 
 bld.SAMBA3_SUBSYSTEM('LIBCLI_SAMR',
                     source='rpc_client/cli_samr.c',
@@ -863,7 +859,7 @@ bld.SAMBA3_SUBSYSTEM('LIBLSA',
 ########################## BINARIES #################################
 
 bld.SAMBA3_BINARY('smbd/smbd',
-                 source='smbd/server.c',
+                 source='smbd/server.c smbd/smbd_cleanupd.c',
                  deps='smbd_base EPMD LSASD FSSD MDSSD',
                  install_path='${SBINDIR}')
 
@@ -908,6 +904,7 @@ bld.SAMBA3_BINARY('winbindd/winbindd',
                  winbindd/winbindd_msrpc.c
                  winbindd/winbindd_rpc.c
                  winbindd/winbindd_reconnect.c
+                 winbindd/winbindd_reconnect_ads.c
                  winbindd/winbindd_ads.c
                  winbindd/winbindd_samr.c
                  winbindd/winbindd_dual.c
@@ -1076,7 +1073,8 @@ bld.SAMBA3_BINARY('client/smbclient',
                  msrpc3
                  RPC_NDR_SRVSVC
                  cli_smb_common
-                 ''' + bld.env['archive_lib'])
+                archive
+                 ''')
 
 bld.SAMBA3_BINARY('net',
                  source='''utils/net.c
@@ -1192,13 +1190,6 @@ bld.SAMBA3_BINARY('testparm',
                  param
                  popt_samba3''')
 
-bld.SAMBA3_BINARY('smbta-util',
-                 source='utils/smbta-util.c',
-                 deps='''
-                 talloc
-                 secrets3
-                 param''')
-
 smbstatus_source = 'utils/status.c smbd/notify_msg.c'
 
 if bld.CONFIG_GET("WITH_PROFILE"):
@@ -1310,6 +1301,7 @@ bld.SAMBA3_BINARY('smbtorture' + bld.env.suffix3,
                  LOCKING
                  NDR_OPEN_FILES
                  idmap
+                 IDMAP_TDB_COMMON
                  samba-cluster-support
                  ''',
                  cflags='-DWINBINDD_SOCKET_DIR=\"%s\"' % bld.env.WINBINDD_SOCKET_DIR,
@@ -1526,7 +1518,6 @@ bld.RECURSE('librpc')
 bld.RECURSE('librpc/idl')
 bld.RECURSE('libsmb')
 bld.RECURSE('modules')
-bld.RECURSE('pam_smbpass')
 bld.RECURSE('param')
 bld.RECURSE('passdb')
 bld.RECURSE('rpc_server')