$ use_ithreads = "N"
$!
$!: option parsing
+$ config_args = ""
$ IF (P1 .NES. "")
$ THEN !one or more switches was thrown
$ i = 1
$ bang = 0
$Param_loop:
-$ IF (P'i'.NES."") THEN bang = bang + 1
+$ IF (P'i'.NES."")
+$ THEN
+$ bang = bang + 1
+$ config_args = config_args + F$FAO(" !AS",P'i')
+$ ENDIF
$ i = i + 1
$ IF (i.LT.9) THEN GOTO Param_loop !DCL allows P1..P8
$!
$ IF (i .LT. (bang + 1)) THEN GOTO Opt_loop
$!
$ ENDIF ! (P1 .NES. "")
+$ config_args = F$EDIT(config_args,"TRIM")
$!
$ IF (error)
$ THEN
$! see 'user' above.
$ cf_by = F$EDIT(user,"LOWERCASE")
$! cf_time = F$CVTIME() !superceded by procedure below
-$ osvers = F$GETSYI("VERSION")
+$ osvers = F$EDIT(F$GETSYI("VERSION"),"TRIM")
$!
$! Peter Prymmer has seen:
$! "SYS$TIMEZONE_DIFFERENTIAL" = "-46800" (sic)
$ THEN
$ archname = "VMS_VAX"
$ otherarch = "an Alpha"
+$ alignbytes="8"
+$ arch_type = "ARCH-TYPE=__VAX__"
$ ELSE
$ archname = "VMS_AXP"
$ otherarch = "a VAX"
+$ alignbytes="8"
+$ arch_type = "ARCH-TYPE=__AXP__"
$ ENDIF
$ rp = "What is your architecture name? [''archname'] "
$ GOSUB myread
$ vms_skip_install = "true"
$ dflt = "y"
$! echo ""
-$ rp = "%Config-I-VMS, Do you wish to skip the remaining """"where install"""" questions? [''dflt'] "
+$ rp = "%Config-I-VMS, Skip the remaining """"where install"""" questions? [''dflt'] "
$ GOSUB myread
$ IF (.NOT.ans).AND.(ans.NES."") THEN vms_skip_install = "false"
$ IF (.NOT.vms_skip_install)
$ ENDIF ! (.NOT.perl_symbol)
$!
$!: set the base revision
-$ baserev="5"
+$ baserev="5.0"
+$ revision = baserev - ".0"
$!: get the patchlevel
$ echo ""
$ echo4 "Getting the current patchlevel..." !>&4
$ THEN
$ got_patch = "false"
$ got_sub = "false"
+$ got_api_revision = "false"
+$ got_api_version = "false"
+$ got_api_subversion = "false"
$ OPEN/READONLY CONFIG 'patchlevel_h'
$Patchlevel_h_loop:
$ READ/END_Of_File=Close_patch CONFIG line
$ subversion = F$ELEMENT(2," ",line)
$ got_sub = "true"
$ ENDIF
+$ IF ((F$LOCATE("#define PERL_API_REVISION",line).NE.F$LENGTH(line)).AND.(.NOT.got_api_revision))
+$ THEN
+$ line = F$EDIT(line,"COMPRESS, TRIM")
+$ api_revision = F$ELEMENT(2," ",line)
+$ got_api_revision = "true"
+$ ENDIF
+$ IF ((F$LOCATE("#define PERL_API_VERSION",line).NE.F$LENGTH(line)).AND.(.NOT.got_api_version))
+$ THEN
+$ line = F$EDIT(line,"COMPRESS, TRIM")
+$ api_version = F$ELEMENT(2," ",line)
+$ got_api_version = "true"
+$ ENDIF
+$ IF ((F$LOCATE("#define PERL_API_SUBVERSION",line).NE.F$LENGTH(line)).AND.(.NOT.got_api_subversion))
+$ THEN
+$ line = F$EDIT(line,"COMPRESS, TRIM")
+$ api_subversion = F$ELEMENT(2," ",line)
+$ got_api_subversion = "true"
+$ ENDIF
$ IF (.NOT.got_patch).OR.(.NOT.got_sub) THEN GOTO Patchlevel_h_loop
$Close_patch:
$ CLOSE CONFIG
$ patchlevel="0"
$ subversion="0"
$ ENDIF
-$ echo "(You have ''package' ''baserev' PL''patchlevel' sub''subversion'.)"
-$! This whole thing needs replacing w/ F$FAO() calls:
-$ patchlevel = F$INTEGER(patchlevel)
-$ IF patchlevel.LT.10
-$ THEN patchlevel = "00" + F$STRING(patchlevel)
-$ ELSE patchlevel = "0" + F$STRING(patchlevel)
-$ ENDIF
-$ subversion = F$INTEGER(subversion)
-$ IF subversion.GT.0
+$ IF (F$STRING(subversion) .NES. "0")
$ THEN
-$ IF subversion.LT.10
-$ THEN subversion = "0" + F$STRING(subversion)
-$ ELSE subversion = F$STRING(subversion)
-$ ENDIF
-$ ELSE subversion = ""
+$ echo "(You have ''package' revision ''revision' patchlevel ''patchlevel' subversion ''subversion'.)"
+$ ELSE
+$ echo "(You have ''package' revision ''revision' patchlevel ''patchlevel'.)"
$ ENDIF
$!
-$ version = baserev + "_" + patchlevel + "_" + subversion
+$ version = revision + "_" + patchlevel + "_" + subversion
$!
$ IF (.NOT.vms_skip_install)
$ THEN
$ echo "file types of nothing, .pl, and .com, in that order (e.g. typing"
$ echo """$ perl foo"" would cause Perl to look for foo., then foo.pl, and"
$ echo "finally foo.com)."
-$ dflt = "n"
+$ dflt = "y"
$ rp = "Always use default file types? [''dflt'] "
$ GOSUB myread
$ if ans.eqs."" then ans="''dflt'"
$!
$ IF (make .EQS. "MMS").OR.(make .EQS. "MMK")
$ THEN
-$ makefile = "" !wrt MANIFEST dir
-$ UUmakefile = "DESCRIP.MMS" !wrt CWD dir
-$ DEFmakefile = "DESCRIP.MMS" !wrt DEF dir (?)
+$ makefile = "" !wrt MANIFEST dir
+$ UUmakefile = "[-]DESCRIP.MMS" !wrt CWD dir
+$ DEFmakefile = "DESCRIP.MMS" !wrt DEF dir (?)
$ ELSE
-$ makefile = " -f [.VMS]Makefile." !wrt MANIFEST dir
-$ UUmakefile = "[-.VMS]Makefile." !wrt CWD dir
-$ DEFmakefile = "[-.VMS]Makefile." !wrt DEF dir (?)
+$ makefile = " -f Makefile." !wrt MANIFEST dir
+$ UUmakefile = "[-]Makefile." !wrt CWD dir
+$ DEFmakefile = "Makefile." !wrt DEF dir (?)
$ ENDIF
$!
$ IF macros.NES.""
-$! SUBCONFIGURE.COM - build a config.sh for VMS Perl.
+$! SUBCONFIGURE.COM
+$! - build a config.sh for VMS Perl.
+$! - use built config.sh to take config_h.SH -> config.h
+$! - also take vms/descrip_mms.template -> descrip.mms (VMS Makefile)
$!
$! Note for folks from other platforms changing things in here:
$! Fancy changes (based on compiler capabilities or VMS version or
$! ultimately created config.sh requires adding two lines to this file.
$!
$! First, a line in the format:
-$! $ perl_foo = "bar"
+$! $ foo = "bar"
$! after the line tagged ##ADD NEW CONSTANTS HERE##. Replace foo with the
$! variable name as it appears in config.sh.
$!
$! Second, add a line in the format:
-$! $ WC "foo='" + perl_foo + "'"
+$! $ WC "foo='" + foo + "'"
$! after the line tagged ##WRITE NEW CONSTANTS HERE##. Careful of the
$! quoting, as it can be tricky.
$!
$ Dec_C_Version = Dec_C_Version + 0
$ Vms_Ver := "''f$extract(1,3, f$getsyi(""version""))'"
$ perl_extensions := "''extensions'"
-$ if f$length(Mcc) .eq. 0 then Mcc := "cc"
+$ IF F$LENGTH(Mcc) .EQ. 0 THEN Mcc := "cc"
$ MCC = f$edit(mcc, "UPCASE")
$ C_Compiler_Replace := "CC=CC=''Mcc'''CC_flags'"
-$ if "''Using_Dec_C'" .eqs. "Yes"
+$ IF Using_Dec_C
$ THEN
$ Checkcc := "''Mcc'/prefix=all"
$ ELSE
$ Checkcc := "''Mcc'"
$ ENDIF
$ cc_flags = cc_flags + extra_flags
-$ if be_case_sensitive
-$ then
-$ d_vms_be_case_sensitive = "define"
-$ else
-$ d_vms_be_case_sensitive = "undef"
-$ endif
-$ if use_multiplicity .eqs. "Y"
+$ IF be_case_sensitive
+$ THEN
+$ d_vms_be_case_sensitive = "define"
+$ ELSE
+$ d_vms_be_case_sensitive = "undef"
+$ ENDIF
+$ IF use_multiplicity
$ THEN
$ perl_usemultiplicity = "define"
$ ELSE
$ perl_usemultiplicity = "undef"
$ ENDIF
$! Some constant defaults.
-$
$ hwname = f$getsyi("HW_NAME")
$ myname = myhostname
-$ if "''myname'" .eqs. "" THEN myname = f$trnlnm("SYS$NODE")
+$ IF myname .EQS. "" THEN myname = F$TRNLNM("SYS$NODE")
$!
$! ##ADD NEW CONSTANTS HERE##
$ perl_shmattype = ""
$ perl_i_machcthr="undef"
$ perl_i_netdb="undef"
$ perl_d_gnulibc="undef"
-$ perl_cf_by="unknown"
$ perl_ccdlflags=""
$ perl_cccdlflags=""
$ perl_mab=""
$ perl_d_union_semun="undef"
$ perl_d_semctl_semun="undef"
$ perl_d_semctl_semid_ds="undef"
-$ IF (sharedperl.EQS."Y" .AND. F$GETSYI("HW_MODEL").GE.1024)
+$ IF (sharedperl .AND. F$GETSYI("HW_MODEL") .GE. 1024)
$ THEN
$ perl_obj_ext=".abj"
$ perl_so="axe"
$ perl_i_values="undef"
$ perl_malloctype="void *"
$ perl_freetype="void"
-$ if "''mymalloc'".eqs."Y"
+$ IF mymalloc
$ THEN
$ perl_d_mymalloc="define"
$ ELSE
$ perl_d_mymalloc="undef"
-$ENDIF
+$ ENDIF
$ perl_sh="MCR"
$ perl_modetype="unsigned int"
$ perl_ssizetype="int"
$ perl_voidflags="15"
$ perl_d_eunice="undef"
$ perl_d_pwgecos="define"
-$ IF ("''Use_Threads'".eqs."T").and.("''VMS_VER'".LES."6.2")
+$ IF ((Use_Threads) .AND. (VMS_VER .LES. "6.2"))
$ THEN
$ perl_libs="SYS$SHARE:CMA$LIB_SHR.EXE/SHARE SYS$SHARE:CMA$RTL.EXE/SHARE SYS$SHARE:CMA$OPEN_LIB_SHR.exe/SHARE SYS$SHARE:CMA$OPEN_RTL.exe/SHARE"
$ ELSE
$ perl_libs=" "
$ ENDIF
-$ IF ("''Using_Dec_C'".eqs."Yes")
+$ IF Using_Dec_C
$ THEN
-$ perl_libc="(DECCRTL)"
+$ perl_libc="(DECCRTL)"
$ ELSE
-$ perl_libc=" "
+$ perl_libc=" "
$ ENDIF
-$ perl_PATCHLEVEL="''patchlevel'"
-$ perl_SUBVERSION="''subversion'"
$ perl_pager="most"
$!
$! Are we 64 bit?
$!
-$ if (use64bitint)
+$ IF (use64bitint)
$ THEN
$ perl_d_PRIfldbl = "define"
$ perl_d_PRIgldbl = "define"
$!
$! Now some that we build up
$!
-$ LocalTime = f$time()
-$ perl_cf_time= f$extract(0, 3, f$cvtime(LocalTime,, "WEEKDAY")) + " " + -
- f$edit(f$cvtime(LocalTime, "ABSOLUTE", "MONTH"), "LOWERCASE") + -
- " " + f$cvtime(LocalTime,, "DAY") + " " + f$cvtime(LocalTime,, "TIME") + -
- " " + f$cvtime(LocalTime,, "YEAR")
-$ if f$getsyi("HW_MODEL").ge.1024
-$ THEN
-$ perl_arch="VMS_AXP"
-$ perl_archname="VMS_AXP"
-$ perl_alignbytes="8"
-$ ELSE
-$ perl_arch="VMS_VAX"
-$ perl_archname="VMS_VAX"
-$ perl_alignbytes="8"
-$ ENDIF
-$ if ("''Use_Threads'".eqs."T")
+$ IF Use_Threads
$ THEN
$ if use_5005_threads
$ THEN
-$ perl_arch = "''perl_arch'-thread"
-$ perl_archname = "''perl_archname'-thread"
+$ arch = "''arch'-thread"
+$ archname = "''archname'-thread"
$ perl_d_old_pthread_create_joinable = "undef"
$ perl_old_pthread_create_joinable = " "
$ perl_use5005threads = "define"
$ perl_useithreads = "undef"
$ ELSE
-$ perl_arch = "''perl_arch'-ithread"
-$ perl_archname = "''perl_archname'-ithread"
+$ arch = "''arch'-ithread"
+$ archname = "''archname'-ithread"
$ perl_d_old_pthread_create_joinable = "undef"
$ perl_old_pthread_create_joinable = " "
$ perl_use5005threads = "undef"
$ perl_use5005threads = "undef"
$ perl_useithreads = "undef"
$ ENDIF
-$ perl_osvers=f$edit(osvers, "TRIM")
-$ if (perl_subversion + 0).eq.0
-$ THEN
-$ LocalPerlVer = "5_" + Perl_PATCHLEVEL
-$ ELSE
-$ LocalPerlVer = "5_" + Perl_PATCHLEVEL + perl_subversion
-$ ENDIF
$!
$! Some that we need to invoke the compiler for
$ OS := "open/write SOURCECHAN []temp.c"
$ WS := "write SOURCECHAN"
$ CS := "close SOURCECHAN"
$ DS := "delete/nolog []temp.*;*"
-$ Needs_Opt := "No"
-$ if ("''using_gnu_c'".eqs."Yes")
+$ Needs_Opt := N
+$ IF using_gnu_c
$ THEN
$ open/write OPTCHAN []temp.opt
$ write OPTCHAN "Gnu_CC:[000000]gcclib.olb/library"
$ write OPTCHAN "Sys$Share:VAXCRTL/Share"
$ Close OPTCHAN
-$ Needs_Opt := "Yes"
+$ Needs_Opt := Y
$ ENDIF
$!
$! Check for __STDC__
$ ON ERROR THEN CONTINUE
$ ON WARNING THEN CONTINUE
$ 'Checkcc' temp.c
-$ If (Needs_Opt.eqs."Yes")
+$ If Needs_Opt
$ THEN
$ link temp.obj,temp.opt/opt
$ else
$ READ TEMPOUT line
$ CLOSE TEMPOUT
$ DELETE/NOLOG [-.uu]tempout.lis;
-$
$ perl_cpp_stuff=line
$ WRITE_RESULT "cpp_stuff is ''perl_cpp_stuff'"
$!
$ ON ERROR THEN CONTINUE
$ ON WARNING THEN CONTINUE
$ 'Checkcc' temp.c
-$ If (Needs_Opt.eqs."Yes")
+$ If Needs_Opt
$ THEN
$ link temp.obj,temp.opt/opt
$ else
$ ELSE
$ ON ERROR THEN CONTINUE
$ ON WARNING THEN CONTINUE
-$ If (Needs_Opt.eqs."Yes")
+$ IF Needs_Opt
$ THEN
-$ link temp.obj,temp.opt/opt
-$ else
+$ link temp.obj,temp.opt/opt
+$ ELSE
$ link temp.obj
-$ endif
+$ ENDIF
$ teststatus = f$extract(9,1,$status)
$ DEASSIGN SYS$OUTPUT
$ DEASSIGN SYS$ERROR
-$ if (teststatus.nes."1")
+$ IF (teststatus.nes."1")
$ THEN
$ perl_longdblsize="0"
$ perl_d_longdbl="undef"
$ READ TEMPOUT line
$ CLOSE TEMPOUT
$ DELETE/NOLOG [-.uu]tempout.lis;
-$
$ perl_longdblsize=line
$ perl_d_longdbl="define"
$ ENDIF
$ on error then continue
$ on warning then continue
$ 'Checkcc' temp.c
-$ If (Needs_Opt.eqs."Yes")
+$ IF Needs_Opt
$ THEN
$ link temp.obj,temp.opt/opt
-$ else
+$ ELSE
$ link temp.obj
-$ endif
+$ ENDIF
$ teststatus = f$extract(9,1,$status)
$ DEASSIGN SYS$OUTPUT
$ DEASSIGN SYS$ERROR
$ perl_i_unistd = "undef"
$ ELSE
$ perl_i_unistd = "define"
-
$ ENDIF
$ WRITE_RESULT "i_unistd is ''perl_i_unistd'"
$!
$ perl_i_shadow = "undef"
$ ELSE
$ perl_i_shadow = "define"
-
$ ENDIF
$ WRITE_RESULT "i_shadow is ''perl_i_shadow'"
$!
$ perl_i_socks = "undef"
$ ELSE
$ perl_i_socks = "define"
-
$ ENDIF
$ WRITE_RESULT "i_socks is ''perl_i_socks'"
$!
$! Check the prototype for select
$!
-$ if ("''Has_Dec_C_Sockets'".eqs."T").or.("''Has_Socketshr'".eqs."T")
+$ IF Has_Dec_C_Sockets .OR. Has_Socketshr
$ THEN
$ OS
$ WS "#ifdef __DECC
$ WS "#include <stdio.h>
$ WS "#include <types.h>
$ WS "#include <unistd.h>
-$ if ("''Has_Socketshr'".eqs."T")
+$ IF Has_Socketshr
$ THEN
-$ WS "#include <socketshr.h>"
-$ else
-$ WS "#include <time.h>
-$ WS "#include <socket.h>
-$ endif
+$ WS "#include <socketshr.h>"
+$ ELSE
+$ WS "#include <time.h>
+$ WS "#include <socket.h>
+$ ENDIF
$ WS "int main()
$ WS "{"
$ WS "fd_set *foo;
$ WS "#include <stdio.h>
$ WS "#include <types.h>
$ WS "#include <unistd.h>
-$ if ("''Has_Socketshr'".eqs."T")
+$ IF Has_Socketshr
$ THEN
-$ WS "#include <socketshr.h>"
+$ WS "#include <socketshr.h>"
$ ENDIF
-$ IF ("''Has_Dec_C_Sockets'".eqs."T")
+$ IF Has_Dec_C_Sockets
$ THEN
-$ WS "#include <time.h>
-$ WS "#include <socket.h>
-$ endif
+$ WS "#include <time.h>
+$ WS "#include <socket.h>
+$ ENDIF
$ WS "int main()
$ WS "{"
$ WS "fd_set *foo;
$ DEASSIGN SYS$OUTPUT
$ DEASSIGN SYS$ERROR
$ ELSE
-$ If (Needs_Opt.eqs."Yes")
+$ IF Needs_Opt
$ THEN
$ link temp.obj,temp.opt/opt
-$ else
+$ ELSE
$ link temp.obj
-$ endif
+$ ENDIF
$ savedstatus = $status
$ teststatus = f$extract(9,1,savedstatus)
$ DEASSIGN SYS$OUTPUT
$ DEASSIGN SYS$OUTPUT
$ DEASSIGN SYS$ERROR
$ ELSE
-$ If (Needs_Opt)
+$ IF Needs_Opt
$ THEN
$ link temp.obj,temp.opt/opt
-$ else
+$ ELSE
$ link temp.obj
-$ endif
+$ ENDIF
$ savedstatus = $status
$ teststatus = f$extract(9,1,savedstatus)
$ DEASSIGN SYS$OUTPUT
$!
$! Check to see if gethostname exists
$!
-$ if ("''Has_Dec_C_Sockets'".eqs."T").or.("''Has_Socketshr'".eqs."T")
+$ IF (Has_Dec_C_Sockets .OR. Has_Socketshr)
$ THEN
$ OS
$ WS "#ifdef __DECC
$ WS "#include <stdio.h>
$ WS "#include <types.h>
$ WS "#include <unistd.h>
-$ if ("''Has_Socketshr'".eqs."T")
+$ IF Has_Socketshr
$ THEN
-$ WS "#include <socketshr.h>"
-$ else
-$ WS "#include <time.h>
-$ WS "#include <socket.h>
-$ endif
+$ WS "#include <socketshr.h>"
+$ ELSE
+$ WS "#include <time.h>
+$ WS "#include <socket.h>
+$ ENDIF
$ WS "int main()
$ WS "{"
$ WS "char name[100];
$! Okay, compile failed. Must not have it
$ perl_d_gethname = "undef"
$ ELSE
-$ If (Needs_Opt.eqs."Yes")
+$ IF Needs_Opt
$ THEN
$ link temp.obj,temp.opt/opt
-$ else
+$ ELSE
$ link temp.obj
-$ endif
+$ ENDIF
$ savedstatus = $status
$ teststatus = f$extract(9,1,savedstatus)
$ if (teststatus.nes."1")
$ DEASSIGN SYS$OUTPUT
$ DEASSIGN SYS$ERROR
$ ELSE
-$ If (Needs_Opt.eqs."Yes")
+$ IF Needs_Opt
$ THEN
$ link temp.obj,temp.opt/opt
-$ else
+$ ELSE
$ link temp.obj
-$ endif
+$ ENDIF
$ savedstatus = $status
$ teststatus = f$extract(9,1,savedstatus)
$ DEASSIGN SYS$OUTPUT
$ DEASSIGN SYS$OUTPUT
$ DEASSIGN SYS$ERROR
$ ELSE
-$ If (Needs_Opt.eqs."Yes")
+$ IF Needs_Opt
$ THEN
$ link temp.obj,temp.opt/opt
-$ else
+$ ELSE
$ link temp.obj
-$ endif
+$ ENDIF
$ savedstatus = $status
$ teststatus = f$extract(9,1,savedstatus)
$ DEASSIGN SYS$OUTPUT
$ DEASSIGN SYS$OUTPUT
$ DEASSIGN SYS$ERROR
$ ELSE
-$ If (Needs_Opt.eqs."Yes")
+$ IF Needs_Opt
$ THEN
$ link temp.obj,temp.opt/opt
-$ else
+$ ELSE
$ link temp.obj
-$ endif
+$ ENDIF
$ savedstatus = $status
$ teststatus = f$extract(9,1,savedstatus)
$ DEASSIGN SYS$OUTPUT
$ DEASSIGN SYS$OUTPUT
$ DEASSIGN SYS$ERROR
$ ELSE
-$ If (Needs_Opt.eqs."Yes")
+$ IF Needs_Opt
$ THEN
$ link temp.obj,temp.opt/opt
-$ else
+$ ELSE
$ link temp.obj
-$ endif
+$ ENDIF
$ savedstatus = $status
$ teststatus = f$extract(9,1,savedstatus)
$ DEASSIGN SYS$OUTPUT
$ DEASSIGN SYS$OUTPUT
$ DEASSIGN SYS$ERROR
$ ELSE
-$ If (Needs_Opt.eqs."Yes")
+$ IF Needs_Opt
$ THEN
$ link temp.obj,temp.opt/opt
$ else
$ ENDIF
$
$! Dec C >= 5.2 and VMS ver >= 7.0
-$ IF ("''Using_Dec_C'".EQS."Yes").AND.(F$INTEGER(Dec_C_Version).GE.50200000).AND.("''VMS_VER'".GES."7.0")
+$ IF (Using_Dec_C).AND.(F$INTEGER(Dec_C_Version).GE.50200000).AND.(VMS_VER .GES. "7.0")
$ THEN
$ perl_d_bcmp="define"
$ perl_d_gettimeod="define"
$ perl_socksizetype="undef"
$ ENDIF
$! Threads
-$ if ("''use_threads'".eqs."T")
+$ IF use_threads
$ THEN
$ perl_usethreads="define"
$ perl_d_pthreads_created_joinable="define"
-$ if ("''VMS_VER'".ges."7.0")
+$ if (VMS_VER .GES. "7.0")
$ THEN
$ perl_d_oldpthreads="undef"
$ ELSE
$ perl_uvxformat="""lx"""
$!
$! Finally the composite ones. All config
-$ perl_installarchlib="''perl_prefix':[lib.''perl_arch'.''localperlver']"
-$ perl_installsitearch="''perl_prefix':[lib.site_perl.''perl_arch']"
+$ perl_installarchlib="''perl_prefix':[lib.''archname'.''version']"
+$ perl_installsitearch="''perl_prefix':[lib.site_perl.''archname']"
$ perl_myhostname="''myhostname'"
$ perl_mydomain="''mydomain'"
$ perl_perladmin="''perladmin'"
-$ perl_cf_email="''cf_email'"
-$ perl_myuname:="VMS ''myname' ''f$edit(perl_osvers, "TRIM")' ''f$edit(hwname, "TRIM")'"
-$ perl_archlibexp="''perl_prefix':[lib.''perl_arch'.''localperlver']"
-$ perl_archlib="''perl_prefix':[lib.''perl_arch'.''lovalperlver']"
-$ perl_oldarchlibexp="''perl_prefix':[lib.''perl_arch']"
-$ perl_oldarchlib="''perl_prefix':[lib.''perl_arch']"
-$ perl_sitearchexp="''perl_prefix':[lib.site_perl.''perl_arch']"
-$ perl_sitearch="''perl_prefix':[lib.site_perl.''perl_arch']"
-$ if "''Using_Dec_C'" .eqs. "Yes"
+$ perl_myuname:="''osname' ''myname' ''osvers' ''f$edit(hwname, "TRIM")'"
+$ perl_archlibexp="''perl_prefix':[lib.''archname'.''version']"
+$ perl_archlib="''perl_prefix':[lib.''archname'.''version']"
+$ perl_oldarchlibexp="''perl_prefix':[lib.''archname']"
+$ perl_oldarchlib="''perl_prefix':[lib.''archname']"
+$ perl_sitearchexp="''perl_prefix':[lib.site_perl.''archname']"
+$ perl_sitearch="''perl_prefix':[lib.site_perl.''archname']"
+$ IF Using_Dec_C
$ THEN
$ perl_ccflags="/Include=[]/Standard=Relaxed_ANSI/Prefix=All/Obj=''perl_obj_ext'/NoList''cc_flags'"
$ ENDIF
$ perl_dbgprefix = ""
$ endif
$!
-$! Finally clean off any leading zeros from the patchlevel or subversion
-$ perl_patchlevel = perl_patchlevel + 0
-$ perl_subversion = perl_subversion + 0
-$!
$! Okay, we've got everything configured. Now go write out a config.sh.
-$ open/write CONFIGSH [-]config.sh
-$ WC := "write CONFIGSH"
+$ echo4 "Creating config.sh..."
+$ open/write CONFIG [-]config.sh
+$ WC := "write CONFIG"
$!
$ WC "# This file generated by Configure.COM on a VMS system."
-$ WC "# Time: " + perl_cf_time
+$ WC "# Time: " + cf_time
$ WC ""
$ WC "CONFIGDOTSH=true"
$ WC "package='" + perl_package + "'"
+$ WC "config_args='" + config_args + "'"
$ WC "d_nv_preserves_uv='" + perl_d_nv_preserves_uv + "'"
$ WC "use5005threads='" + perl_use5005threads + "'"
$ WC "useithreads='" + perl_useithreads + "'"
$ WC "CONFIG='" + perl_config + "'"
-$ WC "cf_time='" + perl_cf_time + "'"
-$ WC "cf_by='" + perl_cf_by+ "'"
+$ WC "cf_time='" + cf_time + "'"
+$ WC "cf_by='" + cf_by + "'"
$ WC "cpp_stuff='" + perl_cpp_stuff + "'"
$ WC "ccdlflags='" + perl_ccdlflags + "'"
$ WC "cccdlflags='" + perl_cccdlflags + "'"
$ WC "binexp='" + perl_binexp + "'"
$ WC "man1ext='" + perl_man1ext + "'"
$ WC "man3ext='" + perl_man3ext + "'"
-$ WC "arch='" + perl_arch + "'"
-$ WC "archname='" + perl_archname + "'"
-$ WC "osvers='" + perl_osvers + "'"
+$ WC "archname='" + archname + "'"
+$ WC "osvers='" + osvers + "'"
$ WC "prefix='" + perl_prefix + "'"
$ WC "builddir='" + perl_builddir + "'"
$ WC "installbin='" + perl_installbin + "'"
$ WC "myhostname='" + perl_myhostname + "'"
$ WC "mydomain='" + perl_mydomain + "'"
$ WC "perladmin='" + perl_perladmin + "'"
-$ WC "cf_email='" + perl_cf_email + "'"
+$ WC "cf_email='" + cf_email + "'"
$ WC "myuname='" + perl_myuname + "'"
-$ WC "alignbytes='" + perl_alignbytes + "'"
+$ WC "alignbytes='" + alignbytes + "'"
$ WC "osname='" + perl_osname + "'"
$ WC "d_archlib='" + perl_d_archlib + "'"
$ WC "archlibexp='" + perl_archlibexp + "'"
$ WC "archlib='" + perl_archlib + "'"
-$ WC "archname='" + perl_archname + "'"
+$ WC "archname='" + archname + "'"
$ WC "d_bincompat3='" + perl_d_bincompat3 + "'"
$ WC "cppstdin='" + perl_cppstdin + "'"
$ WC "cppminus='" + perl_cppminus + "'"
$ WC "d_eunice='" + perl_d_eunice + "'"
$ WC "libs='" + perl_libs + "'"
$ WC "libc='" + perl_libc + "'"
-$ tempstring = "PERL_VERSION='" + "''perl_patchlevel'" + "'"
-$ WC tempstring
-$ tempstring = "PERL_SUBVERSION='" + "''perl_patchlevel'" + "'"
-$ WC tempstring
-$ tempstring = "PATCHLEVEL='" + "''perl_patchlevel'" + "'"
-$ WC tempstring
-$ tempstring = "SUBVERSION='" + "''perl_SUBVERSION'" + "'"
-$ WC tempstring
$ WC "xs_apiversion='" + localperlver + "'"
$ WC "pm_apiversion='" + localperlver + "'"
$ WC "pager='" + perl_pager + "'"
$!
$! ##WRITE NEW CONSTANTS HERE##
$!
-$ Close CONFIGSH
+$ Close CONFIG
$
$! Okay, we've gotten here. Build munchconfig and run it
$ 'Perl_CC' munchconfig.c
$ link munchconfig.obj
$ endif
$ echo ""
-$ echo "Writing config.h"
+$ echo "Doing variable substitutions on .SH files..."
+$ echo "Extracting config.h (with variable substitutions)"
$ !
$ ! we need an fdl file
$ CREATE [-]CONFIG.FDL
$ ! First spit out the header info with the local defines (to get
$ ! around the 255 character command line limit)
$ OPEN/APPEND CONFIG [-]config.local
-$ if use_debugging_perl.eqs."Y"
-$ THEN
-$ WRITE CONFIG "#define DEBUGGING"
-$ ENDIF
-$ if use_two_pot_malloc.eqs."Y"
-$ THEN
-$ WRITE CONFIG "#define TWO_POT_OPTIMIZE"
-$ endif
-$ if mymalloc.eqs."Y"
-$ THEN
-$ WRITE CONFIG "#define EMBEDMYMALLOC"
-$ ENDIF
-$ if use_pack_malloc.eqs."Y"
-$ THEN
-$ WRITE CONFIG "#define PACK_MALLOC"
-$ endif
-$ if use_debugmalloc.eqs."Y"
-$ THEN
-$ write config "#define DEBUGGING_MSTATS"
-$ ENDIF
-$ if "''Using_Gnu_C'" .eqs."Yes"
-$ THEN
-$ WRITE CONFIG "#define GNUC_ATTRIBUTE_CHECK"
-$ ENDIF
-$ if "''Has_Dec_C_Sockets'".eqs."T"
-$ THEN
-$ WRITE CONFIG "#define VMS_DO_SOCKETS"
-$ WRITE CONFIG "#define DECCRTL_SOCKETS"
-$ ENDIF
-$ if "''Has_Socketshr'".eqs."T"
+$ IF use_debugging_perl THEN WC "#define DEBUGGING"
+$ IF use_two_pot_malloc THEN WC "#define TWO_POT_OPTIMIZE"
+$ IF mymalloc THEN WC "#define EMBEDMYMALLOC"
+$ IF use_pack_malloc THEN WC "#define PACK_MALLOC"
+$ IF use_debugmalloc THEN WC "#define DEBUGGING_MSTATS"
+$ IF Using_Gnu_C THEN WC "#define GNUC_ATTRIBUTE_CHECK"
+$ IF (Has_Dec_C_Sockets)
$ THEN
-$ WRITE CONFIG "#define VMS_DO_SOCKETS"
-$ ENDIF
-$! This is VMS-specific for now
-$ WRITE CONFIG "#''perl_d_setenv' HAS_SETENV"
-$ if d_secintgenv
-$ THEN
-$ WRITE CONFIG "#define SECURE_INTERNAL_GETENV"
-$ ELSE
-$ WRITE CONFIG "#undef SECURE_INTERNAL_GETENV"
-$ ENDIF
-$ if d_alwdeftype
-$ THEN
-$ WRITE CONFIG "#define ALWAYS_DEFTYPES"
+$ WC "#define VMS_DO_SOCKETS"
+$ WC "#define DECCRTL_SOCKETS"
$ ELSE
-$ WRITE CONFIG "#undef ALWAYS_DEFTYPES"
+$ IF Has_Socketshr THEN WC "#define VMS_DO_SOCKETS"
$ ENDIF
+$! This is VMS-specific for now
+$ WC "#''perl_d_setenv' HAS_SETENV"
+$ IF d_secintgenv THEN WC "#define SECURE_INTERNAL_GETENV"
+$ if d_alwdeftype THEN WC "#define ALWAYS_DEFTYPES"
$ IF (use64bitint)
$ THEN
-$ WRITE CONFIG "#define USE_64_BIT_INT"
-$ WRITE CONFIG "#define USE_LONG_DOUBLE"
+$ WC "#define USE_64_BIT_INT"
+$ WC "#define USE_LONG_DOUBLE"
$ ENDIF
-$ IF (use64bitall)
-$ THEN
-$ WRITE CONFIG "#define USE_64_BIT_ALL"
-$ ENDIF
-$ if be_case_sensitive
-$ then
-$ write config "#define VMS_WE_ARE_CASE_SENSITIVE"
-$ endif
+$ IF use64bitall THEN WC "#define USE_64_BIT_ALL"
+$ IF be_case_sensitive THEN WC "#define VMS_WE_ARE_CASE_SENSITIVE"
$ if perl_d_herrno .eqs. "undef"
$ THEN
-$ write config "#define NEED_AN_H_ERRNO"
+$ WC "#define NEED_AN_H_ERRNO"
$ ENDIF
-$ WRITE CONFIG "#define HAS_ENVGETENV"
-$ WRITE CONFIG "#define PERL_EXTERNAL_GLOB"
+$ WC "#define HAS_ENVGETENV"
+$ WC "#define PERL_EXTERNAL_GLOB"
$ CLOSE CONFIG
$!
$! Now build the normal config.h
$ DELETE/NOLOG [-]CONFIG.LOCAL;*
$ DELETE/NOLOG [-]CONFIG.FDL;*
$!
-$ if "''Using_Dec_C'" .eqs."Yes"
+$ IF Using_Dec_C
$ THEN
-$ DECC_REPLACE = "DECC=decc=1"
+$ DECC_REPLACE = "DECC=decc=1"
$ ELSE
-$ DECC_REPLACE = "DECC="
+$ DECC_REPLACE = "DECC="
$ ENDIF
-$ if "''Using_Gnu_C'" .eqs."Yes"
+$ IF Using_Gnu_C
$ THEN
-$ GNUC_REPLACE = "GNUC=gnuc=1"
+$ GNUC_REPLACE = "GNUC=gnuc=1"
$ ELSE
-$ GNUC_REPLACE = "GNUC="
+$ GNUC_REPLACE = "GNUC="
$ ENDIF
-$ if "''Has_Dec_C_Sockets'" .eqs."T"
+$ IF Has_Dec_C_Sockets
$ THEN
$ SOCKET_REPLACE = "SOCKET=DECC_SOCKETS=1"
$ ELSE
-$ if "''Has_Socketshr'" .eqs."T"
+$ IF Has_Socketshr
$ THEN
$ SOCKET_REPLACE = "SOCKET=SOCKETSHR_SOCKETS=1"
$ ELSE
$ SOCKET_REPLACE = "SOCKET="
$ ENDIF
$ ENDIF
-$ IF ("''Use_Threads'".eqs."T")
+$ IF (Use_Threads)
$ THEN
-$ if ("''VMS_VER'".LES."6.2")
+$ IF (VMS_VER .LES. "6.2")
$ THEN
$ THREAD_REPLACE = "THREAD=OLDTHREADED=1"
$ ELSE
$ ELSE
$ THREAD_REPLACE = "THREAD="
$ ENDIF
-$ if mymalloc.eqs."Y"
+$ IF mymalloc
$ THEN
$ MALLOC_REPLACE = "MALLOC=MALLOC=1"
$ ELSE
$ MALLOC_REPLACE = "MALLOC="
$ ENDIF
-$ if f$getsyi("HW_MODEL").ge.1024
-$ THEN
-$ ARCH_TYPE = "ARCH-TYPE=__AXP__"
-$ ELSE
-$ ARCH_TYPE = "ARCH-TYPE=__VAX__"
-$ ENDIF
-$ echo "Writing DESCRIP.MMS"
+$ echo "Extracting ''defmakefile' (with variable substitutions)"
$!set ver
-$ define/user sys$output [-]descrip.mms
+$ define/user sys$output 'UUmakefile
$ mcr []munchconfig [-]config.sh descrip_mms.template "''DECC_REPLACE'" "''ARCH_TYPE'" "''GNUC_REPLACE'" "''SOCKET_REPLACE'" "''THREAD_REPLACE'" -
-"''C_Compiler_Replace'" "''MALLOC_REPLACE'" "''Thread_Live_Dangerously'" "PV=''LocalPerlVer'" "FLAGS=FLAGS=''extra_flags'"
-$ echo "Extracting Build_Ext.Com"
+"''C_Compiler_Replace'" "''MALLOC_REPLACE'" "''Thread_Live_Dangerously'" "PV=''version'" "FLAGS=FLAGS=''extra_flags'"
+$ echo "Extracting Build_Ext.Com (without variable substitutions)"
$ Create Sys$Disk:[-]Build_Ext.Com
$ Deck/Dollar="$EndOfTpl$"
$!++ Build_Ext.Com
$! set nover
$!
$! Clean up after ourselves
-$ delete/nolog munchconfig.exe;*
-$ delete/nolog munchconfig.obj;*
+$ DELETE/NOLOG/NOCONFIRM munchconfig.exe;
+$ DELETE/NOLOG/NOCONFIRM munchconfig.obj;