$ The_Default = F$Environment("DEFAULT") $ On Control_Y Then Goto The_Exit $ On Error Then Goto The_Exit $ hw_arch := "VAX" $ if (f$getsyi("CPU") .eq. 128) $ then $ hw_arch := "''f$getsyi("Arch_Name")'" $ if ("''hw_arch'" .nes. "Alpha") $ then $ if (f$locate("ALPHA", f$edit("''hw_arch'","UPCASE"))- .lt. f$length("''hw_arch'")) $ then $ hw_arch := "Alpha" $ else $ write sys$output "Unknown hardware architecture ''hw_arch'" $ exit %x10000004 $ endif $ endif $ endif $ cc_ver = "VAXC023" $ if f$search("sys$library:fscndef.h") .nes. "" then cc_ver = "VAXC024" $ if f$search("sys$library:ppl$routines.h") .nes. "" then cc_ver = "VAXC030" $ if f$search("sys$library:xabrudef.h") .nes. "" then cc_ver = "VAXC031" $ sys_ver = f$edit(f$getsyi("version"),"compress") $ if f$extract(0,1,sys_ver) .nes. "V" $ then $ type sys$input You appear to be running a Field Test version of VMS. This script will assume that the operating system version is at least V5.0. $ sys_ver = "V5.0" $ endif $ sys_maj = 0+f$extract(1,1,sys_ver) $ sys_min = 0+f$extract(3,1,sys_ver) $ if sys_maj .lt. 5 then if (sys_min/2)*2 .ne. sys_min then- sys_min = sys_min - 1 $ vms_ver = "VMS_V''sys_maj'''sys_min'" $ if ("''net_option'" .eqs. "") $ then $ net_option = "NONET" $ library_dir = "SYS$LIBRARY" $ if f$search("SYS$LIBRARY:UCX$IPC.OLB") .nes. "" $ then $ net_option = "DEC_TCPIP" $ endif $ if f$search("SYS$SHARE:UCX$IPC_SHR.EXE") .nes. "" $ then $ net_option = "DEC_TCPIP" $ endif $ if f$search("TCPWARE:UCX$IPC.OLB") .nes. "" $ then $ net_option = "TCPWARE" $ library_dir = "TCPWARE" $ endif $ if f$search("multinet:multinet_socket_library.exe") .nes. "" then- net_option = "MULTINET" $ if f$search("TWG$COMMON:[NETDIST.LIB]TWGLIB.OLB") .nes. "" $ then $ net_option = "WINTCP" $ define /nolog vaxc$include twg$tcp:[netdist.include],sys$library $ define /nolog sys twg$tcp:[netdist.include.sys] $ endif $ if f$search("multinet:multinet_socket_library.exe") .nes. "" then- net_option = "MULTINET" $ endif $ if net_option .eqs. "NONET" then net_name = "no" $ if net_option .eqs. "MULTINET" then net_name = "MultiNet" $ if net_option .eqs. "WINTCP" then net_name = "WIN/TCP" $ if net_option .eqs. "DEC_TCPIP" $ then $ if (hw_arch .eqs. "Alpha") $ then $ net_name = "DEC TCP/IP Services for OpenVMS AXP(tm)" $ else $ net_name = "DEC TCP/IP Services for OpenVMS VAX(tm)" $ endif $ if net_option .eqs. "TCPWARE" $ then $ net_name = "Process Software TCPware" $ net_option = "DEC_TCPIP" $ endif $ if sys_maj .lt. 5 $ then $ write sys$output "You are running VMS V''sys_ver'." $ type sys$input VMS C-Kermit has not been verified to build properly under this version, although pre-built versions will run properly. Please exercise caution until you have verified proper operation. $ endif $ if cc_ver .nes. "VAXC031" $ then $ type sys$input Your system has an older version of the VAX C compiler. VMS C-Kermit was designed to be compiled under VAX C V3.1 or newer. It has not been ver- ified to build properly under this version, although pre-built versions will run properly. Please exercise caution until you have verified proper operation. $ endif $ VAX_CC: Subroutine $ On Control_Y Then $exit %x10000004 $ On Warning Then $exit $status $ write sys$output " Compiling ''P1' at ''f$time()" $ cc/debug/optimize/define=("DYNAMIC", "NOJC", "NOSETBUF", "CK_CURSES", "KANJI",- "IFDEBUG", "''net_option'", "''cc_ver'", "''vms_ver'")/obj='P1'.obj 'localopts' 'P1'.c $ library/replace wermit.olb 'P1'.obj $ delete 'P1'.obj.* $ exit $ EndSubroutine $ GNU_CC: Subroutine $ On Control_Y Then $exit %x10000004 $ On Warning Then $exit $status $ write sys$output " Compiling ''P1' at ''f$time()" $ gcc/optimize/define=("DYNAMIC", "NOJC", "NOSETBUF", "CK_CURSES", "KANJI",- "IFDEBUG", "''net_option'", "''cc_ver'", "''vms_ver'")/obj='P1'.obj 'P1'.c $ library/replace wermit.olb 'P1'.obj $ delete 'P1'.obj.* $ exit $ EndSubroutine $ ALPHA_CC: Subroutine $ On Control_Y Then $exit %x10000004 $ On Warning Then $exit $status $ write sys$output " Compiling ''P1' at ''f$time()" $ cc/'debug'/standard='lint_standard'/'optimize'- /define=("DEBUG", "TLOG", "DYNAMIC", "CK_CURSES", "IFDEBUG", "KANJI",- "''net_option'", "''cc_ver'", "''vms_ver'") 'P1' $ exit $ EndSubroutine $ axp_cc := "DECC_AXP" $ if (hw_arch .eqs. "Alpha") then cc_ver = "''axp_cc'" $ debug := debug $ Link_Debug := nodebug $ optimize := optimize=level=4 $ lint_standard := VAXC $ if p1 .eqs. "CKVCVT" then goto do_ckvcvt $ write sys$output "Rebuilding WERMIT with ''net_name' network support" $ if f$type(localopts) .eqs. "" then localopts = "" $ call 'hw_arch'_cc ckvioc $ call 'hw_arch'_cc ckcfn2 $ call 'hw_arch'_cc ckcfn3 $ call 'hw_arch'_cc ckcfns $ call 'hw_arch'_cc ckcmai $ write sys$output " Compiling CKWART at ''f$time()" $ cc/debug/optimize/define=("DYNAMIC", "NOJC", "NOSETBUF", "CK_CURSES", "KANJI",- "IFDEBUG", "''net_option'", "''cc_ver'", "''vms_ver'")/obj=ckwart.obj 'localopts' ckwart.c $ write sys$output " Linking CKWART at ''f$time()" $ link/map/full/sym/exec=ckwart ckwart.obj, sys$share:vaxcrtl.olb/library $ purge ckwart.obj $ write sys$output "Running CKWART at ''f$time()" $ ckwart = "$" +f$parse("CKWART.EXE",,,"DEVICE") +- f$parse("CKWART.EXE",,,"DIRECTORY") + "CKWART" $ ckwart ckcpro.w ckcpro.c $ purge ckcpro.c $ call 'hw_arch'_cc ckcpro $ call 'hw_arch'_cc ckucmd $ call 'hw_arch'_cc ckudia $ call 'hw_arch'_cc ckuscr $ call 'hw_arch'_cc ckuus2 $ call 'hw_arch'_cc ckuus3 $ call 'hw_arch'_cc ckuus4 $ call 'hw_arch'_cc ckuus5 $ call 'hw_arch'_cc ckuus6 $ call 'hw_arch'_cc ckuus7 $ call 'hw_arch'_cc ckuusr $ call 'hw_arch'_cc ckuusx $ call 'hw_arch'_cc ckuusy $ call 'hw_arch'_cc ckcnet $ call 'hw_arch'_cc ckvfio $ call 'hw_arch'_cc ckvtio $ call 'hw_arch'_cc ckuxla $ call 'hw_arch'_cc ckvcon $ write sys$output " Linking WERMIT at ''f$time()" $ if (hw_arch .eqs. "Alpha") $ then $ if net_option .eqs. "DEC_TCPIP" $ then $ link/'link_debug' /exec=wermit.exe- ckcmai, ckcfn2, ckcfn3, ckcfns, ckcpro, ckucmd, ckudia,- ckuscr, ckuus2, ckuus3, ckuus4, ckuus5, ckuus6, ckuus7,- ckuusr, ckuusx, ckuusy, ckuxla, ckvcon, ckcnet, ckvfio,- ckvtio, ckvioc, sys$input: /opt SYS$SHARE:UCX$IPC_SHR.EXE /SHARE $ else $ link/'link_debug' /exec=wermit.exe- ckcmai, ckcfn2, ckcfn3, ckcfns, ckcpro, ckucmd, ckudia,- ckuscr, ckuus2, ckuus3, ckuus4, ckuus5, ckuus6, ckuus7,- ckuusr, ckuusx, ckuusy, ckuxla, ckvcon, ckcnet, ckvfio,- ckvtio, ckvioc $ endif $ else $ if net_option .eqs. "MULTINET" $ then $ link/map/full/sym wermit.olb/library/include=(ckcfn2, ckcfn3, ckcfns,- ckcmai, ckcpro, ckucmd, ckudia, ckuscr, ckuus2, ckuus3, ckuus4, ckuus5,- ckuus6, ckuus7, ckuusr, ckuxla, ckvcon, ckcnet, ckvfio, ckvtio),- sys$share:vaxcrtl.olb/library/exec=wermit.exe, sys$input:/options multinet:multinet_socket_library.exe/share $ else $ if net_option .eqs. "WINTCP" $ then $ link/sym wermit.olb/library/include=(ckcfn2, ckcfn3, ckcfns,- ckcmai, ckcpro, ckucmd, ckudia, ckuscr, ckuus2, ckuus3, ckuus4, ckuus5,- ckuus6, ckuus7, ckuusr, ckuxla, ckvcon, ckcnet, ckvfio, ckvtio),- twg$common:[netdist.lib]twglib.olb/library,- sys$share:vaxcrtl.olb/library/exec=wermit.exe $ else $ if net_option .eqs. "DEC_TCPIP" $ then $ link wermit.olb/exec=wermit.exe/library- /include=(ckcfn2, ckcfn3, ckcfns,- ckcmai, ckcpro, ckucmd, ckudia, ckuscr, ckuus2, ckuus3, ckuus4, ckuus5,- ckuus6, ckuus7, ckuusr, ckuxla, ckvcon, ckcnet, ckvfio, ckvtio, ckvioc),- 'library_dir':ucx$ipc.olb/library,- sys$share:vaxcrtl.olb/library $ else $ link/map/full/sym wermit.olb/library/include=(ckcfn2, ckcfn3, ckcfns,- ckcmai, ckcpro, ckucmd, ckudia, ckuscr, ckuus2, ckuus3, ckuus4, ckuus5,- ckuus6, ckuus7, ckuusr, ckuxla, ckvcon, ckcnet, ckvfio, ckvtio),- sys$share:vaxcrtl.olb/library/exec=wermit.exe $ endif $ endif $ endif $ endif $ set file/protection=(g:re,w:re) wermit.exe $ write sys$output "Done rebuilding WERMIT" $ do_ckvcvt: $ write sys$output "Rebuilding CKVCVT" $ write sys$output " Compiling CKVCVT at ''f$time()" $ if (hw_arch .eqs. "Alpha") $ then $ cc /debug/optimize/define=("DYNAMIC", "NOJC","NOSETBUF", "CK_CURSES", "KANJI",- "IFDEBUG", "''net_option'","''cc_ver'", "''vms_ver'") /obj=ckvcvt.obj - 'localopts' /standard='lint_standard' ckvcvt.c $ else $ cc/debug/optimize/define=("DYNAMIC", "NOJC", "NOSETBUF", "CK_CURSES", "KANJI",- "IFDEBUG", "''net_option'", "''cc_ver'", "''vms_ver'")/obj=ckvcvt.obj - 'localopts' ckvcvt.c $ endif $ write sys$output " Linking CKVCVT at ''f$time()" $ link/map/full/sym/exec=ckvcvt ckvcvt.obj, sys$share:vaxcrtl.olb/library $ set file/protection=(g:re,w:re) ckvcvt.exe $ purge ckvcvt.obj $ write sys$output "Done rebuilding CKVCVT" $The_Exit: $ Save_Status = $STATUS $ Set Default 'The_Default' $ exit Save_Status