stc path determination
authorClaus Gittinger <cg@exept.de>
Fri, 28 Feb 2014 22:46:54 +0100
changeset 3396 c84c3d5a9e50
parent 3395 c43cb9bbd88c
child 3397 0638d768ec54
stc path determination
ParserFlags.st
--- a/ParserFlags.st	Fri Feb 28 21:00:57 2014 +0100
+++ b/ParserFlags.st	Fri Feb 28 22:46:54 2014 +0100
@@ -1,7 +1,7 @@
 "
  COPYRIGHT (c) 1989 by Claus Gittinger
  COPYRIGHT (c) 2005 by eXept Software AG
-              All Rights Reserved
+	      All Rights Reserved
 
  This software is furnished under a license and may be used
  only in accordance with the terms of that license and with the
@@ -106,7 +106,7 @@
 "
  COPYRIGHT (c) 1989 by Claus Gittinger
  COPYRIGHT (c) 2005 by eXept Software AG
-              All Rights Reserved
+	      All Rights Reserved
 
  This software is furnished under a license and may be used
  only in accordance with the terms of that license and with the
@@ -123,12 +123,12 @@
     individual-method customization (using ST as scripting).
 
     howTo_fileInVSE:
-        ParserFlags allowSTVExtensions:true.
-        ParserFlags allowSTVPrimitives:true.
-        ParserFlags allowSTXEOLComments:false.
+	ParserFlags allowSTVExtensions:true.
+	ParserFlags allowSTVPrimitives:true.
+	ParserFlags allowSTXEOLComments:false.
 
     for stx debugging:
-        STCKeepCIntermediate := true
+	STCKeepCIntermediate := true
 
 "
 ! !
@@ -175,8 +175,8 @@
     "
      can be added to your private.rc file:
 
-     ParserFlags arraysAreImmutable:true     
-     ParserFlags arraysAreImmutable:false      
+     ParserFlags arraysAreImmutable:true
+     ParserFlags arraysAreImmutable:false
     "
 !
 
@@ -201,7 +201,7 @@
 
     "
      Compiler implicitSelfSends:true
-     Compiler implicitSelfSends:false 
+     Compiler implicitSelfSends:false
     "
 !
 
@@ -233,8 +233,8 @@
     "
      can be added to your private.rc file:
 
-     ParserFlags stringsAreImmutable:true     
-     ParserFlags stringsAreImmutable:false      
+     ParserFlags stringsAreImmutable:true
+     ParserFlags stringsAreImmutable:false
     "
 
     "Created: / 3.8.1998 / 14:53:28 / cg"
@@ -244,14 +244,14 @@
 
 disableFlag:flagName forClass:class selector:selector
     "remember that warnings named flagName (such as #warnUnusedVars)
-     are disabled for a particular method. 
-     Sent if user wants to disable warnings in the future 
+     are disabled for a particular method.
+     Sent if user wants to disable warnings in the future
      (try defining a method with an unused var, to see)"
 
     |key|
 
     PerMethodFlags isNil ifTrue:[
-        PerMethodFlags := Dictionary new.
+	PerMethodFlags := Dictionary new.
     ].
     key := class name, '>>',selector.
     PerMethodFlags at:key put:(Timestamp now + self perMethodDisableWarningTimeDuration).
@@ -440,7 +440,7 @@
     "Modified: / 16-09-2011 / 19:56:18 / cg"
 !
 
-stcKeepCIntermediate:something 
+stcKeepCIntermediate:something
     STCKeepCIntermediate := something.
 
     "
@@ -457,7 +457,7 @@
     "Modified: / 16-09-2011 / 19:56:49 / cg"
 !
 
-stcKeepOIntermediate:something 
+stcKeepOIntermediate:something
     STCKeepOIntermediate := something.
 !
 
@@ -472,7 +472,7 @@
     "Modified: / 16-09-2011 / 19:57:17 / cg"
 !
 
-stcKeepSTIntermediate:something 
+stcKeepSTIntermediate:something
     STCKeepSTIntermediate := something.
 
     "
@@ -487,7 +487,7 @@
     ^ STCModulePath
 !
 
-stcModulePath:something 
+stcModulePath:something
     STCModulePath := something.
 !
 
@@ -567,7 +567,7 @@
 "/    dfn = DefineForLCC ifTrue:[ ^'lcc'].
 
     OperatingSystem isMSWINDOWSlike ifTrue:[
-        ^ 'bcc'
+	^ 'bcc'
     ].
     ^ 'gcc'
 
