action='store_false', dest='with_json',
help=("Build without JSON support."))
+ opt.samba_add_onoff_option('smb1-server',
+ dest='with_smb1server',
+ help=("Build smbd with SMB1 support (default=yes)."))
+
def configure(conf):
version = samba_version.load_version(env=conf.env)
conf.env.DEVELOPER = True
# if we are in a git tree without a pre-commit hook, install a
# simple default.
- pre_commit_hook = os.path.join(Context.g_module.top, '.git/hooks/pre-commit')
- if (os.path.isdir(os.path.dirname(pre_commit_hook)) and
- not os.path.exists(pre_commit_hook)):
- shutil.copy(os.path.join(Context.g_module.top, 'script/git-hooks/pre-commit-hook'),
- pre_commit_hook)
+ # we need git for 'waf dist'
+ githooksdir = None
+ conf.find_program('git', var='GIT')
+ if 'GIT' in conf.env:
+ githooksdir = conf.CHECK_COMMAND('%s rev-parse --git-path hooks' % conf.env.GIT[0],
+ msg='Finding githooks directory',
+ define=None,
+ on_target=False)
+ if githooksdir and os.path.isdir(githooksdir):
+ pre_commit_hook = os.path.join(githooksdir, 'pre-commit')
+ if not os.path.exists(pre_commit_hook):
+ Logs.info("Installing script/git-hooks/pre-commit-hook as %s" %
+ pre_commit_hook)
+ shutil.copy(os.path.join(Context.g_module.top, 'script/git-hooks/pre-commit-hook'),
+ pre_commit_hook)
conf.ADD_EXTRA_INCLUDES('#include/public #source4 #lib #source4/lib #source4/include #include #lib/replace')
conf.RECURSE('dynconfig')
conf.RECURSE('selftest')
+ conf.PROCESS_SEPARATE_RULE('system_gnutls')
+
conf.CHECK_CFG(package='zlib', minversion='1.2.3',
args='--cflags --libs',
mandatory=True)
if not conf.CONFIG_GET('KRB5_VENDOR'):
conf.PROCESS_SEPARATE_RULE('embedded_heimdal')
- conf.PROCESS_SEPARATE_RULE('system_gnutls')
-
conf.RECURSE('source4/dsdb/samdb/ldb_modules')
conf.RECURSE('source4/ntvfs/sysdep')
conf.RECURSE('lib/util')
conf.RECURSE('source3')
conf.RECURSE('lib/texpect')
+ conf.RECURSE('lib/tsocket')
conf.RECURSE('python')
if conf.env.with_ctdb:
conf.RECURSE('ctdb')
conf.RECURSE('lib/socket')
conf.RECURSE('lib/mscat')
conf.RECURSE('packaging')
+ conf.RECURSE('lib/krb5_wrap')
conf.SAMBA_CHECK_UNDEFINED_SYMBOL_FLAGS()
# allows us to find problems on our development hosts faster.
# It also results in faster load time.
- if conf.CHECK_LDFLAGS('-Wl,--as-needed'):
+ if (not Options.options.address_sanitizer
+ and conf.CHECK_LDFLAGS('-Wl,--as-needed')):
conf.env.append_unique('LINKFLAGS', '-Wl,--as-needed')
if not conf.CHECK_NEED_LC("-lc not needed"):
msg="Checking compiler for full RELRO support"):
conf.env['ENABLE_RELRO'] = True
+ if conf.CONFIG_GET('ENABLE_SELFTEST') and \
+ Options.options.with_smb1server == False and \
+ Options.options.without_ad_dc != True:
+ conf.fatal('--without-smb1-server cannot be specified with '
+ '--enable-selftest/--enable-developer if '
+ '--without-ad-dc is NOT set!')
+
+ if Options.options.with_smb1server != False:
+ conf.DEFINE('WITH_SMB1SERVER', '1')
+
#
# FreeBSD is broken. It doesn't include 'extern char **environ'
# in any shared library, but statically inside crt0.o.
'''test that distribution tarball builds and installs'''
samba_version.load_version(env=None)
+def printversion(ctx):
+ '''print version'''
+ ver = samba_version.load_version(env=None)
+ print('Samba Version: ' + ver.STRING_WITH_NICKNAME)
+
def wildcard_cmd(cmd):
'''called on a unknown command'''
from samba_wildcard import run_named_build_task