Fix for one of the problems in RC1 reported by M. E. O'Neill
[p5sagit/p5-mst-13.2.git] / vms / subconfigure.com
index ef81968..d9231e7 100644 (file)
@@ -21,13 +21,16 @@ $!
 $! This .COM file expects to be called by configure.com, and thus expects
 $! a few symbols in the environment. Notably:
 $!
-$!  One of: Using_Dec_C, Using_Vax_C, Using_Gnu_C set to "YES"
+$!  One of: Using_Dec_C, Using_Gnu_C set to "YES"
 $!  Dec_C_Version set to the Dec C version (defaults to 0 if not specified)
 $!  Has_Socketshr set to "T" if using socketshr
 $!  Has_Dec_C_Sockets set to "T" if using Dec C sockets
 $!  Use_Threads set to "T" if they're using threads
 $!  C_Compiler_Invoke is the command needed to invoke the C compiler
 $!
+$! We'll be playing with Sys$Output; don't clutter it
+$ Set NoVerify
+$!
 $! Set Dec_C_Version to something
 $ WRITE_RESULT := "WRITE SYS$OUTPUT ""%CONFIG-I-RESULT "" + "
 $ echo = "Write Sys$Output "
@@ -64,6 +67,14 @@ $ myname = myhostname
 $ if "''myname'" .eqs. "" THEN myname = f$trnlnm("SYS$NODE")
 $!
 $! ##ADD NEW CONSTANTS HERE##
+$ perl_shmattype = ""
+$ perl_mmaptype = ""
+$ perl_gidformat = "lu"
+$ perl_gidsize = "4"
+$ perl_groupstype = "Gid_t"
+$ perl_stdio_stream_array = ""
+$ perl_uidformat = "lu"
+$ perl_uidsize = "4"
 $ perl_d_getcwd = "undef"
 $ perl_d_nv_preserves_uv = "define"
 $ perl_d_fs_data_s = "undef"
@@ -72,6 +83,7 @@ $ perl_d_sqrtl = "define"
 $ perl_d_statfs_f_flags = "undef"
 $ perl_d_statfs_s = "undef"
 $ perl_d_ustat = "undef"
+$ perl_i_ieeefp = "undef"
 $ perl_i_sunmath = "undef"
 $ perl_i_sysstatfs = "undef"
 $ perl_i_sysvfs = "undef"
@@ -79,7 +91,9 @@ $ perl_i_ustat = "undef"
 $ perl_d_llseek="undef"
 $ perl_d_iconv="undef"
 $ perl_d_madvise="undef"
-$ perl_selectminbits=32
+$ perl_selectminbits="32"
+$ perl_d_vendorarch="undef"
+$ perl_vendorarchexp=""
 $ perl_d_msync="undef"
 $ perl_d_mprotect="undef"
 $ perl_d_munmap="undef"
@@ -102,6 +116,7 @@ $ perl_d_fstatvfs="undef"
 $ perl_usesocks="undef"
 $ perl_d_vendorlib="undef"
 $ perl_vendorlibexp=""
+$ perl_vendorlib_stem=""
 $ perl_d_statfsflags="undef"
 $ perl_i_sysstatvfs="undef"
 $ perl_i_mntent="undef"
@@ -226,6 +241,9 @@ $ perl_d_archlib="define"
 $ perl_d_bincompat3="undef"
 $ perl_cppstdin="''Perl_CC'/noobj/preprocess=sys$output sys$input"
 $ perl_cppminus=" "
+$ perl_cpprun="''Perl_CC'/noobj/preprocess=sys$output sys$input"
+$ perl_cpplast=" "
+$ perl_aphostname=""
 $ perl_d_castneg="define"
 $ perl_castflags="0"
 $ perl_d_chsize="undef"
@@ -396,6 +414,7 @@ $ perl_privlibexp="''perl_prefix':[lib]"
 $ perl_privlib="''perl_prefix':[lib]"
 $ perl_sitelibexp="''perl_prefix':[lib.site_perl]"
 $ perl_sitelib="''perl_prefix':[lib.site_perl]"
