diff options
author | Stefan Metzmacher <metze@samba.org> | 2014-03-14 09:52:51 +0100 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2014-04-02 09:03:41 +0200 |
commit | 4dea4e310dfa0718fcd0d118fc97880f38714b36 (patch) | |
tree | a5399f4b7b67a641f2d30f61dfa6b60ac4579174 /buildtools/wafsamba | |
parent | d88f41f69865898dd814bb4dd3c46b9d153d1375 (diff) | |
download | samba-4dea4e310dfa0718fcd0d118fc97880f38714b36.tar.gz samba-4dea4e310dfa0718fcd0d118fc97880f38714b36.tar.xz samba-4dea4e310dfa0718fcd0d118fc97880f38714b36.zip |
wafsamba: port optional 'pkg' option from CHECK_BUNDLED_SYSTEM_PKG() to CHECK_BUNDLED_SYSTEM()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'buildtools/wafsamba')
-rw-r--r-- | buildtools/wafsamba/samba_bundled.py | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/buildtools/wafsamba/samba_bundled.py b/buildtools/wafsamba/samba_bundled.py index afcf708e10..65dd52d191 100644 --- a/buildtools/wafsamba/samba_bundled.py +++ b/buildtools/wafsamba/samba_bundled.py @@ -149,7 +149,7 @@ def CHECK_BUNDLED_SYSTEM_PKG(conf, libname, minversion='0.0.0', def CHECK_BUNDLED_SYSTEM(conf, libname, minversion='0.0.0', checkfunctions=None, headers=None, onlyif=None, implied_deps=None, - require_headers=True): + require_headers=True, pkg=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 @@ -187,10 +187,14 @@ def CHECK_BUNDLED_SYSTEM(conf, libname, minversion='0.0.0', if minversion != '0.0.0': msg += ' >= %s' % minversion + uselib_store=libname.upper() + if pkg is None: + pkg = libname + # try pkgconfig first - if (conf.check_cfg(package=libname, - args='"%s >= %s" --cflags --libs' % (libname, minversion), - msg=msg) and + if (conf.check_cfg(package=pkg, + args='"%s >= %s" --cflags --libs' % (pkg, minversion), + msg=msg, uselib_store=uselib_store) and check_functions_headers()): conf.SET_TARGET_TYPE(libname, 'SYSLIB') conf.env[found] = True |