from optparse import SUPPRESS_HELP
sys.path.insert(0, srcdir+"/buildtools/wafsamba")
sys.path.insert(0, "source3")
-import wafsamba, Options, Logs, Utils
+import wafsamba, Options, Logs, Utils, Scripting
import build.charset
import samba_utils, samba_version
import samba3
opt.SAMBA3_ADD_OPTION('iprint', with_name="enable", without_name="disable")
opt.SAMBA3_ADD_OPTION('merged-build', with_name="enable", without_name="disable")
opt.SAMBA3_ADD_OPTION('pam')
+ opt.SAMBA3_ADD_OPTION('pam_smbpass')
opt.SAMBA3_ADD_OPTION('quotas')
opt.SAMBA3_ADD_OPTION('sys-quotas')
opt.SAMBA3_ADD_OPTION('sendfile-support')
fsetproplist fsetxattr _fstat __fstat fstat64 _fstat64 __fstat64 fsync
ftell64 ftello64 ftruncate64 futimens futimes __fxstat getauthuid
getcwd _getcwd __getcwd getdents __getdents getdents64 getdirentries
-getgrent getgrnam getgrouplist getmntent getpagesize
+getgrent getgrnam getgrouplist getgrset getmntent getpagesize
getproplist get_proplist_entry getpwanam getpwent_r getrlimit gettext
glob grantpt hstrerror initgroups innetgr
inotify_init lgetea lgetxattr listea listxattr llistea llistxattr
utimensat vsyslog _write __write __xstat
''')
- conf.CHECK_TYPE('struct timespec', headers='sys/time.h time.h')
-
conf.CHECK_SAMBA3_CHARSET() # see build/charset.py
# FIXME: these should be tests for features, but the old build system just
conf.CHECK_TYPE('ber_tag_t', 'unsigned int', headers='ldap.h lber.h')
conf.CHECK_FUNCS_IN('ber_scanf ber_sockbuf_add_io', 'lber')
conf.CHECK_VARIABLE('LDAP_OPT_SOCKBUF', headers='ldap.h')
- # if ber_sockbuf_add_io() and LDAP_OPT_SOCKBUF are available, we can add
- # SASL wrapping hooks
- if conf.CONFIG_SET('HAVE_BER_SOCKBUF_ADD_IO') and \
- conf.CONFIG_SET('HAVE_LDAP_OPT_SOCKBUF'):
- conf.DEFINE('HAVE_LDAP_SASL_WRAPPING', '1')
# if we LBER_OPT_LOG_PRINT_FN we can intercept ldap logging and print it out
# for the samba logs
conf.DEFINE('HAVE_LDAP', '1')
conf.DEFINE('LDAP_DEPRECATED', '1')
conf.env['HAVE_LDAP'] = '1'
+ # if ber_sockbuf_add_io() and LDAP_OPT_SOCKBUF are available, we can add
+ # SASL wrapping hooks
+ if conf.CONFIG_SET('HAVE_BER_SOCKBUF_ADD_IO') and \
+ conf.CONFIG_SET('HAVE_LDAP_OPT_SOCKBUF'):
+ conf.DEFINE('HAVE_LDAP_SASL_WRAPPING', '1')
else:
conf.SET_TARGET_TYPE('ldap', 'EMPTY')
conf.SET_TARGET_TYPE('lber', 'EMPTY')
conf.DEFINE('HAVE_KRB5', '1')
if have_gssapi:
conf.DEFINE('HAVE_GSSAPI', '1')
+ if conf.CONFIG_SET('HAVE_LDAP'):
+ conf.env['HAVE_ADS'] = '1'
else:
Logs.warn("krb5 libs don't have all features required for Active Directory support")
conf.undefine('HAVE_KRB5_H')
syscall(SYS_initgroups, 16, NULL, NULL, 0);
''',
'HAVE_DARWIN_INITGROUPS',
- msg='Checking hether to use the Darwin-specific initgroups system call')
+ msg='Checking whether to use the Darwin-specific initgroups system call')
conf.CHECK_CODE('''struct utimbuf tbuf; tbuf.actime = 0; tbuf.modtime = 1; exit(utime("foo.c",&tbuf));''',
'HAVE_UTIMBUF',
msg='Checking for ftruncate extend',
addmain=False,
execute=True)
-
- if os.environ.get('RUN_FROM_BUILD_FARM') is not None:
- conf.define('ENABLE_BUILD_FARM_HACKS', '1')
+ if os.getenv('RUN_FROM_BUILD_FARM'):
+ Logs.info("enabling buildfarm hacks")
+ conf.DEFINE('ENABLE_BUILD_FARM_HACKS', '1')
if Options.options.with_sendfile_support:
if (host_os.rfind('linux') > -1) or (host_os.rfind('gnu') > -1) or (host_os.rfind('k*bsd*-gnu') > -1) or (host_os.rfind('kopensolaris*-gnu') > -1):
# For sys/quota.h and linux/quota.h
conf.CHECK_HEADERS('sys/quota.h')
+ conf.CHECK_CODE('__attribute__((destructor)) static void cleanup(void) { }',
+ 'HAVE_FUNCTION_ATTRIBUTE_DESTRUCTOR',
+ addmain=False,
+ link=False,
+ msg='Checking whether we can compile with __attribute__((destructor))')
+
+ conf.CHECK_CODE('void seekdir(DIR *d, long loc) { return; }',
+ 'SEEKDIR_RETURNS_VOID',
+ headers='sys/types.h dirent.h',
+ msg='Checking whether seekdir returns void')
+
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
cmd = 'ctags $(find %s/.. -name "*.[ch]" | grep -v "*_proto\.h")' % source_root
print("Running: %s" % cmd)
os.system(cmd)
+
+if not os.getenv('TOPLEVEL_BUILD'):
+ def wildcard_cmd(cmd):
+ '''called on a unknown command'''
+ from samba_wildcard import run_named_build_task
+ run_named_build_task(cmd)
+ def main():
+ from samba_wildcard import wildcard_main
+ wildcard_main(wildcard_cmd)
+ Scripting.main = main