Even more Todo.
[p5sagit/p5-mst-13.2.git] / configure.com
index e31d98b..aca42de 100644 (file)
@@ -39,6 +39,7 @@ $ cat  = "type"
 $ gcc_symbol = "gcc"
 $ ans = ""
 $ macros = ""
+$ use_vmsdebug_perl = "N"
 $ use_debugging_perl = "Y"
 $ C_Compiler_Replace = "CC="
 $ Thread_Live_Dangerously = "MT="
@@ -1670,6 +1671,24 @@ $   IF ans.eqs."socketshr" then has_socketshr = "T"
 $ endif
 $!
 $!
+$! Ask if they want to build with VMS_DEBUG perl
+$ 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."
+$ echo ""
+$ dflt = "N"
+$ rp = "Build a VMS-DEBUG version of Perl? [''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_vmsdebug_perl = "Y"
+$   macros = macros + """__DEBUG__=1"","
+$ ELSE
+$   use_vmsdebug_perl = "N"
+$ 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
@@ -1818,7 +1837,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 Errno IO Opcode Data::Dumper attrs re VMS::Stdio VMS::DCLsym B SDBM_File"
+$ dflt = "Fcntl Errno IO Opcode Byteloader Devel::Peek Devel::DProf Data::Dumper attrs re VMS::Stdio VMS::DCLsym B SDBM_File"
 $ if Using_Dec_C.eqs."Yes"
 $ THEN
 $   dflt = dflt + " POSIX"
@@ -1973,6 +1992,32 @@ $ SET DEFAULT [-.vms]
 $ @subconfigure
 $ SET DEFAULT 'dflt
 $!
+$!  Warn of dangerous logical names
+$!
+$Bad_logical: SUBROUTINE
+$   IF f$trnlnm(p1) .nes. ""
+$   THEN
+$     IF f$search("config.msg") .nes. ""
+$     THEN
+$       OPEN/APPEND CONFIG config.msg
+$     ELSE
+$       OPEN/WRITE CONFIG config.msg
+$     ENDIF
+$     WRITE CONFIG "Logical name ''p1' found in environment as " + f$trnlnm(p1)
+$     WRITE CONFIG " deassign before building ''package'"
+$     CLOSE CONFIG
+$   ENDIF
+$ EXIT
+$ ENDSUBROUTINE ! Bad_logical
+$ echo ""
+$ echo4 "%Config-I-VMS, Checking for dangerous pre extant logical names."
+$ CALL Bad_logical "TMP"
+$ CALL Bad_logical "LIB"
+$ CALL Bad_logical "T"
+$ CALL Bad_logical "FOO"
+$ CALL Bad_logical "EXT"
+$ IF f$search("config.msg") .eqs. "" THEN echo "OK."
+$!
 $! %Config-I-VMS, write perl_setup.com here
 $!
 $ echo ""
@@ -1988,11 +2033,25 @@ $ 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
+$!
 $ IF (tzneedset)
 $ THEN
 $ WRITE CONFIG "$ define SYS$TIMEZONE_DIFFERENTIAL ''tzd'"
@@ -2045,6 +2104,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