@@ -686,7 +686,7 @@
      dollars are still scanned as constant character prefix.
      If you have to fileIn old VW-Vsn2.x classes, turn this off
      before filing them in; i.e.:
-        Compiler allowDollarInIdentifiers:false"
+	Compiler allowDollarInIdentifiers:false"
 
     AllowDollarInIdentifier := aBoolean.
 
@@ -703,7 +703,7 @@
 allowDolphinExtensions:aBoolean
     "this allows turning on/off support for computed arrays ##(..) as in dolphin.
      If you want to fileIn Dolphin classes, enable this with:
-        Compiler allowDolphinComputedArrays:true"
+	Compiler allowDolphinComputedArrays:true"
 
     AllowDolphinExtensions := aBoolean.
 
@@ -764,7 +764,7 @@
      self allowExtendedSTXSyntax:true
      'a\tb' inspect.
      'a\u1616b' inspect.
-     self allowExtendedSTXSyntax:false   
+     self allowExtendedSTXSyntax:false
     "
 !
 
@@ -805,7 +805,7 @@
 
     "
      self allowHashAsBinarySelector:true
-     self allowHashAsBinarySelector:false   
+     self allowHashAsBinarySelector:false
     "
 !
 
@@ -894,7 +894,7 @@
 allowQualifiedNames:aBoolean
     "this allows turning on/off support for qualifiedNames #{ .., } as in vw3.
      If you want to fileIn vw3 or later classes, enable this with:
-        Compiler allowQualifiedNames:true
+	Compiler allowQualifiedNames:true
      Notice, that qualified names are not really supported semantically
      (they are parsed, but treated like regular globals)
     "
@@ -935,7 +935,7 @@
 allowSTVExtensions:aBoolean
     "this allows turning on/off support for ST/V extensions:
      If you want to fileIn ST/V classes, enable this with:
-        Compiler allowSTVComputedArrays:true"
+	Compiler allowSTVComputedArrays:true"
 
     AllowSTVExtensions := aBoolean.
 
@@ -989,8 +989,8 @@
 
 allowSqueakExtensions
     "return true, if support for squeak extensions
-        computed arrays { .., }
-        c/java style arguments in message sends rec foo(arg1, ... argN)
+	computed arrays { .., }
+	c/java style arguments in message sends rec foo(arg1, ... argN)
      is enabled."
 
     ^ AllowSqueakExtensions
@@ -998,11 +998,11 @@
 
 allowSqueakExtensions:aBoolean
     "this allows turning on/off support for squeak extensions:
-        computed arrays { .., }
-        c/java style arguments in message sends rec foo(arg1, ... argN)
+	computed arrays { .., }
+	c/java style arguments in message sends rec foo(arg1, ... argN)
 
      If you want to fileIn Squeak classes, enable this with:
-        Compiler allowSqueakComputedArrays:true"
+	Compiler allowSqueakComputedArrays:true"
 
     AllowSqueakExtensions := aBoolean.
 
@@ -1036,9 +1036,9 @@
      but instead scanned as assignment character (old ST/80 syntax).
      If turned on, underscores are in identifiers are allowed, while extra
      underscores are still scanned as assignment.
-     If you have to fileIn old VW-Vsn2.x classes, 
+     If you have to fileIn old VW-Vsn2.x classes,
      turn them off with:
-        Compiler allowUnderscoreInIdentifiers:false"
+	Compiler allowUnderscoreInIdentifiers:false"
 
     AllowUnderscoreInIdentifier := aBoolean.
 
@@ -1076,7 +1076,7 @@
 allowVisualAgePrimitives
     "return true, if support for V'Age primitives is enabled."
 
-    ^ AllowVisualAgePrimitives  
+    ^ AllowVisualAgePrimitives
 
     "
      AllowVisualAgePrimitives := true
@@ -1136,33 +1136,33 @@
 
 warnAboutBadComments
     "controls generation of warning messages about empty comments"
-    
+
     ^ WarnAboutBadComments
 !
 
 warnAboutBadComments:aBoolean
     "controls generation of warning messages about empty comments"
-    
+
     WarnAboutBadComments := aBoolean
 !
 
 warnAboutNonLowercaseLocalVariableNames
     "controls generation of warning messages about wrong variable names"
