1$! File: curl_Startup.com 2$! 3$! Procedure to setup the CURL libraries for use by programs from the 4$! VMS SYSTARTUP*.COM procedure. 5$! 6$! Copyright (C) John Malmberg 7$! 8$! Permission to use, copy, modify, and/or distribute this software for any 9$! purpose with or without fee is hereby granted, provided that the above 10$! copyright notice and this permission notice appear in all copies. 11$! 12$! THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 13$! WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 14$! MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 15$! ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 16$! WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 17$! ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT 18$! OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 19$! 20$! SPDX-License-Identifier: ISC 21$! 22$!======================================================================== 23$! 24$! 25$! GNV$GNU if needed. 26$ if f$trnlnm("GNV$GNU") .eqs. "" 27$ then 28$ x = f$trnlnm("GNU","LNM$SYSTEM_TABLE") 29$ if x .eqs. "" 30$ then 31$ write sys$output "GNV must be started up before this procedure. 32$ exit 44 33$ endif 34$ define/system/exec/trans=conc GNV$GNU 'x' 35$ endif 36$! 37$! 38$ myproc = f$environment("procedure") 39$! 40$! ZLIB needed. 41$ if f$trnlnm("GNV$LIBZSHR32") .eqs. "" 42$ then 43$ zlib_startup = f$parse("gnv$zlib_startup.com;0", myproc,,,) 44$ if f$search(zlib_startup) .nes. "" 45$ then 46$ @'zlib_startup 47$ else 48$ write sys$output "ZLIB package not found and is required." 49$ exit 44 50$ endif 51$ endif 52$! 53$! 54$ curl_ssl_libcrypto32 = "" 55$ curl_ssl_libssl32 = "" 56$ gnv_ssl_libcrypto32 = "gnv$gnu:[lib]ssl$libcrypto_shr32.exe" 57$ gnv_ssl_libssl32 = "gnv$gnu:[lib]ssl$libssl_shr32.exe" 58$ if f$search(gnv_ssl_libcrypto32) .nes. "" 59$ then 60$ curl_ssl_libcrypto32 = gnv_ssl_libcrypto32 61$ curl_ssl_libssl32 = gnv_ssl_libssl32 62$ else 63$ hp_ssl_libcrypto32 = "sys$share:ssl$libcrypto_shr32.exe" 64$ hp_ssl_libssl32 = "sys$share:ssl$libssl_shr32.exe" 65$ if f$search(hp_ssl_libcrypto32) .nes. "" 66$ then 67$ curl_ssl_libcrypto32 = hp_ssl_libcrypto32 68$ curl_ssl_libssl32 = hp_ssl_libssl32 69$ else 70$ write sys$output "HP SSL package not found and is required." 71$ endif 72$ endif 73$! 74$ define/system/exec gnv$curl_ssl_libcryptoshr32 'curl_ssl_libcrypto32' 75$ define/system/exec gnv$curl_ssl_libsslshr32 'curl_ssl_libssl32' 76$! 77$! 78$! CURL setup 79$ define/system/exec gnv$libcurl gnv$gnu:[usr.lib]GNV$LIBCURL.EXE 80$ define/system/exec gnv$curl_include gnv$gnu:[usr.include.curl] 81$ if .not. f$file_attributes("gnv$libcurl", "known") 82$ then 83$ install ADD gnv$libcurl/OPEN/SHARE/HEADER 84$ else 85$ install REPLACE gnv$libcurl/OPEN/SHARE/HEADER 86$ endif 87$! 88$! 89$ curl_exe = "gnv$gnu:[usr.bin]gnv$curl.exe" 90$ if .not. f$file_attributes(curl_exe, "known") 91$ then 92$ install ADD 'curl_exe'/OPEN/SHARE/HEADER 93$ else 94$ install REPLACE 'curl_exe'/OPEN/SHARE/HEADER 95$ endif 96$! 97$all_exit: 98$ exit 99