only change compiler settings in host.rc, if not started from an image.
authorClaus Gittinger <cg@exept.de>
Thu, 18 Dec 2003 11:46:05 +0100
changeset 577 d574370a1da5
parent 576 28abe48fcec6
child 578 dfa929970bef
only change compiler settings in host.rc, if not started from an image. (avoid loosing settings.stc values)
h_solaris.rc
h_win32.rc
host.rc
--- a/h_solaris.rc	Fri Nov 21 16:09:48 2003 +0100
+++ b/h_solaris.rc	Thu Dec 18 11:46:05 2003 +0100
@@ -14,7 +14,7 @@
 "/ we do not support the expensive sun C-compiler.
 "/
 
-Compiler ccCompilationOptions:'-O -fPIC'
+Smalltalk wasStartedFromImage ifFalse:[
+    Compiler ccCompilationOptions:'-O -fPIC'
+].
 !
-
-
--- a/h_win32.rc	Fri Nov 21 16:09:48 2003 +0100
+++ b/h_win32.rc	Thu Dec 18 11:46:05 2003 +0100
@@ -51,68 +51,69 @@
 "/Smalltalk systemPath addFirst:'..\..\libhtml'.
 "/Smalltalk systemPath addFirst:'..\..\libopengl'.
 
-"/
-"/ right now, stx can only be used with a 
-"/ borland C-compiler.
-"/
+Smalltalk wasStartedFromImage ifFalse:[
+    "/
+    "/ right now, stx can only be used with a 
+    "/ borland C-compiler.
+    "/
+
+    "/ msc
+    "/ Compiler ccPath:'cl'.
+    "/ Compiler ccCompilationOptions:'/O1'.
 
-"/ msc
-"/ Compiler ccPath:'cl'.
-"/ Compiler ccCompilationOptions:'/O1'.
+    "/ borland
+    Compiler ccPath:'bcc32'.
+    Compiler ccCompilationOptions:''.
 
-"/ borland
-Compiler ccPath:'bcc32'.
-Compiler ccCompilationOptions:''.
+    incl := #(
+	    '-I..\..\include'
+	    '-I..\..\libopengl'
+	    ).
+
+    libs := #(
+	    '-L..\..\libbc'
+	    ).
 
-incl := #(
-	'-I..\..\include'
-	'-I..\..\libopengl'
-	).
+    'C:\Programme\exept\SmalltalkX\include' asFilename exists
+    ifTrue:[
+	incl := incl , #( '-IC:\Programme\exept\SmalltalkX\include' ).
+	libs := libs , #( '-LC:\Programme\exept\SmalltalkX\lib' )    .
+    ].
+    'D:\STX\PROJECTS\smalltalk\include' asFilename exists
+    ifTrue:[
+	incl := incl , #( '-ID:\STX\PROJECTS\smalltalk\include' )    .
+	libs := libs , #( '-LD:\STX\PROJECTS\smalltalk\lib' )        .
+    ].
+    'C:\Programme\borland\cbuilder3\include' asFilename exists
+    ifTrue:[
+	incl := incl , #( '-IC:\Programme\borland\cbuilder3\include' ).
+	libs := libs , #( '-LC:\Programme\borland\cbuilder3\lib' )    .
+    ].
+    'C:\Programme\borland\cbuilder4\include' asFilename exists
+    ifTrue:[
+	incl := incl , #( '-IC:\Programme\borland\cbuilder4\include' ).
+	libs := libs , #( '-LC:\Programme\borland\cbuilder4\lib' )    .
+    ].
+    'C:\Programme\borland\bcc55\include' asFilename exists
+    ifTrue:[
+	incl := incl , #( '-IC:\Programme\borland\bcc55\include' )    .
+	libs := libs , #( '-LC:\Programme\borland\bcc55\lib' )        .
+    ].
+    'C:\borland\bcc55\include' asFilename exists
+    ifTrue:[
+	incl := incl , #( '-IC:\borland\bcc55\include' )              .
+	libs := libs , #( '-LC:\borland\bcc55\lib' )                  .
+    ].
 