+$ perl_sitelib_stem="''perl_prefix':[lib.site_perl]"
 $ perl_sizetype="size_t"
 $ perl_i_sysparam="undef"
 $ perl_d_void_closedir="define"
@@ -464,6 +483,7 @@ $   perl_sPRIx64 = """Lx"""
 $   perl_d_quad = "define"
 $   perl_quadtype = "long long"
 $   perl_uquadtype = "unsigned long long"
+$   perl_quadkind  = "QUAD_IS_LONG_LONG"
 $ ELSE
 $   perl_d_PRIfldbl = "undef"
 $   perl_d_PRIgldbl = "undef"
@@ -478,6 +498,9 @@ $   perl_sPRIu64 = ""
 $   perl_sPRIo64 = ""
 $   perl_sPRIx64 = ""
 $   perl_d_quad = "undef"
+$   perl_quadtype = "long"
+$   perl_uquadtype = "unsigned long"
+$   perl_quadkind  = "QUAD_IS_LONG"
 $ ENDIF
 $!
 $! Now some that we build up
@@ -535,13 +558,10 @@ $ WS := "write SOURCECHAN"
 $ CS := "close SOURCECHAN"
 $ DS := "delete/nolog []temp.*;*"
 $ Needs_Opt := "No"
-$ if ("''using_vax_c'".eqs."Yes").or.("''using_gnu_c'".eqs."Yes")
+$ if ("''using_gnu_c'".eqs."Yes")
 $ THEN
 $   open/write OPTCHAN []temp.opt
-$   IF ("''using_gnu_c'".eqs."Yes")
-$   THEN
-$     write OPTCHAN "Gnu_CC:[000000]gcclib.olb/library"
-$   endif
+$   write OPTCHAN "Gnu_CC:[000000]gcclib.olb/library"
 $   write OPTCHAN "Sys$Share:VAXCRTL/Share"
 $   Close OPTCHAN
 $   Needs_Opt := "Yes"
@@ -1033,6 +1053,53 @@ $     ENDIF
 $   ENDIF
 $ WRITE_RESULT "i_inttypes is ''perl_i_inttypes'"
 $!
+$! Check for h_errno
+$!
+$ OS
+$ WS "#ifdef __DECC
+$ WS "#include <stdlib.h>
+$ WS "#endif
+$ WS "#include <stdio.h>
+$ WS "#include <unistd.h>
+$ WS "#include <netdb.h>
+$ WS "int main()
+$ WS "{"
+$ WS "h_errno = 3;
+$ WS "exit(0);
+$ WS "}"
+$ CS
+$   DEFINE SYS$ERROR _NLA0:
+$   DEFINE SYS$OUTPUT _NLA0:
+$   on error then continue
+$   on warning then continue
+$   'Checkcc' temp.c
+$   savedstatus = $status
+$   teststatus = f$extract(9,1,savedstatus)
+$   if (teststatus.nes."1")
+$   THEN
+$     perl_d_herrno="undef"
+$     DEASSIGN SYS$OUTPUT
+$     DEASSIGN SYS$ERROR
+$   ELSE
+$     If (Needs_Opt)
+$     THEN
+$       link temp.obj,temp.opt/opt
+$     else
+$       link temp.obj
+$     endif
+$     savedstatus = $status
+$     teststatus = f$extract(9,1,savedstatus)
+$     DEASSIGN SYS$OUTPUT
+$     DEASSIGN SYS$ERROR
+$     if (teststatus.nes."1")
+$     THEN
+$       perl_d_herrno="undef"
+$     ELSE
+$       perl_d_herrno="define"
+$     ENDIF
+$   ENDIF
+$ WRITE_RESULT "d_herrno is ''perl_d_herrno'"
+$!
 $! Check to see if int64_t exists
 $!
 $ OS
@@ -1179,7 +1246,7 @@ $   DEASSIGN SYS$ERROR
 $   if (teststatus.nes."1")
 $   THEN
 $!   Okay, compile failed. Must not have it
-$     perl_dgethname = "undef"
+$     perl_d_gethname = "undef"
 $   ELSE
 $     If (Needs_Opt.eqs."Yes")
 $     THEN
