2460 lines
80 KiB
Plaintext
2460 lines
80 KiB
Plaintext
$ sav_ver = 'F$VERIFY(0)'
|
|
$! SET VERIFY
|
|
$!
|
|
$! For example, if you unpacked perl into: [USER.PERL5_00n...] then you will
|
|
$! want to cd into the tree and execute Configure:
|
|
$!
|
|
$! $ SET DEFAULT [USER.PERL5_xxx]
|
|
$! $ @Configure
|
|
$!
|
|
$! or
|
|
$!
|
|
$! $ SET DEFAULT [USER.PERL5_xxx]
|
|
$! $ @Configure "-des"
|
|
$!
|
|
$! That's it. If you get into a bind trying to build perl on VMS then
|
|
$! definitely read through the README.VMS file.
|
|
$! Beyond that send email to vmsperl@perl.org
|
|
$!
|
|
$! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
$!
|
|
$! send suggestions to:
|
|
$! Dan Sugalski <dan@sidhe.org>
|
|
$! Thank you!!!!
|
|
$!
|
|
$! Adapted and converted from Larry Wall & Andy Dougherty's
|
|
$! "Configure generated by metaconfig 3.0 PL60." by Peter Prymmer
|
|
$! (a Bourne sh[ell] script for configuring the installation of perl
|
|
$! on non-VMS systems) in the perl5.002|3 epoch (spring/summer 1996)
|
|
$! with much valuable help from Charles Bailey &
|
|
$! the whole VMSPerl crew.
|
|
$! Extended and messed about with by Dan Sugalski
|
|
$!
|
|
$ sav_ver = F$VERIFY(0)
|
|
$!
|
|
$! VMS-isms we will need:
|
|
$ echo = "write sys$output "
|
|
$ cat = "type"
|
|
$ gcc_symbol = "gcc"
|
|
$ ans = ""
|
|
$ macros = ""
|
|
$ extra_flags = ""
|
|
$ user_c_flags = ""
|
|
$ use_ieee_math = "n"
|
|
$ be_case_sensitive = "n"
|
|
$ use_vmsdebug_perl = "n"
|
|
$ use64bitall = "n"
|
|
$ use64bitint = "n"
|
|
$ C_Compiler_Replace = "CC="
|
|
$ Thread_Live_Dangerously = "MT="
|
|
$ use_two_pot_malloc = "N"
|
|
$ use_pack_malloc = "N"
|
|
$ use_debugmalloc = "N"
|
|
$ d_secintgenv = "N"
|
|
$ cc_flags = ""
|
|
$ use_multiplicity = "N"
|
|
$ vms_default_directory_name = F$ENVIRONMENT("DEFAULT")
|
|
$ max_allowed_dir_depth = 3 ! e.g. [A.B.PERL5_xxx] not [A.B.C.PERL5_xxx]
|
|
$! max_allowed_dir_depth = 2 ! e.g. [A.PERL5_xxx] not [A.B.PERL5_xxx]
|
|
$!
|
|
$ vms_filcnt = F$GETJPI ("","FILCNT")
|
|
$!
|
|
$!: compute my invocation name
|
|
$ me = F$ENVIRONMENT("PROCEDURE")
|
|
$!
|
|
$! Many null statements (begin with colon ':') in the Bourne shell version of
|
|
$! this script serve as comments/placeholders. I have retained some of the ones
|
|
$! that will help you compare this .COM file to the sh version - as well as
|
|
$! leave placeholders for future improvements to this .COM file.
|
|
$! sfn = VMS "skipped for now"
|
|
$!
|
|
$!: Proper PATH separator !sfn
|
|
$!: Proper PATH setting !sfn
|
|
$!: Sanity checks !sfn "Say '@''$me''"
|
|
$!: On HP-UX, large Configure scripts may exercise a bug in /bin/sh !sfn
|
|
$!: Configure runs within the UU subdirectory !->after find MANIFEST
|
|
$! <big long list of default values (mostly null)>
|
|
$!: We must find out about Eunice early !(?)
|
|
$!: list of known cpp symbols, sorted alphabetically !sfn
|
|
$! al = al + "..."
|
|
$!: default library list !sfn
|
|
$! <no hints files in use (yet?)>
|
|
$!: Extra object files, if any, needed on this platform. !sfn
|
|
$!: Possible local include directories to search. !sfn
|
|
$!: Set locincpth to "" in a hint file to defeat local include searches. !sfn
|
|
$!locincpth="/usr/local/include /opt/local/include /usr/gnu/include" !sfn
|
|
$!locincpth="$locincpth /opt/gnu/include /usr/GNU/include /opt/GNU/include"
|
|
$!: no include file wanted by default !sfn
|
|
$!inclwanted='' !sfn
|
|
$!: Possible local library directories to search. !sfn
|
|
$!loclibpth="/usr/local/lib /opt/local/lib /usr/gnu/lib" !sfn
|
|
$!loclibpth="$loclibpth /opt/gnu/lib /usr/GNU/lib /opt/GNU/lib" !sfn
|
|
$!: general looking path for locating libraries !sfn
|
|
$!glibpth="/lib/pa1.1 /usr/shlib /usr/lib/large /lib /usr/lib" !sfn
|
|
$!glibpth="$glibpth $xlibpth /lib/large /usr/lib/small /lib/small" !sfn
|
|
$!glibpth="$glibpth /usr/ccs/lib /usr/ucblib /usr/shlib" !sfn
|
|
$!: Private path used by Configure to find libraries. Its value !sfn
|
|
$!: is prepended to libpth. This variable takes care of special !sfn
|
|
$!: machines, like the mips. Usually, it should be empty. !sfn
|
|
$!plibpth='' !sfn
|
|
$!: full support for void wanted by default !sfn
|
|
$!defvoidused=15 !sfn
|
|
$!: List of libraries we want. !sfn
|
|
$!libswanted='net socket inet nsl nm ndbm gdbm dbm db malloc dl' !sfn
|
|
$!libswanted="$libswanted dld ld sun m c cposix posix ndir dir crypt" !sfn
|
|
$!libswanted="$libswanted ucb bsd BSD PW x" !sfn
|
|
$!: We probably want to search /usr/shlib before most other libraries. !sfn
|
|
$!: This is only used by the lib/ExtUtils/MakeMaker.pm routine extliblist. !sfn
|
|
$!glibpth=`echo " $glibpth " | sed -e 's! /usr/shlib ! !'` !sfn
|
|
$!glibpth="/usr/shlib $glibpth" !sfn
|
|
$!: Do not use vfork unless overridden by a hint file. !sfn
|
|
$!usevfork=false !sfn
|
|
$!: script used to extract .SH files with variable substitutions !sfn
|
|
$!: produce awk script to parse command line options !sfn
|
|
$!sfn (assume no sed awk) see below
|
|
$!: process the command line options
|
|
$!
|
|
$!: set up default values
|
|
$ fastread=""
|
|
$ reuseval="false"
|
|
$ maniskip = "false"
|
|
$ config_sh=""
|
|
$ alldone=""
|
|
$ error=""
|
|
$ silent=""
|
|
$ extractsh=""
|
|
$ override=""
|
|
$ knowitall=""
|
|
$ Using_Dec_C = ""
|
|
$ Using_Gnu_C = ""
|
|
$ Dec_C_Version = ""
|
|
$ use_threads = "F"
|
|
$ use_5005_threads = "N"
|
|
$ use_ithreads = "N"
|
|
$!
|
|
$!: option parsing
|
|
$ config_args = ""
|
|
$ IF (P1 .NES. "")
|
|
$ THEN !one or more switches was thrown
|
|
$ i = 1
|
|
$ bang = 0
|
|
$Param_loop:
|
|
$ IF (P'i'.NES."")
|
|
$ THEN
|
|
$ bang = bang + 1
|
|
$ config_args = config_args + F$FAO(" !AS",P'i')
|
|
$ ENDIF
|
|
$ i = i + 1
|
|
$ IF (i.LT.9) THEN GOTO Param_loop !DCL allows P1..P8
|
|
$!
|
|
$ i = 1
|
|
$Opt_loop:
|
|
$ IF (F$EXTRACT(0,1,P'i') .EQS. "-") THEN P'i' = P'i' - "-"
|
|
$ IF (F$EXTRACT(0,1,P'i') .EQS. "/") THEN P'i' = P'i' - "/"
|
|
$Remove_quotation_mark:
|
|
$ P'i' = P'i' - """"
|
|
$ IF F$LOCATE("""",P'i') .LT. F$LENGTH(P'i') THEN GOTO Remove_quotation_mark
|
|
$ gotopt = "f" !"alse"
|
|
$ gotshortopt = "f" !"alse"
|
|
$ IF (F$EXTRACT(0,1,P'i') .EQS. "d")
|
|
$ THEN
|
|
$ fastread = "yes"
|
|
$ gotopt = "t" !"rue"
|
|
$ P'i' = P'i' - "d"
|
|
$ gotshortopt = "t" !"rue"
|
|
$ ENDIF
|
|
$ IF (F$EXTRACT(0,1,P'i') .EQS. "e")
|
|
$ THEN
|
|
$ alldone = "cont"
|
|
$ gotopt = "t"
|
|
$ P'i' = P'i' - "e"
|
|
$ gotshortopt = "t"
|
|
$ ENDIF
|
|
$ IF (F$EXTRACT(0,1,P'i') .EQS. "f") !"-f")
|
|
$ THEN
|
|
$ P'i' = P'i' - "f"
|
|
$ config_sh = P'i'
|
|
$ IF (F$SEARCH(config_sh).NES."")
|
|
$ THEN
|
|
$ test_config_sh = F$FILE_ATTRIBUTES(config_sh,"PRO")
|
|
$ IF (F$LOCATE("R",test_config_sh).NE.F$LENGTH(test_config_sh))
|
|
$ THEN
|
|
$ CONTINUE !at this point check UIC && if test allows...
|
|
$ !to be continued ?
|
|
$ ELSE
|
|
$ echo "''me': cannot read config file ''config_sh'."
|
|
$ error="true"
|
|
$ ENDIF
|
|
$ ELSE
|
|
$ echo "''me': cannot read config file ''config_sh'."
|
|
$ error="true"
|
|
$ ENDIF
|
|
$ gotopt = "t"
|
|
$ ENDIF
|
|
$ IF (F$EXTRACT(0,1,P'i') .EQS. "h")
|
|
$ THEN
|
|
$ error = "true"
|
|
$ gotopt = "t"
|
|
$ P'i' = P'i' - "h"
|
|
$ gotshortopt = "t"
|
|
$ ENDIF
|
|
$ IF (F$EXTRACT(0,1,P'i') .EQS. "m")
|
|
$ THEN
|
|
$ maniskip = "true"
|
|
$ gotopt = "t"
|
|
$ P'i' = P'i' - "m"
|
|
$ gotshortopt = "t"
|
|
$ ENDIF
|
|
$ IF (F$EXTRACT(0,1,P'i') .EQS. "r")
|
|
$ THEN
|
|
$ reuseval = "true"
|
|
$ gotopt = "t"
|
|
$ P'i' = P'i' - "r"
|
|
$ gotshortopt = "t"
|
|
$ ENDIF
|
|
$ IF (F$EXTRACT(0,1,P'i') .EQS. "s")
|
|
$ THEN
|
|
$ silent = "true"
|
|
$ gotopt = "t"
|
|
$ P'i' = P'i' - "s"
|
|
$ gotshortopt = "t"
|
|
$ ENDIF
|
|
$ IF (F$EXTRACT(0,1,P'i') .EQS. "E") !"-E")
|
|
$ THEN
|
|
$ alldone = "exit"
|
|
$ gotopt = "t"
|
|
$ ENDIF
|
|
$ IF (F$EXTRACT(0,1,P'i') .EQS. "K") !"-K")
|
|
$ THEN
|
|
$ knowitall = "true"
|
|
$ gotopt = "t"
|
|
$ P'i' = P'i' - "K"
|
|
$ gotshortopt = "t"
|
|
$ ENDIF
|
|
$ IF (F$EXTRACT(0,1,P'i') .EQS. "O")
|
|
$ THEN
|
|
$ override = "true"
|
|
$ gotopt = "t"
|
|
$ P'i' = P'i' - "O"
|
|
$ gotshortopt = "t"
|
|
$ ENDIF
|
|
$ IF (F$EXTRACT(0,1,P'i') .EQS. "S") !"-S")
|
|
$ THEN
|
|
$ extractsh = "true" !VMS?
|
|
$ gotopt = "t"
|
|
$ P'i' = P'i' - "S"
|
|
$ gotshortopt = "t"
|
|
$ ENDIF
|
|
$ IF (F$EXTRACT(0,1,P'i') .EQS. "D") !"-D")
|
|
$ THEN
|
|
$ P'i' = P'i' - "D"
|
|
$!Hmm.. this part needs work
|
|
$! P'i'
|
|
$ IF (F$LOCATE("=",P'i') .EQ. F$LENGTH(P'i'))
|
|
$ THEN
|
|
$ P'i' = "define"
|
|
$ ELSE
|
|
$ IF (F$LOCATE("=",P'i') .EQ. (F$LENGTH(P'i') - 1))
|
|
$ THEN
|
|
$ me = F$PARSE(me,,,"NAME") + F$PARSE(me,,,"TYPE")
|
|
$ echo "''me': use '-Usymbol=val' not '-Dsymbol='."
|
|
$ echo "''me': ignoring -D",P'i'
|
|
$ ELSE
|
|
$!Hmm.. this part needs work
|
|
$! 'F$EXTRACT(0,F$LOCATE("=",P'i'),P'i')' = -
|
|
$! 'F$EXTRACT(F$LOCATE("=",P'i'),P'i'),F$LENGTH(P'i'),P'i')'
|
|
$ ENDIF
|
|
$ ENDIF
|
|
$ ECHO "P''i' =>",P'i',"<=" !Diag
|
|
$ gotopt = "t"
|
|
$ ENDIF
|
|
$ IF (F$EXTRACT(0,1,P'i') .EQS. "U") !"-U")
|
|
$ THEN
|
|
$ P'i' = P'i' - "U"
|
|
$ IF (F$LOCATE("=",P'i') .EQ. F$LENGTH(P'i'))
|
|
$ THEN
|
|
$ P'i' = ""
|
|
$ ELSE
|
|
$ IF (F$LOCATE("=",P'i') .LT. (F$LENGTH(P'i') - 1))
|
|
$ THEN
|
|
$ me = F$PARSE(me,,,"NAME") + F$PARSE(me,,,"TYPE")
|
|
$ echo "''me': use '-Dsymbol=val' not '-Usymbol=val'."
|
|
$ echo "''me': ignoring -U",P'i'
|
|
$ ELSE
|
|
$ P'i' = "undef"
|
|
$ ENDIF
|
|
$ ENDIF
|
|
$ ECHO "P''i' =>",P'i',"<=" !Diag
|
|
$ gotopt = "t"
|
|
$ ENDIF
|
|
$ IF (F$EXTRACT(0,1,P'i') .EQS. "V")
|
|
$ THEN
|
|
$ me = F$PARSE(me,,,"NAME") + F$PARSE(me,,,"TYPE")
|
|
$ echo "''me' generated by an unknown version of EDT."
|
|
$ STOP
|
|
$ EXIT !0
|
|
$ ENDIF
|
|
$ IF .NOT.gotopt
|
|
$ THEN
|
|
$ echo "''me': unknown option ",P'i'
|
|
$ error = "true"
|
|
$ ENDIF
|
|
$ IF (F$LENGTH(P'i').GT.0).AND.(gotshortopt) THEN i = i - 1 !clustered switch
|
|
$ i = i + 1
|
|
$ IF (i .LT. (bang + 1)) THEN GOTO Opt_loop
|
|
$!
|
|
$ ENDIF ! (P1 .NES. "")
|
|
$ config_args = F$EDIT(config_args,"TRIM")
|
|
$!
|
|
$ IF (error)
|
|
$ THEN
|
|
$ me = F$PARSE(me,,,"DIRECTORY")+ F$PARSE(me,,,"NAME")
|
|
$ echo "Usage: @''me' [-dehmrEKOSV] [-fconfig.sh] [-Dsymbol] [-Dsymbol=value]"
|
|
$ echo " [-Usymbol] [-Usymbol=]"
|
|
$ TYPE SYS$INPUT
|
|
"-d" : use defaults for all answers.
|
|
"-e" : go on without questioning past the production of config.sh. *
|
|
"-f" : specify an alternate default configuration file.
|
|
"-h" : print this help message and exit (with an error status).
|
|
"-m" : skip the MANIFEST check to see that all files are present
|
|
"-r" : reuse C symbols value if possible (skips costly nm extraction).*
|
|
"-s" : silent mode, only echoes questions and essential information.
|
|
-"D" : define symbol to have some value: *
|
|
-"Dsymbol" symbol gets the value 'define'
|
|
-"Dsymbol=value" symbol gets the value 'value'
|
|
-E : stop at the end of questions, after having produced config.sh. *
|
|
-K : do not use unless you know what you are doing.
|
|
-O : let -D and -U override definitions from loaded configuration file. *
|
|
-S : perform variable substitutions on all .SH files (can mix with -f) *
|
|
-"U" : undefine symbol: *
|
|
-"Usymbol" symbol gets the value 'undef'
|
|
-"Usymbol=" symbol gets completely empty
|
|
-V : print version number and exit (with a zero status).
|
|
$ echo "%Config-I-VMS, lower case switches must be enclosed"
|
|
$ echo "-Config-I-VMS, in double quotation marks, e.g.:"
|
|
$ echo "-Config-I-VMS, @Configure ""-des"""
|
|
$ echo "-Config-I-VMS, * indicates switch may not be fully implemented for VMS."
|
|
$ SET DEFAULT 'vms_default_directory_name' !be kind rewind
|
|
$ STOP
|
|
$ EXIT 3 ! $STATUS = "%X00000003" (informational)
|
|
$ ENDIF
|
|
$!
|
|
$ GOTO Check_silence
|
|
$!
|
|
$Shut_up:
|
|
$ IF F$Mode() .eqs. "BATCH"
|
|
$ THEN
|
|
$ STDOUT = F$GetQuI("DISPLAY_JOB","LOG_SPECIFICATION",,"THIS_JOB")
|
|
$ WRITE SYS$OUTPUT "Warning: Executing in batch mode. To avoid file locking conflicts,"
|
|
$ WRITE SYS$OUTPUT "output intended for SYS$OUTPUT will be sent to a new version"
|
|
$ WRITE SYS$OUTPUT STDOUT
|
|
$ ELSE
|
|
$ STDOUT = F$TRNLNM("SYS$OUTPUT")
|
|
$ ENDIF
|
|
$ DEFINE SYS$OUTPUT "_NLA0:"
|
|
$ echo4 = "write STDOUT "
|
|
$ cat4 = "TYPE/OUTPUT=''STDOUT'"
|
|
$ open/write/share=read STDOUT 'STDOUT'
|
|
$ RETURN
|
|
$!
|
|
$Check_silence:
|
|
$ IF (silent)
|
|
$ THEN
|
|
$ GOSUB Shut_up
|
|
$ ELSE
|
|
$ echo4 = "write SYS$OUTPUT "
|
|
$ cat4 = "TYPE"
|
|
$ ENDIF
|
|
$!
|
|
$!: run the defines and the undefines, if any, but leave the file out there...
|
|
$! Unfortunately Configure.COM in DCL is not yet set up to do this -
|
|
$! maybe someday
|
|
$!
|
|
$!: set package name
|
|
$ package = "perl5"
|
|
$ packageup = F$EDIT((package - "5"),"UPCASE")
|
|
$!
|
|
$!: Eunice requires " " instead of "", can you believe it
|
|
$ echo ""
|
|
$!: Here we go...
|
|
$ echo "Beginning of configuration questions for ''package'."
|
|
$ echo ""
|
|
$!
|
|
$!: Some greps do not return status, grrr.
|
|
$ contains = "SEARCH"
|
|
$!
|
|
$!: first determine how to suppress newline on echo command !cant DCL is record oriented
|
|
$! echo "Checking ''echo' to see how to suppress newlines..."
|
|
$! echo "giving up..."
|
|
$! echo "The star should be here-->*"
|
|
$!
|
|
$!: Now test for existence of everything in MANIFEST
|
|
$ echo ""
|
|
$ echo4 "First let's make sure your kit is complete. Checking..."
|
|
$ manifestfound = ""
|
|
$ miss_list = ""
|
|
$! Here I assume we are in the [foo.PERL5xxx.VMS...] tree
|
|
$! because the search routine simply does set def [-] if necessary.
|
|
$ file_2_find = "MANIFEST" !I hope this one is not in [foo.PERL5xxx.VMS...]
|
|
$Research_manifest:
|
|
$ manifestfound = F$SEARCH(file_2_find)
|
|
$ IF (manifestfound .EQS. "")
|
|
$ THEN
|
|
$ IF F$PARSE(F$ENVIRONMENT("DEFAULT"),,,"DIRECTORY",).NES."[000000]"
|
|
$ THEN
|
|
$ SET DEFAULT [-]
|
|
$ GOTO Research_manifest
|
|
$ ELSE
|
|
$ echo ""
|
|
$ echo "There is no MANIFEST file. I hope your kit is complete !"
|
|
$ miss_list = ""
|
|
$ GOTO Beyond_manifest
|
|
$ ENDIF
|
|
$ ELSE
|
|
$! MANIFEST. has been found and we have set def'ed there -
|
|
$! time to bail out before it's too late.
|
|
$ tmp = f$extract(1,3,f$edit(f$getsyi("VERSION"),"TRIM,COLLAPSE"))
|
|
$ IF (tmp .GES. "7.2") .AND. (F$GETSYI("HW_MODEL") .GE. 1024) THEN GOTO Beyond_depth_check
|
|
$ IF (F$ELEMENT(max_allowed_dir_depth,".",F$ENVIRONMENT("Default")).nes.".")
|
|
$ THEN
|
|
$ TYPE SYS$INPUT:
|
|
%Config-E-VMS, ERROR:
|
|
Sorry! It apears as though your perl build sub-directory is already too
|
|
deep into the VMS file system. Please try moving stuff into a shallower
|
|
directory (or altering the "max_allowed_dir_depth" parameter).
|
|
$ echo4 "ABORTING..."
|
|
$ SET DEFAULT 'vms_default_directory_name' !be kind rewind
|
|
$ STOP
|
|
$ EXIT !2 !$STATUS = "%X00000002" (error)
|
|
$ ENDIF
|
|
$Beyond_depth_check:
|
|
$!
|
|
$! after finding MANIFEST let's create (but not yet enter) the UU subdirectory
|
|
$!
|
|
$ IF (manifestfound .NES. "")
|
|
$ THEN
|
|
$ IF ( F$SEARCH("UU.DIR").EQS."" )
|
|
$ THEN
|
|
$ CREATE/DIRECTORY [.UU]
|
|
$ ELSE
|
|
$ IF ( F$SEARCH("[.UU]*.*").NES."" ) THEN DELETE/NOLOG [.UU]*.*;*
|
|
$ ENDIF
|
|
$!: Configure runs within the UU subdirectory
|
|
$ SET DEFAULT [.UU]
|
|
$!
|
|
$! a little redundancy never hurt anybody?
|
|
$ file_2_find = "[-]" + file_2_find
|
|
$ manifestfound = F$SEARCH(file_2_find)
|
|
$!
|
|
$ OPEN/WRITE MISSING MISSING.
|
|
$!change to "FALSE" if you wish to skip the manifest search
|
|
$!(which after all is rather slow in DCL :-)
|
|
$ IF (maniskip)
|
|
$ THEN
|
|
$ echo "Skipping MANIFEST check as requested"
|
|
$ ELSE
|
|
$!
|
|
$ OPEN/READ CONFIG 'manifestfound'
|
|
$Read_loop_manifest:
|
|
$ READ/END_OF_FILE = Done_manifest CONFIG line
|
|
$! This algorithm turns "foo/bar/baz.c" into "[.foo.bar]baz.c"
|
|
$! pvhp@lns62.lns.cornell.edu 10-JUN-1996 20:31:46
|
|
$! 2-MAR-1998 15:46:11 Improved to turn "foo/bar/baz.c.buz"
|
|
$! into "[.foo.bar]baz.c_buz as happens with vmstar and unzip
|
|
$ line = F$EDIT(line,"TRIM, COMPRESS")
|
|
$ file_2_find = F$EXTRACT(0,F$LOCATE(" ",line),line)
|
|
$ IF F$LOCATE("/",file_2_find) .NE. F$LENGTH(file_2_find)
|
|
$ THEN
|
|
$Re_strip_line_manifest:
|
|
$ loca = F$LOCATE("/",file_2_find)
|
|
$ ante = F$EXTRACT(0,loca,file_2_find)
|
|
$ post = F$EXTRACT(loca,F$LENGTH(file_2_find),file_2_find)
|
|
$ test_this = ante + "." + (post - "/")
|
|
$ IF F$LOCATE("/",test_this) .NE. F$LENGTH(test_this)
|
|
$ THEN
|
|
$ file_2_find = ante + "." + (post - "/")
|
|
$ GOTO Re_strip_line_manifest
|
|
$ ELSE
|
|
$ file_2_find = ante + "]" + (post - "/")
|
|
$ ENDIF
|
|
$ file_2_find = "[-."+file_2_find
|
|
$ ELSE
|
|
$ file_2_find = "[-]" + file_2_find
|
|
$ ENDIF
|
|
$!
|
|
$ dirname = F$EXTRACT(0,F$LOCATE("]",file_2_find),file_2_find) + "]"
|
|
$ file_2_find = file_2_find - dirname
|
|
$ dots = 0
|
|
$Dot_loop:
|
|
$ dot_ele = F$ELEMENT(dots,".",file_2_find)
|
|
$ IF dot_ele .EQS. "." THEN GOTO Eo_dot_loop
|
|
$ IF dots .eq. 0
|
|
$ THEN basename = f$extract(0,f$locate(".",file_2_find),file_2_find) + "."
|
|
$ ELSE basename = basename + dot_ele + "_"
|
|
$ ENDIF
|
|
$ dots = dots + 1
|
|
$ GOTO dot_loop
|
|
$Eo_dot_loop:
|
|
$ IF (((f$length(file_2_find)+1) .eq. f$length(basename)) .and. -
|
|
(f$extract(f$length(basename)-1,1,basename) .eqs. "_")) THEN -
|
|
basename = f$extract(0,f$length(basename)-1,basename)
|
|
$ file_2_find = dirname + basename
|
|
$!
|
|
$ found = F$SEARCH(file_2_find)
|
|
$ IF (found .EQS. "" .AND. dots .GT. 2)
|
|
$ THEN
|
|
$! 17-DEC-1999 Improved to turn "[.foo.bar]baz.c_buz" into
|
|
$! "[.foo.bar]baz_c.buz" to cover unzipped archives and put
|
|
$! "[.foo.bar]baz.c_buz,baz_c.buz" into missing list if neither is found.
|
|
$ basename[f$locate(".",basename),1] := _
|
|
$ dot_ele = F$ELEMENT(dots - 1,"_",basename)
|
|
$ basename = -
|
|
f$extract(0,f$length(basename)-(f$length(dot_ele)+1),basename) -
|
|
+ "." + dot_ele
|
|
$ found = F$SEARCH(dirname + basename)
|
|
$ file_2_find = file_2_find + "," + basename
|
|
$ ENDIF
|
|
$ IF (found .EQS. "")
|
|
$ THEN
|
|
$ WRITE MISSING file_2_find
|
|
$ IF ((F$LENGTH(miss_list)+F$LENGTH(file_2_find)).LT.250)
|
|
$ THEN
|
|
$ miss_list = miss_list + "," + file_2_find
|
|
$ ENDIF
|
|
$ ENDIF
|
|
$ GOTO Read_loop_manifest
|
|
$Done_manifest:
|
|
$ CLOSE CONFIG
|
|
$ ENDIF !"TRUE"
|
|
$ CLOSE MISSING
|
|
$ ENDIF ! (manifestfound .NES. "")
|
|
$Beyond_manifest:
|
|
$ IF (miss_list .NES. "")
|
|
$ THEN
|
|
$ echo "Some of the files not found include:"
|
|
$ cat4 MISSING.
|
|
$ ENDIF
|
|
$ IF ((miss_list .NES. "").OR.(manifestfound .EQS. ""))
|
|
$ THEN
|
|
$ TYPE SYS$INPUT:
|
|
|
|
THIS PACKAGE SEEMS TO BE INCOMPLETE.
|
|
|
|
You have the option of continuing the configuration process, despite the
|
|
distinct possibility that your kit is damaged, by typing 'y'es. If you
|
|
do, don't blame me if something goes wrong. I advise you to type 'n'o
|
|
and contact the author (dan@sidhe.org)
|
|
|
|
$ READ SYS$COMMAND/PROMPT="Continue? [n] " ans
|
|
$ IF ans
|
|
$ THEN
|
|
$ echo4 "Continuing..."
|
|
$ ELSE
|
|
$ echo4 "ABORTING..."
|
|
$ GOTO Clean_up
|
|
$ ENDIF
|
|
$ ELSE
|
|
$ echo4 "Looks good..."
|
|
$ DELETE/NOLOG MISSING.;
|
|
$ ENDIF ! (miss_list .NES. "")
|
|
$ ENDIF ! (manifestfound .EQS. "") ELSE
|
|
$!
|
|
$! after finding MANIFEST (see above)
|
|
$!: Configure runs within the UU subdirectory
|
|
$!
|
|
$!: compute the number of columns on the terminal for proper question formatting
|
|
$! (sfn, will assume 80-ish)
|
|
$!
|
|
$!: set up the echo used in my read !sfn
|
|
$!: now set up to do reads with possible shell escape and default assignment !sfn
|
|
$ GOTO Beyond_myread
|
|
$!
|
|
$myread:
|
|
$ ans = ""
|
|
$ If (fastread)
|
|
$ Then
|
|
$ echo4 "''rp'"
|
|
$ Else
|
|
$ If (silent)
|
|
$ Then
|
|
$ READ SYS$COMMAND/PROMPT="''rp'" ans
|
|
$ Else
|
|
$ echo ""
|
|
$ READ SYS$COMMAND/PROMPT="''rp'" ans
|
|
$ Endif
|
|
$ Endif
|
|
$ RETURN
|
|
$!
|
|
$Beyond_myread:
|
|
$!
|
|
$!: create .config dir to save info across Configure sessions
|
|
$ IF ( F$SEARCH("[-]CONFIG.DIR").EQS."" )
|
|
$ THEN
|
|
$ CREATE/DIRECTORY [-.CONFIG]
|
|
$ OPEN/WRITE CONFIG [-.CONFIG]README.
|
|
$ WRITE CONFIG -
|
|
"This directory created by Configure to save information that should"
|
|
$ WRITE CONFIG -
|
|
"persist across sessions."
|
|
$ WRITE CONFIG ""
|
|
$ WRITE CONFIG -
|
|
"You may safely delete it if you wish."
|
|
$ CLOSE CONFIG
|
|
$ ENDIF
|
|
$!
|
|
$!: general instructions
|
|
$ needman = "true"
|
|
$ firsttime = "true"
|
|
$ user = F$EDIT(F$GETJPI("","USERNAME"),"TRIM,COLLAPSE")
|
|
$ IF .NOT.(F$SEARCH("[-.CONFIG]INSTRUCT.").EQS."")
|
|
$ THEN
|
|
$ messages = F$ENVIRONMENT("MESSAGE")
|
|
$ SET MESSAGE/NOFAC/NOSEV/NOIDENT/NOTEXT
|
|
$ contains /NOOUTPUT [-.CONFIG]INSTRUCT. 'user'
|
|
$ IF .NOT.($status.EQ.%X08D78053)
|
|
$ THEN
|
|
$ firsttime=""
|
|
$ dflt = "n"
|
|
$ rp = "Would you like to see the instructions? [''dflt'] "
|
|
$ GOSUB myread
|
|
$ if .NOT.ans THEN needman=""
|
|
$ ENDIF
|
|
$ SET MESSAGE 'messages'
|
|
$ ENDIF
|
|
$ if (fastread.AND.silent.AND.(alldone.eqs."cont")) THEN needman=""
|
|
$!
|
|
$ IF (needman)
|
|
$ THEN
|
|
$ TYPE SYS$INPUT:
|
|
|
|
This installation shell script will examine your system and ask you questions
|
|
to determine how the perl5 package should be installed. If you get
|
|
stuck on a question, you may use a ^C or ^Y shell escape to STOP this
|
|
process, edit something, then restart this process as you just did.
|
|
Many of the questions will have default answers in square
|
|
brackets; typing carriage return will give you the default.
|
|
|
|
$ READ SYS$COMMAND/PROMPT="Type carriage return to continue " ans
|
|
$ TYPE SYS$INPUT:
|
|
|
|
In a hurry? You may run '@Configure "-d"'. This will bypass nearly all
|
|
the questions and use the computed defaults (or the previous answers provided
|
|
there was already a config.sh file). Type '@Configure "-h"' for a list of
|
|
options.
|
|
|
|
$ READ SYS$COMMAND/PROMPT="Type carriage return to continue " ans
|
|
$ TYPE SYS$INPUT:
|
|
|
|
Much effort has been expended to ensure that this shell script will
|
|
run on any VMS system. If despite that it blows up on yours, your
|
|
best bet is to edit Configure.com and @ it again. Whatever problems
|
|
you have with Configure.com, let me (dan@sidhe.org) know how I blew
|
|
it.
|
|
|
|
$!This installation script affects things in two ways:
|
|
$!
|
|
$!1) it may do direct variable substitutions on some of the files included
|
|
$! in this kit.
|
|
$!2) it builds a config.h file for inclusion in C programs. You may edit
|
|
$! any of these files as the need arises after running this script.
|
|
$!
|
|
$!If you make a mistake on a question, there is no easy way to back up to it
|
|
$!currently.
|
|
$!
|
|
$ READ SYS$COMMAND/PROMPT="Type carriage return to continue " ans
|
|
$ IF (F$SEARCH("[-.CONFIG]INSTRUCT.").EQS."")
|
|
$ THEN
|
|
$ OPEN/WRITE CONFIG [-.CONFIG]INSTRUCT.
|
|
$ WRITE CONFIG user
|
|
$ CLOSE CONFIG
|
|
$ ENDIF
|
|
$ ENDIF !(needman .EQS. "true")
|
|
$!
|
|
$!: see if sh knows # comments !sfn
|
|
$ sharpbang = "$ "
|
|
$!: figure out how to guarantee sh startup !sfn
|
|
$!: find out where common programs are !sfn
|
|
$!loclist="awk/cat/comm/cp/echo/expr/find/grep/ln/ls/mkdir/rm/sed/sort/touch/tr/uniq"
|
|
$!trylist="Mcc/byacc/cpp/csh/date/egrep/less/line/more/nroff/perl/pg/sendmail/test/uname"
|
|
$! echo "I don't know where '$file' is, and my life depends on it."
|
|
$! echo "Go find a public domain implementation or fix your PATH setting!"
|
|
$! echo ""
|
|
$! echo "Don't worry if any of the following aren't found..."
|
|
$!: determine whether symbolic links are supported !sfn
|
|
$!: see whether [:lower:] and [:upper:] are supported character classes !sfn
|
|
$!: set up the translation script tr, must be called with ./tr of course !sfn
|
|
$!
|
|
$!: Try to determine whether config.sh was made on this system
|
|
$!: Get old answers from old config file if Configure was run on the
|
|
$!: same system, otherwise use the hints.
|
|
$ config_sh_es = "''config_sh'/[-]config.sh/[-.vms]config.vms/"
|
|
$ i = 0
|
|
$ max = 3
|
|
$Config_sh_look:
|
|
$ config_sh = F$ELEMENT(i,"/",config_sh_es)
|
|
$ i = i + 1
|
|
$ IF (config_sh.NES."/").AND.(config_sh.NES."")
|
|
$ THEN
|
|
$ configshfound = F$SEARCH(config_sh)
|
|
$ IF (configshfound.NES."") THEN GOTO Config_sh_found
|
|
$ ENDIF
|
|
$ IF (i.LT.max) THEN GOTO Config_sh_look
|
|
$ IF (configshfound.EQS."") THEN GOTO Beyond_config_sh
|
|
$Config_sh_found:
|
|
$ echo ""
|
|
$ echo "Fetching default answers from ''config_sh'..."
|
|
$!we actually do not have "hints/" for VMS
|
|
$! TYPE SYS$INPUT:
|
|
$!
|
|
$!First time through, eh? I have some defaults handy for the following systems:
|
|
$!
|
|
$! echo " ","VMS_VAX"
|
|
$! echo " ","VMS_AXP"
|
|
$! : Now look for a hint file osname_osvers, unless one has been
|
|
$! : specified already.
|
|
$! TYPE SYS$INPUT:
|
|
$!
|
|
$!You may give one or more space-separated answers, or "none" if appropriate.
|
|
$!If your OS version has no hints, DO NOT give a wrong version -- say "none".
|
|
$!
|
|
$! READ SYS$COMMAND/PROMPT="Which of these apply, if any? " ans
|
|
$!
|
|
$Beyond_config_sh:
|
|
$!
|
|
$!: Restore computed paths !sfn
|
|
$!
|
|
$! genconfig.pl has "osname='VMS'"
|
|
$ osname = F$EDIT(F$GETSYI("NODE_SWTYPE"),"COLLAPSE")
|
|
$! %Config-I-VMS, a necessary error trap (could be PC running VCL)
|
|
$!
|
|
$ IF (osname .NES. "VMS")
|
|
$ THEN
|
|
$ echo4 "Hmm.. I wonder what ''osname' is (?)"
|
|
$ TYPE SYS$INPUT:
|
|
|
|
%Config-E-VMS, ERROR:
|
|
|
|
Err, you do not appear to be running VMS!
|
|
This procedure is intended to Configure the building of Perl for VMS.
|
|
|
|
$ READ SYS$COMMAND/PROMPT="Continue anyway? [n] " ans
|
|
$ IF ans
|
|
$ THEN
|
|
$ echo4 "Continuing..."
|
|
$ ELSE
|
|
$ echo4 "ABORTING..."
|
|
$ SET DEFAULT 'vms_default_directory_name' !be kind rewind
|
|
$ STOP
|
|
$ EXIT 2 !$STATUS = "%X00000002" (error)
|
|
$ ENDIF
|
|
$ ELSE !we are on VMS huzzah!
|
|
$ IF .NOT.silent
|
|
$ THEN TYPE SYS$INPUT:
|
|
|
|
Configure uses the operating system name and version to set some defaults.
|
|
The default value is probably right if the name rings a bell. Otherwise,
|
|
since spelling matters for me, either accept the default or answer "none"
|
|
to leave it blank.
|
|
$ ENDIF
|
|
$ rp = "Operating system name? [''osname'] "
|
|
$ GOSUB myread
|
|
$ IF ans.nes.""
|
|
$ THEN
|
|
$ IF (ans.NES.osname) !.AND.knowitall
|
|
$ THEN
|
|
$ echo4 "I'll go with ''osname' anyway..."
|
|
$ ENDIF
|
|
$ ENDIF
|
|
$ ENDIF !(osname .NES./.EQS. "VMS")
|
|
$!
|
|
$!: who configured the system
|
|
$! see 'user' above.
|
|
$ cf_by = F$EDIT(user,"LOWERCASE")
|
|
$! cf_time = F$CVTIME() !superceded by procedure below
|
|
$ osvers = F$EDIT(F$GETSYI("VERSION"),"TRIM")
|
|
$!
|
|
$! Peter Prymmer has seen:
|
|
$! "SYS$TIMEZONE_DIFFERENTIAL" = "-46800" (sic)
|
|
$! "SYS$TIME_ZONE" = "EDT"
|
|
$!
|
|
$! Charles Lane recommended:
|
|
$! "SYS$TIMEZONE_DIFFERENTIAL" = "-14400"
|
|
$! "NEWS_TIMEZONE" = "-0500"
|
|
$! "ST_TIMEZONE" = "EDT"
|
|
$! "JAN_TIME_ZONE" = "EST "
|
|
$! "MULTINET_TIMEZONE" = "EST"
|
|
$! "DAYLIGHT_SAVINGS" = "1"
|
|
$!
|
|
$! Charles Bailey recommends (in ANU NEWS Doc Jan 1995):
|
|
$! "PMDF_Timezone"
|
|
$! "Multinet_Timezone"
|
|
$! "TCPware_Timezone"
|
|
$! "WIN$Time_Zone"
|
|
$!
|
|
$! This snippet o' DCL returns a string in default Unix `date` format,
|
|
$! and it will prompt to set SYS$TIMEZONE_DIFFERENTIAL.
|
|
$! Peter Prymmer pvhp@lns62.lns.cornell.edu
|
|
$!
|
|
$ MIN_TZO = -840 !units are minutes here
|
|
$ MAX_TZO = 840
|
|
$!
|
|
$ wkday = F$EXTRACT(0,3,F$CVTIME(,,"WEEKDAY"))
|
|
$ monn = F$CVTIME(,,"MONTH")
|
|
$ mday = F$EXTRACT(8,2,F$CVTIME(,,"DATE"))
|
|
$ hour = F$CVTIME(,,"HOUR")
|
|
$ min = F$CVTIME(,,"MINUTE")
|
|
$ sec = F$CVTIME(,,"SECOND")
|
|
$ year = F$CVTIME(,,"YEAR")
|
|
$!
|
|
$ months = "/Jan/Feb/Mar/Apr/May/Jun/Jul/Aug/Sep/Oct/Nov/Dec/"
|
|
$ i = 0
|
|
$Mon_loop:
|
|
$ i = i + 1
|
|
$ mon = F$ELEMENT(i,"/",months)
|
|
$ IF i.LT.monn THEN GOTO Mon_loop
|
|
$!
|
|
$ tzneedset = "t"
|
|
$ systz = F$TRNLNM("SYS$TIMEZONE_DIFFERENTIAL")
|
|
$ IF systz.NES.""
|
|
$ THEN
|
|
$ tzhour = F$INTEGER(systz)/3600
|
|
$ tzmins = F$INTEGER(systz)/60
|
|
$ tzminrem = tzmins - tzhour*60
|
|
$ IF tzminrem.lt.0 THEN tzminrem = -1*tzminrem !keeps !2ZL happy
|
|
$ IF tzhour.ge.0
|
|
$ THEN signothetime = "+"
|
|
$ IF tzhour.EQ.0.AND.tzminrem.EQ.0
|
|
$ THEN direction = "on GMT/"
|
|
$ ELSE direction = "east of "
|
|
$ ENDIF
|
|
$ ELSE signothetime = "-"
|
|
$ tzhour = -1*tzhour !keeps !UL happy
|
|
$ direction = "west of "
|
|
$ ENDIF
|
|
$ echo ""
|
|
$ echo "%Config-I-VMS,"
|
|
$ echo "According to the setting of your ""SYS$TIMEZONE_DIFFERENTIAL"" (= ''systz')"
|
|
$ IF tzminrem.ne.0
|
|
$ THEN
|
|
$ tzspan = "''tzhour' hours & ''tzminrem' minutes"
|
|
$ ELSE
|
|
$ tzspan = "''tzhour' hours"
|
|
$ ENDIF
|
|
$ dflt = "y"
|
|
$ echo "Your system is ''tzspan' ''direction'UTC in England."
|
|
$ rp = "%Config-I-VMS, (''systz') Is this UTC Time Zone Offset correct? [''dflt'] "
|
|
$ GOSUB myread
|
|
$ IF ans.OR.(ans.EQS."")
|
|
$ THEN
|
|
$ tzneedset = "f"
|
|
$ tzd = systz
|
|
$ GOTO Beyond_TimeZone
|
|
$ ENDIF
|
|
$ ELSE
|
|
$ echo ""
|
|
$ echo4 "%Config-I-VMS,"
|
|
$ echo4 """SYS$TIMEZONE_DIFFERENTIAL"" does not appear to be DEFINEd on your system"
|
|
$ ENDIF
|
|
$!
|
|
$TZSet:
|
|
$ echo ""
|
|
$ echo "Please tell me in hh:mm form what time offset from GMT/UTC in England"
|
|
$ echo "you are. As an example Eastern (US) Standard Time is -5:00 offset, but"
|
|
$ echo "Eastern Daylight Time (summer) is -4:00 offset."
|
|
$ dflt = "0:00"
|
|
$ rp = "Enter the Time Zone offset: [''dflt'] "
|
|
$ GOSUB myread
|
|
$ ans = F$Edit(ans,"collapse,trim,uncomment,upcase")
|
|
$ IF ans.EQS."" THEN ans = dflt
|
|
$ tzhour = F$ELEMENT(0,":","''ans'") !first
|
|
$ IF tzhour.EQS."" THEN tzhour = 0
|
|
$ tzhour = F$INTEGER(tzhour)
|
|
$ tzminrem = F$ELEMENT(1,":","''ans'") !second
|
|
$ IF tzminrem.NES.""
|
|
$ THEN
|
|
$ tzminrem = F$INTEGER(tzminrem)
|
|
$ IF F$EXTRACT(0,1,"''ans'") .EQS. "-" THEN tzminrem = tzminrem * -1
|
|
$ ELSE
|
|
$ tzminrem = 0
|
|
$ ENDIF
|
|
$ tzmins = tzhour*60 + tzminrem
|
|
$ tzd = F$STRING(tzmins*60)
|
|
$ IF tzhour .GE. 0
|
|
$ THEN
|
|
$ signothetime = "+"
|
|
$ ELSE
|
|
$ tzhour = -1*tzhour !keeps !UL happy
|
|
$ signothetime = "-"
|
|
$ ENDIF
|
|
$ IF (tzmins.GT.MAX_TZO).OR.(tzmins.LT.MIN_TZO)
|
|
$ THEN
|
|
$ echo ""
|
|
$ echo "%Config-W-VMS-TIMERANGE, Response must be in the range -14:00 to 14:00."
|
|
$ goto TZSet
|
|
$ ENDIF
|
|
$!
|
|
$Beyond_TimeZone:
|
|
$ tz = f$fao("UTC!AS!UL:!2ZL",signothetime,tzhour,tzminrem)
|
|
$ cf_time = "''wkday' ''mon' ''mday' ''hour':''min':''sec' ''tz' ''year'"
|
|
$!
|
|
$!: determine the architecture name
|
|
$! genconfig.pl has either archname='VMS_AXP' or 'VMS_VAX'
|
|
$!
|
|
$ IF (F$GETSYI("HW_MODEL") .LT. 1024)
|
|
$ THEN
|
|
$ archname = "VMS_VAX"
|
|
$ otherarch = "an Alpha"
|
|
$ alignbytes="8"
|
|
$ arch_type = "ARCH-TYPE=__VAX__"
|
|
$ ELSE
|
|
$ archname = "VMS_AXP"
|
|
$ otherarch = "a VAX"
|
|
$ alignbytes="8"
|
|
$ arch_type = "ARCH-TYPE=__AXP__"
|
|
$ ENDIF
|
|
$ rp = "What is your architecture name? [''archname'] "
|
|
$ GOSUB myread
|
|
$ IF ans.NES.""
|
|
$ THEN
|
|
$ ans = F$EDIT(ans,"COLLAPSE, UPCASE")
|
|
$ IF (ans.NES.archname) !.AND.knowitall
|
|
$ THEN
|
|
$ echo4 "I'll go with ''archname' anyway..."
|
|
$ ENDIF
|
|
$ ENDIF
|
|
$ dflt = "n"
|
|
$ rp = "Will you be sharing your PERL_ROOT with ''otherarch'? [''dflt'] "
|
|
$ GOSUB myread
|
|
$ if ans.NES.""
|
|
$ THEN
|
|
$ ans = F$EXTRACT(0,1,F$EDIT(ans,"COLLAPSE, UPCASE"))
|
|
$ ENDIF
|
|
$ IF (ans.NES."Y")
|
|
$ THEN
|
|
$ sharedperl = "N"
|
|
$ ELSE
|
|
$ sharedperl = "Y"
|
|
$ IF (archname.EQS."VMS_AXP")
|
|
$ THEN
|
|
$ macros = macros + """AXE=1"","
|
|
$ ENDIF
|
|
$ ENDIF
|
|
$!
|
|
$!: is AFS running? !sfn
|
|
$!: decide how portable to be. Allow command line overrides. !sfn
|
|
$!: set up shell script to do ~ expansion !sfn
|
|
$!: expand filename !sfn
|
|
$!: now set up to get a file name !sfn
|
|
$!
|
|
$ prefix = F$ENVIRONMENT("DEFAULT") - ".UU]" + "]"
|
|
$ prefix = F$PARSE(prefix,,,,"NO_CONCEAL") - "][" - ".;"
|
|
$ prefixbase = prefix - "]"
|
|
$ prefix = prefixbase + ".]"
|
|
$!: determine root of directory hierarchy where package will be installed.
|
|
$ dflt = prefix
|
|
$ IF .NOT.silent
|
|
$ THEN
|
|
$ echo ""
|
|
$ echo "By default, ''package' will be installed in ''dflt', pod"
|
|
$ echo "pages under ''prefixbase'LIB.POD], etc..., i.e. with ''dflt' as prefix for"
|
|
$ echo "all installation directories."
|
|
$ echo "On ''osname' the ''prefix' is used to DEFINE the ''packageup'_ROOT prior to installation"
|
|
$ echo "as well as during subsequent use of ''package' via ''packageup'_SETUP.COM."
|
|
$ ENDIF
|
|
$ rp = "Installation prefix to use (for ''packageup'_ROOT)? [ ''dflt' ] "
|
|
$ GOSUB myread
|
|
$ IF ans.NES.""
|
|
$ THEN
|
|
$ prefix = ans
|
|
$ IF F$LOCATE(".]",ans) .EQ. F$LENGTH(ans) THEN prefix = prefix - "]" + ".]"
|
|
$ ELSE
|
|
$ prefix = dflt
|
|
$ ENDIF
|
|
$!
|
|
$! Check here for pre-existing PERL_ROOT.
|
|
$! -> ask if removal desired.
|
|
$! Check here for writability of requested PERL_ROOT if it is not the default (cwd).
|
|
$! -> recommend letting PERL_ROOT be PERL_SRC if requested PERL_ROOT is not writable.
|
|
$!
|
|
$ vms_skip_install = "true"
|
|
$ dflt = "y"
|
|
$! echo ""
|
|
$ rp = "%Config-I-VMS, Skip the remaining """"where install"""" questions? [''dflt'] "
|
|
$ GOSUB myread
|
|
$ IF (.NOT.ans).AND.(ans.NES."") THEN vms_skip_install = "false"
|
|
$ IF (.NOT.vms_skip_install)
|
|
$ THEN
|
|
$!
|
|
$!: set the prefixit variable, to compute a suitable default value
|
|
$!
|
|
$!: determine where private library files go
|
|
$!: Usual default is /usr/local/lib/perl5. Also allow things like
|
|
$!: /opt/perl/lib, since /opt/perl/lib/perl5 would be redundant.
|
|
$ IF .NOT.silent
|
|
$ THEN TYPE SYS$INPUT:
|
|
|
|
There are some auxiliary files for perl5 that need to be put into a
|
|
private library directory that is accessible by everyone.
|
|
$ ENDIF
|
|
$ dflt = prefix - ".]" + ".LIB]"
|
|
$ rp = "Pathname where the private library files will reside? "
|
|
$ rp = F$FAO("!AS!/!AS",rp,"[ ''dflt' ] ")
|
|
$ GOSUB myread
|
|
$ IF ans.NES.""
|
|
$ THEN privlib = ans
|
|
$ ELSE privlib = dflt
|
|
$ ENDIF
|
|
$!
|
|
$ ENDIF !%Config-I-VMS, skip remaining "where install" questions
|
|
$!
|
|
$ perl_symbol = "true"
|
|
$ perl_verb = ""
|
|
$ dflt = "y"
|
|
$ IF .NOT.silent
|
|
$ THEN
|
|
$ echo ""
|
|
$ echo "%Config-I-VMS, You may choose to write ''packageup'_SETUP.COM to assign a foreign"
|
|
$ echo "-Config-I-VMS, symbol to invoke ''package', which is the usual method."
|
|
$ echO "-Config-I-VMS, If you do not do so then you would need a DCL command verb at the"
|
|
$ echo "-Config-I-VMS, process or the system wide level."
|
|
$ ENDIF
|
|
$ rp = "Invoke perl as a global symbol foreign command [''dflt'] "
|
|
$ GOSUB myread
|
|
$ IF (.NOT.ans).AND.(ans.NES."") THEN perl_symbol = "false"
|
|
$!
|
|
$ IF (.NOT.perl_symbol)
|
|
$ THEN
|
|
$ dflt = "y"
|
|
$ IF .NOT.silent
|
|
$ THEN
|
|
$ echo ""
|
|
$ echo "%Config-I-VMS, Since you won't be using a symbol you must choose to put the ''packageup'"
|
|
$ echo "-Config-I-VMS, verb in a per-process table or in the system wide DCLTABLES (which"
|
|
$ echo "-Config-I-VMS, would require write privilege)."
|
|
$ ENDIF
|
|
$ rp = "Invoke perl as a per process command verb [ ''dflt' ] "
|
|
$ GOSUB myread
|
|
$ IF (.NOT.ans).AND.(ans.NES."")
|
|
$ THEN perl_verb = "DCLTABLES"
|
|
$ ELSE perl_verb = "PROCESS"
|
|
$ ENDIF
|
|
$ ENDIF ! (.NOT.perl_symbol)
|
|
$!
|
|
$!: set the base revision
|
|
$ baserev="5.0"
|
|
$ revision = baserev - ".0"
|
|
$!: get the patchlevel
|
|
$ echo ""
|
|
$ echo4 "Getting the current patchlevel..." !>&4
|
|
$ patchlevel_h = F$SEARCH("[-]patchlevel.h")
|
|
$ IF (patchlevel_h.NES."")
|
|
$ THEN
|
|
$ got_patch = "false"
|
|
$ got_sub = "false"
|
|
$ got_api_revision = "false"
|
|
$ got_api_version = "false"
|
|
$ got_api_subversion = "false"
|
|
$ OPEN/READONLY CONFIG 'patchlevel_h'
|
|
$Patchlevel_h_loop:
|
|
$ READ/END_Of_File=Close_patch CONFIG line
|
|
$ IF ((F$LOCATE("#define PERL_VERSION",line).NE.F$LENGTH(line)).AND.(.NOT.got_patch))
|
|
$ THEN
|
|
$ line = F$EDIT(line,"COMPRESS, TRIM")
|
|
$ patchlevel = F$ELEMENT(2," ",line)
|
|
$ got_patch = "true"
|
|
$ ENDIF
|
|
$ IF ((F$LOCATE("#define PERL_SUBVERSION",line).NE.F$LENGTH(line)).AND.(.NOT.got_sub))
|
|
$ THEN
|
|
$ line = F$EDIT(line,"COMPRESS, TRIM")
|
|
$ subversion = F$ELEMENT(2," ",line)
|
|
$ got_sub = "true"
|
|
$ ENDIF
|
|
$ IF ((F$LOCATE("#define PERL_API_REVISION",line).NE.F$LENGTH(line)).AND.(.NOT.got_api_revision))
|
|
$ THEN
|
|
$ line = F$EDIT(line,"COMPRESS, TRIM")
|
|
$ api_revision = F$ELEMENT(2," ",line)
|
|
$ got_api_revision = "true"
|
|
$ ENDIF
|
|
$ IF ((F$LOCATE("#define PERL_API_VERSION",line).NE.F$LENGTH(line)).AND.(.NOT.got_api_version))
|
|
$ THEN
|
|
$ line = F$EDIT(line,"COMPRESS, TRIM")
|
|
$ api_version = F$ELEMENT(2," ",line)
|
|
$ got_api_version = "true"
|
|
$ ENDIF
|
|
$ IF ((F$LOCATE("#define PERL_API_SUBVERSION",line).NE.F$LENGTH(line)).AND.(.NOT.got_api_subversion))
|
|
$ THEN
|
|
$ line = F$EDIT(line,"COMPRESS, TRIM")
|
|
$ api_subversion = F$ELEMENT(2," ",line)
|
|
$ got_api_subversion = "true"
|
|
$ ENDIF
|
|
$ IF (.NOT.got_patch).OR.(.NOT.got_sub) THEN GOTO Patchlevel_h_loop
|
|
$Close_patch:
|
|
$ CLOSE CONFIG
|
|
$ ELSE
|
|
$ patchlevel="0"
|
|
$ subversion="0"
|
|
$ ENDIF
|
|
$ IF (F$STRING(subversion) .NES. "0")
|
|
$ THEN
|
|
$ echo "(You have ''package' revision ''revision' patchlevel ''patchlevel' subversion ''subversion'.)"
|
|
$ ELSE
|
|
$ echo "(You have ''package' revision ''revision' patchlevel ''patchlevel'.)"
|
|
$ ENDIF
|
|
$!
|
|
$ version = revision + "_" + patchlevel + "_" + subversion
|
|
$!
|
|
$ IF (.NOT.vms_skip_install)
|
|
$ THEN
|
|
$!: set the prefixup variable, to restore leading tilda escape !sfn
|
|
$!: set the prefixup variable, to restore leading tilde escape !sfn
|
|
$!
|
|
$!: determine where public architecture dependent libraries go
|
|
$ IF (.NOT.silent)
|
|
$ THEN
|
|
$ echo ""
|
|
$ echo "''package' contains architecture-dependent library files. If you are"
|
|
$ ENDIF
|
|
$ IF (.NOT.silent)
|
|
$ THEN TYPE SYS$INPUT:
|
|
sharing libraries in a heterogeneous environment, you might store
|
|
these files in a separate location. Otherwise, you can just include
|
|
them with the rest of the public library files.
|
|
$ ENDIF
|
|
$ dflt = privlib - "]" + "." + archname + "." + version + "]"
|
|
$ rp = "Where do you want to put the public architecture-dependent libraries? "
|
|
$ rp = F$FAO("!AS!/!AS",rp,"[ ''dflt' ] ")
|
|
$ GOSUB myread
|
|
$ IF ans.NES.""
|
|
$ THEN archlib = ans
|
|
$ ELSE archlib = dflt
|
|
$ ENDIF
|
|
$!
|
|
$!: set up the script used to warn in case of inconsistency !sfn
|
|
$!: function used to set $1 to $val !sfn
|
|
$!
|
|
$ ENDIF !%Config-I-VMS, skip "where install" questions
|
|
$! This quotation from Configure has to be included on VMS:
|
|
$ TYPE SYS$INPUT:
|
|
|
|
There is, however, a strange, musty smell in the air that reminds me of
|
|
something...hmm...yes...I've got it...there's a VMS nearby, or I'm a Blit.
|
|
$ CONTINUE
|
|
$ IF (.NOT.vms_skip_install)
|
|
$ THEN
|
|
$!: it so happens the Eunice I know will not run shell scripts in Unix format
|
|
$!
|
|
$!: see if setuid scripts can be secure !sfn
|
|
$!: now see if they want to do setuid emulation !sfn
|
|
$!
|
|
$!: determine where site specific libraries go.
|
|
$ IF .NOT.silent
|
|
$ THEN TYPE SYS$INPUT:
|
|
|
|
The installation process will also create a directory for
|
|
site-specific extensions and modules. Some users find it convenient
|
|
to place all local files in this directory rather than in the main
|
|
distribution directory.
|
|
$ ENDIF
|
|
$ dflt = privlib - "]" + ".SITE_PERL]"
|
|
$ rp = "Pathname for the site-specific library files? "
|
|
$ rp = F$FAO("!AS!/!AS",rp,"[ ''dflt' ] ")
|
|
$ GOSUB myread
|
|
$ IF ans.NES.""
|
|
$ THEN sitelib = ans
|
|
$ ELSE sitelib = dflt
|
|
$ ENDIF
|
|
$!
|
|
$!: determine where site specific architecture-dependent libraries go.
|
|
$ IF .NOT.silent
|
|
$ THEN TYPE SYS$INPUT:
|
|
|
|
The installation process will also create a directory for
|
|
architecture-dependent site-specific extensions and modules.
|
|
$ ENDIF
|
|
$ dflt = sitelib - "]" + "." + archname + "]"
|
|
$ rp = "Pathname for the site-specific architecture-dependent library files? "
|
|
$ rp = F$FAO("!AS!/!AS",rp,"[ ''dflt' ] ")
|
|
$ GOSUB myread
|
|
$ IF ans.NES.""
|
|
$ THEN sitearch = ans
|
|
$ ELSE sitearch = dflt
|
|
$ ENDIF
|
|
$!
|
|
$!: determine where old public architecture dependent libraries might be
|
|
$!
|
|
$!: determine where public executables go
|
|
$ dflt = prefix - ".]" + ".BIN]"
|
|
$ rp = "Pathname where the public executables will reside? "
|
|
$ rp = F$FAO("!AS!/!AS",rp,"[ ''dflt' ] ")
|
|
$ GOSUB myread
|
|
$ IF ans.NES.""
|
|
$ THEN bin = ans
|
|
$ ELSE bin = dflt
|
|
$ ENDIF
|
|
$!
|
|
$!: determine where manual pages are on this system
|
|
$!: What suffix to use on installed man pages
|
|
$!: see if we can have long filenames
|
|
$!: determine where library module manual pages go
|
|
$!: What suffix to use on installed man pages
|
|
$!: see what memory models we can support
|
|
$!
|
|
$ ENDIF !%Config-I-VMS, skip "where install" questions
|
|
$!
|
|
$!: see if we need a special compiler
|
|
$! cc_list = "cc/decc|gcc" !%Config-I-VMS, compiler symbols/commands
|
|
$!
|
|
$ nocc = "f"
|
|
$ vms_cc_dflt = ""
|
|
$ vms_cc_available = ""
|
|
$!
|
|
$ OPEN/WRITE CONFIG ccvms.c
|
|
$ WRITE CONFIG "#include <stdlib.h>" !DECC is sooo picky
|
|
$ WRITE CONFIG "#include <stdio.h>"
|
|
$ WRITE CONFIG "int main() {"
|
|
$ WRITE CONFIG "#ifdef __DECC"
|
|
$ WRITE CONFIG " printf(""/DECC\n"");"
|
|
$ WRITE CONFIG "#else"
|
|
$ WRITE CONFIG " printf(""/VAXC\n"");"
|
|
$ WRITE CONFIG "#endif"
|
|
$ WRITE CONFIG " exit(0);"
|
|
$ WRITE CONFIG "}"
|
|
$ CLOSE CONFIG
|
|
$!
|
|
$! DEFINE SYS$ERROR _NLA0:
|
|
$! DEFINE SYS$OUTPUT _NLA0:
|
|
$ cc/NoObj/list=ccvms.lis ccvms.c
|
|
$ tmp = $status
|
|
$! DEASSIGN SYS$OUTPUT
|
|
$! DEASSIGN SYS$ERROR
|
|
$ IF (silent) THEN GOSUB Shut_up
|
|
$! echo "%Config-I-VMS, After cc compile $status = >''tmp'<" !diagnostic
|
|
$!
|
|
$ IF tmp.NE.%X10B90001
|
|
$ THEN
|
|
$ IF tmp.NE.%X10000001
|
|
$ THEN
|
|
$ nocc = "t" !%X10000001 is return from gcc
|
|
$ GOTO Gcc_initial_check
|
|
$ ENDIF
|
|
$ ENDIF
|
|
$!
|
|
$ GOSUB List_Parse
|
|
$ IF .NOT.silent THEN echo ""
|
|
$ echo "%Config-I-VMS, Default ""cc"" is ''line' ''archsufx' ''F$GETSYI("VERSION")'"
|
|
$ IF F$LOCATE("VAX",line).NE.F$LENGTH(line)
|
|
$ THEN
|
|
$ IF .NOT.silent
|
|
$ THEN
|
|
$ echo "%Config-I-VMS, Will try cc/decc..."
|
|
$ ENDIF
|
|
$ DEFINE SYS$ERROR _NLA0:
|
|
$ DEFINE SYS$OUTPUT _NLA0:
|
|
$ SET NOON
|
|
$ cc/decc/NoObj/list=ccvms.lis ccvms.c
|
|
$ tmp = $status
|
|
$ DEASSIGN SYS$OUTPUT
|
|
$ DEASSIGN SYS$ERROR
|
|
$ SET ON
|
|
$ IF (silent) THEN GOSUB Shut_up
|
|
$ IF tmp.NE.%X10B90001
|
|
$ THEN
|
|
$ echo "%Config-I-VMS, Apparently you don't have that one."
|
|
$ ELSE
|
|
$ GOSUB List_parse
|
|
$ echo "%Config-I-VMS, You also have: ''line' ''archsufx' ''F$GETSYI("VERSION")'"
|
|
$ vms_cc_available = vms_cc_available + "cc/decc "
|
|
$ ENDIF
|
|
$ ELSE
|
|
$ IF (F$LOCATE("DEC",line).NE.F$LENGTH(line)).or.(F$LOCATE("Compaq",line).NE.F$LENGTH(line))
|
|
$ THEN
|
|
$ vms_cc_dflt = "/decc"
|
|
$ vms_cc_available = vms_cc_available + "cc/decc "
|
|
$ ENDIF
|
|
$ ENDIF
|
|
$!
|
|
$Gcc_initial_check:
|
|
$ echo "%Config-I-VMS, Checking for Gcc"
|
|
$ OPEN/WRITE CONFIG gccvers.lis
|
|
$ DEFINE SYS$ERROR CONFIG
|
|
$ DEFINE SYS$OUTPUT CONFIG
|
|
$ 'gcc_symbol'/noobj/version _nla0:
|
|
$ tmp = $status
|
|
$ DEASSIGN SYS$OUTPUT
|
|
$ DEASSIGN SYS$ERROR
|
|
$ IF (silent) THEN GOSUB Shut_up
|
|
$ CLOSE CONFIG
|
|
$ IF (tmp.NE.%X10000001).and.(tmp.ne.%X00030001)
|
|
$ THEN
|
|
$ echo "%Config-I-VMS, Symbol ""''gcc_symbol'"" is not defined. I guess you don't have it."
|
|
$ goto cc_cleanup
|
|
$ ENDIF
|
|
$ OPEN/READ CONFIG gccvers.lis
|
|
$GCC_List_Read:
|
|
$ READ/END_OF_FILE=GCC_List_End CONFIG line
|
|
$ GOTO GCC_List_Read
|
|
$GCC_List_End:
|
|
$ CLOSE CONFIG
|
|
$ echo line
|
|
$ vms_cc_available = vms_cc_available + "''gcc_symbol' "
|
|
$ DELETE/NOLOG/NOCONFIRM gccvers.lis;
|
|
$!
|
|
$CC_Cleanup:
|
|
$ DELETE/NOLOG/NOCONFIRM ccvms.*;
|
|
$CC_Desired:
|
|
$!: see if we need a special compiler
|
|
$! echo ""
|
|
$ echo "%Config-I-VMS, available compiler(s):"
|
|
$ echo "( ''vms_cc_available')"
|
|
$ IF .NOT.nocc
|
|
$ THEN
|
|
$ dflt = "cc''vms_cc_dflt'" !-> "cc" in case first compile went OK
|
|
$ ELSE
|
|
$ dflt = gcc_symbol
|
|
$ ENDIF
|
|
$ rp = "Use which C compiler? [''dflt'] "
|
|
$ GOSUB myread
|
|
$ IF ans.NES.""
|
|
$ THEN
|
|
$ ans = F$EDIT(ans,"TRIM, COMPRESS, LOWERCASE")
|
|
$ Mcc = ans
|
|
$ IF (F$LOCATE("dec",ans).NE.F$LENGTH(ans)).or.(F$LOCATE("compaq",ans).NE.F$LENGTH(ans))
|
|
$ THEN
|
|
$ Mcc = "cc/decc"
|
|
$ Using_Dec_C = "Yes"
|
|
$ C_COMPILER_Replace = "CC=cc=''Mcc'"
|
|
$ ENDIF
|
|
$ IF Mcc.NES.dflt
|
|
$ THEN
|
|
$ IF (F$LOCATE("dec",dflt).NE.F$LENGTH(dflt)).or(F$LOCATE("compaq",dflt).NE.F$LENGTH(dflt))
|
|
$ THEN
|
|
$ C_COMPILER_Replace = "CC=cc=''Mcc'"
|
|
$ ELSE
|
|
$ Using_Dec_C = "Yes"
|
|
$ ENDIF
|
|
$ ELSE
|
|
$ IF Mcc .EQS. "cc/decc"
|
|
$ THEN
|
|
$ Using_Dec_C = "Yes"
|
|
$ C_COMPILER_Replace = "CC=cc=''Mcc'"
|
|
$ ENDIF
|
|
$ ENDIF
|
|
$ ELSE
|
|
$ Mcc = dflt
|
|
$ IF Mcc .EQS. "cc/decc"
|
|
$ THEN
|
|
$ Using_Dec_C = "Yes"
|
|
$ C_COMPILER_Replace = "CC=cc=''Mcc'"
|
|
$ ENDIF
|
|
$ IF Mcc .EQS. "gcc"
|
|
$ THEN
|
|
$ Using_Gnu_C = "Yes"
|
|
$ C_COMPILER_Replace = "CC=cc=''Mcc'"
|
|
$ ENDIF
|
|
$ ENDIF
|
|
$Decc_Version_check:
|
|
$ IF "''Using_Dec_C'".EQS."Yes"
|
|
$ THEN
|
|
$ echo ""
|
|
$ echo4 "Checking for Dec C's version number..." !>&4
|
|
$ OPEN/WRITE CONFIG deccvers.c
|
|
$ WRITE CONFIG "#include <stdlib.h>" !DECC is sooo picky
|
|
$ WRITE CONFIG "#include <stdio.h>"
|
|
$ WRITE CONFIG "int main() {"
|
|
$ WRITE CONFIG "#ifdef __DECC"
|
|
$ WRITE CONFIG "#ifdef __DECC_VER"
|
|
$ WRITE CONFIG " printf(""%i\n"", __DECC_VER);"
|
|
$ WRITE CONFIG "#else"
|
|
$ WRITE CONFIG " printf(""%i\n"", ""1"");"
|
|
$ WRITE CONFIG "#endif"
|
|
$ WRITE CONFIG "#endif"
|
|
$ WRITE CONFIG " exit(0);"
|
|
$ WRITE CONFIG "}"
|
|
$ CLOSE CONFIG
|
|
$ DEFINE SYS$ERROR _NLA0:
|
|
$ DEFINE SYS$OUTPUT _NLA0:
|
|
$ 'Mcc' deccvers.c
|
|
$ tmp = $status
|
|
$ DEASSIGN SYS$ERROR _NLA0:
|
|
$ DEASSIGN SYS$OUTPUT _NLA0:
|
|
$ IF (silent) THEN GOSUB Shut_up
|
|
$ DEFINE SYS$ERROR _NLA0:
|
|
$ DEFINE SYS$OUTPUT _NLA0:
|
|
$ link deccvers.obj
|
|
$ tmp = $status
|
|
$ DEASSIGN SYS$ERROR
|
|
$ DEASSIGN SYS$OUTPUT
|
|
$ IF (silent) THEN GOSUB Shut_up
|
|
$ OPEN/WRITE CONFIG deccvers.out
|
|
$ DEFINE SYS$ERROR CONFIG
|
|
$ DEFINE SYS$OUTPUT CONFIG
|
|
$ mcr []deccvers.exe
|
|
$ tmp = $status
|
|
$ CLOSE CONFIG
|
|
$ DEASSIGN SYS$OUTPUT
|
|
$ DEASSIGN SYS$ERROR
|
|
$ IF (silent) THEN GOSUB Shut_up
|
|
$ OPEN/READ CONFIG deccvers.out
|
|
$ READ/END_OF_FILE=Dec_c_cleanup CONFIG line
|
|
$Dec_c_cleanup:
|
|
$ CLOSE CONFIG
|
|
$! DELETE/NOLOG/NOCONFIRM deccvers.*;
|
|
$ echo "You are using Dec C ''line'"
|
|
$ Dec_C_Version = line
|
|
$ Dec_C_Version = Dec_C_Version + 0
|
|
$ if Dec_C_Version.ge.60200000 THEN CC_FLAGS = CC_FLAGS + "/NOANSI_ALIAS"
|
|
$ ENDIF
|
|
$Gcc_check:
|
|
$ if "''using_gnu_c'" .eqs. "Yes"
|
|
$ THEN
|
|
$ vaxcrtl_olb = F$SEARCH("SYS$LIBRARY:VAXCRTL.OLB")
|
|
$ vaxcrtl_exe = F$SEARCH("SYS$SHARE:VAXCRTL.EXE")
|
|
$ gcclib_olb = F$SEARCH("GNU_CC:[000000]GCCLIB.OLB")
|
|
$ IF gcclib_olb .EQS. ""
|
|
$ THEN
|
|
$! These objects/libs come w/ gcc 2.7.2 for AXP:
|
|
$ tmp = F$SEARCH("GNU_CC:[000000]libgcc2.olb")
|
|
$ IF tmp .NES. "" then gcclib_olb = tmp
|
|
$ tmp = F$SEARCH("GNU_CC:[000000]libgcclib.olb")
|
|
$ IF tmp .NES. ""
|
|
$ THEN
|
|
$ IF gcclib_olb .EQS. ""
|
|
$ THEN gcclib_olb = tmp
|
|
$ ELSE gcclib_olb = gcclib_olb + "/lib," + tmp
|
|
$ ENDIF
|
|
$ ENDIF
|
|
$ tmp = F$SEARCH("SYS$LIBRARY:VAXCRTL.OLB")
|
|
$ IF tmp .NES. ""
|
|
$ THEN
|
|
$ IF gcclib_olb .EQS. ""
|
|
$ THEN gcclib_olb = tmp
|
|
$ ELSE gcclib_olb = gcclib_olb + "/lib," + tmp
|
|
$ ENDIF
|
|
$ ENDIF
|
|
$ tmp = F$SEARCH("GNU_CC:[000000]crt0.obj")
|
|
$ IF tmp .NES. ""
|
|
$ THEN
|
|
$ IF gcclib_olb .EQS. ""
|
|
$ THEN gcclib_olb = tmp
|
|
$ ELSE gcclib_olb = gcclib_olb + "/lib," + tmp
|
|
$ ENDIF
|
|
$ ENDIF
|
|
$ IF gcclib_olb .EQS. vaxcrtl_olb THEN gcclib_olb = "" !goofy order of axplibs
|
|
$ ELSE
|
|
$ gcclib_olb = gcclib_olb + "/lib"
|
|
$ ENDIF
|
|
$ IF gcclib_olb .NES. "" .AND. -
|
|
(vaxcrtl_olb .NES. "" .OR. -
|
|
vaxcrtl_exe .NES. "" )
|
|
$ THEN
|
|
$ echo ""
|
|
$ echo4 "Checking for GNU cc in disguise and/or its version number..." !>&4
|
|
$ OPEN/WRITE CONFIG gccvers.c
|
|
$ WRITE CONFIG "#include <stdlib.h>" !DECC is sooo picky
|
|
$ WRITE CONFIG "#include <stdio.h>"
|
|
$ WRITE CONFIG "int main() {"
|
|
$ WRITE CONFIG "#ifdef __GNUC__"
|
|
$ WRITE CONFIG "#ifdef __VERSION__"
|
|
$ WRITE CONFIG " printf(""%s\n"", __VERSION__);"
|
|
$ WRITE CONFIG "#else"
|
|
$ WRITE CONFIG " printf(""%s\n"", ""1"");"
|
|
$ WRITE CONFIG "#endif"
|
|
$ WRITE CONFIG "#endif"
|
|
$ WRITE CONFIG " exit(0);"
|
|
$ WRITE CONFIG "}"
|
|
$ CLOSE CONFIG
|
|
$ DEFINE SYS$ERROR _NLA0:
|
|
$ DEFINE SYS$OUTPUT _NLA0:
|
|
$ 'Mcc' gccvers.c
|
|
$ tmp = $status
|
|
$ DEASSIGN SYS$ERROR _NLA0:
|
|
$ DEASSIGN SYS$OUTPUT _NLA0:
|
|
$ IF (silent) THEN GOSUB Shut_up
|
|
$ DEFINE SYS$ERROR _NLA0:
|
|
$ DEFINE SYS$OUTPUT _NLA0:
|
|
$ IF vaxcrtl_exe .EQS. ""
|
|
$ THEN
|
|
$ IF F$LOCATE("VAXCRTL",gcclib_olb).NE.F$LENGTH(gcclib_olb)
|
|
$ THEN
|
|
$ link gccvers.obj,'gcclib_olb',SYS$LIBRARY:VAXCRTL/Library
|
|
$ tmp = $status
|
|
$ ELSE
|
|
$ link gccvers.obj,'gcclib_olb'
|
|
$ tmp = $status
|
|
$ ENDIF
|
|
$ ELSE
|
|
$ OPEN/WRITE CONFIG GCCVERS.OPT
|
|
$ WRITE CONFIG "SYS$SHARE:VAXCRTL/SHARE"
|
|
$ CLOSE CONFIG
|
|
$ link gccvers.obj,GCCVERS.OPT/OPT,'gcclib_olb'
|
|
$ tmp = $status
|
|
$ ENDIF
|
|
$ DEASSIGN SYS$ERROR
|
|
$ DEASSIGN SYS$OUTPUT
|
|
$ IF (silent) THEN GOSUB Shut_up
|
|
$ OPEN/WRITE CONFIG gccvers.out
|
|
$ DEFINE SYS$ERROR CONFIG
|
|
$ DEFINE SYS$OUTPUT CONFIG
|
|
$ mcr []gccvers.exe
|
|
$ tmp = $status
|
|
$ CLOSE CONFIG
|
|
$ DEASSIGN SYS$OUTPUT
|
|
$ DEASSIGN SYS$ERROR
|
|
$ IF (silent) THEN GOSUB Shut_up
|
|
$ OPEN/READ CONFIG gccvers.out
|
|
$ READ/END_OF_FILE=Gcc_cleanup CONFIG line
|
|
$Gcc_cleanup:
|
|
$ CLOSE CONFIG
|
|
$ DELETE/NOLOG/NOCONFIRM gccvers.*;
|
|
$ IF F$LOCATE("GNU C version ",line).NE.F$LENGTH(line)
|
|
$ THEN
|
|
$ echo "You are not using GNU cc."
|
|
$ GOTO Host_name
|
|
$ ELSE
|
|
$ echo "You are using GNU cc ''line'"
|
|
$ Using_Gnu_C = "Yes"
|
|
$ C_COMPILER_Replace = "CC=cc=''Mcc'"
|
|
$ GOTO Include_dirs
|
|
$ ENDIF
|
|
$ ENDIF
|
|
$endif
|
|
$ GOTO Host_name
|
|
$!
|
|
$List_Parse:
|
|
$ OPEN/READ CONFIG ccvms.lis
|
|
$ READ CONFIG line
|
|
$ IF (F$GETSYI("HW_MODEL") .LT. 1024)
|
|
$ THEN
|
|
$ read CONFIG line
|
|
$ archsufx = "VAX"
|
|
$ ELSE
|
|
$ archsufx = "AXP"
|
|
$ ENDIF
|
|
$ CLOSE CONFIG
|
|
$ line = F$EDIT(line,"TRIM,COMPRESS")
|
|
$ line = line - "Page 1" ! occurs at end all compilers
|
|
$ line = line - "CCVMS " ! filename appears w/ VAXC
|
|
$ line = line - "Source Listing " ! Seen w/ AXP DECC
|
|
$ tmp = F$EXTRACT(0,20,line) !timestamp, e.g. "30-JUL-1996 21:12:54 "
|
|
$ line = line - tmp
|
|
$ line = F$EDIT(line,"TRIM") !bit redundant but we're in no big hurry
|
|
$ DELETE/NOLOG/NOCONFIRM ccvms.lis;
|
|
$ RETURN
|
|
$!
|
|
$Include_dirs:
|
|
$!: What should the include directory be ?
|
|
$ dflt = gcclib_olb
|
|
$ rp = "Where are the include files you want to use? "
|
|
$ IF f$length( rp + "[''dflt'] " ).gt.76
|
|
$ THEN rp = F$FAO("!AS!/!AS",rp,"[''dflt'] ")
|
|
$ ELSE rp = rp + "[''dflt'] "
|
|
$ ENDIF
|
|
$ GOSUB myread
|
|
$ usrinc = ans
|
|
$!
|
|
$!: see if we have to deal with yellow pages, now NIS.
|
|
$!: now get the host name
|
|
$Host_name:
|
|
$ echo ""
|
|
$ echo4 "Figuring out host name..." !>&4
|
|
$ myhostname = ""
|
|
$ IF myhostname.eqs."" THEN myhostname = F$TRNLNM("ARPANET_HOST_NAME")
|
|
$ IF myhostname.eqs."" THEN myhostname = F$TRNLNM("INTERNET_HOST_NAME")
|
|
$ IF myhostname.eqs."" THEN myhostname = F$TRNLNM("MULTINET_HOST_NAME")
|
|
$ IF myhostname.eqs."" THEN myhostname = F$TRNLNM("UCX$INET_HOST_NAME")
|
|
$ IF myhostname.eqs."".and. -
|
|
F$TRNLNM("UCX$INET_HOST") .nes. "" .and. -
|
|
F$TRNLNM("UCX$INET_DOMAIN") .nes. "" THEN -
|
|
myhostname = F$TRNLNM("UCX$INET_HOST") + "." + F$TRNLNM("UCX$INET_DOMAIN")
|
|
$ IF myhostname.eqs."" THEN myhostname = F$TRNLNM("TCPWARE_DOMAINNAME")
|
|
$ IF myhostname.eqs."" THEN myhostname = F$TRNLNM("NEWS_ADDRESS")
|
|
$ IF myhostname.eqs."" THEN myhostname = F$TRNLNM("SYS$NODE") - "::"
|
|
$ IF myhostname.eqs."" THEN myhostname = F$EDIT(F$GETSYI("SCSNODE"),"TRIM")
|
|
$!: you do not want to know about this
|
|
$!: verify guess
|
|
$ rp = "Your host name appears to be """"''myhostname'"""". Right? "
|
|
$ GOSUB myread
|
|
$ IF (.not.ans).and.(ans.NES."")
|
|
$ THEN
|
|
$ READ SYS$COMMAND/PROMPT= -
|
|
"Please type the (one word) name of your host: " ans
|
|
$ myhostname = ans
|
|
$ ENDIF
|
|
$!: translate upper to lower if necessary
|
|
$ myhostname = F$EDIT(myhostname,"COLLAPSE")
|
|
$ mylowhostname = F$EDIT(myhostname," LOWERCASE")
|
|
$ IF mylowhostname.NES.myhostname
|
|
$ THEN
|
|
$ echo "(Normalizing case in your host name)"
|
|
$ myhostname = mylowhostname
|
|
$ ENDIF
|
|
$!
|
|
$ fp = F$LOCATE(".",myhostname)
|
|
$ mydomain = F$EXTRACT(fp,(F$LENGTH(myhostname)-fp)+1,myhostname)
|
|
$ IF mydomain.NES."" !no periods in DECnet names like "MYDECNODE::"
|
|
$ THEN
|
|
$ rp = "What is your domain name? [''mydomain'] "
|
|
$ GOSUB myread
|
|
$ IF ans .nes. "" THEN mydomain = ans
|
|
$!: translate upper to lower if necessary
|
|
$ mydomain = F$EDIT(mydomain,"COLLAPSE")
|
|
$ mylowdomain = F$EDIT(mydomain," LOWERCASE")
|
|
$ IF mylowdomain.NES.mydomain
|
|
$ THEN
|
|
$ echo "(Normalizing case in your domain name)"
|
|
$ mydomain = mylowdomain
|
|
$ ENDIF
|
|
$ ENDIF
|
|
$ myhostname = myhostname - mydomain
|
|
$ echo "(Trimming domain name from host name--host name is now ''myhostname')"
|
|
$ IF .NOT.silent
|
|
$ THEN TYPE SYS$INPUT:
|
|
|
|
I need to get your e-mail address in Internet format if possible, i.e.
|
|
something like user@host.domain. Please answer accurately since I have
|
|
no easy means to double check it. The default value provided below
|
|
is most probably close to the reality but may not be valid from outside
|
|
your organization...
|
|
$ ENDIF
|
|
$ dflt = "''cf_by'@''myhostname'"+"''mydomain'"
|
|
$ rp = "What is your e-mail address? [''dflt'] "
|
|
$ GOSUB myread
|
|
$ IF ans .nes. ""
|
|
$ THEN cf_email = ans
|
|
$ ELSE cf_email = dflt
|
|
$ ENDIF
|
|
$!
|
|
$ IF .NOT.silent
|
|
$ THEN TYPE SYS$INPUT:
|
|
|
|
If you or somebody else will be maintaining perl at your site, please
|
|
fill in the correct e-mail address here so that they may be contacted
|
|
if necessary. Currently, the "perlbug" program included with perl
|
|
will send mail to this address in addition to perlbug@perl.com. You may
|
|
enter "none" for no administrator.
|
|
$ ENDIF
|
|
$ dflt = "''cf_email'"
|
|
$ rp = "Perl administrator e-mail address [''dflt'] "
|
|
$ GOSUB myread
|
|
$ IF ans .nes. ""
|
|
$ THEN perladmin = ans
|
|
$ ELSE perladmin = dflt
|
|
$ ENDIF
|
|
$!
|
|
$!: determine where public executable scripts go
|
|
$!: determine perl absolute location
|
|
$!: figure out how to guarantee perl startup
|
|
$!
|
|
$!: see how we invoke the C preprocessor
|
|
$! echo ""
|
|
$! echo4 "Now, how can we feed standard input to your C preprocessor..." !>&4
|
|
$!: Set private lib path
|
|
$!: Now check and see which directories actually exist, avoiding duplicates
|
|
$!: determine optimize, if desired, or use for debug flag also
|
|
$!: We will not override a previous value, but we might want to
|
|
$!: augment a hint file
|
|
$!: the following weeds options from ccflags that are of no interest to cpp
|
|
$!: flags used in final linking phase
|
|
$!: Try to guess additional flags to pick up local libraries.
|
|
$!: coherency check
|
|
$! echo ""
|
|
$! echo4 "Checking your choice of C compiler and flags for coherency..." !>&4
|
|
$!: compute shared library extension
|
|
$!: Looking for optional libraries
|
|
$!: see if nm is to be used to determine whether a symbol is defined or not
|
|
$!: get list of predefined functions in a handy place
|
|
$!: see if we have sigaction
|
|
$!: see whether socketshr exists
|
|
$ IF (F$SEARCH(F$PARSE("SocketShr","Sys$Share:.Exe")).NES."")
|
|
$ THEN
|
|
$ has_socketshr = "T"
|
|
$ echo ""
|
|
$ echo4 "Hmm... Looks like you have SOCKETSHR's Berkeley networking support."
|
|
$ endif
|
|
$ if (Dec_C_Version .ge. 50200000)
|
|
$ THEN
|
|
$ Has_Dec_C_Sockets = "T"
|
|
$ echo ""
|
|
$ echo4 "Hmm... Looks like you've got Dec C's Berkeley networking support."
|
|
$ ENDIF
|
|
$ ! Hey, we've got both. Default to Dec C, then, since it's better
|
|
$ if ("''Has_socketshr'".eq."T") .or.("''has_dec_c_sockets'".eq."T")
|
|
$ THEN
|
|
$ echo ""
|
|
$ echo "You've got sockets available. Which socket stack do you want to"
|
|
$ echo "build into perl?"
|
|
$ if "''has_dec_c_sockets'".eqs."T"
|
|
$ THEN
|
|
$ dflt = "DECC"
|
|
$ else
|
|
$ dflt = "SOCKETSHR"
|
|
$ endif
|
|
$ rp = "Choose socket stack (NONE"
|
|
$ if "''has_socketshr'".eqs."T" THEN rp = rp + ",SOCKETSHR"
|
|
$ if "''has_dec_c_sockets'".eqs."T" THEN rp = rp + ",DECC"
|
|
$ rp = rp + ") [''dflt'] "
|
|
$ GOSUB myread
|
|
$ IF "''ans'".eqs."" THEN ans = "''dflt'"
|
|
$ has_dec_c_sockets = "F"
|
|
$ has_socketshr = "F"
|
|
$ ans = F$EDIT(ans,"TRIM,COMPRESS,LOWERCASE")
|
|
$ IF ans.eqs."decc" then has_dec_c_sockets = "T"
|
|
$ IF ans.eqs."socketshr" then has_socketshr = "T"
|
|
$ endif
|
|
$!
|
|
$!
|
|
$! Ask if they want to build with VMS_DEBUG perl
|
|
$ echo ""
|
|
$ echo "Perl can be built to run under the VMS debugger."
|
|
$ echo "You should only select this option if you are debugging"
|
|
$ echo "perl itself. This can be a useful feature if you are "
|
|
$ echo "embedding perl in a program."
|
|
$ dflt = "n"
|
|
$ rp = "Build a VMS-DEBUG version of Perl? [''dflt'] "
|
|
$ GOSUB myread
|
|
$ IF ans.eqs."" then ans = dflt
|
|
$ IF F$EXTRACT(0, 1, F$EDIT(ans,"COLLAPSE,UPCASE")) .eqs. "Y"
|
|
$ THEN
|
|
$ use_vmsdebug_perl = "Y"
|
|
$ macros = macros + """__DEBUG__=1"","
|
|
$ ELSE
|
|
$ use_vmsdebug_perl = "N"
|
|
$ ENDIF
|
|
$!
|
|
$! Ask if they want to build with DEBUGGING
|
|
$ echo ""
|
|
$ echo "Perl can be built with extra runtime debugging enabled. This
|
|
$ echo "enables the -D switch, at the cost of some performance. It
|
|
$ echo "was mandatory on perl 5.005 and before on VMS, but is now
|
|
$ echo "optional. If you don't generally use it you should probably
|
|
$ echo "leave this off and gain a bit of extra speed.
|
|
$ dflt = "y"
|
|
$ rp = "Build a DEBUGGING version of Perl? [''dflt'] "
|
|
$ GOSUB myread
|
|
$ IF ans.eqs."" then ans = dflt
|
|
$ IF F$EXTRACT(0, 1, F$EDIT(ans,"COLLAPSE,UPCASE")) .eqs. "Y"
|
|
$ THEN
|
|
$ use_debugging_perl = "Y"
|
|
$ ELSE
|
|
$ use_debugging_perl = "N"
|
|
$ ENDIF
|
|
$!
|
|
$! Ask if they want to build with MULTIPLICITY
|
|
$ echo ""
|
|
$ echo "The perl interpreter engine can be built in a way that makes it
|
|
$ echo "possible for a program that embeds perl into it (and yes, you can
|
|
$ echo "do that--it's pretty keen) to have multiple perl interpreters active
|
|
$ echo "at once. There is some performance overhead, however, so you
|
|
$ echo "probably don't want to choose this unless you're going to be doing
|
|
$ echo "funky perl embedding."
|
|
$ dflt = "n"
|
|
$ rp = "Build with MULTIPLICITY? [''dflt'] "
|
|
$ GOSUB myread
|
|
$ if ans.eqs."" then ans = dflt
|
|
$ IF F$EXTRACT(0, 1, F$EDIT(ans,"COLLAPSE,UPCASE")) .eqs. "Y"
|
|
$ THEN
|
|
$ use_multiplicity="Y"
|
|
$ ELSE
|
|
$ use_multiplicity="N"
|
|
$ ENDIF
|
|
$!
|
|
$! Ask if they want to build with 64-bit support
|
|
$ IF (Archname.eqs."VMS_AXP").and.("''f$extract(1,3, f$getsyi(""version""))'".ges."7.1")
|
|
$ THEN
|
|
$ dflt = use64bitint
|
|
$ echo ""
|
|
$ echo "You can have native 64-bit long integers.
|
|
$ echo ""
|
|
$ echo "Perl can be built to take advantage of 64-bit integer types
|
|
$ echo "on some systems, which provide a much larger range for perl's
|
|
$ echo "mathematical operations. (Note that does *not* enable 64-bit
|
|
$ echo "fileops at the moment, as Dec C doesn't do that yet)."
|
|
$ echo "Choosing this option will most probably introduce binary incompatibilities.
|
|
$ echo ""
|
|
$ echo "If this doesn't make any sense to you, just accept the default ''dflt'.
|
|
$ rp = "Try to use 64-bit integers, if available? [''dflt'] "
|
|
$ GOSUB myread
|
|
$ IF ans .EQS. "" THEN ans = dflt
|
|
$ IF (f$extract(0, 1, f$edit(ans,"COLLAPSE,UPCASE")) .EQS. "Y")
|
|
$ THEN
|
|
$ use64bitint="Y"
|
|
$ ELSE
|
|
$ use64bitint="N"
|
|
$ ENDIF
|
|
$ IF (use64bitint)
|
|
$ THEN
|
|
$ dflt = use64bitall
|
|
$ echo ""
|
|
$ echo "Since you chose 64-bitness you may want to try maximal 64-bitness.
|
|
$ echo "What you have chosen is minimal 64-bitness which means just enough
|
|
$ echo "to get 64-bit integers. The maximal means using as much 64-bitness
|
|
$ echo "as is possible on the platform. This in turn means even more binary
|
|
$ echo "incompatibilities. On the other hand, your platform may not have
|
|
$ echo "any more maximal 64-bitness than what you already have chosen.
|
|
$ echo ""
|
|
$ echo "If this doesn't make any sense to you, just accept the default ''dflt'.
|
|
$ rp = "Try to use full 64-bit support, if available? [''dflt'] "
|
|
$ GOSUB myread
|
|
$ IF ans .EQS. "" THEN ans = dflt
|
|
$ IF (f$extract(0, 1, f$edit(ans,"COLLAPSE,UPCASE")) .EQS. "Y")
|
|
$ THEN
|
|
$ use64bitall="Y"
|
|
$ ELSE
|
|
$ use64bitall="N"
|
|
$ ENDIF
|
|
$ ENDIF
|
|
$ ENDIF ! AXP && >= 7.1
|
|
$!
|
|
$! Ask about threads, if appropriate
|
|
$ if (Using_Dec_C.eqs."Yes")
|
|
$ THEN
|
|
$ echo ""
|
|
$ echo "This version of Perl can be built with threads. While really nifty,
|
|
$ echo "they are a beta feature, and there is a speed penalty for perl
|
|
$ echo "programs if you build with threads *even if you don't use them*
|
|
$ dflt = "n"
|
|
$ rp = "Build with threads? [''dflt'] "
|
|
$ GOSUB myread
|
|
$ if ans.eqs."" then ans = dflt
|
|
$ if (f$extract(0, 1, "''ans'").eqs."Y").or.(f$extract(0, 1, "''ans'").eqs."y")
|
|
$ THEN
|
|
$ use_threads="T"
|
|
$!
|
|
$ ! Shall we do the 5.005-stype threads, or IThreads?
|
|
$ echo "As of 5.5.640, Perl has two different internal threading
|
|
$ echo "implementations, the 5.005 version (5005threads) and an
|
|
$ echo "interpreter-based version (ithreads) that has one
|
|
$ echo "interpreter per thread. Both are very experimental. This
|
|
$ echo "arrangement exists to help developers work out which one
|
|
$ echo "is better.
|
|
$ echo "
|
|
$ echo "If you're a casual user, you probably don't want
|
|
$ echo "interpreter-threads at this time. There doesn't yet exist
|
|
$ echo "a way to create threads from within Perl in this model,
|
|
$ echo "i.e., ""use Thread;"" will NOT work.
|
|
$ echo "
|
|
$ dflt = "n"
|
|
$ rp = "Build with Interpreter threads? [''dflt']
|
|
$ GOSUB myread
|
|
$ if ans.eqs."" then ans = dflt
|
|
$ if (f$extract(0, 1, "''ans'").eqs."Y").or.(f$extract(0, 1, "''ans'").eqs."y")
|
|
$ THEN
|
|
$ use_ithreads="Y"
|
|
$ use_5005_threads="N"
|
|
$ ELSE
|
|
$ use_ithreads="N"
|
|
$ use_5005_threads="Y"
|
|
$ ENDIF
|
|
$ ! Are they on VMS 7.1 on an alpha?
|
|
$ if (Archname.eqs."VMS_AXP").and.("''f$extract(1,3, f$getsyi(""version""))'".ges."7.1")
|
|
$ THEN
|
|
$ echo ""
|
|
$ echo "Threaded perl can be linked to use multiple kernel threads
|
|
$ echo "and system upcalls on VMS 7.1+ on Alpha systems. This feature
|
|
$ echo "allows multiple threads to execute simultaneously on an SMP
|
|
$ echo "system as well as preventing a single thread from blocking
|
|
$ echo "all the threads in a program, even on a single-processor
|
|
$ echo "machine. Unfortunately this feature isn't safe on an
|
|
$ echo "unpatched 7.1 system. (Several OS patches were required when
|
|
$ echo "this procedure was written)
|
|
$ dflt = "n"
|
|
$ rp = "Enable multiple kernel threads and upcalls? [''dflt'] "
|
|
$ gosub myread
|
|
$ if ans.eqs."" then ans="''dflt'"
|
|
$ if f$extract(0, 1, f$edit(ans,"TRIM,COMPRESS,UPCASE")).eqs."Y"
|
|
$ THEN
|
|
$ Thread_Live_Dangerously = "MT=MT=1"
|
|
$ ENDIF
|
|
$ ENDIF
|
|
$ ENDIF
|
|
$ ENDIF
|
|
$ if archname .eqs. "VMS_AXP"
|
|
$ then
|
|
$!
|
|
$! Case sensitive?
|
|
$ echo ""
|
|
$ echo "By default, perl (and pretty much everything else on VMS) uses
|
|
$ echo "case-insensitive linker symbols. Which is to say, when the
|
|
$ echo "underlying C code makes a call to a routine called Perl_foo in
|
|
$ echo "the source, the name in the object modules or shareable images
|
|
$ echo "is really PERL_FOO. There are some packages that use an
|
|
$ echo "embedded perl interpreter that instead require case-sensitive
|
|
$ echo "linker symbols.
|
|
$ echo ""
|
|
$ echo "If you have no idea what this means, and don't have
|
|
$ echo "any program requiring anything, choose the default.
|
|
$ dflt = be_case_sensitive
|
|
$ rp = "Case-sensitive symbols [''dflt'] "
|
|
$ gosub myread
|
|
$ if ans.eqs."" then ans="''dflt'"
|
|
$ be_case_sensitive = "''ans'"
|
|
$!
|
|
$! IEEE math?
|
|
$ echo ""
|
|
$ echo "Perl normally uses G_FLOAT format floating point numbers
|
|
$ echo "internally, as do most things on VMS. You can, however, build
|
|
$ echo "with IEEE floating point numbers instead if you need to.
|
|
$ dflt = use_ieee_math
|
|
$ rp = "Use IEEE math [''dflt'] "
|
|
$ gosub myread
|
|
$ if ans.eqs."" then ans="''dflt'"
|
|
$ use_ieee_math = "''ans'"
|
|
$ endif
|
|
$! CC Flags
|
|
$ echo ""
|
|
$ echo "You can, if you need to, pass extra flags on to the C
|
|
$ echo "compiler. In general you should only do this if you really,
|
|
$ echo "really know what you're doing.
|
|
$ dflt = user_c_flags
|
|
$ rp = "Extra C flags [''dflt'] "
|
|
$ gosub myread
|
|
$ if ans.eqs."" then ans="''dflt'"
|
|
$ user_c_flags = "''ans'"
|
|
$!
|
|
$! Ask whether they want to use secure logical translation when tainting
|
|
$ echo ""
|
|
$ echo "As Perl starts up, it checks several logical names, such as"
|
|
$ echo "PERL5LIB and PERL_ENV_TABLES, which allow you to modify aspects"
|
|
$ echo "of its behavior. For additional security, you may limit this"
|
|
$ echo "process to executive- and kernel-mode translation when tainting"
|
|
$ echo "is enabled. In this case, logical names normally skipped when"
|
|
$ echo "tainting is enabled (e.g. PERL5OPTS) are translated as well."
|
|
$ echo "If you do not choose to do this, the usual order of access modes"
|
|
$ echo "is used for logical name translation."
|
|
$ echo ""
|
|
$ echo "This restriction does not apply to the %ENV hash or to implicit"
|
|
$ echo "logical name translation during parsing of file specifications;"
|
|
$ echo "these always use the normal sequence of access modes for logical"
|
|
$ echo "name translation."
|
|
$ dflt = "y"
|
|
$ rp = "Use secure logical name translation? [''dflt'] "
|
|
$ GOSUB myread
|
|
$ if ans.eqs."" then ans="''dflt'"
|
|
$ d_secintgenv = f$extract(0, 1, f$edit(ans,"TRIM,COMPRESS,UPCASE"))
|
|
$!
|
|
$! Ask whether they want to default filetypes
|
|
$ echo ""
|
|
$ echo "When you pass the name of a program to Perl on the command line,"
|
|
$ echo "it generally doesn't supply any defaults unless the -S command"
|
|
$ echo "line switch is specified. In keeping with the VMS tradition of"
|
|
$ echo "default file types, however, you can configure Perl to try default"
|
|
$ echo "file types of nothing, .pl, and .com, in that order (e.g. typing"
|
|
$ echo """$ perl foo"" would cause Perl to look for foo., then foo.pl, and"
|
|
$ echo "finally foo.com)."
|
|
$ echo ""
|
|
$ echo "This is currently broken in some configurations. Only enable it if
|
|
$ echo "you know what you're doing. "
|
|
$ dflt = "N"
|
|
$ rp = "Always use default file types? [''dflt'] "
|
|
$ GOSUB myread
|
|
$ if ans.eqs."" then ans="''dflt'"
|
|
$ d_alwdeftype = f$extract(0, 1, f$edit(ans,"COLLAPSE,UPCASE"))
|
|
$!
|
|
$! Ask if they want to use perl's memory allocator
|
|
$ echo ""
|
|
$ echo "Perl has a built-in memory allocator that's tuned for perl's
|
|
$ echo "normal memory usage. It's oftentimes better than the standard
|
|
$ echo "system memory allocator. It also has the advantage of providing
|
|
$ echo "memory allocation statistics, if you choose to enable them.
|
|
$ dflt = "n"
|
|
$ rp = "Build with perl's memory allocator? [''dflt'] "
|
|
$ GOSUB myread
|
|
$ if ans.eqs."" then ans="''dflt'"
|
|
$ mymalloc = f$extract(0, 1, f$edit(ans,"COLLAPSE,UPCASE"))
|
|
$ if mymalloc.eqs."Y"
|
|
$ THEN
|
|
$ if use_debugging_perl.eqs."Y"
|
|
$ THEN
|
|
$ echo ""
|
|
$ echo "Perl can keep statistics on memory usage if you choose to use
|
|
$ echo "them. This is useful for debugging, but does have some
|
|
$ echo "performance overhead.
|
|
$ dflt = "n"
|
|
$ rp = "Do you want the debugging memory allocator? [''dflt'] "
|
|
$ gosub myread
|
|
$ if ans.eqs."" then ans="''dflt'"
|
|
$ use_debugmalloc = f$extract(0, 1, f$edit(ans, "COLLAPSE,UPCASE"))
|
|
$ ENDIF
|
|
$ ! Check which memory allocator we want
|
|
$ echo ""
|
|
$ echo "There are currently three different memory allocators: the
|
|
$ echo "default (which is a pretty good general-purpose memory manager),
|
|
$ echo "the TWO_POT allocator (which is optimized to save memory for
|
|
$ echo "larger allocations), and PACK_MALLOC (which is optimized to save
|
|
$ echo "memory for smaller allocations). They're all good, but if your
|
|
$ echo "usage tends towards larger chunks use TWO_POT, otherwise use
|
|
$ echo "PACK_MALLOC."
|
|
$ dflt = "DEFAULT"
|
|
$ rp = "Memory allocator (DEFAULT, TWO_POT, PACK_MALLOC) [''dflt'] "
|
|
$ GOSUB myread
|
|
$ if ans.eqs."" then ans = "''dflt'"
|
|
$ if ans.eqs."TWO_POT" then use_two_pot_malloc = "Y"
|
|
$ if ans.eqs."PACK_MALLOC" then use_pack_malloc = "Y"
|
|
$ ENDIF
|
|
$!
|
|
$! Ask for their default list of extensions to build
|
|
$ echo ""
|
|
$ echo "It's time to specify which modules you want to build into
|
|
$ echo "perl. Most of these are standard and should be chosen, though
|
|
$ echo "you might, for example, want to build GDBM_File instead of
|
|
$ echo "SDBM_File if you have the GDBM library built on your machine.
|
|
$ echo "Whatever you do, make sure the re module is first or things will
|
|
$ echo "break badly"
|
|
$ echo "
|
|
$ echo "Which modules do you want to build into perl?"
|
|
$! dflt = "Fcntl Errno File::Glob IO Opcode Byteloader Devel::Peek Devel::DProf Data::Dumper attrs re VMS::Stdio VMS::DCLsym B SDBM_File"
|
|
$ dflt = "re Fcntl Errno File::Glob IO Opcode Devel::Peek Devel::DProf Data::Dumper attrs VMS::Stdio VMS::DCLsym B SDBM_File Thread Sys::Hostname"
|
|
$ if Using_Dec_C.eqs."Yes"
|
|
$ THEN
|
|
$ dflt = dflt + " POSIX"
|
|
$ ENDIF
|
|
$ rp = "[''dflt'] "
|
|
$ GOSUB myread
|
|
$ if ans.eqs."" then ans = "''dflt'"
|
|
$ a = ""
|
|
$ j = 0
|
|
$ xloop1:
|
|
$ x = f$elem(j," ",ans)
|
|
$ j = j + 1
|
|
$ if x .eqs. " " then goto exloop1
|
|
$ xloop2:
|
|
$ k = f$locate("::",x)
|
|
$ if k .ge. f$len(x) then goto exloop2
|
|
$ x = f$extract(0,k,x) + "/" + f$extract(k+2,f$len(x)-2,x)
|
|
$ goto xloop2
|
|
$ exloop2:
|
|
$ a = a + " " + x
|
|
$ goto xloop1
|
|
$ exloop1:
|
|
$ ans = f$edit(a,"trim")
|
|
$!
|
|
$ a = ""
|
|
$ j = 0
|
|
$ xloop3:
|
|
$ x = f$elem(j," ",dflt)
|
|
$ j = j + 1
|
|
$ if x .eqs. " " then goto exloop3
|
|
$ xloop4:
|
|
$ k = f$locate("::",x)
|
|
$ if k .ge. f$len(x) then goto exloop4
|
|
$ x = f$extract(0,k,x) + "/" + f$extract(k+2,f$len(x)-2,x)
|
|
$ goto xloop4
|
|
$ exloop4:
|
|
$ a = a + " " + x
|
|
$ goto xloop3
|
|
$ exloop3:
|
|
$ dflt = f$edit(a,"trim")
|
|
$!
|
|
$ extensions = "''ans'"
|
|
$ perl_known_extensions = "''dflt'"
|
|
$!
|
|
$! %Config-I-VMS, determine build/make utility here (make gmake mmk mms)
|
|
$ echo ""
|
|
$ echo "%Config-I-VMS, Checking your ""make"" utilities..."
|
|
$! If the 'build' that you use is not here add it and it's test
|
|
$! switch to the _END_ of these strings (and increment max_build)
|
|
$! (e.g. builders = builders + "/FOOMAKE"
|
|
$! probers = probers + " -fooVersionSwitch"
|
|
$! ) & please let me know about it.
|
|
$ builders = "IMAKE/GNUMAKE/MGMAKE/GMAKE/MAKE/MMS/MMK"
|
|
$ probers = "-f Makefile. -v!-f Makefile. -v!-f Makefile. -v!-f Makefile. -v!-f Makefile. -v!/IDENT!/IDENT"
|
|
$ max_build = 7
|
|
$!
|
|
$ orig_dflt = "MMK"
|
|
$ default_set = ""
|
|
$ ok_builders = ""
|
|
$ OPEN/WRITE/ERROR=Open_error CONFIG Makefile.
|
|
$ WRITE CONFIG "dont_make_anything_yet:"
|
|
$ WRITE CONFIG F$FAO("!_")
|
|
$ CLOSE CONFIG
|
|
$ n = 0
|
|
$ messages = F$ENVIRONMENT("MESSAGE")
|
|
$Build_probe:
|
|
$ build = F$ELEMENT(n,"/",builders)
|
|
$ probe = F$ELEMENT(n,"!",probers)
|
|
$ echo "Testing whether you have ''build' on your system..."
|
|
$ SET NOON
|
|
$ ON CONTROL_Y THEN GOTO Reenable_messages_build
|
|
$ SET MESSAGE/NOFAC/NOSEV/NOIDENT/NOTEXT
|
|
$ 'build' 'probe'
|
|
$ IF ($SEVERITY .EQ. 1)
|
|
$ THEN
|
|
$ echo "OK."
|
|
$ IF (build .EQS. orig_dflt)
|
|
$ THEN
|
|
$ default_set = "TRUE"
|
|
$ dflt = build
|
|
$ ENDIF
|
|
$ ok_builders = ok_builders + " " + build
|
|
$ IF (.NOT. default_set) THEN dflt = build
|
|
$ ELSE
|
|
$ echo "Nope."
|
|
$ ENDIF
|
|
$Reenable_messages_build:
|
|
$ SET MESSAGE 'messages'
|
|
$ SET ON
|
|
$ n = n + 1
|
|
$ IF (n .LT. max_build) THEN GOTO Build_probe
|
|
$!
|
|
$ echo ""
|
|
$ IF (ok_builders .NES. "")
|
|
$ THEN
|
|
$ echo "Here is the list of builders you can apparently use:"
|
|
$ echo "(",ok_builders," )"
|
|
$ rp = "Which """"make"""" utility do you wish to use [''dflt']? "
|
|
$ GOSUB myread
|
|
$ ans = F$EDIT(ans,"TRIM, COMPRESS")
|
|
$ ans = F$EXTRACT(0,F$LOCATE(" ",ans),ans) !throw out "-f Makefile." here
|
|
$ IF (ans .EQS. "")
|
|
$ THEN build = dflt
|
|
$ ELSE build = ans
|
|
$ ENDIF
|
|
$ ELSE
|
|
$ TYPE SYS$INPUT:
|
|
|
|
%Config-E-VMS, ERROR:
|
|
Well this looks pretty serious. Perl5 cannot be compiled without a "make"
|
|
utility of some sort and after checking my "builders" list I cannot find
|
|
the symbol or command you use on your system to compile programs.
|
|
|
|
$ READ SYS$COMMAND/PROMPT="%Config-I-VMS, Which ""MMS"" do you use? " ans
|
|
$ ans = F$EDIT(ans,"TRIM, COMPRESS")
|
|
$ ans = F$EXTRACT(0,F$LOCATE(" ",ans),ans) !throw out "-f Makefile." here
|
|
$ IF (ans .EQS. "")
|
|
$ THEN build = dflt
|
|
$ echo "I don't know where 'make' is, and my life depends on it."
|
|
$ echo "Go find a make program or fix your DCL$PATH setting!"
|
|
$ echo "ABORTING..."
|
|
$ SET DEFAULT 'vms_default_directory_name' !be kind rewind
|
|
$ STOP
|
|
$ EXIT 2 !$STATUS = "%X00000002" (error)
|
|
$ ELSE
|
|
$ build = ans
|
|
$ ENDIF
|
|
$ ENDIF
|
|
$!
|
|
$ DELETE/NOLOG Makefile.;
|
|
$ GOTO Beyond_open
|
|
$Open_error:
|
|
$ TYPE SYS$INPUT:
|
|
|
|
There seems to be trouble. I just tried to create a file in
|
|
$ echo4 'F$ENVIRONMENT("DEFAULT")'
|
|
$ TYPE SYS$INPUT:
|
|
but was unsuccessful. I am stopping now. Please check that directories'
|
|
PROTECTION bits. I will leave you in the directory where you started
|
|
Configure.com
|
|
$ echo4 "ABORTING..."
|
|
$ GOTO Clean_up
|
|
$ STOP
|
|
$ EXIT
|
|
$!
|
|
$Beyond_open:
|
|
$! echo " Very well I will proceed with ""''build'"""
|
|
$ make = F$EDIT(build,"UPCASE")
|
|
$!
|
|
$!: locate the preferred pager for this system
|
|
$!pagers = "most|more|less|type/page"
|
|
$!rp='What pager is used on your system?'
|
|
$!
|
|
$! update [.vms]config.vms here
|
|
$!
|
|
$! update makefile here
|
|
$! echo4 "Updating makefile..."
|
|
$!
|
|
$ IF (make .EQS. "MMS").OR.(make .EQS. "MMK")
|
|
$ THEN
|
|
$ makefile = "" !wrt MANIFEST dir
|
|
$ UUmakefile = "[-]DESCRIP.MMS" !wrt CWD dir
|
|
$ DEFmakefile = "DESCRIP.MMS" !wrt DEF dir (?)
|
|
$ ELSE
|
|
$ makefile = " -f Makefile." !wrt MANIFEST dir
|
|
$ UUmakefile = "[-]Makefile." !wrt CWD dir
|
|
$ DEFmakefile = "Makefile." !wrt DEF dir (?)
|
|
$ ENDIF
|
|
$!
|
|
$ IF macros.NES.""
|
|
$ THEN
|
|
$ tmp = F$LENGTH(macros)
|
|
$ macros = F$EXTRACT(0,(tmp-1),macros) !miss trailing comma
|
|
$ macros = "/macro=(" + macros + ")"
|
|
$ ENDIF
|
|
$! Build up the extra C flags
|
|
$!
|
|
$ if use_ieee_math
|
|
$ then
|
|
$ extra_flags = "''extra_flags'" + "/float=ieee/ieee=denorm_results"
|
|
$ endif
|
|
$ if be_case_sensitive
|
|
$ then
|
|
$ extra_flags = "''extra_flags'" + "/Names=As_Is"
|
|
$ endif
|
|
$ extra_flags = "''extra_flags'" + "''user_c_flags'"
|
|
$!
|
|
$! Invoke the subconfig piece
|
|
$!
|
|
$ echo ""
|
|
$ echo4 "Checking the C run-time library"
|
|
$ dflt = F$ENVIRONMENT("DEFAULT")
|
|
$ SET DEFAULT [-.vms]
|
|
$ @subconfigure
|
|
$ SET DEFAULT 'dflt
|
|
$!
|
|
$! Warn of dangerous symbols or logical names
|
|
$!
|
|
$Bad_environment: SUBROUTINE
|
|
$ Bad_env = ""
|
|
$ IF p2 .eqs. "SYMBOL"
|
|
$ THEN
|
|
$ IF f$type('p1) .nes. "" THEN Bad_env := SYMBOL
|
|
$ ELSE
|
|
$ IF f$trnlnm(p1) .nes. "" THEN Bad_env := LOGICAL
|
|
$ ENDIF
|
|
$ IF Bad_env .eqs. "SYMBOL" .or. Bad_env .eqs. "LOGICAL"
|
|
$ THEN
|
|
$ IF f$search("config.msg") .nes. ""
|
|
$ THEN
|
|
$ OPEN/APPEND CONFIG config.msg
|
|
$ ELSE
|
|
$ OPEN/WRITE CONFIG config.msg
|
|
$ ENDIF
|
|
$ IF Bad_env .eqs. "SYMBOL"
|
|
$ THEN
|
|
$ WRITE CONFIG ""
|
|
$ WRITE CONFIG "Symbol name ''p1' found in environment as " + &p1
|
|
$ WRITE CONFIG " delete before building ''package' via:"
|
|
$ WRITE CONFIG " $ DELETE/SYMBOL/GLOBAL ''p1'"
|
|
$ IF f$locate("""",&p1) .ge. f$length(&p1)
|
|
$ THEN
|
|
$ WRITE CONFIG " after building, testing, and installing ''package'
|
|
$ WRITE CONFIG " restore the symbol with:"
|
|
$ WRITE CONFIG " $ ''p1' == """ + &p1 + """"
|
|
$ ENDIF
|
|
$ ENDIF
|
|
$ IF Bad_env .eqs. "LOGICAL"
|
|
$ THEN
|
|
$ WRITE CONFIG ""
|
|
$ WRITE CONFIG "Logical name ''p1' found in environment as " + f$trnlnm(p1)
|
|
$ WRITE CONFIG " deassign before building ''package'"
|
|
$ ENDIF
|
|
$ CLOSE CONFIG
|
|
$ Bad_env = ""
|
|
$ ENDIF
|
|
$ EXIT
|
|
$ ENDSUBROUTINE ! Bad_environment
|
|
$ echo ""
|
|
$ echo4 "%Config-I-VMS, Checking for dangerous pre-existing global symbols and logical names."
|
|
$ CALL Bad_environment "TMP"
|
|
$ CALL Bad_environment "LIB"
|
|
$ CALL Bad_environment "T"
|
|
$ CALL Bad_environment "FOO"
|
|
$ CALL Bad_environment "EXT"
|
|
$ CALL Bad_environment "TEST" "SYMBOL"
|
|
$ IF f$search("config.msg") .eqs. "" THEN echo "OK."
|
|
$!
|
|
$! %Config-I-VMS, write perl_setup.com here
|
|
$!
|
|
$ IF (.NOT.perl_symbol)
|
|
$ THEN
|
|
$ file_2_find = "[-]''packageup'.cld"
|
|
$ echo ""
|
|
$ echo4 "%Config-I-VMS, The perl.cld file is now being written..."
|
|
$ OPEN/WRITE CONFIG 'file_2_find'
|
|
$ ext = ".exe"
|
|
$ IF ((sharedperl) .AND. (f$getsyi("ARCH_NAME") .NES. "VAX")) THEN ext := .AXE
|
|
$ IF (use_vmsdebug_perl)
|
|
$ THEN
|
|
$ WRITE CONFIG "define verb dbgperl"
|
|
$ WRITE CONFIG F$FAO("!_!AS","image ''packageup'_root:[000000]dbgperl''ext'")
|
|
$ WRITE CONFIG F$FAO("!_!AS","cliflags (foreign)")
|
|
$ WRITE CONFIG ""
|
|
$ WRITE CONFIG "define verb perl"
|
|
$ WRITE CONFIG F$FAO("!_!AS","image ''packageup'_root:[000000]ndbgPerl''ext'")
|
|
$ WRITE CONFIG F$FAO("!_!AS","cliflags (foreign)")
|
|
$ ELSE
|
|
$ WRITE CONFIG "define verb perl"
|
|
$ WRITE CONFIG F$FAO("!_!AS","image ''packageup'_root:[000000]perl''ext'")
|
|
$ WRITE CONFIG F$FAO("!_!AS","cliflags (foreign)")
|
|
$ ENDIF
|
|
$ CLOSE CONFIG
|
|
$ ENDIF ! (.NOT.perl_symbol)
|
|
$ echo ""
|
|
$ echo4 "%Config-I-VMS, The perl_setup.com file is now being written..."
|
|
$ file_2_find = "[-]perl_setup.com"
|
|
$ OPEN/WRITE CONFIG 'file_2_find'
|
|
$ WRITE CONFIG "$!"
|
|
$ WRITE CONFIG "$! Perl_Setup.com ''cf_time'"
|
|
$ IF cf_email.NES.perladmin
|
|
$ THEN
|
|
$ WRITE CONFIG "$! perl configured by ''cf_email'"
|
|
$ ELSE
|
|
$ WRITE CONFIG "$! This perl configured & administered by ''perladmin'"
|
|
$ ENDIF
|
|
$ WRITE CONFIG "$!"
|
|
$ prefix = prefix - "000000."
|
|
$ IF F$LOCATE(".]",prefix) .EQ. F$LENGTH(prefix) THEN -
|
|
prefix = prefix - "]" + ".]"
|
|
$ WRITE CONFIG "$ define/translation=concealed Perl_Root ''prefix'"
|
|
$ WRITE CONFIG "$ ext = "".exe"""
|
|
$ IF sharedperl .EQS. "Y"
|
|
$ THEN
|
|
$ write config "$ if f$getsyi(""ARCH_NAME"") .nes. ""VAX"" then ext = "".AXE"""
|
|
$ ENDIF
|
|
$ IF (perl_symbol)
|
|
$ THEN
|
|
$ IF (use_vmsdebug_perl)
|
|
$ THEN
|
|
$ WRITE CONFIG "$ dbgperl :== $Perl_Root:[000000]dbgPerl'ext'"
|
|
$ WRITE CONFIG "$ perl :== $Perl_Root:[000000]ndbgPerl'ext'"
|
|
$ WRITE CONFIG "$ define dbgPerlShr Perl_Root:[000000]dbgPerlShr'ext'"
|
|
$ ELSE
|
|
$ WRITE CONFIG "$ perl :== $Perl_Root:[000000]Perl'ext'"
|
|
$ WRITE CONFIG "$ define PerlShr Perl_Root:[000000]PerlShr'ext'"
|
|
$ ENDIF
|
|
$ ELSE ! .NOT.perl_symbol
|
|
$ IF (use_vmsdebug_perl)
|
|
$ THEN
|
|
$ WRITE CONFIG "$ define dbgPerlShr Perl_Root:[000000]dbgPerlShr'ext'"
|
|
$ ELSE
|
|
$ WRITE CONFIG "$ define PerlShr Perl_Root:[000000]PerlShr'ext'"
|
|
$ ENDIF
|
|
$ IF perl_verb .EQS. "PROCESS"
|
|
$ THEN
|
|
$ WRITE CONFIG "$ set command ''packagup'_ROOT:[000000]''packageup'.CLD"
|
|
$ ENDIF
|
|
$ ENDIF ! perl_symbol
|
|
$ WRITE CONFIG "$ define/nolog pod2text Perl_Root:[lib.pod]pod2text.com"
|
|
$ WRITE CONFIG "$ define/nolog pod2html Perl_Root:[lib.pod]pod2html.com"
|
|
$ WRITE CONFIG "$ define/nolog pod2man Perl_Root:[lib.pod]pod2man.com"
|
|
$!
|
|
$ IF (tzneedset)
|
|
$ THEN
|
|
$ WRITE CONFIG "$ define SYS$TIMEZONE_DIFFERENTIAL ''tzd'"
|
|
$ ELSE !leave in but commented out (in case setting was from perl :-)
|
|
$ WRITE CONFIG "$! define SYS$TIMEZONE_DIFFERENTIAL ''tzd'"
|
|
$ ENDIF
|
|
$ WRITE CONFIG "$!"
|
|
$ WRITE CONFIG "$! Symbols for commonly used scripts:"
|
|
$ WRITE CONFIG "$!"
|
|
$ IF (perl_symbol)
|
|
$ THEN
|
|
$ WRITE CONFIG "$ Perldoc == ""'"+"'Perl' Perl_Root:[lib.pod]Perldoc.com -t"""
|
|
$ WRITE CONFIG "$ pod2text == ""'"+"'Perl' pod2text"""
|
|
$ WRITE CONFIG "$ pod2html == ""'"+"'Perl' pod2html"""
|
|
$ WRITE CONFIG "$ pod2latex == ""'"+"'Perl' Perl_Root:[lib.pod]pod2latex.com"""
|
|
$ WRITE CONFIG "$!pod2man == ""'"+"'Perl' pod2man"""
|
|
$ WRITE CONFIG "$!Perlbug == ""'"+"'Perl' Perl_Root:[lib]Perlbug.com"""
|
|
$ WRITE CONFIG "$ c2ph == ""'"+"'Perl' Perl_Root:[utils]c2ph.com"""
|
|
$ IF F$LOCATE("Devel::DProf",extensions) .LT. F$LENGTH(extensions)
|
|
$ THEN
|
|
$ WRITE CONFIG "$ dprofpp == ""'"+"'Perl' Perl_Root:[utils]dprofpp.com"""
|
|
$ ENDIF
|
|
$ WRITE CONFIG "$ h2ph == ""'"+"'Perl' Perl_Root:[utils]h2ph.com"""
|
|
$ WRITE CONFIG "$ h2xs == ""'"+"'Perl' Perl_Root:[utils]h2xs.com"""
|
|
$ WRITE CONFIG "$!perlcc == ""'"+"'Perl' Perl_Root:[utils]perlcc.com"""
|
|
$ WRITE CONFIG "$ splain == ""'"+"'Perl' Perl_Root:[utils]splain.com"""
|
|
$ ELSE
|
|
$ WRITE CONFIG "$ Perldoc == ""Perl Perl_Root:[lib.pod]Perldoc.com -t"""
|
|
$ WRITE CONFIG "$ pod2text == ""Perl pod2text"""
|
|
$ WRITE CONFIG "$ pod2html == ""Perl pod2html"""
|
|
$ WRITE CONFIG "$ pod2latex == ""Perl Perl_Root:[lib.pod]pod2latex.com"""
|
|
$ WRITE CONFIG "$!pod2man == ""Perl pod2man"""
|
|
$ WRITE CONFIG "$!Perlbug == ""Perl Perl_Root:[lib]Perlbug.com"""
|
|
$ WRITE CONFIG "$ c2ph == ""Perl Perl_Root:[utils]c2ph.com"""
|
|
$ IF F$LOCATE("Devel::DProf",extensions) .LT. F$LENGTH(extensions)
|
|
$ THEN
|
|
$ WRITE CONFIG "$ dprofpp == ""Perl Perl_Root:[utils]dprofpp.com"""
|
|
$ ENDIF
|
|
$ WRITE CONFIG "$ h2ph == ""Perl Perl_Root:[utils]h2ph.com"""
|
|
$ WRITE CONFIG "$ h2xs == ""Perl Perl_Root:[utils]h2xs.com"""
|
|
$ WRITE CONFIG "$!perlcc == ""Perl Perl_Root:[utils]perlcc.com"""
|
|
$ WRITE CONFIG "$ splain == ""Perl Perl_Root:[utils]splain.com"""
|
|
$ ENDIF
|
|
$ CLOSE CONFIG
|
|
$!
|
|
$ echo ""
|
|
$ echo "%Config-I-VMS, The file can be found at:"
|
|
$ echo4 "-Config-I-VMS, ''F$SEARCH(file_2_find)'"
|
|
$ echo "-Config-I-VMS, Add that file (or an @ call to it) to your [SY]LOGIN.COM"
|
|
$ echo "-Config-I-VMS, when you are satisfied with a successful compilation,"
|
|
$ echo "-Config-I-VMS, testing, and installation of your perl."
|
|
$ echo ""
|
|
$ IF ((.NOT.perl_symbol) .AND. (perl_verb .EQS. "DCLTABLES"))
|
|
$ THEN
|
|
$ file_2_find = "[-]''packageup'_install.com"
|
|
$ OPEN/WRITE CONFIG 'file_2_find
|
|
$ WRITE CONFIG "$ set command perl /table=sys$common:[syslib]dcltables.exe -"
|
|
$ WRITE CONFIG " /output=sys$common:[syslib]dcltables.exe"
|
|
$ WRITE CONFIG "$ install replace sys$common:[syslib]dcltables.exe"
|
|
$ CLOSE CONFIG
|
|
$ echo4 ""
|
|
$ echo4 "%Config-I-VMS, In order to install the ''packageup' verb into DCLTABLES run:"
|
|
$ echo4 "-Config-I-VMS, @ ''F$SEARCH(file_2_find)'"
|
|
$ echo4 "-Config-I-VMS, after a successful build, test, and install. Do so with CMKRNL privilege."
|
|
$ echo4 ""
|
|
$ ENDIF
|
|
$!
|
|
$!figure out where we "are" by parsing 'vms_default_directory_name'
|
|
$!
|
|
$ set_def_command = ""
|
|
$ dflt = F$ENVIRONMENT("DEFAULT") - ".UU]"
|
|
$ tmp = vms_default_directory_name - dflt - "]"
|
|
$ i = 0
|
|
$ IF tmp .EQS. "" THEN GOTO Beyond_set_def_loop
|
|
$Set_def_loop:
|
|
$ tmp1 = F$ELEMENT(i,".",tmp)
|
|
$ IF tmp1 .EQS. "." THEN GOTO Beyond_set_def_loop
|
|
$ IF i .EQ. 0
|
|
$ THEN set_def_command = "set default [-"
|
|
$ ELSE set_def_command = set_def_command + "-"
|
|
$ ENDIF
|
|
$ i = i + 1
|
|
$ GOTO Set_def_loop
|
|
$Beyond_set_def_loop:
|
|
$ IF set_def_command.NES.""
|
|
$ THEN
|
|
$ set_def_command = set_def_command - "-" + "]"
|
|
$ echo4 ""
|
|
$ echo4 "In order to build ''package' you must now issue the commands:"
|
|
$ echo4 ""
|
|
$ echo4 " ''set_def_command'"
|
|
$ ELSE
|
|
$ echo4 ""
|
|
$ echo4 "In order to build ''package' you must now issue the command:"
|
|
$ echo4 ""
|
|
$ ENDIF
|
|
$ echo4 " ''make'''makefile'", macros
|
|
$ echo4 ""
|
|
$!
|
|
$ IF ( F$SEARCH("config.msg").NES."" )
|
|
$ THEN
|
|
$ echo "Hmm. I also noted the following information while running:"
|
|
$ echo ""
|
|
$ type config.msg
|
|
$ SET PROTECTION=(SYSTEM:RWED,OWNER:RWED) config.msg
|
|
$ DELETE/NOLOG/NOCONFIRM config.msg;
|
|
$ ENDIF
|
|
$!
|
|
$Clean_up:
|
|
$ IF (silent)
|
|
$ THEN
|
|
$ DEASSIGN SYS$OUTPUT
|
|
$! DEASSIGN SYS$ERROR
|
|
$ ENDIF
|
|
$ IF F$GETJPI("","FILCNT").NE.vms_filcnt THEN CLOSE CONFIG
|
|
$ IF F$GETJPI("","FILCNT").NE.vms_filcnt
|
|
$ THEN WRITE SYS$ERROR "%Config-W-VMS, WARNING: There is a file still open"
|
|
$ ENDIF
|
|
$ dflt = F$ENVIRONMENT("DEFAULT")
|
|
$ IF F$LOCATE("UU]",dflt).EQS.(F$LENGTH(dflt)-3)
|
|
$ THEN
|
|
$ IF ( F$SEARCH("[]*.*").NES."" ) THEN DELETE/NOLOG/NOCONFIRM []*.*;*
|
|
$ SET DEFAULT [-]
|
|
$ SET PROTECTION=(SYSTEM:RWED,OWNER:RWED) UU.DIR
|
|
$ DELETE/NOLOG/NOCONFIRM UU.DIR;
|
|
$ ENDIF
|
|
$ SET DEFAULT 'vms_default_directory_name' !be kind rewind
|
|
$ STOP
|
|
$ EXIT
|
|
$!: End of Configure
|