-libs := #(
-	'-L..\..\libbc'
-	).
+    incl := incl asStringWith:Character space.
+    libs := libs asStringWith:Character space.
 
-'C:\Programme\exept\SmalltalkX\include' asFilename exists
-ifTrue:[
-    incl := incl , #( '-IC:\Programme\exept\SmalltalkX\include' ).
-    libs := libs , #( '-LC:\Programme\exept\SmalltalkX\lib' )    .
+    Compiler stcCompilationIncludes: incl.
+    Compiler stcCompilationDefines: ''.
+    Compiler stcCompilationOptions: '+optinline +inlineNew'.
+    Compiler ccCompilationOptions: ''.
 ].
-'D:\STX\PROJECTS\smalltalk\include' asFilename exists
-ifTrue:[
-    incl := incl , #( '-ID:\STX\PROJECTS\smalltalk\include' )    .
-    libs := libs , #( '-LD:\STX\PROJECTS\smalltalk\lib' )        .
-].
-'C:\Programme\borland\cbuilder3\include' asFilename exists
-ifTrue:[
-    incl := incl , #( '-IC:\Programme\borland\cbuilder3\include' ).
-    libs := libs , #( '-LC:\Programme\borland\cbuilder3\lib' )    .
-].
-'C:\Programme\borland\cbuilder4\include' asFilename exists
-ifTrue:[
-    incl := incl , #( '-IC:\Programme\borland\cbuilder4\include' ).
-    libs := libs , #( '-LC:\Programme\borland\cbuilder4\lib' )    .
-].
-'C:\Programme\borland\bcc55\include' asFilename exists
-ifTrue:[
-    incl := incl , #( '-IC:\Programme\borland\bcc55\include' )    .
-    libs := libs , #( '-LC:\Programme\borland\bcc55\lib' )        .
-].
-'C:\borland\bcc55\include' asFilename exists
-ifTrue:[
-    incl := incl , #( '-IC:\borland\bcc55\include' )              .
-    libs := libs , #( '-LC:\borland\bcc55\lib' )                  .
-].
-
-incl := incl asStringWith:Character space.
-libs := libs asStringWith:Character space.
-
-Compiler stcCompilationIncludes: incl.
-Compiler stcCompilationDefines: ''.
-Compiler stcCompilationOptions: '+optinline +inlineNew'.
-Compiler ccCompilationOptions: ''.
 ObjectFileLoader linkArgs: (libs , ' -r -c -ap -Tpd -Gi -w-dup').
 ObjectFileLoader linkCommand: 'ilink32'.
 
 !
-
--- a/host.rc	Fri Nov 21 16:09:48 2003 +0100
+++ b/host.rc	Thu Dec 18 11:46:05 2003 +0100
@@ -130,72 +130,64 @@
 "/ can be rechanged in a h_xxx file.
 "/
 