@@ -3339,12 +3406,6 @@ $ perl_d_locconv="undef"
 $ perl_d_setlocale="undef"
 $ ENDIF
 $!
-$! Vax C stuff
-$ if ("''Using_Vax_C'".EQS."Yes")
-$ THEN
-$ perl_vms_cc_type="vaxc"
-$ ENDIF
-$!
 $! Sockets?
 $ if ("''Has_Socketshr'".EQS."T").OR.("''Has_Dec_C_Sockets'".EQS."T")
 $ THEN
@@ -3541,15 +3602,24 @@ $ size_name = "u32size"
 $ gosub type_size_check
 $ perl_u32size="''line'"
 $
-$ type = "''perl_i64type'"
-$ size_name = "i64size"
-$ gosub type_size_check
-$ perl_i64size="''line'"
+$ If use64bitint
+$ Then
+$   type = "''perl_i64type'"
+$   size_name = "i64size"
+$   gosub type_size_check
+$   perl_i64size="''line'"
+$   perl_ivtype="''perl_i64type'"
 $
-$ type = "''perl_u64type'"
-$ size_name = "u64size"
-$ gosub type_size_check
-$ perl_u64size="''line'"
+$   type = "''perl_u64type'"
+$   size_name = "u64size"
+$   gosub type_size_check
+$   perl_u64size="''line'"
+$   perl_uvtype="''perl_u64type'"
+$   perl_nvtype="long double"
+$ Else
+$   perl_i64size="undef"
+$   perl_u64size="undef"
+$ EndIf
 $!
 $ perl_ivdformat="""ld"""
 $ perl_uvuformat="""lu"""
@@ -3573,11 +3643,6 @@ $ perl_sitearch="''perl_prefix':[lib.site_perl.''perl_arch']"
 $ if "''Using_Dec_C'" .eqs. "Yes"
 $ THEN
 $ perl_ccflags="/Include=[]/Standard=Relaxed_ANSI/Prefix=All/Obj=''perl_obj_ext'/NoList''cc_flags'"
-$ ELSE
-$   IF "''Using_Vax_C'" .eqs. "Yes"
-$   THEN
-$     perl_ccflags="/Include=[]/Obj=''perl_obj_ext'/NoList''cc_flags'"
-$   ENDIF
 $ ENDIF
 $ if use_vmsdebug_perl .eqs. "Y"
 $ then
@@ -3695,6 +3760,8 @@ $ WC "archname='" + perl_archname + "'"
 $ WC "d_bincompat3='" + perl_d_bincompat3 + "'"
 $ WC "cppstdin='" + perl_cppstdin + "'"
 $ WC "cppminus='" + perl_cppminus + "'"
+$ WC "cpprun='" + perl_cpprun + "'"
+$ WC "cpplast='" + perl_cpplast + "'"
 $ WC "d_bcmp='" + perl_d_bcmp + "'"
 $ WC "d_bcopy='" + perl_d_bcopy + "'"
 $ WC "d_bzero='" + perl_d_bzero + "'"
@@ -3717,6 +3784,7 @@ $ WC "d_fsetpos='" + perl_d_fsetpos + "'"
 $ WC "d_gettimeod='" + perl_d_gettimeod + "'"
 $ WC "d_getgrps='" + perl_d_getgrps + "'"
 $ WC "d_setgrps='" + perl_d_setgrps + "'"
+$ WC "groupstype='" + perl_groupstype + "'"
 $ WC "d_uname='" + perl_d_uname + "'"
 $ WC "d_getprior='" + perl_d_getprior + "'"
 $ WC "d_killpg='" + perl_d_killpg + "'"
@@ -3750,6 +3818,7 @@ $ WC "d_setruid='" + perl_d_setruid + "'"
 $ WC "d_setsid='" + perl_d_setsid + "'"
 $ WC "d_shm='" + perl_d_shm + "'"
 $ WC "d_shmatprototype='" + perl_d_shmatprototype + "'"
