diff options
author | Andrew Tridgell <tridge@samba.org> | 2010-03-29 00:08:38 +1100 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2010-04-06 20:27:15 +1000 |
commit | a2b4d7e8ebf24bc65cceb38bf23d8d8dc3307d27 (patch) | |
tree | b9163b6b00ae6ca067d3fa592c603a06a12b90d8 /buildtools/wafsamba | |
parent | 71322481643878151553dee80fa2ab3de3f9e34f (diff) | |
download | samba-a2b4d7e8ebf24bc65cceb38bf23d8d8dc3307d27.tar.gz samba-a2b4d7e8ebf24bc65cceb38bf23d8d8dc3307d27.tar.bz2 samba-a2b4d7e8ebf24bc65cceb38bf23d8d8dc3307d27.zip |
s4-waf: ensure we don't end up with mixed versions of talloc/tdb/tevent
Diffstat (limited to 'buildtools/wafsamba')
-rw-r--r-- | buildtools/wafsamba/samba_bundled.py | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/buildtools/wafsamba/samba_bundled.py b/buildtools/wafsamba/samba_bundled.py index 47c6a836d6..b2d1b0ef14 100644 --- a/buildtools/wafsamba/samba_bundled.py +++ b/buildtools/wafsamba/samba_bundled.py @@ -46,7 +46,7 @@ Options.Handler.BUNDLED_EXTENSION_DEFAULT = BUNDLED_EXTENSION_DEFAULT @runonce @conf def CHECK_BUNDLED_SYSTEM(conf, libname, minversion='0.0.0', - checkfunctions=None, headers=None): + checkfunctions=None, headers=None, onlyif=None): '''check if a library is available as a system library. this first tries via pkg-config, then if that fails tries by testing for a specified function in the specified lib @@ -56,6 +56,20 @@ def CHECK_BUNDLED_SYSTEM(conf, libname, minversion='0.0.0', found = 'FOUND_SYSTEMLIB_%s' % libname if found in conf.env: return conf.env[found] + + # see if the library should only use a system version if another dependent + # system version is found. That prevents possible use of mixed library + # versions + if onlyif: + for syslib in TO_LIST(onlyif): + f = 'FOUND_SYSTEM_%s' % syslib + if not f in conf.env: + if 'NONE' in conf.env.BUNDLED_LIBS or '!'+libname in conf.env.BUNDLED_LIBS: + print('ERROR: Use of system library %s depends on missing system library %s' % (libname, syslib)) + sys.exit(1) + conf.env[found] = False + return False + # try pkgconfig first if conf.check_cfg(package=libname, args='"%s >= %s" --cflags --libs' % (libname, minversion), |