This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
C RTL awareness update for VMS
[perl5.git] / configure.com
index ea09a29..335fc57 100644 (file)
@@ -2231,7 +2231,11 @@ $!
 $! 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
+$   dflt = "n"
+$   IF F$TYPE(use64bitint) .NES. "" 
+$   THEN
+$       IF use64bitint .OR. use64bitint .eqs. "define" THEN dflt = "y"
+$   ENDIF
 $   echo ""
 $   echo "You can have native 64-bit long integers."
 $   echo ""
@@ -2249,25 +2253,32 @@ $   IF ans
 $   THEN use64bitint="Y"
 $   ELSE use64bitint="N"
 $   ENDIF
-$   IF (use64bitint)
+$!
+$   dflt = "n"
+$   IF F$TYPE(use64bitall) .NES. "" 
+$   THEN
+$       IF use64bitall .OR. use64bitall .eqs. "define" THEN dflt = "y"
+$   ENDIF
+$   echo ""
+$   echo "You may also choose to try maximal 64-bitness.  It means using as much"
+$   echo "64-bitness as possible on the platform.  This in turn means even more"
+$   echo "binary incompatibilities.  On the other hand, your platform may not"
+$   echo "have any more 64-bitness available than what you already have chosen."
+$   echo ""
+$   echo "If this does not make any sense to you, just accept the default ''dflt'."
+$   rp = "Try to use maximal 64-bit support, if available? [''dflt'] "
+$   GOSUB myread
+$   IF ans .EQS. "" THEN ans = dflt
+$   IF ans
+$   THEN use64bitall="Y"
+$   ELSE use64bitall="N"
+$   ENDIF
+$   IF use64bitall .AND. .NOT. 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 does not 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 ans
-$     THEN use64bitall="Y"
-$     ELSE use64bitall="N"
-$     ENDIF
+$     echo "Since you have chosen a maximally 64-bit build, I'm also turning on"
+$     echo "the use of 64-bit integers."
+$     use64bitint="Y"
 $   ENDIF
 $ ENDIF ! AXP && >= 7.1
 $!
@@ -2363,6 +2374,9 @@ $   rp = "Use IEEE math? [''dflt'] "
 $   GOSUB myread
 $   IF ans .eqs. "" THEN ans = "''dflt'"
 $   use_ieee_math = "''ans'"
+$ ELSE
+$   be_case_sensitive = "n"
+$   use_ieee_math = "n"
 $ ENDIF
 $! CC Flags
 $ echo ""
@@ -2510,7 +2524,11 @@ $ IF .NOT. Has_socketshr .AND. .NOT. Has_Dec_C_Sockets
 $ THEN
 $   dflt = dflt - "Socket"            ! optional on VMS
 $ ENDIF
-$ IF .NOT. use_ithreads THEN dflt = dflt - "threads"
+$ IF .NOT. use_ithreads 
+$ THEN 
+$   dflt = dflt - "threads/shared"
+$   dflt = dflt - "threads"
+$ ENDIF
 $ dflt = F$EDIT(dflt,"TRIM,COMPRESS")
 $!
 $! Ask for their default list of extensions to build
@@ -2830,11 +2848,31 @@ $   uselargefiles = "define"
 $   uselongdouble = "define"
 $   alignbytes="16"
 $   usemorebits = "define"
+$   ivdformat="""Ld"""
+$   uvuformat="""Lu"""
+$   uvoformat="""Lo"""
+$   uvxformat="""Lx"""
+$   uvXUformat="""LX"""
 $ ELSE
 $   use64bitint = "undef"
 $   uselargefiles = "undef"
 $   uselongdouble = "undef"
 $   usemorebits = "undef"
+$   ivdformat="""ld"""
+$   uvuformat="""lu"""
+$   uvoformat="""lo"""
+$   uvxformat="""lx"""
+$   uvXUformat="""lX"""
+$ ENDIF
+$ IF uselongdouble .OR. uselongdouble .EQS. "define"
+$ THEN
+$   nveformat="""Le"""
+$   nvfformat="""Lf"""
+$   nvgformat="""Lg"""
+$ ELSE
+$   nveformat="""e"""
+$   nvfformat="""f"""
+$   nvgformat="""g"""
 $ ENDIF
 $ IF use64bitall .OR. use64bitall .EQS. "define"
 $ THEN
@@ -2912,6 +2950,7 @@ $   d_PRIgldbl = "define"
 $   d_PRIu64 = "define"
 $   d_PRIo64 = "define"
 $   d_PRIx64 = "define"
