summaryrefslogtreecommitdiff
path: root/buildtools
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2010-03-30 22:06:32 +1100
committerAndrew Tridgell <tridge@samba.org>2010-04-06 20:27:18 +1000
commit178b0d178d55863dde29713230ae3af69452e58b (patch)
treecfa884744d02f81f19284f026ed5653e692b017b /buildtools
parentb498378c8fcb2f87f7cb296e4e81ac392b1e34ff (diff)
downloadsamba-178b0d178d55863dde29713230ae3af69452e58b.tar.gz
samba-178b0d178d55863dde29713230ae3af69452e58b.tar.bz2
samba-178b0d178d55863dde29713230ae3af69452e58b.zip
build: add require_headers option to CHECK_BUNDLED_SYSTEM()
Useful to ensure the package has usable headers
Diffstat (limited to 'buildtools')
-rw-r--r--buildtools/wafsamba/samba_bundled.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/buildtools/wafsamba/samba_bundled.py b/buildtools/wafsamba/samba_bundled.py
index 28116fcd69..34199381b3 100644
--- a/buildtools/wafsamba/samba_bundled.py
+++ b/buildtools/wafsamba/samba_bundled.py
@@ -47,7 +47,8 @@ Options.Handler.BUNDLED_EXTENSION_DEFAULT = BUNDLED_EXTENSION_DEFAULT
@conf
def CHECK_BUNDLED_SYSTEM(conf, libname, minversion='0.0.0',
checkfunctions=None, headers=None,
- onlyif=None, implied_deps=None):
+ onlyif=None, implied_deps=None,
+ require_headers=True):
'''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
@@ -81,7 +82,10 @@ def CHECK_BUNDLED_SYSTEM(conf, libname, minversion='0.0.0',
conf.SET_SYSLIB_DEPS(libname, implied_deps)
return True
if checkfunctions is not None:
- if conf.CHECK_FUNCS_IN(checkfunctions, libname, headers=headers, empty_decl=False):
+ headers_ok = True
+ if require_headers and headers and not conf.CHECK_HEADERS(headers):
+ headers_ok = False
+ if headers_ok and conf.CHECK_FUNCS_IN(checkfunctions, libname, headers=headers, empty_decl=False):
conf.env[found] = True
if implied_deps:
conf.SET_SYSLIB_DEPS(libname, implied_deps)