+$ WC "shmattype='" + perl_shmattype + "'"
 $ WC "d_sigaction='" + perl_d_sigaction + "'"
 $ WC "d_statblks='" + perl_d_statblks + "'"
 $ WC "stdio_ptr='" + perl_stdio_ptr + "'"
@@ -3818,6 +3887,7 @@ $ WC "i_vfork='" + perl_i_vfork + "'"
 $ WC "prototype='" + perl_prototype + "'"
 $ WC "randbits='" + perl_randbits +"'"
 $ WC "selecttype='" + perl_selecttype + "'"
+$ WC "selectminbits='" + perl_selectminbits + "'"
 $ WC "stdchar='" + perl_stdchar + "'"
 $ WC "d_unlink_all_versions='" + perl_d_unlink_all_versions + "'"
 $ WC "full_sed='" + perl_full_sed + "'"
@@ -3881,6 +3951,7 @@ $ WC "privlibexp='" + perl_privlibexp + "'"
 $ WC "privlib='" + perl_privlib + "'"
 $ WC "sitelibexp='" + perl_sitelibexp + "'"
 $ WC "sitelib='" + perl_sitelib + "'"
+$ WC "sitelib_stem='" + perl_sitelib_stem + "'"
 $ WC "sitearchexp='" + perl_sitearchexp + "'"
 $ WC "sitearch='" + perl_sitearch + "'"
 $ WC "sizetype='" + perl_sizetype + "'"
@@ -3930,9 +4001,15 @@ $ tempstring = "PATCHLEVEL='" + "''perl_patchlevel'" + "'"
 $ WC tempstring
 $ tempstring = "SUBVERSION='" + "''perl_SUBVERSION'" + "'"
 $ WC tempstring
+$ WC "xs_apiversion='" + localperlver + "'"
+$ WC "pm_apiversion='" + localperlver + "'"
 $ WC "pager='" + perl_pager + "'"
 $ WC "uidtype='" + perl_uidtype + "'"
+$ WC "uidformat='" + perl_uidformat + "'"
+$ WC "uidsize='" + perl_uidsize + "'"
 $ WC "gidtype='" + perl_gidtype + "'"
+$ WC "gidformat='" + perl_gidformat + "'"
+$ WC "gidsize='" + perl_gidsize + "'"
 $ WC "usethreads='" + perl_usethreads + "'"
 $ WC "d_pthread_yield='" + perl_d_pthread_yield + "'"
 $ WC "d_pthreads_created_joinable='" + perl_d_pthreads_created_joinable + "'"
@@ -4006,8 +4083,10 @@ $ WC "d_mknod='" + perl_d_mknod + "'"
 $ WC "devtype='" + perl_devtype + "'"
 $ WC "d_gethname='" + perl_d_gethname + "'"
 $ WC "d_phostname='" + perl_d_phostname + "'"
+$ WC "aphostname='" + perl_aphostname + "'"
 $ WC "d_accessx='" + perl_d_accessx + "'"
 $ WC "d_eaccess='" + perl_d_eaccess + "'"
+$ WC "i_ieeefp='" + perl_i_ieeefp + "'"
 $ WC "i_sunmath='" + perl_i_sunmath + "'"
 $ WC "i_sysaccess='" + perl_i_sysaccess + "'"
 $ WC "i_syssecrt='" + perl_i_syssecrt + "'"
@@ -4053,6 +4132,7 @@ $ WC "d_statfsflags='" + perl_d_statfsflags + "'"
 $ WC "fflushNULL='define'"
 $ WC "fflushall='undef'"
 $ WC "d_stdio_stream_array='undef'"
+$ WC "stdio_stream_array='" + perl_stdio_stream_array + "'"
 $ WC "i_sysstatvfs='" + perl_i_sysstatvfs + "'"
 $ WC "i_syslog='" + perl_i_syslog + "'"
 $ WC "i_sysmode='" + perl_i_sysmode + "'"
@@ -4069,6 +4149,7 @@ $ WC "d_msync='" + perl_d_msync + "'"
 $ WC "d_mprotect='" + perl_d_mprotect + "'"
 $ WC "d_munmap='" + perl_d_munmap + "'"
 $ WC "d_mmap='" + perl_d_mmap + "'"
