[jhbuild/wip/path-env: 6/6] config: set LDFLAGS, C include path for /usr/local
- From: Ryan Lortie <desrt src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [jhbuild/wip/path-env: 6/6] config: set LDFLAGS, C include path for /usr/local
- Date: Mon, 10 Mar 2014 06:19:56 +0000 (UTC)
commit 6e99c276303d314b0e16f7ea41691f7cdb5e5c6e
Author: Ryan Lortie <desrt desrt ca>
Date: Mon Mar 10 02:17:10 2014 -0400
config: set LDFLAGS, C include path for /usr/local
If we detect a configuration that has /usr/local/lib in the library
path, set the LDFLAGS and C{,PLUS}_INCLUDE_PATH environment variables to
include /usr/local/lib and /usr/local/include.
This is pretty ugly. Maybe we should have a separate variable to
control this?
jhbuild/config.py | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/jhbuild/config.py b/jhbuild/config.py
index 8536ce1..013e15f 100644
--- a/jhbuild/config.py
+++ b/jhbuild/config.py
@@ -438,6 +438,10 @@ class Config:
# scripts to find modules that do not use pkg-config (such as guile
# looking for gmp, or wireless-tools for NetworkManager)
# (see bug #377724 and bug #545018)
+ if '/usr/local/lib' in self.system_libdirs:
+ os.environ['LDFLAGS'] = '-L/usr/local/lib ' + os.environ.get('LDFLAGS', '')
+ addpath('C_INCLUDE_PATH', '/usr/local/include')
+ addpath('CPLUS_INCLUDE_PATH', '/usr/local/include')
# This path doesn't always get passed to addpath so we fix it here
if sys.platform.startswith('win'):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]