BCompiler.st
changeset 586 e9ef451f36d0
parent 560 9311c79529d4
child 594 11ae33ac9b34
--- a/BCompiler.st	Fri Jul 18 13:10:35 1997 +0200
+++ b/BCompiler.st	Tue Jul 22 10:39:06 1997 +0200
@@ -696,12 +696,29 @@
     "define the include directories via additional -I flags.
      These are passed to stc. Can be set in your private.rc file"
 
-    STCCompilationIncludes := aString
+    |libDir incDir|
+
+    STCCompilationIncludes := aString.
+
+    "/ if STX_LIBDIR is defined, and not in passed argument,
+    "/ add it here.
+
+    libDir := OperatingSystem getEnvironment:'STX_LIBDIR'.
+    (libDir notNil and:[libDir asFilename exists]) ifTrue:[
+        incDir := libDir asFilename construct:'include'.
+        incDir exists ifTrue:[
+            (STCCompilationIncludes asCollectionOfWords includes:('-I' , incDir pathName)) ifFalse:[
+                STCCompilationIncludes := aString , ' ' , ('-I' , incDir pathName).
+            ]
+        ]
+    ]
 
     "
      Compiler stcCompilationIncludes:'-I/usr/local/include -I../../include'
      Compiler stcCompilationIncludes:(Compiler stcCompilationIncludes , ' -I../../libxt')
     "
+
+    "Modified: 18.7.1997 / 18:04:25 / cg"
 !
 
 stcCompilationOptions
@@ -2805,6 +2822,6 @@
 !ByteCodeCompiler class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libcomp/Attic/BCompiler.st,v 1.118 1997-06-26 08:42:31 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libcomp/Attic/BCompiler.st,v 1.119 1997-07-22 08:39:06 cg Exp $'
 ! !
 ByteCodeCompiler initialize!