+$   d_PRIXU64 = "define"
 $   sPRId64 = """Ld"""
 $   sPRIEUldbl = """LE"""
 $   sPRIFUldbl = """LF"""
@@ -4519,7 +4558,7 @@ $   IF compile_status .EQ. good_compile .AND. link_status .EQ. good_link
 $   THEN
 $     echo4 "OK, found random()."
 $   ELSE
-$     drand01="(((float)rand())/((float)RAND_MAX))"
+$     drand01="(((float)rand())*MY_INV_RAND_MAX)"
 $     randseedtype = "unsigned"
 $     seedfunc = "srand"
 $     echo4 "Yick, looks like I have to use rand()."
@@ -4553,8 +4592,16 @@ $ IF (ccname .EQS. "DEC") .AND. -
      (F$INTEGER(Dec_C_Version).GE.50200000) .AND. (vms_ver .GES. "7.0")
 $ THEN
 $   d_bcmp="define"
+$   d_getitimer="define"
 $   d_gettimeod="define"
+$   d_mmap="define"
+$   d_mprotect="define"
+$   d_munmap="define"
+$   d_msync="define"
+$   d_ualarm="define"
 $   d_uname="define"
+$   d_usleep="define"
+$   d_setitimer="define"
 $   d_sigaction="define"
 $   d_sigprocmask="define"
 $   d_truncate="define"
@@ -4577,9 +4624,17 @@ $   d_sysconf="define"
 $   d_sigsetjmp="define"
 $ ELSE
 $   pidtype="unsigned int"
-$   d_gettimeod="undef"
 $   d_bcmp="undef"
+$   d_getitimer="undef"
+$   d_gettimeod="undef"
+$   d_mmap="undef"
+$   d_mprotect="undef"
+$   d_munmap="undef"
+$   d_msync="undef"
+$   d_ualarm="undef"
 $   d_uname="undef"
+$   d_usleep="undef"
+$   d_setitimer="undef"
 $   d_sigaction="undef"
 $   d_sigprocmask="undef"
 $   d_truncate="undef"
@@ -4872,37 +4927,27 @@ $   d_nv_preserves_uv_bits = tmp
 $ ENDIF
 $ DELETE/SYMBOL tmp
 $!
-$ ivdformat="""ld"""
-$ uvuformat="""lu"""
-$ uvoformat="""lo"""
-$ uvxformat="""lx"""
-$ uvXUformat="""lX"""
-$! uselongdouble?
-$ nveformat="""e"""
-$ nvfformat="""f"""
-$ nvgformat="""g"""
-$! 
 $! Finally the composite ones. All config
 $!
 $ myuname="''osname' ''myname' ''osvers' ''F$EDIT(hwname, "TRIM")'"
 $!
 $ IF ccname .EQS. "DEC"
 $ THEN
-$   ccflags="/Include=[]/Standard=Relaxed_ANSI/Prefix=All/Obj=''obj_ext'/NoList''ccflags'"
+$   ccflags="/Include=[]/Standard=Relaxed_ANSI/Prefix=All/Obj=''obj_ext' ''ccflags'"
 $ ENDIF
 $ i_dirent = "undef"
 $ IF ccname .EQS. "CXX"
 $ THEN
 $   i_dirent = "define"
-$   ccflags="/Include=[]/Standard=ANSI/Prefix=All/Obj=''obj_ext'/NoList''ccflags'"
+$   ccflags="/Include=[]/Standard=ANSI/Prefix=All/Obj=''obj_ext' ''ccflags'"
 $ ENDIF
 $ IF use_vmsdebug_perl
 $ THEN
-$   optimize="/Debug/NoOpt"
+$   optimize="/List/Debug/NoOpt"
 $   ldflags="/Debug/Trace/Map"
 $   dbgprefix = "DBG"
 $ ELSE
-$   optimize= ""
+$   optimize= "/NoList"
 $   ldflags="/NoTrace/NoMap"
 $   dbgprefix = ""
 $ ENDIF
@@ -4961,11 +5006,17 @@ $ WC "cpplast='" + cpplast + "'"
 $ WC "cppminus='" + cppminus + "'"
 $ WC "cpprun='" + cpprun + "'"
 $ WC "cppstdin='" + cppstdin + "'"
