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