-    
+
     ^ WarnAboutNonLowercaseLocalVariableNames
 !
 
-warnAboutNonLowercaseLocalVariableNames:aBoolean 
+warnAboutNonLowercaseLocalVariableNames:aBoolean
     "controls generation of warning messages about wrong variable names"
-    
+
     WarnAboutNonLowercaseLocalVariableNames := aBoolean
 !
 
-warnAboutPeriodInSymbol    
+warnAboutPeriodInSymbol
     ^ WarnAboutPeriodInSymbol
 !
 
-warnAboutPeriodInSymbol:aBoolean    
+warnAboutPeriodInSymbol:aBoolean
     WarnAboutPeriodInSymbol := aBoolean
 !
 
@@ -1187,32 +1187,32 @@
 !
 
 warnAboutReferenceToPrivateClass
-    "controls generation of warning messages when a private class is referenced"     
-    
+    "controls generation of warning messages when a private class is referenced"
+
     ^ WarnAboutReferenceToPrivateClass
 !
 
 warnAboutReferenceToPrivateClass:aBoolean
-    "controls generation of warning messages when a private class is referenced"     
-    
+    "controls generation of warning messages when a private class is referenced"
+
     WarnAboutReferenceToPrivateClass := aBoolean
 !
 
 warnAboutShortLocalVariableNames
     "controls generation of warning messages about short variable names"
-    
+
     ^ WarnAboutShortLocalVariableNames
 !
 
-warnAboutShortLocalVariableNames:aBoolean 
+warnAboutShortLocalVariableNames:aBoolean
     "controls generation of warning messages about short variable names"
-    
+
     WarnAboutShortLocalVariableNames := aBoolean
 !
 
 warnAboutUnknownCharacterEscapesInJavaScriptStringConstant
     "things like '\c:foo' instead of '\\c:foo' "
-    
+
     ^ WarnAboutUnknownCharacterEscapesInJavaScriptStringConstant
 
     "Created: / 04-10-2011 / 19:54:57 / cg"
@@ -1220,33 +1220,33 @@
 
 warnAboutUnknownCharacterEscapesInJavaScriptStringConstant:aBoolean
     "things like '\c:foo' instead of '\\c:foo' "
-    
+
     WarnAboutUnknownCharacterEscapesInJavaScriptStringConstant := aBoolean
 
     "Created: / 04-10-2011 / 19:54:42 / cg"
 !
 
-warnAboutVariableNameConventions 
+warnAboutVariableNameConventions
     "controls generation of warning messages about wrong variable names"
-    
+
     ^ WarnAboutVariableNameConventions
 !
 
-warnAboutVariableNameConventions:aBoolean 
+warnAboutVariableNameConventions:aBoolean
     "controls generation of warning messages about wrong variable names"
-    
+
     WarnAboutVariableNameConventions := aBoolean
 !
 
 warnAboutWrongVariableNames
     "controls generation of warning messages about wrong variable names"
-    
+
     ^ WarnAboutWrongVariableNames
 !
 
 warnAboutWrongVariableNames:aBoolean
     "controls generation of warning messages about wrong variable names"
-    
+
     WarnAboutWrongVariableNames := aBoolean
 !
 
@@ -1263,7 +1263,7 @@
      Examples are: expr or:expr2, where expr2 is not a block.
      If you get bored by those warnings, turn them off by adding
      a line as:
-        ParserFlags warnCommonMistakes:false
+	ParserFlags warnCommonMistakes:false
      in your 'private.rc' file"
 
     WarnCommonMistakes := aBoolean
@@ -1287,7 +1287,7 @@
      Notice, that dollars are NEVER allowed as the first character in an identifier.
      If you get bored by those warnings, turn them off by adding
      a line as:
-        ParserFlags warnDollarInIdentifier:false
+	ParserFlags warnDollarInIdentifier:false
      in your 'private.rc' file"
 
     WarnDollarInIdentifier := aBoolean
@@ -1298,7 +1298,7 @@
 
 warnHiddenVariables
     "controls generation of warning messages about hiding variables by locals"
-    
+
     ^ WarnHiddenVariables
 !
 
@@ -1332,7 +1332,7 @@
     "this allows turning on/off warnings about underscore-assignment (pre ST-80v4 syntax).
      If you get bored by those warnings, turn them off by adding
      a line as:
-        ParserFlags warnOldStyleAssignment:false
+	ParserFlags warnOldStyleAssignment:false
      in your 'private.rc' file"
 
     WarnOldStyleAssignment := aBoolean
@@ -1370,7 +1370,7 @@
      on or off.
      If you get bored by those warnings, turn them off by adding
      a line as:
-        ParserFlags warnPossibleIncompatibilities:false
+	ParserFlags warnPossibleIncompatibilities:false
      in your 'private.rc' file."
 
     WarnPossibleIncompatibilities := aBoolean
@@ -1389,7 +1389,7 @@
     "this allows turning on/off warnings about stx specials.
      If you get bored by those warnings, turn them off by adding
      a line as:
-        ParserFlags warnSTXSpecials:false
+	ParserFlags warnSTXSpecials:false
      in your 'private.rc' file"
 
     WarnSTXSpecials := aBoolean
@@ -1410,7 +1410,7 @@
      (i.e. VW releases 2.x).
      If you get bored by those warnings, turn them off by adding
      a line as:
-        ParserFlags warnUnderscoreInIdentifier:false
+	ParserFlags warnUnderscoreInIdentifier:false
      in your 'private.rc' file"
 
     WarnUnderscoreInIdentifier := aBoolean
@@ -1439,7 +1439,7 @@
 warnings:aBoolean
     "this allows turning on/off all warnings; the default is on.
      You can turn off warnings in your 'private.rc' file with
-         ParserFlags warnings:false
+	 ParserFlags warnings:false
     "
 
     Warnings := aBoolean
@@ -1456,6 +1456,8 @@
 !ParserFlags class methodsFor:'class initialization'!
 
 initialize
+    |executablePath|
+
     Warnings := true.
     WarnUndeclared := true.
     WarnUnusedVars := true.
@@ -1481,10 +1483,10 @@
     WarnPlausibilityChecks := true.
     WarnAssignmentToBlockArgument := true.
     WarnAssignmentToMethodArgument := true.
-    WarnAssignmentToPoolVariable := true.  
+    WarnAssignmentToPoolVariable := true.
 
     AllowReservedWordsAsSelectors := false.
-    AllowUnderscoreInIdentifier := true.        
+    AllowUnderscoreInIdentifier := true.
     AllowDollarInIdentifier := false.           "/ st80-vms dollars in identifiers
     AllowOldStyleAssignment := true.            "/ st80 underscore as assignment
     AllowDolphinExtensions := false.            "/ dolphin computed literal
@@ -1518,7 +1520,7 @@
     AllowEmptyStatements := false.
     AllowPeriodInSymbol := false.
     "/ these are only used by the new compiler
-    AllowUnicodeStrings := false.               
+    AllowUnicodeStrings := false.
     AllowUnicodeCharacters := false.
     AllowCharacterEscapes := false.
     AllowStringEscapes := false.
@@ -1546,8 +1548,21 @@
     DefineForMINGW32 := '__MINGW32__'.
     DefineForMINGW64 := '__MINGW64__'.
 
-    self initializeSTCFlagsForTopDirectory:
-        OperatingSystem pathOfSTXExecutable asFilename directory directory directory.
+    (executablePath := OperatingSystem pathOfSTXExecutable) notNil ifTrue:[
+	executablePath := executablePath asFilename directory.
+	(((executablePath / 'include') exists and:[(executablePath / 'stc') exists])
+	  or:[
+	    executablePath := executablePath directory.
+	    ((executablePath / 'include') exists and:[(executablePath / 'stc') exists])
+	      or:[
+		executablePath := executablePath directory.
+		((executablePath / 'include') exists and:[(executablePath / 'stc') exists])
+	      ]
+	   ]
+	) ifTrue:[
+	    self initializeSTCFlagsForTopDirectory: executablePath.
+	]
+    ].
 
     "
      ParserFlags initialize
