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