$!----------------------------------------------------------------------------- $! BUILD_PROXYMUNGE.COM $! $! P1 == LINK or BUILD or empty (builds) $! $! 30-JUL-2020 MGD broaden to include VSI SSL111 (what a munge!) $! 23-FEB-2020 MGD adapt to OpenSSL 1.1.n and later (WASD OpenSSL only) $! 22-SEP-2007 MGD initial $!----------------------------------------------------------------------------- $! $ on controly then exit 44 $ on error then goto ssl_detect_remove $! $ write sys$output "" $ write sys$output "Building ""PROXYMUNGE""" +- " for ""''f$getsyi("arch_name")'"" architecture" $! $ arch_name = f$edit(f$getsyi("arch_name"),"upcase") $ if arch_name .eqs. "ALPHA" then arch_name = "AXP" $ p1 = f$edit(p1,"upcase") $! $ ssl_root = "" $ ssl_detect = 0 $ if f$type(BUILD_HTTPD_SSL) .eqs. "" $ then $ if f$edit(f$getsyi("arch_name"),"upcase") .nes. "VAX" $ then $ write sys$output "" $ @wasd_root:[install]ssl_detect $ ssl_detect = 1 $ endif $ endif $ if f$type(BUILD_HTTPD_WASD_SSL) .nes. "" $ then $ ssl_root = BUILD_HTTPD_SSL_ROOT $ endif $ if f$type(BUILD_HTTPD_VMS_SSL111) .nes. "" $ then $ ssl_root = f$trnlnm("SSL111$ROOT") $ endif $ if f$type(BUILD_HTTPD_SSL) .nes. "" $ then $ if ssl_root .eqs. "" $ then $ write sys$output "ERROR: do not recognise the OpenSSL 1.1.1" $ goto ssl_detect_remove $ endif $ endif $! $ dpeno = "define /process /exec /nolog" $ arch_name2 = f$edit(f$getsyi("arch_name"),"upcase") $ if f$type(BUILD_HTTPD_WASD_SSL) .nes. "" $ then $ ssl_root = ssl_root - "]" $ dpeno openssl "''ssl_root'.include.openssl]" $ dpeno libssl "''ssl_root'.wasd.''arch_name2']ossl$libssl32.olb" $ dpeno libcrypto "''ssl_root'.wasd.''arch_name2']ossl$libcrypto32.olb" $ say "Using WASD OpenSSL 1.1.1 package" $ endif $ if f$type(BUILD_HTTPD_VMS_SSL111) .nes. "" $ then $ dpeno openssl 'ssl_root'[include] $ say "Using VSI SSL111 package" $ endif $! $ datetime = f$edit(f$time(),"trim") $ munge_via_ssl = "" $ if ssl_root .nes. "" then munge_via_ssl = ",munge_via_ssl=1" $ defines = " /define=(__VMS_VER=70000000," +- "__CRTL_VER=70000000,CGILIB_OBJECT_MODULE," +- "BUILD_DATETIME=""""""''DATETIME'""""""''MUNGE_VIA_SSL')" $! $ includes = " /include=[src.misc]" $ warnings= " /warning=(disable=(preoptw,implicitfunc," +- "needconstext,addrconstext))" $! $ cc_options = "/decc /optimize /stand=relaxed /prefix=all /names=upper" +- includes + defines + warnings $! $ if f$search("OBJ_''arch_name'.DIR") .eqs. "" - then create /dir [.obj_'arch_name'] $ object_dir = "[.obj_''arch_name']" $! $ if p1 .eqs. "" .or. p1 .eqs. "BUILD" .or. p1 .eqs. "COMPILE" $ then $ set verify $ cc 'cc_options' /object='object_dir' proxymunge $! 'f$verify(0) $ set on $ endif $! $ if p1 .eqs. "" .or. p1 .eqs. "BUILD" .or. p1 .eqs. "LINK" $ then $ cgilib_olb = "[src.misc.obj_''arch_name']cgilib.olb" $ if f$type(BUILD_HTTPD_WASD_SSL) .nes. "" $ then $ show log /process openssl,libssl,libcrypto $ set verify $ link /executable=wasd_exe:proxymunge.exe - [.obj_'arch_name']proxymunge,'cgilib_olb'/library,- sys$input/options libssl/library libcrypto/library $! 'f$verify(0) $ deassign /process /exec openssl $ deassign /process /exec libssl $ deassign /process /exec libcrypto $ endif $ if f$type(BUILD_HTTPD_VMS_SSL111) .nes. "" $ then $ set verify $ link /executable=wasd_exe:proxymunge.exe - [.obj_'arch_name']proxymunge,'cgilib_olb'/library,- sys$input/options sys$library:ssl111$libssl_shr32.exe/share sys$library:ssl111$libcrypto_shr32.exe/share $! 'f$verify(0) $ endif $ if munge_via_ssl .eqs. "" $ then $ set verify $ link /executable=wasd_exe:proxymunge.exe - [.obj_'arch_name']proxymunge,'cgilib_olb'/library $! 'f$verify(0) $ endif $ endif $ purge /nolog 'object_dir' $! $ ssl_detect_remove: $ if ssl_detect $ then $ delsymg = "delete/symbol/global" $ if f$type(BUILD_HTTPD_SSL) .nes. "" then delsymg BUILD_HTTPD_SSL $ if f$type(BUILD_HTTPD_WASD_SSL) .nes. "" then delsymg BUILD_HTTPD_WASD_SSL $ if f$type(BUILD_HTTPD_SSL_ROOT) .nes. "" then delsymg BUILD_HTTPD_SSL_ROOT $ if f$type(BUILD_HTTPD_VMS_SSL1) .nes. "" then delsymg BUILD_HTTPD_VMS_SSL1 $ if f$type(BUILD_HTTPD_VMS_SSL111) .nes. "" then delsymg BUILD_HTTPD_VMS_SSL111 $ endif $! $!-----------------------------------------------------------------------------