1 $ sav_ver = 'F$VERIFY(0)'
4 $! For example, if you unpacked perl into: [USER.PERL5_00n...] then you will
5 $! want to cd into the tree and execute Configure:
7 $! $ SET DEFAULT [USER.PERL5_00n]
12 $! $ SET DEFAULT [USER.PERL5_00n]
13 $! $ @Configure "-des"
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
19 $! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
21 $! send suggestions to:
22 $! Dan Sugalski <sugalskd@ous.edu>
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
34 $ sav_ver = F$VERIFY(sav_ver)
36 $! VMS-isms we will need:
37 $ echo = "write sys$output "
42 $ use_vmsdebug_perl = "N"
43 $ use_debugging_perl = "Y"
44 $ C_Compiler_Replace = "CC="
45 $ Thread_Live_Dangerously = "MT="
46 $ use_two_pot_malloc = "N"
47 $ use_pack_malloc = "N"
48 $ use_debugmalloc = "N"
50 $ use_multiplicity = "N"
51 $ vms_default_directory_name = F$ENVIRONMENT("DEFAULT")
52 $ max_allowed_dir_depth = 3 ! e.g. [A.B.PERL5_00n] not [A.B.C.PERL5_00n]
53 $! max_allowed_dir_depth = 2 ! e.g. [FOO.PERL5_00n] not [FOO.BAR.PERL5_00n]
55 $ vms_filcnt = F$GETJPI ("","FILCNT")
57 $!: compute my invocation name
58 $ me = F$ENVIRONMENT("PROCEDURE")
60 $! Many null statements (begin with colon ':') in the Bourne shell version of
61 $! this script serve as comments/placeholders. I have retained some of the ones
62 $! that will help you compare this .COM file to the sh version - as well as
63 $! leave placeholders for future improvements to this .COM file.
64 $! sfn = VMS "skipped for now"
66 $!: Proper PATH separator !sfn
67 $!: Proper PATH setting !sfn
68 $!: Sanity checks !sfn "Say '@''$me''"
69 $!: On HP-UX, large Configure scripts may exercise a bug in /bin/sh !sfn
70 $!: Configure runs within the UU subdirectory !->after find MANIFEST
71 $! <big long list of default values (mostly null)>
72 $!: We must find out about Eunice early !(?)
73 $!: list of known cpp symbols, sorted alphabetically !sfn
75 $!: default library list !sfn
76 $! <no hints files in use (yet?)>
77 $!: Extra object files, if any, needed on this platform. !sfn
78 $!: Possible local include directories to search. !sfn
79 $!: Set locincpth to "" in a hint file to defeat local include searches. !sfn
80 $!locincpth="/usr/local/include /opt/local/include /usr/gnu/include" !sfn
81 $!locincpth="$locincpth /opt/gnu/include /usr/GNU/include /opt/GNU/include"
82 $!: no include file wanted by default !sfn
84 $!: Possible local library directories to search. !sfn
85 $!loclibpth="/usr/local/lib /opt/local/lib /usr/gnu/lib" !sfn
86 $!loclibpth="$loclibpth /opt/gnu/lib /usr/GNU/lib /opt/GNU/lib" !sfn
87 $!: general looking path for locating libraries !sfn
88 $!glibpth="/lib/pa1.1 /usr/shlib /usr/lib/large /lib /usr/lib" !sfn
89 $!glibpth="$glibpth $xlibpth /lib/large /usr/lib/small /lib/small" !sfn
90 $!glibpth="$glibpth /usr/ccs/lib /usr/ucblib /usr/shlib" !sfn
91 $!: Private path used by Configure to find libraries. Its value !sfn
92 $!: is prepended to libpth. This variable takes care of special !sfn
93 $!: machines, like the mips. Usually, it should be empty. !sfn
95 $!: full support for void wanted by default !sfn
97 $!: List of libraries we want. !sfn
98 $!libswanted='net socket inet nsl nm ndbm gdbm dbm db malloc dl' !sfn
99 $!libswanted="$libswanted dld ld sun m c cposix posix ndir dir crypt" !sfn
100 $!libswanted="$libswanted ucb bsd BSD PW x" !sfn
101 $!: We probably want to search /usr/shlib before most other libraries. !sfn
102 $!: This is only used by the lib/ExtUtils/MakeMaker.pm routine extliblist. !sfn
103 $!glibpth=`echo " $glibpth " | sed -e 's! /usr/shlib ! !'` !sfn
104 $!glibpth="/usr/shlib $glibpth" !sfn
105 $!: Do not use vfork unless overridden by a hint file. !sfn
106 $!usevfork=false !sfn
107 $!: script used to extract .SH files with variable substitutions !sfn
108 $!: produce awk script to parse command line options !sfn
109 $!sfn (assume no sed awk) see below
110 $!: process the command line options
112 $!: set up default values
130 $ THEN !one or more switches was thrown
134 $ IF (P'i'.NES."") THEN bang = bang + 1
136 $ IF (i.LT.9) THEN GOTO Param_loop !DCL allows P1..P8
140 $ IF (F$EXTRACT(0,1,P'i') .EQS. "-") THEN P'i' = P'i' - "-"
141 $ IF (F$EXTRACT(0,1,P'i') .EQS. "/") THEN P'i' = P'i' - "/"
142 $Remove_quotation_mark:
144 $ IF F$LOCATE("""",P'i') .LT. F$LENGTH(P'i') THEN GOTO Remove_quotation_mark
145 $ gotopt = "f" !"alse"
146 $ gotshortopt = "f" !"alse"
147 $ IF (F$EXTRACT(0,1,P'i') .EQS. "d")
150 $ gotopt = "t" !"rue"
152 $ gotshortopt = "t" !"rue"
154 $ IF (F$EXTRACT(0,1,P'i') .EQS. "e")
161 $ IF (F$EXTRACT(0,1,P'i') .EQS. "f") !"-f")
165 $ IF (F$SEARCH(config_sh).NES."")
167 $ test = F$FILE_ATTRIBUTES(config_sh,"PRO")
168 $ IF (F$LOCATE("R",test).NE.F$LENGTH(test))
170 $ CONTINUE !at this point check UIC && if test allows...
173 $ echo "''me': cannot read config file ''config_sh'."
177 $ echo "''me': cannot read config file ''config_sh'."
182 $ IF (F$EXTRACT(0,1,P'i') .EQS. "h")
189 $ IF (F$EXTRACT(0,1,P'i') .EQS. "r")
196 $ IF (F$EXTRACT(0,1,P'i') .EQS. "s")
203 $ IF (F$EXTRACT(0,1,P'i') .EQS. "E") !"-E")
208 $ IF (F$EXTRACT(0,1,P'i') .EQS. "K") !"-K")
215 $ IF (F$EXTRACT(0,1,P'i') .EQS. "O")
222 $ IF (F$EXTRACT(0,1,P'i') .EQS. "S") !"-S")
224 $ extractsh = "true" !VMS?
229 $ IF (F$EXTRACT(0,1,P'i') .EQS. "D") !"-D")
232 $!Hmm.. this part needs work
234 $ IF (F$LOCATE("=",P'i') .EQ. F$LENGTH(P'i'))
238 $ IF (F$LOCATE("=",P'i') .EQ. (F$LENGTH(P'i') - 1))
240 $ me = F$PARSE(me,,,"NAME") + F$PARSE(me,,,"TYPE")
241 $ echo "''me': use '-Usymbol=val' not '-Dsymbol='."
242 $ echo "''me': ignoring -D",P'i'
244 $!Hmm.. this part needs work
245 $! 'F$EXTRACT(0,F$LOCATE("=",P'i'),P'i')' = -
246 $! 'F$EXTRACT(F$LOCATE("=",P'i'),P'i'),F$LENGTH(P'i'),P'i')'
249 $ ECHO "P''i' =>",P'i',"<=" !Diag
252 $ IF (F$EXTRACT(0,1,P'i') .EQS. "U") !"-U")
255 $ IF (F$LOCATE("=",P'i') .EQ. F$LENGTH(P'i'))
259 $ IF (F$LOCATE("=",P'i') .LT. (F$LENGTH(P'i') - 1))
261 $ me = F$PARSE(me,,,"NAME") + F$PARSE(me,,,"TYPE")
262 $ echo "''me': use '-Dsymbol=val' not '-Usymbol=val'."
263 $ echo "''me': ignoring -U",P'i'
268 $ ECHO "P''i' =>",P'i',"<=" !Diag
271 $ IF (F$EXTRACT(0,1,P'i') .EQS. "V")
273 $ me = F$PARSE(me,,,"NAME") + F$PARSE(me,,,"TYPE")
274 $ echo "''me' generated by an unknown version of EDT."
280 $ echo "''me': unknown option ",P'i'
283 $ IF (F$LENGTH(P'i').GT.0).AND.(gotshortopt) THEN i = i - 1 !clustered switch
285 $ IF (i .LT. (bang + 1)) THEN GOTO Opt_loop
287 $ ENDIF ! (P1 .NES. "")
291 $ me = F$PARSE(me,,,"DIRECTORY")+ F$PARSE(me,,,"NAME")
292 $ echo "Usage: @''me' [-dehrEKOSV] [-fconfig.sh] [-Dsymbol] [-Dsymbol=value]"
293 $ echo " [-Usymbol] [-Usymbol=]"
295 "-d" : use defaults for all answers.
296 "-e" : go on without questioning past the production of config.sh. *
297 "-f" : specify an alternate default configuration file.
298 "-h" : print this help message and exit (with an error status).
299 "-r" : reuse C symbols value if possible (skips costly nm extraction).*
300 "-s" : silent mode, only echoes questions and essential information.
301 -"D" : define symbol to have some value: *
302 -"Dsymbol" symbol gets the value 'define'
303 -"Dsymbol=value" symbol gets the value 'value'
304 -E : stop at the end of questions, after having produced config.sh. *
305 -K : do not use unless you know what you are doing.
306 -O : let -D and -U override definitions from loaded configuration file. *
307 -S : perform variable substitutions on all .SH files (can mix with -f) *
308 -"U" : undefine symbol: *
309 -"Usymbol" symbol gets the value 'undef'
310 -"Usymbol=" symbol gets completely empty
311 -V : print version number and exit (with a zero status).
312 $ echo "%Config-I-VMS, lower case switches must be enclosed"
313 $ echo "-Config-I-VMS, in double quotation marks, e.g.:"
314 $ echo "-Config-I-VMS, @Configure ""-des"""
315 $ echo "-Config-I-VMS, * indicates switch may not be fully implemented for VMS."
316 $ SET DEFAULT 'vms_default_directory_name' !be kind rewind
318 $ EXIT 3 ! $STATUS = "%X00000003" (informational)
324 $ STDOUT = F$TRNLNM("SYS$OUTPUT")
325 $ DEFINE SYS$OUTPUT "_NLA0:"
326 $ echo4 = "write STDOUT "
327 $ cat4 = "TYPE/OUTPUT=''STDOUT'"
328 $ open/write STDOUT 'STDOUT'
336 $ echo4 = "write SYS$OUTPUT "
340 $!: run the defines and the undefines, if any, but leave the file out there...
341 $! Unfortunately Configure.COM in DCL is not yet set up to do this -
347 $!: Eunice requires " " instead of "", can you believe it
350 $ echo "Beginning of configuration questions for ''package'."
353 $!: Some greps do not return status, grrr.
354 $ contains = "SEARCH"
356 $!: first determine how to suppress newline on echo command !cant DCL is record oriented
357 $! echo "Checking ''echo' to see how to suppress newlines..."
358 $! echo "giving up..."
359 $! echo "The star should be here-->*"
361 $!: Now test for existence of everything in MANIFEST
363 $ echo4 "First let's make sure your kit is complete. Checking..."
366 $! Here I assume we are in the [foo.PERL5xxx.VMS...] tree
367 $! because the search routine simply does set def [-] if necessary.
368 $ file_2_find = "MANIFEST" !I hope this one is not in [foo.PERL5xxx.VMS...]
370 $ manifestfound = F$SEARCH(file_2_find)
371 $ IF (manifestfound .EQS. "")
373 $ IF F$PARSE(F$ENVIRONMENT("DEFAULT"),,,"DIRECTORY",).NES."[000000]"
376 $ GOTO Research_manifest
379 $ echo "There is no MANIFEST file. I hope your kit is complete !"
381 $ GOTO Beyond_manifest
384 $! MANIFEST. has been found and we have set def'ed there -
385 $! time to bail out before it's too late.
386 $ tmp = f$extract(1,3,f$edit(f$getsyi("VERSION"),"TRIM,COLLAPSE"))
387 $ IF tmp .GES. "7.2" THEN GOTO Beyond_depth_check
388 $ IF (F$ELEMENT(max_allowed_dir_depth,".",F$ENVIRONMENT("Default")).nes.".")
391 %Config-E-VMS, ERROR:
392 Sorry! It apears as though your perl build sub-directory is already too
393 deep into the VMS file system. Please try moving stuff into a shallower
394 directory (or altering the "max_allowed_dir_depth" parameter).
395 $ echo4 "ABORTING..."
396 $ SET DEFAULT 'vms_default_directory_name' !be kind rewind
398 $ EXIT !2 !$STATUS = "%X00000002" (error)
402 $! after finding MANIFEST let's create (but not yet enter) the UU subdirectory
404 $ IF (manifestfound .NES. "")
406 $ IF ( F$SEARCH("UU.DIR").EQS."" )
408 $ CREATE/DIRECTORY [.UU]
410 $ IF ( F$SEARCH("[.UU]*.*").NES."" ) THEN DELETE/NOLOG [.UU]*.*;*
412 $!: Configure runs within the UU subdirectory
415 $! a little redundancy never hurt anybody?
416 $ file_2_find = "[-]" + file_2_find
417 $ manifestfound = F$SEARCH(file_2_find)
419 $ OPEN/WRITE MISSING MISSING.
420 $!change to "FALSE" if you wish to skip the manifest search
421 $!(which after all is rather slow in DCL :-)
424 $ OPEN/READ CONFIG 'manifestfound'
426 $ READ/END_OF_FILE = Done_manifest CONFIG line
427 $! This algorithm turns "foo/bar/baz.c" into "[.foo.bar]baz.c"
428 $! pvhp@lns62.lns.cornell.edu 10-JUN-1996 20:31:46
429 $! 2-MAR-1998 15:46:11 Improved to turn "foo/bar/baz.c.buz"
430 $! into "[.foo.bar]baz.c_buz as happens with vmstar and unzip
431 $ line = F$EDIT(line,"TRIM, COMPRESS")
432 $ file_2_find = F$EXTRACT(0,F$LOCATE(" ",line),line)
433 $ IF F$LOCATE("/",file_2_find) .NE. F$LENGTH(file_2_find)
435 $Re_strip_line_manifest:
436 $ loca = F$LOCATE("/",file_2_find)
437 $ ante = F$EXTRACT(0,loca,file_2_find)
438 $ post = F$EXTRACT(loca,F$LENGTH(file_2_find),file_2_find)
439 $ test_this = ante + "." + (post - "/")
440 $ IF F$LOCATE("/",test_this) .NE. F$LENGTH(test_this)
442 $ file_2_find = ante + "." + (post - "/")
443 $ GOTO Re_strip_line_manifest
445 $ file_2_find = ante + "]" + (post - "/")
447 $ file_2_find = "[-."+file_2_find
449 $ file_2_find = "[-]" + file_2_find
452 $ dirname = F$EXTRACT(0,F$LOCATE("]",file_2_find),file_2_find) + "]"
453 $ file_2_find = file_2_find - dirname
456 $ dot_ele = F$ELEMENT(dots,".",file_2_find)
457 $ IF dot_ele .EQS. "." THEN GOTO Eo_dot_loop
459 $ THEN basename = f$extract(0,f$locate(".",file_2_find),file_2_find) + "."
460 $ ELSE basename = basename + dot_ele + "_"
465 $ IF (((f$length(file_2_find)+1) .eq. f$length(basename)) .and. -
466 (f$extract(f$length(basename)-1,1,basename) .eqs. "_")) THEN -
467 basename = f$extract(0,f$length(basename)-1,basename)
468 $ file_2_find = dirname + basename
470 $ found = F$SEARCH(file_2_find)
471 $ IF (found .EQS. "")
473 $ WRITE MISSING file_2_find
474 $ IF ((F$LENGTH(miss_list)+F$LENGTH(file_2_find)).LT.250)
476 $ miss_list = miss_list + "," + file_2_find
479 $ GOTO Read_loop_manifest
484 $ ENDIF ! (manifestfound .NES. "")
486 $ IF (miss_list .NES. "")
488 $ echo "Some of the files not found include:"
491 $ IF ((miss_list .NES. "").OR.(manifestfound .EQS. ""))
495 THIS PACKAGE SEEMS TO BE INCOMPLETE.
497 You have the option of continuing the configuration process, despite the
498 distinct possibility that your kit is damaged, by typing 'y'es. If you
499 do, don't blame me if something goes wrong. I advise you to type 'n'o
500 and contact the author (sugalskd@ous.edu).
502 $ READ SYS$COMMAND/PROMPT="Continue? [n] " ans
505 $ echo4 "Continuing..."
507 $ echo4 "ABORTING..."
511 $ echo4 "Looks good..."
512 $ DELETE/NOLOG MISSING.;
513 $ ENDIF ! (miss_list .NES. "")
514 $ ENDIF ! (manifestfound .EQS. "") ELSE
516 $! after finding MANIFEST (see above)
517 $!: Configure runs within the UU subdirectory
519 $!: compute the number of columns on the terminal for proper question formatting
520 $! (sfn, will assume 80-ish)
522 $!: set up the echo used in my read !sfn
523 $!: now set up to do reads with possible shell escape and default assignment !sfn
534 $ READ SYS$COMMAND/PROMPT="''rp'" ans
537 $ READ SYS$COMMAND/PROMPT="''rp'" ans
544 $!: create .config dir to save info across Configure sessions
545 $ IF ( F$SEARCH("[-]CONFIG.DIR").EQS."" )
547 $ CREATE/DIRECTORY [-.CONFIG]
548 $ OPEN/WRITE CONFIG [-.CONFIG]README.
550 "This directory created by Configure to save information that should"
552 "persist across sessions."
555 "You may safely delete it if you wish."
559 $!: general instructions
562 $ user = F$EDIT(F$GETJPI("","USERNAME"),"TRIM,COLLAPSE")
563 $ IF .NOT.(F$SEARCH("[-.CONFIG]INSTRUCT.").EQS."")
565 $ messages = F$ENVIRONMENT("MESSAGE")
566 $ SET MESSAGE/NOFAC/NOSEV/NOIDENT/NOTEXT !sorry :-(
567 $ contains /NOOUTPUT [-.CONFIG]INSTRUCT. 'user'
568 $ IF .NOT.($status.EQ.%X08D78053)
572 $ rp = "Would you like to see the instructions? [''dflt'] "
574 $ if .NOT.ans THEN needman=""
576 $ SET MESSAGE 'messages' !hope you made it here :-)
578 $ if (fastread.AND.silent.AND.(alldone.eqs."cont")) THEN needman=""
584 This installation shell script will examine your system and ask you questions
585 to determine how the perl5 package should be installed. If you get
586 stuck on a question, you may use a ^C or ^Y shell escape to STOP this
587 process, edit something, then restart this process as you just did.
588 Many of the questions will have default answers in square
589 brackets; typing carriage return will give you the default.
591 $ READ SYS$COMMAND/PROMPT="Type carriage return to continue " ans
594 In a hurry? You may run '@Configure -d'. This will bypass nearly all
595 the questions and use the computed defaults (or the previous answers provided
596 there was already a config.sh file). Type '@Configure -h' for a list of
599 $ READ SYS$COMMAND/PROMPT="Type carriage return to continue " ans
602 Much effort has been expended to ensure that this shell script will
603 run on any VMS system. If despite that it blows up on yours, your
604 best bet is to edit Configure.com and @ it again. Whatever problems
605 you have with Configure.com, let me (sugalskd@ous.edu) know how I blew
608 $!This installation script affects things in two ways:
610 $!1) it may do direct variable substitutions on some of the files included
612 $!2) it builds a config.h file for inclusion in C programs. You may edit
613 $! any of these files as the need arises after running this script.
615 $!If you make a mistake on a question, there is no easy way to back up to it
618 $ READ SYS$COMMAND/PROMPT="Type carriage return to continue " ans
619 $ IF (F$SEARCH("[-.CONFIG]INSTRUCT.").EQS."")
621 $ OPEN/WRITE CONFIG [-.CONFIG]INSTRUCT.
625 $ ENDIF !(needman .EQS. "true")
627 $!: see if sh knows # comments !sfn
629 $!: figure out how to guarantee sh startup !sfn
630 $!: find out where common programs are !sfn
631 $!loclist="awk/cat/comm/cp/echo/expr/find/grep/ln/ls/mkdir/rm/sed/sort/touch/tr/uniq"
632 $!trylist="Mcc/byacc/cpp/csh/date/egrep/less/line/more/nroff/perl/pg/sendmail/test/uname"
633 $! echo "I don't know where '$file' is, and my life depends on it."
634 $! echo "Go find a public domain implementation or fix your PATH setting!"
636 $! echo "Don't worry if any of the following aren't found..."
637 $!: determine whether symbolic links are supported !sfn
638 $!: see whether [:lower:] and [:upper:] are supported character classes !sfn
639 $!: set up the translation script tr, must be called with ./tr of course !sfn
641 $!: Try to determine whether config.sh was made on this system
642 $!: Get old answers from old config file if Configure was run on the
643 $!: same system, otherwise use the hints.
644 $ config_sh_es = "''config_sh'/[-]config.sh/[-.vms]config.vms/"
648 $ config_sh = F$ELEMENT(i,"/",config_sh_es)
650 $ IF (config_sh.NES."/").AND.(config_sh.NES."")
652 $ configshfound = F$SEARCH(config_sh)
653 $ IF (configshfound.NES."") THEN GOTO Config_sh_found
655 $ IF (i.LT.max) THEN GOTO Config_sh_look
656 $ IF (configshfound.EQS."") THEN GOTO Beyond_config_sh
659 $ echo "Fetching default answers from ''config_sh'..."
660 $!we actually do not have "hints/" for VMS
663 $!First time through, eh? I have some defaults handy for the following systems:
665 $! echo " ","VMS_VAX"
666 $! echo " ","VMS_AXP"
667 $! : Now look for a hint file osname_osvers, unless one has been
668 $! : specified already.
671 $!You may give one or more space-separated answers, or "none" if appropriate.
672 $!If your OS version has no hints, DO NOT give a wrong version -- say "none".
674 $! READ SYS$COMMAND/PROMPT="Which of these apply, if any? " ans
678 $!: Restore computed paths !sfn
680 $! genconfig.pl has "osname='VMS'"
681 $ osname = F$EDIT(F$GETSYI("NODE_SWTYPE"),"COLLAPSE")
682 $! %Config-I-VMS, a necessary error trap (could be PC running VCL)
684 $ IF (osname .NES. "VMS")
686 $ echo4 "Hmm.. I wonder what ''osname' is (?)"
689 %Config-E-VMS, ERROR:
691 Err, you do not appear to be running VMS!
692 This package is intended to Configure the building of Perl for VMS.
694 $ READ SYS$COMMAND/PROMPT="Continue anyway? [n] " ans
697 $ echo4 "Continuing..."
699 $ echo4 "ABORTING..."
700 $ SET DEFAULT 'vms_default_directory_name' !be kind rewind
702 $ EXIT 2 !$STATUS = "%X00000002" (error)
704 $ ELSE !we are on VMS huzzah!
706 $ THEN TYPE SYS$INPUT:
708 Configure uses the operating system name and version to set some defaults.
709 The default value is probably right if the name rings a bell. Otherwise,
710 since spelling matters for me, either accept the default or answer "none"
713 $ rp = "Operating system name? [''osname'] "
717 $ IF (ans.NES.osname) !.AND.knowitall
719 $ echo4 "I'll go with ''osname' anyway..."
722 $ ENDIF !(osname .NES./.EQS. "VMS")
724 $!: who configured the system
726 $ cf_by = F$EDIT(user,"LOWERCASE")
727 $! cf_time = F$CVTIME() !superceded by procedure below
728 $ osvers = F$GETSYI("VERSION")
730 $! Peter Prymmer has seen:
731 $! "SYS$TIMEZONE_DIFFERENTIAL" = "-46800" (sic)
732 $! "SYS$TIME_ZONE" = "EDT"
734 $! Charles Lane recommended:
735 $! "SYS$TIMEZONE_DIFFERENTIAL" = "-14400"
736 $! "NEWS_TIMEZONE" = "-0500"
737 $! "ST_TIMEZONE" = "EDT"
738 $! "JAN_TIME_ZONE" = "EST "
739 $! "MULTINET_TIMEZONE" = "EST"
740 $! "DAYLIGHT_SAVINGS" = "1"
742 $! Charles Bailey recommends (in ANU NEWS Doc Jan 1995):
744 $! "Multinet_Timezone"
745 $! "TCPware_Timezone"
748 $! This snippet o' DCL returns a string in default Unix `date` format,
749 $! and it will prompt to set SYS$TIMEZONE_DIFFERENTIAL.
750 $! Peter Prymmer pvhp@lns62.lns.cornell.edu
752 $ MIN_TZO = -840 !units are minutes here
755 $ wkday = F$EXTRACT(0,3,F$CVTIME(,,"WEEKDAY"))
756 $ monn = F$CVTIME(,,"MONTH")
757 $ mday = F$EXTRACT(8,2,F$CVTIME(,,"DATE"))
758 $ hour = F$CVTIME(,,"HOUR")
759 $ min = F$CVTIME(,,"MINUTE")
760 $ sec = F$CVTIME(,,"SECOND")
761 $ year = F$CVTIME(,,"YEAR")
763 $ months = "/Jan/Feb/Mar/Apr/May/Jun/Jul/Aug/Sep/Oct/Nov/Dec/"
767 $ mon = F$ELEMENT(i,"/",months)
768 $ IF i.LT.monn THEN GOTO Mon_loop
771 $ systz = F$TRNLNM("SYS$TIMEZONE_DIFFERENTIAL")
774 $ tzhour = F$INTEGER(systz)/3600
775 $ tzmins = F$INTEGER(systz)/60
776 $ tzminrem = tzmins - tzhour*60
777 $ IF tzminrem.lt.0 THEN tzminrem = -1*tzminrem !keeps !2ZL happy
779 $ THEN signothetime = "+"
780 $ IF tzhour.EQ.0.AND.tzminrem.EQ.0
781 $ THEN direction = "on GMT/"
782 $ ELSE direction = "east of "
784 $ ELSE signothetime = "-"
785 $ tzhour = -1*tzhour !keeps !UL happy
786 $ direction = "west of "
789 $ echo "%Config-I-VMS,"
790 $ echo "According to the setting of your ""SYS$TIMEZONE_DIFFERENTIAL"" (= ''systz')"
793 $ tzspan = "''tzhour' hours & ''tzminrem' minutes"
795 $ tzspan = "''tzhour' hours"
798 $ echo "Your system is ''tzspan' ''direction'UTC in England."
799 $ rp = "%Config-I-VMS, (''systz') Is this UTC Time Zone Offset correct? [''dflt'] "
801 $ IF ans.OR.(ans.EQS."")
805 $ GOTO Beyond_TimeZone
809 $ echo4 "%Config-I-VMS,"
810 $ echo4 """SYS$TIMEZONE_DIFFERENTIAL"" does not appear to be DEFINEd on your system"
815 $ echo "Please tell me in hh:mm form what time offset from GMT/UTC in England"
816 $ echo "you are. As an example Eastern (US) Standard Time is -5:00 offset, but"
817 $ echo "Eastern Daylight Time (summer) is -4:00 offset."
819 $ rp = "Enter the Time Zone offset: [''dflt'] "
821 $ ans = F$Edit(ans,"collapse,trim,uncomment,upcase")
822 $ IF ans.EQS."" THEN ans = dflt
823 $ tzhour = F$ELEMENT(0,":","''ans'") !first
824 $ IF tzhour.EQS."" THEN tzhour = 0
825 $ tzhour = F$INTEGER(tzhour)
826 $ tzminrem = F$ELEMENT(1,":","''ans'") !second
829 $ tzminrem = F$INTEGER(tzminrem)
830 $ IF F$EXTRACT(0,1,"''ans'") .EQS. "-" THEN tzminrem = tzminrem * -1
834 $ tzmins = tzhour*60 + tzminrem
835 $ tzd = F$STRING(tzmins*60)
840 $ tzhour = -1*tzhour !keeps !UL happy
843 $ IF (tzmins.GT.MAX_TZO).OR.(tzmins.LT.MIN_TZO)
846 $ echo "%Config-W-VMS-TIMERANGE, Response must be in the range -14:00 to 14:00."
851 $ tz = f$fao("UTC!AS!UL:!2ZL",signothetime,tzhour,tzminrem)
852 $ cf_time = "''wkday' ''mon' ''mday' ''hour':''min':''sec' ''tz' ''year'"
854 $!: determine the architecture name
855 $! genconfig.pl has either archname='VMS_AXP' or 'VMS_VAX'
857 $ IF (F$GETSYI("HW_MODEL") .LT. 1024)
859 $ archname = "VMS_VAX"
861 $ archname = "VMS_AXP"
863 $ rp = "What is your architecture name? [''archname'] "
867 $ ans = F$EDIT(ans,"COLLAPSE, UPCASE")
868 $ IF (ans.NES.archname) !.AND.knowitall
870 $ echo4 "I'll go with ''archname' anyway..."
873 $ IF (archname.EQS."VMS_AXP")
876 $ rp = "Are you sharing your PERL_ROOT with a VAX? [''dflt'] "
880 $ ans = F$EDIT(ans,"COLLAPSE, UPCASE")
887 $ macros = macros + """AXE=1"","
893 $!: is AFS running? !sfn
894 $!: decide how portable to be. Allow command line overrides. !sfn
895 $!: set up shell script to do ~ expansion !sfn
896 $!: expand filename !sfn
897 $!: now set up to get a file name !sfn
899 $ vms_skip_install = "true"
902 $ rp = "%Config-I-VMS, Do you wish to skip the """"where install"""" questions? [''dflt'] "
904 $ IF (.NOT.ans).AND.(ans.NES."") THEN vms_skip_install = "false"
905 $ prefix = F$ENVIRONMENT("DEFAULT") - ".UU]" + "]"
906 $ prefix = f$parse(prefix,,,,"NO_CONCEAL") - "][" - ".;"
907 $ prefix = prefix - "]" + ".]"
908 $ IF (.NOT.vms_skip_install)
910 $!: determine root of directory hierarchy where package will be installed.
915 $ echo "By default, ''package' will be installed in ''dflt'/bin, manual"
916 $ echo "pages under ''dflt'/man, etc..., i.e. with ''dflt' as prefix for"
917 $ echo "all installation directories. Typically set to /usr/local, but you"
918 $ echo "may choose /usr if you wish to install ''package' among your system
921 $ THEN TYPE SYS$INPUT:
922 binaries. If you wish to have binaries under /bin but manual pages
923 under /usr/local/man, that's ok: you will be prompted separately
924 for each of the installation directories, the prefix being only used
928 $ rp = "Installation prefix to use? [ ''dflt' ] "
933 $ IF F$LOCATE(".]",ans) .EQ. F$LENGTH(ans) THEN prefix = prefix - "]" + ".]"
938 $!: set the prefixit variable, to compute a suitable default value
940 $!: determine where private library files go
941 $!: Usual default is /usr/local/lib/perl5. Also allow things like
942 $!: /opt/perl/lib, since /opt/perl/lib/perl5 would be redundant.
944 $ THEN TYPE SYS$INPUT:
946 There are some auxiliary files for perl5 that need to be put into a
947 private library directory that is accessible by everyone.
949 $ dflt = prefix - ".]" + ".LIB]"
950 $ rp = "Pathname where the private library files will reside? "
951 $ rp = F$FAO("!AS!/!AS",rp,"[ ''dflt' ] ")
955 $ ELSE privlib = dflt
958 $ ENDIF !%Config-I-VMS, skip "where install" questions
960 $!: set the base revision
962 $!: get the patchlevel
964 $ echo4 "Getting the current patchlevel..." !>&4
965 $ patchlevel_h = F$SEARCH("[-]patchlevel.h")
966 $ IF (patchlevel_h.NES."")
968 $ got_patch = "false"
970 $ OPEN/READONLY CONFIG 'patchlevel_h'
972 $ READ/END_Of_File=Close_patch CONFIG line
973 $ IF ((F$LOCATE("#define PERL_VERSION",line).NE.F$LENGTH(line)).AND.(.NOT.got_patch))
975 $ line = F$EDIT(line,"COMPRESS, TRIM")
976 $ patchlevel = F$ELEMENT(2," ",line)
979 $ IF ((F$LOCATE("#define PERL_SUBVERSION",line).NE.F$LENGTH(line)).AND.(.NOT.got_sub))
981 $ line = F$EDIT(line,"COMPRESS, TRIM")
982 $ subversion = F$ELEMENT(2," ",line)
985 $ IF (.NOT.got_patch).OR.(.NOT.got_sub) THEN GOTO Patchlevel_h_loop
992 $ echo "(You have ''package' ''baserev' PL''patchlevel' sub''subversion'.)"
993 $! This whole thing needs replacing w/ F$FAO() calls:
994 $ patchlevel = F$INTEGER(patchlevel)
995 $ IF patchlevel.LT.10
996 $ THEN patchlevel = "00" + F$STRING(patchlevel)
997 $ ELSE patchlevel = "0" + F$STRING(patchlevel)
999 $ subversion = F$INTEGER(subversion)
1000 $ IF subversion.GT.0
1002 $ IF subversion.LT.10
1003 $ THEN subversion = "0" + F$STRING(subversion)
1004 $ ELSE subversion = F$STRING(subversion)
1006 $ ELSE subversion = ""
1009 $ version = F$EXTRACT(0,1,baserev) + "_" + patchlevel + subversion
1011 $ IF (.NOT.vms_skip_install)
1013 $!: set the prefixup variable, to restore leading tilda escape !sfn
1014 $!: set the prefixup variable, to restore leading tilde escape !sfn
1016 $!: determine where public architecture dependent libraries go
1020 $ echo "''package' contains architecture-dependent library files. If you are"
1023 $ THEN TYPE SYS$INPUT:
1024 sharing libraries in a heterogeneous environment, you might store
1025 these files in a separate location. Otherwise, you can just include
1026 them with the rest of the public library files.
1028 $ dflt = privlib - "]" + "." + archname + "." + version + "]"
1029 $ rp = "Where do you want to put the public architecture-dependent libraries? "
1030 $ rp = F$FAO("!AS!/!AS",rp,"[ ''dflt' ] ")
1033 $ THEN archlib = ans
1034 $ ELSE archlib = dflt
1037 $!: set up the script used to warn in case of inconsistency !sfn
1038 $!: function used to set $1 to $val !sfn
1040 $ ENDIF !%Config-I-VMS, skip "where install" questions
1041 $! This quotation from Configure has to be included on VMS:
1044 There is, however, a strange, musty smell in the air that reminds me of
1045 something...hmm...yes...I've got it...there's a VMS nearby, or I'm a Blit.
1047 $ IF (.NOT.vms_skip_install)
1049 $!: it so happens the Eunice I know will not run shell scripts in Unix format
1051 $!: see if setuid scripts can be secure !sfn
1052 $!: now see if they want to do setuid emulation !sfn
1054 $!: determine where site specific libraries go.
1056 $ THEN TYPE SYS$INPUT:
1058 The installation process will also create a directory for
1059 site-specific extensions and modules. Some users find it convenient
1060 to place all local files in this directory rather than in the main
1061 distribution directory.
1063 $ dflt = privlib - "]" + ".SITE_PERL]"
1064 $ rp = "Pathname for the site-specific library files? "
1065 $ rp = F$FAO("!AS!/!AS",rp,"[ ''dflt' ] ")
1068 $ THEN sitelib = ans
1069 $ ELSE sitelib = dflt
1072 $!: determine where site specific architecture-dependent libraries go.
1074 $ THEN TYPE SYS$INPUT:
1076 The installation process will also create a directory for
1077 architecture-dependent site-specific extensions and modules.
1079 $ dflt = sitelib - "]" + "." + archname + "]"
1080 $ rp = "Pathname for the site-specific architecture-dependent library files? "
1081 $ rp = F$FAO("!AS!/!AS",rp,"[ ''dflt' ] ")
1084 $ THEN sitearch = ans
1085 $ ELSE sitearch = dflt
1088 $!: determine where old public architecture dependent libraries might be
1090 $!: determine where public executables go
1091 $ dflt = prefix - ".]" + ".BIN]"
1092 $ rp = "Pathname where the public executables will reside? "
1093 $ rp = F$FAO("!AS!/!AS",rp,"[ ''dflt' ] ")
1100 $!: determine where manual pages are on this system
1101 $!: What suffix to use on installed man pages
1102 $!: see if we can have long filenames
1103 $!: determine where library module manual pages go
1104 $!: What suffix to use on installed man pages
1105 $!: see what memory models we can support
1107 $ ENDIF !%Config-I-VMS, skip "where install" questions
1109 $!: see if we need a special compiler
1110 $! cc_list = "cc/vaxc|cc/decc|gcc" !%Config-I-VMS, compiler symbols/commands
1114 $ vms_cc_available = ""
1116 $ OPEN/WRITE CONFIG ccvms.c
1117 $ WRITE CONFIG "#include <stdlib.h>" !DECC is sooo picky
1118 $ WRITE CONFIG "#include <stdio.h>"
1119 $ WRITE CONFIG "int main() {"
1120 $ WRITE CONFIG "#ifdef __DECC"
1121 $ WRITE CONFIG " printf(""/DECC\n"");"
1122 $ WRITE CONFIG "#else"
1123 $ WRITE CONFIG " printf(""/VAXC\n"");"
1124 $ WRITE CONFIG "#endif"
1125 $ WRITE CONFIG " exit(0);"
1129 $ DEFINE SYS$ERROR _NLA0:
1130 $ DEFINE SYS$OUTPUT _NLA0:
1131 $ cc/NoObj/list=ccvms.lis ccvms.c
1133 $ DEASSIGN SYS$OUTPUT
1134 $ DEASSIGN SYS$ERROR
1135 $ IF (silent) THEN GOSUB Shut_up
1136 $! echo "%Config-I-VMS, After cc compile $status = >''tmp'<" !diagnostic
1138 $ IF tmp.NE.%X10B90001
1140 $ IF tmp.NE.%X10000001
1142 $ nocc = "t" !%X10000001 is return from gcc
1143 $ GOTO Gcc_initial_check
1148 $ IF .NOT.silent THEN echo ""
1149 $ echo "%Config-I-VMS, Default ""cc"" is ''line' ''archsufx' ''F$GETSYI("VERSION")'"
1150 $ IF F$LOCATE("VAX",line).NE.F$LENGTH(line)
1152 $ vms_cc_dflt = "/vaxc"
1153 $ vms_cc_available = vms_cc_available + "cc/vaxc "
1156 $ echo "%Config-I-VMS, Will try cc/decc..."
1158 $ DEFINE SYS$ERROR _NLA0:
1159 $ DEFINE SYS$OUTPUT _NLA0:
1161 $ cc/decc/NoObj/list=ccvms.lis ccvms.c
1163 $ DEASSIGN SYS$OUTPUT
1164 $ DEASSIGN SYS$ERROR
1166 $ IF (silent) THEN GOSUB Shut_up
1167 $ IF tmp.NE.%X10B90001
1169 $ echo "%Config-I-VMS, Apparently you don't have that one."
1172 $ echo "%Config-I-VMS, You also have: ''line' ''archsufx' ''F$GETSYI("VERSION")'"
1173 $ vms_cc_available = vms_cc_available + "cc/decc "
1176 $ IF F$LOCATE("DEC",line).NE.F$LENGTH(line)
1178 $ vms_cc_dflt = "/decc"
1179 $ vms_cc_available = vms_cc_available + "cc/decc "
1180 $ echo "%Config-I-VMS, Will try cc/vaxc..."
1181 $ DEFINE SYS$ERROR _NLA0:
1182 $ DEFINE SYS$OUTPUT _NLA0:
1184 $ cc/vaxc/NoObj/list=ccvms.lis ccvms.c
1186 $ DEASSIGN SYS$OUTPUT
1187 $ DEASSIGN SYS$ERROR
1189 $ IF (silent) THEN GOSUB Shut_up
1190 $ IF tmp.NE.%X10B90001
1192 $ echo "%Config-I-VMS, Apparently you don't have that one."
1195 $ echo "%Config-I-VMS, You also have: ''line' ''archsufx' ''F$GETSYI("VERSION")'"
1196 $ vms_cc_available = vms_cc_available + "cc/vaxc "
1202 $ echo "%Config-I-VMS, Checking for Gcc"
1203 $ OPEN/WRITE CONFIG gccvers.lis
1204 $ DEFINE SYS$ERROR CONFIG
1205 $ DEFINE SYS$OUTPUT CONFIG
1206 $ 'gcc_symbol'/noobj/version _nla0:
1208 $ DEASSIGN SYS$OUTPUT
1209 $ DEASSIGN SYS$ERROR
1210 $ IF (silent) THEN GOSUB Shut_up
1212 $ IF (tmp.NE.%X10000001).and.(tmp.ne.%X00030001)
1214 $ echo "%Config-I-VMS, Symbol ""''gcc_symbol'"" is not defined. I guess you don't have it."
1217 $ OPEN/READ CONFIG gccvers.lis
1219 $ READ/END_OF_FILE=GCC_List_End CONFIG line
1220 $ GOTO GCC_List_Read
1224 $ vms_cc_available = vms_cc_available + "''gcc_symbol' "
1225 $ DELETE/NOLOG/NOCONFIRM gccvers.lis;
1228 $ DELETE/NOLOG/NOCONFIRM ccvms.*;
1230 $!: see if we need a special compiler
1232 $ echo "%Config-I-VMS, available compiler(s):"
1233 $ echo "( ''vms_cc_available')"
1236 $ dflt = "cc''vms_cc_dflt'" !-> "cc" in case first compile went OK
1240 $ rp = "Use which C compiler? [''dflt'] "
1244 $ ans = F$EDIT(ans,"TRIM, COMPRESS, LOWERCASE")
1246 $ IF F$LOCATE("dec",ans).NE.F$LENGTH(ans)
1249 $ Using_Dec_C = "Yes"
1250 $ C_COMPILER_Replace = "CC=cc=''Mcc'"
1252 $ IF F$LOCATE("vax",ans).NE.F$LENGTH(ans)
1255 $ Using_Vax_C = "Yes"
1256 $ C_COMPILER_Replace = "CC=cc=''Mcc'"
1260 $ IF F$LOCATE("dec",dflt).NE.F$LENGTH(dflt)
1262 $ C_COMPILER_Replace = "CC=cc=''Mcc'"
1264 $ Using_Dec_C = "Yes"
1265 $ IF F$LOCATE("vax",dflt).NE.F$LENGTH(dflt)
1267 $ C_COMPILER_Replace = "CC=cc=''Mcc'"
1271 $ IF Mcc .EQS. "cc/decc"
1273 $ Using_Dec_C = "Yes"
1274 $ C_COMPILER_Replace = "CC=cc=''Mcc'"
1279 $ IF Mcc .EQS. "cc/decc"
1281 $ Using_Dec_C = "Yes"
1282 $ C_COMPILER_Replace = "CC=cc=''Mcc'"
1284 $ IF Mcc .EQS. "cc/vaxc"
1286 $ Using_Vax_C = "Yes"
1287 $ C_COMPILER_Replace = "CC=cc=''Mcc'"
1289 $ IF Mcc .EQS. "gcc"
1291 $ Using_Gnu_C = "Yes"
1292 $ C_COMPILER_Replace = "CC=cc=''Mcc'"
1295 $Decc_Version_check:
1296 $ IF "''Using_Dec_C'".EQS."Yes"
1299 $ echo4 "Checking for Dec C's version number..." !>&4
1300 $ OPEN/WRITE CONFIG deccvers.c
1301 $ WRITE CONFIG "#include <stdlib.h>" !DECC is sooo picky
1302 $ WRITE CONFIG "#include <stdio.h>"
1303 $ WRITE CONFIG "int main() {"
1304 $ WRITE CONFIG "#ifdef __DECC"
1305 $ WRITE CONFIG "#ifdef __DECC_VER"
1306 $ WRITE CONFIG " printf(""%i\n"", __DECC_VER);"
1307 $ WRITE CONFIG "#else"
1308 $ WRITE CONFIG " printf(""%i\n"", ""1"");"
1309 $ WRITE CONFIG "#endif"
1310 $ WRITE CONFIG "#endif"
1311 $ WRITE CONFIG " exit(0);"
1314 $ DEFINE SYS$ERROR _NLA0:
1315 $ DEFINE SYS$OUTPUT _NLA0:
1318 $ DEASSIGN SYS$ERROR _NLA0:
1319 $ DEASSIGN SYS$OUTPUT _NLA0:
1320 $ IF (silent) THEN GOSUB Shut_up
1321 $ DEFINE SYS$ERROR _NLA0:
1322 $ DEFINE SYS$OUTPUT _NLA0:
1325 $ DEASSIGN SYS$ERROR
1326 $ DEASSIGN SYS$OUTPUT
1327 $ IF (silent) THEN GOSUB Shut_up
1328 $ OPEN/WRITE CONFIG deccvers.out
1329 $ DEFINE SYS$ERROR CONFIG
1330 $ DEFINE SYS$OUTPUT CONFIG
1331 $ mcr []deccvers.exe
1334 $ DEASSIGN SYS$OUTPUT
1335 $ DEASSIGN SYS$ERROR
1336 $ IF (silent) THEN GOSUB Shut_up
1337 $ OPEN/READ CONFIG deccvers.out
1338 $ READ/END_OF_FILE=Dec_c_cleanup CONFIG line
1341 $! DELETE/NOLOG/NOCONFIRM deccvers.*;
1342 $ echo "You are using Dec C ''line'"
1343 $ Dec_C_Version = line
1346 $ IF "''Using_Vax_C'".EQS."Yes"
1349 $ echo4 "Checking to see how to invoke Vax C..."
1350 $ OPEN/WRITE CONFIG vaxcchk.c
1351 $ WRITE CONFIG "#include <stdio.h>"
1352 $ WRITE CONFIG "int main() {"
1353 $ WRITE CONFIG " printf(""%i\n"", ""1"");"
1354 $ WRITE CONFIG " exit(0);"
1357 $ DEFINE SYS$ERROR _NLA0:
1358 $ DEFINE SYS$OUTPUT _NLA0:
1360 $ cc/vaxc/NoObj vaxcchk.c
1362 $ DEASSIGN SYS$OUTPUT
1363 $ DEASSIGN SYS$ERROR
1365 $ IF (silent) THEN GOSUB Shut_up
1366 $ IF tmp.NE.%X10B90001
1373 $ DELETE/NOLOG/NOCONFIRM vaxcchk.*;
1376 $ if "''using_gnu_c'" .eqs. "Yes"
1378 $ vaxcrtl_olb = F$SEARCH("SYS$LIBRARY:VAXCRTL.OLB")
1379 $ vaxcrtl_exe = F$SEARCH("SYS$SHARE:VAXCRTL.EXE")
1380 $ gcclib_olb = F$SEARCH("GNU_CC:[000000]GCCLIB.OLB")
1381 $ IF gcclib_olb .EQS. ""
1383 $! These objects/libs come w/ gcc 2.7.2 for AXP:
1384 $ tmp = F$SEARCH("GNU_CC:[000000]libgcc2.olb")
1385 $ IF tmp .NES. "" then gcclib_olb = tmp
1386 $ tmp = F$SEARCH("GNU_CC:[000000]libgcclib.olb")
1389 $ IF gcclib_olb .EQS. ""
1390 $ THEN gcclib_olb = tmp
1391 $ ELSE gcclib_olb = gcclib_olb + "/lib," + tmp
1394 $ tmp = F$SEARCH("SYS$LIBRARY:VAXCRTL.OLB")
1397 $ IF gcclib_olb .EQS. ""
1398 $ THEN gcclib_olb = tmp
1399 $ ELSE gcclib_olb = gcclib_olb + "/lib," + tmp
1402 $ tmp = F$SEARCH("GNU_CC:[000000]crt0.obj")
1405 $ IF gcclib_olb .EQS. ""
1406 $ THEN gcclib_olb = tmp
1407 $ ELSE gcclib_olb = gcclib_olb + "/lib," + tmp
1410 $ IF gcclib_olb .EQS. vaxcrtl_olb THEN gcclib_olb = "" !goofy order of axplibs
1412 $ gcclib_olb = gcclib_olb + "/lib"
1414 $ IF gcclib_olb .NES. "" .AND. -
1415 (vaxcrtl_olb .NES. "" .OR. -
1416 vaxcrtl_exe .NES. "" )
1419 $ echo4 "Checking for GNU cc in disguise and/or its version number..." !>&4
1420 $ OPEN/WRITE CONFIG gccvers.c
1421 $ WRITE CONFIG "#include <stdlib.h>" !DECC is sooo picky
1422 $ WRITE CONFIG "#include <stdio.h>"
1423 $ WRITE CONFIG "int main() {"
1424 $ WRITE CONFIG "#ifdef __GNUC__"
1425 $ WRITE CONFIG "#ifdef __VERSION__"
1426 $ WRITE CONFIG " printf(""%s\n"", __VERSION__);"
1427 $ WRITE CONFIG "#else"
1428 $ WRITE CONFIG " printf(""%s\n"", ""1"");"
1429 $ WRITE CONFIG "#endif"
1430 $ WRITE CONFIG "#endif"
1431 $ WRITE CONFIG " exit(0);"
1434 $ DEFINE SYS$ERROR _NLA0:
1435 $ DEFINE SYS$OUTPUT _NLA0:
1438 $ DEASSIGN SYS$ERROR _NLA0:
1439 $ DEASSIGN SYS$OUTPUT _NLA0:
1440 $ IF (silent) THEN GOSUB Shut_up
1441 $ DEFINE SYS$ERROR _NLA0:
1442 $ DEFINE SYS$OUTPUT _NLA0:
1443 $ IF vaxcrtl_exe .EQS. ""
1445 $ IF F$LOCATE("VAXCRTL",gcclib_olb).NE.F$LENGTH(gcclib_olb)
1447 $ link gccvers.obj,'gcclib_olb',SYS$LIBRARY:VAXCRTL/Library
1450 $ link gccvers.obj,'gcclib_olb'
1454 $ OPEN/WRITE CONFIG GCCVERS.OPT
1455 $ WRITE CONFIG "SYS$SHARE:VAXCRTL/SHARE"
1457 $ link gccvers.obj,GCCVERS.OPT/OPT,'gcclib_olb'
1460 $ DEASSIGN SYS$ERROR
1461 $ DEASSIGN SYS$OUTPUT
1462 $ IF (silent) THEN GOSUB Shut_up
1463 $ OPEN/WRITE CONFIG gccvers.out
1464 $ DEFINE SYS$ERROR CONFIG
1465 $ DEFINE SYS$OUTPUT CONFIG
1469 $ DEASSIGN SYS$OUTPUT
1470 $ DEASSIGN SYS$ERROR
1471 $ IF (silent) THEN GOSUB Shut_up
1472 $ OPEN/READ CONFIG gccvers.out
1473 $ READ/END_OF_FILE=Gcc_cleanup CONFIG line
1476 $ DELETE/NOLOG/NOCONFIRM gccvers.*;
1477 $ IF F$LOCATE("GNU C version ",line).NE.F$LENGTH(line)
1479 $ echo "You are not using GNU cc."
1482 $ echo "You are using GNU cc ''line'"
1483 $ Using_Gnu_C = "Yes"
1484 $ C_COMPILER_Replace = "CC=cc=''Mcc'"
1492 $ OPEN/READ CONFIG ccvms.lis
1494 $ IF (F$GETSYI("HW_MODEL") .LT. 1024)
1502 $ line = F$EDIT(line,"TRIM,COMPRESS")
1503 $ line = line - "Page 1" ! occurs at end all compilers
1504 $ line = line - "CCVMS " ! filename appears w/ VAXC
1505 $ line = line - "Source Listing " ! Seen w/ AXP DECC
1506 $ tmp = F$EXTRACT(0,20,line) !timestamp, e.g. "30-JUL-1996 21:12:54 "
1508 $ line = F$EDIT(line,"TRIM") !bit redundant but we're in no big hurry
1509 $ DELETE/NOLOG/NOCONFIRM ccvms.lis;
1513 $!: What should the include directory be ?
1515 $ rp = "Where are the include files you want to use? "
1516 $ IF f$length( rp + "[''dflt'] " ).gt.76
1517 $ THEN rp = F$FAO("!AS!/!AS",rp,"[''dflt'] ")
1518 $ ELSE rp = rp + "[''dflt'] "
1523 $!: see if we have to deal with yellow pages, now NIS.
1524 $!: now get the host name
1527 $ echo4 "Figuring out host name..." !>&4
1529 $ IF myhostname.eqs."" THEN myhostname = F$TRNLNM("ARPANET_HOST_NAME")
1530 $ IF myhostname.eqs."" THEN myhostname = F$TRNLNM("INTERNET_HOST_NAME")
1531 $ IF myhostname.eqs."" THEN myhostname = F$TRNLNM("MULTINET_HOST_NAME")
1532 $ IF myhostname.eqs."" THEN myhostname = F$TRNLNM("UCX$INET_HOST_NAME")
1533 $ IF myhostname.eqs."".and. -
1534 F$TRNLNM("UCX$INET_HOST") .nes. "" .and. -
1535 F$TRNLNM("UCX$INET_DOMAIN") .nes. "" THEN -
1536 myhostname = F$TRNLNM("UCX$INET_HOST") + "." + F$TRNLNM("UCX$INET_DOMAIN")
1537 $ IF myhostname.eqs."" THEN myhostname = F$TRNLNM("TCPWARE_DOMAINNAME")
1538 $ IF myhostname.eqs."" THEN myhostname = F$TRNLNM("NEWS_ADDRESS")
1539 $ IF myhostname.eqs."" THEN myhostname = F$TRNLNM("SYS$NODE") - "::"
1540 $ IF myhostname.eqs."" THEN myhostname = F$EDIT(F$GETSYI("SCSNODE"),"TRIM")
1541 $!: you do not want to know about this
1543 $ rp = "Your host name appears to be """"''myhostname'"""". Right? "
1545 $ IF (.not.ans).and.(ans.NES."")
1547 $ READ SYS$COMMAND/PROMPT= -
1548 "Please type the (one word) name of your host: " ans
1551 $!: translate upper to lower if necessary
1552 $ myhostname = F$EDIT(myhostname,"COLLAPSE")
1553 $ mylowhostname = F$EDIT(myhostname," LOWERCASE")
1554 $ IF mylowhostname.NES.myhostname
1556 $ echo "(Normalizing case in your host name)"
1557 $ myhostname = mylowhostname
1560 $ fp = F$LOCATE(".",myhostname)
1561 $ mydomain = F$EXTRACT(fp,(F$LENGTH(myhostname)-fp)+1,myhostname)
1562 $ IF mydomain.NES."" !no periods in DECnet names like "MYDECNODE::"
1564 $ rp = "What is your domain name? [''mydomain'] "
1566 $ IF ans .nes. "" THEN mydomain = ans
1567 $!: translate upper to lower if necessary
1568 $ mydomain = F$EDIT(mydomain,"COLLAPSE")
1569 $ mylowdomain = F$EDIT(mydomain," LOWERCASE")
1570 $ IF mylowdomain.NES.mydomain
1572 $ echo "(Normalizing case in your domain name)"
1573 $ mydomain = mylowdomain
1576 $ myhostname = myhostname - mydomain
1577 $ echo "(Trimming domain name from host name--host name is now ''myhostname')"
1579 $ THEN TYPE SYS$INPUT:
1581 I need to get your e-mail address in Internet format if possible, i.e.
1582 something like user@host.domain. Please answer accurately since I have
1583 no easy means to double check it. The default value provided below
1584 is most probably close to the reality but may not be valid from outside
1585 your organization...
1587 $ dflt = "''cf_by@''myhostname'"+"''mydomain'"
1588 $ rp = "What is your e-mail address? [''dflt'] "
1591 $ THEN cf_email = ans
1592 $ ELSE cf_email = dflt
1596 $ THEN TYPE SYS$INPUT:
1598 If you or somebody else will be maintaining perl at your site, please
1599 fill in the correct e-mail address here so that they may be contacted
1600 if necessary. Currently, the "perlbug" program included with perl
1601 will send mail to this address in addition to perlbug@perl.com. You may
1602 enter "none" for no administrator.
1604 $ dflt = "''cf_email'"
1605 $ rp = "Perl administrator e-mail address [''dflt'] "
1608 $ THEN perladmin = ans
1609 $ ELSE perladmin = dflt
1612 $!: determine where public executable scripts go
1613 $!: determine perl absolute location
1614 $!: figure out how to guarantee perl startup
1616 $!: see how we invoke the C preprocessor
1618 $! echo4 "Now, how can we feed standard input to your C preprocessor..." !>&4
1619 $!: Set private lib path
1620 $!: Now check and see which directories actually exist, avoiding duplicates
1621 $!: determine optimize, if desired, or use for debug flag also
1622 $!: We will not override a previous value, but we might want to
1623 $!: augment a hint file
1624 $!: the following weeds options from ccflags that are of no interest to cpp
1625 $!: flags used in final linking phase
1626 $!: Try to guess additional flags to pick up local libraries.
1629 $! echo4 "Checking your choice of C compiler and flags for coherency..." !>&4
1630 $!: compute shared library extension
1631 $!: Looking for optional libraries
1632 $!: see if nm is to be used to determine whether a symbol is defined or not
1633 $!: get list of predefined functions in a handy place
1634 $!: see if we have sigaction
1635 $!: see whether socketshr exists
1636 $ IF (F$SEARCH(F$PARSE("SocketShr","Sys$Share:.Exe")).NES."")
1638 $ has_socketshr = "T"
1640 $ echo4 "Hmm... Looks like you have SOCKETSHR's Berkeley networking support."
1642 $ if (Dec_C_Version .ge. 50200000)
1644 $ Has_Dec_C_Sockets = "T"
1646 $ echo4 "Hmm... Looks like you've got Dec C's Berkeley networking support."
1648 $ ! Hey, we've got both. Default to Dec C, then, since it's better
1649 $ if ("''Has_socketshr'".eq."T") .or.("''has_dec_c_sockets'".eq."T")
1652 $ echo "You've got sockets available. Which socket stack do you want to"
1653 $ echo "build into perl?"
1654 $ if "''has_dec_c_sockets'".eqs."T"
1658 $ dflt = "SOCKETSHR"
1660 $ rp = "Choose socket stack (NONE"
1661 $ if "''has_socketshr'".eqs."T" THEN rp = rp + ",SOCKETSHR"
1662 $ if "''has_dec_c_sockets'".eqs."T" THEN rp = rp + ",DECC"
1663 $ rp = rp + ") [''dflt'] "
1665 $ IF "''ans'".eqs."" THEN ans = "''dflt'"
1666 $ has_dec_c_sockets = "F"
1667 $ has_socketshr = "F"
1668 $ ans = F$EDIT(ans,"TRIM,COMPRESS,LOWERCASE")
1669 $ IF ans.eqs."decc" then has_dec_c_sockets = "T"
1670 $ IF ans.eqs."socketshr" then has_socketshr = "T"
1674 $! Ask if they want to build with VMS_DEBUG perl
1675 $ echo "Perl can be built to run under the VMS debugger."
1676 $ echo "You should only select this option if you are debugging"
1677 $ echo "perl itself. This can be a useful feature if you are "
1678 $ echo "embedding perl in a program."
1681 $ rp = "Build a VMS-DEBUG version of Perl? [''dflt'] "
1683 $ if ans.eqs."" then ans = dflt
1684 $ if (f$extract(0, 1, "''ans'").eqs."Y").or.(f$extract(0, 1, "''ans'").eqs."y")
1686 $ use_vmsdebug_perl = "Y"
1687 $ macros = macros + """__DEBUG__=1"","
1689 $ use_vmsdebug_perl = "N"
1692 $! Ask if they want to build with MULTIPLICITY
1693 $ echo "The perl interpreter engine can be built in a way that makes it
1694 $ echo "possible for a program that embeds perl into it (and yep, you can
1695 $ echo "do that--it's pretty keen) to have multiple perl interpreters active
1696 $ echo "at once. There is some performance overhead, however, so you
1697 $ echo "probably don't want to choose this unless you're going to be doing
1698 $ echo "funky perl embedding."
1701 $ rp = "Build with MULTIPLICITY? [''dflt'] "
1703 $ if ans.eqs."" then ans = dflt
1704 $ if (f$extract(0, 1, "''ans'").eqs."Y").or.(f$extract(0, 1, "''ans'").eqs."y")
1706 $ use_multiplicity="Y"
1708 $ use_multiplicity="N"
1710 $! Ask about threads, if appropriate
1711 $ if (Using_Dec_C.eqs."Yes")
1713 $ echo "This version of Perl can be built with threads. While really nifty,
1714 $ echo "they are a beta feature, and there is a speed penalty for perl
1715 $ echo "programs if you build with threads *even if you don't use them*
1718 $ rp = "Build with threads? [''dflt'] "
1720 $ if ans.eqs."" then ans = dflt
1721 $ if (f$extract(0, 1, "''ans'").eqs."Y").or.(f$extract(0, 1, "''ans'").eqs."y")
1724 $ ! Are they on VMS 7.1 on an alpha?
1725 $ if (Archname.eqs."VMS_AXP").and.("''f$extract(1,3, f$getsyi(""version""))'".ges."7.1")
1728 $ echo "Threaded perl can be linked to use multiple kernel threads
1729 $ echo "and system upcalls on VMS 7.1+ on Alpha systems. This feature
1730 $ echo "allows multiple threads to execute simultaneously on an SMP
1731 $ echo "system as well as preventing a single thread from blocking
1732 $ echo "all the threads in a program, even on a single-processor
1733 $ echo "machine. Unfortunately this feature isn't safe on an
1734 $ echo "unpatched 7.1 system. (Several OS patches were required when
1735 $ echo "this procedure was written)
1738 $ rp = "Enable multiple kernel threads and upcalls? [''dflt'] "
1740 $ if ans.eqs."" then ans="''dflt'"
1741 $ if f$extract(0, 1, f$edit(ans,"TRIM,COMPRESS,UPCASE")).eqs."Y"
1743 $ Thread_Live_Dangerously = "MT=MT=1"
1749 $! Ask whether they want to use secure logical translation when tainting
1751 $ echo "As Perl starts up, it checks several logical names, such as"
1752 $ echo "PERL5LIB and PERL_ENV_TABLES, which allow you to modify aspects"
1753 $ echo "of its behavior. For additional security, you may limit this"
1754 $ echo "process to executive- and kernel-mode translation when tainting"
1755 $ echo "is enabled. In this case, logical names normally skipped when"
1756 $ echo "tainting is enabled (e.g. PERL5OPTS) are translated as well."
1757 $ echo "If you do not choose to do this, the usual order of access modes"
1758 $ echo "is used for logical name translation."
1760 $ echo "This restriction does not apply to the %ENV hash or to implicit"
1761 $ echo "logical name translation during parsing of file specifications;"
1762 $ echo "these always use the normal sequence of access modes for logical"
1763 $ echo "name translation."
1766 $ rp = "Use secure logical name translation? [''dflt'] "
1768 $ if ans.eqs."" then ans="''dflt'"
1769 $ d_secintgenv = f$extract(0, 1, f$edit(ans,"TRIM,COMPRESS,UPCASE"))
1771 $! Ask whether they want to default filetypes
1773 $ echo "When you pass the name of a program to Perl on the command line,"
1774 $ echo "it generally doesn't supply any defaults unless the -S command"
1775 $ echo "line switch is specified. In keeping with the VMS tradition of"
1776 $ echo "default file types, however, you can configure Perl to try default"
1777 $ echo "file types of nothing, .pl, and .com, in that order (e.g. typing"
1778 $ echo """$ perl foo"" would cause Perl to look for foo., then foo.pl, and"
1779 $ echo "finally foo.com)."
1782 $ rp = "Always use default file types? [''dflt'] "
1784 $ if ans.eqs."" then ans="''dflt'"
1785 $ d_alwdeftype = f$extract(0, 1, f$edit(ans,"TRIM,COMPRESS,UPCASE"))
1787 $! Ask if they want to use perl's memory allocator
1789 $ echo "Perl has a built-in memory allocator that's tuned for perl's
1790 $ echo "normal memory usage. It's oftentimes better than the standard
1791 $ echo "system memory allocator. It also has the advantage of providing
1792 $ echo "memory allocation statistics, if you choose to enable them.
1795 $ rp = "Build with perl's memory allocator? [''dflt'] "
1797 $ if ans.eqs."" then ans="''dflt'"
1798 $ mymalloc = f$extract(0, 1, f$edit(ans,"TRIM,COMPRESS,UPCASE"))
1799 $ if mymalloc.eqs."Y"
1801 $ if use_debugging_perl.eqs."Y"
1804 $ echo "Perl can keep statistics on memory usage if you choose to use
1805 $ echo "them. This is useful for debugging, but does have some
1806 $ echo "performance overhead.
1809 $ rp = "Do you want the debugging memory allocator? [''dflt'] "
1811 $ if ans.eqs."" then ans="''dflt'"
1812 $ use_debugmalloc = f$extract(0, 1, f$edit(ans, "TRIM,COMPRESS,UPCASE"))
1814 $ ! Check which memory allocator we want
1816 $ echo "There are currently three different memory allocators: the
1817 $ echo "default (which is a pretty good general-purpose memory manager),
1818 $ echo "the TWO_POT allocator (which is optimized to save memory for
1819 $ echo "larger allocations), and PACK_MALLOC (which is optimized to save
1820 $ echo "memory for smaller allocations). They're all good, but if your
1821 $ echo "usage tends towards larger chunks use TWO_POT, otherwise use
1822 $ echo "PACK_MALLOC."
1825 $ rp = "Memory allocator (DEFAULT, TWO_POT, PACK_MALLOC) [''dflt'] "
1827 $ if ans.eqs."" then ans = "''dflt'"
1828 $ if ans.eqs."TWO_POT" then use_two_pot_malloc = "Y"
1829 $ if ans.eqs."PACK_MALLOC" then use_pack_malloc = "Y"
1832 $! Ask for their default list of extensions to build
1834 $ echo "It's time to specify which modules you want to build into
1835 $ echo "perl. Most of these are standard and should be chosen, though
1836 $ echo "you might, for example, want to build GDBM_File instead of
1837 $ echo "SDBM_File if you have the GDBM library built on your machine
1839 $ echo "Which modules do you want to build into perl?"
1840 $ dflt = "Fcntl Errno IO Opcode Data::Dumper attrs re VMS::Stdio VMS::DCLsym B SDBM_File"
1841 $ if Using_Dec_C.eqs."Yes"
1843 $ dflt = dflt + " POSIX"
1844 $ if Use_Threads.eqs."T"
1846 $ dflt = dflt + " Thread"
1851 $ if ans.eqs."" then ans = "''dflt'"
1852 $ extensions = "''ans'"
1854 $! %Config-I-VMS, determine build/make utility here (make gmake mmk mms)
1856 $ echo "%Config-I-VMS, Checking your ""make"" utilities..."
1857 $! If the 'build' that you use is not here add it and it's test
1858 $! switch to the _END_ of these strings (and increment max_build)
1859 $! (e.g. builders = builders + "/FOOMAKE"
1860 $! probers = probers + " -fooVersionSwitch"
1861 $! ) & please let me know about it.
1862 $ builders = "IMAKE/GNUMAKE/MGMAKE/GMAKE/MAKE/MMS/MMK"
1863 $ probers = "-f Makefile. -v!-f Makefile. -v!-f Makefile. -v!-f Makefile. -v!-f Makefile. -v!/IDENT!/IDENT"
1869 $ OPEN/WRITE/ERROR=Open_error CONFIG Makefile.
1870 $ WRITE CONFIG "dont_make_anything_yet:"
1871 $ WRITE CONFIG F$FAO("!_")
1874 $ messages = F$ENVIRONMENT("MESSAGE")
1876 $ build = F$ELEMENT(n,"/",builders)
1877 $ probe = F$ELEMENT(n,"!",probers)
1878 $ echo "Testing whether you have ''build' on your system..."
1879 $ SET NOON !sorry :-(
1880 $ ON CONTROL_Y THEN GOTO Reenable_messages_build !sorry :-(
1881 $ SET MESSAGE/NOFAC/NOSEV/NOIDENT/NOTEXT !sorry :-(
1883 $ IF ($SEVERITY .EQ. 1)
1886 $ IF (build .EQS. orig_dflt)
1888 $ default_set = "TRUE"
1891 $ ok_builders = ok_builders + " " + build
1892 $ IF (.NOT. default_set) THEN dflt = build
1896 $Reenable_messages_build: !hope you made it here :-)
1897 $ SET MESSAGE 'messages' !hope you made it here :-)
1898 $ SET ON !hope you made it here :-)
1900 $ IF (n .LT. max_build) THEN GOTO Build_probe
1903 $ IF (ok_builders .NES. "")
1905 $ echo "Here is the list of builders you can apparently use:"
1906 $ echo "(",ok_builders," )"
1907 $ rp = "Which """"make"""" utility do you wish to use [''dflt']? "
1909 $ ans = F$EDIT(ans,"TRIM, COMPRESS")
1910 $ ans = F$EXTRACT(0,F$LOCATE(" ",ans),ans) !throw out "-f Makefile." here
1918 %Config-E-VMS, ERROR:
1919 Well this looks pretty serious. Perl5 cannot be compiled without a "make"
1920 utility of some sort and after checking my "builders" list I cannot find
1921 the symbol or command you use on your system to compile programs.
1923 $ READ SYS$COMMAND/PROMPT="%Config-I-VMS, Which ""MMS"" do you use? " ans
1924 $ ans = F$EDIT(ans,"TRIM, COMPRESS")
1925 $ ans = F$EXTRACT(0,F$LOCATE(" ",ans),ans) !throw out "-f Makefile." here
1928 $ echo "I don't know where 'make' is, and my life depends on it."
1929 $ echo "Go find a make program or fix your DCL$PATH setting!"
1930 $ echo "ABORTING..."
1931 $ SET DEFAULT 'vms_default_directory_name' !be kind rewind
1933 $ EXIT 2 !$STATUS = "%X00000002" (error)
1939 $ DELETE/NOLOG Makefile.;
1944 There seems to be trouble. I just tried to create a file in
1945 $ echo4 'F$ENVIRONMENT("DEFAULT")'
1947 but was unsuccessful. I am stopping now. Please check that directories'
1948 PROTECTION bits. I will leave you in the directory where you started
1950 $ echo4 "ABORTING..."
1956 $! echo " Very well I will proceed with ""''build'"""
1957 $ make = F$EDIT(build,"UPCASE")
1959 $!: locate the preferred pager for this system
1960 $!pagers = "most|more|less|type/page"
1961 $!rp='What pager is used on your system?'
1963 $! update [.vms]config.vms here
1965 $! update makefile here
1966 $! echo4 "Updating makefile..."
1968 $ IF (make .EQS. "MMS").OR.(make .EQS. "MMK")
1970 $ makefile = "" !wrt MANIFEST dir
1971 $ UUmakefile = "DESCRIP.MMS" !wrt CWD dir
1972 $ DEFmakefile = "DESCRIP.MMS" !wrt DEF dir (?)
1974 $ makefile = " -f [.VMS]Makefile." !wrt MANIFEST dir
1975 $ UUmakefile = "[-.VMS]Makefile." !wrt CWD dir
1976 $ DEFmakefile = "[-.VMS]Makefile." !wrt DEF dir (?)
1981 $ tmp = F$LENGTH(macros)
1982 $ macros = F$EXTRACT(0,(tmp-1),macros) !miss trailing comma
1983 $ macros = "/macro=(" + macros + ")"
1986 $! Invoke the subconfig piece
1989 $ echo4 "Checking the C run-time library"
1990 $ dflt = F$ENVIRONMENT("DEFAULT")
1991 $ SET DEFAULT [-.vms]
1995 $! %Config-I-VMS, write perl_setup.com here
1998 $ echo4 "%Config-I-VMS, The perl_setup.com file is now being written..."
1999 $ file_2_find = "[-.vms]perl_setup.com"
2000 $ OPEN/WRITE CONFIG 'file_2_find'
2002 $ WRITE CONFIG "$! Perl_Setup.com ''cf_time'"
2003 $ IF cf_email.NES.perladmin
2005 $ WRITE CONFIG "$! perl configured by ''cf_email'"
2007 $ WRITE CONFIG "$! This perl configured & administered by ''perladmin'"
2010 $ prefix = prefix - "000000."
2011 $ IF F$LOCATE(".]",prefix) .EQ. F$LENGTH(prefix) THEN -
2012 prefix = prefix - "]" + ".]"
2013 $ WRITE CONFIG "$ define/translation=concealed Perl_Root ''prefix'"
2014 $ write config "$ ext = "".exe"""
2015 $ if sharedperl .eqs. "Y"
2017 $ write config "$ if f$getsyi(""ARCH_NAME"") .nes. ""VAX"" then ext = "".AXE"""
2019 $ IF use_vmsdebug_perl .eqs. "Y"
2021 $ WRITE CONFIG "$ dbgperl :== $Perl_Root:[000000]dbgPerl'ext'"
2022 $ WRITE CONFIG "$ perl :== $Perl_Root:[000000]ndbgPerl'ext'"
2023 $ WRITE CONFIG "$ define dbgPerlShr Perl_Root:[000000]dbgPerlShr'ext'"
2025 $ WRITE CONFIG "$ perl :== $Perl_Root:[000000]Perl'ext'"
2026 $ WRITE CONFIG "$ define PerlShr Perl_Root:[000000]PerlShr'ext'"
2031 $ WRITE CONFIG "$ define SYS$TIMEZONE_DIFFERENTIAL ''tzd'"
2032 $ ELSE !leave in but commented out (in case setting was from perl :-)
2033 $ WRITE CONFIG "$! define SYS$TIMEZONE_DIFFERENTIAL ''tzd'"
2036 $ WRITE CONFIG "$! Symbols for commonly used scripts:"
2038 $ WRITE CONFIG "$ Perldoc == ""'"+"'Perl' Perl_Root:[lib.pod]Perldoc.com -t"""
2042 $ echo "%Config-I-VMS, The file can be found at:"
2043 $ echo4 "-Config-I-VMS, ''F$SEARCH(file_2_find)'"
2044 $ echo "-Config-I-VMS, Add that file (or an @ call to it) to your [SY]LOGIN.COM"
2045 $ echo "-Config-I-VMS, when you are satisfied with a successful compilation,"
2046 $ echo "-Config-I-VMS, testing, and installation of your perl."
2049 $!figure out where we "are" by parsing 'vms_default_directory_name'
2051 $ set_def_command = ""
2052 $ dflt = F$ENVIRONMENT("DEFAULT") - ".UU]"
2053 $ tmp = vms_default_directory_name - dflt - "]"
2055 $ IF tmp .EQS. "" THEN GOTO Beyond_set_def_loop
2057 $ tmp1 = F$ELEMENT(i,".",tmp)
2058 $ IF tmp1 .EQS. "." THEN GOTO Beyond_set_def_loop
2060 $ THEN set_def_command = "set default [-"
2061 $ ELSE set_def_command = set_def_command + "-"
2065 $Beyond_set_def_loop:
2066 $ IF set_def_command.NES.""
2068 $ set_def_command = set_def_command - "-" + "]"
2070 $ echo4 "In order to build ''package' you must now issue the commands:"
2072 $ echo4 " ''set_def_command'"
2075 $ echo4 "In order to build ''package' you must now issue the command:"
2078 $ echo4 " ''make'''makefile'", macros
2084 $ DEASSIGN SYS$OUTPUT
2085 $! DEASSIGN SYS$ERROR
2087 $ IF F$GETJPI("","FILCNT").NE.vms_filcnt THEN CLOSE CONFIG
2088 $ IF F$GETJPI("","FILCNT").NE.vms_filcnt
2089 $ THEN WRITE SYS$ERROR "%Config-W-VMS, WARNING: There is a file still open"
2091 $ dflt = F$ENVIRONMENT("DEFAULT")
2092 $ IF F$LOCATE("UU]",dflt).EQS.(F$LENGTH(dflt)-3)
2094 $ IF ( F$SEARCH("[]*.*").NES."" ) THEN DELETE/NOLOG/NOCONFIRM []*.*;*
2096 $ SET PROTECTION=(SYSTEM:RWED,OWNER:RWED) UU.DIR
2097 $ DELETE/NOLOG/NOCONFIRM UU.DIR;
2099 $ SET DEFAULT 'vms_default_directory_name' !be kind rewind
2102 $!: End of Configure