host.rc
author Claus Gittinger <cg@exept.de>
Thu, 06 May 1999 12:23:51 +0200
changeset 349 97acd4385192
parent 340 e2670d280cbf
child 376 e57febe4cd37
permissions -rw-r--r--
*** empty log message ***
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
0cb137a77319 Initial revision
claus
parents:
diff changeset
     1
"*
0cb137a77319 Initial revision
claus
parents:
diff changeset
     2
 * $Header$
5
420e4af41733 *** empty log message ***
claus
parents: 2
diff changeset
     3
 *
209
22793de5d56e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 195
diff changeset
     4
 * ST/X startup configuration file:
22793de5d56e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 195
diff changeset
     5
 *
5
420e4af41733 *** empty log message ***
claus
parents: 2
diff changeset
     6
 * DONT add site specific things here - use your own h_xxx.rc file instead
8
d82829c0d867 *** empty log message ***
claus
parents: 5
diff changeset
     7
 * where xxx stands for your hostname(s)
5
420e4af41733 *** empty log message ***
claus
parents: 2
diff changeset
     8
 *
0
0cb137a77319 Initial revision
claus
parents:
diff changeset
     9
 * startup configuration for host specific stuff -
331
a0be330a1f43 moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
    10
 * looks for a system specific h_sysType.rc init file and loads it.
a0be330a1f43 moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
    11
 * looks for a host specific h_hostName.rc init file and loads it.
0
0cb137a77319 Initial revision
claus
parents:
diff changeset
    12
 *"
0cb137a77319 Initial revision
claus
parents:
diff changeset
    13
340
e2670d280cbf *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 339
diff changeset
    14
|sysType host domain s rshCommand isStupidSYSV3 conf includes incDir|
177
eec6bac738ba stupid SYSV3: renamed rsh to remsh
Claus Gittinger <cg@exept.de>
parents: 169
diff changeset
    15
eec6bac738ba stupid SYSV3: renamed rsh to remsh
Claus Gittinger <cg@exept.de>
parents: 169
diff changeset
    16
sysType := OperatingSystem getSystemType.
eec6bac738ba stupid SYSV3: renamed rsh to remsh
Claus Gittinger <cg@exept.de>
parents: 169
diff changeset
    17
isStupidSYSV3 := false.
0
0cb137a77319 Initial revision
claus
parents:
diff changeset
    18
177
eec6bac738ba stupid SYSV3: renamed rsh to remsh
Claus Gittinger <cg@exept.de>
parents: 169
diff changeset
    19
sysType = 'realIX' ifTrue:[
eec6bac738ba stupid SYSV3: renamed rsh to remsh
Claus Gittinger <cg@exept.de>
parents: 169
diff changeset
    20
    "/
eec6bac738ba stupid SYSV3: renamed rsh to remsh
Claus Gittinger <cg@exept.de>
parents: 169
diff changeset
    21
    "/ those people must have been brain-damaged;
eec6bac738ba stupid SYSV3: renamed rsh to remsh
Claus Gittinger <cg@exept.de>
parents: 169
diff changeset
    22
    "/ They made a whole lot of trouble by renaming
eec6bac738ba stupid SYSV3: renamed rsh to remsh
Claus Gittinger <cg@exept.de>
parents: 169
diff changeset
    23
    "/ 'rsh' to 'remsh' (those systems are broken in other places as well ...).
eec6bac738ba stupid SYSV3: renamed rsh to remsh
Claus Gittinger <cg@exept.de>
parents: 169
diff changeset
    24
    "/ (who needs a restricted shell named 'rsh' ?)
eec6bac738ba stupid SYSV3: renamed rsh to remsh
Claus Gittinger <cg@exept.de>
parents: 169
diff changeset
    25
    "/
eec6bac738ba stupid SYSV3: renamed rsh to remsh
Claus Gittinger <cg@exept.de>
parents: 169
diff changeset
    26
    isStupidSYSV3 := true.
eec6bac738ba stupid SYSV3: renamed rsh to remsh
Claus Gittinger <cg@exept.de>
parents: 169
diff changeset
    27
].
eec6bac738ba stupid SYSV3: renamed rsh to remsh
Claus Gittinger <cg@exept.de>
parents: 169
diff changeset
    28
