summaryrefslogtreecommitdiff
path: root/buildtools/wafsamba/samba_bundled.py
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2010-10-06 15:23:58 +1100
committerAndrew Tridgell <tridge@samba.org>2010-10-06 05:06:42 +0000
commit1e267b03da3d00bac20b518e620a03faadee5005 (patch)
treec0cdea16ee07aa57bc0be20522acc02c3b671039 /buildtools/wafsamba/samba_bundled.py
parentee881c9d077bbd2a158bacc6676dcabf4f81ed34 (diff)
downloadsamba-1e267b03da3d00bac20b518e620a03faadee5005.tar.gz
samba-1e267b03da3d00bac20b518e620a03faadee5005.tar.bz2
samba-1e267b03da3d00bac20b518e620a03faadee5005.zip
waf: fixed the problem with com_err on Ubuntu 9.04
this changes CHECK_BUNDLED_SYSTEM() to honor the checkfunctions and headers options even for libraries found with pkgconfig. Autobuild-User: Andrew Tridgell <tridge@samba.org> Autobuild-Date: Wed Oct 6 05:06:42 UTC 2010 on sn-devel-104
Diffstat (limited to 'buildtools/wafsamba/samba_bundled.py')
-rw-r--r--buildtools/wafsamba/samba_bundled.py20
1 files changed, 14 insertions, 6 deletions
diff --git a/buildtools/wafsamba/samba_bundled.py b/buildtools/wafsamba/samba_bundled.py
index 27e5409b45..29b0a501c8 100644
--- a/buildtools/wafsamba/samba_bundled.py
+++ b/buildtools/wafsamba/samba_bundled.py
@@ -100,6 +100,15 @@ def CHECK_BUNDLED_SYSTEM(conf, libname, minversion='0.0.0',
if found in conf.env:
return conf.env[found]
+ def check_functions_headers():
+ '''helper function for CHECK_BUNDLED_SYSTEM'''
+ if checkfunctions is None:
+ return True
+ if require_headers and headers and not conf.CHECK_HEADERS(headers):
+ return False
+ return conf.CHECK_FUNCS_IN(checkfunctions, libname, headers=headers,
+ empty_decl=False, set_target=False)
+
# 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
@@ -116,22 +125,21 @@ def CHECK_BUNDLED_SYSTEM(conf, libname, minversion='0.0.0',
minversion = minimum_library_version(conf, libname, minversion)
# try pkgconfig first
- if conf.check_cfg(package=libname,
+ if (conf.check_cfg(package=libname,
args='"%s >= %s" --cflags --libs' % (libname, minversion),
- msg='Checking for system %s >= %s' % (libname, minversion)):
+ msg='Checking for system %s >= %s' % (libname, minversion)) and
+ check_functions_headers()):
conf.SET_TARGET_TYPE(libname, 'SYSLIB')
conf.env[found] = True
if implied_deps:
conf.SET_SYSLIB_DEPS(libname, implied_deps)
return True
if checkfunctions is not None:
- 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):
+ if check_functions_headers():
conf.env[found] = True
if implied_deps:
conf.SET_SYSLIB_DEPS(libname, implied_deps)
+ conf.SET_TARGET_TYPE(libname, 'SYSLIB')
return True
conf.env[found] = False
if not conf.LIB_MAY_BE_BUNDLED(libname):