From 69d5c64b0b105f97651d9554296e58d17d63c978 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Tue, 28 Mar 2017 15:28:21 +0200 Subject: [PATCH] wafsamba: move -L/some/path from LINKFLAGS_PYEMBED to LIBPATH_PYEMBED LINKFLAGS should not have path components. This fixes the build on systems like FreeBSD where python is located in /usr/local/lib. BUG: https://bugzilla.samba.org/show_bug.cgi?id=12724 Signed-off-by: Stefan Metzmacher --- buildtools/wafsamba/samba_python.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/buildtools/wafsamba/samba_python.py b/buildtools/wafsamba/samba_python.py index 057a017..271c180 100644 --- a/buildtools/wafsamba/samba_python.py +++ b/buildtools/wafsamba/samba_python.py @@ -76,6 +76,12 @@ def _check_python_headers(conf, mandatory): else: conf.env['PYTHON_SO_ABI_FLAG'] = '' + for lib in conf.env['LINKFLAGS_PYEMBED']: + if lib.startswith('-L'): + conf.env.append_value('LIBPATH_PYEMBED', lib[2:]) # strip '-L' + conf.env['LINKFLAGS_PYEMBED'].remove(lib) + + return def SAMBA_PYTHON(bld, name, source='', -- 1.9.1