summaryrefslogtreecommitdiff
path: root/buildtools/wafsamba
diff options
context:
space:
mode:
authorMatthieu Patou <mat@matws.net>2010-10-30 16:50:33 +0400
committerMatthieu Patou <mat@samba.org>2010-10-30 13:45:18 +0000
commit33b276c2f16c4ec70cf392e850558cfd6703d7e6 (patch)
tree3bba2ed6bace4a3ee973d3f49d960c1c39e08f75 /buildtools/wafsamba
parent23b58804ba8ab2bb190758df283eacf3ec5d8787 (diff)
downloadsamba-33b276c2f16c4ec70cf392e850558cfd6703d7e6.tar.gz
samba-33b276c2f16c4ec70cf392e850558cfd6703d7e6.tar.bz2
samba-33b276c2f16c4ec70cf392e850558cfd6703d7e6.zip
build: set shared libraries flags correctly on mac os X
Diffstat (limited to 'buildtools/wafsamba')
-rw-r--r--buildtools/wafsamba/samba_conftests.py21
-rw-r--r--buildtools/wafsamba/wscript2
2 files changed, 21 insertions, 2 deletions
diff --git a/buildtools/wafsamba/samba_conftests.py b/buildtools/wafsamba/samba_conftests.py
index 8a57d20baa..49cd4ff17c 100644
--- a/buildtools/wafsamba/samba_conftests.py
+++ b/buildtools/wafsamba/samba_conftests.py
@@ -93,6 +93,27 @@ def find_config_dir(conf):
conf.fatal('cannot use the configuration test folder %r' % dir)
return dir
+@conf
+def CHECK_SHLIB_W_PYTHON(conf, msg):
+ '''check if we need -undefined dynamic_lookup'''
+
+ dir = find_config_dir(conf)
+
+ env = conf.env
+
+ snip = '''
+#include <Python.h>
+#include <crt_externs.h>
+#define environ (*_NSGetEnviron())
+
+static PyObject *ldb_module = NULL;
+int foo(int v) {
+ extern char **environ;
+ environ[0] = 1;
+ ldb_module = PyImport_ImportModule("ldb");
+ return v * 2;
+}'''
+ return conf.check(features='cc cshlib',uselib='PYEMBED',fragment=snip,msg=msg)
# this one is quite complex, and should probably be broken up
# into several parts. I'd quite like to create a set of CHECK_COMPOUND()
diff --git a/buildtools/wafsamba/wscript b/buildtools/wafsamba/wscript
index 49f1cf4604..90aeb45582 100644
--- a/buildtools/wafsamba/wscript
+++ b/buildtools/wafsamba/wscript
@@ -275,8 +275,6 @@ def configure(conf):
else:
conf.ADD_CFLAGS('-fPIC', testflags=True)
- if sys.platform == 'darwin':
- conf.ADD_LDFLAGS('-fno-common', testflags=True)
conf.CHECK_INLINE()
# check for pkgconfig