- allow the library version to be overriden

Index: buildtools/wafsamba/wafsamba.py
--- buildtools/wafsamba/wafsamba.py.orig
+++ buildtools/wafsamba/wafsamba.py
@@ -211,6 +211,16 @@ def SAMBA_LIBRARY(bld, libname, source,
     realname = bld.map_shlib_extension(realname, python=(target_type=='PYTHON'))
     link_name = bld.map_shlib_extension(link_name, python=(target_type=='PYTHON'))
 
+    if vnum is not None:
+        looking_for = 'LIB' + libname.replace('-', '_').replace('.', '_') + '_VERSION'
+        osvnum = os.getenv(looking_for)
+        if osvnum:
+            print("Setup-specific version for library %s: %s" % (libname, osvnum))
+            vnum = osvnum
+        else:
+            print("Could not find override for", looking_for)
+            os.system('env')
+
     # we don't want any public libraries without version numbers
     if (not private_library and target_type != 'PYTHON' and not realname):
         if vnum is None and soname is None:
