You need to sign in or sign up before continuing.
openssl_startup.com.in 4.2 KB
Newer Older
1 2 3 4 5 6 7 8
$	! OpenSSL startup script
$	!
$	! This script defines the logical names used by the installation
$	! of OpenSSL.  It can provide those logical names at any level,
$	! defined by P1.
$	!
$	! The logical names created are:
$	!
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
$	!	OSSL$INSTROOT		Installation root
$	!	OSSL$DATAROOT		Data root (common directory
$	!				for certs etc)
$	!	OSSL$INCLUDE		Include directory root
$	!	OSSL$LIB		Where the static library files
$	!				are located
$	!	OSSL$SHARE		Where the shareable image files
$	!				are located
$	!	OSSL$EXE		Where the executables are located
$	!	OSSL$ENGINESnnn		Where the shareable images are located
$	!	OSSL$LIBCRYPTO		The static crypto library
$	!	OSSL$LIBSSL		The static ssl library
$	!	OSSL$LIBCRYPTOnnn_SHR	The shareable crypto image
$	!	OSSL$LIBSSLnnn_SHR	The shareable ssl image
$	!	OPENSSL			is OSSL$INCLUDE:[OPENSSL]
24 25
$	!
$	! In all these, nnn is the OpenSSL version number.  This allows
26 27 28
$	! several OpenSSL versions to be installed simultaneously, which
$	! matters for applications that are linked to the shareable images
$	! or that depend on engines.
29 30 31 32
$	!
$	! In addition, unless P2 is "NOALIASES", these logical names are
$	! created:
$	!
33 34 35
$	!	OSSL$ENGINES		Alias for OSSL$ENGINESnnn
$	!	OSSL$LIBCRYPTO_SHR	Alias for OSSL$LIBCRYPTOnnn_SHR
$	!	OSSL$LIBSSL_SHR		Alias for OSSL$LIBSSLnnn_SHR
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55
$	!
$	! P1	Qualifier(s) for DEFINE.  "/SYSTEM" would be typical when
$	!	calling this script from SYS$STARTUP:SYSTARTUP_VMS.COM,
$	!	while "/PROCESS" would be typical for a personal install.
$	!	Default: /PROCESS
$	!
$	! P2	If the value is "NOALIASES", no alias logical names are
$	!	created.
$
$	status = %x10000001	! Generic success
$
$	! In case there's a problem
$	ON CONTROL_Y THEN GOTO bailout
$	ON ERROR THEN GOTO bailout
$
$	! Find the architecture
$	IF F$GETSYI("CPU") .LT. 128
$	THEN
$	    arch := VAX
$	ELSE
56
$	    arch = F$EDIT(F$GETSYI("ARCH_NAME"),"UPCASE")
57 58 59 60 61 62 63 64 65
$	    IF arch .EQS. "" THEN GOTO unknown_arch
$	ENDIF
$
$	! Generated information
$	INSTALLTOP := {- $config{INSTALLTOP} -}
$	OPENSSLDIR := {- $config{OPENSSLDIR} -}
$
$	! Make sure that INSTALLTOP and OPENSSLDIR become something one
$	! can build concealed logical names on
66
$	INSTALLTOP_ = F$PARSE("A.;",INSTALLTOP,,,"NO_CONCEAL") -
R
Richard Levitte 已提交
67
		     - ".][000000" - "[000000." - "][" - "]A.;" + "."
68
$	OPENSSLDIR_ = F$PARSE("A.;",OPENSSLDIR,,,"NO_CONCEAL") -
R
Richard Levitte 已提交
69
		     - ".][000000" - "[000000." - "][" - "]A.;" + "."
70
$
R
Richard Levitte 已提交
71 72
$	DEFINE /TRANSLATION=CONCEALED /NOLOG WRK_INSTALLTOP 'INSTALLTOP_']
$	DEFINE /TRANSLATION=CONCEALED /NOLOG WRK_OPENSSLDIR 'OPENSSLDIR_']
73 74 75 76
$
$	! Check that things are in place, and specifically, the stuff
$	! belonging to this architecture
$	IF F$SEARCH("WRK_INSTALLTOP:[000000]INCLUDE.DIR;1") .EQS. "" -
77 78 79 80 81
	   .OR. F$SEARCH("WRK_INSTALLTOP:[000000]LIB.DIR;1") .EQS. "" -
	   .OR. F$SEARCH("WRK_INSTALLTOP:[000000]EXE.DIR;1") .EQS. "" -
	   .OR. F$SEARCH("WRK_INSTALLTOP:[LIB]''arch'.DIR;1") .EQS. "" -
	   .OR. F$SEARCH("WRK_INSTALLTOP:[EXE]''arch'.DIR;1") .EQS. "" -
	   .OR. F$SEARCH("WRK_OPENSSLDIR:[000000]openssl.cnf") .EQS. ""
82 83 84 85 86 87 88 89 90
$	THEN
$	    WRITE SYS$ERROR "''INSTALLTOP' doesn't look like an OpenSSL installation for ''arch'"
$	    status = %x00018292 ! RMS$_FNF, file not found
$	    GOTO bailout
$	ENDIF
$
$	! Abbrevs
$	DEFT := DEFINE /TRANSLATION=CONCEALED /NOLOG 'P1'
$	DEF  := DEFINE /NOLOG 'P1'
91 92
$	sv   := {- sprintf "%02d%02d", $config{shlib_major}, $config{shlib_minor} -}
$	pz   := {- $config{pointer_size} -}
93
$
94
$	DEFT OSSL$DATAROOT		'OPENSSLDIR_']
95 96 97 98 99
$	DEFT OSSL$INSTROOT		'INSTALLTOP_']
$	DEFT OSSL$INCLUDE		'INSTALLTOP_'INCLUDE.]
$	DEF  OSSL$LIB			OSSL$INSTROOT:[LIB.'arch']
$	DEF  OSSL$SHARE			OSSL$INSTROOT:[LIB.'arch']
$	DEF  OSSL$ENGINES'sv'		OSSL$INSTROOT:[ENGINES'sv'.'arch']
100 101
$	DEF  OSSL$EXE			OSSL$INSTROOT:[EXE.'arch'],-
					OSSL$INSTROOT:[EXE]
102 103 104 105
$	DEF  OSSL$LIBCRYPTO'pz'		OSSL$LIB:OSSL$LIBCRYPTO'pz'.OLB
$	DEF  OSSL$LIBSSL'pz'		OSSL$LIB:OSSL$LIBSSL'pz'.OLB
$	DEF  OSSL$LIBCRYPTO'sv'_SHR'pz'	OSSL$SHARE:OSSL$LIBCRYPTO'sv'_SHR'pz'.EXE
$	DEF  OSSL$LIBSSL'sv'_SHR'pz'	OSSL$SHARE:OSSL$LIBSSL'sv'_SHR'pz'.EXE
106 107
$	DEF  OPENSSL			OSSL$INCLUDE:[OPENSSL]
$
108 109
$	IF P2 .NES. "NOALIASES"
$	THEN
110
$	    DEF OSSL$ENGINES		OSSL$ENGINES'sv'
111 112
$	    DEF OSSL$LIBCRYPTO_SHR'pz'	OSSL$LIBCRYPTO'sv'_SHR'pz'
$	    DEF OSSL$LIBSSL_SHR'pz'	OSSL$LIBSSL'sv'_SHR'pz'
113 114 115 116 117 118
$	ENDIF
$
$ bailout:
$	DEASSIGN WRK_INSTALLTOP
$
$	EXIT 'status'