curl_startup.com 3.1 KB

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