diff options
author | Günther Deschner <gd@samba.org> | 2011-06-28 11:31:02 +0200 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2011-06-28 17:54:41 +0200 |
commit | 56db9c9f274d414ad435bd7cd3f522f11257458e (patch) | |
tree | 95115bc8ec947df3bb0c81e43445ab1c8f265821 /source3/wscript | |
parent | 8bc3f957bc098ee9310b468ce463a75090873bc6 (diff) | |
download | samba-56db9c9f274d414ad435bd7cd3f522f11257458e.tar.gz samba-56db9c9f274d414ad435bd7cd3f522f11257458e.tar.bz2 samba-56db9c9f274d414ad435bd7cd3f522f11257458e.zip |
s3-waf: remove s3-waf specific dynconfig.
This merge finally makes --with-logfilebase=foo and friends work appropriately.
Andrews, Andreas, please check.
Guenther
Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Tue Jun 28 17:54:42 CEST 2011 on sn-devel-104
Diffstat (limited to 'source3/wscript')
-rw-r--r-- | source3/wscript | 34 |
1 files changed, 31 insertions, 3 deletions
diff --git a/source3/wscript b/source3/wscript index d88faa2104..be011af232 100644 --- a/source3/wscript +++ b/source3/wscript @@ -15,12 +15,14 @@ import build.charset import samba_utils, samba_version import samba3 +Options.default_prefix = '/usr/local/samba' + def set_options(opt): if not os.getenv('TOPLEVEL_BUILD'): opt.BUILTIN_DEFAULT('NONE') opt.PRIVATE_EXTENSION_DEFAULT('s3') opt.RECURSE('../lib/replace') - opt.RECURSE('build') + opt.RECURSE('../dynconfig') opt.RECURSE('selftest') opt.RECURSE('../lib/nss_wrapper') opt.RECURSE('../lib/socket_wrapper') @@ -90,8 +92,29 @@ def configure(conf): conf.env['build_swat'] = True if not conf.env.toplevel_build: + conf.RECURSE('../lib/replace') - conf.RECURSE('build') + + conf.find_program('python', var='PYTHON', mandatory=True) + conf.find_program('perl', var='PERL', mandatory=True) + conf.find_program('xsltproc', var='XSLTPROC') + + # enable tool to build python extensions + conf.check_tool('python') + conf.check_python_version((2,4,2)) + conf.SAMBA_CHECK_PYTHON_HEADERS(mandatory=True) + + if sys.platform == 'darwin' and not conf.env['HAVE_ENVIRON_DECL']: + # Mac OSX needs to have this and it's also needed that the python is compiled with this + # otherwise you face errors about common symbols + if not conf.CHECK_SHLIB_W_PYTHON("Checking if -fno-common is needed"): + conf.ADD_CFLAGS('-fno-common') + if not conf.CHECK_SHLIB_W_PYTHON("Checking if -undefined dynamic_lookup is not need"): + conf.env.append_value('shlib_LINKFLAGS', ['-undefined', 'dynamic_lookup']) + if int(conf.env['PYTHON_VERSION'][0]) >= 3: + raise Utils.WafError('Python version 3.x is not supported by Samba yet') + + conf.RECURSE('../dynconfig') conf.RECURSE('../lib/ccan') conf.RECURSE('../lib/tdb_compat') conf.RECURSE('../lib/talloc') @@ -308,7 +331,6 @@ utimensat vsyslog _write __write __xstat # FIXME: these should be tests for features, but the old build system just # checks for OSes. - import sys host_os = sys.platform Logs.info("building on %s" % host_os) @@ -1795,6 +1817,12 @@ main() { conf.DEFINE('%s_init' % entry, 'init_samba_module') conf.env[shared_env].append('%s' % entry) + if not os.getenv('TOPLEVEL_BUILD'): + # we don't want PYTHONDIR in config.h, as otherwise changing + # --prefix causes a complete rebuild + del(conf.env.defines['PYTHONDIR']) + del(conf.env.defines['PYTHONARCHDIR']) + conf.SAMBA_CONFIG_H('include/config.h') def ctags(ctx): |