summaryrefslogtreecommitdiff
path: root/x11-toolkits/py-wxPython/files/patch-ac
blob: 3dec6284f12819a9b3a375ec5f93a339d8170b26 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
--- setup.py	2000/12/12 14:56:17	1.1
+++ setup.py	2000/12/12 15:22:46
@@ -68,6 +68,19 @@
 
 
 #----------------------------------------------------------------------
+# Check for some environment variables
+#----------------------------------------------------------------------
+
+try: gtk_config = os.environ['GTK_CONFIG']
+except KeyError: gtk_config = 'gtk-config'
+
+try: wx_config = os.environ['WX_CONFIG']
+except KeyError: wx_config = 'wx-config'
+
+try: sys_libs = string.split(os.environ['LIBS'])
+except KeyError: sys_libs = []
+
+#----------------------------------------------------------------------
 # Check for build flags on the command line
 #----------------------------------------------------------------------
 
@@ -172,12 +185,13 @@
                ]
     libdirs = []
     libs = []
+    libs.extend(sys_libs)
 
-    cflags = os.popen('wx-config --cflags', 'r').read()[:-1] + ' ' + \
-             os.popen('gtk-config --cflags', 'r').read()[:-1]
+    cflags = os.popen(wx_config + ' --cflags', 'r').read()[:-1] + ' ' + \
+             os.popen(gtk_config + ' --cflags', 'r').read()[:-1]
     cflags = string.split(cflags)
 
-    lflags = os.popen('wx-config --libs', 'r').read()[:-1]
+    lflags = os.popen(wx_config + ' --libs', 'r').read()[:-1]
     lflags = string.split(lflags)