s3-param Put &Globals in the FN_ macros, rather than in each entry
[gd/samba-autobuild/.git] / wscript
diff --git a/wscript b/wscript
index d7c274482268169c968eafac73221a919fe60029..52d0ea4f446acea9df62ec07d28d036cd9337b53 100755 (executable)
--- a/wscript
+++ b/wscript
@@ -34,7 +34,7 @@ def set_options(opt):
     opt.RECURSE('lib/replace')
     opt.RECURSE('source4/dynconfig')
     opt.RECURSE('source4/lib/ldb')
-    opt.RECURSE('source4/selftest')
+    opt.RECURSE('selftest')
     opt.RECURSE('source4/lib/tls')
     opt.RECURSE('lib/nss_wrapper')
     opt.RECURSE('lib/socket_wrapper')
@@ -47,10 +47,6 @@ def set_options(opt):
                    help='enable special build farm options',
                    action='store_true', dest='BUILD_FARM')
 
-    gr.add_option('--enable-s3build',
-                   help='enable build of s3 binaries',
-                   action='store_true', dest='S3BUILD')
-
     opt.tool_options('python') # options for disabling pyc or pyo compilation
     # enable options related to building python extensions
 
@@ -60,19 +56,17 @@ def configure(conf):
     version = samba_version.load_version(env=conf.env)
 
     conf.DEFINE('CONFIG_H_IS_FROM_SAMBA', 1)
+    conf.DEFINE('_SAMBA_WAF_BUILD_', version.MAJOR)
     conf.DEFINE('_SAMBA_BUILD_', version.MAJOR, add_to_cflags=True)
     conf.DEFINE('HAVE_CONFIG_H', 1, add_to_cflags=True)
 
     if Options.options.developer:
         conf.ADD_CFLAGS('-DDEVELOPER -DDEBUG_PASSWORD')
 
-    if Options.options.S3BUILD:
-        conf.env.enable_s3build = True
-
     # this enables smbtorture.static for s3 in the build farm
     conf.env.BUILD_FARM = Options.options.BUILD_FARM or os.environ.get('RUN_FROM_BUILD_FARM')
 
-    conf.ADD_EXTRA_INCLUDES('#include/public #source4 #lib #source4/lib #source4/include #include')
+    conf.ADD_EXTRA_INCLUDES('#include/public #source4 #lib #source4/lib #source4/include #include #lib/replace')
 
     conf.RECURSE('lib/replace')
 
@@ -101,6 +95,7 @@ def configure(conf):
     conf.RECURSE('source4/lib/tls')
     conf.RECURSE('source4/ntvfs/sysdep')
     conf.RECURSE('lib/util')
+    conf.RECURSE('lib/ccan')
     conf.RECURSE('lib/zlib')
     conf.RECURSE('lib/util/charset')
     conf.RECURSE('source4/auth')
@@ -112,15 +107,19 @@ def configure(conf):
     conf.RECURSE('lib/subunit/c')
     conf.RECURSE('libcli/smbreadline')
     conf.RECURSE('pidl')
-    conf.RECURSE('source4/selftest')
-    if conf.env.enable_s3build:
-        conf.RECURSE('source3')
+    conf.RECURSE('selftest')
+    conf.RECURSE('source3')
 
     # we don't want any libraries or modules to rely on runtime
     # resolution of symbols
     if sys.platform != "openbsd4":
         conf.env.undefined_ldflags = conf.ADD_LDFLAGS('-Wl,-no-undefined', testflags=True)
 
+    if sys.platform != "openbsd4" and conf.env.undefined_ignore_ldflags == []:
+        if conf.CHECK_LDFLAGS(['-undefined', 'dynamic_lookup']):
+            conf.env.undefined_ignore_ldflags = ['-undefined', 'dynamic_lookup']
+
+
     # gentoo always adds this. We want our normal build to be as
     # strict as the strictest OS we support, so adding this here
     # allows us to find problems on our development hosts faster.
@@ -159,7 +158,7 @@ def ctags(ctx):
 # of commands in --help
 def build(bld):
     '''build all targets'''
-    samba_version.load_version(env=bld.env)
+    samba_version.load_version(env=bld.env, is_install=bld.is_install)
     pass