avoid typeglob persistence in pp_readline()
[p5sagit/p5-mst-13.2.git] / configure.com
index 57fb5c5..7e28293 100644 (file)
@@ -1,43 +1,34 @@
 $ sav_ver = 'F$VERIFY(0)'
 $! SET VERIFY
 $!
-$! Installation and usage: COPY this file into you perl source tree - at or 
-$! below where the main MANIFEST. file is located.
-$!
 $! For example, if you unpacked perl into: [USER.PERL5_00n...] then you will 
-$! want to:
-$!
-$! $ COPY Configure.com [USER.PERL5_00n.VMS] 
-$!
-$! Now cd into the tree and execute Configure:
+$! want to cd into the tree and execute Configure:
 $!
 $! $ SET DEFAULT [USER.PERL5_00n]
-$! $ @[.vms]Configure 
+$! $ @Configure 
 $!
 $! or
 $!
 $! $ SET DEFAULT [USER.PERL5_00n]
-$! $ @[.vms]Configure "-des"
+$! $ @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 as well as the top of the 
-$! [.VMS]DESCRIP.MMS file.  
+$! definitely read through the README.VMS file.
 $! Beyond that send email to VMSPerl@cor.newman.upenn.edu 
 $!
 $! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 $!
-$! This CONFIGURE.COM prototype is available from:
-$! http://w4.lns.cornell.edu/~pvhp/perl/vms/devel/configure.com
 $! send suggestions to: 
-$!  Peter Prymmer pvhp@lns62.lns.cornell.edu or pvhp@forte.com
+$!  Dan Sugalski <sugalskd@ous.edu>
 $! Thank you!!!!
 $!
 $! Adapted and converted from Larry Wall & Andy Dougherty's
-$! "Configure generated by metaconfig 3.0 PL60."
+$! "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)
 $! with much valuable help from Charles Bailey & 
 $! the whole VMSPerl crew.
+$! Extended and messed about with by Dan Sugalski
 $!
 $! SET NOVERIFY
 $ sav_ver = F$VERIFY(sav_ver)
@@ -48,7 +39,14 @@ $ cat  = "type"
 $ gcc_symbol = "gcc"
 $ ans = ""
 $ macros = ""
+$ use_debugging_perl = "Y"
 $ C_Compiler_Replace = "CC="
+$ Thread_Live_Dangerously = "MT="
+$ use_two_pot_malloc = "N"
+$ use_pack_malloc = "N"
+$ use_debugmalloc = "N"
+$ preload_env = "N"
+$ 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]
@@ -384,6 +382,8 @@ $   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" THEN GOTO Beyond_depth_check
 $   IF (F$ELEMENT(max_allowed_dir_depth,".",F$ENVIRONMENT("Default")).nes.".")
 $   THEN
 $     TYPE SYS$INPUT:
@@ -396,6 +396,7 @@ $     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
 $!
@@ -495,7 +496,7 @@ 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 (pvhp@lns62.lns.cornell.edu).
+and contact the author (sugalskd@ous.edu).
 
 $     READ SYS$COMMAND/PROMPT="Continue? [n] " ans
 $     IF ans
@@ -870,7 +871,7 @@ $   ENDIF
 $ ENDIF
 $ IF (archname.EQS."VMS_AXP")
 $ THEN
-$   dflt = "N"
+$   dflt = "n"
 $   rp = "Are you sharing your PERL_ROOT with a VAX? [''dflt'] "
 $   GOSUB myread
 $   if ans.NES.""
@@ -968,13 +969,13 @@ $   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)
 $     got_patch = "true"
 $   ENDIF
-$   IF ((F$LOCATE("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)
@@ -1245,11 +1246,13 @@ $   IF F$LOCATE("dec",ans).NE.F$LENGTH(ans)
 $   THEN
 $     Mcc = "cc/decc"
 $     Using_Dec_C = "Yes"
+$     C_COMPILER_Replace = "CC=cc=''Mcc'"
 $   ENDIF
 $   IF F$LOCATE("vax",ans).NE.F$LENGTH(ans)
 $   THEN
 $     Mcc = "cc/vaxc"
 $     Using_Vax_C = "Yes"
+$     C_COMPILER_Replace = "CC=cc=''Mcc'"
 $   ENDIF
 $   IF Mcc.NES.dflt
 $   THEN
@@ -1267,6 +1270,7 @@ $   ELSE
 $     IF Mcc .EQS. "cc/decc"
 $     THEN
 $       Using_Dec_C = "Yes"
+$       C_COMPILER_Replace = "CC=cc=''Mcc'"
 $     ENDIF
 $   ENDIF
 $ ELSE 
@@ -1274,14 +1278,17 @@ $   Mcc = dflt
 $   IF Mcc .EQS. "cc/decc"
 $   THEN
 $     Using_Dec_C = "Yes"
+$     C_COMPILER_Replace = "CC=cc=''Mcc'"
 $   ENDIF
 $   IF Mcc .EQS. "cc/vaxc"
 $   THEN
 $     Using_Vax_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:
@@ -1647,7 +1654,7 @@ $   if "''has_dec_c_sockets'".eqs."T"
 $   THEN
 $     dflt = "DECC"
 $   else
-$     dlft = "SOCKETSHR"
+$     dflt = "SOCKETSHR"
 $   endif
 $   rp = "Choose socket stack (NONE"
 $   if "''has_socketshr'".eqs."T" THEN rp = rp + ",SOCKETSHR"
@@ -1663,6 +1670,24 @@ $   IF ans.eqs."socketshr" then has_socketshr = "T"
 $ endif
 $!
 $!
+$! Ask if they want to build with MULTIPLICITY
+$ 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 "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")
+$ THEN
+$   use_multiplicity="Y"
+$ ELSE
+$   use_multiplicity="N"
+$ ENDIF
 $! Ask about threads, if appropriate
 $ if (Using_Dec_C.eqs."Yes")
 $ THEN
@@ -1670,13 +1695,35 @@ $   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 = "y"
+$   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"
+$     ! 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)
+$       echo ""
+$       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
 $!
@@ -1685,13 +1732,45 @@ $ 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.
+$ echo "memory allocation statistics, if you choose to enable them.
 $ echo ""
-$ dflt = "N"
+$ 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"))
+$ 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.
+$     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"))
+$   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."
+$   echo ""
+$   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 ""
@@ -1701,7 +1780,7 @@ $ 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 "
 $ echo "Which modules do you want to build into perl?"
-$ dflt = "Fcntl IO Opcode attrs Stdio DCLsym B SDBM_File"
+$ dflt = "Fcntl Errno IO Opcode Dumper attrs re Stdio DCLsym B SDBM_File"
 $ if Using_Dec_C.eqs."Yes"
 $ THEN
 $   dflt = dflt + " POSIX"
@@ -1850,7 +1929,7 @@ $!
 $! Invoke the subconfig piece
 $!
 $ echo ""
-$ echo4 "Generating config.h"
+$ echo4 "Checking the C Run time library"
 $ dflt = F$ENVIRONMENT("DEFAULT")
 $ SET DEFAULT [-.vms]
 $ @subconfigure