Add --with-privatelibdir build option.
authorJelmer Vernooij <jelmer@samba.org>
Thu, 4 Nov 2010 22:23:39 +0000 (23:23 +0100)
committerJelmer Vernooij <jelmer@samba.org>
Fri, 5 Nov 2010 02:06:05 +0000 (02:06 +0000)
buildtools/wafsamba/samba_install.py
buildtools/wafsamba/wscript

index 0d43236d97464fc26c39313a39cbd324fe16d5c5..8b9a308a2c35e66a6a78e96406800d6047990de2 100644 (file)
@@ -64,7 +64,12 @@ def install_library(self):
         return
 
     # setup the install path, expanding variables
-    install_path = getattr(self, 'samba_inst_path', None) or '${LIBDIR}'
+    install_path = getattr(self, 'samba_inst_path', None)
+    if install_path is None:
+        if getattr(self, 'private_library', False):
+            install_path = '${PRIVATELIBDIR}'
+        else:
+            install_path = '${LIBDIR}'
     install_path = bld.EXPAND_VARIABLES(install_path)
 
     if install_ldflags != build_ldflags:
index b9b06abfe8afdf2865d58c92ea23354353543c42..7d8bb2441423c9ad8abaf9f87fe0803f72998b75 100644 (file)
@@ -63,6 +63,10 @@ def set_options(opt):
                    help=("modules directory [PREFIX/modules]"),
                    action="store", dest='MODULESDIR', default='${PREFIX}/modules')
 
+    opt.add_option('--with-privatelibdir',
+                   help=("private library directory [PREFIX/lib/samba4]"),
+                   action="store", dest='PRIVATELIBDIR', default='${PREFIX}/lib/samba4')
+
     gr = opt.option_group('developer options')
 
     gr.add_option('-C',
@@ -201,6 +205,7 @@ def configure(conf):
     conf.env.BINDIR = Options.options.BINDIR or '${PREFIX}/bin'
     conf.env.SBINDIR = Options.options.SBINDIR or '${PREFIX}/sbin'
     conf.env.MODULESDIR = Options.options.MODULESDIR
+    conf.env.PRIVATELIBDIR = Options.options.PRIVATELIBDIR
     conf.env.BUNDLED_LIBS = Options.options.BUNDLED_LIBS.split(',')
     conf.env.BUILTIN_LIBRARIES = Options.options.BUILTIN_LIBRARIES.split(',')
     conf.env.DISABLE_SHARED = Options.options.disable_shared