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"
45 $ C_Compiler_Replace = "CC="
46 $ Thread_Live_Dangerously = "MT="
47 $ use_two_pot_malloc = "N"
48 $ use_pack_malloc = "N"
49 $ use_debugmalloc = "N"
51 $ use_multiplicity = "N"
52 $ vms_default_directory_name = F$ENVIRONMENT("DEFAULT")
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]
56 $ vms_filcnt = F$GETJPI ("","FILCNT")
58 $!: compute my invocation name
59 $ me = F$ENVIRONMENT("PROCEDURE")
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"
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
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
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
96 $!: full support for void wanted by default !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
113 $!: set up default values
132 $ THEN !one or more switches was thrown
136 $ IF (P'i'.NES."") THEN bang = bang + 1
138 $ IF (i.LT.9) THEN GOTO Param_loop !DCL allows P1..P8
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:
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")
152 $ gotopt = "t" !"rue"
154 $ gotshortopt = "t" !"rue"
156 $ IF (F$EXTRACT(0,1,P'i') .EQS. "e")
163 $ IF (F$EXTRACT(0,1,P'i') .EQS. "f") !"-f")
167 $ IF (F$SEARCH(config_sh).NES."")
169 $ test = F$FILE_ATTRIBUTES(config_sh,"PRO")
170 $ IF (F$LOCATE("R",test).NE.F$LENGTH(test))
172 $ CONTINUE !at this point check UIC && if test allows...
175 $ echo "''me': cannot read config file ''config_sh'."
179 $ echo "''me': cannot read config file ''config_sh'."
184 $ IF (F$EXTRACT(0,1,P'i') .EQS. "h")
191 $ IF (F$EXTRACT(0,1,P'i') .EQS. "m")
198 $ IF (F$EXTRACT(0,1,P'i') .EQS. "r")
205 $ IF (F$EXTRACT(0,1,P'i') .EQS. "s")
212 $ IF (F$EXTRACT(0,1,P'i') .EQS. "E") !"-E")
217 $ IF (F$EXTRACT(0,1,P'i') .EQS. "K") !"-K")
224 $ IF (F$EXTRACT(0,1,P'i') .EQS. "O")
231 $ IF (F$EXTRACT(0,1,P'i') .EQS. "S") !"-S")
233 $ extractsh = "true" !VMS?
238 $ IF (F$EXTRACT(0,1,P'i') .EQS. "D") !"-D")
241 $!Hmm.. this part needs work
243 $ IF (F$LOCATE("=",P'i') .EQ. F$LENGTH(P'i'))
247 $ IF (F$LOCATE("=",P'i') .EQ. (F$LENGTH(P'i') - 1))
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'
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')'
258 $ ECHO "P''i' =>",P'i',"<=" !Diag
261 $ IF (F$EXTRACT(0,1,P'i') .EQS. "U") !"-U")
264 $ IF (F$LOCATE("=",P'i') .EQ. F$LENGTH(P'i'))
268 $ IF (F$LOCATE("=",P'i') .LT. (F$LENGTH(P'i') - 1))
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'
277 $ ECHO "P''i' =>",P'i',"<=" !Diag
280 $ IF (F$EXTRACT(0,1,P'i') .EQS. "V")
282 $ me = F$PARSE(me,,,"NAME") + F$PARSE(me,,,"TYPE")
283 $ echo "''me' generated by an unknown version of EDT."
289 $ echo "''me': unknown option ",P'i'
292 $ IF (F$LENGTH(P'i').GT.0).AND.(gotshortopt) THEN i = i - 1 !clustered switch
294 $ IF (i .LT. (bang + 1)) THEN GOTO Opt_loop
296 $ ENDIF ! (P1 .NES. "")
300 $ me = F$PARSE(me,,,"DIRECTORY")+ F$PARSE(me,,,"NAME")
301 $ echo "Usage: @''me' [-dehmrEKOSV] [-fconfig.sh] [-Dsymbol] [-Dsymbol=value]"
302 $ echo " [-Usymbol] [-Usymbol=]"
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).
308 "-m" : skip the MANIFEST check to see that all files are present
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
328 $ EXIT 3 ! $STATUS = "%X00000003" (informational)
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'
346 $ echo4 = "write SYS$OUTPUT "
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 -
357 $!: Eunice requires " " instead of "", can you believe it
360 $ echo "Beginning of configuration questions for ''package'."
363 $!: Some greps do not return status, grrr.
364 $ contains = "SEARCH"
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-->*"
371 $!: Now test for existence of everything in MANIFEST
373 $ echo4 "First let's make sure your kit is complete. Checking..."
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...]
380 $ manifestfound = F$SEARCH(file_2_find)
381 $ IF (manifestfound .EQS. "")
383 $ IF F$PARSE(F$ENVIRONMENT("DEFAULT"),,,"DIRECTORY",).NES."[000000]"
386 $ GOTO Research_manifest
389 $ echo "There is no MANIFEST file. I hope your kit is complete !"
391 $ GOTO Beyond_manifest
394 $! MANIFEST. has been found and we have set def'ed there -
395 $! time to bail out before it's too late.
396 $ tmp = f$extract(1,3,f$edit(f$getsyi("VERSION"),"TRIM,COLLAPSE"))
397 $ IF tmp .GES. "7.2" THEN GOTO Beyond_depth_check
398 $ IF (F$ELEMENT(max_allowed_dir_depth,".",F$ENVIRONMENT("Default")).nes.".")
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
408 $ EXIT !2 !$STATUS = "%X00000002" (error)
412 $! after finding MANIFEST let's create (but not yet enter) the UU subdirectory
414 $ IF (manifestfound .NES. "")
416 $ IF ( F$SEARCH("UU.DIR").EQS."" )
418 $ CREATE/DIRECTORY [.UU]
420 $ IF ( F$SEARCH("[.UU]*.*").NES."" ) THEN DELETE/NOLOG [.UU]*.*;*
422 $!: Configure runs within the UU subdirectory
425 $! a little redundancy never hurt anybody?
426 $ file_2_find = "[-]" + file_2_find
427 $ manifestfound = F$SEARCH(file_2_find)
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 :-)
434 $ echo "Skipping MANIFEST check as requested"
437 $ OPEN/READ CONFIG 'manifestfound'
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)
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)
455 $ file_2_find = ante + "." + (post - "/")
456 $ GOTO Re_strip_line_manifest
458 $ file_2_find = ante + "]" + (post - "/")
460 $ file_2_find = "[-."+file_2_find
462 $ file_2_find = "[-]" + file_2_find
465 $ dirname = F$EXTRACT(0,F$LOCATE("]",file_2_find),file_2_find) + "]"
466 $ file_2_find = file_2_find - dirname
469 $ dot_ele = F$ELEMENT(dots,".",file_2_find)
470 $ IF dot_ele .EQS. "." THEN GOTO Eo_dot_loop
472 $ THEN basename = f$extract(0,f$locate(".",file_2_find),file_2_find) + "."
473 $ ELSE basename = basename + dot_ele + "_"
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
483 $ found = F$SEARCH(file_2_find)
484 $ IF (found .EQS. "")
486 $ WRITE MISSING file_2_find
487 $ IF ((F$LENGTH(miss_list)+F$LENGTH(file_2_find)).LT.250)
489 $ miss_list = miss_list + "," + file_2_find
492 $ GOTO Read_loop_manifest
497 $ ENDIF ! (manifestfound .NES. "")
499 $ IF (miss_list .NES. "")
501 $ echo "Some of the files not found include:"
504 $ IF ((miss_list .NES. "").OR.(manifestfound .EQS. ""))
508 THIS PACKAGE SEEMS TO BE INCOMPLETE.
510 You have the option of continuing the configuration process, despite the
511 distinct possibility that your kit is damaged, by typing 'y'es. If you
512 do, don't blame me if something goes wrong. I advise you to type 'n'o
513 and contact the author (sugalskd@ous.edu).
515 $ READ SYS$COMMAND/PROMPT="Continue? [n] " ans
518 $ echo4 "Continuing..."
520 $ echo4 "ABORTING..."
524 $ echo4 "Looks good..."
525 $ DELETE/NOLOG MISSING.;
526 $ ENDIF ! (miss_list .NES. "")
527 $ ENDIF ! (manifestfound .EQS. "") ELSE
529 $! after finding MANIFEST (see above)
530 $!: Configure runs within the UU subdirectory
532 $!: compute the number of columns on the terminal for proper question formatting
533 $! (sfn, will assume 80-ish)
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
547 $ READ SYS$COMMAND/PROMPT="''rp'" ans
550 $ READ SYS$COMMAND/PROMPT="''rp'" ans
557 $!: create .config dir to save info across Configure sessions
558 $ IF ( F$SEARCH("[-]CONFIG.DIR").EQS."" )
560 $ CREATE/DIRECTORY [-.CONFIG]
561 $ OPEN/WRITE CONFIG [-.CONFIG]README.
563 "This directory created by Configure to save information that should"
565 "persist across sessions."
568 "You may safely delete it if you wish."
572 $!: general instructions
575 $ user = F$EDIT(F$GETJPI("","USERNAME"),"TRIM,COLLAPSE")
576 $ IF .NOT.(F$SEARCH("[-.CONFIG]INSTRUCT.").EQS."")
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)
585 $ rp = "Would you like to see the instructions? [''dflt'] "
587 $ if .NOT.ans THEN needman=""
589 $ SET MESSAGE 'messages' !hope you made it here :-)
591 $ if (fastread.AND.silent.AND.(alldone.eqs."cont")) THEN needman=""
597 This installation shell script will examine your system and ask you questions
598 to determine how the perl5 package should be installed. If you get
599 stuck on a question, you may use a ^C or ^Y shell escape to STOP this
600 process, edit something, then restart this process as you just did.
601 Many of the questions will have default answers in square
602 brackets; typing carriage return will give you the default.
604 $ READ SYS$COMMAND/PROMPT="Type carriage return to continue " ans
607 In a hurry? You may run '@Configure -d'. This will bypass nearly all
608 the questions and use the computed defaults (or the previous answers provided
609 there was already a config.sh file). Type '@Configure -h' for a list of
612 $ READ SYS$COMMAND/PROMPT="Type carriage return to continue " ans
615 Much effort has been expended to ensure that this shell script will
616 run on any VMS system. If despite that it blows up on yours, your
617 best bet is to edit Configure.com and @ it again. Whatever problems
618 you have with Configure.com, let me (sugalskd@ous.edu) know how I blew
621 $!This installation script affects things in two ways:
623 $!1) it may do direct variable substitutions on some of the files included
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.
628 $!If you make a mistake on a question, there is no easy way to back up to it
631 $ READ SYS$COMMAND/PROMPT="Type carriage return to continue " ans
632 $ IF (F$SEARCH("[-.CONFIG]INSTRUCT.").EQS."")
634 $ OPEN/WRITE CONFIG [-.CONFIG]INSTRUCT.
638 $ ENDIF !(needman .EQS. "true")
640 $!: see if sh knows # comments !sfn
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!"
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
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/"
661 $ config_sh = F$ELEMENT(i,"/",config_sh_es)
663 $ IF (config_sh.NES."/").AND.(config_sh.NES."")
665 $ configshfound = F$SEARCH(config_sh)
666 $ IF (configshfound.NES."") THEN GOTO Config_sh_found
668 $ IF (i.LT.max) THEN GOTO Config_sh_look
669 $ IF (configshfound.EQS."") THEN GOTO Beyond_config_sh
672 $ echo "Fetching default answers from ''config_sh'..."
673 $!we actually do not have "hints/" for VMS
676 $!First time through, eh? I have some defaults handy for the following systems:
678 $! echo " ","VMS_VAX"
679 $! echo " ","VMS_AXP"
680 $! : Now look for a hint file osname_osvers, unless one has been
681 $! : specified already.
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".
687 $! READ SYS$COMMAND/PROMPT="Which of these apply, if any? " ans
691 $!: Restore computed paths !sfn
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)
697 $ IF (osname .NES. "VMS")
699 $ echo4 "Hmm.. I wonder what ''osname' is (?)"
702 %Config-E-VMS, ERROR:
704 Err, you do not appear to be running VMS!
705 This package is intended to Configure the building of Perl for VMS.
707 $ READ SYS$COMMAND/PROMPT="Continue anyway? [n] " ans
710 $ echo4 "Continuing..."
712 $ echo4 "ABORTING..."
713 $ SET DEFAULT 'vms_default_directory_name' !be kind rewind
715 $ EXIT 2 !$STATUS = "%X00000002" (error)
717 $ ELSE !we are on VMS huzzah!
719 $ THEN TYPE SYS$INPUT:
721 Configure uses the operating system name and version to set some defaults.
722 The default value is probably right if the name rings a bell. Otherwise,
723 since spelling matters for me, either accept the default or answer "none"
726 $ rp = "Operating system name? [''osname'] "
730 $ IF (ans.NES.osname) !.AND.knowitall
732 $ echo4 "I'll go with ''osname' anyway..."
735 $ ENDIF !(osname .NES./.EQS. "VMS")
737 $!: who configured the system
739 $ cf_by = F$EDIT(user,"LOWERCASE")
740 $! cf_time = F$CVTIME() !superceded by procedure below
741 $ osvers = F$GETSYI("VERSION")
743 $! Peter Prymmer has seen:
744 $! "SYS$TIMEZONE_DIFFERENTIAL" = "-46800" (sic)
745 $! "SYS$TIME_ZONE" = "EDT"
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"
755 $! Charles Bailey recommends (in ANU NEWS Doc Jan 1995):
757 $! "Multinet_Timezone"
758 $! "TCPware_Timezone"
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
765 $ MIN_TZO = -840 !units are minutes here
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")
776 $ months = "/Jan/Feb/Mar/Apr/May/Jun/Jul/Aug/Sep/Oct/Nov/Dec/"
780 $ mon = F$ELEMENT(i,"/",months)
781 $ IF i.LT.monn THEN GOTO Mon_loop
784 $ systz = F$TRNLNM("SYS$TIMEZONE_DIFFERENTIAL")
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
792 $ THEN signothetime = "+"
793 $ IF tzhour.EQ.0.AND.tzminrem.EQ.0
794 $ THEN direction = "on GMT/"
795 $ ELSE direction = "east of "
797 $ ELSE signothetime = "-"
798 $ tzhour = -1*tzhour !keeps !UL happy
799 $ direction = "west of "
802 $ echo "%Config-I-VMS,"
803 $ echo "According to the setting of your ""SYS$TIMEZONE_DIFFERENTIAL"" (= ''systz')"
806 $ tzspan = "''tzhour' hours & ''tzminrem' minutes"
808 $ tzspan = "''tzhour' hours"
811 $ echo "Your system is ''tzspan' ''direction'UTC in England."
812 $ rp = "%Config-I-VMS, (''systz') Is this UTC Time Zone Offset correct? [''dflt'] "
814 $ IF ans.OR.(ans.EQS."")
818 $ GOTO Beyond_TimeZone
822 $ echo4 "%Config-I-VMS,"
823 $ echo4 """SYS$TIMEZONE_DIFFERENTIAL"" does not appear to be DEFINEd on your system"
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."
832 $ rp = "Enter the Time Zone offset: [''dflt'] "
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
842 $ tzminrem = F$INTEGER(tzminrem)
843 $ IF F$EXTRACT(0,1,"''ans'") .EQS. "-" THEN tzminrem = tzminrem * -1
847 $ tzmins = tzhour*60 + tzminrem
848 $ tzd = F$STRING(tzmins*60)
853 $ tzhour = -1*tzhour !keeps !UL happy
856 $ IF (tzmins.GT.MAX_TZO).OR.(tzmins.LT.MIN_TZO)
859 $ echo "%Config-W-VMS-TIMERANGE, Response must be in the range -14:00 to 14:00."
864 $ tz = f$fao("UTC!AS!UL:!2ZL",signothetime,tzhour,tzminrem)
865 $ cf_time = "''wkday' ''mon' ''mday' ''hour':''min':''sec' ''tz' ''year'"
867 $!: determine the architecture name
868 $! genconfig.pl has either archname='VMS_AXP' or 'VMS_VAX'
870 $ IF (F$GETSYI("HW_MODEL") .LT. 1024)
872 $ archname = "VMS_VAX"
874 $ archname = "VMS_AXP"
876 $ rp = "What is your architecture name? [''archname'] "
880 $ ans = F$EDIT(ans,"COLLAPSE, UPCASE")
881 $ IF (ans.NES.archname) !.AND.knowitall
883 $ echo4 "I'll go with ''archname' anyway..."
886 $ IF (archname.EQS."VMS_AXP")
889 $ rp = "Are you sharing your PERL_ROOT with a VAX? [''dflt'] "
893 $ ans = F$EDIT(ans,"COLLAPSE, UPCASE")
900 $ macros = macros + """AXE=1"","
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
912 $ vms_skip_install = "true"
915 $ rp = "%Config-I-VMS, Do you wish to skip the """"where install"""" questions? [''dflt'] "
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)
923 $!: determine root of directory hierarchy where package will be installed.
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
934 $ THEN TYPE SYS$INPUT:
935 binaries. If you wish to have binaries under /bin but manual pages
936 under /usr/local/man, that's ok: you will be prompted separately
937 for each of the installation directories, the prefix being only used
941 $ rp = "Installation prefix to use? [ ''dflt' ] "
946 $ IF F$LOCATE(".]",ans) .EQ. F$LENGTH(ans) THEN prefix = prefix - "]" + ".]"
951 $!: set the prefixit variable, to compute a suitable default value
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.
957 $ THEN TYPE SYS$INPUT:
959 There are some auxiliary files for perl5 that need to be put into a
960 private library directory that is accessible by everyone.
962 $ dflt = prefix - ".]" + ".LIB]"
963 $ rp = "Pathname where the private library files will reside? "
964 $ rp = F$FAO("!AS!/!AS",rp,"[ ''dflt' ] ")
968 $ ELSE privlib = dflt
971 $ ENDIF !%Config-I-VMS, skip "where install" questions
973 $!: set the base revision
975 $!: get the patchlevel
977 $ echo4 "Getting the current patchlevel..." !>&4
978 $ patchlevel_h = F$SEARCH("[-]patchlevel.h")
979 $ IF (patchlevel_h.NES."")
981 $ got_patch = "false"
983 $ OPEN/READONLY CONFIG 'patchlevel_h'
985 $ READ/END_Of_File=Close_patch CONFIG line
986 $ IF ((F$LOCATE("#define PERL_VERSION",line).NE.F$LENGTH(line)).AND.(.NOT.got_patch))
988 $ line = F$EDIT(line,"COMPRESS, TRIM")
989 $ patchlevel = F$ELEMENT(2," ",line)
992 $ IF ((F$LOCATE("#define PERL_SUBVERSION",line).NE.F$LENGTH(line)).AND.(.NOT.got_sub))
994 $ line = F$EDIT(line,"COMPRESS, TRIM")
995 $ subversion = F$ELEMENT(2," ",line)
998 $ IF (.NOT.got_patch).OR.(.NOT.got_sub) THEN GOTO Patchlevel_h_loop
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)
1012 $ subversion = F$INTEGER(subversion)
1013 $ IF subversion.GT.0
1015 $ IF subversion.LT.10
1016 $ THEN subversion = "0" + F$STRING(subversion)
1017 $ ELSE subversion = F$STRING(subversion)
1019 $ ELSE subversion = ""
1022 $ version = F$EXTRACT(0,1,baserev) + "_" + patchlevel + subversion
1024 $ IF (.NOT.vms_skip_install)
1026 $!: set the prefixup variable, to restore leading tilda escape !sfn
1027 $!: set the prefixup variable, to restore leading tilde escape !sfn
1029 $!: determine where public architecture dependent libraries go
1033 $ echo "''package' contains architecture-dependent library files. If you are"
1036 $ THEN TYPE SYS$INPUT:
1037 sharing libraries in a heterogeneous environment, you might store
1038 these files in a separate location. Otherwise, you can just include
1039 them with the rest of the public library files.
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' ] ")
1046 $ THEN archlib = ans
1047 $ ELSE archlib = dflt
1050 $!: set up the script used to warn in case of inconsistency !sfn
1051 $!: function used to set $1 to $val !sfn
1053 $ ENDIF !%Config-I-VMS, skip "where install" questions
1054 $! This quotation from Configure has to be included on VMS:
1057 There is, however, a strange, musty smell in the air that reminds me of
1058 something...hmm...yes...I've got it...there's a VMS nearby, or I'm a Blit.
1060 $ IF (.NOT.vms_skip_install)
1062 $!: it so happens the Eunice I know will not run shell scripts in Unix format
1064 $!: see if setuid scripts can be secure !sfn
1065 $!: now see if they want to do setuid emulation !sfn
1067 $!: determine where site specific libraries go.
1069 $ THEN TYPE SYS$INPUT:
1071 The installation process will also create a directory for
1072 site-specific extensions and modules. Some users find it convenient
1073 to place all local files in this directory rather than in the main
1074 distribution directory.
1076 $ dflt = privlib - "]" + ".SITE_PERL]"
1077 $ rp = "Pathname for the site-specific library files? "
1078 $ rp = F$FAO("!AS!/!AS",rp,"[ ''dflt' ] ")
1081 $ THEN sitelib = ans
1082 $ ELSE sitelib = dflt
1085 $!: determine where site specific architecture-dependent libraries go.
1087 $ THEN TYPE SYS$INPUT:
1089 The installation process will also create a directory for
1090 architecture-dependent site-specific extensions and modules.
1092 $ dflt = sitelib - "]" + "." + archname + "]"
1093 $ rp = "Pathname for the site-specific architecture-dependent library files? "
1094 $ rp = F$FAO("!AS!/!AS",rp,"[ ''dflt' ] ")
1097 $ THEN sitearch = ans
1098 $ ELSE sitearch = dflt
1101 $!: determine where old public architecture dependent libraries might be
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' ] ")
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
1120 $ ENDIF !%Config-I-VMS, skip "where install" questions
1122 $!: see if we need a special compiler
1123 $! cc_list = "cc/vaxc|cc/decc|gcc" !%Config-I-VMS, compiler symbols/commands
1127 $ vms_cc_available = ""
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);"
1142 $ DEFINE SYS$ERROR _NLA0:
1143 $ DEFINE SYS$OUTPUT _NLA0:
1144 $ cc/NoObj/list=ccvms.lis ccvms.c
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
1151 $ IF tmp.NE.%X10B90001
1153 $ IF tmp.NE.%X10000001
1155 $ nocc = "t" !%X10000001 is return from gcc
1156 $ GOTO Gcc_initial_check
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)
1165 $ vms_cc_dflt = "/vaxc"
1166 $ vms_cc_available = vms_cc_available + "cc/vaxc "
1169 $ echo "%Config-I-VMS, Will try cc/decc..."
1171 $ DEFINE SYS$ERROR _NLA0:
1172 $ DEFINE SYS$OUTPUT _NLA0:
1174 $ cc/decc/NoObj/list=ccvms.lis ccvms.c
1176 $ DEASSIGN SYS$OUTPUT
1177 $ DEASSIGN SYS$ERROR
1179 $ IF (silent) THEN GOSUB Shut_up
1180 $ IF tmp.NE.%X10B90001
1182 $ echo "%Config-I-VMS, Apparently you don't have that one."
1185 $ echo "%Config-I-VMS, You also have: ''line' ''archsufx' ''F$GETSYI("VERSION")'"
1186 $ vms_cc_available = vms_cc_available + "cc/decc "
1189 $ IF F$LOCATE("DEC",line).NE.F$LENGTH(line)
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:
1197 $ cc/vaxc/NoObj/list=ccvms.lis ccvms.c
1199 $ DEASSIGN SYS$OUTPUT
1200 $ DEASSIGN SYS$ERROR
1202 $ IF (silent) THEN GOSUB Shut_up
1203 $ IF tmp.NE.%X10B90001
1205 $ echo "%Config-I-VMS, Apparently you don't have that one."
1208 $ echo "%Config-I-VMS, You also have: ''line' ''archsufx' ''F$GETSYI("VERSION")'"
1209 $ vms_cc_available = vms_cc_available + "cc/vaxc "
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:
1221 $ DEASSIGN SYS$OUTPUT
1222 $ DEASSIGN SYS$ERROR
1223 $ IF (silent) THEN GOSUB Shut_up
1225 $ IF (tmp.NE.%X10000001).and.(tmp.ne.%X00030001)
1227 $ echo "%Config-I-VMS, Symbol ""''gcc_symbol'"" is not defined. I guess you don't have it."
1230 $ OPEN/READ CONFIG gccvers.lis
1232 $ READ/END_OF_FILE=GCC_List_End CONFIG line
1233 $ GOTO GCC_List_Read
1237 $ vms_cc_available = vms_cc_available + "''gcc_symbol' "
1238 $ DELETE/NOLOG/NOCONFIRM gccvers.lis;
1241 $ DELETE/NOLOG/NOCONFIRM ccvms.*;
1243 $!: see if we need a special compiler
1245 $ echo "%Config-I-VMS, available compiler(s):"
1246 $ echo "( ''vms_cc_available')"
1249 $ dflt = "cc''vms_cc_dflt'" !-> "cc" in case first compile went OK
1253 $ rp = "Use which C compiler? [''dflt'] "
1257 $ ans = F$EDIT(ans,"TRIM, COMPRESS, LOWERCASE")
1259 $ IF F$LOCATE("dec",ans).NE.F$LENGTH(ans)
1262 $ Using_Dec_C = "Yes"
1263 $ C_COMPILER_Replace = "CC=cc=''Mcc'"
1265 $ IF F$LOCATE("vax",ans).NE.F$LENGTH(ans)
1268 $ Using_Vax_C = "Yes"
1269 $ C_COMPILER_Replace = "CC=cc=''Mcc'"
1273 $ IF F$LOCATE("dec",dflt).NE.F$LENGTH(dflt)
1275 $ C_COMPILER_Replace = "CC=cc=''Mcc'"
1277 $ Using_Dec_C = "Yes"
1278 $ IF F$LOCATE("vax",dflt).NE.F$LENGTH(dflt)
1280 $ C_COMPILER_Replace = "CC=cc=''Mcc'"
1284 $ IF Mcc .EQS. "cc/decc"
1286 $ Using_Dec_C = "Yes"
1287 $ C_COMPILER_Replace = "CC=cc=''Mcc'"
1292 $ IF Mcc .EQS. "cc/decc"
1294 $ Using_Dec_C = "Yes"
1295 $ C_COMPILER_Replace = "CC=cc=''Mcc'"
1297 $ IF Mcc .EQS. "cc/vaxc"
1299 $ Using_Vax_C = "Yes"
1300 $ C_COMPILER_Replace = "CC=cc=''Mcc'"
1302 $ IF Mcc .EQS. "gcc"
1304 $ Using_Gnu_C = "Yes"
1305 $ C_COMPILER_Replace = "CC=cc=''Mcc'"
1308 $Decc_Version_check:
1309 $ IF "''Using_Dec_C'".EQS."Yes"
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);"
1327 $ DEFINE SYS$ERROR _NLA0:
1328 $ DEFINE SYS$OUTPUT _NLA0:
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:
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
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
1354 $! DELETE/NOLOG/NOCONFIRM deccvers.*;
1355 $ echo "You are using Dec C ''line'"
1356 $ Dec_C_Version = line
1359 $ IF "''Using_Vax_C'".EQS."Yes"
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);"
1370 $ DEFINE SYS$ERROR _NLA0:
1371 $ DEFINE SYS$OUTPUT _NLA0:
1373 $ cc/vaxc/NoObj vaxcchk.c
1375 $ DEASSIGN SYS$OUTPUT
1376 $ DEASSIGN SYS$ERROR
1378 $ IF (silent) THEN GOSUB Shut_up
1379 $ IF tmp.NE.%X10B90001
1386 $ DELETE/NOLOG/NOCONFIRM vaxcchk.*;
1389 $ if "''using_gnu_c'" .eqs. "Yes"
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. ""
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")
1402 $ IF gcclib_olb .EQS. ""
1403 $ THEN gcclib_olb = tmp
1404 $ ELSE gcclib_olb = gcclib_olb + "/lib," + tmp
1407 $ tmp = F$SEARCH("SYS$LIBRARY:VAXCRTL.OLB")
1410 $ IF gcclib_olb .EQS. ""
1411 $ THEN gcclib_olb = tmp
1412 $ ELSE gcclib_olb = gcclib_olb + "/lib," + tmp
1415 $ tmp = F$SEARCH("GNU_CC:[000000]crt0.obj")
1418 $ IF gcclib_olb .EQS. ""
1419 $ THEN gcclib_olb = tmp
1420 $ ELSE gcclib_olb = gcclib_olb + "/lib," + tmp
1423 $ IF gcclib_olb .EQS. vaxcrtl_olb THEN gcclib_olb = "" !goofy order of axplibs
1425 $ gcclib_olb = gcclib_olb + "/lib"
1427 $ IF gcclib_olb .NES. "" .AND. -
1428 (vaxcrtl_olb .NES. "" .OR. -
1429 vaxcrtl_exe .NES. "" )
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);"
1447 $ DEFINE SYS$ERROR _NLA0:
1448 $ DEFINE SYS$OUTPUT _NLA0:
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. ""
1458 $ IF F$LOCATE("VAXCRTL",gcclib_olb).NE.F$LENGTH(gcclib_olb)
1460 $ link gccvers.obj,'gcclib_olb',SYS$LIBRARY:VAXCRTL/Library
1463 $ link gccvers.obj,'gcclib_olb'
1467 $ OPEN/WRITE CONFIG GCCVERS.OPT
1468 $ WRITE CONFIG "SYS$SHARE:VAXCRTL/SHARE"
1470 $ link gccvers.obj,GCCVERS.OPT/OPT,'gcclib_olb'
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
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
1489 $ DELETE/NOLOG/NOCONFIRM gccvers.*;
1490 $ IF F$LOCATE("GNU C version ",line).NE.F$LENGTH(line)
1492 $ echo "You are not using GNU cc."
1495 $ echo "You are using GNU cc ''line'"
1496 $ Using_Gnu_C = "Yes"
1497 $ C_COMPILER_Replace = "CC=cc=''Mcc'"
1505 $ OPEN/READ CONFIG ccvms.lis
1507 $ IF (F$GETSYI("HW_MODEL") .LT. 1024)
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 "
1521 $ line = F$EDIT(line,"TRIM") !bit redundant but we're in no big hurry
1522 $ DELETE/NOLOG/NOCONFIRM ccvms.lis;
1526 $!: What should the include directory be ?
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'] "
1536 $!: see if we have to deal with yellow pages, now NIS.
1537 $!: now get the host name
1540 $ echo4 "Figuring out host name..." !>&4
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
1556 $ rp = "Your host name appears to be """"''myhostname'"""". Right? "
1558 $ IF (.not.ans).and.(ans.NES."")
1560 $ READ SYS$COMMAND/PROMPT= -
1561 "Please type the (one word) name of your host: " ans
1564 $!: translate upper to lower if necessary
1565 $ myhostname = F$EDIT(myhostname,"COLLAPSE")
1566 $ mylowhostname = F$EDIT(myhostname," LOWERCASE")
1567 $ IF mylowhostname.NES.myhostname
1569 $ echo "(Normalizing case in your host name)"
1570 $ myhostname = mylowhostname
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::"
1577 $ rp = "What is your domain name? [''mydomain'] "
1579 $ IF ans .nes. "" THEN mydomain = ans
1580 $!: translate upper to lower if necessary
1581 $ mydomain = F$EDIT(mydomain,"COLLAPSE")
1582 $ mylowdomain = F$EDIT(mydomain," LOWERCASE")
1583 $ IF mylowdomain.NES.mydomain
1585 $ echo "(Normalizing case in your domain name)"
1586 $ mydomain = mylowdomain
1589 $ myhostname = myhostname - mydomain
1590 $ echo "(Trimming domain name from host name--host name is now ''myhostname')"
1592 $ THEN TYPE SYS$INPUT:
1594 I need to get your e-mail address in Internet format if possible, i.e.
1595 something like user@host.domain. Please answer accurately since I have
1596 no easy means to double check it. The default value provided below
1597 is most probably close to the reality but may not be valid from outside
1598 your organization...
1600 $ dflt = "''cf_by@''myhostname'"+"''mydomain'"
1601 $ rp = "What is your e-mail address? [''dflt'] "
1604 $ THEN cf_email = ans
1605 $ ELSE cf_email = dflt
1609 $ THEN TYPE SYS$INPUT:
1611 If you or somebody else will be maintaining perl at your site, please
1612 fill in the correct e-mail address here so that they may be contacted
1613 if necessary. Currently, the "perlbug" program included with perl
1614 will send mail to this address in addition to perlbug@perl.com. You may
1615 enter "none" for no administrator.
1617 $ dflt = "''cf_email'"
1618 $ rp = "Perl administrator e-mail address [''dflt'] "
1621 $ THEN perladmin = ans
1622 $ ELSE perladmin = dflt
1625 $!: determine where public executable scripts go
1626 $!: determine perl absolute location
1627 $!: figure out how to guarantee perl startup
1629 $!: see how we invoke the C preprocessor
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.
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."")
1651 $ has_socketshr = "T"
1653 $ echo4 "Hmm... Looks like you have SOCKETSHR's Berkeley networking support."
1655 $ if (Dec_C_Version .ge. 50200000)
1657 $ Has_Dec_C_Sockets = "T"
1659 $ echo4 "Hmm... Looks like you've got Dec C's Berkeley networking support."
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")
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"
1671 $ dflt = "SOCKETSHR"
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'] "
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"
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."
1694 $ rp = "Build a VMS-DEBUG version of Perl? [''dflt'] "
1696 $ if ans.eqs."" then ans = dflt
1697 $ if (f$extract(0, 1, "''ans'").eqs."Y").or.(f$extract(0, 1, "''ans'").eqs."y")
1699 $ use_vmsdebug_perl = "Y"
1700 $ macros = macros + """__DEBUG__=1"","
1702 $ use_vmsdebug_perl = "N"
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."
1714 $ rp = "Build with MULTIPLICITY? [''dflt'] "
1716 $ if ans.eqs."" then ans = dflt
1717 $ if (f$extract(0, 1, "''ans'").eqs."Y").or.(f$extract(0, 1, "''ans'").eqs."y")
1719 $ use_multiplicity="Y"
1721 $ use_multiplicity="N"
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")
1727 $ echo "This version of perl has experimental support for building with
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)"
1734 $ rp = "Build with 64 bits? [''dflt'] "
1736 $ if ans.eqs."" then ans = dflt
1737 $ if (f$extract(0, 1, "''ans'").eqs."Y").or.(f$extract(0, 1, "''ans'").eqs."y")
1745 $! Ask about threads, if appropriate
1746 $ if (Using_Dec_C.eqs."Yes")
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*
1753 $ rp = "Build with threads? [''dflt'] "
1755 $ if ans.eqs."" then ans = dflt
1756 $ if (f$extract(0, 1, "''ans'").eqs."Y").or.(f$extract(0, 1, "''ans'").eqs."y")
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")
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)
1773 $ rp = "Enable multiple kernel threads and upcalls? [''dflt'] "
1775 $ if ans.eqs."" then ans="''dflt'"
1776 $ if f$extract(0, 1, f$edit(ans,"TRIM,COMPRESS,UPCASE")).eqs."Y"
1778 $ Thread_Live_Dangerously = "MT=MT=1"
1784 $! Ask whether they want to use secure logical translation when tainting
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."
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."
1801 $ rp = "Use secure logical name translation? [''dflt'] "
1803 $ if ans.eqs."" then ans="''dflt'"
1804 $ d_secintgenv = f$extract(0, 1, f$edit(ans,"TRIM,COMPRESS,UPCASE"))
1806 $! Ask whether they want to default filetypes
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)."
1817 $ rp = "Always use default file types? [''dflt'] "
1819 $ if ans.eqs."" then ans="''dflt'"
1820 $ d_alwdeftype = f$extract(0, 1, f$edit(ans,"TRIM,COMPRESS,UPCASE"))
1822 $! Ask if they want to use perl's memory allocator
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
1827 $ echo "memory allocation statistics, if you choose to enable them.
1830 $ rp = "Build with perl's memory allocator? [''dflt'] "
1832 $ if ans.eqs."" then ans="''dflt'"
1833 $ mymalloc = f$extract(0, 1, f$edit(ans,"TRIM,COMPRESS,UPCASE"))
1834 $ if mymalloc.eqs."Y"
1836 $ if use_debugging_perl.eqs."Y"
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.
1844 $ rp = "Do you want the debugging memory allocator? [''dflt'] "
1846 $ if ans.eqs."" then ans="''dflt'"
1847 $ use_debugmalloc = f$extract(0, 1, f$edit(ans, "TRIM,COMPRESS,UPCASE"))
1849 $ ! Check which memory allocator we want
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."
1860 $ rp = "Memory allocator (DEFAULT, TWO_POT, PACK_MALLOC) [''dflt'] "
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"
1867 $! Ask for their default list of extensions to build
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
1874 $ echo "Which modules do you want to build into perl?"
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"
1877 $ if Using_Dec_C.eqs."Yes"
1879 $ dflt = dflt + " POSIX"
1880 $ if Use_Threads.eqs."T"
1882 $ dflt = dflt + " Thread"
1887 $ if ans.eqs."" then ans = "''dflt'"
1888 $ extensions = "''ans'"
1890 $! %Config-I-VMS, determine build/make utility here (make gmake mmk mms)
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"
1905 $ OPEN/WRITE/ERROR=Open_error CONFIG Makefile.
1906 $ WRITE CONFIG "dont_make_anything_yet:"
1907 $ WRITE CONFIG F$FAO("!_")
1910 $ messages = F$ENVIRONMENT("MESSAGE")
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 :-(
1919 $ IF ($SEVERITY .EQ. 1)
1922 $ IF (build .EQS. orig_dflt)
1924 $ default_set = "TRUE"
1927 $ ok_builders = ok_builders + " " + build
1928 $ IF (.NOT. default_set) THEN dflt = build
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 :-)
1936 $ IF (n .LT. max_build) THEN GOTO Build_probe
1939 $ IF (ok_builders .NES. "")
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']? "
1945 $ ans = F$EDIT(ans,"TRIM, COMPRESS")
1946 $ ans = F$EXTRACT(0,F$LOCATE(" ",ans),ans) !throw out "-f Makefile." here
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.
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
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
1969 $ EXIT 2 !$STATUS = "%X00000002" (error)
1975 $ DELETE/NOLOG Makefile.;
1980 There seems to be trouble. I just tried to create a file in
1981 $ echo4 'F$ENVIRONMENT("DEFAULT")'
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
1986 $ echo4 "ABORTING..."
1992 $! echo " Very well I will proceed with ""''build'"""
1993 $ make = F$EDIT(build,"UPCASE")
1995 $!: locate the preferred pager for this system
1996 $!pagers = "most|more|less|type/page"
1997 $!rp='What pager is used on your system?'
1999 $! update [.vms]config.vms here
2001 $! update makefile here
2002 $! echo4 "Updating makefile..."
2004 $ IF (make .EQS. "MMS").OR.(make .EQS. "MMK")
2006 $ makefile = "" !wrt MANIFEST dir
2007 $ UUmakefile = "DESCRIP.MMS" !wrt CWD dir
2008 $ DEFmakefile = "DESCRIP.MMS" !wrt DEF dir (?)
2010 $ makefile = " -f [.VMS]Makefile." !wrt MANIFEST dir
2011 $ UUmakefile = "[-.VMS]Makefile." !wrt CWD dir
2012 $ DEFmakefile = "[-.VMS]Makefile." !wrt DEF dir (?)
2017 $ tmp = F$LENGTH(macros)
2018 $ macros = F$EXTRACT(0,(tmp-1),macros) !miss trailing comma
2019 $ macros = "/macro=(" + macros + ")"
2022 $! Invoke the subconfig piece
2025 $ echo4 "Checking the C run-time library"
2026 $ dflt = F$ENVIRONMENT("DEFAULT")
2027 $ SET DEFAULT [-.vms]
2031 $! Warn of dangerous logical names
2033 $Bad_logical: SUBROUTINE
2034 $ IF f$trnlnm(p1) .nes. ""
2036 $ IF f$search("config.msg") .nes. ""
2038 $ OPEN/APPEND CONFIG config.msg
2040 $ OPEN/WRITE CONFIG config.msg
2042 $ WRITE CONFIG "Logical name ''p1' found in environment as " + f$trnlnm(p1)
2043 $ WRITE CONFIG " deassign before building ''package'"
2047 $ ENDSUBROUTINE ! Bad_logical
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."
2057 $! %Config-I-VMS, write perl_setup.com here
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'
2064 $ WRITE CONFIG "$! Perl_Setup.com ''cf_time'"
2065 $ IF cf_email.NES.perladmin
2067 $ WRITE CONFIG "$! perl configured by ''cf_email'"
2069 $ WRITE CONFIG "$! This perl configured & administered by ''perladmin'"
2072 $ prefix = prefix - "000000."
2073 $ IF F$LOCATE(".]",prefix) .EQ. F$LENGTH(prefix) THEN -
2074 prefix = prefix - "]" + ".]"
2075 $ WRITE CONFIG "$ define/translation=concealed Perl_Root ''prefix'"
2076 $ write config "$ ext = "".exe"""
2077 $ if sharedperl .eqs. "Y"
2079 $ write config "$ if f$getsyi(""ARCH_NAME"") .nes. ""VAX"" then ext = "".AXE"""
2081 $ IF use_vmsdebug_perl .eqs. "Y"
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'"
2087 $ WRITE CONFIG "$ perl :== $Perl_Root:[000000]Perl'ext'"
2088 $ WRITE CONFIG "$ define PerlShr Perl_Root:[000000]PerlShr'ext'"
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'"
2098 $ WRITE CONFIG "$! Symbols for commonly used scripts:"
2100 $ WRITE CONFIG "$ Perldoc == ""'"+"'Perl' Perl_Root:[lib.pod]Perldoc.com -t"""
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."
2111 $!figure out where we "are" by parsing 'vms_default_directory_name'
2113 $ set_def_command = ""
2114 $ dflt = F$ENVIRONMENT("DEFAULT") - ".UU]"
2115 $ tmp = vms_default_directory_name - dflt - "]"
2117 $ IF tmp .EQS. "" THEN GOTO Beyond_set_def_loop
2119 $ tmp1 = F$ELEMENT(i,".",tmp)
2120 $ IF tmp1 .EQS. "." THEN GOTO Beyond_set_def_loop
2122 $ THEN set_def_command = "set default [-"
2123 $ ELSE set_def_command = set_def_command + "-"
2127 $Beyond_set_def_loop:
2128 $ IF set_def_command.NES.""
2130 $ set_def_command = set_def_command - "-" + "]"
2132 $ echo4 "In order to build ''package' you must now issue the commands:"
2134 $ echo4 " ''set_def_command'"
2137 $ echo4 "In order to build ''package' you must now issue the command:"
2140 $ echo4 " ''make'''makefile'", macros
2143 $ IF ( F$SEARCH("config.msg").NES."" )
2145 $ echo "Hmm. I also noted the following information while running:"
2148 $ SET PROTECTION=(SYSTEM:RWED,OWNER:RWED) config.msg
2149 $ DELETE/NOLOG/NOCONFIRM config.msg;
2155 $ DEASSIGN SYS$OUTPUT
2156 $! DEASSIGN SYS$ERROR
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"
2162 $ dflt = F$ENVIRONMENT("DEFAULT")
2163 $ IF F$LOCATE("UU]",dflt).EQS.(F$LENGTH(dflt)-3)
2165 $ IF ( F$SEARCH("[]*.*").NES."" ) THEN DELETE/NOLOG/NOCONFIRM []*.*;*
2167 $ SET PROTECTION=(SYSTEM:RWED,OWNER:RWED) UU.DIR
2168 $ DELETE/NOLOG/NOCONFIRM UU.DIR;
2170 $ SET DEFAULT 'vms_default_directory_name' !be kind rewind
2173 $!: End of Configure