diff options
author | Andrew Tridgell <tridge@samba.org> | 2010-03-25 14:20:45 +1100 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2010-04-06 20:27:06 +1000 |
commit | 6c3b69be9bdfc29ad0c0fa2c028fad0be193e042 (patch) | |
tree | 72aed80dae19adb8af68bf399c635f98157b213d /buildtools/wafsamba | |
parent | 12e6a920a79c04779cd188e8e88b16625d273c8f (diff) | |
download | samba-6c3b69be9bdfc29ad0c0fa2c028fad0be193e042.tar.gz samba-6c3b69be9bdfc29ad0c0fa2c028fad0be193e042.tar.bz2 samba-6c3b69be9bdfc29ad0c0fa2c028fad0be193e042.zip |
build: honor existing LD_LIBRARY_PATH settings when adding shared lib paths
Diffstat (limited to 'buildtools/wafsamba')
-rw-r--r-- | buildtools/wafsamba/samba_utils.py | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/buildtools/wafsamba/samba_utils.py b/buildtools/wafsamba/samba_utils.py index b0a6b1c2a7..814a5771a4 100644 --- a/buildtools/wafsamba/samba_utils.py +++ b/buildtools/wafsamba/samba_utils.py @@ -60,6 +60,17 @@ def runonce(function): return wrapper +def ADD_LD_LIBRARY_PATH(path): + '''add something to LD_LIBRARY_PATH''' + if 'LD_LIBRARY_PATH' in os.environ: + oldpath = os.environ['LD_LIBRARY_PATH'] + else: + oldpath = '' + newpath = oldpath.split(':') + if not path in newpath: + newpath.append(path) + os.environ['LD_LIBRARY_PATH'] = ':'.join(newpath) + def install_rpath(bld): '''the rpath value for installation''' bld.env['RPATH'] = [] @@ -76,7 +87,7 @@ def build_rpath(bld): bld.env['RPATH_ST'] = [] if bld.env.RPATH_ON_BUILD: return ['-Wl,-rpath=%s' % rpath] - os.environ['LD_LIBRARY_PATH'] = rpath + ADD_LD_LIBRARY_PATH(rpath) return [] |