-$ WC "d_Gconvert='my_gconvert(x,n,t,b)'"
+$ IF use64bitint .OR. use64bitint .EQS. "define"
+$ THEN
+$!  gcvt() does not work for > 16 decimal places; fallback to sprintf
+$   WC "d_Gconvert='sprintf((b),""%.*" + (nvgformat-"""") + ",(n),(x))'"
+$ ELSE
+$   WC "d_Gconvert='my_gconvert(x,n,t,b)'"
+$ ENDIF
 $ WC "d_PRIEldbl='" + d_PRIEUldbl + "'"
 $ WC "d_PRIFldbl='" + d_PRIFUldbl + "'"
 $ WC "d_PRIGldbl='" + d_PRIGUldbl + "'"
-$ WC "d_PRIX64='" + d_PRIXU64 + "'"
+$ WC "d_PRIXU64='" + d_PRIXU64 + "'"
 $ WC "d_PRId64='" + d_PRId64 + "'"
 $ WC "d_PRIeldbl='" + d_PRIeldbl + "'"
 $ WC "d_PRIfldbl='" + d_PRIfldbl + "'"
@@ -5057,7 +5108,7 @@ $ WC "d_gethbyname='" + d_gethbyname + "'"
 $ WC "d_gethent='" + d_gethent + "'"
 $ WC "d_gethname='" + d_gethname + "'"
 $ WC "d_gethostprotos='" + d_gethostprotos + "'"
-$ WC "d_getitimer='undef'"
+$ WC "d_getitimer='" + d_getitimer + "'"
 $ WC "d_getlogin='define'"
 $ WC "d_getmnt='undef'"
 $ WC "d_getmntent='undef'"
@@ -5122,10 +5173,10 @@ $ WC "d_mknod='undef'"
 $ WC "d_mkstemp='" + d_mkstemp + "'"
 $ WC "d_mkstemps='" + d_mkstemps + "'"
 $ WC "d_mktime='" + d_mktime + "'"
-$ WC "d_mmap='undef'"
+$ WC "d_mmap='" + d_mmap + "'"
 $ WC "d_modfl='" + d_modfl + "'"
 $ WC "d_modfl_pow32_bug='undef'"
-$ WC "d_mprotect='undef'"
+$ WC "d_mprotect='" + d_mprotect + "'"
 $ WC "d_msg='undef'"
 $ WC "d_msg_ctrunc='undef'"
 $ WC "d_msg_dontroute='undef'"
@@ -5133,8 +5184,8 @@ $ WC "d_msg_oob='undef'"
 $ WC "d_msg_peek='undef'"
 $ WC "d_msg_proxy='undef'"
 $ WC "d_msghdr_s='undef'"
-$ WC "d_msync='undef'"
-$ WC "d_munmap='undef'"
+$ WC "d_msync='" + d_msync + "'"
+$ WC "d_munmap='" + d_munmap + "'"
 $ WC "d_mymalloc='" + d_mymalloc + "'"
 $ WC "d_nice='define'"
 $ WC "d_nl_langinfo='" + d_nl_langinfo + "'"
@@ -5190,7 +5241,7 @@ $ WC "d_seteuid='undef'"
 $ WC "d_setgrent='undef'"
 $ WC "d_setgrps='undef'"
 $ WC "d_sethent='" + d_sethent + "'"
-$ WC "d_setitimer='undef'"
+$ WC "d_setitimer='" + d_setitimer + "'"
 $ WC "d_setlinebuf='undef'"
 $ WC "d_setlocale='" + d_setlocale + "'"
 $ WC "d_setnent='" + d_setnent + "'"
@@ -5268,14 +5319,14 @@ $ WC "d_times='define'"
 $ WC "d_truncate='" + d_truncate + "'"
 $ WC "d_tzname='" + d_tzname + "'"
 $ WC "d_u32align='define'"
-$ WC "d_ualarm='undef'"
+$ WC "d_ualarm='" + d_ualarm + "'"
 $ WC "d_umask='define'"
 $ WC "d_uname='" + d_uname + "'"
 $ WC "d_union_semun='undef'"
 $ WC "d_unlink_all_versions='undef'"
 $ WC "d_unordered='undef'"
-$ WC "d_usleep='undef'"
-$ WC "d_usleepproto='undef'"
+$ WC "d_usleep='" + d_usleep + "'"
+$ WC "d_usleepproto='" + d_usleep + "'"
 $ WC "d_ustat='undef'"
 $ WC "d_vendorarch='undef'"
 $ WC "d_vendorlib='undef'"
@@ -5453,7 +5504,7 @@ $ WC "make='" + make + "'"
 $ WC "malloctype='void *'"
 $ WC "man1ext='rno'"
 $ WC "man3ext='rno'"
-$ WC "mmaptype=' " + "'"
+$ WC "mmaptype='void *'"
 $ WC "modetype='unsigned int'"
 $ WC "multiarch='undef'"
 $ WC "mydomain='" + mydomain + "'"