s3:waf: add cluster support / ctdb checks.
authorMichael Adam <obnox@samba.org>
Sat, 2 Apr 2011 00:20:49 +0000 (02:20 +0200)
committerMichael Adam <obnox@samba.org>
Sat, 2 Apr 2011 06:59:35 +0000 (08:59 +0200)
commitceea108f6dd1dca0f14785c2178996cc26e1d644
tree301a29b2db8b5f3684695e6db304f7b2ac072c49
parent06efe32e441274574a4f00fff78832c50df9a236
s3:waf: add cluster support / ctdb checks.

The checks are roughtly taken from the autoconf ctdb checks.

I was not able to implement checks with CHECK_DECL, CHECK_TYPE,
CHECK_HEADER and friends, because the ctdb headers seem to need too
special a setup of includes and defines in order to compile.
So I used CHECK_CODE() in all checks.

In the long run, this should be changed.

I supported a --with-ctdb-dir options to allow for building
against a ctdb that is not installed into /usr (e.g. against
a local git checkout). In order to implement this, I had to
hand includes in to the CHECK_CODE function.
Here I found a problem with CHECK_CODE (or even the core waf
conf.check() function: The CHECK_CODE function does not
expand the includes it gets (i.e. '#' is not expanded to the
base dir, and relative paths are left relative). But the core
check() function seems to ignore all include paths that are
not absolute paths. Hence in particular the usual default '# .'
for the includes is useless. So I preprocessed the list of includes
for the cluster checks. But I assume that it would be useful
to move this expansion into CHECK_CODE or even into the core
waf check function.

Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Sat Apr  2 03:26:55 CEST 2011 on sn-devel-104
source3/wscript