s4:torture - suppress printf "%llu" on uint64_t variables warnings
[kamenim/samba.git] / source4 / wscript
index 10c53a3d21ebdbe5c4911d818467616dc14ed9d5..cbc0bf49ac2d5e66caab3fe631344db4ba246502 100644 (file)
@@ -41,7 +41,7 @@ Options.default_prefix = '/usr/local/samba'
 
 
 def set_options(opt):
-    opt.BUILTIN_DEFAULT('replace')
+    opt.BUILTIN_DEFAULT('NONE')
     opt.PRIVATE_EXTENSION_DEFAULT('samba4')
     opt.RECURSE('../lib/replace')
     opt.RECURSE('dynconfig')
@@ -63,13 +63,6 @@ def set_options(opt):
 def configure(conf):
     version = load_version(have_git=True)
 
-    conf.DEFINE('PACKAGE_NAME', 'samba', quote=True)
-    conf.DEFINE('PACKAGE_STRING', 'Samba ' + version.STRING, quote=True)
-    conf.DEFINE('PACKAGE_TARNAME',  'samba', quote=True)
-    conf.DEFINE('PACKAGE_URL', "http://www.samba.org/", quote=True)
-    conf.DEFINE('PACKAGE_VERSION', version.STRING, quote=True)
-    conf.DEFINE('PACKAGE_BUGREPORT', 'http://bugzilla.samba.org/', quote=True)
-
     conf.DEFINE('CONFIG_H_IS_FROM_SAMBA', 1)
     conf.DEFINE('_SAMBA_BUILD_', version.MAJOR, add_to_cflags=True)
     conf.DEFINE('HAVE_CONFIG_H', 1, add_to_cflags=True)
@@ -93,6 +86,11 @@ def configure(conf):
     conf.check_python_version((2,4,2))
     conf.check_python_headers(mandatory=True)
 
+    if sys.platform == 'darwin' and not conf.env['HAVE_ENVIRON_DECL']:
+        if not conf.CHECK_SHLIB_W_PYTHON("Checking if -single_module is not needed"):
+            conf.env.append_value('shlib_LINKFLAGS', ['-single_module'])
+        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')
 
@@ -116,6 +114,10 @@ def configure(conf):
     conf.RECURSE('../pidl')
     conf.RECURSE('selftest')
 
+    # we don't want any libraries or modules to rely on runtime
+    # resolution of symbols
+    conf.ADD_LDFLAGS('-Wl,-no-undefined', testflags=True)
+
     # we don't want PYTHONDIR in config.h, as otherwise changing
     # --prefix causes a complete rebuild
     del(conf.env.defines['PYTHONDIR'])