-Compiler stcCompilation:#default.
-Compiler stcCompilationOptions:'+optinline +inlineNew'.
+Smalltalk wasStartedFromImage ifFalse:[
+    Compiler stcCompilation:#default.
+    Compiler stcCompilationOptions:'+optinline +inlineNew'.
 
-"/
-"/ setup for gcc (which is OK for most systems);
-"/ Notice that this setup may be changed by an OS-specific h_xxx file
-"/
-conf := Smalltalk configuration.
-(conf includesString:'gcc') ifTrue:[
-    Compiler ccPath:'gcc'
-] ifFalse:[
-    Compiler ccPath:'cc'
-].
-Compiler ccCompilationOptions:'-O'.
+    "/
+    "/ setup for gcc (which is OK for most systems);
+    "/ Notice that this setup may be changed by an OS-specific h_xxx file
+    "/
+    conf := Smalltalk configuration.
+    (conf includesString:'gcc') ifTrue:[
+	Compiler ccPath:'gcc'
+    ] ifFalse:[
+	Compiler ccPath:'cc'
+    ].
+    Compiler ccCompilationOptions:'-O'.
 
-includes := ''.
-('../../include' asFilename exists) ifTrue:[
-    "/ running in a development environment ...
-    includes := includes , '-I../../include '.
-].
-incDir := Smalltalk getSystemFileName:'include'.
-incDir notNil ifTrue:[
-    includes := includes , '-I' , incDir asFilename pathName , ' '
-] ifFalse:[
-    "/ running in a shared environment ...
-    ('/usr/local/lib/smalltalk/include' asFilename exists) ifTrue:[
-	includes := includes , '-I/usr/local/lib/smalltalk/include '.
+    includes := ''.
+    ('../../include' asFilename exists) ifTrue:[
+	"/ running in a development environment ...
+	includes := includes , '-I../../include '.
+    ].
+    incDir := Smalltalk getSystemFileName:'include'.
+    incDir notNil ifTrue:[
+	includes := includes , '-I' , incDir asFilename pathName , ' '
     ] ifFalse:[
-	('/opt/smalltalk/include' asFilename exists) ifTrue:[
-	    includes := includes , '-I/opt/smalltalk/include '.
+	"/ running in a shared environment ...
+	('/usr/local/lib/smalltalk/include' asFilename exists) ifTrue:[
+	    includes := includes , '-I/usr/local/lib/smalltalk/include '.
 	] ifFalse:[
-	    "/ if this is a production program, dont care for a warning
-	    (Smalltalk isStandAloneApp or:[Smalltalk isHeadless]) 
-	    ifFalse:[
-		'private.rc [warning]: no >>include<< directory found along your path.' infoPrintCR.
-		'private.rc [warning]: this will affect stc-compilation from within the browser.' infoPrintCR.
+	    ('/opt/smalltalk/include' asFilename exists) ifTrue:[
+		includes := includes , '-I/opt/smalltalk/include '.
+	    ] ifFalse:[
+		"/ if this is a production program, dont care for a warning
+		(Smalltalk isStandAloneApp or:[Smalltalk isHeadless]) 
+		ifFalse:[
+		    'private.rc [warning]: no >>include<< directory found along your path.' infoPrintCR.
+		    'private.rc [warning]: this will affect stc-compilation from within the browser.' infoPrintCR.
+		]
 	    ]
+	].
+    ].
+
+    Compiler stcCompilationIncludes:includes.
+
+    "/
+    "/ for myself: preset flags, so that we can accept GLXWorkstation code
+    "/ You probably will never do this.
+    "/
+    (Display notNil and:[Display supportsGLDrawing]) ifTrue:[
+	sysType = 'irix' ifTrue:[
+	    Compiler stcCompilationDefines:'-DGLX'.
+	] ifFalse:[
+	    Compiler stcCompilationIncludes:'-I../../include -I../../support/VGL/vogl/src'.
+	    Compiler stcCompilationDefines:'-DVGL'.
 	]
     ].
 ].
 
-Compiler stcCompilationIncludes:includes.
-
-
-"/
-"/ for myself: preset flags, so that we can accept GLXWorkstation code
-"/ You probably will never do this.
-"/
-(Display notNil and:[Display supportsGLDrawing]) ifTrue:[
-    sysType = 'irix' ifTrue:[
-	Compiler stcCompilationDefines:'-DGLX'.
-    ] ifFalse:[
-	Compiler stcCompilationIncludes:'-I../../include -I../../support/VGL/vogl/src'.
-	Compiler stcCompilationDefines:'-DVGL'.
-    ]
-].
-
-"/ specify additional link libraries.
-"/ Disabled; thats the default anyway ....
-"/
-"/    OperatingSystem getOSType = 'linux' ifTrue:[
-"/        ObjectFileLoader searchedLibraries:#('/usr/lib/libc.a')
-"/    ]
-
-
-
 "/
 "/ try systemType-specific setup
 "/ h_<osType>.rc