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@perl.org
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
28 $! on non-VMS systems) 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"
52 $ use_multiplicity = "N"
53 $ vms_default_directory_name = F$ENVIRONMENT("DEFAULT")
54 $ max_allowed_dir_depth = 3 ! e.g. [A.B.PERL5_00n] not [A.B.C.PERL5_00n]
55 $! max_allowed_dir_depth = 2 ! e.g. [FOO.PERL5_00n] not [FOO.BAR.PERL5_00n]
57 $ vms_filcnt = F$GETJPI ("","FILCNT")
59 $!: compute my invocation name
60 $ me = F$ENVIRONMENT("PROCEDURE")
62 $! Many null statements (begin with colon ':') in the Bourne shell version of
63 $! this script serve as comments/placeholders. I have retained some of the ones
64 $! that will help you compare this .COM file to the sh version - as well as
65 $! leave placeholders for future improvements to this .COM file.
66 $! sfn = VMS "skipped for now"
68 $!: Proper PATH separator !sfn
69 $!: Proper PATH setting !sfn
70 $!: Sanity checks !sfn "Say '@''$me''"
71 $!: On HP-UX, large Configure scripts may exercise a bug in /bin/sh !sfn
72 $!: Configure runs within the UU subdirectory !->after find MANIFEST
73 $! <big long list of default values (mostly null)>
74 $!: We must find out about Eunice early !(?)
75 $!: list of known cpp symbols, sorted alphabetically !sfn
77 $!: default library list !sfn
78 $! <no hints files in use (yet?)>
79 $!: Extra object files, if any, needed on this platform. !sfn
80 $!: Possible local include directories to search. !sfn
81 $!: Set locincpth to "" in a hint file to defeat local include searches. !sfn
82 $!locincpth="/usr/local/include /opt/local/include /usr/gnu/include" !sfn
83 $!locincpth="$locincpth /opt/gnu/include /usr/GNU/include /opt/GNU/include"
84 $!: no include file wanted by default !sfn
86 $!: Possible local library directories to search. !sfn
87 $!loclibpth="/usr/local/lib /opt/local/lib /usr/gnu/lib" !sfn
88 $!loclibpth="$loclibpth /opt/gnu/lib /usr/GNU/lib /opt/GNU/lib" !sfn
89 $!: general looking path for locating libraries !sfn
90 $!glibpth="/lib/pa1.1 /usr/shlib /usr/lib/large /lib /usr/lib" !sfn
91 $!glibpth="$glibpth $xlibpth /lib/large /usr/lib/small /lib/small" !sfn
92 $!glibpth="$glibpth /usr/ccs/lib /usr/ucblib /usr/shlib" !sfn
93 $!: Private path used by Configure to find libraries. Its value !sfn
94 $!: is prepended to libpth. This variable takes care of special !sfn
95 $!: machines, like the mips. Usually, it should be empty. !sfn
97 $!: full support for void wanted by default !sfn
99 $!: List of libraries we want. !sfn
100 $!libswanted='net socket inet nsl nm ndbm gdbm dbm db malloc dl' !sfn
101 $!libswanted="$libswanted dld ld sun m c cposix posix ndir dir crypt" !sfn
102 $!libswanted="$libswanted ucb bsd BSD PW x" !sfn
103 $!: We probably want to search /usr/shlib before most other libraries. !sfn
104 $!: This is only used by the lib/ExtUtils/MakeMaker.pm routine extliblist. !sfn
105 $!glibpth=`echo " $glibpth " | sed -e 's! /usr/shlib ! !'` !sfn
106 $!glibpth="/usr/shlib $glibpth" !sfn
107 $!: Do not use vfork unless overridden by a hint file. !sfn
108 $!usevfork=false !sfn
109 $!: script used to extract .SH files with variable substitutions !sfn
110 $!: produce awk script to parse command line options !sfn
111 $!sfn (assume no sed awk) see below
112 $!: process the command line options
114 $!: set up default values
133 $ THEN !one or more switches was thrown
137 $ IF (P'i'.NES."") THEN bang = bang + 1
139 $ IF (i.LT.9) THEN GOTO Param_loop !DCL allows P1..P8
143 $ IF (F$EXTRACT(0,1,P'i') .EQS. "-") THEN P'i' = P'i' - "-"
144 $ IF (F$EXTRACT(0,1,P'i') .EQS. "/") THEN P'i' = P'i' - "/"
145 $Remove_quotation_mark:
147 $ IF F$LOCATE("""",P'i') .LT. F$LENGTH(P'i') THEN GOTO Remove_quotation_mark
148 $ gotopt = "f" !"alse"
149 $ gotshortopt = "f" !"alse"
150 $ IF (F$EXTRACT(0,1,P'i') .EQS. "d")
153 $ gotopt = "t" !"rue"
155 $ gotshortopt = "t" !"rue"
157 $ IF (F$EXTRACT(0,1,P'i') .EQS. "e")
164 $ IF (F$EXTRACT(0,1,P'i') .EQS. "f") !"-f")
168 $ IF (F$SEARCH(config_sh).NES."")
170 $ test = F$FILE_ATTRIBUTES(config_sh,"PRO")
171 $ IF (F$LOCATE("R",test).NE.F$LENGTH(test))
173 $ CONTINUE !at this point check UIC && if test allows...
176 $ echo "''me': cannot read config file ''config_sh'."
180 $ echo "''me': cannot read config file ''config_sh'."
185 $ IF (F$EXTRACT(0,1,P'i') .EQS. "h")
192 $ IF (F$EXTRACT(0,1,P'i') .EQS. "m")
199 $ IF (F$EXTRACT(0,1,P'i') .EQS. "r")
206 $ IF (F$EXTRACT(0,1,P'i') .EQS. "s")
213 $ IF (F$EXTRACT(0,1,P'i') .EQS. "E") !"-E")
218 $ IF (F$EXTRACT(0,1,P'i') .EQS. "K") !"-K")
225 $ IF (F$EXTRACT(0,1,P'i') .EQS. "O")
232 $ IF (F$EXTRACT(0,1,P'i') .EQS. "S") !"-S")
234 $ extractsh = "true" !VMS?
239 $ IF (F$EXTRACT(0,1,P'i') .EQS. "D") !"-D")
242 $!Hmm.. this part needs work
244 $ IF (F$LOCATE("=",P'i') .EQ. F$LENGTH(P'i'))
248 $ IF (F$LOCATE("=",P'i') .EQ. (F$LENGTH(P'i') - 1))
250 $ me = F$PARSE(me,,,"NAME") + F$PARSE(me,,,"TYPE")
251 $ echo "''me': use '-Usymbol=val' not '-Dsymbol='."
252 $ echo "''me': ignoring -D",P'i'
254 $!Hmm.. this part needs work
255 $! 'F$EXTRACT(0,F$LOCATE("=",P'i'),P'i')' = -
256 $! 'F$EXTRACT(F$LOCATE("=",P'i'),P'i'),F$LENGTH(P'i'),P'i')'
259 $ ECHO "P''i' =>",P'i',"<=" !Diag
262 $ IF (F$EXTRACT(0,1,P'i') .EQS. "U") !"-U")
265 $ IF (F$LOCATE("=",P'i') .EQ. F$LENGTH(P'i'))
269 $ IF (F$LOCATE("=",P'i') .LT. (F$LENGTH(P'i') - 1))
271 $ me = F$PARSE(me,,,"NAME") + F$PARSE(me,,,"TYPE")
272 $ echo "''me': use '-Dsymbol=val' not '-Usymbol=val'."
273 $ echo "''me': ignoring -U",P'i'
278 $ ECHO "P''i' =>",P'i',"<=" !Diag
281 $ IF (F$EXTRACT(0,1,P'i') .EQS. "V")
283 $ me = F$PARSE(me,,,"NAME") + F$PARSE(me,,,"TYPE")
284 $ echo "''me' generated by an unknown version of EDT."
290 $ echo "''me': unknown option ",P'i'
293 $ IF (F$LENGTH(P'i').GT.0).AND.(gotshortopt) THEN i = i - 1 !clustered switch
295 $ IF (i .LT. (bang + 1)) THEN GOTO Opt_loop
297 $ ENDIF ! (P1 .NES. "")
301 $ me = F$PARSE(me,,,"DIRECTORY")+ F$PARSE(me,,,"NAME")
302 $ echo "Usage: @''me' [-dehmrEKOSV] [-fconfig.sh] [-Dsymbol] [-Dsymbol=value]"
303 $ echo " [-Usymbol] [-Usymbol=]"
305 "-d" : use defaults for all answers.
306 "-e" : go on without questioning past the production of config.sh. *
307 "-f" : specify an alternate default configuration file.
308 "-h" : print this help message and exit (with an error status).
309 "-m" : skip the MANIFEST check to see that all files are present
310 "-r" : reuse C symbols value if possible (skips costly nm extraction).*
311 "-s" : silent mode, only echoes questions and essential information.
312 -"D" : define symbol to have some value: *
313 -"Dsymbol" symbol gets the value 'define'
314 -"Dsymbol=value" symbol gets the value 'value'
315 -E : stop at the end of questions, after having produced config.sh. *
316 -K : do not use unless you know what you are doing.
317 -O : let -D and -U override definitions from loaded configuration file. *
318 -S : perform variable substitutions on all .SH files (can mix with -f) *
319 -"U" : undefine symbol: *
320 -"Usymbol" symbol gets the value 'undef'
321 -"Usymbol=" symbol gets completely empty
322 -V : print version number and exit (with a zero status).
323 $ echo "%Config-I-VMS, lower case switches must be enclosed"
324 $ echo "-Config-I-VMS, in double quotation marks, e.g.:"
325 $ echo "-Config-I-VMS, @Configure ""-des"""
326 $ echo "-Config-I-VMS, * indicates switch may not be fully implemented for VMS."
327 $ SET DEFAULT 'vms_default_directory_name' !be kind rewind
329 $ EXIT 3 ! $STATUS = "%X00000003" (informational)
335 $ STDOUT = F$TRNLNM("SYS$OUTPUT")
336 $ DEFINE SYS$OUTPUT "_NLA0:"
337 $ echo4 = "write STDOUT "
338 $ cat4 = "TYPE/OUTPUT=''STDOUT'"
339 $ open/write STDOUT 'STDOUT'
347 $ echo4 = "write SYS$OUTPUT "
351 $!: run the defines and the undefines, if any, but leave the file out there...
352 $! Unfortunately Configure.COM in DCL is not yet set up to do this -
358 $!: Eunice requires " " instead of "", can you believe it
361 $ echo "Beginning of configuration questions for ''package'."
364 $!: Some greps do not return status, grrr.
365 $ contains = "SEARCH"
367 $!: first determine how to suppress newline on echo command !cant DCL is record oriented
368 $! echo "Checking ''echo' to see how to suppress newlines..."
369 $! echo "giving up..."
370 $! echo "The star should be here-->*"
372 $!: Now test for existence of everything in MANIFEST
374 $ echo4 "First let's make sure your kit is complete. Checking..."
377 $! Here I assume we are in the [foo.PERL5xxx.VMS...] tree
378 $! because the search routine simply does set def [-] if necessary.
379 $ file_2_find = "MANIFEST" !I hope this one is not in [foo.PERL5xxx.VMS...]
381 $ manifestfound = F$SEARCH(file_2_find)
382 $ IF (manifestfound .EQS. "")
384 $ IF F$PARSE(F$ENVIRONMENT("DEFAULT"),,,"DIRECTORY",).NES."[000000]"
387 $ GOTO Research_manifest
390 $ echo "There is no MANIFEST file. I hope your kit is complete !"
392 $ GOTO Beyond_manifest
395 $! MANIFEST. has been found and we have set def'ed there -
396 $! time to bail out before it's too late.
397 $ tmp = f$extract(1,3,f$edit(f$getsyi("VERSION"),"TRIM,COLLAPSE"))
398 $ IF tmp .GES. "7.2" THEN GOTO Beyond_depth_check
399 $ IF (F$ELEMENT(max_allowed_dir_depth,".",F$ENVIRONMENT("Default")).nes.".")
402 %Config-E-VMS, ERROR:
403 Sorry! It apears as though your perl build sub-directory is already too
404 deep into the VMS file system. Please try moving stuff into a shallower
405 directory (or altering the "max_allowed_dir_depth" parameter).
406 $ echo4 "ABORTING..."
407 $ SET DEFAULT 'vms_default_directory_name' !be kind rewind
409 $ EXIT !2 !$STATUS = "%X00000002" (error)
413 $! after finding MANIFEST let's create (but not yet enter) the UU subdirectory
415 $ IF (manifestfound .NES. "")
417 $ IF ( F$SEARCH("UU.DIR").EQS."" )
419 $ CREATE/DIRECTORY [.UU]
421 $ IF ( F$SEARCH("[.UU]*.*").NES."" ) THEN DELETE/NOLOG [.UU]*.*;*
423 $!: Configure runs within the UU subdirectory
426 $! a little redundancy never hurt anybody?
427 $ file_2_find = "[-]" + file_2_find
428 $ manifestfound = F$SEARCH(file_2_find)
430 $ OPEN/WRITE MISSING MISSING.
431 $!change to "FALSE" if you wish to skip the manifest search
432 $!(which after all is rather slow in DCL :-)
435 $ echo "Skipping MANIFEST check as requested"
438 $ OPEN/READ CONFIG 'manifestfound'
440 $ READ/END_OF_FILE = Done_manifest CONFIG line
441 $! This algorithm turns "foo/bar/baz.c" into "[.foo.bar]baz.c"
442 $! pvhp@lns62.lns.cornell.edu 10-JUN-1996 20:31:46
443 $! 2-MAR-1998 15:46:11 Improved to turn "foo/bar/baz.c.buz"
444 $! into "[.foo.bar]baz.c_buz as happens with vmstar and unzip
445 $ line = F$EDIT(line,"TRIM, COMPRESS")
446 $ file_2_find = F$EXTRACT(0,F$LOCATE(" ",line),line)
447 $ IF F$LOCATE("/",file_2_find) .NE. F$LENGTH(file_2_find)
449 $Re_strip_line_manifest:
450 $ loca = F$LOCATE("/",file_2_find)
451 $ ante = F$EXTRACT(0,loca,file_2_find)
452 $ post = F$EXTRACT(loca,F$LENGTH(file_2_find),file_2_find)
453 $ test_this = ante + "." + (post - "/")
454 $ IF F$LOCATE("/",test_this) .NE. F$LENGTH(test_this)
456 $ file_2_find = ante + "." + (post - "/")
457 $ GOTO Re_strip_line_manifest
459 $ file_2_find = ante + "]" + (post - "/")
461 $ file_2_find = "[-."+file_2_find
463 $ file_2_find = "[-]" + file_2_find
466 $ dirname = F$EXTRACT(0,F$LOCATE("]",file_2_find),file_2_find) + "]"
467 $ file_2_find = file_2_find - dirname
470 $ dot_ele = F$ELEMENT(dots,".",file_2_find)
471 $ IF dot_ele .EQS. "." THEN GOTO Eo_dot_loop
473 $ THEN basename = f$extract(0,f$locate(".",file_2_find),file_2_find) + "."
474 $ ELSE basename = basename + dot_ele + "_"
479 $ IF (((f$length(file_2_find)+1) .eq. f$length(basename)) .and. -
480 (f$extract(f$length(basename)-1,1,basename) .eqs. "_")) THEN -
481 basename = f$extract(0,f$length(basename)-1,basename)
482 $ file_2_find = dirname + basename
484 $ found = F$SEARCH(file_2_find)
485 $ IF (found .EQS. "" .AND. dots .GT. 2)
487 $! 17-DEC-1999 Improved to turn "[.foo.bar]baz.c_buz" into
488 $! "[.foo.bar]baz_c.buz" to cover unzipped archives and put
489 $! "[.foo.bar]baz.c_buz,baz_c.buz" into missing list if neither is found.
490 $ basename[f$locate(".",basename),1] := _
491 $ dot_ele = F$ELEMENT(dots - 1,"_",basename)
493 f$extract(0,f$length(basename)-(f$length(dot_ele)+1),basename) -
495 $ found = F$SEARCH(dirname + basename)
496 $ file_2_find = file_2_find + "," + basename
498 $ IF (found .EQS. "")
500 $ WRITE MISSING file_2_find
501 $ IF ((F$LENGTH(miss_list)+F$LENGTH(file_2_find)).LT.250)
503 $ miss_list = miss_list + "," + file_2_find
506 $ GOTO Read_loop_manifest
511 $ ENDIF ! (manifestfound .NES. "")
513 $ IF (miss_list .NES. "")
515 $ echo "Some of the files not found include:"
518 $ IF ((miss_list .NES. "").OR.(manifestfound .EQS. ""))
522 THIS PACKAGE SEEMS TO BE INCOMPLETE.
524 You have the option of continuing the configuration process, despite the
525 distinct possibility that your kit is damaged, by typing 'y'es. If you
526 do, don't blame me if something goes wrong. I advise you to type 'n'o
527 and contact the author (sugalskd@ous.edu).
529 $ READ SYS$COMMAND/PROMPT="Continue? [n] " ans
532 $ echo4 "Continuing..."
534 $ echo4 "ABORTING..."
538 $ echo4 "Looks good..."
539 $ DELETE/NOLOG MISSING.;
540 $ ENDIF ! (miss_list .NES. "")
541 $ ENDIF ! (manifestfound .EQS. "") ELSE
543 $! after finding MANIFEST (see above)
544 $!: Configure runs within the UU subdirectory
546 $!: compute the number of columns on the terminal for proper question formatting
547 $! (sfn, will assume 80-ish)
549 $!: set up the echo used in my read !sfn
550 $!: now set up to do reads with possible shell escape and default assignment !sfn
561 $ READ SYS$COMMAND/PROMPT="''rp'" ans
564 $ READ SYS$COMMAND/PROMPT="''rp'" ans
571 $!: create .config dir to save info across Configure sessions
572 $ IF ( F$SEARCH("[-]CONFIG.DIR").EQS."" )
574 $ CREATE/DIRECTORY [-.CONFIG]
575 $ OPEN/WRITE CONFIG [-.CONFIG]README.
577 "This directory created by Configure to save information that should"
579 "persist across sessions."
582 "You may safely delete it if you wish."
586 $!: general instructions
589 $ user = F$EDIT(F$GETJPI("","USERNAME"),"TRIM,COLLAPSE")
590 $ IF .NOT.(F$SEARCH("[-.CONFIG]INSTRUCT.").EQS."")
592 $ messages = F$ENVIRONMENT("MESSAGE")
593 $ SET MESSAGE/NOFAC/NOSEV/NOIDENT/NOTEXT !sorry :-(
594 $ contains /NOOUTPUT [-.CONFIG]INSTRUCT. 'user'
595 $ IF .NOT.($status.EQ.%X08D78053)
599 $ rp = "Would you like to see the instructions? [''dflt'] "
601 $ if .NOT.ans THEN needman=""
603 $ SET MESSAGE 'messages' !hope you made it here :-)
605 $ if (fastread.AND.silent.AND.(alldone.eqs."cont")) THEN needman=""
611 This installation shell script will examine your system and ask you questions
612 to determine how the perl5 package should be installed. If you get
613 stuck on a question, you may use a ^C or ^Y shell escape to STOP this
614 process, edit something, then restart this process as you just did.
615 Many of the questions will have default answers in square
616 brackets; typing carriage return will give you the default.
618 $ READ SYS$COMMAND/PROMPT="Type carriage return to continue " ans
621 In a hurry? You may run '@Configure -d'. This will bypass nearly all
622 the questions and use the computed defaults (or the previous answers provided
623 there was already a config.sh file). Type '@Configure -h' for a list of
626 $ READ SYS$COMMAND/PROMPT="Type carriage return to continue " ans
629 Much effort has been expended to ensure that this shell script will
630 run on any VMS system. If despite that it blows up on yours, your
631 best bet is to edit Configure.com and @ it again. Whatever problems
632 you have with Configure.com, let me (sugalskd@ous.edu) know how I blew
635 $!This installation script affects things in two ways:
637 $!1) it may do direct variable substitutions on some of the files included
639 $!2) it builds a config.h file for inclusion in C programs. You may edit
640 $! any of these files as the need arises after running this script.
642 $!If you make a mistake on a question, there is no easy way to back up to it
645 $ READ SYS$COMMAND/PROMPT="Type carriage return to continue " ans
646 $ IF (F$SEARCH("[-.CONFIG]INSTRUCT.").EQS."")
648 $ OPEN/WRITE CONFIG [-.CONFIG]INSTRUCT.
652 $ ENDIF !(needman .EQS. "true")
654 $!: see if sh knows # comments !sfn
656 $!: figure out how to guarantee sh startup !sfn
657 $!: find out where common programs are !sfn
658 $!loclist="awk/cat/comm/cp/echo/expr/find/grep/ln/ls/mkdir/rm/sed/sort/touch/tr/uniq"
659 $!trylist="Mcc/byacc/cpp/csh/date/egrep/less/line/more/nroff/perl/pg/sendmail/test/uname"
660 $! echo "I don't know where '$file' is, and my life depends on it."
661 $! echo "Go find a public domain implementation or fix your PATH setting!"
663 $! echo "Don't worry if any of the following aren't found..."
664 $!: determine whether symbolic links are supported !sfn
665 $!: see whether [:lower:] and [:upper:] are supported character classes !sfn
666 $!: set up the translation script tr, must be called with ./tr of course !sfn
668 $!: Try to determine whether config.sh was made on this system
669 $!: Get old answers from old config file if Configure was run on the
670 $!: same system, otherwise use the hints.
671 $ config_sh_es = "''config_sh'/[-]config.sh/[-.vms]config.vms/"
675 $ config_sh = F$ELEMENT(i,"/",config_sh_es)
677 $ IF (config_sh.NES."/").AND.(config_sh.NES."")
679 $ configshfound = F$SEARCH(config_sh)
680 $ IF (configshfound.NES."") THEN GOTO Config_sh_found
682 $ IF (i.LT.max) THEN GOTO Config_sh_look
683 $ IF (configshfound.EQS."") THEN GOTO Beyond_config_sh
686 $ echo "Fetching default answers from ''config_sh'..."
687 $!we actually do not have "hints/" for VMS
690 $!First time through, eh? I have some defaults handy for the following systems:
692 $! echo " ","VMS_VAX"
693 $! echo " ","VMS_AXP"
694 $! : Now look for a hint file osname_osvers, unless one has been
695 $! : specified already.
698 $!You may give one or more space-separated answers, or "none" if appropriate.
699 $!If your OS version has no hints, DO NOT give a wrong version -- say "none".
701 $! READ SYS$COMMAND/PROMPT="Which of these apply, if any? " ans
705 $!: Restore computed paths !sfn
707 $! genconfig.pl has "osname='VMS'"
708 $ osname = F$EDIT(F$GETSYI("NODE_SWTYPE"),"COLLAPSE")
709 $! %Config-I-VMS, a necessary error trap (could be PC running VCL)
711 $ IF (osname .NES. "VMS")
713 $ echo4 "Hmm.. I wonder what ''osname' is (?)"
716 %Config-E-VMS, ERROR:
718 Err, you do not appear to be running VMS!
719 This procedure is intended to Configure the building of Perl for VMS.
721 $ READ SYS$COMMAND/PROMPT="Continue anyway? [n] " ans
724 $ echo4 "Continuing..."
726 $ echo4 "ABORTING..."
727 $ SET DEFAULT 'vms_default_directory_name' !be kind rewind
729 $ EXIT 2 !$STATUS = "%X00000002" (error)
731 $ ELSE !we are on VMS huzzah!
733 $ THEN TYPE SYS$INPUT:
735 Configure uses the operating system name and version to set some defaults.
736 The default value is probably right if the name rings a bell. Otherwise,
737 since spelling matters for me, either accept the default or answer "none"
740 $ rp = "Operating system name? [''osname'] "
744 $ IF (ans.NES.osname) !.AND.knowitall
746 $ echo4 "I'll go with ''osname' anyway..."
749 $ ENDIF !(osname .NES./.EQS. "VMS")
751 $!: who configured the system
753 $ cf_by = F$EDIT(user,"LOWERCASE")
754 $! cf_time = F$CVTIME() !superceded by procedure below
755 $ osvers = F$GETSYI("VERSION")
757 $! Peter Prymmer has seen:
758 $! "SYS$TIMEZONE_DIFFERENTIAL" = "-46800" (sic)
759 $! "SYS$TIME_ZONE" = "EDT"
761 $! Charles Lane recommended:
762 $! "SYS$TIMEZONE_DIFFERENTIAL" = "-14400"
763 $! "NEWS_TIMEZONE" = "-0500"
764 $! "ST_TIMEZONE" = "EDT"
765 $! "JAN_TIME_ZONE" = "EST "
766 $! "MULTINET_TIMEZONE" = "EST"
767 $! "DAYLIGHT_SAVINGS" = "1"
769 $! Charles Bailey recommends (in ANU NEWS Doc Jan 1995):
771 $! "Multinet_Timezone"
772 $! "TCPware_Timezone"
775 $! This snippet o' DCL returns a string in default Unix `date` format,
776 $! and it will prompt to set SYS$TIMEZONE_DIFFERENTIAL.
777 $! Peter Prymmer pvhp@lns62.lns.cornell.edu
779 $ MIN_TZO = -840 !units are minutes here
782 $ wkday = F$EXTRACT(0,3,F$CVTIME(,,"WEEKDAY"))
783 $ monn = F$CVTIME(,,"MONTH")
784 $ mday = F$EXTRACT(8,2,F$CVTIME(,,"DATE"))
785 $ hour = F$CVTIME(,,"HOUR")
786 $ min = F$CVTIME(,,"MINUTE")
787 $ sec = F$CVTIME(,,"SECOND")
788 $ year = F$CVTIME(,,"YEAR")
790 $ months = "/Jan/Feb/Mar/Apr/May/Jun/Jul/Aug/Sep/Oct/Nov/Dec/"
794 $ mon = F$ELEMENT(i,"/",months)
795 $ IF i.LT.monn THEN GOTO Mon_loop
798 $ systz = F$TRNLNM("SYS$TIMEZONE_DIFFERENTIAL")
801 $ tzhour = F$INTEGER(systz)/3600
802 $ tzmins = F$INTEGER(systz)/60
803 $ tzminrem = tzmins - tzhour*60
804 $ IF tzminrem.lt.0 THEN tzminrem = -1*tzminrem !keeps !2ZL happy
806 $ THEN signothetime = "+"
807 $ IF tzhour.EQ.0.AND.tzminrem.EQ.0
808 $ THEN direction = "on GMT/"
809 $ ELSE direction = "east of "
811 $ ELSE signothetime = "-"
812 $ tzhour = -1*tzhour !keeps !UL happy
813 $ direction = "west of "
816 $ echo "%Config-I-VMS,"
817 $ echo "According to the setting of your ""SYS$TIMEZONE_DIFFERENTIAL"" (= ''systz')"
820 $ tzspan = "''tzhour' hours & ''tzminrem' minutes"
822 $ tzspan = "''tzhour' hours"
825 $ echo "Your system is ''tzspan' ''direction'UTC in England."
826 $ rp = "%Config-I-VMS, (''systz') Is this UTC Time Zone Offset correct? [''dflt'] "
828 $ IF ans.OR.(ans.EQS."")
832 $ GOTO Beyond_TimeZone
836 $ echo4 "%Config-I-VMS,"
837 $ echo4 """SYS$TIMEZONE_DIFFERENTIAL"" does not appear to be DEFINEd on your system"
842 $ echo "Please tell me in hh:mm form what time offset from GMT/UTC in England"
843 $ echo "you are. As an example Eastern (US) Standard Time is -5:00 offset, but"
844 $ echo "Eastern Daylight Time (summer) is -4:00 offset."
846 $ rp = "Enter the Time Zone offset: [''dflt'] "
848 $ ans = F$Edit(ans,"collapse,trim,uncomment,upcase")
849 $ IF ans.EQS."" THEN ans = dflt
850 $ tzhour = F$ELEMENT(0,":","''ans'") !first
851 $ IF tzhour.EQS."" THEN tzhour = 0
852 $ tzhour = F$INTEGER(tzhour)
853 $ tzminrem = F$ELEMENT(1,":","''ans'") !second
856 $ tzminrem = F$INTEGER(tzminrem)
857 $ IF F$EXTRACT(0,1,"''ans'") .EQS. "-" THEN tzminrem = tzminrem * -1
861 $ tzmins = tzhour*60 + tzminrem
862 $ tzd = F$STRING(tzmins*60)
867 $ tzhour = -1*tzhour !keeps !UL happy
870 $ IF (tzmins.GT.MAX_TZO).OR.(tzmins.LT.MIN_TZO)
873 $ echo "%Config-W-VMS-TIMERANGE, Response must be in the range -14:00 to 14:00."
878 $ tz = f$fao("UTC!AS!UL:!2ZL",signothetime,tzhour,tzminrem)
879 $ cf_time = "''wkday' ''mon' ''mday' ''hour':''min':''sec' ''tz' ''year'"
881 $!: determine the architecture name
882 $! genconfig.pl has either archname='VMS_AXP' or 'VMS_VAX'
884 $ IF (F$GETSYI("HW_MODEL") .LT. 1024)
886 $ archname = "VMS_VAX"
887 $ otherarch = "an Alpha"
889 $ archname = "VMS_AXP"
890 $ otherarch = "a VAX"
892 $ rp = "What is your architecture name? [''archname'] "
896 $ ans = F$EDIT(ans,"COLLAPSE, UPCASE")
897 $ IF (ans.NES.archname) !.AND.knowitall
899 $ echo4 "I'll go with ''archname' anyway..."
903 $ rp = "Will you be sharing your PERL_ROOT with ''otherarch'? [''dflt'] "
907 $ ans = F$EXTRACT(0,1,F$EDIT(ans,"COLLAPSE, UPCASE"))
914 $ IF (archname.EQS."VMS_AXP")
916 $ macros = macros + """AXE=1"","
920 $!: is AFS running? !sfn
921 $!: decide how portable to be. Allow command line overrides. !sfn
922 $!: set up shell script to do ~ expansion !sfn
923 $!: expand filename !sfn
924 $!: now set up to get a file name !sfn
926 $ vms_skip_install = "true"
929 $ rp = "%Config-I-VMS, Do you wish to skip the """"where install"""" questions? [''dflt'] "
931 $ IF (.NOT.ans).AND.(ans.NES."") THEN vms_skip_install = "false"
932 $ prefix = F$ENVIRONMENT("DEFAULT") - ".UU]" + "]"
933 $ prefix = f$parse(prefix,,,,"NO_CONCEAL") - "][" - ".;"
934 $ prefix = prefix - "]" + ".]"
935 $ IF (.NOT.vms_skip_install)
937 $!: determine root of directory hierarchy where package will be installed.
942 $ echo "By default, ''package' will be installed in ''dflt'/bin, manual"
943 $ echo "pages under ''dflt'/man, etc..., i.e. with ''dflt' as prefix for"
944 $ echo "all installation directories. Typically set to /usr/local, but you"
945 $ echo "may choose /usr if you wish to install ''package' among your system
948 $ THEN TYPE SYS$INPUT:
949 binaries. If you wish to have binaries under /bin but manual pages
950 under /usr/local/man, that's ok: you will be prompted separately
951 for each of the installation directories, the prefix being only used
955 $ rp = "Installation prefix to use? [ ''dflt' ] "
960 $ IF F$LOCATE(".]",ans) .EQ. F$LENGTH(ans) THEN prefix = prefix - "]" + ".]"
965 $!: set the prefixit variable, to compute a suitable default value
967 $!: determine where private library files go
968 $!: Usual default is /usr/local/lib/perl5. Also allow things like
969 $!: /opt/perl/lib, since /opt/perl/lib/perl5 would be redundant.
971 $ THEN TYPE SYS$INPUT:
973 There are some auxiliary files for perl5 that need to be put into a
974 private library directory that is accessible by everyone.
976 $ dflt = prefix - ".]" + ".LIB]"
977 $ rp = "Pathname where the private library files will reside? "
978 $ rp = F$FAO("!AS!/!AS",rp,"[ ''dflt' ] ")
982 $ ELSE privlib = dflt
985 $ ENDIF !%Config-I-VMS, skip "where install" questions
987 $!: set the base revision
989 $!: get the patchlevel
991 $ echo4 "Getting the current patchlevel..." !>&4
992 $ patchlevel_h = F$SEARCH("[-]patchlevel.h")
993 $ IF (patchlevel_h.NES."")
995 $ got_patch = "false"
997 $ OPEN/READONLY CONFIG 'patchlevel_h'
999 $ READ/END_Of_File=Close_patch CONFIG line
1000 $ IF ((F$LOCATE("#define PERL_VERSION",line).NE.F$LENGTH(line)).AND.(.NOT.got_patch))
1002 $ line = F$EDIT(line,"COMPRESS, TRIM")
1003 $ patchlevel = F$ELEMENT(2," ",line)
1004 $ got_patch = "true"
1006 $ IF ((F$LOCATE("#define PERL_SUBVERSION",line).NE.F$LENGTH(line)).AND.(.NOT.got_sub))
1008 $ line = F$EDIT(line,"COMPRESS, TRIM")
1009 $ subversion = F$ELEMENT(2," ",line)
1012 $ IF (.NOT.got_patch).OR.(.NOT.got_sub) THEN GOTO Patchlevel_h_loop
1019 $ echo "(You have ''package' ''baserev' PL''patchlevel' sub''subversion'.)"
1020 $! This whole thing needs replacing w/ F$FAO() calls:
1021 $ patchlevel = F$INTEGER(patchlevel)
1022 $ IF patchlevel.LT.10
1023 $ THEN patchlevel = "00" + F$STRING(patchlevel)
1024 $ ELSE patchlevel = "0" + F$STRING(patchlevel)
1026 $ subversion = F$INTEGER(subversion)
1027 $ IF subversion.GT.0
1029 $ IF subversion.LT.10
1030 $ THEN subversion = "0" + F$STRING(subversion)
1031 $ ELSE subversion = F$STRING(subversion)
1033 $ ELSE subversion = ""
1036 $ version = baserev + "_" + patchlevel + "_" + subversion
1038 $ IF (.NOT.vms_skip_install)
1040 $!: set the prefixup variable, to restore leading tilda escape !sfn
1041 $!: set the prefixup variable, to restore leading tilde escape !sfn
1043 $!: determine where public architecture dependent libraries go
1047 $ echo "''package' contains architecture-dependent library files. If you are"
1050 $ THEN TYPE SYS$INPUT:
1051 sharing libraries in a heterogeneous environment, you might store
1052 these files in a separate location. Otherwise, you can just include
1053 them with the rest of the public library files.
1055 $ dflt = privlib - "]" + "." + archname + "." + version + "]"
1056 $ rp = "Where do you want to put the public architecture-dependent libraries? "
1057 $ rp = F$FAO("!AS!/!AS",rp,"[ ''dflt' ] ")
1060 $ THEN archlib = ans
1061 $ ELSE archlib = dflt
1064 $!: set up the script used to warn in case of inconsistency !sfn
1065 $!: function used to set $1 to $val !sfn
1067 $ ENDIF !%Config-I-VMS, skip "where install" questions
1068 $! This quotation from Configure has to be included on VMS:
1071 There is, however, a strange, musty smell in the air that reminds me of
1072 something...hmm...yes...I've got it...there's a VMS nearby, or I'm a Blit.
1074 $ IF (.NOT.vms_skip_install)
1076 $!: it so happens the Eunice I know will not run shell scripts in Unix format
1078 $!: see if setuid scripts can be secure !sfn
1079 $!: now see if they want to do setuid emulation !sfn
1081 $!: determine where site specific libraries go.
1083 $ THEN TYPE SYS$INPUT:
1085 The installation process will also create a directory for
1086 site-specific extensions and modules. Some users find it convenient
1087 to place all local files in this directory rather than in the main
1088 distribution directory.
1090 $ dflt = privlib - "]" + ".SITE_PERL]"
1091 $ rp = "Pathname for the site-specific library files? "
1092 $ rp = F$FAO("!AS!/!AS",rp,"[ ''dflt' ] ")
1095 $ THEN sitelib = ans
1096 $ ELSE sitelib = dflt
1099 $!: determine where site specific architecture-dependent libraries go.
1101 $ THEN TYPE SYS$INPUT:
1103 The installation process will also create a directory for
1104 architecture-dependent site-specific extensions and modules.
1106 $ dflt = sitelib - "]" + "." + archname + "]"
1107 $ rp = "Pathname for the site-specific architecture-dependent library files? "
1108 $ rp = F$FAO("!AS!/!AS",rp,"[ ''dflt' ] ")
1111 $ THEN sitearch = ans
1112 $ ELSE sitearch = dflt
1115 $!: determine where old public architecture dependent libraries might be
1117 $!: determine where public executables go
1118 $ dflt = prefix - ".]" + ".BIN]"
1119 $ rp = "Pathname where the public executables will reside? "
1120 $ rp = F$FAO("!AS!/!AS",rp,"[ ''dflt' ] ")
1127 $!: determine where manual pages are on this system
1128 $!: What suffix to use on installed man pages
1129 $!: see if we can have long filenames
1130 $!: determine where library module manual pages go
1131 $!: What suffix to use on installed man pages
1132 $!: see what memory models we can support
1134 $ ENDIF !%Config-I-VMS, skip "where install" questions
1136 $!: see if we need a special compiler
1137 $! cc_list = "cc/vaxc|cc/decc|gcc" !%Config-I-VMS, compiler symbols/commands
1141 $ vms_cc_available = ""
1143 $ OPEN/WRITE CONFIG ccvms.c
1144 $ WRITE CONFIG "#include <stdlib.h>" !DECC is sooo picky
1145 $ WRITE CONFIG "#include <stdio.h>"
1146 $ WRITE CONFIG "int main() {"
1147 $ WRITE CONFIG "#ifdef __DECC"
1148 $ WRITE CONFIG " printf(""/DECC\n"");"
1149 $ WRITE CONFIG "#else"
1150 $ WRITE CONFIG " printf(""/VAXC\n"");"
1151 $ WRITE CONFIG "#endif"
1152 $ WRITE CONFIG " exit(0);"
1156 $! DEFINE SYS$ERROR _NLA0:
1157 $! DEFINE SYS$OUTPUT _NLA0:
1158 $ cc/NoObj/list=ccvms.lis ccvms.c
1160 $! DEASSIGN SYS$OUTPUT
1161 $! DEASSIGN SYS$ERROR
1162 $ IF (silent) THEN GOSUB Shut_up
1163 $! echo "%Config-I-VMS, After cc compile $status = >''tmp'<" !diagnostic
1165 $ IF tmp.NE.%X10B90001
1167 $ IF tmp.NE.%X10000001
1169 $ nocc = "t" !%X10000001 is return from gcc
1170 $ GOTO Gcc_initial_check
1175 $ IF .NOT.silent THEN echo ""
1176 $ echo "%Config-I-VMS, Default ""cc"" is ''line' ''archsufx' ''F$GETSYI("VERSION")'"
1177 $ IF F$LOCATE("VAX",line).NE.F$LENGTH(line)
1179 $ vms_cc_dflt = "/vaxc"
1180 $ vms_cc_available = vms_cc_available + "cc/vaxc "
1183 $ echo "%Config-I-VMS, Will try cc/decc..."
1185 $ DEFINE SYS$ERROR _NLA0:
1186 $ DEFINE SYS$OUTPUT _NLA0:
1188 $ cc/decc/NoObj/list=ccvms.lis ccvms.c
1190 $ DEASSIGN SYS$OUTPUT
1191 $ DEASSIGN SYS$ERROR
1193 $ IF (silent) THEN GOSUB Shut_up
1194 $ IF tmp.NE.%X10B90001
1196 $ echo "%Config-I-VMS, Apparently you don't have that one."
1199 $ echo "%Config-I-VMS, You also have: ''line' ''archsufx' ''F$GETSYI("VERSION")'"
1200 $ vms_cc_available = vms_cc_available + "cc/decc "
1203 $ IF (F$LOCATE("DEC",line).NE.F$LENGTH(line)).or.(F$LOCATE("Compaq",line).NE.F$LENGTH(line))
1205 $ vms_cc_dflt = "/decc"
1206 $ vms_cc_available = vms_cc_available + "cc/decc "
1207 $ echo "%Config-I-VMS, Will try cc/vaxc..."
1208 $ DEFINE SYS$ERROR _NLA0:
1209 $ DEFINE SYS$OUTPUT _NLA0:
1211 $ cc/vaxc/NoObj/list=ccvms.lis ccvms.c
1213 $ DEASSIGN SYS$OUTPUT
1214 $ DEASSIGN SYS$ERROR
1216 $ IF (silent) THEN GOSUB Shut_up
1217 $ IF tmp.NE.%X10B90001
1219 $ echo "%Config-I-VMS, Apparently you don't have that one."
1222 $ echo "%Config-I-VMS, You also have: ''line' ''archsufx' ''F$GETSYI("VERSION")'"
1223 $ vms_cc_available = vms_cc_available + "cc/vaxc "
1229 $ echo "%Config-I-VMS, Checking for Gcc"
1230 $ OPEN/WRITE CONFIG gccvers.lis
1231 $ DEFINE SYS$ERROR CONFIG
1232 $ DEFINE SYS$OUTPUT CONFIG
1233 $ 'gcc_symbol'/noobj/version _nla0:
1235 $ DEASSIGN SYS$OUTPUT
1236 $ DEASSIGN SYS$ERROR
1237 $ IF (silent) THEN GOSUB Shut_up
1239 $ IF (tmp.NE.%X10000001).and.(tmp.ne.%X00030001)
1241 $ echo "%Config-I-VMS, Symbol ""''gcc_symbol'"" is not defined. I guess you don't have it."
1244 $ OPEN/READ CONFIG gccvers.lis
1246 $ READ/END_OF_FILE=GCC_List_End CONFIG line
1247 $ GOTO GCC_List_Read
1251 $ vms_cc_available = vms_cc_available + "''gcc_symbol' "
1252 $ DELETE/NOLOG/NOCONFIRM gccvers.lis;
1255 $ DELETE/NOLOG/NOCONFIRM ccvms.*;
1257 $!: see if we need a special compiler
1259 $ echo "%Config-I-VMS, available compiler(s):"
1260 $ echo "( ''vms_cc_available')"
1263 $ dflt = "cc''vms_cc_dflt'" !-> "cc" in case first compile went OK
1267 $ rp = "Use which C compiler? [''dflt'] "
1271 $ ans = F$EDIT(ans,"TRIM, COMPRESS, LOWERCASE")
1273 $ IF (F$LOCATE("dec",ans).NE.F$LENGTH(ans)).or.(F$LOCATE("compaq",ans).NE.F$LENGTH(ans))
1276 $ Using_Dec_C = "Yes"
1277 $ C_COMPILER_Replace = "CC=cc=''Mcc'"
1279 $ IF F$LOCATE("vax",ans).NE.F$LENGTH(ans)
1282 $ Using_Vax_C = "Yes"
1283 $ C_COMPILER_Replace = "CC=cc=''Mcc'"
1287 $ IF (F$LOCATE("dec",dflt).NE.F$LENGTH(dflt)).or(F$LOCATE("compaq",dflt).NE.F$LENGTH(dflt))
1289 $ C_COMPILER_Replace = "CC=cc=''Mcc'"
1291 $ Using_Dec_C = "Yes"
1292 $ IF F$LOCATE("vax",dflt).NE.F$LENGTH(dflt)
1294 $ C_COMPILER_Replace = "CC=cc=''Mcc'"
1298 $ IF Mcc .EQS. "cc/decc"
1300 $ Using_Dec_C = "Yes"
1301 $ C_COMPILER_Replace = "CC=cc=''Mcc'"
1306 $ IF Mcc .EQS. "cc/decc"
1308 $ Using_Dec_C = "Yes"
1309 $ C_COMPILER_Replace = "CC=cc=''Mcc'"
1311 $ IF Mcc .EQS. "cc/vaxc"
1313 $ Using_Vax_C = "Yes"
1314 $ C_COMPILER_Replace = "CC=cc=''Mcc'"
1316 $ IF Mcc .EQS. "gcc"
1318 $ Using_Gnu_C = "Yes"
1319 $ C_COMPILER_Replace = "CC=cc=''Mcc'"
1322 $Decc_Version_check:
1323 $ IF "''Using_Dec_C'".EQS."Yes"
1326 $ echo4 "Checking for Dec C's version number..." !>&4
1327 $ OPEN/WRITE CONFIG deccvers.c
1328 $ WRITE CONFIG "#include <stdlib.h>" !DECC is sooo picky
1329 $ WRITE CONFIG "#include <stdio.h>"
1330 $ WRITE CONFIG "int main() {"
1331 $ WRITE CONFIG "#ifdef __DECC"
1332 $ WRITE CONFIG "#ifdef __DECC_VER"
1333 $ WRITE CONFIG " printf(""%i\n"", __DECC_VER);"
1334 $ WRITE CONFIG "#else"
1335 $ WRITE CONFIG " printf(""%i\n"", ""1"");"
1336 $ WRITE CONFIG "#endif"
1337 $ WRITE CONFIG "#endif"
1338 $ WRITE CONFIG " exit(0);"
1341 $ DEFINE SYS$ERROR _NLA0:
1342 $ DEFINE SYS$OUTPUT _NLA0:
1345 $ DEASSIGN SYS$ERROR _NLA0:
1346 $ DEASSIGN SYS$OUTPUT _NLA0:
1347 $ IF (silent) THEN GOSUB Shut_up
1348 $ DEFINE SYS$ERROR _NLA0:
1349 $ DEFINE SYS$OUTPUT _NLA0:
1352 $ DEASSIGN SYS$ERROR
1353 $ DEASSIGN SYS$OUTPUT
1354 $ IF (silent) THEN GOSUB Shut_up
1355 $ OPEN/WRITE CONFIG deccvers.out
1356 $ DEFINE SYS$ERROR CONFIG
1357 $ DEFINE SYS$OUTPUT CONFIG
1358 $ mcr []deccvers.exe
1361 $ DEASSIGN SYS$OUTPUT
1362 $ DEASSIGN SYS$ERROR
1363 $ IF (silent) THEN GOSUB Shut_up
1364 $ OPEN/READ CONFIG deccvers.out
1365 $ READ/END_OF_FILE=Dec_c_cleanup CONFIG line
1368 $! DELETE/NOLOG/NOCONFIRM deccvers.*;
1369 $ echo "You are using Dec C ''line'"
1370 $ Dec_C_Version = line
1371 $ Dec_C_Version = Dec_C_Version + 0
1372 $ if Dec_C_Version.ge.60200000 THEN CC_FLAGS = CC_FLAGS + "/NOANSI_ALIAS"
1375 $ IF "''Using_Vax_C'".EQS."Yes"
1378 $ echo4 "Checking to see how to invoke Vax C..."
1379 $ OPEN/WRITE CONFIG vaxcchk.c
1380 $ WRITE CONFIG "#include <stdio.h>"
1381 $ WRITE CONFIG "int main() {"
1382 $ WRITE CONFIG " printf(""%i\n"", ""1"");"
1383 $ WRITE CONFIG " exit(0);"
1386 $ DEFINE SYS$ERROR _NLA0:
1387 $ DEFINE SYS$OUTPUT _NLA0:
1389 $ cc/vaxc/NoObj vaxcchk.c
1391 $ DEASSIGN SYS$OUTPUT
1392 $ DEASSIGN SYS$ERROR
1394 $ IF (silent) THEN GOSUB Shut_up
1395 $ IF tmp.NE.%X10B90001
1402 $ DELETE/NOLOG/NOCONFIRM vaxcchk.*;
1405 $ if "''using_gnu_c'" .eqs. "Yes"
1407 $ vaxcrtl_olb = F$SEARCH("SYS$LIBRARY:VAXCRTL.OLB")
1408 $ vaxcrtl_exe = F$SEARCH("SYS$SHARE:VAXCRTL.EXE")
1409 $ gcclib_olb = F$SEARCH("GNU_CC:[000000]GCCLIB.OLB")
1410 $ IF gcclib_olb .EQS. ""
1412 $! These objects/libs come w/ gcc 2.7.2 for AXP:
1413 $ tmp = F$SEARCH("GNU_CC:[000000]libgcc2.olb")
1414 $ IF tmp .NES. "" then gcclib_olb = tmp
1415 $ tmp = F$SEARCH("GNU_CC:[000000]libgcclib.olb")
1418 $ IF gcclib_olb .EQS. ""
1419 $ THEN gcclib_olb = tmp
1420 $ ELSE gcclib_olb = gcclib_olb + "/lib," + tmp
1423 $ tmp = F$SEARCH("SYS$LIBRARY:VAXCRTL.OLB")
1426 $ IF gcclib_olb .EQS. ""
1427 $ THEN gcclib_olb = tmp
1428 $ ELSE gcclib_olb = gcclib_olb + "/lib," + tmp
1431 $ tmp = F$SEARCH("GNU_CC:[000000]crt0.obj")
1434 $ IF gcclib_olb .EQS. ""
1435 $ THEN gcclib_olb = tmp
1436 $ ELSE gcclib_olb = gcclib_olb + "/lib," + tmp
1439 $ IF gcclib_olb .EQS. vaxcrtl_olb THEN gcclib_olb = "" !goofy order of axplibs
1441 $ gcclib_olb = gcclib_olb + "/lib"
1443 $ IF gcclib_olb .NES. "" .AND. -
1444 (vaxcrtl_olb .NES. "" .OR. -
1445 vaxcrtl_exe .NES. "" )
1448 $ echo4 "Checking for GNU cc in disguise and/or its version number..." !>&4
1449 $ OPEN/WRITE CONFIG gccvers.c
1450 $ WRITE CONFIG "#include <stdlib.h>" !DECC is sooo picky
1451 $ WRITE CONFIG "#include <stdio.h>"
1452 $ WRITE CONFIG "int main() {"
1453 $ WRITE CONFIG "#ifdef __GNUC__"
1454 $ WRITE CONFIG "#ifdef __VERSION__"
1455 $ WRITE CONFIG " printf(""%s\n"", __VERSION__);"
1456 $ WRITE CONFIG "#else"
1457 $ WRITE CONFIG " printf(""%s\n"", ""1"");"
1458 $ WRITE CONFIG "#endif"
1459 $ WRITE CONFIG "#endif"
1460 $ WRITE CONFIG " exit(0);"
1463 $ DEFINE SYS$ERROR _NLA0:
1464 $ DEFINE SYS$OUTPUT _NLA0:
1467 $ DEASSIGN SYS$ERROR _NLA0:
1468 $ DEASSIGN SYS$OUTPUT _NLA0:
1469 $ IF (silent) THEN GOSUB Shut_up
1470 $ DEFINE SYS$ERROR _NLA0:
1471 $ DEFINE SYS$OUTPUT _NLA0:
1472 $ IF vaxcrtl_exe .EQS. ""
1474 $ IF F$LOCATE("VAXCRTL",gcclib_olb).NE.F$LENGTH(gcclib_olb)
1476 $ link gccvers.obj,'gcclib_olb',SYS$LIBRARY:VAXCRTL/Library
1479 $ link gccvers.obj,'gcclib_olb'
1483 $ OPEN/WRITE CONFIG GCCVERS.OPT
1484 $ WRITE CONFIG "SYS$SHARE:VAXCRTL/SHARE"
1486 $ link gccvers.obj,GCCVERS.OPT/OPT,'gcclib_olb'
1489 $ DEASSIGN SYS$ERROR
1490 $ DEASSIGN SYS$OUTPUT
1491 $ IF (silent) THEN GOSUB Shut_up
1492 $ OPEN/WRITE CONFIG gccvers.out
1493 $ DEFINE SYS$ERROR CONFIG
1494 $ DEFINE SYS$OUTPUT CONFIG
1498 $ DEASSIGN SYS$OUTPUT
1499 $ DEASSIGN SYS$ERROR
1500 $ IF (silent) THEN GOSUB Shut_up
1501 $ OPEN/READ CONFIG gccvers.out
1502 $ READ/END_OF_FILE=Gcc_cleanup CONFIG line
1505 $ DELETE/NOLOG/NOCONFIRM gccvers.*;
1506 $ IF F$LOCATE("GNU C version ",line).NE.F$LENGTH(line)
1508 $ echo "You are not using GNU cc."
1511 $ echo "You are using GNU cc ''line'"
1512 $ Using_Gnu_C = "Yes"
1513 $ C_COMPILER_Replace = "CC=cc=''Mcc'"
1521 $ OPEN/READ CONFIG ccvms.lis
1523 $ IF (F$GETSYI("HW_MODEL") .LT. 1024)
1531 $ line = F$EDIT(line,"TRIM,COMPRESS")
1532 $ line = line - "Page 1" ! occurs at end all compilers
1533 $ line = line - "CCVMS " ! filename appears w/ VAXC
1534 $ line = line - "Source Listing " ! Seen w/ AXP DECC
1535 $ tmp = F$EXTRACT(0,20,line) !timestamp, e.g. "30-JUL-1996 21:12:54 "
1537 $ line = F$EDIT(line,"TRIM") !bit redundant but we're in no big hurry
1538 $ DELETE/NOLOG/NOCONFIRM ccvms.lis;
1542 $!: What should the include directory be ?
1544 $ rp = "Where are the include files you want to use? "
1545 $ IF f$length( rp + "[''dflt'] " ).gt.76
1546 $ THEN rp = F$FAO("!AS!/!AS",rp,"[''dflt'] ")
1547 $ ELSE rp = rp + "[''dflt'] "
1552 $!: see if we have to deal with yellow pages, now NIS.
1553 $!: now get the host name
1556 $ echo4 "Figuring out host name..." !>&4
1558 $ IF myhostname.eqs."" THEN myhostname = F$TRNLNM("ARPANET_HOST_NAME")
1559 $ IF myhostname.eqs."" THEN myhostname = F$TRNLNM("INTERNET_HOST_NAME")
1560 $ IF myhostname.eqs."" THEN myhostname = F$TRNLNM("MULTINET_HOST_NAME")
1561 $ IF myhostname.eqs."" THEN myhostname = F$TRNLNM("UCX$INET_HOST_NAME")
1562 $ IF myhostname.eqs."".and. -
1563 F$TRNLNM("UCX$INET_HOST") .nes. "" .and. -
1564 F$TRNLNM("UCX$INET_DOMAIN") .nes. "" THEN -
1565 myhostname = F$TRNLNM("UCX$INET_HOST") + "." + F$TRNLNM("UCX$INET_DOMAIN")
1566 $ IF myhostname.eqs."" THEN myhostname = F$TRNLNM("TCPWARE_DOMAINNAME")
1567 $ IF myhostname.eqs."" THEN myhostname = F$TRNLNM("NEWS_ADDRESS")
1568 $ IF myhostname.eqs."" THEN myhostname = F$TRNLNM("SYS$NODE") - "::"
1569 $ IF myhostname.eqs."" THEN myhostname = F$EDIT(F$GETSYI("SCSNODE"),"TRIM")
1570 $!: you do not want to know about this
1572 $ rp = "Your host name appears to be """"''myhostname'"""". Right? "
1574 $ IF (.not.ans).and.(ans.NES."")
1576 $ READ SYS$COMMAND/PROMPT= -
1577 "Please type the (one word) name of your host: " ans
1580 $!: translate upper to lower if necessary
1581 $ myhostname = F$EDIT(myhostname,"COLLAPSE")
1582 $ mylowhostname = F$EDIT(myhostname," LOWERCASE")
1583 $ IF mylowhostname.NES.myhostname
1585 $ echo "(Normalizing case in your host name)"
1586 $ myhostname = mylowhostname
1589 $ fp = F$LOCATE(".",myhostname)
1590 $ mydomain = F$EXTRACT(fp,(F$LENGTH(myhostname)-fp)+1,myhostname)
1591 $ IF mydomain.NES."" !no periods in DECnet names like "MYDECNODE::"
1593 $ rp = "What is your domain name? [''mydomain'] "
1595 $ IF ans .nes. "" THEN mydomain = ans
1596 $!: translate upper to lower if necessary
1597 $ mydomain = F$EDIT(mydomain,"COLLAPSE")
1598 $ mylowdomain = F$EDIT(mydomain," LOWERCASE")
1599 $ IF mylowdomain.NES.mydomain
1601 $ echo "(Normalizing case in your domain name)"
1602 $ mydomain = mylowdomain
1605 $ myhostname = myhostname - mydomain
1606 $ echo "(Trimming domain name from host name--host name is now ''myhostname')"
1608 $ THEN TYPE SYS$INPUT:
1610 I need to get your e-mail address in Internet format if possible, i.e.
1611 something like user@host.domain. Please answer accurately since I have
1612 no easy means to double check it. The default value provided below
1613 is most probably close to the reality but may not be valid from outside
1614 your organization...
1616 $ dflt = "''cf_by'@''myhostname'"+"''mydomain'"
1617 $ rp = "What is your e-mail address? [''dflt'] "
1620 $ THEN cf_email = ans
1621 $ ELSE cf_email = dflt
1625 $ THEN TYPE SYS$INPUT:
1627 If you or somebody else will be maintaining perl at your site, please
1628 fill in the correct e-mail address here so that they may be contacted
1629 if necessary. Currently, the "perlbug" program included with perl
1630 will send mail to this address in addition to perlbug@perl.com. You may
1631 enter "none" for no administrator.
1633 $ dflt = "''cf_email'"
1634 $ rp = "Perl administrator e-mail address [''dflt'] "
1637 $ THEN perladmin = ans
1638 $ ELSE perladmin = dflt
1641 $!: determine where public executable scripts go
1642 $!: determine perl absolute location
1643 $!: figure out how to guarantee perl startup
1645 $!: see how we invoke the C preprocessor
1647 $! echo4 "Now, how can we feed standard input to your C preprocessor..." !>&4
1648 $!: Set private lib path
1649 $!: Now check and see which directories actually exist, avoiding duplicates
1650 $!: determine optimize, if desired, or use for debug flag also
1651 $!: We will not override a previous value, but we might want to
1652 $!: augment a hint file
1653 $!: the following weeds options from ccflags that are of no interest to cpp
1654 $!: flags used in final linking phase
1655 $!: Try to guess additional flags to pick up local libraries.
1658 $! echo4 "Checking your choice of C compiler and flags for coherency..." !>&4
1659 $!: compute shared library extension
1660 $!: Looking for optional libraries
1661 $!: see if nm is to be used to determine whether a symbol is defined or not
1662 $!: get list of predefined functions in a handy place
1663 $!: see if we have sigaction
1664 $!: see whether socketshr exists
1665 $ IF (F$SEARCH(F$PARSE("SocketShr","Sys$Share:.Exe")).NES."")
1667 $ has_socketshr = "T"
1669 $ echo4 "Hmm... Looks like you have SOCKETSHR's Berkeley networking support."
1671 $ if (Dec_C_Version .ge. 50200000)
1673 $ Has_Dec_C_Sockets = "T"
1675 $ echo4 "Hmm... Looks like you've got Dec C's Berkeley networking support."
1677 $ ! Hey, we've got both. Default to Dec C, then, since it's better
1678 $ if ("''Has_socketshr'".eq."T") .or.("''has_dec_c_sockets'".eq."T")
1681 $ echo "You've got sockets available. Which socket stack do you want to"
1682 $ echo "build into perl?"
1683 $ if "''has_dec_c_sockets'".eqs."T"
1687 $ dflt = "SOCKETSHR"
1689 $ rp = "Choose socket stack (NONE"
1690 $ if "''has_socketshr'".eqs."T" THEN rp = rp + ",SOCKETSHR"
1691 $ if "''has_dec_c_sockets'".eqs."T" THEN rp = rp + ",DECC"
1692 $ rp = rp + ") [''dflt'] "
1694 $ IF "''ans'".eqs."" THEN ans = "''dflt'"
1695 $ has_dec_c_sockets = "F"
1696 $ has_socketshr = "F"
1697 $ ans = F$EDIT(ans,"TRIM,COMPRESS,LOWERCASE")
1698 $ IF ans.eqs."decc" then has_dec_c_sockets = "T"
1699 $ IF ans.eqs."socketshr" then has_socketshr = "T"
1703 $! Ask if they want to build with VMS_DEBUG perl
1705 $ echo "Perl can be built to run under the VMS debugger."
1706 $ echo "You should only select this option if you are debugging"
1707 $ echo "perl itself. This can be a useful feature if you are "
1708 $ echo "embedding perl in a program."
1710 $ rp = "Build a VMS-DEBUG version of Perl? [''dflt'] "
1712 $ IF ans.eqs."" then ans = dflt
1713 $ IF F$EXTRACT(0, 1, F$EDIT(ans,"COLLAPSE,UPCASE")) .eqs. "Y"
1715 $ use_vmsdebug_perl = "Y"
1716 $ macros = macros + """__DEBUG__=1"","
1718 $ use_vmsdebug_perl = "N"
1721 $! Ask if they want to build with MULTIPLICITY
1723 $ echo "The perl interpreter engine can be built in a way that makes it
1724 $ echo "possible for a program that embeds perl into it (and yes, you can
1725 $ echo "do that--it's pretty keen) to have multiple perl interpreters active
1726 $ echo "at once. There is some performance overhead, however, so you
1727 $ echo "probably don't want to choose this unless you're going to be doing
1728 $ echo "funky perl embedding."
1730 $ rp = "Build with MULTIPLICITY? [''dflt'] "
1732 $ if ans.eqs."" then ans = dflt
1733 $ IF F$EXTRACT(0, 1, F$EDIT(ans,"COLLAPSE,UPCASE")) .eqs. "Y"
1735 $ use_multiplicity="Y"
1737 $ use_multiplicity="N"
1740 $! Ask if they want to build with 64-bit support
1741 $ if (Archname.eqs."VMS_AXP").and.("''f$extract(1,3, f$getsyi(""version""))'".ges."7.1")
1744 $ echo "This version of perl has experimental support for building with
1745 $ echo "64 bit integers and 128 bit floating point variables. This gives
1746 $ echo "a much larger range for perl's mathematical operations. (Note that
1747 $ echo "does *not* enable 64-bit fileops at the moment, as Dec C doesn't
1748 $ echo "do that yet)"
1749 $ dflt = use_64bitint
1750 $ rp = "Build with 64 bit integers and 128 bit floating point variable? [''dflt'] "
1752 $ if ans.eqs."" then ans = dflt
1753 $ if (f$extract(0, 1, "''ans'").eqs."Y").or.(f$extract(0, 1, "''ans'").eqs."y")
1761 $! Ask about threads, if appropriate
1762 $ if (Using_Dec_C.eqs."Yes")
1765 $ echo "This version of Perl can be built with threads. While really nifty,
1766 $ echo "they are a beta feature, and there is a speed penalty for perl
1767 $ echo "programs if you build with threads *even if you don't use them*
1769 $ rp = "Build with threads? [''dflt'] "
1771 $ if ans.eqs."" then ans = dflt
1772 $ if (f$extract(0, 1, "''ans'").eqs."Y").or.(f$extract(0, 1, "''ans'").eqs."y")
1775 $ ! Are they on VMS 7.1 on an alpha?
1776 $ if (Archname.eqs."VMS_AXP").and.("''f$extract(1,3, f$getsyi(""version""))'".ges."7.1")
1779 $ echo "Threaded perl can be linked to use multiple kernel threads
1780 $ echo "and system upcalls on VMS 7.1+ on Alpha systems. This feature
1781 $ echo "allows multiple threads to execute simultaneously on an SMP
1782 $ echo "system as well as preventing a single thread from blocking
1783 $ echo "all the threads in a program, even on a single-processor
1784 $ echo "machine. Unfortunately this feature isn't safe on an
1785 $ echo "unpatched 7.1 system. (Several OS patches were required when
1786 $ echo "this procedure was written)
1788 $ rp = "Enable multiple kernel threads and upcalls? [''dflt'] "
1790 $ if ans.eqs."" then ans="''dflt'"
1791 $ if f$extract(0, 1, f$edit(ans,"TRIM,COMPRESS,UPCASE")).eqs."Y"
1793 $ Thread_Live_Dangerously = "MT=MT=1"
1799 $! Ask whether they want to use secure logical translation when tainting
1801 $ echo "As Perl starts up, it checks several logical names, such as"
1802 $ echo "PERL5LIB and PERL_ENV_TABLES, which allow you to modify aspects"
1803 $ echo "of its behavior. For additional security, you may limit this"
1804 $ echo "process to executive- and kernel-mode translation when tainting"
1805 $ echo "is enabled. In this case, logical names normally skipped when"
1806 $ echo "tainting is enabled (e.g. PERL5OPTS) are translated as well."
1807 $ echo "If you do not choose to do this, the usual order of access modes"
1808 $ echo "is used for logical name translation."
1810 $ echo "This restriction does not apply to the %ENV hash or to implicit"
1811 $ echo "logical name translation during parsing of file specifications;"
1812 $ echo "these always use the normal sequence of access modes for logical"
1813 $ echo "name translation."
1815 $ rp = "Use secure logical name translation? [''dflt'] "
1817 $ if ans.eqs."" then ans="''dflt'"
1818 $ d_secintgenv = f$extract(0, 1, f$edit(ans,"TRIM,COMPRESS,UPCASE"))
1820 $! Ask whether they want to default filetypes
1822 $ echo "When you pass the name of a program to Perl on the command line,"
1823 $ echo "it generally doesn't supply any defaults unless the -S command"
1824 $ echo "line switch is specified. In keeping with the VMS tradition of"
1825 $ echo "default file types, however, you can configure Perl to try default"
1826 $ echo "file types of nothing, .pl, and .com, in that order (e.g. typing"
1827 $ echo """$ perl foo"" would cause Perl to look for foo., then foo.pl, and"
1828 $ echo "finally foo.com)."
1830 $ rp = "Always use default file types? [''dflt'] "
1832 $ if ans.eqs."" then ans="''dflt'"
1833 $ d_alwdeftype = f$extract(0, 1, f$edit(ans,"COLLAPSE,UPCASE"))
1835 $! Ask if they want to use perl's memory allocator
1837 $ echo "Perl has a built-in memory allocator that's tuned for perl's
1838 $ echo "normal memory usage. It's oftentimes better than the standard
1839 $ echo "system memory allocator. It also has the advantage of providing
1840 $ echo "memory allocation statistics, if you choose to enable them.
1842 $ rp = "Build with perl's memory allocator? [''dflt'] "
1844 $ if ans.eqs."" then ans="''dflt'"
1845 $ mymalloc = f$extract(0, 1, f$edit(ans,"COLLAPSE,UPCASE"))
1846 $ if mymalloc.eqs."Y"
1848 $ if use_debugging_perl.eqs."Y"
1851 $ echo "Perl can keep statistics on memory usage if you choose to use
1852 $ echo "them. This is useful for debugging, but does have some
1853 $ echo "performance overhead.
1855 $ rp = "Do you want the debugging memory allocator? [''dflt'] "
1857 $ if ans.eqs."" then ans="''dflt'"
1858 $ use_debugmalloc = f$extract(0, 1, f$edit(ans, "COLLAPSE,UPCASE"))
1860 $ ! Check which memory allocator we want
1862 $ echo "There are currently three different memory allocators: the
1863 $ echo "default (which is a pretty good general-purpose memory manager),
1864 $ echo "the TWO_POT allocator (which is optimized to save memory for
1865 $ echo "larger allocations), and PACK_MALLOC (which is optimized to save
1866 $ echo "memory for smaller allocations). They're all good, but if your
1867 $ echo "usage tends towards larger chunks use TWO_POT, otherwise use
1868 $ echo "PACK_MALLOC."
1870 $ rp = "Memory allocator (DEFAULT, TWO_POT, PACK_MALLOC) [''dflt'] "
1872 $ if ans.eqs."" then ans = "''dflt'"
1873 $ if ans.eqs."TWO_POT" then use_two_pot_malloc = "Y"
1874 $ if ans.eqs."PACK_MALLOC" then use_pack_malloc = "Y"
1877 $! Ask for their default list of extensions to build
1879 $ echo "It's time to specify which modules you want to build into
1880 $ echo "perl. Most of these are standard and should be chosen, though
1881 $ echo "you might, for example, want to build GDBM_File instead of
1882 $ echo "SDBM_File if you have the GDBM library built on your machine.
1883 $ echo "Whatever you do, make sure the re module is first or things will
1884 $ echo "break badly"
1886 $ echo "Which modules do you want to build into perl?"
1887 $! dflt = "Fcntl Errno File::Glob IO Opcode Byteloader Devel::Peek Devel::DProf Data::Dumper attrs re VMS::Stdio VMS::DCLsym B SDBM_File"
1888 $ dflt = "re Fcntl Errno File::Glob IO Opcode Devel::Peek Devel::DProf Data::Dumper attrs VMS::Stdio VMS::DCLsym B SDBM_File"
1889 $ if Using_Dec_C.eqs."Yes"
1891 $ dflt = dflt + " POSIX"
1892 $ if Use_Threads.eqs."T"
1894 $ dflt = dflt + " Thread"
1899 $ if ans.eqs."" then ans = "''dflt'"
1900 $ extensions = "''ans'"
1901 $ perl_known_extensions = "''dflt'"
1903 $! %Config-I-VMS, determine build/make utility here (make gmake mmk mms)
1905 $ echo "%Config-I-VMS, Checking your ""make"" utilities..."
1906 $! If the 'build' that you use is not here add it and it's test
1907 $! switch to the _END_ of these strings (and increment max_build)
1908 $! (e.g. builders = builders + "/FOOMAKE"
1909 $! probers = probers + " -fooVersionSwitch"
1910 $! ) & please let me know about it.
1911 $ builders = "IMAKE/GNUMAKE/MGMAKE/GMAKE/MAKE/MMS/MMK"
1912 $ probers = "-f Makefile. -v!-f Makefile. -v!-f Makefile. -v!-f Makefile. -v!-f Makefile. -v!/IDENT!/IDENT"
1918 $ OPEN/WRITE/ERROR=Open_error CONFIG Makefile.
1919 $ WRITE CONFIG "dont_make_anything_yet:"
1920 $ WRITE CONFIG F$FAO("!_")
1923 $ messages = F$ENVIRONMENT("MESSAGE")
1925 $ build = F$ELEMENT(n,"/",builders)
1926 $ probe = F$ELEMENT(n,"!",probers)
1927 $ echo "Testing whether you have ''build' on your system..."
1928 $ SET NOON !sorry :-(
1929 $ ON CONTROL_Y THEN GOTO Reenable_messages_build !sorry :-(
1930 $ SET MESSAGE/NOFAC/NOSEV/NOIDENT/NOTEXT !sorry :-(
1932 $ IF ($SEVERITY .EQ. 1)
1935 $ IF (build .EQS. orig_dflt)
1937 $ default_set = "TRUE"
1940 $ ok_builders = ok_builders + " " + build
1941 $ IF (.NOT. default_set) THEN dflt = build
1945 $Reenable_messages_build: !hope you made it here :-)
1946 $ SET MESSAGE 'messages' !hope you made it here :-)
1947 $ SET ON !hope you made it here :-)
1949 $ IF (n .LT. max_build) THEN GOTO Build_probe
1952 $ IF (ok_builders .NES. "")
1954 $ echo "Here is the list of builders you can apparently use:"
1955 $ echo "(",ok_builders," )"
1956 $ rp = "Which """"make"""" utility do you wish to use [''dflt']? "
1958 $ ans = F$EDIT(ans,"TRIM, COMPRESS")
1959 $ ans = F$EXTRACT(0,F$LOCATE(" ",ans),ans) !throw out "-f Makefile." here
1967 %Config-E-VMS, ERROR:
1968 Well this looks pretty serious. Perl5 cannot be compiled without a "make"
1969 utility of some sort and after checking my "builders" list I cannot find
1970 the symbol or command you use on your system to compile programs.
1972 $ READ SYS$COMMAND/PROMPT="%Config-I-VMS, Which ""MMS"" do you use? " ans
1973 $ ans = F$EDIT(ans,"TRIM, COMPRESS")
1974 $ ans = F$EXTRACT(0,F$LOCATE(" ",ans),ans) !throw out "-f Makefile." here
1977 $ echo "I don't know where 'make' is, and my life depends on it."
1978 $ echo "Go find a make program or fix your DCL$PATH setting!"
1979 $ echo "ABORTING..."
1980 $ SET DEFAULT 'vms_default_directory_name' !be kind rewind
1982 $ EXIT 2 !$STATUS = "%X00000002" (error)
1988 $ DELETE/NOLOG Makefile.;
1993 There seems to be trouble. I just tried to create a file in
1994 $ echo4 'F$ENVIRONMENT("DEFAULT")'
1996 but was unsuccessful. I am stopping now. Please check that directories'
1997 PROTECTION bits. I will leave you in the directory where you started
1999 $ echo4 "ABORTING..."
2005 $! echo " Very well I will proceed with ""''build'"""
2006 $ make = F$EDIT(build,"UPCASE")
2008 $!: locate the preferred pager for this system
2009 $!pagers = "most|more|less|type/page"
2010 $!rp='What pager is used on your system?'
2012 $! update [.vms]config.vms here
2014 $! update makefile here
2015 $! echo4 "Updating makefile..."
2017 $ IF (make .EQS. "MMS").OR.(make .EQS. "MMK")
2019 $ makefile = "" !wrt MANIFEST dir
2020 $ UUmakefile = "DESCRIP.MMS" !wrt CWD dir
2021 $ DEFmakefile = "DESCRIP.MMS" !wrt DEF dir (?)
2023 $ makefile = " -f [.VMS]Makefile." !wrt MANIFEST dir
2024 $ UUmakefile = "[-.VMS]Makefile." !wrt CWD dir
2025 $ DEFmakefile = "[-.VMS]Makefile." !wrt DEF dir (?)
2030 $ tmp = F$LENGTH(macros)
2031 $ macros = F$EXTRACT(0,(tmp-1),macros) !miss trailing comma
2032 $ macros = "/macro=(" + macros + ")"
2035 $! Invoke the subconfig piece
2038 $ echo4 "Checking the C run-time library"
2039 $ dflt = F$ENVIRONMENT("DEFAULT")
2040 $ SET DEFAULT [-.vms]
2044 $! Warn of dangerous symbols or logical names
2046 $Bad_environment: SUBROUTINE
2048 $ IF p2 .eqs. "SYMBOL"
2050 $ IF f$type('p1) .nes. "" THEN Bad_env := SYMBOL
2052 $ IF f$trnlnm(p1) .nes. "" THEN Bad_env := LOGICAL
2054 $ IF Bad_env .eqs. "SYMBOL" .or. Bad_env .eqs. "LOGICAL"
2056 $ IF f$search("config.msg") .nes. ""
2058 $ OPEN/APPEND CONFIG config.msg
2060 $ OPEN/WRITE CONFIG config.msg
2062 $ IF Bad_env .eqs. "SYMBOL"
2065 $ WRITE CONFIG "Symbol name ''p1' found in environment as " + &p1
2066 $ WRITE CONFIG " delete before building ''package' via:"
2067 $ WRITE CONFIG " $ DELETE/SYMBOL/GLOBAL ''p1'"
2068 $ IF f$locate("""",&p1) .ge. f$length(&p1)
2070 $ WRITE CONFIG " after building, testing, and installing ''package'
2071 $ WRITE CONFIG " restore the symbol with:"
2072 $ WRITE CONFIG " $ ''p1' == """ + &p1 + """"
2075 $ IF Bad_env .eqs. "LOGICAL"
2078 $ WRITE CONFIG "Logical name ''p1' found in environment as " + f$trnlnm(p1)
2079 $ WRITE CONFIG " deassign before building ''package'"
2085 $ ENDSUBROUTINE ! Bad_environment
2087 $ echo4 "%Config-I-VMS, Checking for dangerous pre extant global symbols and logical names."
2088 $ CALL Bad_environment "TMP"
2089 $ CALL Bad_environment "LIB"
2090 $ CALL Bad_environment "T"
2091 $ CALL Bad_environment "FOO"
2092 $ CALL Bad_environment "EXT"
2093 $ CALL Bad_environment "TEST" "SYMBOL"
2094 $ IF f$search("config.msg") .eqs. "" THEN echo "OK."
2096 $! %Config-I-VMS, write perl_setup.com here
2099 $ echo4 "%Config-I-VMS, The perl_setup.com file is now being written..."
2100 $ file_2_find = "[-.vms]perl_setup.com"
2101 $ OPEN/WRITE CONFIG 'file_2_find'
2103 $ WRITE CONFIG "$! Perl_Setup.com ''cf_time'"
2104 $ IF cf_email.NES.perladmin
2106 $ WRITE CONFIG "$! perl configured by ''cf_email'"
2108 $ WRITE CONFIG "$! This perl configured & administered by ''perladmin'"
2111 $ prefix = prefix - "000000."
2112 $ IF F$LOCATE(".]",prefix) .EQ. F$LENGTH(prefix) THEN -
2113 prefix = prefix - "]" + ".]"
2114 $ WRITE CONFIG "$ define/translation=concealed Perl_Root ''prefix'"
2115 $ write config "$ ext = "".exe"""
2116 $ if sharedperl .eqs. "Y"
2118 $ write config "$ if f$getsyi(""ARCH_NAME"") .nes. ""VAX"" then ext = "".AXE"""
2120 $ IF use_vmsdebug_perl .eqs. "Y"
2122 $ WRITE CONFIG "$ dbgperl :== $Perl_Root:[000000]dbgPerl'ext'"
2123 $ WRITE CONFIG "$ perl :== $Perl_Root:[000000]ndbgPerl'ext'"
2124 $ WRITE CONFIG "$ define dbgPerlShr Perl_Root:[000000]dbgPerlShr'ext'"
2126 $ WRITE CONFIG "$ perl :== $Perl_Root:[000000]Perl'ext'"
2127 $ WRITE CONFIG "$ define PerlShr Perl_Root:[000000]PerlShr'ext'"
2132 $ WRITE CONFIG "$ define SYS$TIMEZONE_DIFFERENTIAL ''tzd'"
2133 $ ELSE !leave in but commented out (in case setting was from perl :-)
2134 $ WRITE CONFIG "$! define SYS$TIMEZONE_DIFFERENTIAL ''tzd'"
2137 $ WRITE CONFIG "$! Symbols for commonly used scripts:"
2139 $ WRITE CONFIG "$ Perldoc == ""'"+"'Perl' Perl_Root:[lib.pod]Perldoc.com -t"""
2143 $ echo "%Config-I-VMS, The file can be found at:"
2144 $ echo4 "-Config-I-VMS, ''F$SEARCH(file_2_find)'"
2145 $ echo "-Config-I-VMS, Add that file (or an @ call to it) to your [SY]LOGIN.COM"
2146 $ echo "-Config-I-VMS, when you are satisfied with a successful compilation,"
2147 $ echo "-Config-I-VMS, testing, and installation of your perl."
2150 $!figure out where we "are" by parsing 'vms_default_directory_name'
2152 $ set_def_command = ""
2153 $ dflt = F$ENVIRONMENT("DEFAULT") - ".UU]"
2154 $ tmp = vms_default_directory_name - dflt - "]"
2156 $ IF tmp .EQS. "" THEN GOTO Beyond_set_def_loop
2158 $ tmp1 = F$ELEMENT(i,".",tmp)
2159 $ IF tmp1 .EQS. "." THEN GOTO Beyond_set_def_loop
2161 $ THEN set_def_command = "set default [-"
2162 $ ELSE set_def_command = set_def_command + "-"
2166 $Beyond_set_def_loop:
2167 $ IF set_def_command.NES.""
2169 $ set_def_command = set_def_command - "-" + "]"
2171 $ echo4 "In order to build ''package' you must now issue the commands:"
2173 $ echo4 " ''set_def_command'"
2176 $ echo4 "In order to build ''package' you must now issue the command:"
2179 $ echo4 " ''make'''makefile'", macros
2182 $ IF ( F$SEARCH("config.msg").NES."" )
2184 $ echo "Hmm. I also noted the following information while running:"
2187 $ SET PROTECTION=(SYSTEM:RWED,OWNER:RWED) config.msg
2188 $ DELETE/NOLOG/NOCONFIRM config.msg;
2194 $ DEASSIGN SYS$OUTPUT
2195 $! DEASSIGN SYS$ERROR
2197 $ IF F$GETJPI("","FILCNT").NE.vms_filcnt THEN CLOSE CONFIG
2198 $ IF F$GETJPI("","FILCNT").NE.vms_filcnt
2199 $ THEN WRITE SYS$ERROR "%Config-W-VMS, WARNING: There is a file still open"
2201 $ dflt = F$ENVIRONMENT("DEFAULT")
2202 $ IF F$LOCATE("UU]",dflt).EQS.(F$LENGTH(dflt)-3)
2204 $ IF ( F$SEARCH("[]*.*").NES."" ) THEN DELETE/NOLOG/NOCONFIRM []*.*;*
2206 $ SET PROTECTION=(SYSTEM:RWED,OWNER:RWED) UU.DIR
2207 $ DELETE/NOLOG/NOCONFIRM UU.DIR;
2209 $ SET DEFAULT 'vms_default_directory_name' !be kind rewind
2212 $!: End of Configure