X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=configure.com;h=ccb66bd262fb63d6f2f02d5cc7ed3b3398c8d4c0;hb=a3ef2c6f736628e81e9ce2a07226bd754872ac62;hp=24ce886c62cc13f56b81bc0f8262be9aa26fe121;hpb=3937c24e3f4ed26beafd7a2fbe3a20466bfc2b2d;p=p5sagit%2Fp5-mst-13.2.git diff --git a/configure.com b/configure.com index 24ce886..ccb66bd 100644 --- a/configure.com +++ b/configure.com @@ -4,28 +4,28 @@ $! $! 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_00n] +$! $ SET DEFAULT [USER.PERL5_xxx] $! $ @Configure $! $! or $! -$! $ SET DEFAULT [USER.PERL5_00n] +$! $ 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@cor.newman.upenn.edu +$! Beyond that send email to vmsperl@perl.org $! $! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ $! $! send suggestions to: -$! Dan Sugalski +$! Dan Sugalski $! 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 VMS) -$! in the perl5.002|3 epoch (spring/summer 1996) +$! (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 @@ -39,17 +39,20 @@ $ cat = "type" $ gcc_symbol = "gcc" $ ans = "" $ macros = "" +$ use_vmsdebug_perl = "n" $ use_debugging_perl = "Y" +$ use_64bitint = "n" $ C_Compiler_Replace = "CC=" $ Thread_Live_Dangerously = "MT=" $ use_two_pot_malloc = "N" $ use_pack_malloc = "N" $ use_debugmalloc = "N" -$ preload_env = "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_00n] not [A.B.C.PERL5_00n] -$ max_allowed_dir_depth = 2 ! e.g. [FOO.PERL5_00n] not [FOO.BAR.PERL5_00n] +$ max_allowed_dir_depth = 3 ! e.g. [A.B.PERL5_00n] not [A.B.C.PERL5_00n] +$! max_allowed_dir_depth = 2 ! e.g. [FOO.PERL5_00n] not [FOO.BAR.PERL5_00n] $! $ vms_filcnt = F$GETJPI ("","FILCNT") $! @@ -111,6 +114,7 @@ $! $!: set up default values $ fastread="" $ reuseval="false" +$ maniskip = "false" $ config_sh="" $ alldone="" $ error="" @@ -163,8 +167,8 @@ $ P'i' = P'i' - "f" $ config_sh = P'i' $ IF (F$SEARCH(config_sh).NES."") $ THEN -$ test = F$FILE_ATTRIBUTES(config_sh,"PRO") -$ IF (F$LOCATE("R",test).NE.F$LENGTH(test)) +$ 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 ? @@ -185,6 +189,13 @@ $ 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" @@ -288,13 +299,14 @@ $! $ IF (error) $ THEN $ me = F$PARSE(me,,,"DIRECTORY")+ F$PARSE(me,,,"NAME") -$ echo "Usage: @''me' [-dehrEKOSV] [-fconfig.sh] [-Dsymbol] [-Dsymbol=value]" -$ echo " [-Usymbol] [-Usymbol=]" +$ 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: * @@ -383,7 +395,7 @@ $ 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" THEN GOTO Beyond_depth_check +$ 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: @@ -418,8 +430,11 @@ $! $ OPEN/WRITE MISSING MISSING. $!change to "FALSE" if you wish to skip the manifest search $!(which after all is rather slow in DCL :-) -$ IF ("TRUE") +$ 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 @@ -467,6 +482,19 @@ $ IF (((f$length(file_2_find)+1) .eq. f$length(basename)) .and. - $ 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 @@ -562,7 +590,7 @@ $ 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 !sorry :-( +$ SET MESSAGE/NOFAC/NOSEV/NOIDENT/NOTEXT $ contains /NOOUTPUT [-.CONFIG]INSTRUCT. 'user' $ IF .NOT.($status.EQ.%X08D78053) $ THEN @@ -572,7 +600,7 @@ $ rp = "Would you like to see the instructions? [''dflt'] " $ GOSUB myread $ if .NOT.ans THEN needman="" $ ENDIF -$ SET MESSAGE 'messages' !hope you made it here :-) +$ SET MESSAGE 'messages' $ ENDIF $ if (fastread.AND.silent.AND.(alldone.eqs."cont")) THEN needman="" $! @@ -590,9 +618,9 @@ 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 +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 +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 @@ -688,7 +716,7 @@ $ TYPE SYS$INPUT: %Config-E-VMS, ERROR: Err, you do not appear to be running VMS! - This package is intended to Configure the building of Perl for VMS. + This procedure is intended to Configure the building of Perl for VMS. $ READ SYS$COMMAND/PROMPT="Continue anyway? [n] " ans $ IF ans @@ -812,7 +840,7 @@ $! $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 "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'] " @@ -856,8 +884,10 @@ $! $ IF (F$GETSYI("HW_MODEL") .LT. 1024) $ THEN $ archname = "VMS_VAX" +$ otherarch = "an Alpha" $ ELSE $ archname = "VMS_AXP" +$ otherarch = "a VAX" $ ENDIF $ rp = "What is your architecture name? [''archname'] " $ GOSUB myread @@ -869,24 +899,22 @@ $ THEN $ echo4 "I'll go with ''archname' anyway..." $ ENDIF $ ENDIF -$ IF (archname.EQS."VMS_AXP") +$ 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 -$ dflt = "n" -$ rp = "Are you sharing your PERL_ROOT with a VAX? [''dflt'] " -$ GOSUB myread -$ if ans.NES."" -$ THEN -$ ans = F$EDIT(ans,"COLLAPSE, UPCASE") -$ ENDIF -$ IF (ans.NES."Y") +$ sharedperl = "N" +$ ELSE +$ sharedperl = "Y" +$ IF (archname.EQS."VMS_AXP") $ THEN -$ sharedperl = "N" -$ ELSE -$ sharedperl = "Y" $ macros = macros + """AXE=1""," $ ENDIF -$ ELSE -$ sharedperl = "N" $ ENDIF $! $!: is AFS running? !sfn @@ -957,7 +985,7 @@ $! $ ENDIF !%Config-I-VMS, skip "where install" questions $! $!: set the base revision -$ baserev="5.0" +$ baserev="5" $!: get the patchlevel $ echo "" $ echo4 "Getting the current patchlevel..." !>&4 @@ -969,16 +997,16 @@ $ got_sub = "false" $ OPEN/READONLY CONFIG 'patchlevel_h' $Patchlevel_h_loop: $ READ/END_Of_File=Close_patch CONFIG line -$ IF ((F$LOCATE("#define PATCHLEVEL",line).NE.F$LENGTH(line)).AND.(.NOT.got_patch)) +$ IF ((F$LOCATE("#define PERL_VERSION",line).NE.F$LENGTH(line)).AND.(.NOT.got_patch)) $ THEN $ line = F$EDIT(line,"COMPRESS, TRIM") -$ patchlevel = F$EXTRACT(18,F$LENGTH(line)-18,line) +$ patchlevel = F$ELEMENT(2," ",line) $ got_patch = "true" $ ENDIF -$ IF ((F$LOCATE("#define SUBVERSION",line).NE.F$LENGTH(line)).AND.(.NOT.got_sub)) +$ IF ((F$LOCATE("#define PERL_SUBVERSION",line).NE.F$LENGTH(line)).AND.(.NOT.got_sub)) $ THEN $ line = F$EDIT(line,"COMPRESS, TRIM") -$ subversion = F$EXTRACT(18,F$LENGTH(line)-18,line) +$ subversion = F$ELEMENT(2," ",line) $ got_sub = "true" $ ENDIF $ IF (.NOT.got_patch).OR.(.NOT.got_sub) THEN GOTO Patchlevel_h_loop @@ -1005,7 +1033,7 @@ $ ENDIF $ ELSE subversion = "" $ ENDIF $! -$ version = F$EXTRACT(0,1,baserev) + "_" + patchlevel + subversion +$ version = baserev + "_" + patchlevel + "_" + subversion $! $ IF (.NOT.vms_skip_install) $ THEN @@ -1125,12 +1153,12 @@ $ WRITE CONFIG " exit(0);" $ WRITE CONFIG "}" $ CLOSE CONFIG $! -$ DEFINE SYS$ERROR _NLA0: -$ DEFINE SYS$OUTPUT _NLA0: +$! DEFINE SYS$ERROR _NLA0: +$! DEFINE SYS$OUTPUT _NLA0: $ cc/NoObj/list=ccvms.lis ccvms.c $ tmp = $status -$ DEASSIGN SYS$OUTPUT -$ DEASSIGN SYS$ERROR +$! DEASSIGN SYS$OUTPUT +$! DEASSIGN SYS$ERROR $ IF (silent) THEN GOSUB Shut_up $! echo "%Config-I-VMS, After cc compile $status = >''tmp'<" !diagnostic $! @@ -1172,7 +1200,7 @@ $ echo "%Config-I-VMS, You also have: ''line' ''archsufx' ''F$GETSYI("VERSIO $ vms_cc_available = vms_cc_available + "cc/decc " $ ENDIF $ ELSE -$ IF F$LOCATE("DEC",line).NE.F$LENGTH(line) +$ 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 " @@ -1242,7 +1270,7 @@ $ IF ans.NES."" $ THEN $ ans = F$EDIT(ans,"TRIM, COMPRESS, LOWERCASE") $ Mcc = ans -$ IF F$LOCATE("dec",ans).NE.F$LENGTH(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" @@ -1256,7 +1284,7 @@ $ C_COMPILER_Replace = "CC=cc=''Mcc'" $ ENDIF $ IF Mcc.NES.dflt $ THEN -$ IF F$LOCATE("dec",dflt).NE.F$LENGTH(dflt) +$ 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 @@ -1340,6 +1368,8 @@ $ 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 $Vaxc_Invoke_check: $ IF "''Using_Vax_C'".EQS."Yes" @@ -1562,7 +1592,7 @@ $ IF mydomain.NES."" !no periods in DECnet names like "MYDECNODE::" $ THEN $ rp = "What is your domain name? [''mydomain'] " $ GOSUB myread -$ IF ans THEN mydomain = ans +$ IF ans .nes. "" THEN mydomain = ans $!: translate upper to lower if necessary $ mydomain = F$EDIT(mydomain,"COLLAPSE") $ mylowdomain = F$EDIT(mydomain," LOWERCASE") @@ -1583,10 +1613,10 @@ 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'" +$ dflt = "''cf_by'@''myhostname'"+"''mydomain'" $ rp = "What is your e-mail address? [''dflt'] " $ GOSUB myread -$ IF ans +$ IF ans .nes. "" $ THEN cf_email = ans $ ELSE cf_email = dflt $ ENDIF @@ -1603,7 +1633,7 @@ $ ENDIF $ dflt = "''cf_email'" $ rp = "Perl administrator e-mail address [''dflt'] " $ GOSUB myread -$ IF ans +$ IF ans .nes. "" $ THEN perladmin = ans $ ELSE perladmin = dflt $ ENDIF @@ -1670,31 +1700,71 @@ $ 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 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 yep, you can +$ 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." -$ echo "" $ dflt = "n" $ rp = "Build with MULTIPLICITY? [''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") +$ 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 +$ echo "" +$ echo "This version of perl has experimental support for building with +$ echo "64 bit integers and 128 bit floating point variables. This gives +$ echo "a much larger range for perl's mathematical operations. (Note that +$ echo "does *not* enable 64-bit fileops at the moment, as Dec C doesn't +$ echo "do that yet)" +$ dflt = use_64bitint +$ rp = "Build with 64 bit integers and 128 bit floating point variable? [''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_64bitint="Y" +$ ELSE +$ use_64bitint="N" +$ ENDIF +$ ENDIF +$! $! 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* -$ echo "" $ dflt = "n" $ rp = "Build with threads? [''dflt'] " $ GOSUB myread @@ -1714,7 +1784,6 @@ $ 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) -$ echo "" $ dflt = "n" $ rp = "Enable multiple kernel threads and upcalls? [''dflt'] " $ gosub myread @@ -1727,26 +1796,41 @@ $ ENDIF $ ENDIF $ ENDIF $! -$! Pre-load %ENV? +$! Ask whether they want to use secure logical translation when tainting $ echo "" -$ echo "Because of the way perl fetches the list of logical names -$ echo "for the %ENV hash (we spawn a subprocess that does a -$ echo "SHOW LOGICALS *, which is expensive), we defer fetching it -$ echo "until the first time a program iterates over the %ENV hash. -$ echo "This means things like 'exists($ENV{'SYS$MANAGER'})' will -$ echo "return false unless you've already accessed $ENV{SYS$MANAGER} -$ echo "or done something like a keys %ENV." +$ 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 "If you choose, perl can populate the %ENV hash at startup. -$ echo "This will exact both a memory penalty (to store the keys) and -$ echo "a time penalty (to spawn the subprocess) every time you invoke -$ echo "perl. Depending on your system, this might not be a big deal. +$ 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 = "n" +$ 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)." $ dflt = "n" -$ rp = "Populate %ENV at startup time? [''dflt'] " +$ rp = "Always use default file types? [''dflt'] " $ GOSUB myread $ if ans.eqs."" then ans="''dflt'" -$ preload_env = f$extract(0, 1, f$edit(ans,"TRIM,COMPRESS,UPCASE")) +$ d_alwdeftype = f$extract(0, 1, f$edit(ans,"COLLAPSE,UPCASE")) $! $! Ask if they want to use perl's memory allocator $ echo "" @@ -1754,12 +1838,11 @@ $ 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. -$ echo "" $ 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,"TRIM,COMPRESS,UPCASE")) +$ mymalloc = f$extract(0, 1, f$edit(ans,"COLLAPSE,UPCASE")) $ if mymalloc.eqs."Y" $ THEN $ if use_debugging_perl.eqs."Y" @@ -1768,12 +1851,11 @@ $ 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. -$ echo "" $ 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, "TRIM,COMPRESS,UPCASE")) +$ use_debugmalloc = f$extract(0, 1, f$edit(ans, "COLLAPSE,UPCASE")) $ ENDIF $ ! Check which memory allocator we want $ echo "" @@ -1784,7 +1866,6 @@ $ 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." -$ echo "" $ dflt = "DEFAULT" $ rp = "Memory allocator (DEFAULT, TWO_POT, PACK_MALLOC) [''dflt'] " $ GOSUB myread @@ -1798,10 +1879,13 @@ $ 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 "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 IO Opcode Dumper attrs re Stdio DCLsym B SDBM_File" +$! 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" $ if Using_Dec_C.eqs."Yes" $ THEN $ dflt = dflt + " POSIX" @@ -1814,6 +1898,7 @@ $ rp = "[''dflt'] " $ GOSUB myread $ if ans.eqs."" then ans = "''dflt'" $ extensions = "''ans'" +$ perl_known_extensions = "''dflt'" $! $! %Config-I-VMS, determine build/make utility here (make gmake mmk mms) $ echo "" @@ -1840,9 +1925,9 @@ $Build_probe: $ build = F$ELEMENT(n,"/",builders) $ probe = F$ELEMENT(n,"!",probers) $ echo "Testing whether you have ''build' on your system..." -$ SET NOON !sorry :-( -$ ON CONTROL_Y THEN GOTO Reenable_messages_build !sorry :-( -$ SET MESSAGE/NOFAC/NOSEV/NOIDENT/NOTEXT !sorry :-( +$ SET NOON +$ ON CONTROL_Y THEN GOTO Reenable_messages_build +$ SET MESSAGE/NOFAC/NOSEV/NOIDENT/NOTEXT $ 'build' 'probe' $ IF ($SEVERITY .EQ. 1) $ THEN @@ -1857,9 +1942,9 @@ $ IF (.NOT. default_set) THEN dflt = build $ ELSE $ echo "Nope." $ ENDIF -$Reenable_messages_build: !hope you made it here :-) -$ SET MESSAGE 'messages' !hope you made it here :-) -$ SET ON !hope you made it here :-) +$Reenable_messages_build: +$ SET MESSAGE 'messages' +$ SET ON $ n = n + 1 $ IF (n .LT. max_build) THEN GOTO Build_probe $! @@ -1950,17 +2035,69 @@ $! $! Invoke the subconfig piece $! $ echo "" -$ echo4 "Checking the C Run time library" +$ 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 $! $ echo "" $ echo4 "%Config-I-VMS, The perl_setup.com file is now being written..." -$ file_2_find = "[-.vms]perl_setup.com" +$ file_2_find = "[-]perl_setup.com" $ OPEN/WRITE CONFIG 'file_2_find' $ WRITE CONFIG "$!" $ WRITE CONFIG "$! Perl_Setup.com ''cf_time'" @@ -1971,11 +2108,28 @@ $ 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 "$ perl :== $Perl_Root:[000000]Perl" -$ WRITE CONFIG "$ define PerlShr Perl_Root:[000000]PerlShr.Exe" +$ write config "$ ext = "".exe""" +$ if sharedperl .eqs. "Y" +$ then +$ write config "$ if f$getsyi(""ARCH_NAME"") .nes. ""VAX"" then ext = "".AXE""" +$ endif +$ IF use_vmsdebug_perl .eqs. "Y" +$ 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 +$ 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'" @@ -1985,7 +2139,14 @@ $ ENDIF $ WRITE CONFIG "$!" $ WRITE CONFIG "$! Symbols for commonly used scripts:" $ WRITE CONFIG "$!" -$ WRITE CONFIG "$ Perldoc == ""'"+"'Perl' Perl_Root:[lib.pod]Perldoc.com -t""" +$ WRITE CONFIG "$ Perldoc == ""'"+"'Perl' Perl_Root:[lib.pod]Perldoc.com -t""" +$ WRITE CONFIG "$ pod2text == ""'"+"'Perl' pod2text""" +$ WRITE CONFIG "$ pod2html == ""'"+"'Perl' pod2html""" +$ WRITE CONFIG "$!pod2man == ""'"+"'Perl' pod2man""" +$ WRITE CONFIG "$!Perlbug == ""'"+"'Perl' Perl_Root:[lib]Perlbug.com""" +$ WRITE CONFIG "$!c2ph == ""'"+"'Perl' c2ph""" +$ WRITE CONFIG "$!h2ph == ""'"+"'Perl' h2ph""" +$ WRITE CONFIG "$!h2xs == ""'"+"'Perl' h2xs""" $ CLOSE CONFIG $! $ echo "" @@ -2028,6 +2189,15 @@ $ 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