@@ -1566,117 +1581,117 @@
 
     topDir := topDirArg.
     OperatingSystem isMSWINDOWSlike ifTrue:[
-        topDirArg isString ifTrue:[
-            topDir := topDirArg copyReplaceAll:$/ with:$\.
-        ]
+	topDirArg isString ifTrue:[
+	    topDir := topDirArg copyReplaceAll:$/ with:$\.
+	]
     ].
     topDir := topDir asFilename.
     topDirName := topDir name.
 
     "/ if in the development directory, use ./modules
     Smalltalk isSmalltalkDevelopmentSystem ifTrue:[
-        STCModulePath := 'modules'.
+	STCModulePath := 'modules'.
     ] ifFalse:[
-        STCModulePath := Filename tempDirectory constructString:'modules'.
+	STCModulePath := Filename tempDirectory constructString:'modules'.
     ].
 
     (topDir construct:'stc') exists ifFalse:[
-        ('ParserFlags [warning]: stc not found in "',topDirName,'"') infoPrintCR.
-        'ParserFlags [warning]: stc-compiling (primitive code) will not work in the browser' infoPrintCR.
-        STCCompilation := #never.
+	('ParserFlags [warning]: stc not found in "',topDirName,'"') infoPrintCR.
+	'ParserFlags [warning]: stc-compiling (primitive code) will not work in the browser' infoPrintCR.
+	STCCompilation := #never.
     ].
 
     OperatingSystem isMSWINDOWSlike ifTrue:[
-        useBorlandC := useVisualC := useMingw := false.
-
-        STCCompilationIncludes := '-I',topDirName,'\include -I',topDirName,'\libopengl'.
-        (bccTop := BCCTop) isNil ifTrue:[
-            bccTop := #(
-                        'C:\Borland\bcc55'
-                       ) detect:[:path | path asFilename exists and:[(path asFilename construct:'include') exists]] ifNone:nil.
-        ].
-
-        (bccTop notNil and:[bccTop asFilename exists]) ifTrue:[
-            STCCompilationIncludes := STCCompilationIncludes,' -I',bccTop,'\Include'.
-            LibDirectory := topDirName,'\lib\bc'.
-            LinkArgs := '-L',topDirName,'\lib\bc'.
-            LinkArgs := LinkArgs,' -L',bccTop,'\Lib -r -c -ap -Tpd -Gi -w-dup'.
-            CCPath := 'bcc32'.
-            MakeCommand := 'bmake'.
-            LinkCommand := 'ilink32'.
-            CCCompilationOptions := '-w-'.
-            useBorlandC := true.
-        ] ifFalse:[
-            (vcTop := VCTop) isNil ifTrue:[
-                vcTop := #(
-                            'C:\Program Files\Microsoft Visual Studio 11.0\VC'
-                            'C:\Program Files\Microsoft Visual Studio 10.0\VC'
-                            'C:\Program Files\Microsoft Visual Studio 9.0\VC'
-                          ) detect:[:path | path asFilename exists and:[(path asFilename construct:'bin/cl.exe') exists]] ifNone:nil.
-            ].
-            (vcTop notNil and:[vcTop asFilename exists]) ifTrue:[
-                useVisualC := true.
-                STCCompilationIncludes := STCCompilationIncludes,' -I',vcTop,'include'.
-
-                (sdkTop := SDKTop) isNil ifTrue:[
-                    sdkTop := #(
-                                'C:\Program Files\Microsoft SDKs\Windows\v7.0A'
-                                'C:\Program Files\Microsoft SDKs\Windows\v6.0A'
-                              ) detect:[:path | path asFilename exists and:[(path asFilename construct:'include') exists]] ifNone:nil.
-                ].
-                (sdkTop notNil and:[sdkTop asFilename exists]) ifTrue:[
-                    STCCompilationIncludes := STCCompilationIncludes,' -I',sdkTop,'\include'.
-                ].
-                LibDirectory := topDirName,'\lib\vc'.
-                LinkArgs := '-L',topDirName,'\lib\vc'.
-                LinkArgs := LinkArgs,' -r -c -ap -Tpd -Gi -w-dup'.
-                CCPath := vcTop,'\bin\cl.exe'.
-                LinkCommand := 'ilink32'.
-                MakeCommand := 'vcmake'.
-                CCCompilationOptions := '/nologo /ZI  /w /GF /EHsc /FR.\objvc\'.
-            ] ifFalse:[
-                "/ add definitions for lcc, mingc etc. 
-                STCCompilationIncludes := STCCompilationIncludes,' -IC:\xxxxx\Include'.
-                LibDirectory := topDirName,'\lib\vc'.
-                LinkArgs := '-L',topDirName,'\lib\vc'.
-                LinkArgs := LinkArgs,' -r -c -ap -Tpd -Gi -w-dup'.
-            ].
-        ].
-        STCCompilationDefines := '-DWIN32'.
-        STCCompilationOptions := '+optinline +inlineNew'.
-        (topDirName,'\stc\stc.exe') asFilename exists ifTrue:[
-            STCPath := (topDirName,'\stc\stc.exe').
-        ] ifFalse:[
-            STCPath := 'stc.exe'.
-        ].
-        LibPath := ''.
-        SearchedLibraries := #('import32.lib').
-        "/ SearchedLibraries := #('import32.lib' 'glu32.lib' 'opengl32.lib').
+	useBorlandC := useVisualC := useMingw := false.
+
+	STCCompilationIncludes := '-I',topDirName,'\include -I',topDirName,'\libopengl'.
+	(bccTop := BCCTop) isNil ifTrue:[
+	    bccTop := #(
+			'C:\Borland\bcc55'
+		       ) detect:[:path | path asFilename exists and:[(path asFilename construct:'include') exists]] ifNone:nil.
+	].
+
+	(bccTop notNil and:[bccTop asFilename exists]) ifTrue:[
+	    STCCompilationIncludes := STCCompilationIncludes,' -I',bccTop,'\Include'.
+	    LibDirectory := topDirName,'\lib\bc'.
+	    LinkArgs := '-L',topDirName,'\lib\bc'.
+	    LinkArgs := LinkArgs,' -L',bccTop,'\Lib -r -c -ap -Tpd -Gi -w-dup'.
+	    CCPath := 'bcc32'.
+	    MakeCommand := 'bmake'.
+	    LinkCommand := 'ilink32'.
+	    CCCompilationOptions := '-w-'.
+	    useBorlandC := true.
+	] ifFalse:[
+	    (vcTop := VCTop) isNil ifTrue:[
+		vcTop := #(
+			    'C:\Program Files\Microsoft Visual Studio 11.0\VC'
+			    'C:\Program Files\Microsoft Visual Studio 10.0\VC'
+			    'C:\Program Files\Microsoft Visual Studio 9.0\VC'
+			  ) detect:[:path | path asFilename exists and:[(path asFilename construct:'bin/cl.exe') exists]] ifNone:nil.
+	    ].
+	    (vcTop notNil and:[vcTop asFilename exists]) ifTrue:[
+		useVisualC := true.
+		STCCompilationIncludes := STCCompilationIncludes,' -I',vcTop,'include'.
+
+		(sdkTop := SDKTop) isNil ifTrue:[
+		    sdkTop := #(
+				'C:\Program Files\Microsoft SDKs\Windows\v7.0A'
+				'C:\Program Files\Microsoft SDKs\Windows\v6.0A'
+			      ) detect:[:path | path asFilename exists and:[(path asFilename construct:'include') exists]] ifNone:nil.
+		].
+		(sdkTop notNil and:[sdkTop asFilename exists]) ifTrue:[
+		    STCCompilationIncludes := STCCompilationIncludes,' -I',sdkTop,'\include'.
+		].
+		LibDirectory := topDirName,'\lib\vc'.
+		LinkArgs := '-L',topDirName,'\lib\vc'.
+		LinkArgs := LinkArgs,' -r -c -ap -Tpd -Gi -w-dup'.
+		CCPath := vcTop,'\bin\cl.exe'.
+		LinkCommand := 'ilink32'.
+		MakeCommand := 'vcmake'.
+		CCCompilationOptions := '/nologo /ZI  /w /GF /EHsc /FR.\objvc\'.
+	    ] ifFalse:[
+		"/ add definitions for lcc, mingc etc.
+		STCCompilationIncludes := STCCompilationIncludes,' -IC:\xxxxx\Include'.
+		LibDirectory := topDirName,'\lib\vc'.
+		LinkArgs := '-L',topDirName,'\lib\vc'.
+		LinkArgs := LinkArgs,' -r -c -ap -Tpd -Gi -w-dup'.
+	    ].
+	].
+	STCCompilationDefines := '-DWIN32'.
+	STCCompilationOptions := '+optinline +inlineNew'.
+	(topDirName,'\stc\stc.exe') asFilename exists ifTrue:[
+	    STCPath := (topDirName,'\stc\stc.exe').
+	] ifFalse:[
+	    STCPath := 'stc.exe'.
+	].
+	LibPath := ''.
+	SearchedLibraries := #('import32.lib').
+	"/ SearchedLibraries := #('import32.lib' 'glu32.lib' 'opengl32.lib').
     ] ifFalse:[
-        STCCompilationIncludes := '-I',topDirName,'/include'.
-        STCCompilationDefines := ''.
-        STCCompilationOptions := '+optinline +inlineNew'.
-        STCPath := topDirName,'/stc/stc'.
-
-        m32 := ''.
-        (ExternalAddress pointerSize == 4) ifTrue:[
-            m32 := ' -m32'
-        ].
-        CCCompilationOptions := OperatingSystem getCPUDefine,
-                                ' -D', self usedCompilerDefine,
-                                ' ', OperatingSystem getOSDefine,
-                                ' ', '-O', m32.
-        ParserFlags useGnuC ifTrue:[
-            CCPath := 'gcc'
-        ] ifFalse:[
-            CCPath := 'cc'
-        ].
-        LinkArgs := m32.
-        LinkSharedArgs := '-shared', m32.
-        LinkCommand := CCPath.
-        LibPath := ''.
-        SearchedLibraries := #().
-        MakeCommand := 'make'.
+	STCCompilationIncludes := '-I',topDirName,'/include'.
+	STCCompilationDefines := ''.
+	STCCompilationOptions := '+optinline +inlineNew'.
+	STCPath := topDirName,'/stc/stc'.
+
+	m32 := ''.
+	(ExternalAddress pointerSize == 4) ifTrue:[
+	    m32 := ' -m32'
+	].
+	CCCompilationOptions := OperatingSystem getCPUDefine,
+				' -D', self usedCompilerDefine,
+				' ', OperatingSystem getOSDefine,
+				' ', '-O', m32.
+	ParserFlags useGnuC ifTrue:[
+	    CCPath := 'gcc'
+	] ifFalse:[
+	    CCPath := 'cc'
+	].
+	LinkArgs := m32.
+	LinkSharedArgs := '-shared', m32.
+	LinkCommand := CCPath.
+	LibPath := ''.
+	SearchedLibraries := #().
+	MakeCommand := 'make'.
     ].
 
     "
