summaryrefslogtreecommitdiff
path: root/buildtools/wafsamba/samba_bundled.py
diff options
context:
space:
mode:
Diffstat (limited to 'buildtools/wafsamba/samba_bundled.py')
-rw-r--r--buildtools/wafsamba/samba_bundled.py28
1 files changed, 28 insertions, 0 deletions
diff --git a/buildtools/wafsamba/samba_bundled.py b/buildtools/wafsamba/samba_bundled.py
new file mode 100644
index 0000000000..75317d97ba
--- /dev/null
+++ b/buildtools/wafsamba/samba_bundled.py
@@ -0,0 +1,28 @@
+# functions to support bundled libraries
+
+from Configure import conf
+from samba_utils import *
+
+@conf
+def BUNDLED_LIBRARY_EXTENSION(conf, extension):
+ '''set extension to add to bundled libraries'''
+ if not 'BUNDLED_EXTENSION' in conf.env:
+ conf.env.BUNDLED_EXTENSION = extension
+
+def BUNDLED_NAME(bld, name, bundled_extension):
+ '''possibly rename a library to include a bundled extension'''
+ if bld.env.DISABLE_SHARED:
+ return name
+ if bundled_extension and 'BUNDLED_EXTENSION' in bld.env:
+ return name + '-' + bld.env.BUNDLED_EXTENSION
+ return name
+
+
+def BUILTIN_LIBRARY(bld, name):
+ '''return True if a library should be builtin
+ instead of being built as a shared lib'''
+ if bld.env.DISABLE_SHARED:
+ return True
+ if name in bld.env.BUILTIN_LIBRARIES:
+ return True
+ return False