tweak for change#7173
[p5sagit/p5-mst-13.2.git] / configure.com
index c3cba13..c0e305e 100644 (file)
@@ -35,6 +35,7 @@ $!
 $! VMS-isms we will need:
 $ echo = "write sys$output "
 $ cat  = "type"
+$ delete := delete ! local symbol overrides globals with qualifiers
 $ gcc_symbol = "gcc"
 $ ld = "Link"
 $ ans = ""
@@ -398,7 +399,7 @@ $ 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
+$! Here I assume we are in the [foo.PERLxxx...] 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:
@@ -580,13 +581,23 @@ $ If (fastread)
 $ Then
 $   echo4 "''rp'"
 $ Else
-$   If (silent)
-$   Then
+$   If (.NOT. silent) Then echo ""
+$   READ SYS$COMMAND/PROMPT="''rp'" ans
+$   IF (ans .EQS. "&-d")
+$   THEN
+$     echo4 "(OK, I will run with -d after this question.)"
+$     IF (.NOT. silent) THEN echo ""
 $     READ SYS$COMMAND/PROMPT="''rp'" ans
-$   Else
+$     fastread := yes
+$   ENDIF
+$   IF (ans .EQS. "&-s")
+$   THEN
+$     echo4 "(OK, I will run with -s after this question.)"
 $     echo ""
 $     READ SYS$COMMAND/PROMPT="''rp'" ans
-$   Endif
+$     silent := true
+$     GOSUB Shut_up
+$   ENDIF
 $ Endif
 $ RETURN
 $!
@@ -607,6 +618,58 @@ $   WRITE CONFIG -
 $   CLOSE CONFIG
 $ ENDIF
 $!
+$ IF F$TYPE(usedevel) .EQS. "" THEN usedevel := n
+$ patchlevel_h = F$SEARCH("[-]patchlevel.h")
+$ IF (patchlevel_h.NES."")
+$ THEN
+$   SEARCH 'patchlevel_h "define","PERL_VERSION","epoch"/match=and/out=[]ver.out
+$   IF .NOT. usedevel .AND. usedevel .NES. "define"
+$   THEN
+$     OPEN/READ CONFIG []ver.out
+$     READ CONFIG line
+$     CLOSE CONFIG
+$     tmp = F$EDIT(line,"TRIM,COMPRESS")
+$     xpatchlevel = F$INTEGER(F$ELEMENT(2," ",tmp))
+$     line = xpatchlevel / 2
+$     tmp = xpatchlevel - ( line * 2 )
+$     IF tmp .NE. 0
+$     THEN
+$       echo4 "patchlevel is " + F$STRING(xpatchlevel)
+$       cat4 SYS$INPUT:
+*** WHOA THERE!!! ***
+
+    This is an UNSTABLE DEVELOPMENT release.
+    (The patchlevel, is odd--as opposed to even,
+     and that signifies a development release.  If you want a
+     maintenance release, you want an even-numbered release.)
+
+    Do ***NOT*** install this into production use.
+    Data corruption and crashes are possible.
+
+    It is most seriously suggested that you do not continue any further
+    unless you want to help in developing and debugging Perl.
+
+$       dflt="n"
+$       rp="Do you really want to continue? [''dflt'] "
+$       IF (fastread) THEN fastread := FALSE
+$       GOSUB myread
+$       IF ans .EQS. "" THEN ans = dflt
+$       IF ans
+$       THEN
+$         echo4 "Okay, continuing."
+$       ELSE
+$         echo4 "Okay, bye."
+$         DELETE/NOLOG/NOCONFIRM []ver.out;
+$         GOTO Clean_up
+$         STOP
+$         exit 0
+$       ENDIF
+$     ENDIF
+$     DELETE/SYMBOL line
+$     DELETE/SYMBOL tmp
+$   ENDIF
+$   DELETE/NOLOG/NOCONFIRM []ver.out;
+$ ENDIF
 $!: general instructions
 $ needman = "true"
 $ firsttime = "true"
@@ -680,7 +743,7 @@ $ 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"
+$!trylist="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 ""
@@ -705,16 +768,18 @@ $   IF (configshfound.NES."") THEN GOTO Config_sh_found
 $ ENDIF
 $ IF (i.LT.max) THEN GOTO Config_sh_look
 $! genconfig.pl has "osname='VMS'"