+$ WC "mmaptype='" + perl_mmaptype + "'"
 $ WC "i_sysmman='" + perl_i_sysmman + "'"
 $ WC "installusrbinperl='" + perl_installusrbinperl + "'"
 $! WC "selectminbits='" + perl_selectminbits + "'"
@@ -4082,6 +4163,7 @@ $ WC "d_strtold='" + perl_d_strtold + "'"
 $ WC "usesocks='" + perl_usesocks + "'"
 $ WC "d_vendorlib='" + perl_d_vendorlib + "'"
 $ WC "vendorlibexp='" + perl_vendorlibexp + "'"
+$ WC "vendorlib_stem='" + perl_vendorlib_stem + "'"
 $ WC "d_atolf='" + perl_d_atolf + "'"
 $ WC "d_atoll='" + perl_d_atoll + "'"
 $ WC "d_bincompat5005='" + perl_d_bincompat + "'"
@@ -4106,16 +4188,15 @@ $ WC "sPRIx64='" + perl_sPRIx64 + "'"
 $ WC "d_llseek='" + perl_d_llseek + "'"
 $ WC "d_iconv='" + perl_d_iconv +"'"
 $ WC "i_iconv='" + perl_i_iconv +"'"
-$ WC "inc_version_list_init='""""'"
+$ WC "inc_version_list='0'"
+$ WC "inc_version_list_init='0'"
 $ WC "uselargefiles='" + perl_uselargefiles + "'"
 $ WC "uselongdouble='" + perl_uselongdouble + "'"
 $ WC "usemorebits='" + perl_usemorebits + "'"
 $ WC "d_quad='" + perl_d_quad + "'"
-$ IF (use64bitint)
-$ THEN
-$   WC "quadtype='" + perl_quadtype + "'" 
-$   WC "uquadtype='" + perl_uquadtype + "'" 
-$ ENDIF
+$ WC "quadtype='" + perl_quadtype + "'" 
+$ WC "uquadtype='" + perl_uquadtype + "'" 
+$ WC "quadkind='" + perl_quadkind + "'"
 $ WC "d_fs_data_s='" + perl_d_fs_data_s + "'" 
 $ WC "d_getcwd='" + perl_d_getcwd + "'"
 $ WC "d_getmnt='" + perl_d_getmnt + "'"
@@ -4123,6 +4204,8 @@ $ WC "d_sqrtl='" + perl_d_sqrtl + "'"
 $ WC "d_statfs_f_flags='" + perl_d_statfs_f_flags + "'"
 $ WC "d_statfs_s='" + perl_d_statfs_s + "'"
 $ WC "d_ustat='" + perl_d_ustat + "'"
+$ WC "d_vendorarch='" + perl_d_vendorarch + "'"
+$ WC "vendorarchexp='" + perl_vendorarchexp + "'"
 $ WC "i_sysstatfs='" + perl_i_sysstatfs + "'"
 $ WC "i_sysvfs='" + perl_i_sysvfs + "'"
 $ WC "i_ustat='" + perl_i_ustat + "'"
@@ -4244,6 +4327,10 @@ $ if be_case_sensitive
 $ then
 $    write config "#define VMS_WE_ARE_CASE_SENSITIVE"
 $ endif
+$ if perl_d_herrno .eqs. "undef"
+$ THEN
+$    write config "#define NEED_AN_H_ERRNO"
+$ ENDIF
 $ WRITE CONFIG "#define HAS_ENVGETENV"
 $ WRITE CONFIG "#define PERL_EXTERNAL_GLOB"
 $ CLOSE CONFIG
@@ -4331,6 +4418,7 @@ $    If ext .eqs. " " Then Goto done
 $    Define/User Perl_Env_Tables CLISYM_LOCAL
 $    miniperl
      ($extdir = $ENV{'ext'}) =~ s/::/./g;
+     $extdir =~ s#/#.#g;
      if ($extdir =~ /^vms/i) { $extdir =~ s/vms/.vms.ext/i; }
      else                    { $extdir = ".ext.$extdir";   }
      ($ENV{'extdir'} = "[$extdir]");