load environment variables for each instance of LibraryInfo and make sure PKG_CONFIG_PATH gets loaded from users environment

git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@5125 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Ben Loftis 2009-06-05 21:37:58 +00:00
parent 4e977a2aca
commit 93fc3f7e13

View file

@ -71,6 +71,7 @@ opts.AddOptions(
class LibraryInfo(Environment):
def __init__(self,*args,**kw):
Environment.__init__ (self,*args,**kw)
self.ENV_update(os.environ)
def Merge (self,others):
for other in others:
@ -87,7 +88,7 @@ class LibraryInfo(Environment):
def ENV_update(self, src_ENV):
for k in src_ENV.keys():
if k in self['ENV'].keys() and k in [ 'PATH', 'LD_LIBRARY_PATH',
'LIB', 'INCLUDE' ]:
'LIB', PKG_CONFIG_PATH', 'INCLUDE' ]:
self['ENV'][k]=SCons.Util.AppendPath(self['ENV'][k], src_ENV[k])
else:
self['ENV'][k]=src_ENV[k]