331
a0be330a1f43 moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
    29
"------------------------------------------------------------------------"
a0be330a1f43 moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
    30
"/ printer setup
a0be330a1f43 moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
    31
"/ Notice that this setup may be changed by an OS-specific h_xxx file
a0be330a1f43 moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
    32
"/
239
610af02f6b7e only reset printer settings, if started on another host.
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
    33
"/ only reset the printer setting, if restarted
610af02f6b7e only reset printer settings, if started on another host.
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
    34
"/ on another host.
610af02f6b7e only reset printer settings, if started on another host.
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
    35
610af02f6b7e only reset printer settings, if started on another host.
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
    36
host := OperatingSystem getHostName.
610af02f6b7e only reset printer settings, if started on another host.
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
    37
(Smalltalk at:#'_ImageHostName') ~= host ifTrue:[
610af02f6b7e only reset printer settings, if started on another host.
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
    38
610af02f6b7e only reset printer settings, if started on another host.
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
    39
    "/
610af02f6b7e only reset printer settings, if started on another host.
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
    40
    "/ setup the printer stuff.
610af02f6b7e only reset printer settings, if started on another host.
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
    41
    "/ the commands below will be offered in the printer-setting box
610af02f6b7e only reset printer settings, if started on another host.
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
    42
    "/
610af02f6b7e only reset printer settings, if started on another host.
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
    43
    PostscriptPrinterStream notNil ifTrue:[
610af02f6b7e only reset printer settings, if started on another host.
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
    44
	isStupidSYSV3 ifTrue:[
610af02f6b7e only reset printer settings, if started on another host.
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
    45
	    PostscriptPrinterStream 
610af02f6b7e only reset printer settings, if started on another host.
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
    46
		defaultCommands:#(
610af02f6b7e only reset printer settings, if started on another host.
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
    47
				    'lpr'
270
7b4ae16487ae *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 254
diff changeset
    48
				    'cat | remsh {hostname} lpr -h'
239
610af02f6b7e only reset printer settings, if started on another host.
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
    49
				    'cat > preview.ps'
610af02f6b7e only reset printer settings, if started on another host.
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
    50
				    'cat > preview.ps; ghostview preview.ps'
610af02f6b7e only reset printer settings, if started on another host.
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
    51
				 ).
610af02f6b7e only reset printer settings, if started on another host.
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
    52
	] ifFalse:[
610af02f6b7e only reset printer settings, if started on another host.
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
    53
	    PostscriptPrinterStream 
610af02f6b7e only reset printer settings, if started on another host.
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
    54
		defaultCommands:#(
610af02f6b7e only reset printer settings, if started on another host.
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
    55
				    'lpr -h'
270
7b4ae16487ae *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 254
diff changeset
    56
				    'cat | rsh {hostname} lpr -h'
239
610af02f6b7e only reset printer settings, if started on another host.
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
    57
				    'cat > preview.ps'
610af02f6b7e only reset printer settings, if started on another host.
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
    58
				    'cat > preview.ps; ghostview preview.ps'
610af02f6b7e only reset printer settings, if started on another host.
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
    59
				 ).
610af02f6b7e only reset printer settings, if started on another host.
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
    60
	].
610af02f6b7e only reset printer settings, if started on another host.
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
    61
	PostscriptPrinterStream printCommand:'lpr'.
177
eec6bac738ba stupid SYSV3: renamed rsh to remsh
Claus Gittinger <cg@exept.de>
parents: 169
diff changeset
    62
    ].
165
bb77927038c7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 123
diff changeset
    63
