summaryrefslogtreecommitdiff
path: root/buildtools/wafsamba/samba_bundled.py
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2010-04-12 09:49:56 +1000
committerAndrew Tridgell <tridge@samba.org>2010-04-12 09:50:49 +1000
commitf8e527b088ab19aab5a36a70a45a1032ad338d45 (patch)
tree42429aa6325d70eb305dd012231f238d8fcf4ebe /buildtools/wafsamba/samba_bundled.py
parent2179c6a8f843d9db5860b6c91d154d288f28d741 (diff)
downloadsamba-f8e527b088ab19aab5a36a70a45a1032ad338d45.tar.gz
samba-f8e527b088ab19aab5a36a70a45a1032ad338d45.tar.bz2
samba-f8e527b088ab19aab5a36a70a45a1032ad338d45.zip
build: added --minimum-library-version configure option
this allows the packager to override the default choice of system library version
Diffstat (limited to 'buildtools/wafsamba/samba_bundled.py')
-rw-r--r--buildtools/wafsamba/samba_bundled.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/buildtools/wafsamba/samba_bundled.py b/buildtools/wafsamba/samba_bundled.py
index bab4143a9a..f87ff8027c 100644
--- a/buildtools/wafsamba/samba_bundled.py
+++ b/buildtools/wafsamba/samba_bundled.py
@@ -54,6 +54,22 @@ def BUNDLED_EXTENSION_DEFAULT(opt, extension, noextenion=''):
Options.Handler.BUNDLED_EXTENSION_DEFAULT = BUNDLED_EXTENSION_DEFAULT
+def minimum_library_version(conf, libname, default):
+ '''allow override of mininum system library version'''
+
+ minlist = Options.options.MINIMUM_LIBRARY_VERSION
+ if not minlist:
+ return default
+
+ for m in minlist.split(','):
+ a = m.split(':')
+ if len(a) != 2:
+ Logs.error("Bad syntax for --minimum-library-version of %s" % m)
+ sys.exit(1)
+ if a[0] == libname:
+ return a[1]
+ return default
+
@runonce
@conf
@@ -84,6 +100,8 @@ def CHECK_BUNDLED_SYSTEM(conf, libname, minversion='0.0.0',
conf.env[found] = False
return False
+ minversion = minimum_library_version(conf, libname, minversion)
+
# try pkgconfig first
if conf.check_cfg(package=libname,
args='"%s >= %s" --cflags --libs' % (libname, minversion),
@@ -107,3 +125,4 @@ def CHECK_BUNDLED_SYSTEM(conf, libname, minversion='0.0.0',
Logs.error('ERROR: System library %s of version %s not found, and bundling disabled' % (libname, minversion))
sys.exit(1)
return False
+