xref: /minix3/crypto/external/bsd/openssl/dist/engines/makeengines.com (revision 0a6a1f1d05b60e214de2f05a7310ddd1f0e590e7)
1ebfedea0SLionel Sambuc$!
2ebfedea0SLionel Sambuc$!  MAKEENGINES.COM
3ebfedea0SLionel Sambuc$!  Written By:  Richard Levitte
4ebfedea0SLionel Sambuc$!               richard@levitte.org
5ebfedea0SLionel Sambuc$!
6ebfedea0SLionel Sambuc$!  This command file compiles and creates the various engines in form
7ebfedea0SLionel Sambuc$!  of shared images.  They are placed in [.xxx.EXE.ENGINES], where "xxx"
8ebfedea0SLionel Sambuc$!  is ALPHA, IA64 or VAX, depending on your hardware.
9ebfedea0SLionel Sambuc$!
10ebfedea0SLionel Sambuc$!  P1	if this is ENGINES or ALL, the engines will build, otherwise not.
11ebfedea0SLionel Sambuc$!
12ebfedea0SLionel Sambuc$!  P2	DEBUG or NODEBUG to compile with or without debugger information.
13ebfedea0SLionel Sambuc$!
14ebfedea0SLionel Sambuc$!  P3  VAXC		for VAX C
15ebfedea0SLionel Sambuc$!	DECC		for DEC C
16ebfedea0SLionel Sambuc$!	GNUC		for GNU C (untested)
17ebfedea0SLionel Sambuc$!
18ebfedea0SLionel Sambuc$!  P4	if defined, sets the TCP/IP libraries to use.  UCX or TCPIP is
19ebfedea0SLionel Sambuc$!	used by default since most other implementations come with a
20ebfedea0SLionel Sambuc$!	compatibility library.  The value must be one of the following:
21ebfedea0SLionel Sambuc$!
22ebfedea0SLionel Sambuc$!	UCX		for UCX
23ebfedea0SLionel Sambuc$!	SOCKETSHR	for SOCKETSHR+NETLIB
24ebfedea0SLionel Sambuc$!	TCPIP		for TCPIP (post UCX)
25ebfedea0SLionel Sambuc$!
26ebfedea0SLionel Sambuc$!  P5	if defined, tells the compiler not to use special threads.
27ebfedea0SLionel Sambuc$!
28ebfedea0SLionel Sambuc$!  P6	if defined, denotes which engines to build.  If not defined,
29ebfedea0SLionel Sambuc$!	all available engines are built.
30ebfedea0SLionel Sambuc$!
31ebfedea0SLionel Sambuc$!  P7, if defined, specifies the C pointer size.  Ignored on VAX.
32ebfedea0SLionel Sambuc$!      ("64=ARGV" gives more efficient code with HP C V7.3 or newer.)
33ebfedea0SLionel Sambuc$!      Supported values are:
34ebfedea0SLionel Sambuc$!
35ebfedea0SLionel Sambuc$!	""	Compile with default (/NOPOINTER_SIZE)
36ebfedea0SLionel Sambuc$!	32	Compile with /POINTER_SIZE=32 (SHORT)
37ebfedea0SLionel Sambuc$!	64	Compile with /POINTER_SIZE=64[=ARGV] (LONG[=ARGV])
38ebfedea0SLionel Sambuc$!               (Automatically select ARGV if compiler supports it.)
39ebfedea0SLionel Sambuc$!      64=      Compile with /POINTER_SIZE=64 (LONG).
40ebfedea0SLionel Sambuc$!      64=ARGV  Compile with /POINTER_SIZE=64=ARGV (LONG=ARGV).
41ebfedea0SLionel Sambuc$!
42ebfedea0SLionel Sambuc$!  P8, if defined, specifies a directory where ZLIB files (zlib.h,
43ebfedea0SLionel Sambuc$!  libz.olb) may be found.  Optionally, a non-default object library
44ebfedea0SLionel Sambuc$!  name may be included ("dev:[dir]libz_64.olb", for example).
45ebfedea0SLionel Sambuc$!
46ebfedea0SLionel Sambuc$!-----------------------------------------------------------------------------
47ebfedea0SLionel Sambuc$!
48ebfedea0SLionel Sambuc$! Announce/identify.
49ebfedea0SLionel Sambuc$!
50ebfedea0SLionel Sambuc$ proc = f$environment( "procedure")
51ebfedea0SLionel Sambuc$ write sys$output "@@@ "+ -
52ebfedea0SLionel Sambuc   f$parse( proc, , , "name")+ f$parse( proc, , , "type")
53ebfedea0SLionel Sambuc$!
54ebfedea0SLionel Sambuc$ on control_c then goto exit
55ebfedea0SLionel Sambuc$!
56ebfedea0SLionel Sambuc$! Set the default TCP/IP library to link against if needed
57ebfedea0SLionel Sambuc$!
58ebfedea0SLionel Sambuc$ TCPIP_LIB = ""
59ebfedea0SLionel Sambuc$ ZLIB_LIB = ""
60ebfedea0SLionel Sambuc$!
61ebfedea0SLionel Sambuc$! Check What Architecture We Are Using.
62ebfedea0SLionel Sambuc$!
63ebfedea0SLionel Sambuc$ IF (F$GETSYI("CPU").LT.128)
64ebfedea0SLionel Sambuc$ THEN
65ebfedea0SLionel Sambuc$!
66ebfedea0SLionel Sambuc$!  The Architecture Is VAX.
67ebfedea0SLionel Sambuc$!
68ebfedea0SLionel Sambuc$   ARCH = "VAX"
69ebfedea0SLionel Sambuc$!
70ebfedea0SLionel Sambuc$! Else...
71ebfedea0SLionel Sambuc$!
72ebfedea0SLionel Sambuc$ ELSE
73ebfedea0SLionel Sambuc$!
74ebfedea0SLionel Sambuc$!  The Architecture Is Alpha, IA64 or whatever comes in the future.
75ebfedea0SLionel Sambuc$!
76ebfedea0SLionel Sambuc$   ARCH = F$EDIT( F$GETSYI( "ARCH_NAME"), "UPCASE")
77ebfedea0SLionel Sambuc$   IF (ARCH .EQS. "") THEN ARCH = "UNK"
78ebfedea0SLionel Sambuc$!
79ebfedea0SLionel Sambuc$! End The Architecture Check.
80ebfedea0SLionel Sambuc$!
81ebfedea0SLionel Sambuc$ ENDIF
82ebfedea0SLionel Sambuc$!
83ebfedea0SLionel Sambuc$ ARCHD = ARCH
84ebfedea0SLionel Sambuc$ LIB32 = "32"
85ebfedea0SLionel Sambuc$ OPT_FILE = ""
86ebfedea0SLionel Sambuc$ POINTER_SIZE = ""
87ebfedea0SLionel Sambuc$!
88ebfedea0SLionel Sambuc$! Set the names of the engines we want to build
89ebfedea0SLionel Sambuc$! NOTE: Some might think this list ugly.  However, it's made this way to
90ebfedea0SLionel Sambuc$! reflect the LIBNAMES variable in Makefile as closely as possible,
91ebfedea0SLionel Sambuc$! thereby making it fairly easy to verify that the lists are the same.
92ebfedea0SLionel Sambuc$! NOTE: gmp isn't built, as it's mostly a test engine and brings in another
93ebfedea0SLionel Sambuc$! library that isn't necessarely ported to VMS.
94ebfedea0SLionel Sambuc$!
95ebfedea0SLionel Sambuc$ ENGINES = "," + P6
96ebfedea0SLionel Sambuc$ IF ENGINES .EQS. "," THEN -
97ebfedea0SLionel Sambuc	ENGINES = ",4758cca,aep,atalla,cswift,chil,nuron,sureware,ubsec,padlock,"
98ebfedea0SLionel Sambuc$!
99ebfedea0SLionel Sambuc$! GOST requires a 64-bit integer type, unavailable on VAX.
100ebfedea0SLionel Sambuc$!
101ebfedea0SLionel Sambuc$ IF (ARCH .NES. "VAX") THEN -
102ebfedea0SLionel Sambuc       ENGINES = ENGINES+ ",ccgost"
103ebfedea0SLionel Sambuc$!
104ebfedea0SLionel Sambuc$! Check options.
105ebfedea0SLionel Sambuc$!
106ebfedea0SLionel Sambuc$ OPT_PHASE = P1
107ebfedea0SLionel Sambuc$ ACCEPT_PHASE = "ALL,ENGINES"
108ebfedea0SLionel Sambuc$ OPT_DEBUG = P2
109ebfedea0SLionel Sambuc$ OPT_COMPILER = P3
110ebfedea0SLionel Sambuc$ OPT_TCPIP_LIB = P4
111ebfedea0SLionel Sambuc$ OPT_SPECIAL_THREADS = P5
112ebfedea0SLionel Sambuc$ OPT_POINTER_SIZE = P7
113ebfedea0SLionel Sambuc$ ZLIB = P8
114ebfedea0SLionel Sambuc$
115ebfedea0SLionel Sambuc$ GOSUB CHECK_OPTIONS
116ebfedea0SLionel Sambuc$!
117ebfedea0SLionel Sambuc$! Set the goal directories, and create them if necessary
118ebfedea0SLionel Sambuc$!
119ebfedea0SLionel Sambuc$ OBJ_DIR := SYS$DISK:[-.'ARCHD'.OBJ.ENGINES]
120ebfedea0SLionel Sambuc$ EXE_DIR := SYS$DISK:[-.'ARCHD'.EXE.ENGINES]
121ebfedea0SLionel Sambuc$ IF F$PARSE(OBJ_DIR) .EQS. "" THEN CREATE/DIRECTORY 'OBJ_DIR'
122ebfedea0SLionel Sambuc$ IF F$PARSE(EXE_DIR) .EQS. "" THEN CREATE/DIRECTORY 'EXE_DIR'
123ebfedea0SLionel Sambuc$!
124ebfedea0SLionel Sambuc$! Set the goal files, and create them if necessary
125ebfedea0SLionel Sambuc$!
126ebfedea0SLionel Sambuc$ CRYPTO_LIB := SYS$DISK:[-.'ARCHD'.EXE.CRYPTO]SSL_LIBCRYPTO'LIB32'.OLB
127ebfedea0SLionel Sambuc$ IF F$SEARCH(CRYPTO_LIB) .EQS. "" THEN LIBRARY/CREATE/OBJECT 'CRYPTO_LIB'
128ebfedea0SLionel Sambuc$!
129ebfedea0SLionel Sambuc$! Specify the destination directory in any /MAP option.
130ebfedea0SLionel Sambuc$!
131ebfedea0SLionel Sambuc$ if (LINKMAP .eqs. "MAP")
132ebfedea0SLionel Sambuc$ then
133ebfedea0SLionel Sambuc$   LINKMAP = LINKMAP+ "=''EXE_DIR'"
134ebfedea0SLionel Sambuc$ endif
135ebfedea0SLionel Sambuc$!
136ebfedea0SLionel Sambuc$! Add the location prefix to the linker options file name.
137ebfedea0SLionel Sambuc$!
138ebfedea0SLionel Sambuc$ if (OPT_FILE .nes. "")
139ebfedea0SLionel Sambuc$ then
140ebfedea0SLionel Sambuc$   OPT_FILE = EXE_DIR+ OPT_FILE
141ebfedea0SLionel Sambuc$ endif
142ebfedea0SLionel Sambuc$!
143ebfedea0SLionel Sambuc$! Initialise.
144ebfedea0SLionel Sambuc$!
145ebfedea0SLionel Sambuc$ GOSUB INITIALISE
146ebfedea0SLionel Sambuc$ GOSUB CHECK_OPT_FILE
147ebfedea0SLionel Sambuc$!
148ebfedea0SLionel Sambuc$! Define what goes into each engine.  VAX includes a transfer vector.
149ebfedea0SLionel Sambuc$!
150ebfedea0SLionel Sambuc$ ENGINE_ = ""
151ebfedea0SLionel Sambuc$ TV_OBJ = ""
152ebfedea0SLionel Sambuc$ IF ARCH .EQS. "VAX"
153ebfedea0SLionel Sambuc$ THEN
154ebfedea0SLionel Sambuc$   ENGINE_ = "engine_vector.mar"
155ebfedea0SLionel Sambuc$   TV_OBJ_NAME = OBJ_DIR + F$PARSE(ENGINE_,,,"NAME","SYNTAX_ONLY") + ".OBJ"
156ebfedea0SLionel Sambuc$   TV_OBJ = ",''TV_OBJ_NAME'"
157ebfedea0SLionel Sambuc$ ENDIF
158*0a6a1f1dSLionel Sambuc$ ENGINE_4758cca = "e_4758cca"
159ebfedea0SLionel Sambuc$ ENGINE_aep = "e_aep"
160ebfedea0SLionel Sambuc$ ENGINE_atalla = "e_atalla"
161ebfedea0SLionel Sambuc$ ENGINE_cswift = "e_cswift"
162ebfedea0SLionel Sambuc$ ENGINE_chil = "e_chil"
163ebfedea0SLionel Sambuc$ ENGINE_nuron = "e_nuron"
164ebfedea0SLionel Sambuc$ ENGINE_sureware = "e_sureware"
165ebfedea0SLionel Sambuc$ ENGINE_ubsec = "e_ubsec"
166ebfedea0SLionel Sambuc$ ENGINE_padlock = "e_padlock"
167ebfedea0SLionel Sambuc$
168ebfedea0SLionel Sambuc$ ENGINE_ccgost_SUBDIR = "ccgost"
169ebfedea0SLionel Sambuc$ ENGINE_ccgost = "e_gost_err,gost2001_keyx,gost2001,gost89,gost94_keyx,"+ -
170ebfedea0SLionel Sambuc		  "gost_ameth,gost_asn1,gost_crypt,gost_ctl,gost_eng,"+ -
171ebfedea0SLionel Sambuc		  "gosthash,gost_keywrap,gost_md,gost_params,gost_pmeth,"+ -
172ebfedea0SLionel Sambuc		  "gost_sign"
173ebfedea0SLionel Sambuc$!
174ebfedea0SLionel Sambuc$! Define which programs need to be linked with a TCP/IP library
175ebfedea0SLionel Sambuc$!
176ebfedea0SLionel Sambuc$ TCPIP_ENGINES = ",,"
177ebfedea0SLionel Sambuc$ IF COMPILER .EQS. "VAXC" THEN -
178ebfedea0SLionel Sambuc     TCPIP_ENGINES = ",,"
179ebfedea0SLionel Sambuc$!
180ebfedea0SLionel Sambuc$! Set up two loops, one that keeps track of the engines,
181ebfedea0SLionel Sambuc$! and one that keeps track of all the files going into
182ebfedea0SLionel Sambuc$! the current engine.
183ebfedea0SLionel Sambuc$!
184ebfedea0SLionel Sambuc$! Here's the start of the engine loop.
185ebfedea0SLionel Sambuc$!
186ebfedea0SLionel Sambuc$ ENGINE_COUNTER = 0
187ebfedea0SLionel Sambuc$ ENGINE_NEXT:
188ebfedea0SLionel Sambuc$!
189ebfedea0SLionel Sambuc$! Extract the current engine name, and if we've reached the end, stop
190ebfedea0SLionel Sambuc$!
191ebfedea0SLionel Sambuc$ ENGINE_NAME = F$ELEMENT(ENGINE_COUNTER,",",ENGINES)
192ebfedea0SLionel Sambuc$ IF (ENGINE_NAME.EQS.",") THEN GOTO ENGINE_DONE
193ebfedea0SLionel Sambuc$!
194ebfedea0SLionel Sambuc$ ENGINE_COUNTER = ENGINE_COUNTER + 1
195ebfedea0SLionel Sambuc$!
196ebfedea0SLionel Sambuc$! Set up the engine library names.
197ebfedea0SLionel Sambuc$!
198ebfedea0SLionel Sambuc$ LIB_ENGINE = "ENGINE_" + ENGINE_NAME
199ebfedea0SLionel Sambuc$!
200ebfedea0SLionel Sambuc$! Check if the library module name actually is defined
201ebfedea0SLionel Sambuc$!
202ebfedea0SLionel Sambuc$ IF F$TYPE('LIB_ENGINE') .EQS. ""
203ebfedea0SLionel Sambuc$ THEN
204ebfedea0SLionel Sambuc$   WRITE SYS$ERROR ""
205ebfedea0SLionel Sambuc$   WRITE SYS$ERROR "The module ",ENGINE_NAME," does not exist.  Continuing..."
206ebfedea0SLionel Sambuc$   WRITE SYS$ERROR ""
207ebfedea0SLionel Sambuc$   GOTO ENGINE_NEXT
208ebfedea0SLionel Sambuc$ ENDIF
209ebfedea0SLionel Sambuc$!
210ebfedea0SLionel Sambuc$! Talk to the user
211ebfedea0SLionel Sambuc$!
212ebfedea0SLionel Sambuc$ IF ENGINE_NAME .NES. ""
213ebfedea0SLionel Sambuc$ THEN
214ebfedea0SLionel Sambuc$   WRITE SYS$OUTPUT "Compiling The ",ENGINE_NAME," Library Files. (",BUILDALL,")"
215ebfedea0SLionel Sambuc$ ELSE
216ebfedea0SLionel Sambuc$   WRITE SYS$OUTPUT "Compiling Support Files. (",BUILDALL,")"
217ebfedea0SLionel Sambuc$ ENDIF
218ebfedea0SLionel Sambuc$!
219ebfedea0SLionel Sambuc$! Create a .OPT file for the object files (for a real engine name).
220ebfedea0SLionel Sambuc$!
221ebfedea0SLionel Sambuc$ IF ENGINE_NAME .NES. ""
222ebfedea0SLionel Sambuc$ THEN
223ebfedea0SLionel Sambuc$   OPEN /WRITE OBJECTS 'EXE_DIR''ENGINE_NAME'.OPT
224ebfedea0SLionel Sambuc$ ENDIF
225ebfedea0SLionel Sambuc$!
226ebfedea0SLionel Sambuc$! Here's the start of per-engine module loop.
227ebfedea0SLionel Sambuc$!
228ebfedea0SLionel Sambuc$ FILE_COUNTER = 0
229ebfedea0SLionel Sambuc$ FILE_NEXT:
230ebfedea0SLionel Sambuc$!
231ebfedea0SLionel Sambuc$! Extract the file name from the file list, and if we've reached the end, stop
232ebfedea0SLionel Sambuc$!
233ebfedea0SLionel Sambuc$ FILE_NAME = F$ELEMENT(FILE_COUNTER,",",'LIB_ENGINE')
234ebfedea0SLionel Sambuc$ IF (FILE_NAME.EQS.",") THEN GOTO FILE_DONE
235ebfedea0SLionel Sambuc$!
236ebfedea0SLionel Sambuc$ FILE_COUNTER = FILE_COUNTER + 1
237ebfedea0SLionel Sambuc$!
238ebfedea0SLionel Sambuc$ IF FILE_NAME .EQS. "" THEN GOTO FILE_NEXT
239ebfedea0SLionel Sambuc$!
240ebfedea0SLionel Sambuc$! Set up the source and object reference
241ebfedea0SLionel Sambuc$!
242ebfedea0SLionel Sambuc$ IF F$TYPE('LIB_ENGINE'_SUBDIR) .EQS. ""
243ebfedea0SLionel Sambuc$ THEN
244ebfedea0SLionel Sambuc$     SOURCE_FILE = F$PARSE(FILE_NAME,"SYS$DISK:[].C",,,"SYNTAX_ONLY")
245ebfedea0SLionel Sambuc$ ELSE
246ebfedea0SLionel Sambuc$     SOURCE_FILE = F$PARSE(FILE_NAME,"SYS$DISK:[."+'LIB_ENGINE'_SUBDIR+"].C",,,"SYNTAX_ONLY")
247ebfedea0SLionel Sambuc$ ENDIF
248ebfedea0SLionel Sambuc$ OBJECT_FILE = OBJ_DIR + F$PARSE(FILE_NAME,,,"NAME","SYNTAX_ONLY") + ".OBJ"
249ebfedea0SLionel Sambuc$!
250ebfedea0SLionel Sambuc$! If we get some problem, we just go on trying to build the next module.
251ebfedea0SLionel Sambuc$ ON WARNING THEN GOTO FILE_NEXT
252ebfedea0SLionel Sambuc$!
253ebfedea0SLionel Sambuc$! Check if the module we want to compile is actually there.
254ebfedea0SLionel Sambuc$!
255ebfedea0SLionel Sambuc$ IF F$SEARCH(SOURCE_FILE) .EQS. ""
256ebfedea0SLionel Sambuc$ THEN
257ebfedea0SLionel Sambuc$   WRITE SYS$OUTPUT ""
258ebfedea0SLionel Sambuc$   WRITE SYS$OUTPUT "The File ",SOURCE_FILE," Doesn't Exist."
259ebfedea0SLionel Sambuc$   WRITE SYS$OUTPUT ""
260ebfedea0SLionel Sambuc$   GOTO EXIT
261ebfedea0SLionel Sambuc$ ENDIF
262ebfedea0SLionel Sambuc$!
263ebfedea0SLionel Sambuc$! Talk to the user.
264ebfedea0SLionel Sambuc$!
265ebfedea0SLionel Sambuc$ WRITE SYS$OUTPUT "	",FILE_NAME,""
266ebfedea0SLionel Sambuc$!
267ebfedea0SLionel Sambuc$! Do the dirty work.
268ebfedea0SLionel Sambuc$!
269ebfedea0SLionel Sambuc$ ON ERROR THEN GOTO FILE_NEXT
270ebfedea0SLionel Sambuc$ IF F$EDIT(F$PARSE(SOURCE_FILE,,,"TYPE","SYNTAX_ONLY"),"UPCASE") .EQS. ".MAR"
271ebfedea0SLionel Sambuc$ THEN
272ebfedea0SLionel Sambuc$   MACRO/OBJECT='OBJECT_FILE' 'SOURCE_FILE'
273ebfedea0SLionel Sambuc$ ELSE
274ebfedea0SLionel Sambuc$   CC/OBJECT='OBJECT_FILE' 'SOURCE_FILE'
275ebfedea0SLionel Sambuc$ ENDIF
276ebfedea0SLionel Sambuc$!
277ebfedea0SLionel Sambuc$! Write the entry to the .OPT file (for a real engine name).
278ebfedea0SLionel Sambuc$!
279ebfedea0SLionel Sambuc$ IF ENGINE_NAME .NES. ""
280ebfedea0SLionel Sambuc$ THEN
281ebfedea0SLionel Sambuc$   WRITE OBJECTS OBJECT_FILE
282ebfedea0SLionel Sambuc$ ENDIF
283ebfedea0SLionel Sambuc$!
284ebfedea0SLionel Sambuc$! Next file
285ebfedea0SLionel Sambuc$!
286ebfedea0SLionel Sambuc$ GOTO FILE_NEXT
287ebfedea0SLionel Sambuc$!
288ebfedea0SLionel Sambuc$ FILE_DONE:
289ebfedea0SLionel Sambuc$!
290ebfedea0SLionel Sambuc$! Do not link the support files.
291ebfedea0SLionel Sambuc$!
292ebfedea0SLionel Sambuc$ IF ENGINE_NAME .EQS. "" THEN GOTO ENGINE_NEXT
293ebfedea0SLionel Sambuc$!
294ebfedea0SLionel Sambuc$! Close the linker options file (for a real engine name).
295ebfedea0SLionel Sambuc$!
296ebfedea0SLionel Sambuc$ CLOSE OBJECTS
297ebfedea0SLionel Sambuc$!
298ebfedea0SLionel Sambuc$! Now, there are two ways to handle this.  We can either build
299ebfedea0SLionel Sambuc$! shareable images or stick the engine object file into libcrypto.
300ebfedea0SLionel Sambuc$! For now, the latter is NOT supported.
301ebfedea0SLionel Sambuc$!
302ebfedea0SLionel Sambuc$!!!!! LIBRARY/REPLACE 'CRYPTO_LIB' 'OBJECT_FILE'
303ebfedea0SLionel Sambuc$!
304ebfedea0SLionel Sambuc$! For shareable libraries, we need to do things a little differently
305ebfedea0SLionel Sambuc$! depending on if we link with a TCP/IP library or not.
306ebfedea0SLionel Sambuc$!
307ebfedea0SLionel Sambuc$ ENGINE_OPT := SYS$DISK:[]'ARCH'.OPT
308ebfedea0SLionel Sambuc$ LINK /'DEBUGGER' /'LINKMAP' /'TRACEBACK' /SHARE='EXE_DIR''ENGINE_NAME'.EXE -
309ebfedea0SLionel Sambuc   'EXE_DIR''ENGINE_NAME'.OPT /OPTIONS -
310ebfedea0SLionel Sambuc   'TV_OBJ', -
311ebfedea0SLionel Sambuc   'CRYPTO_LIB' /LIBRARY, -
312ebfedea0SLionel Sambuc   'ENGINE_OPT' /OPTIONS -
313ebfedea0SLionel Sambuc   'TCPIP_LIB' -
314ebfedea0SLionel Sambuc   'ZLIB_LIB' -
315ebfedea0SLionel Sambuc   ,'OPT_FILE' /OPTIONS
316ebfedea0SLionel Sambuc$!
317ebfedea0SLionel Sambuc$! Next engine
318ebfedea0SLionel Sambuc$!
319ebfedea0SLionel Sambuc$ GOTO ENGINE_NEXT
320ebfedea0SLionel Sambuc$!
321ebfedea0SLionel Sambuc$ ENGINE_DONE:
322ebfedea0SLionel Sambuc$!
323ebfedea0SLionel Sambuc$! Talk to the user
324ebfedea0SLionel Sambuc$!
325ebfedea0SLionel Sambuc$ WRITE SYS$OUTPUT "All Done..."
326ebfedea0SLionel Sambuc$ EXIT:
327ebfedea0SLionel Sambuc$ GOSUB CLEANUP
328ebfedea0SLionel Sambuc$ EXIT
329ebfedea0SLionel Sambuc$!
330ebfedea0SLionel Sambuc$! Check For The Link Option FIle.
331ebfedea0SLionel Sambuc$!
332ebfedea0SLionel Sambuc$ CHECK_OPT_FILE:
333ebfedea0SLionel Sambuc$!
334ebfedea0SLionel Sambuc$! Check To See If We Need To Make A VAX C Option File.
335ebfedea0SLionel Sambuc$!
336ebfedea0SLionel Sambuc$ IF (COMPILER.EQS."VAXC")
337ebfedea0SLionel Sambuc$ THEN
338ebfedea0SLionel Sambuc$!
339ebfedea0SLionel Sambuc$!  Check To See If We Already Have A VAX C Linker Option File.
340ebfedea0SLionel Sambuc$!
341ebfedea0SLionel Sambuc$   IF (F$SEARCH(OPT_FILE).EQS."")
342ebfedea0SLionel Sambuc$   THEN
343ebfedea0SLionel Sambuc$!
344ebfedea0SLionel Sambuc$!    We Need A VAX C Linker Option File.
345ebfedea0SLionel Sambuc$!
346ebfedea0SLionel Sambuc$     CREATE 'OPT_FILE'
347ebfedea0SLionel Sambuc$DECK
348ebfedea0SLionel Sambuc!
349ebfedea0SLionel Sambuc! Default System Options File To Link Against
350ebfedea0SLionel Sambuc! The Sharable VAX C Runtime Library.
351ebfedea0SLionel Sambuc!
352ebfedea0SLionel SambucSYS$SHARE:VAXCRTL.EXE/SHARE
353ebfedea0SLionel Sambuc$EOD
354ebfedea0SLionel Sambuc$!
355ebfedea0SLionel Sambuc$!  End The Option File Check.
356ebfedea0SLionel Sambuc$!
357ebfedea0SLionel Sambuc$   ENDIF
358ebfedea0SLionel Sambuc$!
359ebfedea0SLionel Sambuc$! End The VAXC Check.
360ebfedea0SLionel Sambuc$!
361ebfedea0SLionel Sambuc$ ENDIF
362ebfedea0SLionel Sambuc$!
363ebfedea0SLionel Sambuc$! Check To See If We Need A GNU C Option File.
364ebfedea0SLionel Sambuc$!
365ebfedea0SLionel Sambuc$ IF (COMPILER.EQS."GNUC")
366ebfedea0SLionel Sambuc$ THEN
367ebfedea0SLionel Sambuc$!
368ebfedea0SLionel Sambuc$!  Check To See If We Already Have A GNU C Linker Option File.
369ebfedea0SLionel Sambuc$!
370ebfedea0SLionel Sambuc$   IF (F$SEARCH(OPT_FILE).EQS."")
371ebfedea0SLionel Sambuc$   THEN
372ebfedea0SLionel Sambuc$!
373ebfedea0SLionel Sambuc$!    We Need A GNU C Linker Option File.
374ebfedea0SLionel Sambuc$!
375ebfedea0SLionel Sambuc$     CREATE 'OPT_FILE'
376ebfedea0SLionel Sambuc$DECK
377ebfedea0SLionel Sambuc!
378ebfedea0SLionel Sambuc! Default System Options File To Link Against
379ebfedea0SLionel Sambuc! The Sharable C Runtime Library.
380ebfedea0SLionel Sambuc!
381ebfedea0SLionel SambucGNU_CC:[000000]GCCLIB/LIBRARY
382ebfedea0SLionel SambucSYS$SHARE:VAXCRTL/SHARE
383ebfedea0SLionel Sambuc$EOD
384ebfedea0SLionel Sambuc$!
385ebfedea0SLionel Sambuc$!  End The Option File Check.
386ebfedea0SLionel Sambuc$!
387ebfedea0SLionel Sambuc$   ENDIF
388ebfedea0SLionel Sambuc$!
389ebfedea0SLionel Sambuc$! End The GNU C Check.
390ebfedea0SLionel Sambuc$!
391ebfedea0SLionel Sambuc$ ENDIF
392ebfedea0SLionel Sambuc$!
393ebfedea0SLionel Sambuc$! Check To See If We Need A DEC C Option File.
394ebfedea0SLionel Sambuc$!
395ebfedea0SLionel Sambuc$ IF (COMPILER.EQS."DECC")
396ebfedea0SLionel Sambuc$ THEN
397ebfedea0SLionel Sambuc$!
398ebfedea0SLionel Sambuc$!  Check To See If We Already Have A DEC C Linker Option File.
399ebfedea0SLionel Sambuc$!
400ebfedea0SLionel Sambuc$   IF (F$SEARCH(OPT_FILE).EQS."")
401ebfedea0SLionel Sambuc$   THEN
402ebfedea0SLionel Sambuc$!
403ebfedea0SLionel Sambuc$!    Figure Out If We Need A non-VAX Or A VAX Linker Option File.
404ebfedea0SLionel Sambuc$!
405ebfedea0SLionel Sambuc$     IF ARCH .EQS. "VAX"
406ebfedea0SLionel Sambuc$     THEN
407ebfedea0SLionel Sambuc$!
408ebfedea0SLionel Sambuc$!      We Need A DEC C Linker Option File For VAX.
409ebfedea0SLionel Sambuc$!
410ebfedea0SLionel Sambuc$       CREATE 'OPT_FILE'
411ebfedea0SLionel Sambuc$DECK
412ebfedea0SLionel Sambuc!
413ebfedea0SLionel Sambuc! Default System Options File To Link Against
414ebfedea0SLionel Sambuc! The Sharable DEC C Runtime Library.
415ebfedea0SLionel Sambuc!
416ebfedea0SLionel SambucSYS$SHARE:DECC$SHR.EXE/SHARE
417ebfedea0SLionel Sambuc$EOD
418ebfedea0SLionel Sambuc$!
419ebfedea0SLionel Sambuc$!    Else...
420ebfedea0SLionel Sambuc$!
421ebfedea0SLionel Sambuc$     ELSE
422ebfedea0SLionel Sambuc$!
423ebfedea0SLionel Sambuc$!      Create The non-VAX Linker Option File.
424ebfedea0SLionel Sambuc$!
425ebfedea0SLionel Sambuc$       CREATE 'OPT_FILE'
426ebfedea0SLionel Sambuc$DECK
427ebfedea0SLionel Sambuc!
428ebfedea0SLionel Sambuc! Default System Options File For non-VAX To Link Against
429ebfedea0SLionel Sambuc! The Sharable C Runtime Library.
430ebfedea0SLionel Sambuc!
431ebfedea0SLionel SambucSYS$SHARE:CMA$OPEN_LIB_SHR/SHARE
432ebfedea0SLionel SambucSYS$SHARE:CMA$OPEN_RTL/SHARE
433ebfedea0SLionel Sambuc$EOD
434ebfedea0SLionel Sambuc$!
435ebfedea0SLionel Sambuc$!    End The DEC C Option File Check.
436ebfedea0SLionel Sambuc$!
437ebfedea0SLionel Sambuc$     ENDIF
438ebfedea0SLionel Sambuc$!
439ebfedea0SLionel Sambuc$!  End The Option File Search.
440ebfedea0SLionel Sambuc$!
441ebfedea0SLionel Sambuc$   ENDIF
442ebfedea0SLionel Sambuc$!
443ebfedea0SLionel Sambuc$! End The DEC C Check.
444ebfedea0SLionel Sambuc$!
445ebfedea0SLionel Sambuc$ ENDIF
446ebfedea0SLionel Sambuc$!
447ebfedea0SLionel Sambuc$!  Tell The User What Linker Option File We Are Using.
448ebfedea0SLionel Sambuc$!
449ebfedea0SLionel Sambuc$ WRITE SYS$OUTPUT "Using Linker Option File ",OPT_FILE,"."
450ebfedea0SLionel Sambuc$!
451ebfedea0SLionel Sambuc$! Time To RETURN.
452ebfedea0SLionel Sambuc$!
453ebfedea0SLionel Sambuc$ RETURN
454ebfedea0SLionel Sambuc$!
455ebfedea0SLionel Sambuc$! Check The User's Options.
456ebfedea0SLionel Sambuc$!
457ebfedea0SLionel Sambuc$ CHECK_OPTIONS:
458ebfedea0SLionel Sambuc$!
459ebfedea0SLionel Sambuc$! Check To See If OPT_PHASE Is Blank.
460ebfedea0SLionel Sambuc$!
461ebfedea0SLionel Sambuc$ IF (OPT_PHASE.EQS."ALL")
462ebfedea0SLionel Sambuc$ THEN
463ebfedea0SLionel Sambuc$!
464ebfedea0SLionel Sambuc$!   OPT_PHASE Is Blank, So Build Everything.
465ebfedea0SLionel Sambuc$!
466ebfedea0SLionel Sambuc$    BUILDALL = "ALL"
467ebfedea0SLionel Sambuc$!
468ebfedea0SLionel Sambuc$! Else...
469ebfedea0SLionel Sambuc$!
470ebfedea0SLionel Sambuc$ ELSE
471ebfedea0SLionel Sambuc$!
472ebfedea0SLionel Sambuc$!  Else, Check To See If OPT_PHASE Has A Valid Argument.
473ebfedea0SLionel Sambuc$!
474ebfedea0SLionel Sambuc$   IF ("," + ACCEPT_PHASE + ",") - ("," + OPT_PHASE + ",") -
475ebfedea0SLionel Sambuc       .NES. ("," + ACCEPT_PHASE + ",")
476ebfedea0SLionel Sambuc$   THEN
477ebfedea0SLionel Sambuc$!
478ebfedea0SLionel Sambuc$!    A Valid Argument.
479ebfedea0SLionel Sambuc$!
480ebfedea0SLionel Sambuc$     BUILDALL = OPT_PHASE
481ebfedea0SLionel Sambuc$!
482ebfedea0SLionel Sambuc$!  Else...
483ebfedea0SLionel Sambuc$!
484ebfedea0SLionel Sambuc$   ELSE
485ebfedea0SLionel Sambuc$!
486ebfedea0SLionel Sambuc$!    Tell The User We Don't Know What They Want.
487ebfedea0SLionel Sambuc$!
488ebfedea0SLionel Sambuc$     WRITE SYS$OUTPUT ""
489ebfedea0SLionel Sambuc$     WRITE SYS$OUTPUT "The option ",OPT_PHASE," is invalid.  The valid options are:"
490ebfedea0SLionel Sambuc$     WRITE SYS$OUTPUT ""
491ebfedea0SLionel Sambuc$     IF ("," + ACCEPT_PHASE + ",") - ",ALL," -
492ebfedea0SLionel Sambuc	.NES. ("," + ACCEPT_PHASE + ",") THEN -
493ebfedea0SLionel Sambuc	WRITE SYS$OUTPUT "    ALL      :  just build everything."
494ebfedea0SLionel Sambuc$     IF ("," + ACCEPT_PHASE + ",") - ",ENGINES," -
495ebfedea0SLionel Sambuc	.NES. ("," + ACCEPT_PHASE + ",") THEN -
496ebfedea0SLionel Sambuc	WRITE SYS$OUTPUT "    ENGINES  :  to compile just the [.xxx.EXE.ENGINES]*.EXE hareable images."
497ebfedea0SLionel Sambuc$     WRITE SYS$OUTPUT ""
498ebfedea0SLionel Sambuc$     WRITE SYS$OUTPUT " where 'xxx' stands for:"
499ebfedea0SLionel Sambuc$     WRITE SYS$OUTPUT ""
500ebfedea0SLionel Sambuc$     WRITE SYS$OUTPUT "    ALPHA[64]:  Alpha architecture."
501ebfedea0SLionel Sambuc$     WRITE SYS$OUTPUT "    IA64[64] :  IA64 architecture."
502ebfedea0SLionel Sambuc$     WRITE SYS$OUTPUT "    VAX      :  VAX architecture."
503ebfedea0SLionel Sambuc$     WRITE SYS$OUTPUT ""
504ebfedea0SLionel Sambuc$!
505ebfedea0SLionel Sambuc$!    Time To EXIT.
506ebfedea0SLionel Sambuc$!
507ebfedea0SLionel Sambuc$     EXIT
508ebfedea0SLionel Sambuc$!
509ebfedea0SLionel Sambuc$!  End The Valid Argument Check.
510ebfedea0SLionel Sambuc$!
511ebfedea0SLionel Sambuc$   ENDIF
512ebfedea0SLionel Sambuc$!
513ebfedea0SLionel Sambuc$! End The OPT_PHASE Check.
514ebfedea0SLionel Sambuc$!
515ebfedea0SLionel Sambuc$ ENDIF
516ebfedea0SLionel Sambuc$!
517ebfedea0SLionel Sambuc$! Check To See If OPT_DEBUG Is Blank.
518ebfedea0SLionel Sambuc$!
519ebfedea0SLionel Sambuc$ IF (OPT_DEBUG.EQS."NODEBUG")
520ebfedea0SLionel Sambuc$ THEN
521ebfedea0SLionel Sambuc$!
522ebfedea0SLionel Sambuc$!  OPT_DEBUG Is NODEBUG, So Compile Without The Debugger Information.
523ebfedea0SLionel Sambuc$!
524ebfedea0SLionel Sambuc$   DEBUGGER = "NODEBUG"
525ebfedea0SLionel Sambuc$   LINKMAP = "NOMAP"
526ebfedea0SLionel Sambuc$   TRACEBACK = "NOTRACEBACK"
527ebfedea0SLionel Sambuc$   GCC_OPTIMIZE = "OPTIMIZE"
528ebfedea0SLionel Sambuc$   CC_OPTIMIZE = "OPTIMIZE"
529ebfedea0SLionel Sambuc$   MACRO_OPTIMIZE = "OPTIMIZE"
530ebfedea0SLionel Sambuc$   WRITE SYS$OUTPUT "No Debugger Information Will Be Produced During Compile."
531ebfedea0SLionel Sambuc$   WRITE SYS$OUTPUT "Compiling With Compiler Optimization."
532ebfedea0SLionel Sambuc$ ELSE
533ebfedea0SLionel Sambuc$!
534ebfedea0SLionel Sambuc$!  Check To See If We Are To Compile With Debugger Information.
535ebfedea0SLionel Sambuc$!
536ebfedea0SLionel Sambuc$   IF (OPT_DEBUG.EQS."DEBUG")
537ebfedea0SLionel Sambuc$   THEN
538ebfedea0SLionel Sambuc$!
539ebfedea0SLionel Sambuc$!    Compile With Debugger Information.
540ebfedea0SLionel Sambuc$!
541ebfedea0SLionel Sambuc$     DEBUGGER = "DEBUG"
542ebfedea0SLionel Sambuc$     LINKMAP = "MAP"
543ebfedea0SLionel Sambuc$     TRACEBACK = "TRACEBACK"
544ebfedea0SLionel Sambuc$     GCC_OPTIMIZE = "NOOPTIMIZE"
545ebfedea0SLionel Sambuc$     CC_OPTIMIZE = "NOOPTIMIZE"
546ebfedea0SLionel Sambuc$     MACRO_OPTIMIZE = "NOOPTIMIZE"
547ebfedea0SLionel Sambuc$     WRITE SYS$OUTPUT "Debugger Information Will Be Produced During Compile."
548ebfedea0SLionel Sambuc$     WRITE SYS$OUTPUT "Compiling Without Compiler Optimization."
549ebfedea0SLionel Sambuc$   ELSE
550ebfedea0SLionel Sambuc$!
551ebfedea0SLionel Sambuc$!    They Entered An Invalid Option.
552ebfedea0SLionel Sambuc$!
553ebfedea0SLionel Sambuc$     WRITE SYS$OUTPUT ""
554ebfedea0SLionel Sambuc$     WRITE SYS$OUTPUT "The Option ",OPT_DEBUG," Is Invalid.  The Valid Options Are:"
555ebfedea0SLionel Sambuc$     WRITE SYS$OUTPUT ""
556ebfedea0SLionel Sambuc$     WRITE SYS$OUTPUT "     DEBUG   :  Compile With The Debugger Information."
557ebfedea0SLionel Sambuc$     WRITE SYS$OUTPUT "     NODEBUG :  Compile Without The Debugger Information."
558ebfedea0SLionel Sambuc$     WRITE SYS$OUTPUT ""
559ebfedea0SLionel Sambuc$!
560ebfedea0SLionel Sambuc$!    Time To EXIT.
561ebfedea0SLionel Sambuc$!
562ebfedea0SLionel Sambuc$     EXIT
563ebfedea0SLionel Sambuc$!
564ebfedea0SLionel Sambuc$!  End The Valid Argument Check.
565ebfedea0SLionel Sambuc$!
566ebfedea0SLionel Sambuc$   ENDIF
567ebfedea0SLionel Sambuc$!
568ebfedea0SLionel Sambuc$! End The OPT_DEBUG Check.
569ebfedea0SLionel Sambuc$!
570ebfedea0SLionel Sambuc$ ENDIF
571ebfedea0SLionel Sambuc$!
572ebfedea0SLionel Sambuc$! Special Threads For OpenVMS v7.1 Or Later
573ebfedea0SLionel Sambuc$!
574ebfedea0SLionel Sambuc$! Written By:  Richard Levitte
575ebfedea0SLionel Sambuc$!              richard@levitte.org
576ebfedea0SLionel Sambuc$!
577ebfedea0SLionel Sambuc$!
578ebfedea0SLionel Sambuc$! Check To See If We Have A Option For OPT_SPECIAL_THREADS.
579ebfedea0SLionel Sambuc$!
580ebfedea0SLionel Sambuc$ IF (OPT_SPECIAL_THREADS.EQS."")
581ebfedea0SLionel Sambuc$ THEN
582ebfedea0SLionel Sambuc$!
583ebfedea0SLionel Sambuc$!  Get The Version Of VMS We Are Using.
584ebfedea0SLionel Sambuc$!
585ebfedea0SLionel Sambuc$   ISSEVEN :=
586ebfedea0SLionel Sambuc$   TMP = F$ELEMENT(0,"-",F$EXTRACT(1,4,F$GETSYI("VERSION")))
587ebfedea0SLionel Sambuc$   TMP = F$INTEGER(F$ELEMENT(0,".",TMP)+F$ELEMENT(1,".",TMP))
588ebfedea0SLionel Sambuc$!
589ebfedea0SLionel Sambuc$!  Check To See If The VMS Version Is v7.1 Or Later.
590ebfedea0SLionel Sambuc$!
591ebfedea0SLionel Sambuc$   IF (TMP.GE.71)
592ebfedea0SLionel Sambuc$   THEN
593ebfedea0SLionel Sambuc$!
594ebfedea0SLionel Sambuc$!    We Have OpenVMS v7.1 Or Later, So Use The Special Threads.
595ebfedea0SLionel Sambuc$!
596ebfedea0SLionel Sambuc$     ISSEVEN := ,PTHREAD_USE_D4
597ebfedea0SLionel Sambuc$!
598ebfedea0SLionel Sambuc$!  End The VMS Version Check.
599ebfedea0SLionel Sambuc$!
600ebfedea0SLionel Sambuc$   ENDIF
601ebfedea0SLionel Sambuc$!
602ebfedea0SLionel Sambuc$! End The OPT_SPECIAL_THREADS Check.
603ebfedea0SLionel Sambuc$!
604ebfedea0SLionel Sambuc$ ENDIF
605ebfedea0SLionel Sambuc$!
606ebfedea0SLionel Sambuc$! Check OPT_POINTER_SIZE (P7).
607ebfedea0SLionel Sambuc$!
608ebfedea0SLionel Sambuc$ IF (OPT_POINTER_SIZE .NES. "") .AND. (ARCH .NES. "VAX")
609ebfedea0SLionel Sambuc$ THEN
610ebfedea0SLionel Sambuc$!
611ebfedea0SLionel Sambuc$   IF (OPT_POINTER_SIZE .EQS. "32")
612ebfedea0SLionel Sambuc$   THEN
613ebfedea0SLionel Sambuc$     POINTER_SIZE = " /POINTER_SIZE=32"
614ebfedea0SLionel Sambuc$   ELSE
615ebfedea0SLionel Sambuc$     POINTER_SIZE = F$EDIT( OPT_POINTER_SIZE, "COLLAPSE, UPCASE")
616ebfedea0SLionel Sambuc$     IF ((POINTER_SIZE .EQS. "64") .OR. -
617ebfedea0SLionel Sambuc       (POINTER_SIZE .EQS. "64=") .OR. -
618ebfedea0SLionel Sambuc       (POINTER_SIZE .EQS. "64=ARGV"))
619ebfedea0SLionel Sambuc$     THEN
620ebfedea0SLionel Sambuc$       ARCHD = ARCH+ "_64"
621ebfedea0SLionel Sambuc$       LIB32 = ""
622ebfedea0SLionel Sambuc$       POINTER_SIZE = " /POINTER_SIZE=64"
623ebfedea0SLionel Sambuc$     ELSE
624ebfedea0SLionel Sambuc$!
625ebfedea0SLionel Sambuc$!      Tell The User Entered An Invalid Option.
626ebfedea0SLionel Sambuc$!
627ebfedea0SLionel Sambuc$       WRITE SYS$OUTPUT ""
628ebfedea0SLionel Sambuc$       WRITE SYS$OUTPUT "The Option ", OPT_POINTER_SIZE, -
629ebfedea0SLionel Sambuc         " Is Invalid.  The Valid Options Are:"
630ebfedea0SLionel Sambuc$       WRITE SYS$OUTPUT ""
631ebfedea0SLionel Sambuc$       WRITE SYS$OUTPUT -
632ebfedea0SLionel Sambuc         "    """"       :  Compile with default (short) pointers."
633ebfedea0SLionel Sambuc$       WRITE SYS$OUTPUT -
634ebfedea0SLionel Sambuc         "    32       :  Compile with 32-bit (short) pointers."
635ebfedea0SLionel Sambuc$       WRITE SYS$OUTPUT -
636ebfedea0SLionel Sambuc         "    64       :  Compile with 64-bit (long) pointers (auto ARGV)."
637ebfedea0SLionel Sambuc$       WRITE SYS$OUTPUT -
638ebfedea0SLionel Sambuc         "    64=      :  Compile with 64-bit (long) pointers (no ARGV)."
639ebfedea0SLionel Sambuc$       WRITE SYS$OUTPUT -
640ebfedea0SLionel Sambuc         "    64=ARGV  :  Compile with 64-bit (long) pointers (ARGV)."
641ebfedea0SLionel Sambuc$       WRITE SYS$OUTPUT ""
642ebfedea0SLionel Sambuc$!
643ebfedea0SLionel Sambuc$!      Time To EXIT.
644ebfedea0SLionel Sambuc$!
645ebfedea0SLionel Sambuc$       EXIT
646ebfedea0SLionel Sambuc$!
647ebfedea0SLionel Sambuc$     ENDIF
648ebfedea0SLionel Sambuc$!
649ebfedea0SLionel Sambuc$   ENDIF
650ebfedea0SLionel Sambuc$!
651ebfedea0SLionel Sambuc$! End The OPT_POINTER_SIZE Check.
652ebfedea0SLionel Sambuc$!
653ebfedea0SLionel Sambuc$ ENDIF
654ebfedea0SLionel Sambuc$!
655ebfedea0SLionel Sambuc$! Set basic C compiler /INCLUDE directories.
656ebfedea0SLionel Sambuc$!
657ebfedea0SLionel Sambuc$ CC_INCLUDES = "SYS$DISK:[],SYS$DISK:[.VENDOR_DEFNS]"
658ebfedea0SLionel Sambuc$!
659ebfedea0SLionel Sambuc$! Check To See If OPT_COMPILER Is Blank.
660ebfedea0SLionel Sambuc$!
661ebfedea0SLionel Sambuc$ IF (OPT_COMPILER.EQS."")
662ebfedea0SLionel Sambuc$ THEN
663ebfedea0SLionel Sambuc$!
664ebfedea0SLionel Sambuc$!  O.K., The User Didn't Specify A Compiler, Let's Try To
665ebfedea0SLionel Sambuc$!  Find Out Which One To Use.
666ebfedea0SLionel Sambuc$!
667ebfedea0SLionel Sambuc$!  Check To See If We Have GNU C.
668ebfedea0SLionel Sambuc$!
669ebfedea0SLionel Sambuc$   IF (F$TRNLNM("GNU_CC").NES."")
670ebfedea0SLionel Sambuc$   THEN
671ebfedea0SLionel Sambuc$!
672ebfedea0SLionel Sambuc$!    Looks Like GNUC, Set To Use GNUC.
673ebfedea0SLionel Sambuc$!
674ebfedea0SLionel Sambuc$     OPT_COMPILER = "GNUC"
675ebfedea0SLionel Sambuc$!
676ebfedea0SLionel Sambuc$!  Else...
677ebfedea0SLionel Sambuc$!
678ebfedea0SLionel Sambuc$   ELSE
679ebfedea0SLionel Sambuc$!
680ebfedea0SLionel Sambuc$!    Check To See If We Have VAXC Or DECC.
681ebfedea0SLionel Sambuc$!
682ebfedea0SLionel Sambuc$     IF (ARCH.NES."VAX").OR.(F$TRNLNM("DECC$CC_DEFAULT").NES."")
683ebfedea0SLionel Sambuc$     THEN
684ebfedea0SLionel Sambuc$!
685ebfedea0SLionel Sambuc$!      Looks Like DECC, Set To Use DECC.
686ebfedea0SLionel Sambuc$!
687ebfedea0SLionel Sambuc$       OPT_COMPILER = "DECC"
688ebfedea0SLionel Sambuc$!
689ebfedea0SLionel Sambuc$!    Else...
690ebfedea0SLionel Sambuc$!
691ebfedea0SLionel Sambuc$     ELSE
692ebfedea0SLionel Sambuc$!
693ebfedea0SLionel Sambuc$!      Looks Like VAXC, Set To Use VAXC.
694ebfedea0SLionel Sambuc$!
695ebfedea0SLionel Sambuc$       OPT_COMPILER = "VAXC"
696ebfedea0SLionel Sambuc$!
697ebfedea0SLionel Sambuc$!    End The VAXC Compiler Check.
698ebfedea0SLionel Sambuc$!
699ebfedea0SLionel Sambuc$     ENDIF
700ebfedea0SLionel Sambuc$!
701ebfedea0SLionel Sambuc$!  End The DECC & VAXC Compiler Check.
702ebfedea0SLionel Sambuc$!
703ebfedea0SLionel Sambuc$   ENDIF
704ebfedea0SLionel Sambuc$!
705ebfedea0SLionel Sambuc$!  End The Compiler Check.
706ebfedea0SLionel Sambuc$!
707ebfedea0SLionel Sambuc$ ENDIF
708ebfedea0SLionel Sambuc$!
709ebfedea0SLionel Sambuc$! Check To See If We Have A Option For OPT_TCPIP_LIB.
710ebfedea0SLionel Sambuc$!
711ebfedea0SLionel Sambuc$ IF (OPT_TCPIP_LIB.EQS."")
712ebfedea0SLionel Sambuc$ THEN
713ebfedea0SLionel Sambuc$!
714ebfedea0SLionel Sambuc$!  Find out what socket library we have available
715ebfedea0SLionel Sambuc$!
716ebfedea0SLionel Sambuc$   IF F$PARSE("SOCKETSHR:") .NES. ""
717ebfedea0SLionel Sambuc$   THEN
718ebfedea0SLionel Sambuc$!
719ebfedea0SLionel Sambuc$!    We have SOCKETSHR, and it is my opinion that it's the best to use.
720ebfedea0SLionel Sambuc$!
721ebfedea0SLionel Sambuc$     OPT_TCPIP_LIB = "SOCKETSHR"
722ebfedea0SLionel Sambuc$!
723ebfedea0SLionel Sambuc$!    Tell the user
724ebfedea0SLionel Sambuc$!
725ebfedea0SLionel Sambuc$     WRITE SYS$OUTPUT "Using SOCKETSHR for TCP/IP"
726ebfedea0SLionel Sambuc$!
727ebfedea0SLionel Sambuc$!    Else, let's look for something else
728ebfedea0SLionel Sambuc$!
729ebfedea0SLionel Sambuc$   ELSE
730ebfedea0SLionel Sambuc$!
731ebfedea0SLionel Sambuc$!    Like UCX (the reason to do this before Multinet is that the UCX
732ebfedea0SLionel Sambuc$!    emulation is easier to use...)
733ebfedea0SLionel Sambuc$!
734ebfedea0SLionel Sambuc$     IF F$TRNLNM("UCX$IPC_SHR") .NES. "" -
735ebfedea0SLionel Sambuc	 .OR. F$PARSE("SYS$SHARE:UCX$IPC_SHR.EXE") .NES. "" -
736ebfedea0SLionel Sambuc	 .OR. F$PARSE("SYS$LIBRARY:UCX$IPC.OLB") .NES. ""
737ebfedea0SLionel Sambuc$     THEN
738ebfedea0SLionel Sambuc$!
739ebfedea0SLionel Sambuc$!	Last resort: a UCX or UCX-compatible library
740ebfedea0SLionel Sambuc$!
741ebfedea0SLionel Sambuc$	OPT_TCPIP_LIB = "UCX"
742ebfedea0SLionel Sambuc$!
743ebfedea0SLionel Sambuc$!      Tell the user
744ebfedea0SLionel Sambuc$!
745ebfedea0SLionel Sambuc$       WRITE SYS$OUTPUT "Using UCX or an emulation thereof for TCP/IP"
746ebfedea0SLionel Sambuc$!
747ebfedea0SLionel Sambuc$!	That was all...
748ebfedea0SLionel Sambuc$!
749ebfedea0SLionel Sambuc$     ENDIF
750ebfedea0SLionel Sambuc$   ENDIF
751ebfedea0SLionel Sambuc$ ENDIF
752ebfedea0SLionel Sambuc$!
753ebfedea0SLionel Sambuc$! Set Up Initial CC Definitions, Possibly With User Ones
754ebfedea0SLionel Sambuc$!
755ebfedea0SLionel Sambuc$ CCDEFS = "TCPIP_TYPE_''OPT_TCPIP_LIB',DSO_VMS"
756ebfedea0SLionel Sambuc$ IF F$TYPE(USER_CCDEFS) .NES. "" THEN CCDEFS = CCDEFS + "," + USER_CCDEFS
757ebfedea0SLionel Sambuc$ CCEXTRAFLAGS = ""
758ebfedea0SLionel Sambuc$ IF F$TYPE(USER_CCFLAGS) .NES. "" THEN CCEXTRAFLAGS = USER_CCFLAGS
759*0a6a1f1dSLionel Sambuc$ CCDISABLEWARNINGS = "" !!! "MAYLOSEDATA3" !!! "LONGLONGTYPE,LONGLONGSUFX"
760*0a6a1f1dSLionel Sambuc$ IF F$TYPE(USER_CCDISABLEWARNINGS) .NES. ""
761*0a6a1f1dSLionel Sambuc$ THEN
762*0a6a1f1dSLionel Sambuc$     IF CCDISABLEWARNINGS .NES. "" THEN CCDISABLEWARNINGS = CCDISABLEWARNINGS + ","
763*0a6a1f1dSLionel Sambuc$     CCDISABLEWARNINGS = CCDISABLEWARNINGS + USER_CCDISABLEWARNINGS
764*0a6a1f1dSLionel Sambuc$ ENDIF
765ebfedea0SLionel Sambuc$!
766ebfedea0SLionel Sambuc$! Check To See If We Have A ZLIB Option.
767ebfedea0SLionel Sambuc$!
768ebfedea0SLionel Sambuc$ IF (ZLIB .NES. "")
769ebfedea0SLionel Sambuc$ THEN
770ebfedea0SLionel Sambuc$!
771ebfedea0SLionel Sambuc$!  Check for expected ZLIB files.
772ebfedea0SLionel Sambuc$!
773ebfedea0SLionel Sambuc$   err = 0
774ebfedea0SLionel Sambuc$   file1 = f$parse( "zlib.h", ZLIB, , , "SYNTAX_ONLY")
775ebfedea0SLionel Sambuc$   if (f$search( file1) .eqs. "")
776ebfedea0SLionel Sambuc$   then
777ebfedea0SLionel Sambuc$     WRITE SYS$OUTPUT ""
778ebfedea0SLionel Sambuc$     WRITE SYS$OUTPUT "The Option ", ZLIB, " Is Invalid."
779ebfedea0SLionel Sambuc$     WRITE SYS$OUTPUT "    Can't find header: ''file1'"
780ebfedea0SLionel Sambuc$     err = 1
781ebfedea0SLionel Sambuc$   endif
782ebfedea0SLionel Sambuc$   file1 = f$parse( "A.;", ZLIB)- "A.;"
783ebfedea0SLionel Sambuc$!
784ebfedea0SLionel Sambuc$   file2 = f$parse( ZLIB, "libz.olb", , , "SYNTAX_ONLY")
785ebfedea0SLionel Sambuc$   if (f$search( file2) .eqs. "")
786ebfedea0SLionel Sambuc$   then
787ebfedea0SLionel Sambuc$     if (err .eq. 0)
788ebfedea0SLionel Sambuc$     then
789ebfedea0SLionel Sambuc$       WRITE SYS$OUTPUT ""
790ebfedea0SLionel Sambuc$       WRITE SYS$OUTPUT "The Option ", ZLIB, " Is Invalid."
791ebfedea0SLionel Sambuc$     endif
792ebfedea0SLionel Sambuc$     WRITE SYS$OUTPUT "    Can't find library: ''file2'"
793ebfedea0SLionel Sambuc$     WRITE SYS$OUTPUT ""
794ebfedea0SLionel Sambuc$     err = err+ 2
795ebfedea0SLionel Sambuc$   endif
796ebfedea0SLionel Sambuc$   if (err .eq. 1)
797ebfedea0SLionel Sambuc$   then
798ebfedea0SLionel Sambuc$     WRITE SYS$OUTPUT ""
799ebfedea0SLionel Sambuc$   endif
800ebfedea0SLionel Sambuc$!
801ebfedea0SLionel Sambuc$   if (err .ne. 0)
802ebfedea0SLionel Sambuc$   then
803ebfedea0SLionel Sambuc$     EXIT
804ebfedea0SLionel Sambuc$   endif
805ebfedea0SLionel Sambuc$!
806ebfedea0SLionel Sambuc$   CCDEFS = """ZLIB=1"", "+ CCDEFS
807ebfedea0SLionel Sambuc$   CC_INCLUDES = CC_INCLUDES+ ", "+ file1
808ebfedea0SLionel Sambuc$   ZLIB_LIB = ", ''file2' /library"
809ebfedea0SLionel Sambuc$!
810ebfedea0SLionel Sambuc$!  Print info
811ebfedea0SLionel Sambuc$!
812ebfedea0SLionel Sambuc$   WRITE SYS$OUTPUT "ZLIB library spec: ", file2
813ebfedea0SLionel Sambuc$!
814ebfedea0SLionel Sambuc$! End The ZLIB Check.
815ebfedea0SLionel Sambuc$!
816ebfedea0SLionel Sambuc$ ENDIF
817ebfedea0SLionel Sambuc$!
818ebfedea0SLionel Sambuc$!  Check To See If The User Entered A Valid Parameter.
819ebfedea0SLionel Sambuc$!
820ebfedea0SLionel Sambuc$ IF (OPT_COMPILER.EQS."VAXC").OR.(OPT_COMPILER.EQS."DECC").OR.(OPT_COMPILER.EQS."GNUC")
821ebfedea0SLionel Sambuc$ THEN
822ebfedea0SLionel Sambuc$!
823ebfedea0SLionel Sambuc$!    Check To See If The User Wanted DECC.
824ebfedea0SLionel Sambuc$!
825ebfedea0SLionel Sambuc$   IF (OPT_COMPILER.EQS."DECC")
826ebfedea0SLionel Sambuc$   THEN
827ebfedea0SLionel Sambuc$!
828ebfedea0SLionel Sambuc$!    Looks Like DECC, Set To Use DECC.
829ebfedea0SLionel Sambuc$!
830ebfedea0SLionel Sambuc$     COMPILER = "DECC"
831ebfedea0SLionel Sambuc$!
832ebfedea0SLionel Sambuc$!    Tell The User We Are Using DECC.
833ebfedea0SLionel Sambuc$!
834ebfedea0SLionel Sambuc$     WRITE SYS$OUTPUT "Using DECC 'C' Compiler."
835ebfedea0SLionel Sambuc$!
836ebfedea0SLionel Sambuc$!    Use DECC...
837ebfedea0SLionel Sambuc$!
838ebfedea0SLionel Sambuc$     CC = "CC"
839ebfedea0SLionel Sambuc$     IF ARCH.EQS."VAX" .AND. F$TRNLNM("DECC$CC_DEFAULT").NES."/DECC" -
840ebfedea0SLionel Sambuc	 THEN CC = "CC/DECC"
841ebfedea0SLionel Sambuc$     CC = CC + " /''CC_OPTIMIZE' /''DEBUGGER' /STANDARD=RELAXED"+ -
842ebfedea0SLionel Sambuc       "''POINTER_SIZE' /NOLIST /PREFIX=ALL" + -
843ebfedea0SLionel Sambuc       " /INCLUDE=(''CC_INCLUDES') " + -
844ebfedea0SLionel Sambuc       CCEXTRAFLAGS
845ebfedea0SLionel Sambuc$!
846ebfedea0SLionel Sambuc$!    Define The Linker Options File Name.
847ebfedea0SLionel Sambuc$!
848ebfedea0SLionel Sambuc$     OPT_FILE = "VAX_DECC_OPTIONS.OPT"
849ebfedea0SLionel Sambuc$!
850ebfedea0SLionel Sambuc$!  End DECC Check.
851ebfedea0SLionel Sambuc$!
852ebfedea0SLionel Sambuc$   ENDIF
853ebfedea0SLionel Sambuc$!
854ebfedea0SLionel Sambuc$!  Check To See If We Are To Use VAXC.
855ebfedea0SLionel Sambuc$!
856ebfedea0SLionel Sambuc$   IF (OPT_COMPILER.EQS."VAXC")
857ebfedea0SLionel Sambuc$   THEN
858ebfedea0SLionel Sambuc$!
859ebfedea0SLionel Sambuc$!    Looks Like VAXC, Set To Use VAXC.
860ebfedea0SLionel Sambuc$!
861ebfedea0SLionel Sambuc$     COMPILER = "VAXC"
862ebfedea0SLionel Sambuc$!
863ebfedea0SLionel Sambuc$!    Tell The User We Are Using VAX C.
864ebfedea0SLionel Sambuc$!
865ebfedea0SLionel Sambuc$     WRITE SYS$OUTPUT "Using VAXC 'C' Compiler."
866ebfedea0SLionel Sambuc$!
867ebfedea0SLionel Sambuc$!    Compile Using VAXC.
868ebfedea0SLionel Sambuc$!
869ebfedea0SLionel Sambuc$     CC = "CC"
870ebfedea0SLionel Sambuc$     IF ARCH.NES."VAX"
871ebfedea0SLionel Sambuc$     THEN
872ebfedea0SLionel Sambuc$	WRITE SYS$OUTPUT "There is no VAX C on Alpha!"
873ebfedea0SLionel Sambuc$	EXIT
874ebfedea0SLionel Sambuc$     ENDIF
875ebfedea0SLionel Sambuc$     IF F$TRNLNM("DECC$CC_DEFAULT").EQS."/DECC" THEN CC = "CC/VAXC"
876ebfedea0SLionel Sambuc$     CC = CC + "/''CC_OPTIMIZE'/''DEBUGGER'/NOLIST" + -
877ebfedea0SLionel Sambuc	   "/INCLUDE=(''CC_INCLUDES')" + -
878ebfedea0SLionel Sambuc	   CCEXTRAFLAGS
879ebfedea0SLionel Sambuc$     CCDEFS = """VAXC""," + CCDEFS
880ebfedea0SLionel Sambuc$!
881ebfedea0SLionel Sambuc$!    Define <sys> As SYS$COMMON:[SYSLIB]
882ebfedea0SLionel Sambuc$!
883ebfedea0SLionel Sambuc$     DEFINE/NOLOG SYS SYS$COMMON:[SYSLIB]
884ebfedea0SLionel Sambuc$!
885ebfedea0SLionel Sambuc$!    Define The Linker Options File Name.
886ebfedea0SLionel Sambuc$!
887ebfedea0SLionel Sambuc$     OPT_FILE = "VAX_VAXC_OPTIONS.OPT"
888ebfedea0SLionel Sambuc$!
889ebfedea0SLionel Sambuc$!  End VAXC Check
890ebfedea0SLionel Sambuc$!
891ebfedea0SLionel Sambuc$   ENDIF
892ebfedea0SLionel Sambuc$!
893ebfedea0SLionel Sambuc$!  Check To See If We Are To Use GNU C.
894ebfedea0SLionel Sambuc$!
895ebfedea0SLionel Sambuc$   IF (OPT_COMPILER.EQS."GNUC")
896ebfedea0SLionel Sambuc$   THEN
897ebfedea0SLionel Sambuc$!
898ebfedea0SLionel Sambuc$!    Looks Like GNUC, Set To Use GNUC.
899ebfedea0SLionel Sambuc$!
900ebfedea0SLionel Sambuc$     COMPILER = "GNUC"
901ebfedea0SLionel Sambuc$!
902ebfedea0SLionel Sambuc$!    Tell The User We Are Using GNUC.
903ebfedea0SLionel Sambuc$!
904ebfedea0SLionel Sambuc$     WRITE SYS$OUTPUT "Using GNU 'C' Compiler."
905ebfedea0SLionel Sambuc$!
906ebfedea0SLionel Sambuc$!    Use GNU C...
907ebfedea0SLionel Sambuc$!
908ebfedea0SLionel Sambuc$     CC = "GCC/NOCASE_HACK/''GCC_OPTIMIZE'/''DEBUGGER'/NOLIST" + -
909ebfedea0SLionel Sambuc	   "/INCLUDE=(''CC_INCLUDES')" + -
910ebfedea0SLionel Sambuc	   CCEXTRAFLAGS
911ebfedea0SLionel Sambuc$!
912ebfedea0SLionel Sambuc$!    Define The Linker Options File Name.
913ebfedea0SLionel Sambuc$!
914ebfedea0SLionel Sambuc$     OPT_FILE = "VAX_GNUC_OPTIONS.OPT"
915ebfedea0SLionel Sambuc$!
916ebfedea0SLionel Sambuc$!  End The GNU C Check.
917ebfedea0SLionel Sambuc$!
918ebfedea0SLionel Sambuc$   ENDIF
919ebfedea0SLionel Sambuc$!
920ebfedea0SLionel Sambuc$!  Set up default defines
921ebfedea0SLionel Sambuc$!
922ebfedea0SLionel Sambuc$   CCDEFS = """FLAT_INC=1""," + CCDEFS
923ebfedea0SLionel Sambuc$!
924ebfedea0SLionel Sambuc$!  Finish up the definition of CC.
925ebfedea0SLionel Sambuc$!
926ebfedea0SLionel Sambuc$   IF COMPILER .EQS. "DECC"
927ebfedea0SLionel Sambuc$   THEN
928*0a6a1f1dSLionel Sambuc$!    Not all compiler versions support MAYLOSEDATA3.
929*0a6a1f1dSLionel Sambuc$     OPT_TEST = "MAYLOSEDATA3"
930*0a6a1f1dSLionel Sambuc$     DEFINE /USER_MODE SYS$ERROR NL:
931*0a6a1f1dSLionel Sambuc$     DEFINE /USER_MODE SYS$OUTPUT NL:
932*0a6a1f1dSLionel Sambuc$     'CC' /NOCROSS_REFERENCE /NOLIST /NOOBJECT -
933*0a6a1f1dSLionel Sambuc       /WARNINGS = DISABLE = ('OPT_TEST', EMPTYFILE) NL:
934*0a6a1f1dSLionel Sambuc$     IF ($SEVERITY)
935*0a6a1f1dSLionel Sambuc$     THEN
936*0a6a1f1dSLionel Sambuc$       IF CCDISABLEWARNINGS .NES. "" THEN -
937*0a6a1f1dSLionel Sambuc         CCDISABLEWARNINGS = CCDISABLEWARNINGS+ ","
938*0a6a1f1dSLionel Sambuc$       CCDISABLEWARNINGS = CCDISABLEWARNINGS+ OPT_TEST
939*0a6a1f1dSLionel Sambuc$     ENDIF
940ebfedea0SLionel Sambuc$     IF CCDISABLEWARNINGS .NES. ""
941ebfedea0SLionel Sambuc$     THEN
942ebfedea0SLionel Sambuc$       CCDISABLEWARNINGS = " /WARNING=(DISABLE=(" + CCDISABLEWARNINGS + "))"
943ebfedea0SLionel Sambuc$     ENDIF
944ebfedea0SLionel Sambuc$   ELSE
945ebfedea0SLionel Sambuc$     CCDISABLEWARNINGS = ""
946ebfedea0SLionel Sambuc$   ENDIF
947ebfedea0SLionel Sambuc$   CC = CC + " /DEFINE=(" + CCDEFS + ")" + CCDISABLEWARNINGS
948ebfedea0SLionel Sambuc$!
949ebfedea0SLionel Sambuc$!  Show user the result
950ebfedea0SLionel Sambuc$!
951ebfedea0SLionel Sambuc$   WRITE/SYMBOL SYS$OUTPUT "Main C Compiling Command: ",CC
952ebfedea0SLionel Sambuc$!
953ebfedea0SLionel Sambuc$!  Else The User Entered An Invalid Argument.
954ebfedea0SLionel Sambuc$!
955ebfedea0SLionel Sambuc$ ELSE
956ebfedea0SLionel Sambuc$!
957ebfedea0SLionel Sambuc$!  Tell The User We Don't Know What They Want.
958ebfedea0SLionel Sambuc$!
959ebfedea0SLionel Sambuc$   WRITE SYS$OUTPUT ""
960ebfedea0SLionel Sambuc$   WRITE SYS$OUTPUT "The Option ",OPT_COMPILER," Is Invalid.  The Valid Options Are:"
961ebfedea0SLionel Sambuc$   WRITE SYS$OUTPUT ""
962ebfedea0SLionel Sambuc$   WRITE SYS$OUTPUT "    VAXC  :  To Compile With VAX C."
963ebfedea0SLionel Sambuc$   WRITE SYS$OUTPUT "    DECC  :  To Compile With DEC C."
964ebfedea0SLionel Sambuc$   WRITE SYS$OUTPUT "    GNUC  :  To Compile With GNU C."
965ebfedea0SLionel Sambuc$   WRITE SYS$OUTPUT ""
966ebfedea0SLionel Sambuc$!
967ebfedea0SLionel Sambuc$!  Time To EXIT.
968ebfedea0SLionel Sambuc$!
969ebfedea0SLionel Sambuc$   EXIT
970ebfedea0SLionel Sambuc$!
971ebfedea0SLionel Sambuc$! End The Valid Argument Check.
972ebfedea0SLionel Sambuc$!
973ebfedea0SLionel Sambuc$ ENDIF
974ebfedea0SLionel Sambuc$!
975ebfedea0SLionel Sambuc$! Build a MACRO command for the architecture at hand
976ebfedea0SLionel Sambuc$!
977ebfedea0SLionel Sambuc$ IF ARCH .EQS. "VAX"
978ebfedea0SLionel Sambuc$ THEN
979ebfedea0SLionel Sambuc$   MACRO = "MACRO/''DEBUGGER'"
980ebfedea0SLionel Sambuc$ ELSE
981ebfedea0SLionel Sambuc$   MACRO = "MACRO/MIGRATION/''DEBUGGER'/''MACRO_OPTIMIZE'"
982ebfedea0SLionel Sambuc$ ENDIF
983ebfedea0SLionel Sambuc$!
984ebfedea0SLionel Sambuc$!  Show user the result
985ebfedea0SLionel Sambuc$!
986ebfedea0SLionel Sambuc$ WRITE/SYMBOL SYS$OUTPUT "Main MACRO Compiling Command: ",MACRO
987ebfedea0SLionel Sambuc$!
988ebfedea0SLionel Sambuc$! Time to check the contents, and to make sure we get the correct library.
989ebfedea0SLionel Sambuc$!
990ebfedea0SLionel Sambuc$ IF OPT_TCPIP_LIB.EQS."SOCKETSHR" .OR. OPT_TCPIP_LIB.EQS."MULTINET" -
991ebfedea0SLionel Sambuc     .OR. OPT_TCPIP_LIB.EQS."UCX" .OR. OPT_TCPIP_LIB.EQS."TCPIP" -
992ebfedea0SLionel Sambuc     .OR. OPT_TCPIP_LIB.EQS."NONE"
993ebfedea0SLionel Sambuc$ THEN
994ebfedea0SLionel Sambuc$!
995ebfedea0SLionel Sambuc$!  Check to see if SOCKETSHR was chosen
996ebfedea0SLionel Sambuc$!
997ebfedea0SLionel Sambuc$   IF OPT_TCPIP_LIB.EQS."SOCKETSHR"
998ebfedea0SLionel Sambuc$   THEN
999ebfedea0SLionel Sambuc$!
1000ebfedea0SLionel Sambuc$!    Set the library to use SOCKETSHR
1001ebfedea0SLionel Sambuc$!
1002ebfedea0SLionel Sambuc$     TCPIP_LIB = ",SYS$DISK:[-.VMS]SOCKETSHR_SHR.OPT /OPTIONS"
1003ebfedea0SLionel Sambuc$!
1004ebfedea0SLionel Sambuc$!    Done with SOCKETSHR
1005ebfedea0SLionel Sambuc$!
1006ebfedea0SLionel Sambuc$   ENDIF
1007ebfedea0SLionel Sambuc$!
1008ebfedea0SLionel Sambuc$!  Check to see if MULTINET was chosen
1009ebfedea0SLionel Sambuc$!
1010ebfedea0SLionel Sambuc$   IF OPT_TCPIP_LIB.EQS."MULTINET"
1011ebfedea0SLionel Sambuc$   THEN
1012ebfedea0SLionel Sambuc$!
1013ebfedea0SLionel Sambuc$!    Set the library to use UCX emulation.
1014ebfedea0SLionel Sambuc$!
1015ebfedea0SLionel Sambuc$     OPT_TCPIP_LIB = "UCX"
1016ebfedea0SLionel Sambuc$!
1017ebfedea0SLionel Sambuc$!    Done with MULTINET
1018ebfedea0SLionel Sambuc$!
1019ebfedea0SLionel Sambuc$   ENDIF
1020ebfedea0SLionel Sambuc$!
1021ebfedea0SLionel Sambuc$!  Check to see if UCX was chosen
1022ebfedea0SLionel Sambuc$!
1023ebfedea0SLionel Sambuc$   IF OPT_TCPIP_LIB.EQS."UCX"
1024ebfedea0SLionel Sambuc$   THEN
1025ebfedea0SLionel Sambuc$!
1026ebfedea0SLionel Sambuc$!    Set the library to use UCX.
1027ebfedea0SLionel Sambuc$!
1028ebfedea0SLionel Sambuc$     TCPIP_LIB = "SYS$DISK:[-.VMS]UCX_SHR_DECC.OPT /OPTIONS"
1029ebfedea0SLionel Sambuc$     IF F$TRNLNM("UCX$IPC_SHR") .NES. ""
1030ebfedea0SLionel Sambuc$     THEN
1031ebfedea0SLionel Sambuc$       TCPIP_LIB = ",SYS$DISK:[-.VMS]UCX_SHR_DECC_LOG.OPT /OPTIONS"
1032ebfedea0SLionel Sambuc$     ELSE
1033ebfedea0SLionel Sambuc$       IF COMPILER .NES. "DECC" .AND. ARCH .EQS. "VAX" THEN -
1034ebfedea0SLionel Sambuc	  TCPIP_LIB = ",SYS$DISK:[-.VMS]UCX_SHR_VAXC.OPT /OPTIONS"
1035ebfedea0SLionel Sambuc$     ENDIF
1036ebfedea0SLionel Sambuc$!
1037ebfedea0SLionel Sambuc$!    Done with UCX
1038ebfedea0SLionel Sambuc$!
1039ebfedea0SLionel Sambuc$   ENDIF
1040ebfedea0SLionel Sambuc$!
1041ebfedea0SLionel Sambuc$!  Check to see if TCPIP was chosen
1042ebfedea0SLionel Sambuc$!
1043ebfedea0SLionel Sambuc$   IF OPT_TCPIP_LIB.EQS."TCPIP"
1044ebfedea0SLionel Sambuc$   THEN
1045ebfedea0SLionel Sambuc$!
1046ebfedea0SLionel Sambuc$!    Set the library to use TCPIP (post UCX).
1047ebfedea0SLionel Sambuc$!
1048ebfedea0SLionel Sambuc$     TCPIP_LIB = ",SYS$DISK:[-.VMS]TCPIP_SHR_DECC.OPT /OPTIONS"
1049ebfedea0SLionel Sambuc$!
1050ebfedea0SLionel Sambuc$!    Done with TCPIP
1051ebfedea0SLionel Sambuc$!
1052ebfedea0SLionel Sambuc$   ENDIF
1053ebfedea0SLionel Sambuc$!
1054ebfedea0SLionel Sambuc$!  Check to see if NONE was chosen
1055ebfedea0SLionel Sambuc$!
1056ebfedea0SLionel Sambuc$   IF OPT_TCPIP_LIB.EQS."NONE"
1057ebfedea0SLionel Sambuc$   THEN
1058ebfedea0SLionel Sambuc$!
1059ebfedea0SLionel Sambuc$!    Do not use a TCPIP library.
1060ebfedea0SLionel Sambuc$!
1061ebfedea0SLionel Sambuc$     TCPIP_LIB = ""
1062ebfedea0SLionel Sambuc$!
1063ebfedea0SLionel Sambuc$!    Done with TCPIP
1064ebfedea0SLionel Sambuc$!
1065ebfedea0SLionel Sambuc$   ENDIF
1066ebfedea0SLionel Sambuc$!
1067ebfedea0SLionel Sambuc$!  Print info
1068ebfedea0SLionel Sambuc$!
1069ebfedea0SLionel Sambuc$   WRITE SYS$OUTPUT "TCP/IP library spec: ", TCPIP_LIB- ","
1070ebfedea0SLionel Sambuc$!
1071ebfedea0SLionel Sambuc$!  Else The User Entered An Invalid Argument.
1072ebfedea0SLionel Sambuc$!
1073ebfedea0SLionel Sambuc$ ELSE
1074ebfedea0SLionel Sambuc$!
1075ebfedea0SLionel Sambuc$!  Tell The User We Don't Know What They Want.
1076ebfedea0SLionel Sambuc$!
1077ebfedea0SLionel Sambuc$   WRITE SYS$OUTPUT ""
1078ebfedea0SLionel Sambuc$   WRITE SYS$OUTPUT "The Option ",OPT_TCPIP_LIB," Is Invalid.  The Valid Options Are:"
1079ebfedea0SLionel Sambuc$   WRITE SYS$OUTPUT ""
1080ebfedea0SLionel Sambuc$   WRITE SYS$OUTPUT "    SOCKETSHR  :  To link with SOCKETSHR TCP/IP library."
1081ebfedea0SLionel Sambuc$   WRITE SYS$OUTPUT "    UCX        :  To link with UCX TCP/IP library."
1082ebfedea0SLionel Sambuc$   WRITE SYS$OUTPUT "    TCPIP      :  To link with TCPIP (post UCX) TCP/IP library."
1083ebfedea0SLionel Sambuc$   WRITE SYS$OUTPUT ""
1084ebfedea0SLionel Sambuc$!
1085ebfedea0SLionel Sambuc$!  Time To EXIT.
1086ebfedea0SLionel Sambuc$!
1087ebfedea0SLionel Sambuc$   EXIT
1088ebfedea0SLionel Sambuc$!
1089ebfedea0SLionel Sambuc$!  Done with TCP/IP libraries
1090ebfedea0SLionel Sambuc$!
1091ebfedea0SLionel Sambuc$ ENDIF
1092ebfedea0SLionel Sambuc$!
1093ebfedea0SLionel Sambuc$!  Time To RETURN...
1094ebfedea0SLionel Sambuc$!
1095ebfedea0SLionel Sambuc$ RETURN
1096ebfedea0SLionel Sambuc$!
1097ebfedea0SLionel Sambuc$ INITIALISE:
1098ebfedea0SLionel Sambuc$!
1099ebfedea0SLionel Sambuc$! Save old value of the logical name OPENSSL
1100ebfedea0SLionel Sambuc$!
1101ebfedea0SLionel Sambuc$ __SAVE_OPENSSL = F$TRNLNM("OPENSSL","LNM$PROCESS_TABLE")
1102ebfedea0SLionel Sambuc$!
1103ebfedea0SLionel Sambuc$! Save directory information
1104ebfedea0SLionel Sambuc$!
1105ebfedea0SLionel Sambuc$ __HERE = F$PARSE(F$PARSE("A.;",F$ENVIRONMENT("PROCEDURE"))-"A.;","[]A.;") - "A.;"
1106ebfedea0SLionel Sambuc$ __HERE = F$EDIT(__HERE,"UPCASE")
1107ebfedea0SLionel Sambuc$ __TOP = __HERE - "ENGINES]"
1108ebfedea0SLionel Sambuc$ __INCLUDE = __TOP + "INCLUDE.OPENSSL]"
1109ebfedea0SLionel Sambuc$!
1110ebfedea0SLionel Sambuc$! Set up the logical name OPENSSL to point at the include directory
1111ebfedea0SLionel Sambuc$!
1112ebfedea0SLionel Sambuc$ DEFINE OPENSSL /NOLOG '__INCLUDE'
1113ebfedea0SLionel Sambuc$!
1114ebfedea0SLionel Sambuc$! Done
1115ebfedea0SLionel Sambuc$!
1116ebfedea0SLionel Sambuc$ RETURN
1117ebfedea0SLionel Sambuc$!
1118ebfedea0SLionel Sambuc$ CLEANUP:
1119ebfedea0SLionel Sambuc$!
1120ebfedea0SLionel Sambuc$! Restore the saved logical name OPENSSL, if it had a value.
1121ebfedea0SLionel Sambuc$!
1122ebfedea0SLionel Sambuc$ if (f$type( __SAVE_OPENSSL) .nes. "")
1123ebfedea0SLionel Sambuc$ then
1124ebfedea0SLionel Sambuc$   IF __SAVE_OPENSSL .EQS. ""
1125ebfedea0SLionel Sambuc$   THEN
1126ebfedea0SLionel Sambuc$     DEASSIGN OPENSSL
1127ebfedea0SLionel Sambuc$   ELSE
1128ebfedea0SLionel Sambuc$     DEFINE /NOLOG OPENSSL '__SAVE_OPENSSL'
1129ebfedea0SLionel Sambuc$   ENDIF
1130ebfedea0SLionel Sambuc$ endif
1131ebfedea0SLionel Sambuc$!
1132ebfedea0SLionel Sambuc$! Close any open files.
1133ebfedea0SLionel Sambuc$!
1134ebfedea0SLionel Sambuc$ if (f$trnlnm( "objects", "LNM$PROCESS", 0, "SUPERVISOR") .nes. "") then -
1135ebfedea0SLionel Sambuc   close objects
1136ebfedea0SLionel Sambuc$!
1137ebfedea0SLionel Sambuc$! Done
1138ebfedea0SLionel Sambuc$!
1139ebfedea0SLionel Sambuc$ RETURN
1140ebfedea0SLionel Sambuc$!
1141