openssl_startup.com.in 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. $ ! OpenSSL startup script
  2. $ !
  3. $ ! This script defines the logical names used by the installation
  4. $ ! of OpenSSL. It can provide those logical names at any level,
  5. $ ! defined by P1.
  6. $ !
  7. $ ! The logical names created are:
  8. $ !
  9. $ ! OSSL$ROOTnnn Installation root
  10. $ ! OSSL$EXEnnn Where the executables are located
  11. $ ! OSSL$LIBnnn Where the library files are located
  12. $ ! OSSL$SHAREnnn Where the sahreable images are located
  13. $ ! OSSL$INCLUDEnnn Include directory root
  14. $ ! OSSL$ENGINESnnn Where the sahreable images are located
  15. $ !
  16. $ ! In all these, nnn is the OpenSSL version number. This allows
  17. $ ! several OpenSSL versions to be installed simultaneously.
  18. $ !
  19. $ ! In addition, unless P2 is "NOALIASES", these logical names are
  20. $ ! created:
  21. $ !
  22. $ ! OSSL$ROOT Alias for OSSL$ROOTnnn
  23. $ ! OSSL$EXE Alias for OSSL$EXEnnn
  24. $ ! OSSL$LIB Alias for OSSL$LIBnnn
  25. $ ! OSSL$SHARE Alias for OSSL$SHAREnnn
  26. $ ! OSSL$INCLUDE Alias for OSSL$INCLUDEnnn
  27. $ ! OPENSSL is OSSL$INCLUDE:[OPENSSL]
  28. $ ! OSSL$ENGINES Alias for OSSL$ENGINESnnn
  29. $ !
  30. $ ! P1 Qualifier(s) for DEFINE. "/SYSTEM" would be typical when
  31. $ ! calling this script from SYS$STARTUP:SYSTARTUP_VMS.COM,
  32. $ ! while "/PROCESS" would be typical for a personal install.
  33. $ ! Default: /PROCESS
  34. $ !
  35. $ ! P2 If the value is "NOALIASES", no alias logical names are
  36. $ ! created.
  37. $
  38. $ status = %x10000001 ! Generic success
  39. $
  40. $ ! In case there's a problem
  41. $ ON CONTROL_Y THEN GOTO bailout
  42. $ ON ERROR THEN GOTO bailout
  43. $
  44. $ ! Find the architecture
  45. $ IF F$GETSYI("CPU") .LT. 128
  46. $ THEN
  47. $ arch := VAX
  48. $ ELSE
  49. $ arch = F$EDIT(F$GETSYI("ARCH_NAME"),"UPCASE")
  50. $ IF arch .EQS. "" THEN GOTO unknown_arch
  51. $ ENDIF
  52. $
  53. $ ! Generated information
  54. $ VERSION := {- $config{version} -}
  55. $ INSTALLTOP := {- $config{INSTALLTOP} -}
  56. $ OPENSSLDIR := {- $config{OPENSSLDIR} -}
  57. $ POINTER_SIZE := {- $config{pointersize} -}
  58. $
  59. $ ! Make sure that INSTALLTOP and OPENSSLDIR become something one
  60. $ ! can build concealed logical names on
  61. $ INSTALLTOP_ = F$PARSE("A.;",INSTALLTOP,,,"NO_CONCEAL") -
  62. - ".][000000" - "[000000." - "][" - "]A.;" + ".]"
  63. $ OPENSSLDIR_ = F$PARSE("A.;",OPENSSLDIR,,,"NO_CONCEAL") -
  64. - ".][000000" - "[000000." - "][" - "]A.;" + ".]"
  65. $ DEFINE /TRANSLATION=CONCEALED /NOLOG WRK_INSTALLTOP 'INSTALLTOP_'
  66. $ DEFINE /TRANSLATION=CONCEALED /NOLOG WRK_OPENSSLDIR 'OPENSSLDIR_'
  67. $
  68. $ ! Check that things are in place, and specifically, the stuff
  69. $ ! belonging to this architecture
  70. $ IF F$SEARCH("WRK_INSTALLTOP:[000000]INCLUDE.DIR;1") .EQS. "" -
  71. .OR. F$SEARCH("WRK_INSTALLTOP:[000000]LIB.DIR;1") .EQS. "" -
  72. .OR. F$SEARCH("WRK_INSTALLTOP:[000000]EXE.DIR;1") .EQS. "" -
  73. .OR. F$SEARCH("WRK_INSTALLTOP:[LIB]''arch'.DIR;1") .EQS. "" -
  74. .OR. F$SEARCH("WRK_INSTALLTOP:[EXE]''arch'.DIR;1") .EQS. "" -
  75. .OR. F$SEARCH("WRK_OPENSSLDIR:[000000]openssl.cnf") .EQS. ""
  76. $ THEN
  77. $ WRITE SYS$ERROR "''INSTALLTOP' doesn't look like an OpenSSL installation for ''arch'"
  78. $ status = %x00018292 ! RMS$_FNF, file not found
  79. $ GOTO bailout
  80. $ ENDIF
  81. $
  82. $ ! Abbrevs
  83. $ DEFT := DEFINE /TRANSLATION=CONCEALED /NOLOG 'P1'
  84. $ DEF := DEFINE /NOLOG 'P1'
  85. $ v = VERSION - "." - "."
  86. $
  87. $ DEFT OSSL$INSTROOT'v' 'INSTALLTOP_'
  88. $ DEFT OSSL$INCLUDE'v' OSSL$INSTROOT:[INCLUDE.]
  89. $ DEF OSSL$LIB'v' OSSL$INSTROOT:[LIB.'arch']
  90. $ DEF OSSL$SHARE'v' OSSL$INSTROOT:[LIB.'arch']
  91. $ DEF OSSL$ENGINES'v' OSSL$INSTROOT:[ENGINES.'arch']
  92. $ DEF OSSL$EXE'v' OSSL$INSTROOT:[EXE.'arch']
  93. $ {- join("\n\$ ", map { my $x = uc $_; "DEF ${x}'v' OSSL\$SHARE:${x}" } @{$config{shared_libs}}) -}
  94. $ IF P2 .NES. "NOALIASES"
  95. $ THEN
  96. $ DEF OSSL$INSTROOT OSSL$INSTROOT'v'
  97. $ DEF OSSL$INCLUDE OSSL$INCLUDE'v'
  98. $ DEF OSSL$LIB OSSL$LIB'v'
  99. $ DEF OSSL$SHARE OSSL$SHARE'v'
  100. $ DEF OSSL$ENGINES OSSL$ENGINES'v'
  101. $ DEF OSSL$EXE OSSL$EXE'v'
  102. $ DEF OPENSSL OSSL$INCLUDE:[OPENSSL]
  103. $ {- join("\n\$ ", map { my $x = uc $_; "DEF ${x} ${x}'v'" } @{$config{shared_libs}}) -}
  104. $ ENDIF
  105. $
  106. $ DEFT OSSL$DATAROOT 'OPENSSLDIR_'
  107. $ DEF OSSL$CERTS OSSL$DATAROOT:[CERTS]
  108. $ DEF OSSL$PRIVATE OSSL$DATAROOT:[PRIVATE]
  109. $
  110. $ bailout:
  111. $ DEASSIGN WRK_INSTALLTOP
  112. $
  113. $ EXIT 'status'