239
610af02f6b7e only reset printer settings, if started on another host.
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
    64
    PrinterStream notNil ifTrue:[
610af02f6b7e only reset printer settings, if started on another host.
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
    65
	isStupidSYSV3 ifTrue:[
610af02f6b7e only reset printer settings, if started on another host.
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
    66
	    PrinterStream 
610af02f6b7e only reset printer settings, if started on another host.
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
    67
		defaultCommands:#(
610af02f6b7e only reset printer settings, if started on another host.
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
    68
				    'lpr -h'
270
7b4ae16487ae *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 254
diff changeset
    69
				    'cat | remsh {hostname} lpr -h'
7b4ae16487ae *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 254
diff changeset
    70
				    'a2ps | remsh {hostname} lpr -h'
239
610af02f6b7e only reset printer settings, if started on another host.
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
    71
				    'a2ps > preview.ps; ghostview preview.ps'
610af02f6b7e only reset printer settings, if started on another host.
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
    72
				 ).
610af02f6b7e only reset printer settings, if started on another host.
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
    73
	] ifFalse:[
610af02f6b7e only reset printer settings, if started on another host.
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
    74
	    PrinterStream 
610af02f6b7e only reset printer settings, if started on another host.
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
    75
		defaultCommands:#(
610af02f6b7e only reset printer settings, if started on another host.
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
    76
				    'lpr -h'
270
7b4ae16487ae *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 254
diff changeset
    77
				    'cat | rsh {hostname} lpr -h'
7b4ae16487ae *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 254
diff changeset
    78
				    'a2ps | rsh {hostname} lpr -h'
239
610af02f6b7e only reset printer settings, if started on another host.
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
    79
				    'a2ps > preview.ps; ghostview preview.ps'
610af02f6b7e only reset printer settings, if started on another host.
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
    80
				 ).
610af02f6b7e only reset printer settings, if started on another host.
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
    81
	].
610af02f6b7e only reset printer settings, if started on another host.
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
    82
	Printer := PrinterStream.
610af02f6b7e only reset printer settings, if started on another host.
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
    83
	PrinterStream printCommand:'lpr'.
177
eec6bac738ba stupid SYSV3: renamed rsh to remsh
Claus Gittinger <cg@exept.de>
parents: 169
diff changeset
    84
    ].
165
bb77927038c7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 123
diff changeset
    85
239
610af02f6b7e only reset printer settings, if started on another host.
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
    86
    "/ Printer := PostscriptPrinterStream.
165
bb77927038c7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 123
diff changeset
    87
239
610af02f6b7e only reset printer settings, if started on another host.
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
    88
    "/ in our home-domain, preset the print command for remote printing
610af02f6b7e only reset printer settings, if started on another host.
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
    89
    "/ on a host called 'ibm'.
254
9de729ce1390 preset ccPath to 'cl' on msDos
Claus Gittinger <cg@exept.de>
parents: 239
diff changeset
    90
    "/ You can change this for YOUR environment and/or make it unconditional.
239
610af02f6b7e only reset printer settings, if started on another host.
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
    91
    "/ Consider the stuff below as an example; you should add
610af02f6b7e only reset printer settings, if started on another host.
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
    92
    "/ corresponding setup into a private h_xxxx.rc file.
165
bb77927038c7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 123
diff changeset
    93
239
610af02f6b7e only reset printer settings, if started on another host.
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
    94
    domain := OperatingSystem getDomainName.