@@ -2130,8 +2145,8 @@
 
 allowSqueakExtensions
     "return true, if support for squeak extensions
-        computed arrays { .., }
-        c/java style arguments in message sends rec foo(arg1, ... argN)
+	computed arrays { .., }
+	c/java style arguments in message sends rec foo(arg1, ... argN)
      is enabled."
 
     ^ allowSqueakExtensions
@@ -2139,8 +2154,8 @@
 
 allowSqueakExtensions:aBoolean
     "this allows turning on/off support for squeak extensions:
-        computed arrays { .., }
-        c/java style arguments in message sends rec foo(arg1, ... argN)
+	computed arrays { .., }
+	c/java style arguments in message sends rec foo(arg1, ... argN)
     "
 
     allowSqueakExtensions := aBoolean
@@ -2305,13 +2320,13 @@
 !
 
 warnAboutReferenceToPrivateClass
-    "controls generation of warning messages when a private class is referenced"     
+    "controls generation of warning messages when a private class is referenced"
 
     ^ warnAboutReferenceToPrivateClass
 !
 
 warnAboutReferenceToPrivateClass:aBoolean
-    "controls generation of warning messages when a private class is referenced"     
+    "controls generation of warning messages when a private class is referenced"
 
     warnAboutReferenceToPrivateClass := aBoolean
 !
@@ -2529,7 +2544,7 @@
     warnPlausibilityChecks := WarnPlausibilityChecks.
     warnAssignmentToBlockArgument := WarnAssignmentToBlockArgument.
     warnAssignmentToMethodArgument := WarnAssignmentToMethodArgument.
-    warnAssignmentToPoolVariable := WarnAssignmentToPoolVariable.  
+    warnAssignmentToPoolVariable := WarnAssignmentToPoolVariable.
 
     allowUnderscoreInIdentifier := AllowUnderscoreInIdentifier.
     allowDollarInIdentifier := AllowDollarInIdentifier.
@@ -2604,11 +2619,11 @@
 !ParserFlags class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libcomp/ParserFlags.st,v 1.114 2014-02-28 14:17:02 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libcomp/ParserFlags.st,v 1.115 2014-02-28 21:46:54 cg Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libcomp/ParserFlags.st,v 1.114 2014-02-28 14:17:02 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libcomp/ParserFlags.st,v 1.115 2014-02-28 21:46:54 cg Exp $'
 ! !