diff options
author | Andrew Tridgell <tridge@samba.org> | 2010-03-20 23:41:15 +1100 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2010-04-06 20:26:58 +1000 |
commit | dc9010572c1d32a4e1c82afbee2a359c429cc9aa (patch) | |
tree | bef5d94aba307ca55c9768f8d6af2f35d7f2bb35 /buildtools/wafsamba/samba_utils.py | |
parent | 9a2ea72d2d1affa853a70131301de96f258178a8 (diff) | |
download | samba-dc9010572c1d32a4e1c82afbee2a359c429cc9aa.tar.gz |
build: support systems without rpath
Diffstat (limited to 'buildtools/wafsamba/samba_utils.py')
-rw-r--r-- | buildtools/wafsamba/samba_utils.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/buildtools/wafsamba/samba_utils.py b/buildtools/wafsamba/samba_utils.py index 9893a86c300..564b5b82e31 100644 --- a/buildtools/wafsamba/samba_utils.py +++ b/buildtools/wafsamba/samba_utils.py @@ -62,13 +62,16 @@ def runonce(function): def set_rpath(bld): '''setup the default rpath''' - rpath = os.path.normpath('%s/%s' % (bld.env['BUILD_DIRECTORY'], LIB_PATH)) - bld.env.append_value('RPATH', '-Wl,-rpath=%s' % rpath) + if bld.env.RPATH_ON_BUILD: + rpath = os.path.normpath('%s/%s' % (bld.env['BUILD_DIRECTORY'], LIB_PATH)) + bld.env.append_value('RPATH', '-Wl,-rpath=%s' % rpath) + else: + os.environ['LD_LIBRARY_PATH'] = os.path.normpath('%s/../shared' % bld.srcnode.abspath(bld.env)) Build.BuildContext.set_rpath = set_rpath def install_rpath(bld): '''the rpath value for installation''' - if bld.env['RPATH_ON_INSTALL']: + if bld.env.RPATH_ON_INSTALL: return ['-Wl,-rpath=%s/lib' % bld.env.PREFIX] return [] |