build_vms.com: detect and use zlib shared image

Update the build_vms.com to detect and use zlib shared image installed
by the ZLIB kit produced by Jean-Francois Pieronne, and the also the
future ZLIB 1.2.8 kit in addition to the older ZLIB kits.

Also fix the indentation to match one of the common standards used for
VMS DCL command files and removed the hard tab characters.

Tested on OpenVMS 8.4 Alpha and IA64, and OpenVMS 7.3 VAX.
This commit is contained in:
John E. Malmberg
2013-07-14 17:37:49 +02:00
committed by Daniel Stenberg
parent cfc907e43d
commit d3aaa68f55

View File

@@ -18,40 +18,43 @@ $! CLEAN_ALL Delete product files for all host architectures. (No
$! build done.) $! build done.)
$! $!
$! 64 Compile with 64-bit pointers. $! 64 Compile with 64-bit pointers.
$! Note, you must match the pointer size that the OpenSSL $! Note, you must match the pointer size that the OpenSSL
$! shared image expects. $! shared image expects.
$! Currently curl is not building properly with 64 bit pointers $! Currently curl is not building properly with 64 bit pointers
$! on VMS because it is trying to cast pointers to 32 bit $! on VMS because it is trying to cast pointers to 32 bit
$! integers. $! integers and some OpenVMS library routines called by curl
$! do not yet support 64 bit pointers.
$! CCQUAL=x Add "x" to the C compiler qualifiers. $! CCQUAL=x Add "x" to the C compiler qualifiers.
$! Default qualifiers are: $! Default qualifiers are:
$! /standard=relaxed $! /standard=relaxed
$! /names=(as_is, shortened) $! /names=(as_is, shortened)
$! /repository=[.'arch'] $! /repository=[.'arch']
$! /nested_include_directory=none $! /nested_include_directory=none
$! /define=(_LARGEFILE=1,_USE_STD_STAT=1) (non-vax) $! /define=(_LARGEFILE=1,_USE_STD_STAT=1) (non-vax)
$! /float=ieee/ieee_mode=denorm_results (non-vax) $! /float=ieee/ieee_mode=denorm_results (non-vax)
$! DEBUG Compile debug and nooptimize $! DEBUG Compile debug and nooptimize
$! Alpha/IA64 always compiles /debug. $! Alpha/IA64 always compiles /debug.
$! Always link a debug image. $! Always link a debug image.
$! NOIEEE Do not use IEEE floating point. (Alpha/I64) $! NOIEEE Do not use IEEE floating point. (Alpha/I64)
$! VAX must use DFLOAT $! VAX must always use DFLOAT
$! NOLARGE Disable large-file support if large file support available. $! NOLARGE Disable large-file support if large file support available.
$! (Non-VAX, VMS >= V7.2.) $! (Non-VAX, VMS >= V7.2.)
$! NOLDAP Disable LDAP support if LDAP is available. $! NOLDAP Disable LDAP support if LDAP is available.
$! NOKERBEROS Disable Kerberos support if Kerberos is available. $! NOKERBEROS Disable Kerberos support if Kerberos is available.
$! LIST Create C compiler listings and linker maps. $! LIST Create C compiler listings and linker maps.
$! /list/show=(expan,includ)/machine $! /list/show=(expan,includ)/machine
$! FULLLIST Full detailed listing. $! FULLLIST Full detailed listing.
$! /list/show=(all, nomessages)/machine $! /list/show=(all, nomessages)/machine
$! NOHPSSL Don't use HP SSL, even if available. $! NOHPSSL Don't use HP SSL, even if available.
$! Note, you must match the pointer size that the OpenSSL $! Note, you must match the pointer size that the OpenSSL
$! shared image expects. This procedure will select the $! shared image expects. This procedure will select the
$! correct HP OpenSSL image. $! correct HP OpenSSL image.
$! NOSSL Don't use any SSL, even if available. $! NOSSL Don't use any SSL, even if available.
$! OSSLOLB Use OpenSSL object libraries (.OLB), even if shared $! OSSLOLB Use OpenSSL object libraries (.OLB), even if shared
$! images (.EXE) are available. $! images (.EXE) are available.
$! NOZLIB Don't use GNV$ZLIB shared image even if available. $! NOZLIB Don't use GNV$ZLIB shared image even if available.
$! REALCLEAN Delete product files for all host architectures. (No
$! build done.) Alias for CLEAN_ALL
$! $!
$! DCL Symbols: $! DCL Symbols:
$! $!
@@ -108,21 +111,21 @@ $! command across multiple lines to avoid DCL
$! line-too-long problems. $! line-too-long problems.
$! Changed "vo_c" messages to show the CC qualifiers $! Changed "vo_c" messages to show the CC qualifiers
$! once, not with every compile command. $! once, not with every compile command.
$! 01-Jan-2013 J. Malmberg $! 01-Jan-2013 J. Malmberg
$! VMS build procedures need to be able to work with $! VMS build procedures need to be able to work with
$! the default set to a search list, with created or $! the default set to a search list, with created or
$! modified files only in the first member of the search $! modified files only in the first member of the search
$! list. $! list.
$! Whitespace change to be more compatible with current $! Whitespace change to be more compatible with current
$! practices. $! practices.
$! One pass option parsing instead of loop. $! One pass option parsing instead of loop.
$! GNV ZLIB shared image support. $! GNV ZLIB shared image support.
$! KERBEROS support where available. $! KERBEROS support where available.
$! LDAP default to on where available $! LDAP default to on where available
$! LARGEFILE default to on where available $! LARGEFILE default to on where available
$! IEEE float default to on where available. $! IEEE float default to on where available.
$! Generate the curl_config.h file from system inspection. $! Generate the curl_config.h file from system inspection.
$! Linker finds ldap with out option file. $! Linker finds ldap with out option file.
$! 13-Mar-2013, Tom Grace $! 13-Mar-2013, Tom Grace
$! Added missing slash in cc_full_list. $! Added missing slash in cc_full_list.
$! Removed unwanted extra quotes inside symbol tool_main $! Removed unwanted extra quotes inside symbol tool_main
@@ -133,6 +136,18 @@ $! symbol tool_main needs to be quoted when parse style is
$! set to exended in versions of VMS greater than 7.3-1. $! set to exended in versions of VMS greater than 7.3-1.
$! Remove curlbuild.h generation as it should be pre-built $! Remove curlbuild.h generation as it should be pre-built
$! in the curl release or daily tarball. $! in the curl release or daily tarball.
$! 12-Jul-2013, John Malmberg
$! Adjust to find and use ZLIB from the Jean-Francois
$! Pieronne shared image and newer GNV ZLIB kit that
$! is upward compatible with Jean-Francois's kit.
$! Remove tabs from file.
$! Fixed DCL formatting as follows:
$! * Labels have no space after leading $.
$! * 1 space after $ for first level.
$! * 3 spaces after $ for second level. Line start + 4.
$! * 7 spaces after $ for third level. Line start + 8.
$! * Each level after that indents 4 characters.
$! * then/else/endif same indentation as if statement.
$! $!
$!=========================================================================== $!===========================================================================
$! $!
@@ -297,22 +312,46 @@ $!
$ args_len = f$length(args) $ args_len = f$length(args)
$ args_lower_len = f$length(args_lower) $ args_lower_len = f$length(args_lower)
$! $!
$ clean = 0
$ if f$locate(",clean,", args_lower) .lt. args_lower_len $ if f$locate(",clean,", args_lower) .lt. args_lower_len
$ then $ then
$ prods = "''exedir'*.*;*" $ clean = 1
$ endif
$ clean_all = 0
$ if f$locate(",clean_all,", args_lower) .lt. args_lower_len
$ then
$ clean = 1
$ clean_all = 1
$ endif
$ if f$locate(",realclean,", args_lower) .lt. args_lower_len
$ then
$ clean = 1
$ clean_all = 1
$ endif
$!
$ if clean .ne. 0
$ then
$ prods = "''exedir'*.*;*"
$ if (f$search(prods) .nes. "") then delete /log 'prods' $ if (f$search(prods) .nes. "") then delete /log 'prods'
$ prods = proc_dev_dir + arch_name + ".DIR;1" $ prods = proc_dev_dir + arch_name + ".DIR;1"
$ if (f$search(prods) .nes. "") then set prot=o:rwed 'prods' $ if (f$search(prods) .nes. "") then set prot=o:rwed 'prods'
$ if (f$search(prods) .nes. "") then delete /log 'prods' $ if (f$search(prods) .nes. "") then delete /log 'prods'
$ file = "[]config_vms.h" $ file = "[]config_vms.h"
$ if f$search(file) .nes. "" then delete/log 'file';* $ if f$search(file) .nes. "" then delete/log 'file';*
$ file = "[]config.h"
$ if f$search(file) .nes. "" then delete/log 'file';*
$ file = "[.lib.cxx_repository]cxx$demangler_db."
$ if f$search(file) .nes. "" then delete/log 'file';*
$ file = "[.src.cxx_repository]cxx$demangler_db."
$ if f$search(file) .nes. "" then delete/log 'file';*
$ file = "[.lib]config_vms.h" $ file = "[.lib]config_vms.h"
$ if f$search(file) .nes. "" then delete/log 'file';* $ if f$search(file) .nes. "" then delete/log 'file';*
$ goto Common_Exit $ if clean_all .eq. 0 then goto Common_Exit
$ endif $ endif
$! $!
$ if f$locate(",clean_all,", args_lower) .lt. args_lower_len $!
$ then $ if clean_all .ne. 0
$ then
$ prods = proc_dev_dir - delim + ".ALPHA" + delim + "*.*;*" $ prods = proc_dev_dir - delim + ".ALPHA" + delim + "*.*;*"
$ if (f$search(prods) .nes. "") then delete /log 'prods' $ if (f$search(prods) .nes. "") then delete /log 'prods'
$ prods = proc_dev_dir + "ALPHA" + ".DIR;1" $ prods = proc_dev_dir + "ALPHA" + ".DIR;1"
@@ -328,82 +367,82 @@ $ if (f$search(prods) .nes. "") then delete /log 'prods'
$ prods = proc_dev_dir + "VAX"+ ".DIR;1" $ prods = proc_dev_dir + "VAX"+ ".DIR;1"
$ if (f$search(prods) .nes. "") then set prot=o:rwed 'prods' $ if (f$search(prods) .nes. "") then set prot=o:rwed 'prods'
$ if (f$search(prods) .nes. "") then delete /log 'prods' $ if (f$search(prods) .nes. "") then delete /log 'prods'
$ goto Common_Exit $ goto Common_Exit
$ endif $ endif
$! $!
$ build_64 = 0 $ build_64 = 0
$ if f$locate(",64,", args_lower) .lt. args_lower_len $ if f$locate(",64,", args_lower) .lt. args_lower_len
$ then $ then
$ cc_qual1 = cc_qual1 + " /POINTER = 64" $ cc_qual1 = cc_qual1 + " /POINTER = 64"
$ build_64 = 1 $ build_64 = 1
$ endif $ endif
$! $!
$ args_loc = f$locate(",ccqual=", args_lower) $ args_loc = f$locate(",ccqual=", args_lower)
$ if args_loc .lt. args_lower_len $ if args_loc .lt. args_lower_len
$ then $ then
$ arg = f$extract(args_loc + 1, args_lower_len, args_lower) $ arg = f$extract(args_loc + 1, args_lower_len, args_lower)
$ arg_val = f$element(0, ",", arg) $ arg_val = f$element(0, ",", arg)
$ cc_qual2 = f$element(1, "=", arg_val); $ cc_qual2 = f$element(1, "=", arg_val);
$ endif $ endif
$! $!
$! On Alpha/IA64 no size penalty for compiling /debug/optimize $! On Alpha/IA64 no size penalty for compiling /debug/optimize
$! by default. $! by default.
$ if f$locate(",debug,", args_lower) .lt. args_lower_len $ if f$locate(",debug,", args_lower) .lt. args_lower_len
$ then $ then
$ cc_debug = "/debug/nooptimize" $ cc_debug = "/debug/nooptimize"
$ goto arg_loop_end $ goto arg_loop_end
$ endif $ endif
$! $!
$! We normally want IEEE float if it is available. Programs that are $! We normally want IEEE float if it is available. Programs that are
$! calling libcurl will typically prefer IEEE behavior, unless on the $! calling libcurl will typically prefer IEEE behavior, unless on the
$! VAX where we have no choice. $! VAX where we have no choice.
$! $!
$ if f$locate(",noieee,", args_lower) .lt. args_lower_len $ if f$locate(",noieee,", args_lower) .lt. args_lower_len
$ then $ then
$ cc_float = "" $ cc_float = ""
$ goto arg_loop_end $ goto arg_loop_end
$ endif $ endif
$! $!
$! Normally we want large file if it is available. $! Normally we want large file if it is available.
$ if f$locate(",nolarge,", args_lower) .lt. args_lower_len $ if f$locate(",nolarge,", args_lower) .lt. args_lower_len
$ then $ then
$ write sys$output "Handling of large files disabled." $ write sys$output "Handling of large files disabled."
$ cc_large = "" $ cc_large = ""
$ endif $ endif
$ if cc_large .nes. "" $ if cc_large .nes. ""
$ then $ then
$ cc_defs = cc_defs + cc_large $ cc_defs = cc_defs + cc_large
$ endif $ endif
$! $!
$ if f$locate(",noldap,", args_lower) .lt. args_lower_len $ if f$locate(",noldap,", args_lower) .lt. args_lower_len
$ then $ then
$ ldap = 0 $ ldap = 0
$ endif $ endif
$! $!
$ if f$locate(",list,", args_lower) .lt. args_lower_len $ if f$locate(",list,", args_lower) .lt. args_lower_len
$ then $ then
$ list = 1 $ list = 1
$ endif $ endif
$ if f$locate(",fulllist,", args_lower) .lt. args_lower_len $ if f$locate(",fulllist,", args_lower) .lt. args_lower_len
$ then $ then
$ list = 1 $ list = 1
$ full_list = 1 $ full_list = 1
$ endif $ endif
$! $!
$ if f$locate(",nohpssl,", args_lower) .lt. args_lower_len $ if f$locate(",nohpssl,", args_lower) .lt. args_lower_len
$ then $ then
$ nohpssl = 1 $ nohpssl = 1
$ endif $ endif
$! $!
$ if f$locate(",nossl,", args_lower) .lt. args_lower_len $ if f$locate(",nossl,", args_lower) .lt. args_lower_len
$ then $ then
$ nossl = 1 $ nossl = 1
$ endif $ endif
$! $!
$ if f$locate(",osslolb,", args_lower) .lt. args_lower_len $ if f$locate(",osslolb,", args_lower) .lt. args_lower_len
$ then $ then
$ osslolb = 1 $ osslolb = 1
$ endif $ endif
$! $!
$ if f$locate(",nozlib,", args_lower) .lt. args_lower_len $ if f$locate(",nozlib,", args_lower) .lt. args_lower_len
$ then $ then
@@ -427,10 +466,10 @@ $ msg_qual = msg_qual + "/nolist"
$ else $ else
$ msg_qual = msg_qual + "/list='objdir'" $ msg_qual = msg_qual + "/list='objdir'"
$ if (full_list .ne. 0) $ if (full_list .ne. 0)
$ then $ then
$ cc_qual1 = cc_qual1 + cc_full_list $ cc_qual1 = cc_qual1 + cc_full_list
$ else $ else
$ cc_qual1 = cc_qual1 + cc_list $ cc_qual1 = cc_qual1 + cc_list
$ endif $ endif
$ endif $ endif
$ cc_qual1 = cc_qual1 + cc_names + cc_float + cc_debug $ cc_qual1 = cc_qual1 + cc_names + cc_float + cc_debug
@@ -448,61 +487,61 @@ $ libsslshr_line = ""
$ libcryptoshr_line = "" $ libcryptoshr_line = ""
$ if (.not. nossl) $ if (.not. nossl)
$ then $ then
$ if (f$trnlnm("OPENSSL") .nes. "") $ if (f$trnlnm("OPENSSL") .nes. "")
$ then $ then
$! cc_defs = cc_defs + ", USE_SSLEAY=1" $! cc_defs = cc_defs + ", USE_SSLEAY=1"
$ if ((f$trnlnm("SSL$INCLUDE") .nes. "") .and. (.not. nohpssl)) $ if ((f$trnlnm("SSL$INCLUDE") .nes. "") .and. (.not. nohpssl))
$ then $ then
$! Use HP SSL. $! Use HP SSL.
$ hpssl = 1 $ hpssl = 1
$! $!
$! Older SSL only has lib*_shr32 images $! Older SSL only has lib*_shr32 images
$!----------------------------------------------- $!-----------------------------------------------
$ libsslshr = "sys$share:ssl$libssl_shr" $ libsslshr = "sys$share:ssl$libssl_shr"
$ if (f$search("''libsslshr'.exe") .eqs. "") .or. (.not. build_64) $ if (f$search("''libsslshr'.exe") .eqs. "") .or. (.not. build_64)
$ then $ then
$ libsslshr = libsslshr + "32" $ libsslshr = libsslshr + "32"
$ endif $ endif
$ libcryptoshr = "sys$share:ssl$libcrypto_shr" $ libcryptoshr = "sys$share:ssl$libcrypto_shr"
$ if (f$search("''libcryptoshr'.exe") .eqs. "") .or. (.not. build_64) $ if (f$search("''libcryptoshr'.exe") .eqs. "") .or. (.not. build_64)
$ then $ then
$ libcryptoshr = libcryptoshr + "32" $ libcryptoshr = libcryptoshr + "32"
$ endif $ endif
$ libsslshr_line = "''libsslshr'.exe/share" $ libsslshr_line = "''libsslshr'.exe/share"
$ libcryptoshr_line = "''libcryptoshr'.exe/share" $ libcryptoshr_line = "''libcryptoshr'.exe/share"
$ else $ else
$! Use OpenSSL. Assume object libraries, unless shared images $! Use OpenSSL. Assume object libraries, unless shared images
$! are found (and not prohibited). $! are found (and not prohibited).
$! TODO: We do not know how to automatically choose based on the $! TODO: We do not know how to automatically choose based on the
$! pointer size. $! pointer size.
$! $!
$ openssl = 1 $ openssl = 1
$ libsslshr_line = "ssllib:libssl.olb/lib" $ libsslshr_line = "ssllib:libssl.olb/lib"
$ libcryptoshr_line = "ssllib:libcrypto.olb/lib" $ libcryptoshr_line = "ssllib:libcrypto.olb/lib"
$ ssl_opt = ", ssllib:libssl.olb /library" + - $ ssl_opt = ", ssllib:libssl.olb /library" + -
", ssllib:libcrypto.olb /library" ", ssllib:libcrypto.olb /library"
$ if (osslolb .eq. 0) $ if (osslolb .eq. 0)
$ then $ then
if ((f$search("ssllib:ssl_libcrypto.exe") .nes. "") .and. - if ((f$search("ssllib:ssl_libcrypto.exe") .nes. "") .and. -
(f$search("ssllib:ssl_libssl.exe") .nes. "")) (f$search("ssllib:ssl_libssl.exe") .nes. ""))
$ then
$! OpenSSL shared images with "SSL_xxx.EXE names.
$ openssl = 2
$ libsslshr_line = "ssllib:ssl_libssl_shr.exe/share"
$ libcryptoshr_line = "ssllib:ssl_libcrypto_shr.exe/share"
$ else
$ if ((f$search("ssllib:libcrypto.exe") .nes. "") .and. -
(f$search("ssllib:libssl.exe") .nes. ""))
$ then $ then
$! OpenSSL shared images with "xxx.EXE names. $! OpenSSL shared images with "SSL_xxx.EXE names.
$ openssl = 3 $ openssl = 2
$ libsslshr_line = "ssllib:libssl_shr.exe/share" $ libsslshr_line = "ssllib:ssl_libssl_shr.exe/share"
$ libcryptoshr_line = "ssllib:libcrypto_shr.exe/share" $ libcryptoshr_line = "ssllib:ssl_libcrypto_shr.exe/share"
$ else
$ if ((f$search("ssllib:libcrypto.exe") .nes. "") .and. -
(f$search("ssllib:libssl.exe") .nes. ""))
$ then
$! OpenSSL shared images with "xxx.EXE names.
$ openssl = 3
$ libsslshr_line = "ssllib:libssl_shr.exe/share"
$ libcryptoshr_line = "ssllib:libcrypto_shr.exe/share"
$ endif
$ endif $ endif
$ endif $ endif
$ endif
$ endif $ endif
$ endif $ endif
$ endif $ endif
$! $!
$! LDAP. $! LDAP.
@@ -537,6 +576,28 @@ $!
$! LIBZ $! LIBZ
$ libzshr_line = "" $ libzshr_line = ""
$ try_shr = "gnv$libzshr" $ try_shr = "gnv$libzshr"
$ if build_64
$ then
$! First look for 64 bit
$ if f$search("''try_shr'64") .eqs. ""
$ then
$! Second look for the J.F. Pieronne 64 bit shared image
$ try_shr = "LIBZ_SHR64"
$ if f$search(try_shr) .eqs. "" then nozlib = 1
$ endif
$ else
$! First look for 32 bit
$ if f$search("''try_shr'32") .eqs. ""
$ then
$! Second look for old 32 bit image
$ if f$search(try_shr) .eqs. ""
$ then
$! Third look for the J.F. Pieronne 32 bit shared image
$ try_shr = "LIBZ_SHR32"
$ if f$search(try_shr) .eqs. "" then nozlib = 1
$ endif
$ endif
$ endif
$ if f$search(try_shr) .eqs. "" $ if f$search(try_shr) .eqs. ""
$ then $ then
$ nozlib = 1 $ nozlib = 1
@@ -544,12 +605,17 @@ $ endif
$ curl_sys_zlibinc = "" $ curl_sys_zlibinc = ""
$ if nozlib .eq. 0 $ if nozlib .eq. 0
$ then $ then
$ 'vo_c' "%CURL-I-BLDGNVLIBZ, building with GNV LIBZ support"
$ libzshr_line = "''try_shr'/share" $ libzshr_line = "''try_shr'/share"
$ curl_sys_zlibinc = "GNV$ZLIB_INCLUDE:" $ if f$locate("LIBZ", try_shr) .eq. 0
$ then
$ 'vo_c' "%CURL-I-BLDJFPLIBZ, building with JFP LIBZ support"
$ curl_sys_zlibinc = "LIBZ:"
$ else
$ 'vo_c' "%CURL-I-BLDGNVLIBZ, building with GNV LIBZ support"
$ curl_sys_zlibinc = "GNV$ZLIB_INCLUDE:"
$ endif
$ endif $ endif
$! $!
$!
$! Form CC qualifiers. $! Form CC qualifiers.
$! $!
$ cc_defs = "/define = (''cc_defs')" $ cc_defs = "/define = (''cc_defs')"
@@ -591,40 +657,40 @@ $ 'vo_c' " EXEDIR = ''exedir'"
$! $!
$ if (openssl .ne. 0) $ if (openssl .ne. 0)
$ then $ then
$ ssllib = f$trnlnm("ssllib") $ ssllib = f$trnlnm("ssllib")
$ if (ssllib .eqs. "") $ if (ssllib .eqs. "")
$ then $ then
$ ssllib = "(undefined)" $ ssllib = "(undefined)"
$ endif $ endif
$ 'vo_c' " SSLLIB = ''ssllib'" $ 'vo_c' " SSLLIB = ''ssllib'"
$! $!
$! TODO: Why are we translating the logical name? $! TODO: Why are we translating the logical name?
$! The logical aname used to find the shared image should just be used $! The logical aname used to find the shared image should just be used
$! as translating it could result in the wrong location at run time. $! as translating it could result in the wrong location at run time.
$ if (openssl .eq. 1) $ if (openssl .eq. 1)
$ then $ then
$ ossl_lib1 = f$trnlnm("ssllib")+ "LIBSSL.OLB" $ ossl_lib1 = f$trnlnm("ssllib")+ "LIBSSL.OLB"
$ ossl_lib2 = f$trnlnm("ssllib")+ "LIBCRYPTO.OLB" $ ossl_lib2 = f$trnlnm("ssllib")+ "LIBCRYPTO.OLB"
$ msg = "object libraries" $ msg = "object libraries"
$ else $ else
$ if (openssl .eq. 2) $ if (openssl .eq. 2)
$ then $ then
$ ossl_lib1 = f$trnlnm("ssllib")+ "SSL_LIBSSL.EXE" $ ossl_lib1 = f$trnlnm("ssllib")+ "SSL_LIBSSL.EXE"
$ ossl_lib2 = f$trnlnm("ssllib")+ "SSL_LIBCRYPTO.EXE" $ ossl_lib2 = f$trnlnm("ssllib")+ "SSL_LIBCRYPTO.EXE"
$ else $ else
$ ossl_lib1 = f$trnlnm("ssllib")+ "LIBSSL.EXE" $ ossl_lib1 = f$trnlnm("ssllib")+ "LIBSSL.EXE"
$ ossl_lib2 = f$trnlnm("ssllib")+ "LIBCRYPTO.EXE" $ ossl_lib2 = f$trnlnm("ssllib")+ "LIBCRYPTO.EXE"
$ endif $ endif
$ msg = "shared images" $ msg = "shared images"
$ endif $ endif
$ if ((f$search(ossl_lib1) .eqs. "") .or. - $ if ((f$search(ossl_lib1) .eqs. "") .or. -
(f$search(ossl_lib2) .eqs. "")) (f$search(ossl_lib2) .eqs. ""))
$ then $ then
$ write sys$output "Can't find OpenSSL ''msg':" $ write sys$output "Can't find OpenSSL ''msg':"
$ write sys$output " ''ossl_lib1'" $ write sys$output " ''ossl_lib1'"
$ write sys$output " ''ossl_lib2'" $ write sys$output " ''ossl_lib2'"
$ goto Common_Exit $ goto Common_Exit
$ endif $ endif
$ endif $ endif
$! $!
$! Define the "curl" (process) logical name for "#include <curl/xxx.h>". $! Define the "curl" (process) logical name for "#include <curl/xxx.h>".
@@ -632,17 +698,17 @@ $!
$ curl = f$trnlnm("curl", "LNM$PROCESS") $ curl = f$trnlnm("curl", "LNM$PROCESS")
$ if (curl .nes. "") $ if (curl .nes. "")
$ then $ then
$ write sys$output "" $ write sys$output ""
$ write sys$output - $ write sys$output -
"Process logical name ""curl"" is already defined, but this procedure" "Process logical name ""curl"" is already defined, but this procedure"
$ write sys$output - $ write sys$output -
"would override that definition. Use a command like" "would override that definition. Use a command like"
$ write sys$output - $ write sys$output -
" deassign /process curl" " deassign /process curl"
$ write sys$output - $ write sys$output -
"to cancel that logical name definition, and then and re-run this procedure." "to cancel that logical name definition, and then and re-run this procedure."
$ write sys$output "" $ write sys$output ""
$ goto Common_Exit $ goto Common_Exit
$ endif $ endif
$ curl_logical = top_dev_dir + ".include.curl" + delim $ curl_logical = top_dev_dir + ".include.curl" + delim
$ curl_sys_inc2 = curl_logical $ curl_sys_inc2 = curl_logical
@@ -653,18 +719,18 @@ $! Generate config file into the product directory.
$! $!
$! call MoveIfDiff [.lib]config-vms.h 'objdir'curl_config.h $! call MoveIfDiff [.lib]config-vms.h 'objdir'curl_config.h
$! $!
$conf_params = "" $ conf_params = ""
$if nossl .ne. 0 then conf_params = conf_params + ",nossl" $ if nossl .ne. 0 then conf_params = conf_params + ",nossl"
$if nohpssl .ne. 0 then conf_params = conf_params + ",nohpssl," $ if nohpssl .ne. 0 then conf_params = conf_params + ",nohpssl,"
$if ldap .eq. 0 then conf_params = conf_params + ",noldap," $ if ldap .eq. 0 then conf_params = conf_params + ",noldap,"
$if nozlib .ne. 0 then conf_params = conf_params + ",nozlib," $ if nozlib .ne. 0 then conf_params = conf_params + ",nozlib,"
$if nokerberos .ne. 0 then conf_params = conf_params + ",nokerberos" $ if nokerberos .ne. 0 then conf_params = conf_params + ",nokerberos"
$conf_params = conf_params - "," $ conf_params = conf_params - ","
$! $!
$! $!
$new_conf = f$search("''objdir'curl_config.h") $ new_conf = f$search("''objdir'curl_config.h")
$if new_conf .eqs. "" $ if new_conf .eqs. ""
$then $ then
$! set ver $! set ver
$ write sys$output "Generating curl custom config_vms.h" $ write sys$output "Generating curl custom config_vms.h"
$ @'proc_dev_dir'generate_config_vms_h_curl.com ''conf_params' $ @'proc_dev_dir'generate_config_vms_h_curl.com ''conf_params'
@@ -673,14 +739,14 @@ $ write sys$output "Generating curl_config.h"
$ conf_in = f$search("[.lib]curl_config*.*in") $ conf_in = f$search("[.lib]curl_config*.*in")
$ if conf_in .eqs. "" $ if conf_in .eqs. ""
$ then $ then
$ write sys$output "Can not find [.lib]curl_config*.*in file!" $ write sys$output "Can not find [.lib]curl_config*.*in file!"
$ goto common_exit $ goto common_exit
$ endif $ endif
$ @'proc_dev_dir'config_h.com 'conf_in' $ @'proc_dev_dir'config_h.com 'conf_in'
$ copy config.h 'objdir'curl_config.h $ copy config.h 'objdir'curl_config.h
$ delete config.h; $ delete config.h;
$! set nover $! set nover
$endif $ endif
$! $!
$! $!
$! $!
@@ -706,42 +772,42 @@ $!
$! $!
$ if (openssl .ne. 0) $ if (openssl .ne. 0)
$ then $ then
$ if (openssl .eq. 1) $ if (openssl .eq. 1)
$ then $ then
$ 'vo_l' "%CURL-I-LINK_OSSL, linking with OpenSSL (object library)" $ 'vo_l' "%CURL-I-LINK_OSSL, linking with OpenSSL (object library)"
$ else $ else
$ 'vo_l' "%CURL-I-LINK_HPSSL, linking with OpenSSL (shared image)" $ 'vo_l' "%CURL-I-LINK_HPSSL, linking with OpenSSL (shared image)"
$ endif $ endif
$ else $ else
$ if (hpssl) $ if (hpssl)
$ then $ then
$ 'vo_l' "%CURL-I-LINK_HPSSL, linking with HP SSL" $ 'vo_l' "%CURL-I-LINK_HPSSL, linking with HP SSL"
$ else $ else
$ 'vo_l' "%CURL-I-LINK_NOSSL, linking with NO SSL support" $ 'vo_l' "%CURL-I-LINK_NOSSL, linking with NO SSL support"
$ endif $ endif
$ endif $ endif
$! $!
$! $!
$! GNV helper files for building the test curl binary. $! GNV helper files for building the test curl binary.
$!----------------------------------------------- $!-----------------------------------------------
$create 'exedir'gnv$curl.opt $ create 'exedir'gnv$curl.opt
$open/append opt 'exedir'gnv$curl.opt $ open/append opt 'exedir'gnv$curl.opt
$if libzshr_line .nes. "" then write opt libzshr_line $ if libzshr_line .nes. "" then write opt libzshr_line
$if gssrtlshr_line .nes. "" then write opt gssrtlshr_line $ if gssrtlshr_line .nes. "" then write opt gssrtlshr_line
$if libcryptoshr_line .nes. "" then write opt libcryptoshr_line $ if libcryptoshr_line .nes. "" then write opt libcryptoshr_line
$if libsslshr_line .nes. "" then write opt libsslshr_line $ if libsslshr_line .nes. "" then write opt libsslshr_line
$close opt $ close opt
$! $!
$! $!
$! Create the libcurl $! Create the libcurl
$!------------------------------------------------------ $!------------------------------------------------------
$create 'exedir'gnv_libcurl_linker.opt $ create 'exedir'gnv_libcurl_linker.opt
$open/append opt 'exedir'gnv_libcurl_linker.opt $ open/append opt 'exedir'gnv_libcurl_linker.opt
$if libzshr_line .nes. "" then write opt libzshr_line $ if libzshr_line .nes. "" then write opt libzshr_line
$if gssrtlshr_line .nes. "" then write opt gssrtlshr_line $ if gssrtlshr_line .nes. "" then write opt gssrtlshr_line
$if libcryptoshr_line .nes. "" then write opt libcryptoshr_line $ if libcryptoshr_line .nes. "" then write opt libcryptoshr_line
$if libsslshr_line .nes. "" then write opt libsslshr_line $ if libsslshr_line .nes. "" then write opt libsslshr_line
$close opt $ close opt
$! $!
$! $!
$! If we are not on VAX, then we want the debug symbol table in $! If we are not on VAX, then we want the debug symbol table in
@@ -783,7 +849,7 @@ $ link/debug 'link_map2' 'link_dsf2' /executable = 'exedir'CURL_DEBUG.EXE -
'objdir'curlsrc.olb /library /include = ('tool_main', curlmsg), - 'objdir'curlsrc.olb /library /include = ('tool_main', curlmsg), -
'objdir'curllib.olb /library, - 'objdir'curllib.olb /library, -
'exedir'gnv$curl.opt/opt 'exedir'gnv$curl.opt/opt
$set nover $ set nover
$! $!
$ goto Common_Exit $ goto Common_Exit
$! $!
@@ -792,92 +858,92 @@ $! the directory passed in via P1 and put it in the object library named
$! via P3. Exclude items in P4. $! via P3. Exclude items in P4.
$! $!
$build: subroutine $build: subroutine
$ build_def = f$environment("default") $ build_def = f$environment("default")
$ on control_y then goto EndLoop ! SS$_CONTROLY $ on control_y then goto EndLoop ! SS$_CONTROLY
$ sts = 1 ! SS$_NORMAL. $ sts = 1 ! SS$_NORMAL.
$! set noon $! set noon
$ set default 'p1' $ set default 'p1'
$ search = p2 $ search = p2
$ reset = f$search("reset") $ reset = f$search("reset")
$ if f$search( p3) .eqs. "" $ if f$search( p3) .eqs. ""
$ then $ then
$ librarian /create /object 'p3' $ librarian /create /object 'p3'
$ endif $ endif
$ reject_list__ = "," + f$edit(p4, "COLLAPSE, UPCASE") + "," $ reject_list__ = "," + f$edit(p4, "COLLAPSE, UPCASE") + ","
$ reject_list___len = f$length(reject_list__) $ reject_list___len = f$length(reject_list__)
$ reset = f$search( "reset", 1) $ reset = f$search( "reset", 1)
$Loop: $Loop:
$ file = f$search( search, 1) $ file = f$search( search, 1)
$ if file .eqs. "" then goto EndLoop $ if file .eqs. "" then goto EndLoop
$! Skip a name if it's in the P4 exclusion list. $! Skip a name if it's in the P4 exclusion list.
$ if (p4 .nes. "") $ if (p4 .nes. "")
$ then $ then
$ name__ = "," + - $ name__ = "," + -
f$edit(f$parse(file, , , "NAME", "SYNTAX_ONLY"), "UPCASE") + - f$edit(f$parse(file, , , "NAME", "SYNTAX_ONLY"), "UPCASE") + -
"," ","
$ if (f$locate(name__, reject_list__) .lt. reject_list___len) $ if (f$locate(name__, reject_list__) .lt. reject_list___len)
$ then
$ goto Loop
$ endif
$ endif
$ objfile = f$parse("''objdir'.OBJ;", file)
$ obj = f$search(objfile, 2)
$ if (obj .nes. "")
$ then $ then
$ if (f$cvtime(f$file(file,"rdt")) .gts. f$cvtime(f$file(obj,"rdt"))) $ goto Loop
$ then
$ call compile 'file'
$ sts = $status
$ if .not. sts
$ then
$ goto EndLoop
$ endif
$ librarian /object 'p3' 'objfile'
$ else
$ 'vo_o' "%CURL-I-OBJUTD, ", objfile, " is up to date"
$ endif
$ else
$ 'vo_o' "%CURL-I-OBJDNE, ", file, " does not exist"
$ call compile 'file'
$ sts = $status
$ if .not. sts
$ then
$ goto EndLoop
$ endif
$ librarian /object 'p3' 'objfile'
$ endif $ endif
$ goto Loop $ endif
$ objfile = f$parse("''objdir'.OBJ;", file)
$ obj = f$search(objfile, 2)
$ if (obj .nes. "")
$ then
$ if (f$cvtime(f$file(file,"rdt")) .gts. f$cvtime(f$file(obj,"rdt")))
$ then
$ call compile 'file'
$ sts = $status
$ if .not. sts
$ then
$ goto EndLoop
$ endif
$ librarian /object 'p3' 'objfile'
$ else
$ 'vo_o' "%CURL-I-OBJUTD, ", objfile, " is up to date"
$ endif
$ else
$ 'vo_o' "%CURL-I-OBJDNE, ", file, " does not exist"
$ call compile 'file'
$ sts = $status
$ if .not. sts
$ then
$ goto EndLoop
$ endif
$ librarian /object 'p3' 'objfile'
$ endif
$ goto Loop
$EndLoop: $EndLoop:
$!!! purge $!!! purge
$ set default 'build_def' $ set default 'build_def'
$ exit 'sts' $ exit 'sts'
$ endsubroutine ! Build $ endsubroutine ! Build
$! $!
$! Based on the file TYPE, do the right compile command. $! Based on the file TYPE, do the right compile command.
$! Only C and MSG supported. $! Only C and MSG supported.
$! $!
$compile: subroutine $compile: subroutine
$ on control_y then return ctrl_y ! SS$_CONTROLY $ on control_y then return ctrl_y ! SS$_CONTROLY
$! set noon $! set noon
$ file = p1 $ file = p1
$ qual = p2+ p3+ p4+ p5+ p6+ p7+ p8 $ qual = p2+ p3+ p4+ p5+ p6+ p7+ p8
$ typ = f$edit(f$parse(file, , , "TYPE"), "UPCASE") - "." $ typ = f$edit(f$parse(file, , , "TYPE"), "UPCASE") - "."
$ if (typ .eqs. "C") $ if (typ .eqs. "C")
$ then $ then
$ 'vo_c' "CC (opts) ", file $ 'vo_c' "CC (opts) ", file
$ define/user curl 'curl_logical' $ define/user curl 'curl_logical'
$ if curl_sys_krbinc .nes. "" then define/user gssapi 'curl_sys_krbinc' $ if curl_sys_krbinc .nes. "" then define/user gssapi 'curl_sys_krbinc'
$ define/user decc$system_include 'sys_inc' $ define/user decc$system_include 'sys_inc'
$ CC 'cc_defs' - $ CC 'cc_defs' -
'cc_qual1' - 'cc_qual1' -
'cc_qual2' - 'cc_qual2' -
'file' 'file'
$ else $ else
$ cmd_msg = "MESSAGE " + msg_qual $ cmd_msg = "MESSAGE " + msg_qual
$ x = cmd_'typ' $ x = cmd_'typ'
$ 'vo_c' x, " ", file $ 'vo_c' x, " ", file
$ 'x' 'file' $ 'x' 'file'
$ endif $ endif
$ ENDSUBROUTINE ! Compile $ ENDSUBROUTINE ! Compile
$! $!
$! Do a diff of the file specified in P1 with that in P2. If different $! Do a diff of the file specified in P1 with that in P2. If different
@@ -885,17 +951,17 @@ $! copy P1 to P2. This also covers if P2 doesn't exist, but not if P2
$! is an invalid filespec. $! is an invalid filespec.
$! $!
$MoveIfDiff: subroutine $MoveIfDiff: subroutine
$ set NoOn $ set NoOn
$ define /user_mode sys$error nl: $ define /user_mode sys$error nl:
$ define /user_mode sys$output nl: $ define /user_mode sys$output nl:
$ differences 'p1' 'p2' $ differences 'p1' 'p2'
$ status = $status $ status = $status
$ if (status .ne. %X006C8009) ! if status is not "no diff" $ if (status .ne. %X006C8009) ! if status is not "no diff"
$ then $ then
$ copy 'p1' 'p2' $ copy 'p1' 'p2'
$ purge /nolog 'p2' $ purge /nolog 'p2'
$ endif $ endif
$ on control_y then return ctrl_y ! SS$_CONTROLY $ on control_y then return ctrl_y ! SS$_CONTROLY
$ ENDSUBROUTINE ! MoveIfDiff $ ENDSUBROUTINE ! MoveIfDiff
$! $!
$Common_Exit: $Common_Exit: