Commit | Line | Data |
97abc6ad |
1 | $ sav_ver = 'F$VERIFY(0)' |
2 | $! SET VERIFY |
3 | $! |
97abc6ad |
4 | $! For example, if you unpacked perl into: [USER.PERL5_00n...] then you will |
e6df7ed1 |
5 | $! want to cd into the tree and execute Configure: |
97abc6ad |
6 | $! |
7 | $! $ SET DEFAULT [USER.PERL5_00n] |
e6df7ed1 |
8 | $! $ @Configure |
97abc6ad |
9 | $! |
10 | $! or |
11 | $! |
12 | $! $ SET DEFAULT [USER.PERL5_00n] |
e6df7ed1 |
13 | $! $ @Configure "-des" |
97abc6ad |
14 | $! |
15 | $! That's it. If you get into a bind trying to build perl on VMS then |
429a5e67 |
16 | $! definitely read through the README.VMS file. |
97abc6ad |
17 | $! Beyond that send email to VMSPerl@cor.newman.upenn.edu |
18 | $! |
19 | $! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
20 | $! |
97abc6ad |
21 | $! send suggestions to: |
429a5e67 |
22 | $! Dan Sugalski <sugalskd@ous.edu> |
97abc6ad |
23 | $! Thank you!!!! |
24 | $! |
25 | $! Adapted and converted from Larry Wall & Andy Dougherty's |
429a5e67 |
26 | $! "Configure generated by metaconfig 3.0 PL60." by Peter Prymmer |
97abc6ad |
27 | $! (a Bourne sh[ell] script for configuring the installation of perl on VMS) |
28 | $! in the perl5.002|3 epoch (spring/summer 1996) |
29 | $! with much valuable help from Charles Bailey & |
30 | $! the whole VMSPerl crew. |
429a5e67 |
31 | $! Extended and messed about with by Dan Sugalski |
97abc6ad |
32 | $! |
33 | $! SET NOVERIFY |
34 | $ sav_ver = F$VERIFY(sav_ver) |
35 | $! |
36 | $! VMS-isms we will need: |
37 | $ echo = "write sys$output " |
38 | $ cat = "type" |
39 | $ gcc_symbol = "gcc" |
40 | $ ans = "" |
41 | $ macros = "" |
3eeba6fb |
42 | $ use_vmsdebug_perl = "N" |
429a5e67 |
43 | $ use_debugging_perl = "Y" |
97abc6ad |
44 | $ C_Compiler_Replace = "CC=" |
429a5e67 |
45 | $ Thread_Live_Dangerously = "MT=" |
46 | $ use_two_pot_malloc = "N" |
47 | $ use_pack_malloc = "N" |
48 | $ use_debugmalloc = "N" |
cc391245 |
49 | $ d_secintgenv = "N" |
3937c24e |
50 | $ use_multiplicity = "N" |
97abc6ad |
51 | $ vms_default_directory_name = F$ENVIRONMENT("DEFAULT") |
cc391245 |
52 | $ max_allowed_dir_depth = 3 ! e.g. [A.B.PERL5_00n] not [A.B.C.PERL5_00n] |
53 | $! max_allowed_dir_depth = 2 ! e.g. [FOO.PERL5_00n] not [FOO.BAR.PERL5_00n] |
97abc6ad |
54 | $! |
55 | $ vms_filcnt = F$GETJPI ("","FILCNT") |
56 | $! |
57 | $!: compute my invocation name |
58 | $ me = F$ENVIRONMENT("PROCEDURE") |
59 | $! |
60 | $! Many null statements (begin with colon ':') in the Bourne shell version of |
61 | $! this script serve as comments/placeholders. I have retained some of the ones |
62 | $! that will help you compare this .COM file to the sh version - as well as |
63 | $! leave placeholders for future improvements to this .COM file. |
64 | $! sfn = VMS "skipped for now" |
65 | $! |
66 | $!: Proper PATH separator !sfn |
67 | $!: Proper PATH setting !sfn |
68 | $!: Sanity checks !sfn "Say '@''$me''" |
69 | $!: On HP-UX, large Configure scripts may exercise a bug in /bin/sh !sfn |
70 | $!: Configure runs within the UU subdirectory !->after find MANIFEST |
71 | $! <big long list of default values (mostly null)> |
72 | $!: We must find out about Eunice early !(?) |
73 | $!: list of known cpp symbols, sorted alphabetically !sfn |
74 | $! al = al + "..." |
75 | $!: default library list !sfn |
76 | $! <no hints files in use (yet?)> |
77 | $!: Extra object files, if any, needed on this platform. !sfn |
78 | $!: Possible local include directories to search. !sfn |
79 | $!: Set locincpth to "" in a hint file to defeat local include searches. !sfn |
80 | $!locincpth="/usr/local/include /opt/local/include /usr/gnu/include" !sfn |
81 | $!locincpth="$locincpth /opt/gnu/include /usr/GNU/include /opt/GNU/include" |
82 | $!: no include file wanted by default !sfn |
83 | $!inclwanted='' !sfn |
84 | $!: Possible local library directories to search. !sfn |
85 | $!loclibpth="/usr/local/lib /opt/local/lib /usr/gnu/lib" !sfn |
86 | $!loclibpth="$loclibpth /opt/gnu/lib /usr/GNU/lib /opt/GNU/lib" !sfn |
87 | $!: general looking path for locating libraries !sfn |
88 | $!glibpth="/lib/pa1.1 /usr/shlib /usr/lib/large /lib /usr/lib" !sfn |
89 | $!glibpth="$glibpth $xlibpth /lib/large /usr/lib/small /lib/small" !sfn |
90 | $!glibpth="$glibpth /usr/ccs/lib /usr/ucblib /usr/shlib" !sfn |
91 | $!: Private path used by Configure to find libraries. Its value !sfn |
92 | $!: is prepended to libpth. This variable takes care of special !sfn |
93 | $!: machines, like the mips. Usually, it should be empty. !sfn |
94 | $!plibpth='' !sfn |
95 | $!: full support for void wanted by default !sfn |
96 | $!defvoidused=15 !sfn |
97 | $!: List of libraries we want. !sfn |
98 | $!libswanted='net socket inet nsl nm ndbm gdbm dbm db malloc dl' !sfn |
99 | $!libswanted="$libswanted dld ld sun m c cposix posix ndir dir crypt" !sfn |
100 | $!libswanted="$libswanted ucb bsd BSD PW x" !sfn |
101 | $!: We probably want to search /usr/shlib before most other libraries. !sfn |
102 | $!: This is only used by the lib/ExtUtils/MakeMaker.pm routine extliblist. !sfn |
103 | $!glibpth=`echo " $glibpth " | sed -e 's! /usr/shlib ! !'` !sfn |
104 | $!glibpth="/usr/shlib $glibpth" !sfn |
105 | $!: Do not use vfork unless overridden by a hint file. !sfn |
106 | $!usevfork=false !sfn |
107 | $!: script used to extract .SH files with variable substitutions !sfn |
108 | $!: produce awk script to parse command line options !sfn |
109 | $!sfn (assume no sed awk) see below |
110 | $!: process the command line options |
111 | $! |
112 | $!: set up default values |
113 | $ fastread="" |
114 | $ reuseval="false" |
115 | $ config_sh="" |
116 | $ alldone="" |
117 | $ error="" |
118 | $ silent="" |
119 | $ extractsh="" |
120 | $ override="" |
121 | $ knowitall="" |
122 | $ Using_Dec_C = "" |
123 | $ Using_Vax_C = "" |
124 | $ Using_Gnu_C = "" |
125 | $ Dec_C_Version = "" |
126 | $ use_threads = "F" |
127 | $! |
128 | $!: option parsing |
129 | $ IF (P1 .NES. "") |
130 | $ THEN !one or more switches was thrown |
131 | $ i = 1 |
132 | $ bang = 0 |
133 | $Param_loop: |
134 | $ IF (P'i'.NES."") THEN bang = bang + 1 |
135 | $ i = i + 1 |
136 | $ IF (i.LT.9) THEN GOTO Param_loop !DCL allows P1..P8 |
137 | $! |
138 | $ i = 1 |
139 | $Opt_loop: |
140 | $ IF (F$EXTRACT(0,1,P'i') .EQS. "-") THEN P'i' = P'i' - "-" |
141 | $ IF (F$EXTRACT(0,1,P'i') .EQS. "/") THEN P'i' = P'i' - "/" |
142 | $Remove_quotation_mark: |
143 | $ P'i' = P'i' - """" |
144 | $ IF F$LOCATE("""",P'i') .LT. F$LENGTH(P'i') THEN GOTO Remove_quotation_mark |
145 | $ gotopt = "f" !"alse" |
146 | $ gotshortopt = "f" !"alse" |
147 | $ IF (F$EXTRACT(0,1,P'i') .EQS. "d") |
148 | $ THEN |
149 | $ fastread = "yes" |
150 | $ gotopt = "t" !"rue" |
151 | $ P'i' = P'i' - "d" |
152 | $ gotshortopt = "t" !"rue" |
153 | $ ENDIF |
154 | $ IF (F$EXTRACT(0,1,P'i') .EQS. "e") |
155 | $ THEN |
156 | $ alldone = "cont" |
157 | $ gotopt = "t" |
158 | $ P'i' = P'i' - "e" |
159 | $ gotshortopt = "t" |
160 | $ ENDIF |
161 | $ IF (F$EXTRACT(0,1,P'i') .EQS. "f") !"-f") |
162 | $ THEN |
163 | $ P'i' = P'i' - "f" |
164 | $ config_sh = P'i' |
165 | $ IF (F$SEARCH(config_sh).NES."") |
166 | $ THEN |
167 | $ test = F$FILE_ATTRIBUTES(config_sh,"PRO") |
168 | $ IF (F$LOCATE("R",test).NE.F$LENGTH(test)) |
169 | $ THEN |
170 | $ CONTINUE !at this point check UIC && if test allows... |
171 | $ !to be continued ? |
172 | $ ELSE |
173 | $ echo "''me': cannot read config file ''config_sh'." |
174 | $ error="true" |
175 | $ ENDIF |
176 | $ ELSE |
177 | $ echo "''me': cannot read config file ''config_sh'." |
178 | $ error="true" |
179 | $ ENDIF |
180 | $ gotopt = "t" |
181 | $ ENDIF |
182 | $ IF (F$EXTRACT(0,1,P'i') .EQS. "h") |
183 | $ THEN |
184 | $ error = "true" |
185 | $ gotopt = "t" |
186 | $ P'i' = P'i' - "h" |
187 | $ gotshortopt = "t" |
188 | $ ENDIF |
189 | $ IF (F$EXTRACT(0,1,P'i') .EQS. "r") |
190 | $ THEN |
191 | $ reuseval = "true" |
192 | $ gotopt = "t" |
193 | $ P'i' = P'i' - "r" |
194 | $ gotshortopt = "t" |
195 | $ ENDIF |
196 | $ IF (F$EXTRACT(0,1,P'i') .EQS. "s") |
197 | $ THEN |
198 | $ silent = "true" |
199 | $ gotopt = "t" |
200 | $ P'i' = P'i' - "s" |
201 | $ gotshortopt = "t" |
202 | $ ENDIF |
203 | $ IF (F$EXTRACT(0,1,P'i') .EQS. "E") !"-E") |
204 | $ THEN |
205 | $ alldone = "exit" |
206 | $ gotopt = "t" |
207 | $ ENDIF |
208 | $ IF (F$EXTRACT(0,1,P'i') .EQS. "K") !"-K") |
209 | $ THEN |
210 | $ knowitall = "true" |
211 | $ gotopt = "t" |
212 | $ P'i' = P'i' - "K" |
213 | $ gotshortopt = "t" |
214 | $ ENDIF |
215 | $ IF (F$EXTRACT(0,1,P'i') .EQS. "O") |
216 | $ THEN |
217 | $ override = "true" |
218 | $ gotopt = "t" |
219 | $ P'i' = P'i' - "O" |
220 | $ gotshortopt = "t" |
221 | $ ENDIF |
222 | $ IF (F$EXTRACT(0,1,P'i') .EQS. "S") !"-S") |
223 | $ THEN |
224 | $ extractsh = "true" !VMS? |
225 | $ gotopt = "t" |
226 | $ P'i' = P'i' - "S" |
227 | $ gotshortopt = "t" |
228 | $ ENDIF |
229 | $ IF (F$EXTRACT(0,1,P'i') .EQS. "D") !"-D") |
230 | $ THEN |
231 | $ P'i' = P'i' - "D" |
232 | $!Hmm.. this part needs work |
233 | $! P'i' |
234 | $ IF (F$LOCATE("=",P'i') .EQ. F$LENGTH(P'i')) |
235 | $ THEN |
236 | $ P'i' = "define" |
237 | $ ELSE |
238 | $ IF (F$LOCATE("=",P'i') .EQ. (F$LENGTH(P'i') - 1)) |
239 | $ THEN |
240 | $ me = F$PARSE(me,,,"NAME") + F$PARSE(me,,,"TYPE") |
241 | $ echo "''me': use '-Usymbol=val' not '-Dsymbol='." |
242 | $ echo "''me': ignoring -D",P'i' |
243 | $ ELSE |
244 | $!Hmm.. this part needs work |
245 | $! 'F$EXTRACT(0,F$LOCATE("=",P'i'),P'i')' = - |
246 | $! 'F$EXTRACT(F$LOCATE("=",P'i'),P'i'),F$LENGTH(P'i'),P'i')' |
247 | $ ENDIF |
248 | $ ENDIF |
249 | $ ECHO "P''i' =>",P'i',"<=" !Diag |
250 | $ gotopt = "t" |
251 | $ ENDIF |
252 | $ IF (F$EXTRACT(0,1,P'i') .EQS. "U") !"-U") |
253 | $ THEN |
254 | $ P'i' = P'i' - "U" |
255 | $ IF (F$LOCATE("=",P'i') .EQ. F$LENGTH(P'i')) |
256 | $ THEN |
257 | $ P'i' = "" |
258 | $ ELSE |
259 | $ IF (F$LOCATE("=",P'i') .LT. (F$LENGTH(P'i') - 1)) |
260 | $ THEN |
261 | $ me = F$PARSE(me,,,"NAME") + F$PARSE(me,,,"TYPE") |
262 | $ echo "''me': use '-Dsymbol=val' not '-Usymbol=val'." |
263 | $ echo "''me': ignoring -U",P'i' |
264 | $ ELSE |
265 | $ P'i' = "undef" |
266 | $ ENDIF |
267 | $ ENDIF |
268 | $ ECHO "P''i' =>",P'i',"<=" !Diag |
269 | $ gotopt = "t" |
270 | $ ENDIF |
271 | $ IF (F$EXTRACT(0,1,P'i') .EQS. "V") |
272 | $ THEN |
273 | $ me = F$PARSE(me,,,"NAME") + F$PARSE(me,,,"TYPE") |
274 | $ echo "''me' generated by an unknown version of EDT." |
275 | $ STOP |
276 | $ EXIT !0 |
277 | $ ENDIF |
278 | $ IF .NOT.gotopt |
279 | $ THEN |
280 | $ echo "''me': unknown option ",P'i' |
281 | $ error = "true" |
282 | $ ENDIF |
283 | $ IF (F$LENGTH(P'i').GT.0).AND.(gotshortopt) THEN i = i - 1 !clustered switch |
284 | $ i = i + 1 |
285 | $ IF (i .LT. (bang + 1)) THEN GOTO Opt_loop |
286 | $! |
287 | $ ENDIF ! (P1 .NES. "") |
288 | $! |
289 | $ IF (error) |
290 | $ THEN |
291 | $ me = F$PARSE(me,,,"DIRECTORY")+ F$PARSE(me,,,"NAME") |
292 | $ echo "Usage: @''me' [-dehrEKOSV] [-fconfig.sh] [-Dsymbol] [-Dsymbol=value]" |
293 | $ echo " [-Usymbol] [-Usymbol=]" |
294 | $ TYPE SYS$INPUT |
295 | "-d" : use defaults for all answers. |
296 | "-e" : go on without questioning past the production of config.sh. * |
297 | "-f" : specify an alternate default configuration file. |
298 | "-h" : print this help message and exit (with an error status). |
299 | "-r" : reuse C symbols value if possible (skips costly nm extraction).* |
300 | "-s" : silent mode, only echoes questions and essential information. |
301 | -"D" : define symbol to have some value: * |
302 | -"Dsymbol" symbol gets the value 'define' |
303 | -"Dsymbol=value" symbol gets the value 'value' |
304 | -E : stop at the end of questions, after having produced config.sh. * |
305 | -K : do not use unless you know what you are doing. |
306 | -O : let -D and -U override definitions from loaded configuration file. * |
307 | -S : perform variable substitutions on all .SH files (can mix with -f) * |
308 | -"U" : undefine symbol: * |
309 | -"Usymbol" symbol gets the value 'undef' |
310 | -"Usymbol=" symbol gets completely empty |
311 | -V : print version number and exit (with a zero status). |
312 | $ echo "%Config-I-VMS, lower case switches must be enclosed" |
313 | $ echo "-Config-I-VMS, in double quotation marks, e.g.:" |
314 | $ echo "-Config-I-VMS, @Configure ""-des""" |
315 | $ echo "-Config-I-VMS, * indicates switch may not be fully implemented for VMS." |
316 | $ SET DEFAULT 'vms_default_directory_name' !be kind rewind |
317 | $ STOP |
318 | $ EXIT 3 ! $STATUS = "%X00000003" (informational) |
319 | $ ENDIF |
320 | $! |
321 | $ GOTO Check_silence |
322 | $! |
323 | $Shut_up: |
324 | $ STDOUT = F$TRNLNM("SYS$OUTPUT") |
325 | $ DEFINE SYS$OUTPUT "_NLA0:" |
326 | $ echo4 = "write STDOUT " |
327 | $ cat4 = "TYPE/OUTPUT=''STDOUT'" |
328 | $ open/write STDOUT 'STDOUT' |
329 | $ RETURN |
330 | $! |
331 | $Check_silence: |
332 | $ IF (silent) |
333 | $ THEN |
334 | $ GOSUB Shut_up |
335 | $ ELSE |
336 | $ echo4 = "write SYS$OUTPUT " |
337 | $ cat4 = "TYPE" |
338 | $ ENDIF |
339 | $! |
340 | $!: run the defines and the undefines, if any, but leave the file out there... |
341 | $! Unfortunately Configure.COM in DCL is not yet set up to do this - |
342 | $! maybe someday |
343 | $! |
344 | $!: set package name |
345 | $ package = "perl5" |
346 | $! |
347 | $!: Eunice requires " " instead of "", can you believe it |
348 | $ echo "" |
349 | $!: Here we go... |
350 | $ echo "Beginning of configuration questions for ''package'." |
351 | $ echo "" |
352 | $! |
353 | $!: Some greps do not return status, grrr. |
354 | $ contains = "SEARCH" |
355 | $! |
356 | $!: first determine how to suppress newline on echo command !cant DCL is record oriented |
357 | $! echo "Checking ''echo' to see how to suppress newlines..." |
358 | $! echo "giving up..." |
359 | $! echo "The star should be here-->*" |
360 | $! |
361 | $!: Now test for existence of everything in MANIFEST |
362 | $ echo "" |
363 | $ echo4 "First let's make sure your kit is complete. Checking..." |
364 | $ manifestfound = "" |
365 | $ miss_list = "" |
366 | $! Here I assume we are in the [foo.PERL5xxx.VMS...] tree |
367 | $! because the search routine simply does set def [-] if necessary. |
368 | $ file_2_find = "MANIFEST" !I hope this one is not in [foo.PERL5xxx.VMS...] |
369 | $Research_manifest: |
370 | $ manifestfound = F$SEARCH(file_2_find) |
371 | $ IF (manifestfound .EQS. "") |
372 | $ THEN |
373 | $ IF F$PARSE(F$ENVIRONMENT("DEFAULT"),,,"DIRECTORY",).NES."[000000]" |
374 | $ THEN |
375 | $ SET DEFAULT [-] |
376 | $ GOTO Research_manifest |
377 | $ ELSE |
378 | $ echo "" |
379 | $ echo "There is no MANIFEST file. I hope your kit is complete !" |
380 | $ miss_list = "" |
381 | $ GOTO Beyond_manifest |
382 | $ ENDIF |
383 | $ ELSE |
384 | $! MANIFEST. has been found and we have set def'ed there - |
385 | $! time to bail out before it's too late. |
e6df7ed1 |
386 | $ tmp = f$extract(1,3,f$edit(f$getsyi("VERSION"),"TRIM,COLLAPSE")) |
387 | $ IF tmp .GES. "7.2" THEN GOTO Beyond_depth_check |
97abc6ad |
388 | $ IF (F$ELEMENT(max_allowed_dir_depth,".",F$ENVIRONMENT("Default")).nes.".") |
389 | $ THEN |
390 | $ TYPE SYS$INPUT: |
391 | %Config-E-VMS, ERROR: |
392 | Sorry! It apears as though your perl build sub-directory is already too |
393 | deep into the VMS file system. Please try moving stuff into a shallower |
394 | directory (or altering the "max_allowed_dir_depth" parameter). |
395 | $ echo4 "ABORTING..." |
396 | $ SET DEFAULT 'vms_default_directory_name' !be kind rewind |
397 | $ STOP |
398 | $ EXIT !2 !$STATUS = "%X00000002" (error) |
399 | $ ENDIF |
e6df7ed1 |
400 | $Beyond_depth_check: |
97abc6ad |
401 | $! |
402 | $! after finding MANIFEST let's create (but not yet enter) the UU subdirectory |
403 | $! |
404 | $ IF (manifestfound .NES. "") |
405 | $ THEN |
406 | $ IF ( F$SEARCH("UU.DIR").EQS."" ) |
407 | $ THEN |
408 | $ CREATE/DIRECTORY [.UU] |
409 | $ ELSE |
410 | $ IF ( F$SEARCH("[.UU]*.*").NES."" ) THEN DELETE/NOLOG [.UU]*.*;* |
411 | $ ENDIF |
412 | $!: Configure runs within the UU subdirectory |
413 | $ SET DEFAULT [.UU] |
414 | $! |
415 | $! a little redundancy never hurt anybody? |
416 | $ file_2_find = "[-]" + file_2_find |
417 | $ manifestfound = F$SEARCH(file_2_find) |
418 | $! |
419 | $ OPEN/WRITE MISSING MISSING. |
420 | $!change to "FALSE" if you wish to skip the manifest search |
421 | $!(which after all is rather slow in DCL :-) |
422 | $ IF ("TRUE") |
423 | $ THEN |
424 | $ OPEN/READ CONFIG 'manifestfound' |
425 | $Read_loop_manifest: |
426 | $ READ/END_OF_FILE = Done_manifest CONFIG line |
427 | $! This algorithm turns "foo/bar/baz.c" into "[.foo.bar]baz.c" |
428 | $! pvhp@lns62.lns.cornell.edu 10-JUN-1996 20:31:46 |
429 | $! 2-MAR-1998 15:46:11 Improved to turn "foo/bar/baz.c.buz" |
430 | $! into "[.foo.bar]baz.c_buz as happens with vmstar and unzip |
431 | $ line = F$EDIT(line,"TRIM, COMPRESS") |
432 | $ file_2_find = F$EXTRACT(0,F$LOCATE(" ",line),line) |
433 | $ IF F$LOCATE("/",file_2_find) .NE. F$LENGTH(file_2_find) |
434 | $ THEN |
435 | $Re_strip_line_manifest: |
436 | $ loca = F$LOCATE("/",file_2_find) |
437 | $ ante = F$EXTRACT(0,loca,file_2_find) |
438 | $ post = F$EXTRACT(loca,F$LENGTH(file_2_find),file_2_find) |
439 | $ test_this = ante + "." + (post - "/") |
440 | $ IF F$LOCATE("/",test_this) .NE. F$LENGTH(test_this) |
441 | $ THEN |
442 | $ file_2_find = ante + "." + (post - "/") |
443 | $ GOTO Re_strip_line_manifest |
444 | $ ELSE |
445 | $ file_2_find = ante + "]" + (post - "/") |
446 | $ ENDIF |
447 | $ file_2_find = "[-."+file_2_find |
448 | $ ELSE |
449 | $ file_2_find = "[-]" + file_2_find |
450 | $ ENDIF |
451 | $! |
452 | $ dirname = F$EXTRACT(0,F$LOCATE("]",file_2_find),file_2_find) + "]" |
453 | $ file_2_find = file_2_find - dirname |
454 | $ dots = 0 |
455 | $Dot_loop: |
456 | $ dot_ele = F$ELEMENT(dots,".",file_2_find) |
457 | $ IF dot_ele .EQS. "." THEN GOTO Eo_dot_loop |
458 | $ IF dots .eq. 0 |
459 | $ THEN basename = f$extract(0,f$locate(".",file_2_find),file_2_find) + "." |
460 | $ ELSE basename = basename + dot_ele + "_" |
461 | $ ENDIF |
462 | $ dots = dots + 1 |
463 | $ GOTO dot_loop |
464 | $Eo_dot_loop: |
465 | $ IF (((f$length(file_2_find)+1) .eq. f$length(basename)) .and. - |
466 | (f$extract(f$length(basename)-1,1,basename) .eqs. "_")) THEN - |
467 | basename = f$extract(0,f$length(basename)-1,basename) |
468 | $ file_2_find = dirname + basename |
469 | $! |
470 | $ found = F$SEARCH(file_2_find) |
471 | $ IF (found .EQS. "") |
472 | $ THEN |
473 | $ WRITE MISSING file_2_find |
474 | $ IF ((F$LENGTH(miss_list)+F$LENGTH(file_2_find)).LT.250) |
475 | $ THEN |
476 | $ miss_list = miss_list + "," + file_2_find |
477 | $ ENDIF |
478 | $ ENDIF |
479 | $ GOTO Read_loop_manifest |
480 | $Done_manifest: |
481 | $ CLOSE CONFIG |
482 | $ ENDIF !"TRUE" |
483 | $ CLOSE MISSING |
484 | $ ENDIF ! (manifestfound .NES. "") |
485 | $Beyond_manifest: |
486 | $ IF (miss_list .NES. "") |
487 | $ THEN |
488 | $ echo "Some of the files not found include:" |
489 | $ cat4 MISSING. |
490 | $ ENDIF |
491 | $ IF ((miss_list .NES. "").OR.(manifestfound .EQS. "")) |
492 | $ THEN |
493 | $ TYPE SYS$INPUT: |
494 | |
495 | THIS PACKAGE SEEMS TO BE INCOMPLETE. |
496 | |
497 | You have the option of continuing the configuration process, despite the |
498 | distinct possibility that your kit is damaged, by typing 'y'es. If you |
499 | do, don't blame me if something goes wrong. I advise you to type 'n'o |
429a5e67 |
500 | and contact the author (sugalskd@ous.edu). |
97abc6ad |
501 | |
502 | $ READ SYS$COMMAND/PROMPT="Continue? [n] " ans |
503 | $ IF ans |
504 | $ THEN |
505 | $ echo4 "Continuing..." |
506 | $ ELSE |
507 | $ echo4 "ABORTING..." |
508 | $ GOTO Clean_up |
509 | $ ENDIF |
510 | $ ELSE |
511 | $ echo4 "Looks good..." |
512 | $ DELETE/NOLOG MISSING.; |
513 | $ ENDIF ! (miss_list .NES. "") |
514 | $ ENDIF ! (manifestfound .EQS. "") ELSE |
515 | $! |
516 | $! after finding MANIFEST (see above) |
517 | $!: Configure runs within the UU subdirectory |
518 | $! |
519 | $!: compute the number of columns on the terminal for proper question formatting |
520 | $! (sfn, will assume 80-ish) |
521 | $! |
522 | $!: set up the echo used in my read !sfn |
523 | $!: now set up to do reads with possible shell escape and default assignment !sfn |
524 | $ GOTO Beyond_myread |
525 | $! |
526 | $myread: |
527 | $ ans = "" |
528 | $ If (fastread) |
529 | $ Then |
530 | $ echo4 "''rp'" |
531 | $ Else |
532 | $ If (silent) |
533 | $ Then |
534 | $ READ SYS$COMMAND/PROMPT="''rp'" ans |
535 | $ Else |
536 | $ echo "" |
537 | $ READ SYS$COMMAND/PROMPT="''rp'" ans |
538 | $ Endif |
539 | $ Endif |
540 | $ RETURN |
541 | $! |
542 | $Beyond_myread: |
543 | $! |
544 | $!: create .config dir to save info across Configure sessions |
545 | $ IF ( F$SEARCH("[-]CONFIG.DIR").EQS."" ) |
546 | $ THEN |
547 | $ CREATE/DIRECTORY [-.CONFIG] |
548 | $ OPEN/WRITE CONFIG [-.CONFIG]README. |
549 | $ WRITE CONFIG - |
550 | "This directory created by Configure to save information that should" |
551 | $ WRITE CONFIG - |
552 | "persist across sessions." |
553 | $ WRITE CONFIG "" |
554 | $ WRITE CONFIG - |
555 | "You may safely delete it if you wish." |
556 | $ CLOSE CONFIG |
557 | $ ENDIF |
558 | $! |
559 | $!: general instructions |
560 | $ needman = "true" |
561 | $ firsttime = "true" |
562 | $ user = F$EDIT(F$GETJPI("","USERNAME"),"TRIM,COLLAPSE") |
563 | $ IF .NOT.(F$SEARCH("[-.CONFIG]INSTRUCT.").EQS."") |
564 | $ THEN |
565 | $ messages = F$ENVIRONMENT("MESSAGE") |
566 | $ SET MESSAGE/NOFAC/NOSEV/NOIDENT/NOTEXT !sorry :-( |
567 | $ contains /NOOUTPUT [-.CONFIG]INSTRUCT. 'user' |
568 | $ IF .NOT.($status.EQ.%X08D78053) |
569 | $ THEN |
570 | $ firsttime="" |
571 | $ dflt = "n" |
572 | $ rp = "Would you like to see the instructions? [''dflt'] " |
573 | $ GOSUB myread |
574 | $ if .NOT.ans THEN needman="" |
575 | $ ENDIF |
576 | $ SET MESSAGE 'messages' !hope you made it here :-) |
577 | $ ENDIF |
578 | $ if (fastread.AND.silent.AND.(alldone.eqs."cont")) THEN needman="" |
579 | $! |
580 | $ IF (needman) |
581 | $ THEN |
582 | $ TYPE SYS$INPUT: |
583 | |
584 | This installation shell script will examine your system and ask you questions |
585 | to determine how the perl5 package should be installed. If you get |
586 | stuck on a question, you may use a ^C or ^Y shell escape to STOP this |
587 | process, edit something, then restart this process as you just did. |
588 | Many of the questions will have default answers in square |
589 | brackets; typing carriage return will give you the default. |
590 | |
591 | $ READ SYS$COMMAND/PROMPT="Type carriage return to continue " ans |
592 | $ TYPE SYS$INPUT: |
593 | |
594 | In a hurry? You may run '@Configure -d'. This will bypass nearly all |
595 | the questions and use the computed defaults (or the previous answers provided |
596 | there was already a config.sh file). Type '@Configure -h' for a list of |
597 | options. |
598 | |
599 | $ READ SYS$COMMAND/PROMPT="Type carriage return to continue " ans |
600 | $ TYPE SYS$INPUT: |
601 | |
602 | Much effort has been expended to ensure that this shell script will |
603 | run on any VMS system. If despite that it blows up on yours, your |
604 | best bet is to edit Configure.com and @ it again. Whatever problems |
605 | you have with Configure.com, let me (sugalskd@ous.edu) know how I blew |
606 | it. |
607 | |
608 | $!This installation script affects things in two ways: |
609 | $! |
610 | $!1) it may do direct variable substitutions on some of the files included |
611 | $! in this kit. |
612 | $!2) it builds a config.h file for inclusion in C programs. You may edit |
613 | $! any of these files as the need arises after running this script. |
614 | $! |
615 | $!If you make a mistake on a question, there is no easy way to back up to it |
616 | $!currently. |
617 | $! |
618 | $ READ SYS$COMMAND/PROMPT="Type carriage return to continue " ans |
619 | $ IF (F$SEARCH("[-.CONFIG]INSTRUCT.").EQS."") |
620 | $ THEN |
621 | $ OPEN/WRITE CONFIG [-.CONFIG]INSTRUCT. |
622 | $ WRITE CONFIG user |
623 | $ CLOSE CONFIG |
624 | $ ENDIF |
625 | $ ENDIF !(needman .EQS. "true") |
626 | $! |
627 | $!: see if sh knows # comments !sfn |
628 | $ sharpbang = "$ " |
629 | $!: figure out how to guarantee sh startup !sfn |
630 | $!: find out where common programs are !sfn |
631 | $!loclist="awk/cat/comm/cp/echo/expr/find/grep/ln/ls/mkdir/rm/sed/sort/touch/tr/uniq" |
632 | $!trylist="Mcc/byacc/cpp/csh/date/egrep/less/line/more/nroff/perl/pg/sendmail/test/uname" |
633 | $! echo "I don't know where '$file' is, and my life depends on it." |
634 | $! echo "Go find a public domain implementation or fix your PATH setting!" |
635 | $! echo "" |
636 | $! echo "Don't worry if any of the following aren't found..." |
637 | $!: determine whether symbolic links are supported !sfn |
638 | $!: see whether [:lower:] and [:upper:] are supported character classes !sfn |
639 | $!: set up the translation script tr, must be called with ./tr of course !sfn |
640 | $! |
641 | $!: Try to determine whether config.sh was made on this system |
642 | $!: Get old answers from old config file if Configure was run on the |
643 | $!: same system, otherwise use the hints. |
644 | $ config_sh_es = "''config_sh'/[-]config.sh/[-.vms]config.vms/" |
645 | $ i = 0 |
646 | $ max = 3 |
647 | $Config_sh_look: |
648 | $ config_sh = F$ELEMENT(i,"/",config_sh_es) |
649 | $ i = i + 1 |
650 | $ IF (config_sh.NES."/").AND.(config_sh.NES."") |
651 | $ THEN |
652 | $ configshfound = F$SEARCH(config_sh) |
653 | $ IF (configshfound.NES."") THEN GOTO Config_sh_found |
654 | $ ENDIF |
655 | $ IF (i.LT.max) THEN GOTO Config_sh_look |
656 | $ IF (configshfound.EQS."") THEN GOTO Beyond_config_sh |
657 | $Config_sh_found: |
658 | $ echo "" |
659 | $ echo "Fetching default answers from ''config_sh'..." |
660 | $!we actually do not have "hints/" for VMS |
661 | $! TYPE SYS$INPUT: |
662 | $! |
663 | $!First time through, eh? I have some defaults handy for the following systems: |
664 | $! |
665 | $! echo " ","VMS_VAX" |
666 | $! echo " ","VMS_AXP" |
667 | $! : Now look for a hint file osname_osvers, unless one has been |
668 | $! : specified already. |
669 | $! TYPE SYS$INPUT: |
670 | $! |
671 | $!You may give one or more space-separated answers, or "none" if appropriate. |
672 | $!If your OS version has no hints, DO NOT give a wrong version -- say "none". |
673 | $! |
674 | $! READ SYS$COMMAND/PROMPT="Which of these apply, if any? " ans |
675 | $! |
676 | $Beyond_config_sh: |
677 | $! |
678 | $!: Restore computed paths !sfn |
679 | $! |
680 | $! genconfig.pl has "osname='VMS'" |
681 | $ osname = F$EDIT(F$GETSYI("NODE_SWTYPE"),"COLLAPSE") |
682 | $! %Config-I-VMS, a necessary error trap (could be PC running VCL) |
683 | $! |
684 | $ IF (osname .NES. "VMS") |
685 | $ THEN |
686 | $ echo4 "Hmm.. I wonder what ''osname' is (?)" |
687 | $ TYPE SYS$INPUT: |
688 | |
689 | %Config-E-VMS, ERROR: |
690 | |
691 | Err, you do not appear to be running VMS! |
692 | This package is intended to Configure the building of Perl for VMS. |
693 | |
694 | $ READ SYS$COMMAND/PROMPT="Continue anyway? [n] " ans |
695 | $ IF ans |
696 | $ THEN |
697 | $ echo4 "Continuing..." |
698 | $ ELSE |
699 | $ echo4 "ABORTING..." |
700 | $ SET DEFAULT 'vms_default_directory_name' !be kind rewind |
701 | $ STOP |
702 | $ EXIT 2 !$STATUS = "%X00000002" (error) |
703 | $ ENDIF |
704 | $ ELSE !we are on VMS huzzah! |
705 | $ IF .NOT.silent |
706 | $ THEN TYPE SYS$INPUT: |
707 | |
708 | Configure uses the operating system name and version to set some defaults. |
709 | The default value is probably right if the name rings a bell. Otherwise, |
710 | since spelling matters for me, either accept the default or answer "none" |
711 | to leave it blank. |
712 | $ ENDIF |
713 | $ rp = "Operating system name? [''osname'] " |
714 | $ GOSUB myread |
715 | $ IF ans.nes."" |
716 | $ THEN |
717 | $ IF (ans.NES.osname) !.AND.knowitall |
718 | $ THEN |
719 | $ echo4 "I'll go with ''osname' anyway..." |
720 | $ ENDIF |
721 | $ ENDIF |
722 | $ ENDIF !(osname .NES./.EQS. "VMS") |
723 | $! |
724 | $!: who configured the system |
725 | $! see 'user' above. |
726 | $ cf_by = F$EDIT(user,"LOWERCASE") |
727 | $! cf_time = F$CVTIME() !superceded by procedure below |
728 | $ osvers = F$GETSYI("VERSION") |
729 | $! |
730 | $! Peter Prymmer has seen: |
731 | $! "SYS$TIMEZONE_DIFFERENTIAL" = "-46800" (sic) |
732 | $! "SYS$TIME_ZONE" = "EDT" |
733 | $! |
734 | $! Charles Lane recommended: |
735 | $! "SYS$TIMEZONE_DIFFERENTIAL" = "-14400" |
736 | $! "NEWS_TIMEZONE" = "-0500" |
737 | $! "ST_TIMEZONE" = "EDT" |
738 | $! "JAN_TIME_ZONE" = "EST " |
739 | $! "MULTINET_TIMEZONE" = "EST" |
740 | $! "DAYLIGHT_SAVINGS" = "1" |
741 | $! |
742 | $! Charles Bailey recommends (in ANU NEWS Doc Jan 1995): |
743 | $! "PMDF_Timezone" |
744 | $! "Multinet_Timezone" |
745 | $! "TCPware_Timezone" |
746 | $! "WIN$Time_Zone" |
747 | $! |
748 | $! This snippet o' DCL returns a string in default Unix `date` format, |
749 | $! and it will prompt to set SYS$TIMEZONE_DIFFERENTIAL. |
750 | $! Peter Prymmer pvhp@lns62.lns.cornell.edu |
751 | $! |
752 | $ MIN_TZO = -840 !units are minutes here |
753 | $ MAX_TZO = 840 |
754 | $! |
755 | $ wkday = F$EXTRACT(0,3,F$CVTIME(,,"WEEKDAY")) |
756 | $ monn = F$CVTIME(,,"MONTH") |
757 | $ mday = F$EXTRACT(8,2,F$CVTIME(,,"DATE")) |
758 | $ hour = F$CVTIME(,,"HOUR") |
759 | $ min = F$CVTIME(,,"MINUTE") |
760 | $ sec = F$CVTIME(,,"SECOND") |
761 | $ year = F$CVTIME(,,"YEAR") |
762 | $! |
763 | $ months = "/Jan/Feb/Mar/Apr/May/Jun/Jul/Aug/Sep/Oct/Nov/Dec/" |
764 | $ i = 0 |
765 | $Mon_loop: |
766 | $ i = i + 1 |
767 | $ mon = F$ELEMENT(i,"/",months) |
768 | $ IF i.LT.monn THEN GOTO Mon_loop |
769 | $! |
770 | $ tzneedset = "t" |
771 | $ systz = F$TRNLNM("SYS$TIMEZONE_DIFFERENTIAL") |
772 | $ IF systz.NES."" |
773 | $ THEN |
774 | $ tzhour = F$INTEGER(systz)/3600 |
775 | $ tzmins = F$INTEGER(systz)/60 |
776 | $ tzminrem = tzmins - tzhour*60 |
777 | $ IF tzminrem.lt.0 THEN tzminrem = -1*tzminrem !keeps !2ZL happy |
778 | $ IF tzhour.ge.0 |
779 | $ THEN signothetime = "+" |
780 | $ IF tzhour.EQ.0.AND.tzminrem.EQ.0 |
781 | $ THEN direction = "on GMT/" |
782 | $ ELSE direction = "east of " |
783 | $ ENDIF |
784 | $ ELSE signothetime = "-" |
785 | $ tzhour = -1*tzhour !keeps !UL happy |
786 | $ direction = "west of " |
787 | $ ENDIF |
788 | $ echo "" |
789 | $ echo "%Config-I-VMS," |
790 | $ echo "According to the setting of your ""SYS$TIMEZONE_DIFFERENTIAL"" (= ''systz')" |
791 | $ IF tzminrem.ne.0 |
792 | $ THEN |
793 | $ tzspan = "''tzhour' hours & ''tzminrem' minutes" |
794 | $ ELSE |
795 | $ tzspan = "''tzhour' hours" |
796 | $ ENDIF |
797 | $ dflt = "y" |
798 | $ echo "Your system is ''tzspan' ''direction'UTC in England." |
799 | $ rp = "%Config-I-VMS, (''systz') Is this UTC Time Zone Offset correct? [''dflt'] " |
800 | $ GOSUB myread |
801 | $ IF ans.OR.(ans.EQS."") |
802 | $ THEN |
803 | $ tzneedset = "f" |
804 | $ tzd = systz |
805 | $ GOTO Beyond_TimeZone |
806 | $ ENDIF |
807 | $ ELSE |
808 | $ echo "" |
809 | $ echo4 "%Config-I-VMS," |
810 | $ echo4 """SYS$TIMEZONE_DIFFERENTIAL"" does not appear to be DEFINEd on your system" |
811 | $ ENDIF |
812 | $! |
813 | $TZSet: |
814 | $ echo "" |
815 | $ echo "Please tell me in hh:mm form what time offset from GMT/UTC in England" |
816 | $ echo "you are. As an example Eastern (US) Standard Time is -5:00 offset, but" |
817 | $ echo "Eastern Daylight Time (summer) is -4:00 offset." |
818 | $ dflt = "0:00" |
819 | $ rp = "Enter the Time Zone offset: [''dflt'] " |
820 | $ GOSUB myread |
821 | $ ans = F$Edit(ans,"collapse,trim,uncomment,upcase") |
822 | $ IF ans.EQS."" THEN ans = dflt |
823 | $ tzhour = F$ELEMENT(0,":","''ans'") !first |
824 | $ IF tzhour.EQS."" THEN tzhour = 0 |
825 | $ tzhour = F$INTEGER(tzhour) |
826 | $ tzminrem = F$ELEMENT(1,":","''ans'") !second |
827 | $ IF tzminrem.NES."" |
828 | $ THEN |
829 | $ tzminrem = F$INTEGER(tzminrem) |
830 | $ IF F$EXTRACT(0,1,"''ans'") .EQS. "-" THEN tzminrem = tzminrem * -1 |
831 | $ ELSE |
832 | $ tzminrem = 0 |
833 | $ ENDIF |
834 | $ tzmins = tzhour*60 + tzminrem |
835 | $ tzd = F$STRING(tzmins*60) |
836 | $ IF tzhour .GE. 0 |
837 | $ THEN |
838 | $ signothetime = "+" |
839 | $ ELSE |
840 | $ tzhour = -1*tzhour !keeps !UL happy |
841 | $ signothetime = "-" |
842 | $ ENDIF |
843 | $ IF (tzmins.GT.MAX_TZO).OR.(tzmins.LT.MIN_TZO) |
844 | $ THEN |
845 | $ echo "" |
846 | $ echo "%Config-W-VMS-TIMERANGE, Response must be in the range -14:00 to 14:00." |
847 | $ goto TZSet |
848 | $ ENDIF |
849 | $! |
850 | $Beyond_TimeZone: |
851 | $ tz = f$fao("UTC!AS!UL:!2ZL",signothetime,tzhour,tzminrem) |
852 | $ cf_time = "''wkday' ''mon' ''mday' ''hour':''min':''sec' ''tz' ''year'" |
853 | $! |
854 | $!: determine the architecture name |
855 | $! genconfig.pl has either archname='VMS_AXP' or 'VMS_VAX' |
856 | $! |
857 | $ IF (F$GETSYI("HW_MODEL") .LT. 1024) |
858 | $ THEN |
859 | $ archname = "VMS_VAX" |
860 | $ ELSE |
861 | $ archname = "VMS_AXP" |
862 | $ ENDIF |
863 | $ rp = "What is your architecture name? [''archname'] " |
864 | $ GOSUB myread |
865 | $ IF ans.NES."" |
866 | $ THEN |
867 | $ ans = F$EDIT(ans,"COLLAPSE, UPCASE") |
868 | $ IF (ans.NES.archname) !.AND.knowitall |
869 | $ THEN |
870 | $ echo4 "I'll go with ''archname' anyway..." |
871 | $ ENDIF |
872 | $ ENDIF |
873 | $ IF (archname.EQS."VMS_AXP") |
874 | $ THEN |
e6df7ed1 |
875 | $ dflt = "n" |
97abc6ad |
876 | $ rp = "Are you sharing your PERL_ROOT with a VAX? [''dflt'] " |
877 | $ GOSUB myread |
878 | $ if ans.NES."" |
879 | $ THEN |
880 | $ ans = F$EDIT(ans,"COLLAPSE, UPCASE") |
881 | $ ENDIF |
882 | $ IF (ans.NES."Y") |
883 | $ THEN |
884 | $ sharedperl = "N" |
885 | $ ELSE |
886 | $ sharedperl = "Y" |
887 | $ macros = macros + """AXE=1""," |
888 | $ ENDIF |
889 | $ ELSE |
890 | $ sharedperl = "N" |
891 | $ ENDIF |
892 | $! |
893 | $!: is AFS running? !sfn |
894 | $!: decide how portable to be. Allow command line overrides. !sfn |
895 | $!: set up shell script to do ~ expansion !sfn |
896 | $!: expand filename !sfn |
897 | $!: now set up to get a file name !sfn |
898 | $! |
899 | $ vms_skip_install = "true" |
900 | $ dflt = "y" |
901 | $! echo "" |
902 | $ rp = "%Config-I-VMS, Do you wish to skip the """"where install"""" questions? [''dflt'] " |
903 | $ GOSUB myread |
904 | $ IF (.NOT.ans).AND.(ans.NES."") THEN vms_skip_install = "false" |
905 | $ prefix = F$ENVIRONMENT("DEFAULT") - ".UU]" + "]" |
906 | $ prefix = f$parse(prefix,,,,"NO_CONCEAL") - "][" - ".;" |
907 | $ prefix = prefix - "]" + ".]" |
908 | $ IF (.NOT.vms_skip_install) |
909 | $ THEN |
910 | $!: determine root of directory hierarchy where package will be installed. |
911 | $ dflt = "default" |
912 | $ IF .NOT.silent |
913 | $ THEN |
914 | $ echo "" |
915 | $ echo "By default, ''package' will be installed in ''dflt'/bin, manual" |
916 | $ echo "pages under ''dflt'/man, etc..., i.e. with ''dflt' as prefix for" |
917 | $ echo "all installation directories. Typically set to /usr/local, but you" |
918 | $ echo "may choose /usr if you wish to install ''package' among your system |
919 | $ ENDIF |
920 | $ IF .NOT.silent |
921 | $ THEN TYPE SYS$INPUT: |
922 | binaries. If you wish to have binaries under /bin but manual pages |
923 | under /usr/local/man, that's ok: you will be prompted separately |
924 | for each of the installation directories, the prefix being only used |
925 | to set the defaults. |
926 | $ ENDIF |
927 | $ dflt = prefix |
928 | $ rp = "Installation prefix to use? [ ''dflt' ] " |
929 | $ GOSUB myread |
930 | $ IF ans.NES."" |
931 | $ THEN |
932 | $ prefix = ans |
933 | $ IF F$LOCATE(".]",ans) .EQ. F$LENGTH(ans) THEN prefix = prefix - "]" + ".]" |
934 | $ ELSE |
935 | $ prefix = dflt |
936 | $ ENDIF |
937 | $! |
938 | $!: set the prefixit variable, to compute a suitable default value |
939 | $! |
940 | $!: determine where private library files go |
941 | $!: Usual default is /usr/local/lib/perl5. Also allow things like |
942 | $!: /opt/perl/lib, since /opt/perl/lib/perl5 would be redundant. |
943 | $ IF .NOT.silent |
944 | $ THEN TYPE SYS$INPUT: |
945 | |
946 | There are some auxiliary files for perl5 that need to be put into a |
947 | private library directory that is accessible by everyone. |
948 | $ ENDIF |
949 | $ dflt = prefix - ".]" + ".LIB]" |
950 | $ rp = "Pathname where the private library files will reside? " |
951 | $ rp = F$FAO("!AS!/!AS",rp,"[ ''dflt' ] ") |
952 | $ GOSUB myread |
953 | $ IF ans.NES."" |
954 | $ THEN privlib = ans |
955 | $ ELSE privlib = dflt |
956 | $ ENDIF |
957 | $! |
958 | $ ENDIF !%Config-I-VMS, skip "where install" questions |
959 | $! |
960 | $!: set the base revision |
961 | $ baserev="5.0" |
962 | $!: get the patchlevel |
963 | $ echo "" |
964 | $ echo4 "Getting the current patchlevel..." !>&4 |
965 | $ patchlevel_h = F$SEARCH("[-]patchlevel.h") |
966 | $ IF (patchlevel_h.NES."") |
967 | $ THEN |
968 | $ got_patch = "false" |
969 | $ got_sub = "false" |
970 | $ OPEN/READONLY CONFIG 'patchlevel_h' |
971 | $Patchlevel_h_loop: |
972 | $ READ/END_Of_File=Close_patch CONFIG line |
cceca5ed |
973 | $ IF ((F$LOCATE("#define PERL_VERSION",line).NE.F$LENGTH(line)).AND.(.NOT.got_patch)) |
97abc6ad |
974 | $ THEN |
975 | $ line = F$EDIT(line,"COMPRESS, TRIM") |
cc391245 |
976 | $ patchlevel = F$ELEMENT(2," ",line) |
97abc6ad |
977 | $ got_patch = "true" |
978 | $ ENDIF |
cceca5ed |
979 | $ IF ((F$LOCATE("#define PERL_SUBVERSION",line).NE.F$LENGTH(line)).AND.(.NOT.got_sub)) |
97abc6ad |
980 | $ THEN |
981 | $ line = F$EDIT(line,"COMPRESS, TRIM") |
cc391245 |
982 | $ subversion = F$ELEMENT(2," ",line) |
97abc6ad |
983 | $ got_sub = "true" |
984 | $ ENDIF |
985 | $ IF (.NOT.got_patch).OR.(.NOT.got_sub) THEN GOTO Patchlevel_h_loop |
986 | $Close_patch: |
987 | $ CLOSE CONFIG |
988 | $ ELSE |
989 | $ patchlevel="0" |
990 | $ subversion="0" |
991 | $ ENDIF |
992 | $ echo "(You have ''package' ''baserev' PL''patchlevel' sub''subversion'.)" |
993 | $! This whole thing needs replacing w/ F$FAO() calls: |
994 | $ patchlevel = F$INTEGER(patchlevel) |
995 | $ IF patchlevel.LT.10 |
996 | $ THEN patchlevel = "00" + F$STRING(patchlevel) |
997 | $ ELSE patchlevel = "0" + F$STRING(patchlevel) |
998 | $ ENDIF |
999 | $ subversion = F$INTEGER(subversion) |
1000 | $ IF subversion.GT.0 |
1001 | $ THEN |
1002 | $ IF subversion.LT.10 |
1003 | $ THEN subversion = "0" + F$STRING(subversion) |
1004 | $ ELSE subversion = F$STRING(subversion) |
1005 | $ ENDIF |
1006 | $ ELSE subversion = "" |
1007 | $ ENDIF |
1008 | $! |
1009 | $ version = F$EXTRACT(0,1,baserev) + "_" + patchlevel + subversion |
1010 | $! |
1011 | $ IF (.NOT.vms_skip_install) |
1012 | $ THEN |
1013 | $!: set the prefixup variable, to restore leading tilda escape !sfn |
1014 | $!: set the prefixup variable, to restore leading tilde escape !sfn |
1015 | $! |
1016 | $!: determine where public architecture dependent libraries go |
1017 | $ IF (.NOT.silent) |
1018 | $ THEN |
1019 | $ echo "" |
1020 | $ echo "''package' contains architecture-dependent library files. If you are" |
1021 | $ ENDIF |
1022 | $ IF (.NOT.silent) |
1023 | $ THEN TYPE SYS$INPUT: |
1024 | sharing libraries in a heterogeneous environment, you might store |
1025 | these files in a separate location. Otherwise, you can just include |
1026 | them with the rest of the public library files. |
1027 | $ ENDIF |
1028 | $ dflt = privlib - "]" + "." + archname + "." + version + "]" |
1029 | $ rp = "Where do you want to put the public architecture-dependent libraries? " |
1030 | $ rp = F$FAO("!AS!/!AS",rp,"[ ''dflt' ] ") |
1031 | $ GOSUB myread |
1032 | $ IF ans.NES."" |
1033 | $ THEN archlib = ans |
1034 | $ ELSE archlib = dflt |
1035 | $ ENDIF |
1036 | $! |
1037 | $!: set up the script used to warn in case of inconsistency !sfn |
1038 | $!: function used to set $1 to $val !sfn |
1039 | $! |
1040 | $ ENDIF !%Config-I-VMS, skip "where install" questions |
1041 | $! This quotation from Configure has to be included on VMS: |
1042 | $ TYPE SYS$INPUT: |
1043 | |
1044 | There is, however, a strange, musty smell in the air that reminds me of |
1045 | something...hmm...yes...I've got it...there's a VMS nearby, or I'm a Blit. |
1046 | $ CONTINUE |
1047 | $ IF (.NOT.vms_skip_install) |
1048 | $ THEN |
1049 | $!: it so happens the Eunice I know will not run shell scripts in Unix format |
1050 | $! |
1051 | $!: see if setuid scripts can be secure !sfn |
1052 | $!: now see if they want to do setuid emulation !sfn |
1053 | $! |
1054 | $!: determine where site specific libraries go. |
1055 | $ IF .NOT.silent |
1056 | $ THEN TYPE SYS$INPUT: |
1057 | |
1058 | The installation process will also create a directory for |
1059 | site-specific extensions and modules. Some users find it convenient |
1060 | to place all local files in this directory rather than in the main |
1061 | distribution directory. |
1062 | $ ENDIF |
1063 | $ dflt = privlib - "]" + ".SITE_PERL]" |
1064 | $ rp = "Pathname for the site-specific library files? " |
1065 | $ rp = F$FAO("!AS!/!AS",rp,"[ ''dflt' ] ") |
1066 | $ GOSUB myread |
1067 | $ IF ans.NES."" |
1068 | $ THEN sitelib = ans |
1069 | $ ELSE sitelib = dflt |
1070 | $ ENDIF |
1071 | $! |
1072 | $!: determine where site specific architecture-dependent libraries go. |
1073 | $ IF .NOT.silent |
1074 | $ THEN TYPE SYS$INPUT: |
1075 | |
1076 | The installation process will also create a directory for |
1077 | architecture-dependent site-specific extensions and modules. |
1078 | $ ENDIF |
1079 | $ dflt = sitelib - "]" + "." + archname + "]" |
1080 | $ rp = "Pathname for the site-specific architecture-dependent library files? " |
1081 | $ rp = F$FAO("!AS!/!AS",rp,"[ ''dflt' ] ") |
1082 | $ GOSUB myread |
1083 | $ IF ans.NES."" |
1084 | $ THEN sitearch = ans |
1085 | $ ELSE sitearch = dflt |
1086 | $ ENDIF |
1087 | $! |
1088 | $!: determine where old public architecture dependent libraries might be |
1089 | $! |
1090 | $!: determine where public executables go |
1091 | $ dflt = prefix - ".]" + ".BIN]" |
1092 | $ rp = "Pathname where the public executables will reside? " |
1093 | $ rp = F$FAO("!AS!/!AS",rp,"[ ''dflt' ] ") |
1094 | $ GOSUB myread |
1095 | $ IF ans.NES."" |
1096 | $ THEN bin = ans |
1097 | $ ELSE bin = dflt |
1098 | $ ENDIF |
1099 | $! |
1100 | $!: determine where manual pages are on this system |
1101 | $!: What suffix to use on installed man pages |
1102 | $!: see if we can have long filenames |
1103 | $!: determine where library module manual pages go |
1104 | $!: What suffix to use on installed man pages |
1105 | $!: see what memory models we can support |
1106 | $! |
1107 | $ ENDIF !%Config-I-VMS, skip "where install" questions |
1108 | $! |
1109 | $!: see if we need a special compiler |
1110 | $! cc_list = "cc/vaxc|cc/decc|gcc" !%Config-I-VMS, compiler symbols/commands |
1111 | $! |
1112 | $ nocc = "f" |
1113 | $ vms_cc_dflt = "" |
1114 | $ vms_cc_available = "" |
1115 | $! |
1116 | $ OPEN/WRITE CONFIG ccvms.c |
1117 | $ WRITE CONFIG "#include <stdlib.h>" !DECC is sooo picky |
1118 | $ WRITE CONFIG "#include <stdio.h>" |
1119 | $ WRITE CONFIG "int main() {" |
1120 | $ WRITE CONFIG "#ifdef __DECC" |
1121 | $ WRITE CONFIG " printf(""/DECC\n"");" |
1122 | $ WRITE CONFIG "#else" |
1123 | $ WRITE CONFIG " printf(""/VAXC\n"");" |
1124 | $ WRITE CONFIG "#endif" |
1125 | $ WRITE CONFIG " exit(0);" |
1126 | $ WRITE CONFIG "}" |
1127 | $ CLOSE CONFIG |
1128 | $! |
1129 | $ DEFINE SYS$ERROR _NLA0: |
1130 | $ DEFINE SYS$OUTPUT _NLA0: |
1131 | $ cc/NoObj/list=ccvms.lis ccvms.c |
1132 | $ tmp = $status |
1133 | $ DEASSIGN SYS$OUTPUT |
1134 | $ DEASSIGN SYS$ERROR |
1135 | $ IF (silent) THEN GOSUB Shut_up |
1136 | $! echo "%Config-I-VMS, After cc compile $status = >''tmp'<" !diagnostic |
1137 | $! |
1138 | $ IF tmp.NE.%X10B90001 |
1139 | $ THEN |
1140 | $ IF tmp.NE.%X10000001 |
1141 | $ THEN |
1142 | $ nocc = "t" !%X10000001 is return from gcc |
1143 | $ GOTO Gcc_initial_check |
1144 | $ ENDIF |
1145 | $ ENDIF |
1146 | $! |
1147 | $ GOSUB List_Parse |
1148 | $ IF .NOT.silent THEN echo "" |
1149 | $ echo "%Config-I-VMS, Default ""cc"" is ''line' ''archsufx' ''F$GETSYI("VERSION")'" |
1150 | $ IF F$LOCATE("VAX",line).NE.F$LENGTH(line) |
1151 | $ THEN |
1152 | $ vms_cc_dflt = "/vaxc" |
1153 | $ vms_cc_available = vms_cc_available + "cc/vaxc " |
1154 | $ IF .NOT.silent |
1155 | $ THEN |
1156 | $ echo "%Config-I-VMS, Will try cc/decc..." |
1157 | $ ENDIF |
1158 | $ DEFINE SYS$ERROR _NLA0: |
1159 | $ DEFINE SYS$OUTPUT _NLA0: |
1160 | $ SET NOON |
1161 | $ cc/decc/NoObj/list=ccvms.lis ccvms.c |
1162 | $ tmp = $status |
1163 | $ DEASSIGN SYS$OUTPUT |
1164 | $ DEASSIGN SYS$ERROR |
1165 | $ SET ON |
1166 | $ IF (silent) THEN GOSUB Shut_up |
1167 | $ IF tmp.NE.%X10B90001 |
1168 | $ THEN |
1169 | $ echo "%Config-I-VMS, Apparently you don't have that one." |
1170 | $ ELSE |
1171 | $ GOSUB List_parse |
1172 | $ echo "%Config-I-VMS, You also have: ''line' ''archsufx' ''F$GETSYI("VERSION")'" |
1173 | $ vms_cc_available = vms_cc_available + "cc/decc " |
1174 | $ ENDIF |
1175 | $ ELSE |
1176 | $ IF F$LOCATE("DEC",line).NE.F$LENGTH(line) |
1177 | $ THEN |
1178 | $ vms_cc_dflt = "/decc" |
1179 | $ vms_cc_available = vms_cc_available + "cc/decc " |
1180 | $ echo "%Config-I-VMS, Will try cc/vaxc..." |
1181 | $ DEFINE SYS$ERROR _NLA0: |
1182 | $ DEFINE SYS$OUTPUT _NLA0: |
1183 | $ SET NOON |
1184 | $ cc/vaxc/NoObj/list=ccvms.lis ccvms.c |
1185 | $ tmp = $status |
1186 | $ DEASSIGN SYS$OUTPUT |
1187 | $ DEASSIGN SYS$ERROR |
1188 | $ SET ON |
1189 | $ IF (silent) THEN GOSUB Shut_up |
1190 | $ IF tmp.NE.%X10B90001 |
1191 | $ THEN |
1192 | $ echo "%Config-I-VMS, Apparently you don't have that one." |
1193 | $ ELSE |
1194 | $ GOSUB List_parse |
1195 | $ echo "%Config-I-VMS, You also have: ''line' ''archsufx' ''F$GETSYI("VERSION")'" |
1196 | $ vms_cc_available = vms_cc_available + "cc/vaxc " |
1197 | $ ENDIF |
1198 | $ ENDIF |
1199 | $ ENDIF |
1200 | $! |
1201 | $Gcc_initial_check: |
1202 | $ echo "%Config-I-VMS, Checking for Gcc" |
1203 | $ OPEN/WRITE CONFIG gccvers.lis |
1204 | $ DEFINE SYS$ERROR CONFIG |
1205 | $ DEFINE SYS$OUTPUT CONFIG |
1206 | $ 'gcc_symbol'/noobj/version _nla0: |
1207 | $ tmp = $status |
1208 | $ DEASSIGN SYS$OUTPUT |
1209 | $ DEASSIGN SYS$ERROR |
1210 | $ IF (silent) THEN GOSUB Shut_up |
1211 | $ CLOSE CONFIG |
1212 | $ IF (tmp.NE.%X10000001).and.(tmp.ne.%X00030001) |
1213 | $ THEN |
1214 | $ echo "%Config-I-VMS, Symbol ""''gcc_symbol'"" is not defined. I guess you don't have it." |
1215 | $ goto cc_cleanup |
1216 | $ ENDIF |
1217 | $ OPEN/READ CONFIG gccvers.lis |
1218 | $GCC_List_Read: |
1219 | $ READ/END_OF_FILE=GCC_List_End CONFIG line |
1220 | $ GOTO GCC_List_Read |
1221 | $GCC_List_End: |
1222 | $ CLOSE CONFIG |
1223 | $ echo line |
1224 | $ vms_cc_available = vms_cc_available + "''gcc_symbol' " |
1225 | $ DELETE/NOLOG/NOCONFIRM gccvers.lis; |
1226 | $! |
1227 | $CC_Cleanup: |
1228 | $ DELETE/NOLOG/NOCONFIRM ccvms.*; |
1229 | $CC_Desired: |
1230 | $!: see if we need a special compiler |
1231 | $! echo "" |
1232 | $ echo "%Config-I-VMS, available compiler(s):" |
1233 | $ echo "( ''vms_cc_available')" |
1234 | $ IF .NOT.nocc |
1235 | $ THEN |
1236 | $ dflt = "cc''vms_cc_dflt'" !-> "cc" in case first compile went OK |
1237 | $ ELSE |
1238 | $ dflt = gcc_symbol |
1239 | $ ENDIF |
1240 | $ rp = "Use which C compiler? [''dflt'] " |
1241 | $ GOSUB myread |
1242 | $ IF ans.NES."" |
1243 | $ THEN |
1244 | $ ans = F$EDIT(ans,"TRIM, COMPRESS, LOWERCASE") |
1245 | $ Mcc = ans |
1246 | $ IF F$LOCATE("dec",ans).NE.F$LENGTH(ans) |
1247 | $ THEN |
1248 | $ Mcc = "cc/decc" |
1249 | $ Using_Dec_C = "Yes" |
429a5e67 |
1250 | $ C_COMPILER_Replace = "CC=cc=''Mcc'" |
97abc6ad |
1251 | $ ENDIF |
1252 | $ IF F$LOCATE("vax",ans).NE.F$LENGTH(ans) |
1253 | $ THEN |
1254 | $ Mcc = "cc/vaxc" |
1255 | $ Using_Vax_C = "Yes" |
429a5e67 |
1256 | $ C_COMPILER_Replace = "CC=cc=''Mcc'" |
97abc6ad |
1257 | $ ENDIF |
1258 | $ IF Mcc.NES.dflt |
1259 | $ THEN |
1260 | $ IF F$LOCATE("dec",dflt).NE.F$LENGTH(dflt) |
1261 | $ THEN |
1262 | $ C_COMPILER_Replace = "CC=cc=''Mcc'" |
1263 | $ ELSE |
1264 | $ Using_Dec_C = "Yes" |
1265 | $ IF F$LOCATE("vax",dflt).NE.F$LENGTH(dflt) |
1266 | $ THEN |
1267 | $ C_COMPILER_Replace = "CC=cc=''Mcc'" |
1268 | $ ENDIF |
1269 | $ ENDIF |
1270 | $ ELSE |
1271 | $ IF Mcc .EQS. "cc/decc" |
1272 | $ THEN |
1273 | $ Using_Dec_C = "Yes" |
429a5e67 |
1274 | $ C_COMPILER_Replace = "CC=cc=''Mcc'" |
97abc6ad |
1275 | $ ENDIF |
1276 | $ ENDIF |
1277 | $ ELSE |
1278 | $ Mcc = dflt |
1279 | $ IF Mcc .EQS. "cc/decc" |
1280 | $ THEN |
1281 | $ Using_Dec_C = "Yes" |
429a5e67 |
1282 | $ C_COMPILER_Replace = "CC=cc=''Mcc'" |
97abc6ad |
1283 | $ ENDIF |
1284 | $ IF Mcc .EQS. "cc/vaxc" |
1285 | $ THEN |
1286 | $ Using_Vax_C = "Yes" |
429a5e67 |
1287 | $ C_COMPILER_Replace = "CC=cc=''Mcc'" |
97abc6ad |
1288 | $ ENDIF |
1289 | $ IF Mcc .EQS. "gcc" |
1290 | $ THEN |
1291 | $ Using_Gnu_C = "Yes" |
429a5e67 |
1292 | $ C_COMPILER_Replace = "CC=cc=''Mcc'" |
97abc6ad |
1293 | $ ENDIF |
1294 | $ ENDIF |
1295 | $Decc_Version_check: |
1296 | $ IF "''Using_Dec_C'".EQS."Yes" |
1297 | $ THEN |
1298 | $ echo "" |
1299 | $ echo4 "Checking for Dec C's version number..." !>&4 |
1300 | $ OPEN/WRITE CONFIG deccvers.c |
1301 | $ WRITE CONFIG "#include <stdlib.h>" !DECC is sooo picky |
1302 | $ WRITE CONFIG "#include <stdio.h>" |
1303 | $ WRITE CONFIG "int main() {" |
1304 | $ WRITE CONFIG "#ifdef __DECC" |
1305 | $ WRITE CONFIG "#ifdef __DECC_VER" |
1306 | $ WRITE CONFIG " printf(""%i\n"", __DECC_VER);" |
1307 | $ WRITE CONFIG "#else" |
1308 | $ WRITE CONFIG " printf(""%i\n"", ""1"");" |
1309 | $ WRITE CONFIG "#endif" |
1310 | $ WRITE CONFIG "#endif" |
1311 | $ WRITE CONFIG " exit(0);" |
1312 | $ WRITE CONFIG "}" |
1313 | $ CLOSE CONFIG |
1314 | $ DEFINE SYS$ERROR _NLA0: |
1315 | $ DEFINE SYS$OUTPUT _NLA0: |
1316 | $ 'Mcc' deccvers.c |
1317 | $ tmp = $status |
1318 | $ DEASSIGN SYS$ERROR _NLA0: |
1319 | $ DEASSIGN SYS$OUTPUT _NLA0: |
1320 | $ IF (silent) THEN GOSUB Shut_up |
1321 | $ DEFINE SYS$ERROR _NLA0: |
1322 | $ DEFINE SYS$OUTPUT _NLA0: |
1323 | $ link deccvers.obj |
1324 | $ tmp = $status |
1325 | $ DEASSIGN SYS$ERROR |
1326 | $ DEASSIGN SYS$OUTPUT |
1327 | $ IF (silent) THEN GOSUB Shut_up |
1328 | $ OPEN/WRITE CONFIG deccvers.out |
1329 | $ DEFINE SYS$ERROR CONFIG |
1330 | $ DEFINE SYS$OUTPUT CONFIG |
1331 | $ mcr []deccvers.exe |
1332 | $ tmp = $status |
1333 | $ CLOSE CONFIG |
1334 | $ DEASSIGN SYS$OUTPUT |
1335 | $ DEASSIGN SYS$ERROR |
1336 | $ IF (silent) THEN GOSUB Shut_up |
1337 | $ OPEN/READ CONFIG deccvers.out |
1338 | $ READ/END_OF_FILE=Dec_c_cleanup CONFIG line |
1339 | $Dec_c_cleanup: |
1340 | $ CLOSE CONFIG |
1341 | $! DELETE/NOLOG/NOCONFIRM deccvers.*; |
1342 | $ echo "You are using Dec C ''line'" |
1343 | $ Dec_C_Version = line |
1344 | $ ENDIF |
1345 | $Vaxc_Invoke_check: |
1346 | $ IF "''Using_Vax_C'".EQS."Yes" |
1347 | $ THEN |
1348 | $ echo "" |
1349 | $ echo4 "Checking to see how to invoke Vax C..." |
1350 | $ OPEN/WRITE CONFIG vaxcchk.c |
1351 | $ WRITE CONFIG "#include <stdio.h>" |
1352 | $ WRITE CONFIG "int main() {" |
1353 | $ WRITE CONFIG " printf(""%i\n"", ""1"");" |
1354 | $ WRITE CONFIG " exit(0);" |
1355 | $ WRITE CONFIG "}" |
1356 | $ CLOSE CONFIG |
1357 | $ DEFINE SYS$ERROR _NLA0: |
1358 | $ DEFINE SYS$OUTPUT _NLA0: |
1359 | $ SET NOON |
1360 | $ cc/vaxc/NoObj vaxcchk.c |
1361 | $ tmp = $status |
1362 | $ DEASSIGN SYS$OUTPUT |
1363 | $ DEASSIGN SYS$ERROR |
1364 | $ SET ON |
1365 | $ IF (silent) THEN GOSUB Shut_up |
1366 | $ IF tmp.NE.%X10B90001 |
1367 | $ THEN |
1368 | $ Mcc = "cc" |
1369 | $ ELSE |
1370 | $ Mcc = "cc/vaxc" |
1371 | $ ENDIF |
1372 | $Vax_c_cleanup: |
1373 | $ DELETE/NOLOG/NOCONFIRM vaxcchk.*; |
1374 | $ ENDIF |
1375 | $Gcc_check: |
1376 | $ if "''using_gnu_c'" .eqs. "Yes" |
1377 | $ THEN |
1378 | $ vaxcrtl_olb = F$SEARCH("SYS$LIBRARY:VAXCRTL.OLB") |
1379 | $ vaxcrtl_exe = F$SEARCH("SYS$SHARE:VAXCRTL.EXE") |
1380 | $ gcclib_olb = F$SEARCH("GNU_CC:[000000]GCCLIB.OLB") |
1381 | $ IF gcclib_olb .EQS. "" |
1382 | $ THEN |
1383 | $! These objects/libs come w/ gcc 2.7.2 for AXP: |
1384 | $ tmp = F$SEARCH("GNU_CC:[000000]libgcc2.olb") |
1385 | $ IF tmp .NES. "" then gcclib_olb = tmp |
1386 | $ tmp = F$SEARCH("GNU_CC:[000000]libgcclib.olb") |
1387 | $ IF tmp .NES. "" |
1388 | $ THEN |
1389 | $ IF gcclib_olb .EQS. "" |
1390 | $ THEN gcclib_olb = tmp |
1391 | $ ELSE gcclib_olb = gcclib_olb + "/lib," + tmp |
1392 | $ ENDIF |
1393 | $ ENDIF |
1394 | $ tmp = F$SEARCH("SYS$LIBRARY:VAXCRTL.OLB") |
1395 | $ IF tmp .NES. "" |
1396 | $ THEN |
1397 | $ IF gcclib_olb .EQS. "" |
1398 | $ THEN gcclib_olb = tmp |
1399 | $ ELSE gcclib_olb = gcclib_olb + "/lib," + tmp |
1400 | $ ENDIF |
1401 | $ ENDIF |
1402 | $ tmp = F$SEARCH("GNU_CC:[000000]crt0.obj") |
1403 | $ IF tmp .NES. "" |
1404 | $ THEN |
1405 | $ IF gcclib_olb .EQS. "" |
1406 | $ THEN gcclib_olb = tmp |
1407 | $ ELSE gcclib_olb = gcclib_olb + "/lib," + tmp |
1408 | $ ENDIF |
1409 | $ ENDIF |
1410 | $ IF gcclib_olb .EQS. vaxcrtl_olb THEN gcclib_olb = "" !goofy order of axplibs |
1411 | $ ELSE |
1412 | $ gcclib_olb = gcclib_olb + "/lib" |
1413 | $ ENDIF |
1414 | $ IF gcclib_olb .NES. "" .AND. - |
1415 | (vaxcrtl_olb .NES. "" .OR. - |
1416 | vaxcrtl_exe .NES. "" ) |
1417 | $ THEN |
1418 | $ echo "" |
1419 | $ echo4 "Checking for GNU cc in disguise and/or its version number..." !>&4 |
1420 | $ OPEN/WRITE CONFIG gccvers.c |
1421 | $ WRITE CONFIG "#include <stdlib.h>" !DECC is sooo picky |
1422 | $ WRITE CONFIG "#include <stdio.h>" |
1423 | $ WRITE CONFIG "int main() {" |
1424 | $ WRITE CONFIG "#ifdef __GNUC__" |
1425 | $ WRITE CONFIG "#ifdef __VERSION__" |
1426 | $ WRITE CONFIG " printf(""%s\n"", __VERSION__);" |
1427 | $ WRITE CONFIG "#else" |
1428 | $ WRITE CONFIG " printf(""%s\n"", ""1"");" |
1429 | $ WRITE CONFIG "#endif" |
1430 | $ WRITE CONFIG "#endif" |
1431 | $ WRITE CONFIG " exit(0);" |
1432 | $ WRITE CONFIG "}" |
1433 | $ CLOSE CONFIG |
1434 | $ DEFINE SYS$ERROR _NLA0: |
1435 | $ DEFINE SYS$OUTPUT _NLA0: |
1436 | $ 'Mcc' gccvers.c |
1437 | $ tmp = $status |
1438 | $ DEASSIGN SYS$ERROR _NLA0: |
1439 | $ DEASSIGN SYS$OUTPUT _NLA0: |
1440 | $ IF (silent) THEN GOSUB Shut_up |
1441 | $ DEFINE SYS$ERROR _NLA0: |
1442 | $ DEFINE SYS$OUTPUT _NLA0: |
1443 | $ IF vaxcrtl_exe .EQS. "" |
1444 | $ THEN |
1445 | $ IF F$LOCATE("VAXCRTL",gcclib_olb).NE.F$LENGTH(gcclib_olb) |
1446 | $ THEN |
1447 | $ link gccvers.obj,'gcclib_olb',SYS$LIBRARY:VAXCRTL/Library |
1448 | $ tmp = $status |
1449 | $ ELSE |
1450 | $ link gccvers.obj,'gcclib_olb' |
1451 | $ tmp = $status |
1452 | $ ENDIF |
1453 | $ ELSE |
1454 | $ OPEN/WRITE CONFIG GCCVERS.OPT |
1455 | $ WRITE CONFIG "SYS$SHARE:VAXCRTL/SHARE" |
1456 | $ CLOSE CONFIG |
1457 | $ link gccvers.obj,GCCVERS.OPT/OPT,'gcclib_olb' |
1458 | $ tmp = $status |
1459 | $ ENDIF |
1460 | $ DEASSIGN SYS$ERROR |
1461 | $ DEASSIGN SYS$OUTPUT |
1462 | $ IF (silent) THEN GOSUB Shut_up |
1463 | $ OPEN/WRITE CONFIG gccvers.out |
1464 | $ DEFINE SYS$ERROR CONFIG |
1465 | $ DEFINE SYS$OUTPUT CONFIG |
1466 | $ mcr []gccvers.exe |
1467 | $ tmp = $status |
1468 | $ CLOSE CONFIG |
1469 | $ DEASSIGN SYS$OUTPUT |
1470 | $ DEASSIGN SYS$ERROR |
1471 | $ IF (silent) THEN GOSUB Shut_up |
1472 | $ OPEN/READ CONFIG gccvers.out |
1473 | $ READ/END_OF_FILE=Gcc_cleanup CONFIG line |
1474 | $Gcc_cleanup: |
1475 | $ CLOSE CONFIG |
1476 | $ DELETE/NOLOG/NOCONFIRM gccvers.*; |
1477 | $ IF F$LOCATE("GNU C version ",line).NE.F$LENGTH(line) |
1478 | $ THEN |
1479 | $ echo "You are not using GNU cc." |
1480 | $ GOTO Host_name |
1481 | $ ELSE |
1482 | $ echo "You are using GNU cc ''line'" |
1483 | $ Using_Gnu_C = "Yes" |
1484 | $ C_COMPILER_Replace = "CC=cc=''Mcc'" |
1485 | $ GOTO Include_dirs |
1486 | $ ENDIF |
1487 | $ ENDIF |
1488 | $endif |
1489 | $ GOTO Host_name |
1490 | $! |
1491 | $List_Parse: |
1492 | $ OPEN/READ CONFIG ccvms.lis |
1493 | $ READ CONFIG line |
1494 | $ IF (F$GETSYI("HW_MODEL") .LT. 1024) |
1495 | $ THEN |
1496 | $ read CONFIG line |
1497 | $ archsufx = "VAX" |
1498 | $ ELSE |
1499 | $ archsufx = "AXP" |
1500 | $ ENDIF |
1501 | $ CLOSE CONFIG |
1502 | $ line = F$EDIT(line,"TRIM,COMPRESS") |
1503 | $ line = line - "Page 1" ! occurs at end all compilers |
1504 | $ line = line - "CCVMS " ! filename appears w/ VAXC |
1505 | $ line = line - "Source Listing " ! Seen w/ AXP DECC |
1506 | $ tmp = F$EXTRACT(0,20,line) !timestamp, e.g. "30-JUL-1996 21:12:54 " |
1507 | $ line = line - tmp |
1508 | $ line = F$EDIT(line,"TRIM") !bit redundant but we're in no big hurry |
1509 | $ DELETE/NOLOG/NOCONFIRM ccvms.lis; |
1510 | $ RETURN |
1511 | $! |
1512 | $Include_dirs: |
1513 | $!: What should the include directory be ? |
1514 | $ dflt = gcclib_olb |
1515 | $ rp = "Where are the include files you want to use? " |
1516 | $ IF f$length( rp + "[''dflt'] " ).gt.76 |
1517 | $ THEN rp = F$FAO("!AS!/!AS",rp,"[''dflt'] ") |
1518 | $ ELSE rp = rp + "[''dflt'] " |
1519 | $ ENDIF |
1520 | $ GOSUB myread |
1521 | $ usrinc = ans |
1522 | $! |
1523 | $!: see if we have to deal with yellow pages, now NIS. |
1524 | $!: now get the host name |
1525 | $Host_name: |
1526 | $ echo "" |
1527 | $ echo4 "Figuring out host name..." !>&4 |
1528 | $ myhostname = "" |
1529 | $ IF myhostname.eqs."" THEN myhostname = F$TRNLNM("ARPANET_HOST_NAME") |
1530 | $ IF myhostname.eqs."" THEN myhostname = F$TRNLNM("INTERNET_HOST_NAME") |
1531 | $ IF myhostname.eqs."" THEN myhostname = F$TRNLNM("MULTINET_HOST_NAME") |
1532 | $ IF myhostname.eqs."" THEN myhostname = F$TRNLNM("UCX$INET_HOST_NAME") |
1533 | $ IF myhostname.eqs."".and. - |
1534 | F$TRNLNM("UCX$INET_HOST") .nes. "" .and. - |
1535 | F$TRNLNM("UCX$INET_DOMAIN") .nes. "" THEN - |
1536 | myhostname = F$TRNLNM("UCX$INET_HOST") + "." + F$TRNLNM("UCX$INET_DOMAIN") |
1537 | $ IF myhostname.eqs."" THEN myhostname = F$TRNLNM("TCPWARE_DOMAINNAME") |
1538 | $ IF myhostname.eqs."" THEN myhostname = F$TRNLNM("NEWS_ADDRESS") |
1539 | $ IF myhostname.eqs."" THEN myhostname = F$TRNLNM("SYS$NODE") - "::" |
1540 | $ IF myhostname.eqs."" THEN myhostname = F$EDIT(F$GETSYI("SCSNODE"),"TRIM") |
1541 | $!: you do not want to know about this |
1542 | $!: verify guess |
1543 | $ rp = "Your host name appears to be """"''myhostname'"""". Right? " |
1544 | $ GOSUB myread |
1545 | $ IF (.not.ans).and.(ans.NES."") |
1546 | $ THEN |
1547 | $ READ SYS$COMMAND/PROMPT= - |
1548 | "Please type the (one word) name of your host: " ans |
1549 | $ myhostname = ans |
1550 | $ ENDIF |
1551 | $!: translate upper to lower if necessary |
1552 | $ myhostname = F$EDIT(myhostname,"COLLAPSE") |
1553 | $ mylowhostname = F$EDIT(myhostname," LOWERCASE") |
1554 | $ IF mylowhostname.NES.myhostname |
1555 | $ THEN |
1556 | $ echo "(Normalizing case in your host name)" |
1557 | $ myhostname = mylowhostname |
1558 | $ ENDIF |
1559 | $! |
1560 | $ fp = F$LOCATE(".",myhostname) |
1561 | $ mydomain = F$EXTRACT(fp,(F$LENGTH(myhostname)-fp)+1,myhostname) |
1562 | $ IF mydomain.NES."" !no periods in DECnet names like "MYDECNODE::" |
1563 | $ THEN |
1564 | $ rp = "What is your domain name? [''mydomain'] " |
1565 | $ GOSUB myread |
cc391245 |
1566 | $ IF ans .nes. "" THEN mydomain = ans |
97abc6ad |
1567 | $!: translate upper to lower if necessary |
1568 | $ mydomain = F$EDIT(mydomain,"COLLAPSE") |
1569 | $ mylowdomain = F$EDIT(mydomain," LOWERCASE") |
1570 | $ IF mylowdomain.NES.mydomain |
1571 | $ THEN |
1572 | $ echo "(Normalizing case in your domain name)" |
1573 | $ mydomain = mylowdomain |
1574 | $ ENDIF |
1575 | $ ENDIF |
1576 | $ myhostname = myhostname - mydomain |
1577 | $ echo "(Trimming domain name from host name--host name is now ''myhostname')" |
1578 | $ IF .NOT.silent |
1579 | $ THEN TYPE SYS$INPUT: |
1580 | |
1581 | I need to get your e-mail address in Internet format if possible, i.e. |
1582 | something like user@host.domain. Please answer accurately since I have |
1583 | no easy means to double check it. The default value provided below |
1584 | is most probably close to the reality but may not be valid from outside |
1585 | your organization... |
1586 | $ ENDIF |
1587 | $ dflt = "''cf_by@''myhostname'"+"''mydomain'" |
1588 | $ rp = "What is your e-mail address? [''dflt'] " |
1589 | $ GOSUB myread |
cc391245 |
1590 | $ IF ans .nes. "" |
97abc6ad |
1591 | $ THEN cf_email = ans |
1592 | $ ELSE cf_email = dflt |
1593 | $ ENDIF |
1594 | $! |
1595 | $ IF .NOT.silent |
1596 | $ THEN TYPE SYS$INPUT: |
1597 | |
1598 | If you or somebody else will be maintaining perl at your site, please |
1599 | fill in the correct e-mail address here so that they may be contacted |
1600 | if necessary. Currently, the "perlbug" program included with perl |
1601 | will send mail to this address in addition to perlbug@perl.com. You may |
1602 | enter "none" for no administrator. |
1603 | $ ENDIF |
1604 | $ dflt = "''cf_email'" |
1605 | $ rp = "Perl administrator e-mail address [''dflt'] " |
1606 | $ GOSUB myread |
cc391245 |
1607 | $ IF ans .nes. "" |
97abc6ad |
1608 | $ THEN perladmin = ans |
1609 | $ ELSE perladmin = dflt |
1610 | $ ENDIF |
1611 | $! |
1612 | $!: determine where public executable scripts go |
1613 | $!: determine perl absolute location |
1614 | $!: figure out how to guarantee perl startup |
1615 | $! |
1616 | $!: see how we invoke the C preprocessor |
1617 | $! echo "" |
1618 | $! echo4 "Now, how can we feed standard input to your C preprocessor..." !>&4 |
1619 | $!: Set private lib path |
1620 | $!: Now check and see which directories actually exist, avoiding duplicates |
1621 | $!: determine optimize, if desired, or use for debug flag also |
1622 | $!: We will not override a previous value, but we might want to |
1623 | $!: augment a hint file |
1624 | $!: the following weeds options from ccflags that are of no interest to cpp |
1625 | $!: flags used in final linking phase |
1626 | $!: Try to guess additional flags to pick up local libraries. |
1627 | $!: coherency check |
1628 | $! echo "" |
1629 | $! echo4 "Checking your choice of C compiler and flags for coherency..." !>&4 |
1630 | $!: compute shared library extension |
1631 | $!: Looking for optional libraries |
1632 | $!: see if nm is to be used to determine whether a symbol is defined or not |
1633 | $!: get list of predefined functions in a handy place |
1634 | $!: see if we have sigaction |
1635 | $!: see whether socketshr exists |
1636 | $ IF (F$SEARCH(F$PARSE("SocketShr","Sys$Share:.Exe")).NES."") |
1637 | $ THEN |
1638 | $ has_socketshr = "T" |
1639 | $ echo "" |
1640 | $ echo4 "Hmm... Looks like you have SOCKETSHR's Berkeley networking support." |
1641 | $ endif |
1642 | $ if (Dec_C_Version .ge. 50200000) |
1643 | $ THEN |
1644 | $ Has_Dec_C_Sockets = "T" |
1645 | $ echo "" |
1646 | $ echo4 "Hmm... Looks like you've got Dec C's Berkeley networking support." |
1647 | $ ENDIF |
1648 | $ ! Hey, we've got both. Default to Dec C, then, since it's better |
1649 | $ if ("''Has_socketshr'".eq."T") .or.("''has_dec_c_sockets'".eq."T") |
1650 | $ THEN |
1651 | $ echo "" |
1652 | $ echo "You've got sockets available. Which socket stack do you want to" |
1653 | $ echo "build into perl?" |
1654 | $ if "''has_dec_c_sockets'".eqs."T" |
1655 | $ THEN |
1656 | $ dflt = "DECC" |
1657 | $ else |
e6df7ed1 |
1658 | $ dflt = "SOCKETSHR" |
97abc6ad |
1659 | $ endif |
1660 | $ rp = "Choose socket stack (NONE" |
1661 | $ if "''has_socketshr'".eqs."T" THEN rp = rp + ",SOCKETSHR" |
1662 | $ if "''has_dec_c_sockets'".eqs."T" THEN rp = rp + ",DECC" |
1663 | $ rp = rp + ") [''dflt'] " |
1664 | $ GOSUB myread |
1665 | $ IF "''ans'".eqs."" THEN ans = "''dflt'" |
1666 | $ has_dec_c_sockets = "F" |
1667 | $ has_socketshr = "F" |
1668 | $ ans = F$EDIT(ans,"TRIM,COMPRESS,LOWERCASE") |
1669 | $ IF ans.eqs."decc" then has_dec_c_sockets = "T" |
1670 | $ IF ans.eqs."socketshr" then has_socketshr = "T" |
1671 | $ endif |
1672 | $! |
1673 | $! |
3eeba6fb |
1674 | $! Ask if they want to build with VMS_DEBUG perl |
1675 | $ echo "Perl can be built to run under the VMS debugger." |
1676 | $ echo "You should only select this option if you are debugging" |
1677 | $ echo "perl itself. This can be a useful feature if you are " |
1678 | $ echo "embedding perl in a program." |
1679 | $ echo "" |
1680 | $ dflt = "N" |
1681 | $ rp = "Build a VMS-DEBUG version of Perl? [''dflt'] " |
1682 | $ GOSUB myread |
1683 | $ if ans.eqs."" then ans = dflt |
1684 | $ if (f$extract(0, 1, "''ans'").eqs."Y").or.(f$extract(0, 1, "''ans'").eqs."y") |
1685 | $ THEN |
1686 | $ use_vmsdebug_perl = "Y" |
1687 | $ macros = macros + """__DEBUG__=1""," |
1688 | $ ELSE |
1689 | $ use_vmsdebug_perl = "N" |
1690 | $ ENDIF |
1691 | $! |
3937c24e |
1692 | $! Ask if they want to build with MULTIPLICITY |
1693 | $ echo "The perl interpreter engine can be built in a way that makes it |
1694 | $ echo "possible for a program that embeds perl into it (and yep, you can |
1695 | $ echo "do that--it's pretty keen) to have multiple perl interpreters active |
1696 | $ echo "at once. There is some performance overhead, however, so you |
1697 | $ echo "probably don't want to choose this unless you're going to be doing |
1698 | $ echo "funky perl embedding." |
1699 | $ echo "" |
1700 | $ dflt = "n" |
1701 | $ rp = "Build with MULTIPLICITY? [''dflt'] " |
1702 | $ GOSUB myread |
1703 | $ if ans.eqs."" then ans = dflt |
1704 | $ if (f$extract(0, 1, "''ans'").eqs."Y").or.(f$extract(0, 1, "''ans'").eqs."y") |
1705 | $ THEN |
1706 | $ use_multiplicity="Y" |
1707 | $ ELSE |
1708 | $ use_multiplicity="N" |
1709 | $ ENDIF |
97abc6ad |
1710 | $! Ask about threads, if appropriate |
1711 | $ if (Using_Dec_C.eqs."Yes") |
1712 | $ THEN |
1713 | $ echo "This version of Perl can be built with threads. While really nifty, |
1714 | $ echo "they are a beta feature, and there is a speed penalty for perl |
1715 | $ echo "programs if you build with threads *even if you don't use them* |
1716 | $ echo "" |
429a5e67 |
1717 | $ dflt = "n" |
97abc6ad |
1718 | $ rp = "Build with threads? [''dflt'] " |
1719 | $ GOSUB myread |
1720 | $ if ans.eqs."" then ans = dflt |
1721 | $ if (f$extract(0, 1, "''ans'").eqs."Y").or.(f$extract(0, 1, "''ans'").eqs."y") |
1722 | $ THEN |
1723 | $ use_threads="T" |
429a5e67 |
1724 | $ ! Are they on VMS 7.1 on an alpha? |
1725 | $ if (Archname.eqs."VMS_AXP").and.("''f$extract(1,3, f$getsyi(""version""))'".ges."7.1") |
1726 | $ THEN |
1727 | $ echo "" |
1728 | $ echo "Threaded perl can be linked to use multiple kernel threads |
1729 | $ echo "and system upcalls on VMS 7.1+ on Alpha systems. This feature |
1730 | $ echo "allows multiple threads to execute simultaneously on an SMP |
1731 | $ echo "system as well as preventing a single thread from blocking |
1732 | $ echo "all the threads in a program, even on a single-processor |
1733 | $ echo "machine. Unfortunately this feature isn't safe on an |
1734 | $ echo "unpatched 7.1 system. (Several OS patches were required when |
1735 | $ echo "this procedure was written) |
1736 | $ echo "" |
e6df7ed1 |
1737 | $ dflt = "n" |
429a5e67 |
1738 | $ rp = "Enable multiple kernel threads and upcalls? [''dflt'] " |
1739 | $ gosub myread |
1740 | $ if ans.eqs."" then ans="''dflt'" |
1741 | $ if f$extract(0, 1, f$edit(ans,"TRIM,COMPRESS,UPCASE")).eqs."Y" |
1742 | $ THEN |
1743 | $ Thread_Live_Dangerously = "MT=MT=1" |
1744 | $ ENDIF |
1745 | $ ENDIF |
97abc6ad |
1746 | $ ENDIF |
1747 | $ ENDIF |
1748 | $! |
cc391245 |
1749 | $! Ask whether they want to use secure logical translation when tainting |
1750 | $ echo "" |
1751 | $ echo "As Perl starts up, it checks several logical names, such as" |
1752 | $ echo "PERL5LIB and PERL_ENV_TABLES, which allow you to modify aspects" |
1753 | $ echo "of its behavior. For additional security, you may limit this" |
1754 | $ echo "process to executive- and kernel-mode translation when tainting" |
1755 | $ echo "is enabled. In this case, logical names normally skipped when" |
1756 | $ echo "tainting is enabled (e.g. PERL5OPTS) are translated as well." |
1757 | $ echo "If you do not choose to do this, the usual order of access modes" |
1758 | $ echo "is used for logical name translation." |
1759 | $ echo "" |
1760 | $ echo "This restriction does not apply to the %ENV hash or to implicit" |
1761 | $ echo "logical name translation during parsing of file specifications;" |
1762 | $ echo "these always use the normal sequence of access modes for logical" |
1763 | $ echo "name translation." |
1764 | $ echo "" |
1765 | $ dflt = "n" |
1766 | $ rp = "Use secure logical name translation? [''dflt'] " |
1767 | $ GOSUB myread |
1768 | $ if ans.eqs."" then ans="''dflt'" |
1769 | $ d_secintgenv = f$extract(0, 1, f$edit(ans,"TRIM,COMPRESS,UPCASE")) |
1770 | $! |
1771 | $! Ask whether they want to default filetypes |
1772 | $ echo "" |
1773 | $ echo "When you pass the name of a program to Perl on the command line," |
1774 | $ echo "it generally doesn't supply any defaults unless the -S command" |
1775 | $ echo "line switch is specified. In keeping with the VMS tradition of" |
1776 | $ echo "default file types, however, you can configure Perl to try default" |
1777 | $ echo "file types of nothing, .pl, and .com, in that order (e.g. typing" |
1778 | $ echo """$ perl foo"" would cause Perl to look for foo., then foo.pl, and" |
1779 | $ echo "finally foo.com)." |
1780 | $ echo "" |
1781 | $ dflt = "n" |
1782 | $ rp = "Always use default file types? [''dflt'] " |
1783 | $ GOSUB myread |
1784 | $ if ans.eqs."" then ans="''dflt'" |
1785 | $ d_alwdeftype = f$extract(0, 1, f$edit(ans,"TRIM,COMPRESS,UPCASE")) |
1786 | $! |
97abc6ad |
1787 | $! Ask if they want to use perl's memory allocator |
1788 | $ echo "" |
1789 | $ echo "Perl has a built-in memory allocator that's tuned for perl's |
1790 | $ echo "normal memory usage. It's oftentimes better than the standard |
1791 | $ echo "system memory allocator. It also has the advantage of providing |
429a5e67 |
1792 | $ echo "memory allocation statistics, if you choose to enable them. |
97abc6ad |
1793 | $ echo "" |
e6df7ed1 |
1794 | $ dflt = "n" |
97abc6ad |
1795 | $ rp = "Build with perl's memory allocator? [''dflt'] " |
1796 | $ GOSUB myread |
1797 | $ if ans.eqs."" then ans="''dflt'" |
1798 | $ mymalloc = f$extract(0, 1, f$edit(ans,"TRIM,COMPRESS,UPCASE")) |
429a5e67 |
1799 | $ if mymalloc.eqs."Y" |
1800 | $ THEN |
1801 | $ if use_debugging_perl.eqs."Y" |
1802 | $ THEN |
1803 | $ echo "" |
1804 | $ echo "Perl can keep statistics on memory usage if you choose to use |
1805 | $ echo "them. This is useful for debugging, but does have some |
1806 | $ echo "performance overhead. |
1807 | $ echo "" |
e6df7ed1 |
1808 | $ dflt = "n" |
429a5e67 |
1809 | $ rp = "Do you want the debugging memory allocator? [''dflt'] " |
1810 | $ gosub myread |
1811 | $ if ans.eqs."" then ans="''dflt'" |
1812 | $ use_debugmalloc = f$extract(0, 1, f$edit(ans, "TRIM,COMPRESS,UPCASE")) |
1813 | $ ENDIF |
1814 | $ ! Check which memory allocator we want |
1815 | $ echo "" |
1816 | $ echo "There are currently three different memory allocators: the |
1817 | $ echo "default (which is a pretty good general-purpose memory manager), |
1818 | $ echo "the TWO_POT allocator (which is optimized to save memory for |
1819 | $ echo "larger allocations), and PACK_MALLOC (which is optimized to save |
1820 | $ echo "memory for smaller allocations). They're all good, but if your |
1821 | $ echo "usage tends towards larger chunks use TWO_POT, otherwise use |
1822 | $ echo "PACK_MALLOC." |
1823 | $ echo "" |
1824 | $ dflt = "DEFAULT" |
1825 | $ rp = "Memory allocator (DEFAULT, TWO_POT, PACK_MALLOC) [''dflt'] " |
1826 | $ GOSUB myread |
1827 | $ if ans.eqs."" then ans = "''dflt'" |
1828 | $ if ans.eqs."TWO_POT" then use_two_pot_malloc = "Y" |
1829 | $ if ans.eqs."PACK_MALLOC" then use_pack_malloc = "Y" |
1830 | $ ENDIF |
97abc6ad |
1831 | $! |
1832 | $! Ask for their default list of extensions to build |
1833 | $ echo "" |
1834 | $ echo "It's time to specify which modules you want to build into |
1835 | $ echo "perl. Most of these are standard and should be chosen, though |
1836 | $ echo "you might, for example, want to build GDBM_File instead of |
1837 | $ echo "SDBM_File if you have the GDBM library built on your machine |
1838 | $ echo " |
1839 | $ echo "Which modules do you want to build into perl?" |
38b3a85b |
1840 | $ dflt = "Fcntl Errno IO Opcode Byteloader Devel::Peek Devel::DProf Data::Dumper attrs re VMS::Stdio VMS::DCLsym B SDBM_File" |
97abc6ad |
1841 | $ if Using_Dec_C.eqs."Yes" |
1842 | $ THEN |
1843 | $ dflt = dflt + " POSIX" |
1844 | $ if Use_Threads.eqs."T" |
1845 | $ THEN |
1846 | $ dflt = dflt + " Thread" |
1847 | $ ENDIF |
1848 | $ ENDIF |
1849 | $ rp = "[''dflt'] " |
1850 | $ GOSUB myread |
1851 | $ if ans.eqs."" then ans = "''dflt'" |
1852 | $ extensions = "''ans'" |
1853 | $! |
1854 | $! %Config-I-VMS, determine build/make utility here (make gmake mmk mms) |
1855 | $ echo "" |
1856 | $ echo "%Config-I-VMS, Checking your ""make"" utilities..." |
1857 | $! If the 'build' that you use is not here add it and it's test |
1858 | $! switch to the _END_ of these strings (and increment max_build) |
1859 | $! (e.g. builders = builders + "/FOOMAKE" |
1860 | $! probers = probers + " -fooVersionSwitch" |
1861 | $! ) & please let me know about it. |
1862 | $ builders = "IMAKE/GNUMAKE/MGMAKE/GMAKE/MAKE/MMS/MMK" |
1863 | $ probers = "-f Makefile. -v!-f Makefile. -v!-f Makefile. -v!-f Makefile. -v!-f Makefile. -v!/IDENT!/IDENT" |
1864 | $ max_build = 7 |
1865 | $! |
1866 | $ orig_dflt = "MMK" |
1867 | $ default_set = "" |
1868 | $ ok_builders = "" |
1869 | $ OPEN/WRITE/ERROR=Open_error CONFIG Makefile. |
1870 | $ WRITE CONFIG "dont_make_anything_yet:" |
1871 | $ WRITE CONFIG F$FAO("!_") |
1872 | $ CLOSE CONFIG |
1873 | $ n = 0 |
1874 | $ messages = F$ENVIRONMENT("MESSAGE") |
1875 | $Build_probe: |
1876 | $ build = F$ELEMENT(n,"/",builders) |
1877 | $ probe = F$ELEMENT(n,"!",probers) |
1878 | $ echo "Testing whether you have ''build' on your system..." |
1879 | $ SET NOON !sorry :-( |
1880 | $ ON CONTROL_Y THEN GOTO Reenable_messages_build !sorry :-( |
1881 | $ SET MESSAGE/NOFAC/NOSEV/NOIDENT/NOTEXT !sorry :-( |
1882 | $ 'build' 'probe' |
1883 | $ IF ($SEVERITY .EQ. 1) |
1884 | $ THEN |
1885 | $ echo "OK." |
1886 | $ IF (build .EQS. orig_dflt) |
1887 | $ THEN |
1888 | $ default_set = "TRUE" |
1889 | $ dflt = build |
1890 | $ ENDIF |
1891 | $ ok_builders = ok_builders + " " + build |
1892 | $ IF (.NOT. default_set) THEN dflt = build |
1893 | $ ELSE |
1894 | $ echo "Nope." |
1895 | $ ENDIF |
1896 | $Reenable_messages_build: !hope you made it here :-) |
1897 | $ SET MESSAGE 'messages' !hope you made it here :-) |
1898 | $ SET ON !hope you made it here :-) |
1899 | $ n = n + 1 |
1900 | $ IF (n .LT. max_build) THEN GOTO Build_probe |
1901 | $! |
1902 | $ echo "" |
1903 | $ IF (ok_builders .NES. "") |
1904 | $ THEN |
1905 | $ echo "Here is the list of builders you can apparently use:" |
1906 | $ echo "(",ok_builders," )" |
1907 | $ rp = "Which """"make"""" utility do you wish to use [''dflt']? " |
1908 | $ GOSUB myread |
1909 | $ ans = F$EDIT(ans,"TRIM, COMPRESS") |
1910 | $ ans = F$EXTRACT(0,F$LOCATE(" ",ans),ans) !throw out "-f Makefile." here |
1911 | $ IF (ans .EQS. "") |
1912 | $ THEN build = dflt |
1913 | $ ELSE build = ans |
1914 | $ ENDIF |
1915 | $ ELSE |
1916 | $ TYPE SYS$INPUT: |
1917 | |
1918 | %Config-E-VMS, ERROR: |
1919 | Well this looks pretty serious. Perl5 cannot be compiled without a "make" |
1920 | utility of some sort and after checking my "builders" list I cannot find |
1921 | the symbol or command you use on your system to compile programs. |
1922 | |
1923 | $ READ SYS$COMMAND/PROMPT="%Config-I-VMS, Which ""MMS"" do you use? " ans |
1924 | $ ans = F$EDIT(ans,"TRIM, COMPRESS") |
1925 | $ ans = F$EXTRACT(0,F$LOCATE(" ",ans),ans) !throw out "-f Makefile." here |
1926 | $ IF (ans .EQS. "") |
1927 | $ THEN build = dflt |
1928 | $ echo "I don't know where 'make' is, and my life depends on it." |
1929 | $ echo "Go find a make program or fix your DCL$PATH setting!" |
1930 | $ echo "ABORTING..." |
1931 | $ SET DEFAULT 'vms_default_directory_name' !be kind rewind |
1932 | $ STOP |
1933 | $ EXIT 2 !$STATUS = "%X00000002" (error) |
1934 | $ ELSE |
1935 | $ build = ans |
1936 | $ ENDIF |
1937 | $ ENDIF |
1938 | $! |
1939 | $ DELETE/NOLOG Makefile.; |
1940 | $ GOTO Beyond_open |
1941 | $Open_error: |
1942 | $ TYPE SYS$INPUT: |
1943 | |
1944 | There seems to be trouble. I just tried to create a file in |
1945 | $ echo4 'F$ENVIRONMENT("DEFAULT")' |
1946 | $ TYPE SYS$INPUT: |
1947 | but was unsuccessful. I am stopping now. Please check that directories' |
1948 | PROTECTION bits. I will leave you in the directory where you started |
1949 | Configure.com |
1950 | $ echo4 "ABORTING..." |
1951 | $ GOTO Clean_up |
1952 | $ STOP |
1953 | $ EXIT |
1954 | $! |
1955 | $Beyond_open: |
1956 | $! echo " Very well I will proceed with ""''build'""" |
1957 | $ make = F$EDIT(build,"UPCASE") |
1958 | $! |
1959 | $!: locate the preferred pager for this system |
1960 | $!pagers = "most|more|less|type/page" |
1961 | $!rp='What pager is used on your system?' |
1962 | $! |
1963 | $! update [.vms]config.vms here |
1964 | $! |
1965 | $! update makefile here |
1966 | $! echo4 "Updating makefile..." |
1967 | $! |
1968 | $ IF (make .EQS. "MMS").OR.(make .EQS. "MMK") |
1969 | $ THEN |
1970 | $ makefile = "" !wrt MANIFEST dir |
1971 | $ UUmakefile = "DESCRIP.MMS" !wrt CWD dir |
1972 | $ DEFmakefile = "DESCRIP.MMS" !wrt DEF dir (?) |
1973 | $ ELSE |
1974 | $ makefile = " -f [.VMS]Makefile." !wrt MANIFEST dir |
1975 | $ UUmakefile = "[-.VMS]Makefile." !wrt CWD dir |
1976 | $ DEFmakefile = "[-.VMS]Makefile." !wrt DEF dir (?) |
1977 | $ ENDIF |
1978 | $! |
1979 | $ IF macros.NES."" |
1980 | $ THEN |
1981 | $ tmp = F$LENGTH(macros) |
1982 | $ macros = F$EXTRACT(0,(tmp-1),macros) !miss trailing comma |
1983 | $ macros = "/macro=(" + macros + ")" |
1984 | $ ENDIF |
1985 | $! |
1986 | $! Invoke the subconfig piece |
1987 | $! |
1988 | $ echo "" |
cc391245 |
1989 | $ echo4 "Checking the C run-time library" |
97abc6ad |
1990 | $ dflt = F$ENVIRONMENT("DEFAULT") |
1991 | $ SET DEFAULT [-.vms] |
1992 | $ @subconfigure |
1993 | $ SET DEFAULT 'dflt |
1994 | $! |
a4521476 |
1995 | $! Warn of dangerous logical names |
1996 | $! |
1997 | $Bad_logical: SUBROUTINE |
1998 | $ IF f$trnlnm(p1) .nes. "" |
1999 | $ THEN |
2000 | $ IF f$search("config.msg") .nes. "" |
2001 | $ THEN |
2002 | $ OPEN/APPEND CONFIG config.msg |
2003 | $ ELSE |
2004 | $ OPEN/WRITE CONFIG config.msg |
2005 | $ ENDIF |
2006 | $ WRITE CONFIG "Logical name ''p1' found in environment as " + f$trnlnm(p1) |
2007 | $ WRITE CONFIG " deassign before building ''package'" |
2008 | $ CLOSE CONFIG |
2009 | $ ENDIF |
2010 | $ EXIT |
2011 | $ ENDSUBROUTINE ! Bad_logical |
2012 | $ echo "" |
2013 | $ echo4 "%Config-I-VMS, Checking for dangerous pre extant logical names." |
2014 | $ CALL Bad_logical "TMP" |
2015 | $ CALL Bad_logical "LIB" |
2016 | $ CALL Bad_logical "T" |
2017 | $ CALL Bad_logical "FOO" |
2018 | $ CALL Bad_logical "EXT" |
2019 | $ IF f$search("config.msg") .eqs. "" THEN echo "OK." |
2020 | $! |
97abc6ad |
2021 | $! %Config-I-VMS, write perl_setup.com here |
2022 | $! |
2023 | $ echo "" |
2024 | $ echo4 "%Config-I-VMS, The perl_setup.com file is now being written..." |
2025 | $ file_2_find = "[-.vms]perl_setup.com" |
2026 | $ OPEN/WRITE CONFIG 'file_2_find' |
2027 | $ WRITE CONFIG "$!" |
2028 | $ WRITE CONFIG "$! Perl_Setup.com ''cf_time'" |
2029 | $ IF cf_email.NES.perladmin |
2030 | $ THEN |
2031 | $ WRITE CONFIG "$! perl configured by ''cf_email'" |
2032 | $ ELSE |
2033 | $ WRITE CONFIG "$! This perl configured & administered by ''perladmin'" |
2034 | $ ENDIF |
2035 | $ WRITE CONFIG "$!" |
3eeba6fb |
2036 | $ prefix = prefix - "000000." |
97abc6ad |
2037 | $ IF F$LOCATE(".]",prefix) .EQ. F$LENGTH(prefix) THEN - |
2038 | prefix = prefix - "]" + ".]" |
2039 | $ WRITE CONFIG "$ define/translation=concealed Perl_Root ''prefix'" |
3eeba6fb |
2040 | $ write config "$ ext = "".exe""" |
2041 | $ if sharedperl .eqs. "Y" |
2042 | $ then |
2043 | $ write config "$ if f$getsyi(""ARCH_NAME"") .nes. ""VAX"" then ext = "".AXE""" |
2044 | $ endif |
2045 | $ IF use_vmsdebug_perl .eqs. "Y" |
2046 | $ then |
2047 | $ WRITE CONFIG "$ dbgperl :== $Perl_Root:[000000]dbgPerl'ext'" |
2048 | $ WRITE CONFIG "$ perl :== $Perl_Root:[000000]ndbgPerl'ext'" |
2049 | $ WRITE CONFIG "$ define dbgPerlShr Perl_Root:[000000]dbgPerlShr'ext'" |
2050 | $ else |
2051 | $ WRITE CONFIG "$ perl :== $Perl_Root:[000000]Perl'ext'" |
2052 | $ WRITE CONFIG "$ define PerlShr Perl_Root:[000000]PerlShr'ext'" |
2053 | $ endif |
2054 | $! |
97abc6ad |
2055 | $ IF (tzneedset) |
2056 | $ THEN |
2057 | $ WRITE CONFIG "$ define SYS$TIMEZONE_DIFFERENTIAL ''tzd'" |
2058 | $ ELSE !leave in but commented out (in case setting was from perl :-) |
2059 | $ WRITE CONFIG "$! define SYS$TIMEZONE_DIFFERENTIAL ''tzd'" |
2060 | $ ENDIF |
2061 | $ WRITE CONFIG "$!" |
2062 | $ WRITE CONFIG "$! Symbols for commonly used scripts:" |
2063 | $ WRITE CONFIG "$!" |
2064 | $ WRITE CONFIG "$ Perldoc == ""'"+"'Perl' Perl_Root:[lib.pod]Perldoc.com -t""" |
2065 | $ CLOSE CONFIG |
2066 | $! |
2067 | $ echo "" |
2068 | $ echo "%Config-I-VMS, The file can be found at:" |
2069 | $ echo4 "-Config-I-VMS, ''F$SEARCH(file_2_find)'" |
2070 | $ echo "-Config-I-VMS, Add that file (or an @ call to it) to your [SY]LOGIN.COM" |
2071 | $ echo "-Config-I-VMS, when you are satisfied with a successful compilation," |
2072 | $ echo "-Config-I-VMS, testing, and installation of your perl." |
2073 | $ echo "" |
2074 | $! |
2075 | $!figure out where we "are" by parsing 'vms_default_directory_name' |
2076 | $! |
2077 | $ set_def_command = "" |
2078 | $ dflt = F$ENVIRONMENT("DEFAULT") - ".UU]" |
2079 | $ tmp = vms_default_directory_name - dflt - "]" |
2080 | $ i = 0 |
2081 | $ IF tmp .EQS. "" THEN GOTO Beyond_set_def_loop |
2082 | $Set_def_loop: |
2083 | $ tmp1 = F$ELEMENT(i,".",tmp) |
2084 | $ IF tmp1 .EQS. "." THEN GOTO Beyond_set_def_loop |
2085 | $ IF i .EQ. 0 |
2086 | $ THEN set_def_command = "set default [-" |
2087 | $ ELSE set_def_command = set_def_command + "-" |
2088 | $ ENDIF |
2089 | $ i = i + 1 |
2090 | $ GOTO Set_def_loop |
2091 | $Beyond_set_def_loop: |
2092 | $ IF set_def_command.NES."" |
2093 | $ THEN |
2094 | $ set_def_command = set_def_command - "-" + "]" |
2095 | $ echo4 "" |
2096 | $ echo4 "In order to build ''package' you must now issue the commands:" |
2097 | $ echo4 "" |
2098 | $ echo4 " ''set_def_command'" |
2099 | $ ELSE |
2100 | $ echo4 "" |
2101 | $ echo4 "In order to build ''package' you must now issue the command:" |
2102 | $ echo4 "" |
2103 | $ ENDIF |
2104 | $ echo4 " ''make'''makefile'", macros |
2105 | $ echo4 "" |
2106 | $! |
a4521476 |
2107 | $ IF ( F$SEARCH("config.msg").NES."" ) |
2108 | $ THEN |
2109 | $ echo "Hmm. I also noted the following information while running:" |
2110 | $ echo "" |
2111 | $ type config.msg |
2112 | $ SET PROTECTION=(SYSTEM:RWED,OWNER:RWED) config.msg |
2113 | $ DELETE/NOLOG/NOCONFIRM config.msg; |
2114 | $ ENDIF |
2115 | $! |
97abc6ad |
2116 | $Clean_up: |
2117 | $ IF (silent) |
2118 | $ THEN |
2119 | $ DEASSIGN SYS$OUTPUT |
2120 | $! DEASSIGN SYS$ERROR |
2121 | $ ENDIF |
2122 | $ IF F$GETJPI("","FILCNT").NE.vms_filcnt THEN CLOSE CONFIG |
2123 | $ IF F$GETJPI("","FILCNT").NE.vms_filcnt |
2124 | $ THEN WRITE SYS$ERROR "%Config-W-VMS, WARNING: There is a file still open" |
2125 | $ ENDIF |
2126 | $ dflt = F$ENVIRONMENT("DEFAULT") |
2127 | $ IF F$LOCATE("UU]",dflt).EQS.(F$LENGTH(dflt)-3) |
2128 | $ THEN |
2129 | $ IF ( F$SEARCH("[]*.*").NES."" ) THEN DELETE/NOLOG/NOCONFIRM []*.*;* |
2130 | $ SET DEFAULT [-] |
2131 | $ SET PROTECTION=(SYSTEM:RWED,OWNER:RWED) UU.DIR |
2132 | $ DELETE/NOLOG/NOCONFIRM UU.DIR; |
2133 | $ ENDIF |
2134 | $ SET DEFAULT 'vms_default_directory_name' !be kind rewind |
2135 | $ STOP |
2136 | $ EXIT |
2137 | $!: End of Configure |