-$ osname = F$EDIT(F$GETSYI("NODE_SWTYPE"),"COLLAPSE") 
+$ osname = F$EDIT(F$GETSYI("NODE_SWTYPE"),"COLLAPSE")
 $ IF (configshfound.EQS."")
 $ THEN
 $   config_sh = "[-]config.sh" ! the fallback default
 $   GOTO Beyond_config_sh
 $ ENDIF
 $Config_sh_found:
+$ IF F$TYPE(osname) .EQS. "" THEN osname = F$EDIT(F$GETSYI("NODE_SWTYPE"),"COLLAPSE")
 $ IF F$TYPE(config_dflt) .EQS. "" THEN config_dflt = "n"
 $ rp = "Shall I @ ''config_sh' for default answers? [''config_dflt'] "
 $ GOSUB myread
+$ IF ans .EQS. "" THEN ans = config_dflt
 $ IF ans
 $ THEN
 $   echo ""
@@ -2141,7 +2206,7 @@ $ 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'] "
+$ rp = "Build with case-sensitive symbols? [''dflt'] "
 $ gosub myread
 $ if ans.eqs."" then ans="''dflt'"
 $ be_case_sensitive = "''ans'"
@@ -2152,7 +2217,7 @@ $ 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'] "
+$ rp = "Use IEEE math? [''dflt'] "
 $ gosub myread
 $ if ans.eqs."" then ans="''dflt'"
 $ use_ieee_math = "''ans'"
@@ -2160,7 +2225,7 @@ $ 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 "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'] "
@@ -2269,7 +2334,7 @@ $ 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"
+$ dflt = "re Fcntl Errno File::Glob IO Opcode Devel::Peek Devel::DProf Data::Dumper attrs VMS::Stdio VMS::DCLsym B SDBM_File Storable Thread Sys::Hostname"
 $ if Using_Dec_C
 $ THEN
 $   dflt = dflt + " POSIX"
@@ -2372,7 +2437,7 @@ $ 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']? "
+$   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
@@ -2426,7 +2491,17 @@ $ 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?'
+$ dflt = "type/page"
+$! assume that the presence of a most symbol indicates the presence
+$! of the pager.
+$ IF F$TYPE(most) .EQS. "STRING" THEN dflt = "most"
+$ IF F$TYPE(pager) .EQS. "STRING" THEN dflt = pager
+$ rp="What pager is used on your system? [''dflt'] "
+$ GOSUB myread
+$ IF (ans .EQS. "") 
+$ THEN pager = dflt
+$ ELSE pager = ans
+$ ENDIF
 $!
 $! update [.vms]config.vms here
 $!
@@ -2482,7 +2557,7 @@ $!
 $ echo ""
 $ echo4 "Checking the C run-time library."
 $!
-$! SUBCONFIGURE.COM
+$! Former SUBCONFIGURE.COM
 $!
 $!  - build a config.sh for VMS Perl.
 $!  - use built config.sh to take config_h.SH -> config.h
@@ -2619,9 +2694,6 @@ $ ENDIF
 $!
 $ usedl="define"
 $ startperl="""$ perl 'f$env(\""procedure\"")' 'p1' 'p2' 'p3' 'p4' 'p5' 'p6' 'p7' 'p8'  !\n$ exit++ + ++$status != 0 and $exit = $status = undef;"""
-$!: locate the preferred pager for this system
-$! rp="What pager is used on your system?"
-$ pager="most"
 $!
 $ IF ((Use_Threads) .AND. (vms_ver .LES. "6.2"))
 $ THEN
@@ -2636,21 +2708,33 @@ $ ELSE
 $   libc=" "
 $ ENDIF
 $!
+$! perllibs should be libs with all non-core libs (such as gdbm) removed.
+$!
+$ perllibs=libs
+$!
 $! Are we 64 bit?
 $!
 $ IF use64bitint .OR. use64bitint .EQS. "define"
 $ THEN
 $   d_PRId64 = "define"
+$   d_PRIEUldbl = "define"
+$   d_PRIFUldbl = "define"
+$   d_PRIGUldbl = "define"
+$   d_PRIeldbl = "define"
 $   d_PRIfldbl = "define"
 $   d_PRIgldbl = "define"
 $   d_PRIu64 = "define"
 $   d_PRIo64 = "define"
 $   d_PRIx64 = "define"
 $   sPRId64 = """Ld"""
-$!   sPRIeldbl = """Lf"""
+$   sPRIEUldbl = """LE"""
+$   sPRIFUldbl = """LF"""
+$   sPRIGUldbl = """LG"""
+$   sPRIXU64 = """LX"""
+$   sPRIeldbl = """Le"""
 $   sPRIfldbl = """Lf"""
 $   sPRIgldbl = """Lg"""