270
7b4ae16487ae *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 254
diff changeset
    95
    (domain = 'exept.de' or:[domain = 'axept.de']) ifTrue:[
239
610af02f6b7e only reset printer settings, if started on another host.
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
    96
	isStupidSYSV3 ifTrue:[
331
a0be330a1f43 moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
    97
	    PostscriptPrinterStream printCommand:'cat | remsh exept lpr -h'.
a0be330a1f43 moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
    98
	    PrinterStream printCommand:'cat | remsh exept lpr -h'.
239
610af02f6b7e only reset printer settings, if started on another host.
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
    99
	    PostscriptPrinterStream defaultCommands:#(
331
a0be330a1f43 moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
   100
					    'cat | remsh exept lpr -h'
239
610af02f6b7e only reset printer settings, if started on another host.
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
   101
					    'cat > preview.ps'
610af02f6b7e only reset printer settings, if started on another host.
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
   102
					    'cat > preview.ps; ghostview preview.ps'
610af02f6b7e only reset printer settings, if started on another host.
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
   103
				     ).
610af02f6b7e only reset printer settings, if started on another host.
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
   104
	    PrinterStream defaultCommands:#(
331
a0be330a1f43 moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
   105
					    'cat | remsh exept lpr -h'
a0be330a1f43 moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
   106
					    'a2ps | remsh exept lpr -h'
239
610af02f6b7e only reset printer settings, if started on another host.
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
   107
					    'a2ps > preview.ps; ghostview preview.ps'
610af02f6b7e only reset printer settings, if started on another host.
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
   108
				     ).
610af02f6b7e only reset printer settings, if started on another host.
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
   109
	] ifFalse:[
331
a0be330a1f43 moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
   110
	    PostscriptPrinterStream printCommand:'cat | rsh exept lpr -h'.
a0be330a1f43 moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
   111
	    PrinterStream printCommand:'cat | rsh exept lpr -h'.
239
610af02f6b7e only reset printer settings, if started on another host.
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
   112
	    PostscriptPrinterStream defaultCommands:#(
331
a0be330a1f43 moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
   113
					    'cat | rsh exept lpr -h'
239
610af02f6b7e only reset printer settings, if started on another host.
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
   114
					    'cat > preview.ps'
610af02f6b7e only reset printer settings, if started on another host.
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
   115
					    'cat > preview.ps; ghostview preview.ps'
610af02f6b7e only reset printer settings, if started on another host.
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
   116
				     ).
610af02f6b7e only reset printer settings, if started on another host.
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
   117
	    PrinterStream defaultCommands:#(
331
a0be330a1f43 moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
   118
					    'cat | rsh exept lpr -h'
a0be330a1f43 moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
   119
					    'a2ps | rsh exept lpr -h'
239
610af02f6b7e only reset printer settings, if started on another host.
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
   120
					    'a2ps > preview.ps; ghostview preview.ps'
610af02f6b7e only reset printer settings, if started on another host.
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
   121
				     ).
610af02f6b7e only reset printer settings, if started on another host.
Claus Gittinger <cg@exept.de>
parents: 216
diff changeset
   122
	].
177
eec6bac738ba stupid SYSV3: renamed rsh to remsh
Claus Gittinger <cg@exept.de>
parents: 169
diff changeset
   123
    ].
103
9f5c03497b38 example - checking for the domain
Claus Gittinger <cg@exept.de>
parents: 8
diff changeset
   124
].
9f5c03497b38 example - checking for the domain
Claus Gittinger <cg@exept.de>
parents: 8
diff changeset
   125
331
a0be330a1f43 moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
   126
"------------------------------------------------------------------------"
a0be330a1f43 moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
   127
"/ default compiler setup;
a0be330a1f43 moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
   128
"/ can be rechanged in a h_xxx file.
a0be330a1f43 moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
   129
"/
a0be330a1f43 moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
   130
a0be330a1f43 moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
   131
Compiler stcCompilation:#default.
a0be330a1f43 moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
   132
Compiler stcCompilationOptions:'+optinline +inlineNew'.
a0be330a1f43 moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
   133
a0be330a1f43 moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
   134
"/
a0be330a1f43 moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
   135
"/ setup for gcc (which is OK for most systems);
a0be330a1f43 moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
   136
"/ Notice that this setup may be changed by an OS-specific h_xxx file
a0be330a1f43 moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
   137
"/
a0be330a1f43 moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
   138
conf := Smalltalk configuration.
a0be330a1f43 moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
   139
(conf includesString:'gcc') ifTrue:[
a0be330a1f43 moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
   140
    Compiler ccPath:'gcc'
a0be330a1f43 moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
   141
] ifFalse:[
a0be330a1f43 moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
   142
    Compiler ccPath:'cc'
a0be330a1f43 moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
   143
].
a0be330a1f43 moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
   144
Compiler ccCompilationOptions:'-O'.
a0be330a1f43 moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
   145
a0be330a1f43 moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
   146
includes := ''.
a0be330a1f43 moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
   147
('../../include' asFilename exists) ifTrue:[
a0be330a1f43 moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
   148
    "/ running in a development environment ...
a0be330a1f43 moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
   149
    includes := includes , '-I../../include '.
a0be330a1f43 moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
   150
].
a0be330a1f43 moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
   151
incDir := Smalltalk getSystemFileName:'include'.
a0be330a1f43 moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
   152
incDir notNil ifTrue:[
a0be330a1f43 moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
   153
    includes := includes , '-I' , incDir asFilename pathName , ' '
a0be330a1f43 moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
   154
] ifFalse:[
a0be330a1f43 moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
   155
    "/ running in a shared environment ...
a0be330a1f43 moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
   156
    ('/usr/local/lib/smalltalk/include' asFilename exists) ifTrue:[
a0be330a1f43 moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
   157
	includes := includes , '-I/usr/local/lib/smalltalk/include '.
a0be330a1f43 moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
   158
    ] ifFalse:[
a0be330a1f43 moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
   159
	('/opt/smalltalk/include' asFilename exists) ifTrue:[
a0be330a1f43 moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
   160
	    includes := includes , '-I/opt/smalltalk/include '.
a0be330a1f43 moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
   161
	] ifFalse:[
a0be330a1f43 moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
   162
	    'private.rc [warning]: no >>include<< directory found along your path.' errorPrintCR.
a0be330a1f43 moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
   163
	    'private.rc [warning]: this will affect stc-compilation from within the browser.' infoPrintCR.
a0be330a1f43 moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
   164
	]
a0be330a1f43 moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
   165
    ].
a0be330a1f43 moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
   166
].
a0be330a1f43 moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
   167
a0be330a1f43 moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
   168
Compiler stcCompilationIncludes:includes.
a0be330a1f43 moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
   169
a0be330a1f43 moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
   170
a0be330a1f43 moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
   171
"/
a0be330a1f43 moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
   172
"/ for myself: preset flags, so that we can accept GLXWorkstation code
a0be330a1f43 moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
   173
"/ You probably will never do this.
a0be330a1f43 moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
   174
"/
a0be330a1f43 moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
   175
Display supportsGLDrawing ifTrue:[
a0be330a1f43 moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
   176
    sysType = 'irix' ifTrue:[
a0be330a1f43 moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
   177
	Compiler stcCompilationDefines:'-DGLX'.
a0be330a1f43 moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
   178
    ] ifFalse:[
a0be330a1f43 moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
   179
	Compiler stcCompilationIncludes:'-I../../include -I../../support/VGL/vogl/src'.
a0be330a1f43 moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
   180
	Compiler stcCompilationDefines:'-DVGL'.
a0be330a1f43 moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
   181
    ]
a0be330a1f43 moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
   182
].
a0be330a1f43 moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
   183
a0be330a1f43 moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
   184
"/ specify additional link libraries.
a0be330a1f43 moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
   185
"/ Disabled; thats the default anyway ....
a0be330a1f43 moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
   186
"/
a0be330a1f43 moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
   187
"/    OperatingSystem getOSType = 'linux' ifTrue:[
a0be330a1f43 moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
   188
"/        ObjectFileLoader searchedLibraries:#('/usr/lib/libc.a')
a0be330a1f43 moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
   189
"/    ]
a0be330a1f43 moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
   190
a0be330a1f43 moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
   191
a0be330a1f43 moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
   192
a0be330a1f43 moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
   193
"/
a0be330a1f43 moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
   194
"/ try systemType-specific setup
a0be330a1f43 moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
   195
"/ h_<osType>.rc
a0be330a1f43 moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
   196
"/
a0be330a1f43 moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
   197
(Smalltalk at:#'_ImageOSTypeName') ~= sysType ifTrue:[
333
4a6780f29c71 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 331
diff changeset
   198
    ('host.rc [info]: ') infoPrint.
4a6780f29c71 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 331
diff changeset
   199
    (Smalltalk getSystemFileName:('h_' , sysType , '.rc')) isNil ifTrue:[
4a6780f29c71 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 331
diff changeset
   200
	'trying' infoPrint.
4a6780f29c71 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 331
diff changeset
   201
    ] ifFalse:[
4a6780f29c71 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 331
diff changeset
   202
	'reading' infoPrint.
4a6780f29c71 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 331
diff changeset
   203
    ].
4a6780f29c71 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 331
diff changeset
   204
    (' host setup h_' , sysType , '.rc ...') infoPrintCR.
331
a0be330a1f43 moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
   205
a0be330a1f43 moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
   206
    s := Smalltalk systemFileStreamFor:('h_' , sysType , '.rc').
a0be330a1f43 moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
   207
    s notNil ifTrue:[
a0be330a1f43 moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
   208
	s fileIn.
a0be330a1f43 moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
   209
	s close.
a0be330a1f43 moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
   210
    ].
a0be330a1f43 moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
   211
    Smalltalk at:#'_ImageOSTypeName' put:host.
a0be330a1f43 moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
   212
].
a0be330a1f43 moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
   213
165
bb77927038c7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 123
diff changeset
   214
"/
bb77927038c7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 123
diff changeset
   215
"/ try host-specific setup
331
a0be330a1f43 moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents: 270
diff changeset
   216
"/ h_<hostname>.rc
165
bb77927038c7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 123
diff changeset
   217
"/
2
353a88ada7c6 *** empty log message ***
claus
parents: 0
diff changeset
   218
host isNil ifTrue:[
195
1cf850844da9 new infoMessage scheme
Claus Gittinger <cg@exept.de>
parents: 177
diff changeset
   219
    'host.rc [warning]: cannot determine host I am running on' errorPrintCR.
2
353a88ada7c6 *** empty log message ***
claus
parents: 0
diff changeset
   220
] ifFalse:[
0
0cb137a77319 Initial revision
claus
parents:
diff changeset
   221
    "if there is a corresponding file ..."
103
9f5c03497b38 example - checking for the domain
Claus Gittinger <cg@exept.de>
parents: 8
diff changeset
   222
5
420e4af41733 *** empty log message ***
claus
parents: 2
diff changeset
   223
    (Smalltalk at:#'_ImageHostName') ~= host ifTrue:[
195
1cf850844da9 new infoMessage scheme
Claus Gittinger <cg@exept.de>
parents: 177
diff changeset
   224
	('host.rc [info]: trying host setup h_' , host , '.rc ...') infoPrintCR.
5
420e4af41733 *** empty log message ***
claus
parents: 2
diff changeset
   225
8
d82829c0d867 *** empty log message ***
claus
parents: 5
diff changeset
   226
	s := Smalltalk systemFileStreamFor:('h_' , host , '.rc').
d82829c0d867 *** empty log message ***
claus
parents: 5
diff changeset
   227
	s notNil ifTrue:[
d82829c0d867 *** empty log message ***
claus
parents: 5
diff changeset
   228
	    s fileIn.
d82829c0d867 *** empty log message ***
claus
parents: 5
diff changeset
   229
	    s close.
d82829c0d867 *** empty log message ***
claus
parents: 5
diff changeset
   230
	].
d82829c0d867 *** empty log message ***
claus
parents: 5
diff changeset
   231
	Smalltalk at:#'_ImageHostName' put:host.
0
0cb137a77319 Initial revision
claus
parents:
diff changeset
   232
    ]
0cb137a77319 Initial revision
claus
parents:
diff changeset
   233
].
0cb137a77319 Initial revision
claus
parents:
diff changeset
   234
!