diff options
Diffstat (limited to 'buildtools/wafsamba')
-rw-r--r-- | buildtools/wafsamba/samba_utils.py | 7 | ||||
-rw-r--r-- | buildtools/wafsamba/wscript | 17 |
2 files changed, 20 insertions, 4 deletions
diff --git a/buildtools/wafsamba/samba_utils.py b/buildtools/wafsamba/samba_utils.py index 2a06449a1a..95ad86e38e 100644 --- a/buildtools/wafsamba/samba_utils.py +++ b/buildtools/wafsamba/samba_utils.py @@ -66,9 +66,12 @@ def ADD_LD_LIBRARY_PATH(path): def install_rpath(bld): '''the rpath value for installation''' bld.env['RPATH'] = [] + ret = set() if bld.env.RPATH_ON_INSTALL: - return [bld.env.LIBDIR] - return [] + ret.add(bld.env.LIBDIR) + if bld.env.RPATH_ON_INSTALL_PRIVATE: + ret.add(bld.env.PRIVATELIBDIR) + return list(ret) def build_rpath(bld): diff --git a/buildtools/wafsamba/wscript b/buildtools/wafsamba/wscript index 7d8bb24414..78ccaa77f2 100644 --- a/buildtools/wafsamba/wscript +++ b/buildtools/wafsamba/wscript @@ -53,8 +53,11 @@ def set_options(opt): help=("Disable use of rpath for build binaries"), action="store_true", dest='disable_rpath_build', default=False) gr.add_option('--disable-rpath-install', - help=("Disable use of rpath for installed binaries"), + help=("Disable use of rpath for library path in installed files"), action="store_true", dest='disable_rpath_install', default=False) + gr.add_option('--disable-rpath-private-install', + help=("Disable use of rpath for private library path in installed files"), + action="store_true", dest='disable_rpath_private_install', default=False) gr.add_option('--nonshared-binary', help=("Disable use of shared libs for the listed binaries"), action="store", dest='NONSHARED_BINARIES', default='') @@ -65,7 +68,7 @@ def set_options(opt): opt.add_option('--with-privatelibdir', help=("private library directory [PREFIX/lib/samba4]"), - action="store", dest='PRIVATELIBDIR', default='${PREFIX}/lib/samba4') + action="store", dest='PRIVATELIBDIR', default=None) gr = opt.option_group('developer options') @@ -264,9 +267,19 @@ def configure(conf): conf.env.RPATH_ON_BUILD = not Options.options.disable_rpath_build conf.env.RPATH_ON_INSTALL = (conf.env.RPATH_ON_BUILD and not Options.options.disable_rpath_install) + if not conf.env.PRIVATELIBDIR: + conf.env.PRIVATELIBDIR = '${PREFIX}/lib/samba4' + conf.env.RPATH_ON_INSTALL_PRIVATE = ( + not Options.options.disable_rpath_private_install) else: conf.env.RPATH_ON_INSTALL = False conf.env.RPATH_ON_BUILD = False + conf.env.RPATH_ON_INSTALL_PRIVATE = False + if not conf.env.PRIVATELIBDIR: + # rpath is not possible so there is no sense in having a + # private library directory by default. + # the user can of course always override it. + conf.env.PRIVATELIBDIR = conf.env.LIBDIR # we should use the PIC options in waf instead # Some compilo didn't support -fPIC but just print a warning |