-$!   sPRIi64 = """Li"""
+$   sPRIi64 = """Li"""
 $   sPRIo64 = """Lo"""
 $   sPRIu64 = """Lu"""
 $   sPRIx64 = """Lx"""
@@ -2659,20 +2743,30 @@ $   quadtype = "long long"
 $   uquadtype = "unsigned long long"
 $   quadkind  = "QUAD_IS_LONG_LONG"
 $   d_frexpl = "define"
+$   d_isnan = "define"
 $   d_isnanl = "define"
 $   d_modfl = "define"
 $ ELSE
 $   d_PRId64 = "undef"
+$   d_PRIEUldbl = "define"
+$   d_PRIFUldbl = "define"
+$   d_PRIGUldbl = "define"
+$   d_PRIXU64 = "undef"
+$   d_PRIeldbl = "define"
 $   d_PRIfldbl = "undef"
 $   d_PRIgldbl = "undef"
 $   d_PRIu64 = "undef"
 $   d_PRIo64 = "undef"
 $   d_PRIx64 = "undef"
 $   sPRId64 = ""
-$!   sPRIeldbl = ""
-$   sPRIfldbl = ""
-$   sPRIgldbl = ""
-$!   sPRIi64 = ""
+$   sPRIEUldbl = """E"""
+$   sPRIFUldbl = """F"""
+$   sPRIGUldbl = """G"""
+$   sPRIXU64 = """lX"""
+$   sPRIeldbl = """e"""
+$   sPRIfldbl = """f"""
+$   sPRIgldbl = """g"""
+$   sPRIi64 = ""
 $   sPRIo64 = ""
 $   sPRIu64 = ""
 $   sPRIx64 = ""
@@ -2681,9 +2775,12 @@ $   quadtype = "long"
 $   uquadtype = "unsigned long"
 $   quadkind  = "QUAD_IS_LONG"
 $   d_frexpl = "undef"
+$   d_isnan = "undef"
 $   d_isnanl = "undef"
 $   d_modfl = "undef"
 $ ENDIF
+$ d_SCNfldbl = d_PRIfldbl
+$ sSCNfldbl = sPRIfldbl ! expect consistency
 $!
 $! Now some that we build up
 $!
@@ -4551,11 +4648,17 @@ $ WC "cppstdin='" + cppstdin + "'"
 $ WC "crosscompile='undef'"
 $ WC "d_Gconvert='my_gconvert(x,n,t,b)'"
 $ WC "d_PRId64='" + d_PRId64 + "'"
+$ WC "d_PRIEldbl='" + d_PRIEUldbl + "'"
+$ WC "d_PRIFldbl='" + d_PRIFUldbl + "'"
+$ WC "d_PRIGldbl='" + d_PRIGUldbl + "'"
+$ WC "d_PRIX64='" + d_PRIXU64 + "'"
+$ WC "d_PRIeldbl='" + d_PRIeldbl + "'"
 $ WC "d_PRIfldbl='" + d_PRIfldbl + "'"
 $ WC "d_PRIgldbl='" + d_PRIgldbl + "'"
 $ WC "d_PRIo64='" + d_PRIo64 + "'"
 $ WC "d_PRIu64='" + d_PRIu64 + "'"
 $ WC "d_PRIx64='" + d_PRIx64 + "'"
+$ WC "d_SCNfldbl='" + d_SCNfldbl + "'"
 $ WC "d_access='" + d_access + "'"
 $ WC "d_accessx='undef'"
 $ WC "d_alarm='define'"
@@ -4659,7 +4762,7 @@ $ WC "d_index='" + d_index + "'"
 $ WC "d_inetaton='undef'"
 $ WC "d_int64_t='" + d_int64_t + "'"
 $ WC "d_isascii='define'"
-$ WC "d_isnan='define'"
+$ WC "d_isnan='" + d_isnan + "'"
 $ WC "d_isnanl='" + d_isnanl + "'"
 $ WC "d_killpg='undef'"
 $ WC "d_lchown='undef'"
@@ -4778,6 +4881,7 @@ $ WC "d_sigsetjmp='" + d_sigsetjmp + "'"
 $ WC "d_socket='" + d_socket + "'"
 $ WC "d_socklen_t='" + d_socklen_t + "'"
 $ WC "d_sockpair='undef'"
+$ WC "d_socks5_init='undef'"
 $ WC "d_sqrtl='define'"
 $ WC "d_statblks='undef'"
 $ WC "d_statfs_f_flags='undef'"
@@ -4976,7 +5080,7 @@ $ WC "make='" + make + "'"
 $ WC "malloctype='void *'"
 $ WC "man1ext='rno'"
 $ WC "man3ext='rno'"
-$ WC "mmaptype='" + "'"
+$ WC "mmaptype=' " + "'"
 $ WC "modetype='unsigned int'"
 $ WC "multiarch='undef'"
 $ WC "mydomain='" + mydomain + "'"
@@ -5006,6 +5110,7 @@ $ WC "patchlevel='" + patchlevel + "'"
 $ WC "path_sep='|'"
 $ WC "perl_root='" + perl_root + "'" ! VMS specific $trnlnm()
 $ WC "perladmin='" + perladmin + "'"
+$ WC "perllibs='" + perllibs + "'"
 $ WC "pgflquota='" + pgflquota + "'"
 $ WC "pidtype='" + pidtype + "'"
 $ WC "pm_apiversion='" + version + "'"
@@ -5022,18 +5127,19 @@ $ WC "randseedtype='" + randseedtype + "'"
 $ WC "ranlib='" + "'"
 $ WC "rd_nodata=' '"
 $ WC "revision='" + revision + "'"
-$! WC "sPRIEldbl='$sPRIEldbl'
-$! WC "sPRIFldbl='$sPRIFldbl'
-$! WC "sPRIGldbl='$sPRIGldbl'
-$! WC "sPRIX64='$sPRIX64'
 $ WC "sPRId64='" + sPRId64 + "'"
-$! WC "sPRIeldbl='" + sPRIeldbl + "'"
+$ WC "sPRIEldbl='" + sPRIEUldbl + "'"
+$ WC "sPRIFldbl='" + sPRIFUldbl + "'"
+$ WC "sPRIGldbl='" + sPRIGUldbl + "'"
+$ WC "sPRIX64='" + sPRIXU64 + "'"
+$ WC "sPRIeldbl='" + sPRIeldbl + "'"
 $ WC "sPRIfldbl='" + sPRIfldbl + "'"
 $ WC "sPRIgldbl='" + sPRIgldbl + "'"
 $! WC "sPRIi64='" + sPRIi64 + "'"
 $ WC "sPRIo64='" + sPRIo64 + "'"
 $ WC "sPRIu64='" + sPRIu64 + "'"
 $ WC "sPRIx64='" + sPRIx64 + "'"
+$ WC "sSCNfldbl='" + sSCNfldbl + "'"
 $ WC "sched_yield='" + sched_yield + "'"
 $ WC "seedfunc='" + seedfunc + "'"
 $ WC "selectminbits='32'"
@@ -5068,7 +5174,7 @@ $ WC "stdio_base='((*fp)->_base)'"
 $ WC "stdio_bufsiz='((*fp)->_cnt + (*fp)->_ptr - (*fp)->_base)'"
 $ WC "stdio_cnt='((*fp)->_cnt)'"
 $ WC "stdio_ptr='((*fp)->_ptr)'"
-$ WC "stdio_stream_array='" + "'"
+$ WC "stdio_stream_array=' " + "'"
 $ WC "subversion='" + subversion + "'"
 $ WC "timetype='" + timetype + "'"
 $ WC "u16size='" + u16size + "'"
@@ -5152,7 +5258,7 @@ If you'd like to make any changes to the config.sh file before I begin
 to configure things, answer yes to the following question.
 
 $   dflt="n"
-$   rp="Do you wish to edit ''basename_config_sh'? "
+$   rp="Do you wish to edit ''basename_config_sh'? [''dflt'] "
 $   GOSUB myread
 $   IF ans .EQS. "" then ans = dflt
 $   IF ans
@@ -5273,7 +5379,7 @@ $ Deck/Dollar="$EndOfTpl$"
 $!++ Build_Ext.Com
 $!   NOTE: This file is extracted as part of the VMS configuration process.
 $!   Any changes made to it directly will be lost.  If you need to make any
-$!   changes, please edit the template in [.vms]SubConfigure.Com instead.
+$!   changes, please edit the template in Configure.Com instead.
 $    def = F$Environment("Default")
 $    exts1 = F$Edit(p1,"Compress")
 $    p2 = F$Edit(p2,"Upcase,Compress,Trim")