From 87337383572324e3d1d00ed710614ebe217aa2b2 Mon Sep 17 00:00:00 2001 From: Matthieu Patou Date: Fri, 10 Dec 2010 01:42:32 +0300 Subject: build: introduce SAMBA_CHECK_PYTHON_HEADERS This function is a wrapper around waf's check_python_header. It avoids searching more than once for the headers bringing a small speed improvement and a better lisibility of the logs. But it's mainly to avoid a nasty bug when python libraries are in path pointed by python_LIBPL (ie. /usr/local/lib/python2.6/config/) instead of python_LIBDIR (ie. /usr/local/lib). On the first call waf will correctly find that in order to link with python libs it needs to add -L$python_LIBPL. But on the next calls of check_python_headers, waf will use both the current library path value (ie. -L/usr/local/lib/python2.6/config) and -L$python_LIBDIR (ie. /usr/local/lib/) which will make him beleive that python libraries are in $python_LIBDIR which at the end will make the final link test fails in check_python_headers as it will not use the good directory. So by avoiding calling check_python_headers more than once we avoid making waf fooling itself. --- lib/talloc/wscript | 2 +- lib/tdb/wscript | 2 +- lib/tevent/wscript | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'lib') diff --git a/lib/talloc/wscript b/lib/talloc/wscript index 6316abafd8..49eac6e6e6 100644 --- a/lib/talloc/wscript +++ b/lib/talloc/wscript @@ -59,7 +59,7 @@ def configure(conf): # also disable if we don't have the python libs installed conf.check_tool('python') conf.check_python_version((2,4,2)) - conf.check_python_headers(mandatory=False) + conf.SAMBA_CHECK_PYTHON_HEADERS(mandatory=False) if not conf.env.HAVE_PYTHON_H: Logs.warn('Disabling pytalloc-util as python devel libs not found') conf.env.disable_python = True diff --git a/lib/tdb/wscript b/lib/tdb/wscript index fadd24f60f..f00d119c9b 100644 --- a/lib/tdb/wscript +++ b/lib/tdb/wscript @@ -47,7 +47,7 @@ def configure(conf): # also disable if we don't have the python libs installed conf.check_tool('python') conf.check_python_version((2,4,2)) - conf.check_python_headers(mandatory=False) + conf.SAMBA_CHECK_PYTHON_HEADERS(mandatory=False) if not conf.env.HAVE_PYTHON_H: Logs.warn('Disabling pytdb as python devel libs not found') conf.env.disable_python = True diff --git a/lib/tevent/wscript b/lib/tevent/wscript index 14c4c60319..58ef87e1ab 100644 --- a/lib/tevent/wscript +++ b/lib/tevent/wscript @@ -48,7 +48,7 @@ def configure(conf): # also disable if we don't have the python libs installed conf.check_tool('python') conf.check_python_version((2,4,2)) - conf.check_python_headers(mandatory=False) + conf.SAMBA_CHECK_PYTHON_HEADERS(mandatory=False) if not conf.env.HAVE_PYTHON_H: Logs.warn('Disabling pytevent as python devel libs not found') conf.env.disable_python = True -- cgit