- $! SUBCONFIGURE.COM - build a config.sh for VMS Perl.
+$! SUBCONFIGURE.COM - build a config.sh for VMS Perl.
$!
$! Note for folks from other platforms changing things in here:
$! Fancy changes (based on compiler capabilities or VMS version or
$ THEN
$ perl_arch = "''perl_arch'-thread"
$ perl_archname = "''perl_archname'-thread"
+$ perl_d_old_pthread_create_joinable = "undef"
+$ perl_old_pthread_create_joinable = " "
$ ELSE
$ perl_d_old_pthread_create_joinable = "undef"
$ perl_old_pthread_create_joinable = " "
$ if (teststatus.nes."1")
$ THEN
$! Okay, off64_t failed. Must not exist
-$ perl_d_off64t = "undef"
+$ perl_d_off64_t = "undef"
$ ELSE
-$ perl_d_off64t="define"
+$ perl_d_off64_t="define"
$ ENDIF
-$ WRITE_RESULT "d_off64t is ''perl_d_off64t'"
+$ WRITE_RESULT "d_off64_t is ''perl_d_off64_t'"
$!
$! Check to see if gethostname exists
$!
$ ENDIF
$ WRITE_RESULT "d_fcntl is ''perl_d_fcntl'"
$!
+$! Check for memchr
+$!
+$ OS
+$ WS "#ifdef __DECC
+$ WS "#include <stdlib.h>
+$ WS "#endif
+$ WS "#include <string.h>
+$ WS "int main()
+$ WS "{"
+$ WS "char * place;
+$ WS "place = memchr(""foo"", 47, 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_memchr="undef"
+$ DEASSIGN SYS$OUTPUT
+$ DEASSIGN SYS$ERROR
+$ ELSE
+$ If (Needs_Opt.eqs."Yes")
+$ 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_memchr="undef"
+$ ELSE
+$ perl_d_memchr="define"
+$ ENDIF
+$ ENDIF
+$ WRITE_RESULT "d_memchr is ''perl_d_memchr'"
+$!
$! Check for access
$!
$ OS
$ ENDIF
$ WRITE_RESULT "i_niin is ''perl_i_niin'"
$!
+$! Check for <netinet/tcp.h>
+$!
+$ if ("''Has_Dec_C_Sockets'".eqs."T").or.("''Has_Socketshr'".eqs."T")
+$ THEN
+$ OS
+$ WS "#ifdef __DECC
+$ WS "#include <stdlib.h>
+$ WS "#endif
+$ WS "#include <stdio.h>
+$ if ("''Has_Socketshr'".eqs."T")
+$ THEN
+$ WS "#include <socketshr.h>"
+$ else
+$ WS "#include <netdb.h>
+$ endif
+$ WS "#include <netinet/tcp.h>"
+$ WS "int main()
+$ WS "{"
+$ WS "exit(0);
+$ WS "}"
+$ CS
+$ DEFINE SYS$ERROR _NLA0:
+$ DEFINE SYS$OUTPUT _NLA0:
+$ on error then continue
+$ on warning then continue
+$ 'Checkcc' temp.c
+$ If (Needs_Opt.eqs."Yes")
+$ THEN
+$ link temp.obj,temp.opt/opt
+$ else
+$ link temp.obj
+$ endif
+$ teststatus = f$extract(9,1,$status)
+$ DEASSIGN SYS$OUTPUT
+$ DEASSIGN SYS$ERROR
+$ if (teststatus.nes."1")
+$ THEN
+$ perl_i_netinettcp="undef"
+$ ELSE
+$ perl_i_netinettcp="define"
+$ ENDIF
+$ ELSE
+$ perl_i_netinettcp="undef"
+$ ENDIF
+$ WRITE_RESULT "i_netinettcp is ''perl_i_netinettcp'"
+$!
$! Check for endhostent
$!
$ if ("''Has_Dec_C_Sockets'".eqs."T").or.("''Has_Socketshr'".eqs."T")
$ if (teststatus.nes."1")
$ THEN
$ perl_d_sched_yield="undef"
+$ perl_sched_yield = " "
$ ELSE
$ perl_d_sched_yield="define"
+$ perl_sched_yield = "sched_yield"
$ ENDIF
$ ELSE
$ perl_d_sched_yield="undef"
+$ perl_sched_yield = " "
$ ENDIF
$ WRITE_RESULT "d_sched_yield is ''perl_d_sched_yield'"
+$ WRITE_RESULT "sched_yield is ''perl_sched_yield'"
$!
$! Check for generic pointer size
$!
$ perl_ptrsize=line
$ WRITE_RESULT "ptrsize is ''perl_ptrsize'"
$!
+$!
+$! Check rand48 and its ilk
+$!
+$ OS
+$ WS "#ifdef __DECC
+$ WS "#include <stdlib.h>
+$ WS "#endif
+$ WS "#include <stdio.h>
+$ WS "int main()
+$ WS "{"
+$ WS "srand48(12L);"
+$ WS "exit(0);
+$ WS "}"
+$ CS
+$! copy temp.c sys$output
+$!
+$ DEFINE SYS$ERROR _NLA0:
+$ DEFINE SYS$OUTPUT _NLA0:
+$ ON ERROR THEN CONTINUE
+$ ON WARNING THEN CONTINUE
+$ 'Checkcc' temp
+$ If (Needs_Opt.eqs."Yes")
+$ THEN
+$ link temp,temp.opt/opt
+$ else
+$ link temp
+$ endif
+$ teststatus = f$extract(9,1,$status)
+$ DEASSIGN SYS$OUTPUT
+$ DEASSIGN SYS$ERROR
+$ if (teststatus.nes."1")
+$ THEN
+$ perl_drand01="random()"
+$ perl_randseedtype = "unsigned"
+$ perl_seedfunc = "srandom"
+$ ENDIF
+$ OS
+$ WS "#ifdef __DECC
+$ WS "#include <stdlib.h>
+$ WS "#endif
+$ WS "#include <stdio.h>
+$ WS "int main()
+$ WS "{"
+$ WS "srandom(12);"
+$ WS "exit(0);
+$ WS "}"
+$ CS
+$! copy temp.c sys$output
+$!
+$ DEFINE SYS$ERROR _NLA0:
+$ DEFINE SYS$OUTPUT _NLA0:
+$ ON ERROR THEN CONTINUE
+$ ON WARNING THEN CONTINUE
+$ 'Checkcc' temp
+$ If (Needs_Opt.eqs."Yes")
+$ THEN
+$ link temp,temp.opt/opt
+$ else
+$ link temp
+$ endif
+$ teststatus = f$extract(9,1,$status)
+$ DEASSIGN SYS$OUTPUT
+$ DEASSIGN SYS$ERROR
+$ if (teststatus.nes."1")
+$ THEN
+$ perl_drand01="(((float)rand())/((float)RAND_MAX))"
+$ perl_randseedtype = "unsigned"
+$ perl_seedfunc = "srand"
+$ ENDIF
+$ WRITE_RESULT "drand01 is ''perl_drand01'"
+$!
$ set nover
$! Done with compiler checks. Clean up.
$ if f$search("temp.c").nes."" then DELETE/NOLOG temp.c;*
$ perl_ccflags="/Include=[]/Obj=''perl_obj_ext'/NoList''cc_flags'"
$ ENDIF
$ ENDIF
+$ if use_vmsdebug_perl .eqs. "Y"
+$ then
+$ perl_optimize="/Debug/NoOpt"
+$ perl_dbgprefix = "DBG"
+$ else
+$ perl_optimize= ""
+$ perl_dbgprefix = ""
+$ endif
$!
$! Finally clean off any leading zeros from the patchlevel or subversion
$ perl_patchlevel = perl_patchlevel + 0
$ WC "# This file generated by Configure.COM on a VMS system."
$ WC "# Time: " + perl_cf_time
$ WC ""
+$ WC "CONFIGDOTSH=true"
$ WC "package='" + perl_package + "'"
$ WC "CONFIG='" + perl_config + "'"
$ WC "cf_time='" + perl_cf_time + "'"
$ WC "d_attribut='" + perl_d_attribut + "'"
$ WC "cc='" + perl_cc + "'"
$ WC "ccflags='" + perl_ccflags + "'"
+$ WC "optimize='" + perl_optimize + "'"
+$ WC "dbgprefix='" + perl_dbgprefix + "'"
$ WC "d_vms_do_sockets='" + perl_d_vms_do_sockets + "'"
$ WC "d_socket='" + perl_d_socket + "'"
$ WC "d_sockpair='" + perl_d_sockpair + "'"
$ WC "d_getsent='" + perl_d_getsent + "'"
$ WC "d_select='" + perl_d_select + "'"
$ WC "i_niin='" + perl_i_niin + "'"
+$ WC "i_netinettcp='" + perl_i_netinettcp + "'"
$ WC "i_neterrno='" + perl_i_neterrno + "'"
$ WC "d_stdstdio='" + perl_d_stdstdio + "'"
$ WC "d_stdio_ptr_lval='" + perl_d_stdio_ptr_lval + "'"
$ WC "i_poll='" + perl_i_poll + "'"
$ WC "i_inttypes='" + perl_i_inttypes + "'"
$ WC "d_int64t='" + perl_d_int64t + "'"
-$ WC "d_off64t='" + perl_d_off64t + "'"
+$ WC "d_off64_t='" + perl_d_off64_t + "'"
$ WC "d_fstat64='" + perl_d_fstat64 + "'"
$ WC "d_ftruncate64='" + perl_d_ftruncate64 + "'"
$ WC "d_lseek64='" + perl_d_lseek64 + "'"
$ WC "sig_num_init='" + perl_sig_num_with_commas + "'"
$ WC "i_sysmount='" + perl_i_sysmount + "'"
$ WC "d_fstatfs='" + perl_d_fstatfs + "'"
+$ WC "d_memchr='" + perl_d_memchr + "'"
$ WC "d_statfsflags='" + perl_d_statfsflags + "'"
+$ WC "fflushNULL='define'"
+$ WC "fflushall='undef'"
+$ WC "d_stdio_stream_array='undef'"
$ WC "i_sysstatvfs='" + perl_i_sysstatvfs + "'"
$ WC "i_machcthreads='" + perl_i_machcthreads + "'"
$ WC "i_pthread='" + perl_i_pthread + "'"
$ WC "installusrbinperl='" + perl_installusrbinperl + "'"
$ WC "crosscompile='" + perl_crosscompile + "'"
$ WC "multiarch='" + perl_multiarch + "'"
+$ WC "sched_yield='" + perl_sched_yield + "'"
$!
$! ##WRITE NEW CONSTANTS HERE##
$!
$ p2 = F$Edit(p2,"Upcase,Compress,Trim")
$ If F$Locate("MCR ",p2).eq.0 Then p2 = F$Extract(3,255,p2)
$ miniperl = "$" + F$Search(F$Parse(p2,".Exe"))
-$ mmk = p3
+$ makeutil = p3
+$ if f$type('p3') .nes. "" then makeutil = 'p3'
$ targ = F$Edit(p4,"Lowercase")
$ i = 0
$ next_ext:
$ EndIf
$ If redesc Then -
miniperl "-I[''up'.lib]" Makefile.PL "INST_LIB=[''up'.lib]" "INST_ARCHLIB=[''up'.lib]"
-$ mmk 'targ'
+$ makeutil 'targ'
$ i = i + 1
$ Set Def &def
$ Goto next_ext