[SCM] Samba Shared Repository - branch master updated
Matthieu Patou
mat at samba.org
Thu Dec 9 17:27:02 MST 2010
The branch, master has been updated
via 21b0d5e pidl: use $CC -E if $CPP is not defined, if both undefined use cpp
via 301d59c build: use CPP and CC values when calling pidl
via 8733738 build: introduce SAMBA_CHECK_PYTHON_HEADERS
via 672c48b build: finishing fixing broken libiconv on hpux
from 1f2518d s4 libcli: Add libcli_echo lib and torture test
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 21b0d5e3b10711e6ce3bfad0c1ee2da09a60e232
Author: Matthieu Patou <mat at matws.net>
Date: Fri Dec 10 02:03:40 2010 +0300
pidl: use $CC -E if $CPP is not defined, if both undefined use cpp
Autobuild-User: Matthieu Patou <mat at samba.org>
Autobuild-Date: Fri Dec 10 01:26:44 CET 2010 on sn-devel-104
commit 301d59caf2ee6f49e108b748b0e38221dec9bb96
Author: Matthieu Patou <mat at matws.net>
Date: Fri Dec 10 02:36:24 2010 +0300
build: use CPP and CC values when calling pidl
commit 87337383572324e3d1d00ed710614ebe217aa2b2
Author: Matthieu Patou <mat at matws.net>
Date: Fri Dec 10 01:42:32 2010 +0300
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.
commit 672c48b763ce3d53dc93cce1c73f3f1ced1147e8
Author: Matthieu Patou <mat at matws.net>
Date: Thu Dec 9 23:31:16 2010 +0300
build: finishing fixing broken libiconv on hpux
-----------------------------------------------------------------------
Summary of changes:
buildtools/wafsamba/samba_autoconf.py | 9 +++++++++
buildtools/wafsamba/samba_pidl.py | 11 ++++++++++-
buildtools/wafsamba/samba_python.py | 9 +++++++++
lib/talloc/wscript | 2 +-
lib/tdb/wscript | 2 +-
lib/tevent/wscript | 2 +-
lib/util/charset/wscript_configure | 2 ++
pidl/lib/Parse/Pidl/IDL.pm | 10 ++++++++--
source4/wscript | 2 +-
9 files changed, 42 insertions(+), 7 deletions(-)
Changeset truncated at 500 lines:
diff --git a/buildtools/wafsamba/samba_autoconf.py b/buildtools/wafsamba/samba_autoconf.py
index b6d0b35..1babe7b 100644
--- a/buildtools/wafsamba/samba_autoconf.py
+++ b/buildtools/wafsamba/samba_autoconf.py
@@ -448,10 +448,19 @@ def CHECK_LDFLAGS(conf, ldflags):
@conf
+def CONFIG_GET(conf, option):
+ '''return True if a configuration option was found'''
+ if (option in conf.env):
+ return conf.env[option]
+ else:
+ return None
+
+ at conf
def CONFIG_SET(conf, option):
'''return True if a configuration option was found'''
return (option in conf.env) and (conf.env[option] != ())
Build.BuildContext.CONFIG_SET = CONFIG_SET
+Build.BuildContext.CONFIG_GET = CONFIG_GET
def library_flags(conf, libs):
diff --git a/buildtools/wafsamba/samba_pidl.py b/buildtools/wafsamba/samba_pidl.py
index 902d4c6..6476211 100644
--- a/buildtools/wafsamba/samba_pidl.py
+++ b/buildtools/wafsamba/samba_pidl.py
@@ -58,7 +58,16 @@ def SAMBA_PIDL(bld, pname, source,
pidl_src_nodes = bld.pidl_files_cache
# the cd .. is needed because pidl currently is sensitive to the directory it is run in
- t = bld(rule='cd .. && ${PERL} "${PIDL}" --quiet ${OPTIONS} --outputdir ${OUTPUTDIR} -- "${SRC[0].abspath(env)}"',
+ cpp = ""
+ cc = ""
+ if bld.CONFIG_SET("CPP"):
+ cpp = "CPP=%s" % bld.CONFIG_GET("CPP")
+ if bld.CONFIG_SET("CC"):
+ if isinstance(bld.CONFIG_GET("CC"), list):
+ cc = "CC=%s" % bld.CONFIG_GET("CC")[0]
+ else:
+ cc = "CC=%s" % bld.CONFIG_GET("CC")
+ t = bld(rule='cd .. && %s %s ${PERL} "${PIDL}" --quiet ${OPTIONS} --outputdir ${OUTPUTDIR} -- "${SRC[0].abspath(env)}"' % (cpp, cc),
ext_out = '.c',
before = 'cc',
on_results = True,
diff --git a/buildtools/wafsamba/samba_python.py b/buildtools/wafsamba/samba_python.py
index ad09981..a663b19 100644
--- a/buildtools/wafsamba/samba_python.py
+++ b/buildtools/wafsamba/samba_python.py
@@ -4,6 +4,15 @@ import Build
from samba_utils import *
from samba_autoconf import *
+from Configure import conf
+ at conf
+def SAMBA_CHECK_PYTHON_HEADERS(conf, mandatory=True):
+ if conf.env["python_headers_checked"] == []:
+ conf.check_python_headers(mandatory)
+ conf.env["python_headers_checked"] = "yes"
+ else:
+ conf.msg("python headers", "using cache")
+
def SAMBA_PYTHON(bld, name,
source='',
diff --git a/lib/talloc/wscript b/lib/talloc/wscript
index 6316aba..49eac6e 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 fadd24f..f00d119 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 14c4c60..58ef87e 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
diff --git a/lib/util/charset/wscript_configure b/lib/util/charset/wscript_configure
index 346d585..e38f22b 100644
--- a/lib/util/charset/wscript_configure
+++ b/lib/util/charset/wscript_configure
@@ -15,5 +15,7 @@ if (conf.CHECK_FUNCS_IN('iconv_open', 'iconv', checklibc=False, headers='iconv.h
if conf.env['HAVE_LIBICONV']:
if conf.CHECK_FUNCS('mbrtowc', headers='wchar.h'):
conf.DEFINE('HAVE_NATIVE_ICONV', 1)
+ elif conf.env.get['LIB_ICONV']:
+ del conf.env['LIB_ICONV']
else:
conf.DEFINE('HAVE_NATIVE_ICONV', 1)
diff --git a/pidl/lib/Parse/Pidl/IDL.pm b/pidl/lib/Parse/Pidl/IDL.pm
index de605c7..bafa2ce 100644
--- a/pidl/lib/Parse/Pidl/IDL.pm
+++ b/pidl/lib/Parse/Pidl/IDL.pm
@@ -2619,11 +2619,17 @@ sub parse_file($$)
my $saved_delim = $/;
undef $/;
my $cpp = $ENV{CPP};
+ my $options = "";
if (! defined $cpp) {
- $cpp = "cpp";
+ if (defined $ENV{CC}) {
+ $cpp = "$ENV{CC}";
+ $options = "-E";
+ } else {
+ $cpp = "cpp";
+ }
}
my $includes = join('',map { " -I$_" } @$incdirs);
- my $data = `$cpp -D__PIDL__$includes -xc "$filename"`;
+ my $data = `$cpp $options -D__PIDL__$includes -xc "$filename"`;
$/ = $saved_delim;
return parse_string($data, $filename);
diff --git a/source4/wscript b/source4/wscript
index dabca7f..fb04919 100644
--- a/source4/wscript
+++ b/source4/wscript
@@ -74,7 +74,7 @@ def configure(conf):
# enable tool to build python extensions
conf.check_tool('python')
conf.check_python_version((2,4,2))
- conf.check_python_headers(mandatory=True)
+ conf.SAMBA_CHECK_PYTHON_HEADERS(mandatory=True)
if sys.platform == 'darwin' and not conf.env['HAVE_ENVIRON_DECL']:
# Mac OSX needs to have this and it's also needed that the python is compiled with this
--
Samba Shared Repository
More information about the samba-cvs
mailing list