summaryrefslogtreecommitdiff
blob: 6eb8b1ff4f53f76fd79eff3995fde1cf211f6db5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
Make sure Scons takes the CFLAGS/CXXFLAGS/LDFLAGS etc for the system.

Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>

diff -Nuar ipager-1.1.0.orig/SConstruct ipager-1.1.0/SConstruct
--- ipager-1.1.0.orig/SConstruct	2008-09-08 20:32:23.007016555 -0700
+++ ipager-1.1.0/SConstruct	2008-09-08 20:32:05.103267940 -0700
@@ -30,6 +30,16 @@
 # environment
 ipager_env = Environment(options = ipager_options, ENV = os.environ)
 
+# process env variables
+for K in ['CPPFLAGS', 'CFLAGS', 'CXXFLAGS', 'LDFLAGS', 'CC', 'CXX']:
+  if K in os.environ.keys():
+    dict = ipager_env.ParseFlags(os.environ[K])
+    # These headers are supposed static. Don't check at each build.
+    for i in dict['CPPPATH']:
+      dict['CCFLAGS'].append('-I' + i)
+    dict['CPPPATH'] = []
+    ipager_env.MergeFlags(dict)
+
 ipager_env.Append(
         CPPFLAGS = [ '-Wall' ],
         CPPPATH = [ '/usr/X11R6/include' ],