blob: caad02278b957e52b4dd47cded82ef5f66c06a35 [file] [log] [blame]
Richard Levittee84193e2016-01-30 07:14:58 +01001$ ! 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
Richard Levitteaf854d02016-03-23 23:07:56 +010049$ arch = F$EDIT(F$GETSYI("ARCH_NAME"),"UPCASE")
Richard Levittee84193e2016-01-30 07:14:58 +010050$ 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} -}
Richard Levitteaf854d02016-03-23 23:07:56 +010057$ POINTER_SIZE := {- $config{pointersize} -}
Richard Levittee84193e2016-01-30 07:14:58 +010058$
59$ ! Make sure that INSTALLTOP and OPENSSLDIR become something one
60$ ! can build concealed logical names on
Richard Levitteaf854d02016-03-23 23:07:56 +010061$ INSTALLTOP_ = F$PARSE("A.;",INSTALLTOP,,,"NO_CONCEAL") -
62 - ".][000000" - "[000000." - "][" - "]A.;" + ".]"
63$ OPENSSLDIR_ = F$PARSE("A.;",OPENSSLDIR,,,"NO_CONCEAL") -
64 - ".][000000" - "[000000." - "][" - "]A.;" + ".]"
Richard Levittee84193e2016-01-30 07:14:58 +010065$ DEFINE /TRANSLATION=CONCEALED /NOLOG WRK_INSTALLTOP 'INSTALLTOP_'
Richard Levitte85112d52016-03-29 20:02:15 +020066$ DEFINE /TRANSLATION=CONCEALED /NOLOG WRK_OPENSSLDIR 'OPENSSLDIR_'
Richard Levittee84193e2016-01-30 07:14:58 +010067$
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. "" -
Richard Levitte85112d52016-03-29 20:02:15 +020071 .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. ""
Richard Levittee84193e2016-01-30 07:14:58 +010076$ 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.]
Richard Levitte85112d52016-03-29 20:02:15 +020089$ 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']
Richard Levitte84af1ba2016-02-22 13:52:46 +010093$ {- output_off() if $disabled{shared} -}
Richard Levittee84193e2016-01-30 07:14:58 +010094$ {- join("\n\$ ", map { "DEF $_'v' OSSL\$SHARE:$_" } map { $unified_info{sharednames}->{$_} || () } @{$unified_info{libraries}}) -}
95$ {- output_on() -}
96$ IF P2 .NES. "NOALIASES"
97$ THEN
98$ DEF OSSL$INSTROOT OSSL$INSTROOT'v'
99$ DEF OSSL$INCLUDE OSSL$INCLUDE'v'
100$ DEF OSSL$LIB OSSL$LIB'v'
101$ DEF OSSL$SHARE OSSL$SHARE'v'
102$ DEF OSSL$ENGINES OSSL$ENGINES'v'
103$ DEF OSSL$EXE OSSL$EXE'v'
104$ DEF OPENSSL OSSL$INCLUDE:[OPENSSL]
Richard Levitte84af1ba2016-02-22 13:52:46 +0100105$ {- output_off() if $disabled{shared} -}
Richard Levittee84193e2016-01-30 07:14:58 +0100106$ {- join("\n\$ ", map { "DEF $_ $_'v'" } map { $unified_info{sharednames}->{$_} || () } @{$unified_info{libraries}}) -}
107$ {- output_on() -}
108$ ENDIF
109$
110$ DEFT OSSL$DATAROOT 'OPENSSLDIR_'
111$ DEF OSSL$CERTS OSSL$DATAROOT:[CERTS]
112$ DEF OSSL$PRIVATE OSSL$DATAROOT:[PRIVATE]
113$
114$ bailout:
115$ DEASSIGN WRK_INSTALLTOP
116$
117$ EXIT 'status'