Ulf Möller | 7d7d2cb | 1999-05-13 11:37:32 +0000 | [diff] [blame] | 1 | $! |
| 2 | $! SSL-LIB.COM |
| 3 | $! Written By: Robert Byer |
| 4 | $! Vice-President |
| 5 | $! A-Com Computing, Inc. |
| 6 | $! byer@mail.all-net.net |
| 7 | $! |
| 8 | $! Changes by Richard Levitte <richard@levitte.org> |
| 9 | $! |
| 10 | $! This command file compiles and creates the "[.xxx.EXE.SSL]LIBSSL.OLB" |
Richard Levitte | cc8cc9a | 2009-05-15 16:36:56 +0000 | [diff] [blame] | 11 | $! library for OpenSSL. The "xxx" denotes the machine architecture of |
| 12 | $! ALPHA, IA64 or VAX. |
Ulf Möller | 7d7d2cb | 1999-05-13 11:37:32 +0000 | [diff] [blame] | 13 | $! |
| 14 | $! It is written to detect what type of machine you are compiling on |
Richard Levitte | cc8cc9a | 2009-05-15 16:36:56 +0000 | [diff] [blame] | 15 | $! (i.e. ALPHA or VAX) and which "C" compiler you have (i.e. VAXC, DECC |
Ulf Möller | 7d7d2cb | 1999-05-13 11:37:32 +0000 | [diff] [blame] | 16 | $! or GNU C) or you can specify which compiler to use. |
| 17 | $! |
| 18 | $! Specify the following as P1 to build just that part or ALL to just |
| 19 | $! build everything. |
| 20 | $! |
| 21 | $! LIBRARY To just compile the [.xxx.EXE.SSL]LIBSSL.OLB Library. |
| 22 | $! SSL_TASK To just compile the [.xxx.EXE.SSL]SSL_TASK.EXE |
| 23 | $! |
Richard Levitte | b6d0def | 2002-10-31 16:46:52 +0000 | [diff] [blame] | 24 | $! Specify DEBUG or NODEBUG as P2 to compile with or without debugger |
Ulf Möller | 7d7d2cb | 1999-05-13 11:37:32 +0000 | [diff] [blame] | 25 | $! information. |
| 26 | $! |
Richard Levitte | b6d0def | 2002-10-31 16:46:52 +0000 | [diff] [blame] | 27 | $! Specify which compiler at P3 to try to compile under. |
Ulf Möller | 7d7d2cb | 1999-05-13 11:37:32 +0000 | [diff] [blame] | 28 | $! |
| 29 | $! VAXC For VAX C. |
| 30 | $! DECC For DEC C. |
| 31 | $! GNUC For GNU C. |
| 32 | $! |
Richard Levitte | 537c982 | 2011-03-19 10:58:14 +0000 | [diff] [blame] | 33 | $! If you don't specify a compiler, it will try to determine which |
Ulf Möller | 7d7d2cb | 1999-05-13 11:37:32 +0000 | [diff] [blame] | 34 | $! "C" compiler to use. |
| 35 | $! |
Richard Levitte | b6d0def | 2002-10-31 16:46:52 +0000 | [diff] [blame] | 36 | $! P4, if defined, sets a TCP/IP library to use, through one of the following |
Ulf Möller | 7d7d2cb | 1999-05-13 11:37:32 +0000 | [diff] [blame] | 37 | $! keywords: |
| 38 | $! |
| 39 | $! UCX for UCX |
Richard Levitte | b935754 | 2002-05-22 11:37:20 +0000 | [diff] [blame] | 40 | $! TCPIP for TCPIP (post UCX) |
Ulf Möller | 7d7d2cb | 1999-05-13 11:37:32 +0000 | [diff] [blame] | 41 | $! SOCKETSHR for SOCKETSHR+NETLIB |
| 42 | $! |
Richard Levitte | b6d0def | 2002-10-31 16:46:52 +0000 | [diff] [blame] | 43 | $! P5, if defined, sets a compiler thread NOT needed on OpenVMS 7.1 (and up) |
Ulf Möller | 7d7d2cb | 1999-05-13 11:37:32 +0000 | [diff] [blame] | 44 | $! |
Richard Levitte | 537c982 | 2011-03-19 10:58:14 +0000 | [diff] [blame] | 45 | $! P6, if defined, specifies the C pointer size. Ignored on VAX. |
Richard Levitte | 3a660e7 | 2011-03-25 16:20:35 +0000 | [diff] [blame] | 46 | $! ("64=ARGV" gives more efficient code with HP C V7.3 or newer.) |
Richard Levitte | 537c982 | 2011-03-19 10:58:14 +0000 | [diff] [blame] | 47 | $! Supported values are: |
Richard Levitte | b7ef916 | 2010-12-14 19:19:04 +0000 | [diff] [blame] | 48 | $! |
Richard Levitte | 3a660e7 | 2011-03-25 16:20:35 +0000 | [diff] [blame] | 49 | $! "" Compile with default (/NOPOINTER_SIZE) |
| 50 | $! 32 Compile with /POINTER_SIZE=32 (SHORT) |
| 51 | $! 64 Compile with /POINTER_SIZE=64[=ARGV] (LONG[=ARGV]) |
Richard Levitte | 4ec3e8c | 2011-03-25 09:40:48 +0000 | [diff] [blame] | 52 | $! (Automatically select ARGV if compiler supports it.) |
| 53 | $! 64= Compile with /POINTER_SIZE=64 (LONG). |
| 54 | $! 64=ARGV Compile with /POINTER_SIZE=64=ARGV (LONG=ARGV). |
Richard Levitte | b7ef916 | 2010-12-14 19:19:04 +0000 | [diff] [blame] | 55 | $! |
Richard Levitte | 537c982 | 2011-03-19 10:58:14 +0000 | [diff] [blame] | 56 | $! P7, if defined, specifies a directory where ZLIB files (zlib.h, |
| 57 | $! libz.olb) may be found. Optionally, a non-default object library |
| 58 | $! name may be included ("dev:[dir]libz_64.olb", for example). |
| 59 | $! |
| 60 | $! |
| 61 | $! Announce/identify. |
| 62 | $! |
| 63 | $ proc = f$environment( "procedure") |
| 64 | $ write sys$output "@@@ "+ - |
| 65 | f$parse( proc, , , "name")+ f$parse( proc, , , "type") |
Ulf Möller | 7d7d2cb | 1999-05-13 11:37:32 +0000 | [diff] [blame] | 66 | $! |
| 67 | $! Define A TCP/IP Library That We Will Need To Link To. |
| 68 | $! (That Is, If We Need To Link To One.) |
| 69 | $! |
| 70 | $ TCPIP_LIB = "" |
Richard Levitte | 537c982 | 2011-03-19 10:58:14 +0000 | [diff] [blame] | 71 | $ ZLIB_LIB = "" |
Ulf Möller | 7d7d2cb | 1999-05-13 11:37:32 +0000 | [diff] [blame] | 72 | $! |
Richard Levitte | cc8cc9a | 2009-05-15 16:36:56 +0000 | [diff] [blame] | 73 | $! Check What Architecture We Are Using. |
Ulf Möller | 7d7d2cb | 1999-05-13 11:37:32 +0000 | [diff] [blame] | 74 | $! |
Richard Levitte | cc8cc9a | 2009-05-15 16:36:56 +0000 | [diff] [blame] | 75 | $ IF (F$GETSYI("CPU").LT.128) |
Ulf Möller | 7d7d2cb | 1999-05-13 11:37:32 +0000 | [diff] [blame] | 76 | $ THEN |
| 77 | $! |
Ulf Möller | 7d7d2cb | 1999-05-13 11:37:32 +0000 | [diff] [blame] | 78 | $! The Architecture Is VAX. |
| 79 | $! |
Richard Levitte | 537c982 | 2011-03-19 10:58:14 +0000 | [diff] [blame] | 80 | $ ARCH = "VAX" |
Ulf Möller | 7d7d2cb | 1999-05-13 11:37:32 +0000 | [diff] [blame] | 81 | $! |
Richard Levitte | cc8cc9a | 2009-05-15 16:36:56 +0000 | [diff] [blame] | 82 | $! Else... |
| 83 | $! |
| 84 | $ ELSE |
| 85 | $! |
| 86 | $! The Architecture Is Alpha, IA64 or whatever comes in the future. |
| 87 | $! |
| 88 | $ ARCH = F$EDIT( F$GETSYI( "ARCH_NAME"), "UPCASE") |
| 89 | $ IF (ARCH .EQS. "") THEN ARCH = "UNK" |
| 90 | $! |
Ulf Möller | 7d7d2cb | 1999-05-13 11:37:32 +0000 | [diff] [blame] | 91 | $! End The Architecture Check. |
| 92 | $! |
| 93 | $ ENDIF |
| 94 | $! |
Richard Levitte | 537c982 | 2011-03-19 10:58:14 +0000 | [diff] [blame] | 95 | $ ARCHD = ARCH |
| 96 | $ LIB32 = "32" |
| 97 | $ OPT_FILE = "" |
| 98 | $ POINTER_SIZE = "" |
Richard Levitte | cc8cc9a | 2009-05-15 16:36:56 +0000 | [diff] [blame] | 99 | $! |
Ulf Möller | 7d7d2cb | 1999-05-13 11:37:32 +0000 | [diff] [blame] | 100 | $! Check To Make Sure We Have Valid Command Line Parameters. |
| 101 | $! |
| 102 | $ GOSUB CHECK_OPTIONS |
| 103 | $! |
Richard Levitte | 537c982 | 2011-03-19 10:58:14 +0000 | [diff] [blame] | 104 | $! Define The OBJ and EXE Directories. |
| 105 | $! |
| 106 | $ OBJ_DIR := SYS$DISK:[-.'ARCHD'.OBJ.SSL] |
| 107 | $ EXE_DIR := SYS$DISK:[-.'ARCHD'.EXE.SSL] |
| 108 | $! |
| 109 | $! Specify the destination directory in any /MAP option. |
| 110 | $! |
| 111 | $ if (LINKMAP .eqs. "MAP") |
| 112 | $ then |
| 113 | $ LINKMAP = LINKMAP+ "=''EXE_DIR'" |
| 114 | $ endif |
| 115 | $! |
| 116 | $! Add the location prefix to the linker options file name. |
| 117 | $! |
| 118 | $ if (OPT_FILE .nes. "") |
| 119 | $ then |
| 120 | $ OPT_FILE = EXE_DIR+ OPT_FILE |
| 121 | $ endif |
| 122 | $! |
Ulf Möller | 7d7d2cb | 1999-05-13 11:37:32 +0000 | [diff] [blame] | 123 | $! Initialise logical names and such |
| 124 | $! |
| 125 | $ GOSUB INITIALISE |
| 126 | $! |
| 127 | $! Tell The User What Kind of Machine We Run On. |
| 128 | $! |
Richard Levitte | 537c982 | 2011-03-19 10:58:14 +0000 | [diff] [blame] | 129 | $ WRITE SYS$OUTPUT "Host system architecture: ''ARCHD'" |
Ulf Möller | 7d7d2cb | 1999-05-13 11:37:32 +0000 | [diff] [blame] | 130 | $! |
Ulf Möller | 7d7d2cb | 1999-05-13 11:37:32 +0000 | [diff] [blame] | 131 | $! Check To See If The Architecture Specific OBJ Directory Exists. |
| 132 | $! |
| 133 | $ IF (F$PARSE(OBJ_DIR).EQS."") |
| 134 | $ THEN |
| 135 | $! |
| 136 | $! It Dosen't Exist, So Create It. |
| 137 | $! |
| 138 | $ CREATE/DIR 'OBJ_DIR' |
| 139 | $! |
| 140 | $! End The Architecture Specific OBJ Directory Check. |
| 141 | $! |
| 142 | $ ENDIF |
| 143 | $! |
Ulf Möller | 7d7d2cb | 1999-05-13 11:37:32 +0000 | [diff] [blame] | 144 | $! Check To See If The Architecture Specific Directory Exists. |
| 145 | $! |
| 146 | $ IF (F$PARSE(EXE_DIR).EQS."") |
| 147 | $ THEN |
| 148 | $! |
| 149 | $! It Dosen't Exist, So Create It. |
| 150 | $! |
| 151 | $ CREATE/DIR 'EXE_DIR' |
| 152 | $! |
| 153 | $! End The Architecture Specific Directory Check. |
| 154 | $! |
| 155 | $ ENDIF |
| 156 | $! |
| 157 | $! Define The Library Name. |
| 158 | $! |
Richard Levitte | 537c982 | 2011-03-19 10:58:14 +0000 | [diff] [blame] | 159 | $ SSL_LIB := 'EXE_DIR'SSL_LIBSSL'LIB32'.OLB |
Ulf Möller | 7d7d2cb | 1999-05-13 11:37:32 +0000 | [diff] [blame] | 160 | $! |
| 161 | $! Define The CRYPTO-LIB We Are To Use. |
| 162 | $! |
Richard Levitte | 537c982 | 2011-03-19 10:58:14 +0000 | [diff] [blame] | 163 | $ CRYPTO_LIB := SYS$DISK:[-.'ARCHD'.EXE.CRYPTO]SSL_LIBCRYPTO'LIB32'.OLB |
Ulf Möller | 7d7d2cb | 1999-05-13 11:37:32 +0000 | [diff] [blame] | 164 | $! |
Richard Levitte | 4ec3e8c | 2011-03-25 09:40:48 +0000 | [diff] [blame] | 165 | $! Set up exceptional compilations. |
| 166 | $! |
| 167 | $ CC5_SHOWN = 0 |
| 168 | $! |
Ulf Möller | 7d7d2cb | 1999-05-13 11:37:32 +0000 | [diff] [blame] | 169 | $! Check To See What We Are To Do. |
| 170 | $! |
| 171 | $ IF (BUILDALL.EQS."TRUE") |
| 172 | $ THEN |
| 173 | $! |
| 174 | $! Since Nothing Special Was Specified, Do Everything. |
| 175 | $! |
| 176 | $ GOSUB LIBRARY |
| 177 | $ GOSUB SSL_TASK |
| 178 | $! |
| 179 | $! Else... |
| 180 | $! |
| 181 | $ ELSE |
| 182 | $! |
| 183 | $! Build Just What The User Wants Us To Build. |
| 184 | $! |
| 185 | $ GOSUB 'BUILDALL' |
| 186 | $! |
| 187 | $! End The BUILDALL Check. |
| 188 | $! |
| 189 | $ ENDIF |
| 190 | $! |
| 191 | $! Time To EXIT. |
| 192 | $! |
| 193 | $ EXIT: |
| 194 | $ GOSUB CLEANUP |
| 195 | $ EXIT |
| 196 | $! |
| 197 | $! Compile The Library. |
| 198 | $! |
| 199 | $ LIBRARY: |
| 200 | $! |
Richard Levitte | 537c982 | 2011-03-19 10:58:14 +0000 | [diff] [blame] | 201 | $! Check To See If We Already Have A "[.xxx.EXE.SSL]SSL_LIBSSL''LIB32'.OLB" Library... |
Ulf Möller | 7d7d2cb | 1999-05-13 11:37:32 +0000 | [diff] [blame] | 202 | $! |
| 203 | $ IF (F$SEARCH(SSL_LIB).EQS."") |
| 204 | $ THEN |
| 205 | $! |
| 206 | $! Guess Not, Create The Library. |
| 207 | $! |
| 208 | $ LIBRARY/CREATE/OBJECT 'SSL_LIB' |
| 209 | $! |
| 210 | $! End The Library Exist Check. |
| 211 | $! |
| 212 | $ ENDIF |
| 213 | $! |
| 214 | $! Define The Different SSL "library" Files. |
| 215 | $! |
| 216 | $ LIB_SSL = "s2_meth,s2_srvr,s2_clnt,s2_lib,s2_enc,s2_pkt,"+ - |
| 217 | "s3_meth,s3_srvr,s3_clnt,s3_lib,s3_enc,s3_pkt,s3_both,"+ - |
| 218 | "s23_meth,s23_srvr,s23_clnt,s23_lib,s23_pkt,"+ - |
| 219 | "t1_meth,t1_srvr,t1_clnt,t1_lib,t1_enc,"+ - |
Richard Levitte | 75c0053 | 2005-05-31 20:28:41 +0000 | [diff] [blame] | 220 | "d1_meth,d1_srvr,d1_clnt,d1_lib,d1_pkt,"+ - |
Richard Levitte | bec4486 | 2012-07-05 13:20:02 +0000 | [diff] [blame] | 221 | "d1_both,d1_enc,d1_srtp,"+ - |
Ulf Möller | 7d7d2cb | 1999-05-13 11:37:32 +0000 | [diff] [blame] | 222 | "ssl_lib,ssl_err2,ssl_cert,ssl_sess,"+ - |
| 223 | "ssl_ciph,ssl_stat,ssl_rsa,"+ - |
| 224 | "ssl_asn1,ssl_txt,ssl_algs,"+ - |
Richard Levitte | bec4486 | 2012-07-05 13:20:02 +0000 | [diff] [blame] | 225 | "bio_ssl,ssl_err,kssl,t1_reneg,tls_srp,t1_trce" |
Ulf Möller | 7d7d2cb | 1999-05-13 11:37:32 +0000 | [diff] [blame] | 226 | $! |
Richard Levitte | 4ec3e8c | 2011-03-25 09:40:48 +0000 | [diff] [blame] | 227 | $ COMPILEWITH_CC5 = "" |
| 228 | $! |
Ulf Möller | 7d7d2cb | 1999-05-13 11:37:32 +0000 | [diff] [blame] | 229 | $! Tell The User That We Are Compiling The Library. |
| 230 | $! |
| 231 | $ WRITE SYS$OUTPUT "Building The ",SSL_LIB," Library." |
| 232 | $! |
| 233 | $! Define A File Counter And Set It To "0" |
| 234 | $! |
| 235 | $ FILE_COUNTER = 0 |
| 236 | $! |
| 237 | $! Top Of The File Loop. |
| 238 | $! |
| 239 | $ NEXT_FILE: |
| 240 | $! |
| 241 | $! O.K, Extract The File Name From The File List. |
| 242 | $! |
| 243 | $ FILE_NAME = F$ELEMENT(FILE_COUNTER,",",LIB_SSL) |
| 244 | $! |
| 245 | $! Check To See If We Are At The End Of The File List. |
| 246 | $! |
| 247 | $ IF (FILE_NAME.EQS.",") THEN GOTO FILE_DONE |
| 248 | $! |
| 249 | $! Increment The Counter. |
| 250 | $! |
| 251 | $ FILE_COUNTER = FILE_COUNTER + 1 |
| 252 | $! |
| 253 | $! Create The Source File Name. |
| 254 | $! |
| 255 | $ SOURCE_FILE = "SYS$DISK:[]" + FILE_NAME + ".C" |
| 256 | $! |
| 257 | $! Create The Object File Name. |
| 258 | $! |
| 259 | $ OBJECT_FILE = OBJ_DIR + FILE_NAME + ".OBJ" |
| 260 | $ ON WARNING THEN GOTO NEXT_FILE |
| 261 | $! |
| 262 | $! Check To See If The File We Want To Compile Is Actually There. |
| 263 | $! |
| 264 | $ IF (F$SEARCH(SOURCE_FILE).EQS."") |
| 265 | $ THEN |
| 266 | $! |
| 267 | $! Tell The User That The File Dosen't Exist. |
| 268 | $! |
| 269 | $ WRITE SYS$OUTPUT "" |
| 270 | $ WRITE SYS$OUTPUT "The File ",SOURCE_FILE," Dosen't Exist." |
| 271 | $ WRITE SYS$OUTPUT "" |
| 272 | $! |
| 273 | $! Exit The Build. |
| 274 | $! |
| 275 | $ EXIT |
| 276 | $! |
| 277 | $! End The File Exists Check. |
| 278 | $! |
| 279 | $ ENDIF |
| 280 | $! |
| 281 | $! Tell The User What File We Are Compiling. |
| 282 | $! |
| 283 | $ WRITE SYS$OUTPUT " ",FILE_NAME,".c" |
| 284 | $! |
| 285 | $! Compile The File. |
| 286 | $! |
| 287 | $ ON ERROR THEN GOTO NEXT_FILE |
| 288 | $ CC/OBJECT='OBJECT_FILE' 'SOURCE_FILE' |
| 289 | $! |
| 290 | $! Add It To The Library. |
| 291 | $! |
| 292 | $ LIBRARY/REPLACE/OBJECT 'SSL_LIB' 'OBJECT_FILE' |
| 293 | $! |
| 294 | $! Time To Clean Up The Object File. |
| 295 | $! |
| 296 | $ DELETE 'OBJECT_FILE';* |
| 297 | $! |
| 298 | $! Go Back And Get The Next File Name. |
| 299 | $! |
| 300 | $ GOTO NEXT_FILE |
| 301 | $! |
| 302 | $! All Done With This Library. |
| 303 | $! |
| 304 | $ FILE_DONE: |
| 305 | $! |
| 306 | $! Tell The User That We Are All Done. |
| 307 | $! |
| 308 | $ WRITE SYS$OUTPUT "Library ",SSL_LIB," Compiled." |
| 309 | $! |
| 310 | $! Time To RETURN. |
| 311 | $! |
| 312 | $ RETURN |
| 313 | $ SSL_TASK: |
| 314 | $! |
| 315 | $! Check To See If We Have The Proper Libraries. |
| 316 | $! |
| 317 | $ GOSUB LIB_CHECK |
| 318 | $! |
| 319 | $! Check To See If We Have A Linker Option File. |
| 320 | $! |
| 321 | $ GOSUB CHECK_OPT_FILE |
| 322 | $! |
| 323 | $! Check To See If The File We Want To Compile Is Actually There. |
| 324 | $! |
| 325 | $ IF (F$SEARCH("SYS$DISK:[]SSL_TASK.C").EQS."") |
| 326 | $ THEN |
| 327 | $! |
| 328 | $! Tell The User That The File Dosen't Exist. |
| 329 | $! |
| 330 | $ WRITE SYS$OUTPUT "" |
| 331 | $ WRITE SYS$OUTPUT "The File SSL_TASK.C Dosen't Exist." |
| 332 | $ WRITE SYS$OUTPUT "" |
| 333 | $! |
| 334 | $! Exit The Build. |
| 335 | $! |
| 336 | $ EXIT |
| 337 | $! |
| 338 | $! End The SSL_TASK.C File Check. |
| 339 | $! |
| 340 | $ ENDIF |
| 341 | $! |
Richard Levitte | 4ec3e8c | 2011-03-25 09:40:48 +0000 | [diff] [blame] | 342 | $ COMPILEWITH_CC5 = "" !!! ",ssl_task," |
| 343 | $! |
Ulf Möller | 7d7d2cb | 1999-05-13 11:37:32 +0000 | [diff] [blame] | 344 | $! Tell The User We Are Creating The SSL_TASK. |
| 345 | $! |
Richard Levitte | 3a660e7 | 2011-03-25 16:20:35 +0000 | [diff] [blame] | 346 | $! Tell The User We Are Creating The SSL_TASK. |
| 347 | $! |
Ulf Möller | 7d7d2cb | 1999-05-13 11:37:32 +0000 | [diff] [blame] | 348 | $ WRITE SYS$OUTPUT "Creating SSL_TASK OSU HTTP SSL Engine." |
| 349 | $! |
Richard Levitte | 537c982 | 2011-03-19 10:58:14 +0000 | [diff] [blame] | 350 | $! Tell The User What File We Are Compiling. |
| 351 | $! |
| 352 | $ FILE_NAME = "ssl_task" |
| 353 | $ WRITE SYS$OUTPUT " ",FILE_NAME,".c" |
| 354 | $! |
Ulf Möller | 7d7d2cb | 1999-05-13 11:37:32 +0000 | [diff] [blame] | 355 | $! Compile The File. |
| 356 | $! |
Richard Levitte | b2c0453 | 2002-06-06 07:22:33 +0000 | [diff] [blame] | 357 | $ ON ERROR THEN GOTO SSL_TASK_END |
Richard Levitte | 537c982 | 2011-03-19 10:58:14 +0000 | [diff] [blame] | 358 | $! |
Richard Levitte | 4ec3e8c | 2011-03-25 09:40:48 +0000 | [diff] [blame] | 359 | $ FILE_NAME0 = ","+ F$ELEMENT(0,".",FILE_NAME)+ "," |
| 360 | $ IF COMPILEWITH_CC5 - FILE_NAME0 .NES. COMPILEWITH_CC5 |
| 361 | $ THEN |
| 362 | $ if (.not. CC5_SHOWN) |
| 363 | $ then |
| 364 | $ CC5_SHOWN = 1 |
Richard Levitte | 3a660e7 | 2011-03-25 16:20:35 +0000 | [diff] [blame] | 365 | $ write sys$output " \Using special rule (5)" |
| 366 | $ x = " "+ CC5 |
| 367 | $ write /symbol sys$output x |
Richard Levitte | 4ec3e8c | 2011-03-25 09:40:48 +0000 | [diff] [blame] | 368 | $ endif |
| 369 | $ CC5 /OBJECT='OBJ_DIR''FILE_NAME'.OBJ SYS$DISK:[]'FILE_NAME'.C |
| 370 | $ ELSE |
| 371 | $ CC /OBJECT='OBJ_DIR''FILE_NAME'.OBJ SYS$DISK:[]'FILE_NAME'.C |
| 372 | $ ENDIF |
Ulf Möller | 7d7d2cb | 1999-05-13 11:37:32 +0000 | [diff] [blame] | 373 | $! |
Richard Levitte | b6d0def | 2002-10-31 16:46:52 +0000 | [diff] [blame] | 374 | $! Link The Program. |
Ulf Möller | 7d7d2cb | 1999-05-13 11:37:32 +0000 | [diff] [blame] | 375 | $! |
Richard Levitte | 537c982 | 2011-03-19 10:58:14 +0000 | [diff] [blame] | 376 | $ LINK /'DEBUGGER' /'LINKMAP' /'TRACEBACK' /EXE='EXE_DIR'SSL_TASK.EXE - |
| 377 | 'OBJ_DIR'SSL_TASK.OBJ, - |
| 378 | 'SSL_LIB'/LIBRARY, - |
| 379 | 'CRYPTO_LIB'/LIBRARY - |
| 380 | 'TCPIP_LIB' - |
| 381 | 'ZLIB_LIB' - |
| 382 | ,'OPT_FILE' /OPTIONS |
Ulf Möller | 7d7d2cb | 1999-05-13 11:37:32 +0000 | [diff] [blame] | 383 | $! |
| 384 | $! Time To Return. |
| 385 | $! |
Richard Levitte | a9a025d | 2002-05-23 23:31:22 +0000 | [diff] [blame] | 386 | $SSL_TASK_END: |
Ulf Möller | 7d7d2cb | 1999-05-13 11:37:32 +0000 | [diff] [blame] | 387 | $ RETURN |
| 388 | $! |
| 389 | $! Check For The Link Option FIle. |
| 390 | $! |
| 391 | $ CHECK_OPT_FILE: |
| 392 | $! |
| 393 | $! Check To See If We Need To Make A VAX C Option File. |
| 394 | $! |
| 395 | $ IF (COMPILER.EQS."VAXC") |
| 396 | $ THEN |
| 397 | $! |
| 398 | $! Check To See If We Already Have A VAX C Linker Option File. |
| 399 | $! |
| 400 | $ IF (F$SEARCH(OPT_FILE).EQS."") |
| 401 | $ THEN |
| 402 | $! |
| 403 | $! We Need A VAX C Linker Option File. |
| 404 | $! |
| 405 | $ CREATE 'OPT_FILE' |
| 406 | $DECK |
| 407 | ! |
Richard Levitte | 537c982 | 2011-03-19 10:58:14 +0000 | [diff] [blame] | 408 | ! Default System Options File To Link Against |
Ulf Möller | 7d7d2cb | 1999-05-13 11:37:32 +0000 | [diff] [blame] | 409 | ! The Sharable VAX C Runtime Library. |
| 410 | ! |
| 411 | SYS$SHARE:VAXCRTL.EXE/SHARE |
| 412 | $EOD |
| 413 | $! |
| 414 | $! End The Option File Check. |
| 415 | $! |
| 416 | $ ENDIF |
| 417 | $! |
| 418 | $! End The VAXC Check. |
| 419 | $! |
| 420 | $ ENDIF |
| 421 | $! |
| 422 | $! Check To See If We Need A GNU C Option File. |
| 423 | $! |
| 424 | $ IF (COMPILER.EQS."GNUC") |
| 425 | $ THEN |
| 426 | $! |
| 427 | $! Check To See If We Already Have A GNU C Linker Option File. |
| 428 | $! |
| 429 | $ IF (F$SEARCH(OPT_FILE).EQS."") |
| 430 | $ THEN |
| 431 | $! |
| 432 | $! We Need A GNU C Linker Option File. |
| 433 | $! |
| 434 | $ CREATE 'OPT_FILE' |
| 435 | $DECK |
| 436 | ! |
Richard Levitte | 537c982 | 2011-03-19 10:58:14 +0000 | [diff] [blame] | 437 | ! Default System Options File To Link Against |
Ulf Möller | 7d7d2cb | 1999-05-13 11:37:32 +0000 | [diff] [blame] | 438 | ! The Sharable C Runtime Library. |
| 439 | ! |
| 440 | GNU_CC:[000000]GCCLIB/LIBRARY |
| 441 | SYS$SHARE:VAXCRTL/SHARE |
| 442 | $EOD |
| 443 | $! |
| 444 | $! End The Option File Check. |
| 445 | $! |
| 446 | $ ENDIF |
| 447 | $! |
| 448 | $! End The GNU C Check. |
| 449 | $! |
| 450 | $ ENDIF |
| 451 | $! |
| 452 | $! Check To See If We Need A DEC C Option File. |
| 453 | $! |
| 454 | $ IF (COMPILER.EQS."DECC") |
| 455 | $ THEN |
| 456 | $! |
| 457 | $! Check To See If We Already Have A DEC C Linker Option File. |
| 458 | $! |
| 459 | $ IF (F$SEARCH(OPT_FILE).EQS."") |
| 460 | $ THEN |
| 461 | $! |
Richard Levitte | cc8cc9a | 2009-05-15 16:36:56 +0000 | [diff] [blame] | 462 | $! Figure Out If We Need A non-VAX Or A VAX Linker Option File. |
Ulf Möller | 7d7d2cb | 1999-05-13 11:37:32 +0000 | [diff] [blame] | 463 | $! |
| 464 | $ IF (ARCH.EQS."VAX") |
| 465 | $ THEN |
| 466 | $! |
| 467 | $! We Need A DEC C Linker Option File For VAX. |
| 468 | $! |
| 469 | $ CREATE 'OPT_FILE' |
| 470 | $DECK |
| 471 | ! |
Richard Levitte | 537c982 | 2011-03-19 10:58:14 +0000 | [diff] [blame] | 472 | ! Default System Options File To Link Against |
Ulf Möller | 7d7d2cb | 1999-05-13 11:37:32 +0000 | [diff] [blame] | 473 | ! The Sharable DEC C Runtime Library. |
| 474 | ! |
| 475 | SYS$SHARE:DECC$SHR.EXE/SHARE |
| 476 | $EOD |
| 477 | $! |
| 478 | $! Else... |
| 479 | $! |
| 480 | $ ELSE |
| 481 | $! |
Richard Levitte | cc8cc9a | 2009-05-15 16:36:56 +0000 | [diff] [blame] | 482 | $! Create The non-VAX Linker Option File. |
Ulf Möller | 7d7d2cb | 1999-05-13 11:37:32 +0000 | [diff] [blame] | 483 | $! |
| 484 | $ CREATE 'OPT_FILE' |
| 485 | $DECK |
| 486 | ! |
Richard Levitte | 537c982 | 2011-03-19 10:58:14 +0000 | [diff] [blame] | 487 | ! Default System Options File For non-VAX To Link Against |
Ulf Möller | 7d7d2cb | 1999-05-13 11:37:32 +0000 | [diff] [blame] | 488 | ! The Sharable C Runtime Library. |
| 489 | ! |
| 490 | SYS$SHARE:CMA$OPEN_LIB_SHR/SHARE |
| 491 | SYS$SHARE:CMA$OPEN_RTL/SHARE |
| 492 | $EOD |
| 493 | $! |
Richard Levitte | cc8cc9a | 2009-05-15 16:36:56 +0000 | [diff] [blame] | 494 | $! End The DEC C Option File Check. |
Ulf Möller | 7d7d2cb | 1999-05-13 11:37:32 +0000 | [diff] [blame] | 495 | $! |
| 496 | $ ENDIF |
| 497 | $! |
| 498 | $! End The Option File Search. |
| 499 | $! |
| 500 | $ ENDIF |
| 501 | $! |
| 502 | $! End The DEC C Check. |
| 503 | $! |
| 504 | $ ENDIF |
| 505 | $! |
| 506 | $! Tell The User What Linker Option File We Are Using. |
| 507 | $! |
| 508 | $ WRITE SYS$OUTPUT "Using Linker Option File ",OPT_FILE,"." |
| 509 | $! |
| 510 | $! Time To RETURN. |
| 511 | $! |
| 512 | $ RETURN |
| 513 | $ LIB_CHECK: |
| 514 | $! |
| 515 | $! Look For The VAX Library LIBSSL.OLB. |
| 516 | $! |
| 517 | $ IF (F$SEARCH(SSL_LIB).EQS."") |
| 518 | $ THEN |
| 519 | $! |
| 520 | $! Tell The User We Can't Find The LIBSSL.OLB Library. |
| 521 | $! |
| 522 | $ WRITE SYS$OUTPUT "" |
| 523 | $ WRITE SYS$OUTPUT "Can't Find The Library ",SSL_LIB,"." |
| 524 | $ WRITE SYS$OUTPUT "We Can't Link Without It." |
| 525 | $ WRITE SYS$OUTPUT "" |
| 526 | $! |
| 527 | $! Since We Can't Link Without It, Exit. |
| 528 | $! |
| 529 | $ EXIT |
| 530 | $! |
| 531 | $! End The LIBSSL.OLB Library Check. |
| 532 | $! |
| 533 | $ ENDIF |
| 534 | $! |
| 535 | $! Look For The Library LIBCRYPTO.OLB. |
| 536 | $! |
| 537 | $ IF (F$SEARCH(CRYPTO_LIB).EQS."") |
| 538 | $ THEN |
| 539 | $! |
| 540 | $! Tell The User We Can't Find The LIBCRYPTO.OLB Library. |
| 541 | $! |
| 542 | $ WRITE SYS$OUTPUT "" |
| 543 | $ WRITE SYS$OUTPUT "Can't Find The Library ",CRYPTO_LIB,"." |
| 544 | $ WRITE SYS$OUTPUT "We Can't Link Without It." |
| 545 | $ WRITE SYS$OUTPUT "" |
| 546 | $! |
| 547 | $! Since We Can't Link Without It, Exit. |
| 548 | $! |
| 549 | $ EXIT |
| 550 | $! |
| 551 | $! End The LIBCRYPTO.OLB Library Check. |
| 552 | $! |
| 553 | $ ENDIF |
| 554 | $! |
Ulf Möller | 7d7d2cb | 1999-05-13 11:37:32 +0000 | [diff] [blame] | 555 | $! Time To Return. |
| 556 | $! |
| 557 | $ RETURN |
| 558 | $! |
| 559 | $! Check The User's Options. |
| 560 | $! |
| 561 | $ CHECK_OPTIONS: |
| 562 | $! |
| 563 | $! Check To See If P1 Is Blank. |
| 564 | $! |
| 565 | $ IF (P1.EQS."ALL") |
| 566 | $ THEN |
| 567 | $! |
| 568 | $! P1 Is Blank, So Build Everything. |
| 569 | $! |
| 570 | $ BUILDALL = "TRUE" |
| 571 | $! |
| 572 | $! Else... |
| 573 | $! |
| 574 | $ ELSE |
| 575 | $! |
Richard Levitte | 537c982 | 2011-03-19 10:58:14 +0000 | [diff] [blame] | 576 | $! Else, Check To See If P1 Has A Valid Argument. |
Ulf Möller | 7d7d2cb | 1999-05-13 11:37:32 +0000 | [diff] [blame] | 577 | $! |
| 578 | $ IF (P1.EQS."LIBRARY").OR.(P1.EQS."SSL_TASK") |
| 579 | $ THEN |
| 580 | $! |
Richard Levitte | 537c982 | 2011-03-19 10:58:14 +0000 | [diff] [blame] | 581 | $! A Valid Argument. |
Ulf Möller | 7d7d2cb | 1999-05-13 11:37:32 +0000 | [diff] [blame] | 582 | $! |
| 583 | $ BUILDALL = P1 |
| 584 | $! |
| 585 | $! Else... |
| 586 | $! |
| 587 | $ ELSE |
| 588 | $! |
| 589 | $! Tell The User We Don't Know What They Want. |
| 590 | $! |
| 591 | $ WRITE SYS$OUTPUT "" |
| 592 | $ WRITE SYS$OUTPUT "The Option ",P1," Is Invalid. The Valid Options Are:" |
| 593 | $ WRITE SYS$OUTPUT "" |
| 594 | $ WRITE SYS$OUTPUT " ALL : Just Build Everything." |
| 595 | $ WRITE SYS$OUTPUT " LIBRARY : To Compile Just The [.xxx.EXE.SSL]LIBSSL.OLB Library." |
| 596 | $ WRITE SYS$OUTPUT " SSL_TASK : To Compile Just The [.xxx.EXE.SSL]SSL_TASK.EXE Program." |
| 597 | $ WRITE SYS$OUTPUT "" |
| 598 | $ WRITE SYS$OUTPUT " Where 'xxx' Stands For:" |
| 599 | $ WRITE SYS$OUTPUT "" |
Richard Levitte | 537c982 | 2011-03-19 10:58:14 +0000 | [diff] [blame] | 600 | $ WRITE SYS$OUTPUT " ALPHA[64]: Alpha Architecture." |
| 601 | $ WRITE SYS$OUTPUT " IA64[64] : IA64 Architecture." |
Richard Levitte | cc8cc9a | 2009-05-15 16:36:56 +0000 | [diff] [blame] | 602 | $ WRITE SYS$OUTPUT " VAX : VAX Architecture." |
Ulf Möller | 7d7d2cb | 1999-05-13 11:37:32 +0000 | [diff] [blame] | 603 | $ WRITE SYS$OUTPUT "" |
| 604 | $! |
| 605 | $! Time To EXIT. |
| 606 | $! |
| 607 | $ EXIT |
| 608 | $! |
Richard Levitte | 537c982 | 2011-03-19 10:58:14 +0000 | [diff] [blame] | 609 | $! End The Valid Argument Check. |
Ulf Möller | 7d7d2cb | 1999-05-13 11:37:32 +0000 | [diff] [blame] | 610 | $! |
| 611 | $ ENDIF |
| 612 | $! |
| 613 | $! End The P1 Check. |
| 614 | $! |
| 615 | $ ENDIF |
| 616 | $! |
| 617 | $! Check To See If P2 Is Blank. |
| 618 | $! |
Richard Levitte | b6d0def | 2002-10-31 16:46:52 +0000 | [diff] [blame] | 619 | $ IF (P2.EQS."NODEBUG") |
Ulf Möller | 7d7d2cb | 1999-05-13 11:37:32 +0000 | [diff] [blame] | 620 | $ THEN |
| 621 | $! |
Richard Levitte | 537c982 | 2011-03-19 10:58:14 +0000 | [diff] [blame] | 622 | $! P2 Is NODEBUG, So Compile Without Debugger Information. |
Ulf Möller | 7d7d2cb | 1999-05-13 11:37:32 +0000 | [diff] [blame] | 623 | $! |
Richard Levitte | 537c982 | 2011-03-19 10:58:14 +0000 | [diff] [blame] | 624 | $ DEBUGGER = "NODEBUG" |
| 625 | $ LINKMAP = "NOMAP" |
| 626 | $ TRACEBACK = "NOTRACEBACK" |
| 627 | $ GCC_OPTIMIZE = "OPTIMIZE" |
| 628 | $ CC_OPTIMIZE = "OPTIMIZE" |
| 629 | $ WRITE SYS$OUTPUT "No Debugger Information Will Be Produced During Compile." |
| 630 | $ WRITE SYS$OUTPUT "Compiling With Compiler Optimization." |
Ulf Möller | 7d7d2cb | 1999-05-13 11:37:32 +0000 | [diff] [blame] | 631 | $! |
| 632 | $! Else... |
| 633 | $! |
| 634 | $ ELSE |
| 635 | $! |
| 636 | $! Check To See If We Are To Compile With Debugger Information. |
| 637 | $! |
Richard Levitte | b6d0def | 2002-10-31 16:46:52 +0000 | [diff] [blame] | 638 | $ IF (P2.EQS."DEBUG") |
Ulf Möller | 7d7d2cb | 1999-05-13 11:37:32 +0000 | [diff] [blame] | 639 | $ THEN |
| 640 | $! |
| 641 | $! Compile With Debugger Information. |
| 642 | $! |
| 643 | $ DEBUGGER = "DEBUG" |
Richard Levitte | 537c982 | 2011-03-19 10:58:14 +0000 | [diff] [blame] | 644 | $ LINKMAP = "MAP" |
Ulf Möller | 7d7d2cb | 1999-05-13 11:37:32 +0000 | [diff] [blame] | 645 | $ TRACEBACK = "TRACEBACK" |
| 646 | $ GCC_OPTIMIZE = "NOOPTIMIZE" |
| 647 | $ CC_OPTIMIZE = "NOOPTIMIZE" |
| 648 | $ WRITE SYS$OUTPUT "Debugger Information Will Be Produced During Compile." |
| 649 | $ WRITE SYS$OUTPUT "Compiling Without Compiler Optimization." |
| 650 | $ ELSE |
| 651 | $! |
Richard Levitte | 537c982 | 2011-03-19 10:58:14 +0000 | [diff] [blame] | 652 | $! Tell The User Entered An Invalid Option. |
Ulf Möller | 7d7d2cb | 1999-05-13 11:37:32 +0000 | [diff] [blame] | 653 | $! |
| 654 | $ WRITE SYS$OUTPUT "" |
Richard Levitte | b6d0def | 2002-10-31 16:46:52 +0000 | [diff] [blame] | 655 | $ WRITE SYS$OUTPUT "The Option ",P2," Is Invalid. The Valid Options Are:" |
Ulf Möller | 7d7d2cb | 1999-05-13 11:37:32 +0000 | [diff] [blame] | 656 | $ WRITE SYS$OUTPUT "" |
| 657 | $ WRITE SYS$OUTPUT " DEBUG : Compile With The Debugger Information." |
| 658 | $ WRITE SYS$OUTPUT " NODEBUG : Compile Without The Debugger Information." |
| 659 | $ WRITE SYS$OUTPUT "" |
| 660 | $! |
| 661 | $! Time To EXIT. |
| 662 | $! |
| 663 | $ EXIT |
| 664 | $! |
Richard Levitte | 537c982 | 2011-03-19 10:58:14 +0000 | [diff] [blame] | 665 | $! End The Valid Argument Check. |
Ulf Möller | 7d7d2cb | 1999-05-13 11:37:32 +0000 | [diff] [blame] | 666 | $! |
| 667 | $ ENDIF |
| 668 | $! |
Richard Levitte | b6d0def | 2002-10-31 16:46:52 +0000 | [diff] [blame] | 669 | $! End The P2 Check. |
Ulf Möller | 7d7d2cb | 1999-05-13 11:37:32 +0000 | [diff] [blame] | 670 | $! |
| 671 | $ ENDIF |
| 672 | $! |
| 673 | $! Special Threads For OpenVMS v7.1 Or Later |
| 674 | $! |
| 675 | $! Written By: Richard Levitte |
| 676 | $! richard@levitte.org |
| 677 | $! |
| 678 | $! |
Richard Levitte | b6d0def | 2002-10-31 16:46:52 +0000 | [diff] [blame] | 679 | $! Check To See If We Have A Option For P5. |
Ulf Möller | 7d7d2cb | 1999-05-13 11:37:32 +0000 | [diff] [blame] | 680 | $! |
Richard Levitte | b6d0def | 2002-10-31 16:46:52 +0000 | [diff] [blame] | 681 | $ IF (P5.EQS."") |
Ulf Möller | 7d7d2cb | 1999-05-13 11:37:32 +0000 | [diff] [blame] | 682 | $ THEN |
| 683 | $! |
| 684 | $! Get The Version Of VMS We Are Using. |
| 685 | $! |
| 686 | $ ISSEVEN := |
| 687 | $ TMP = F$ELEMENT(0,"-",F$EXTRACT(1,4,F$GETSYI("VERSION"))) |
| 688 | $ TMP = F$INTEGER(F$ELEMENT(0,".",TMP)+F$ELEMENT(1,".",TMP)) |
| 689 | $! |
| 690 | $! Check To See If The VMS Version Is v7.1 Or Later. |
| 691 | $! |
| 692 | $ IF (TMP.GE.71) |
| 693 | $ THEN |
| 694 | $! |
| 695 | $! We Have OpenVMS v7.1 Or Later, So Use The Special Threads. |
| 696 | $! |
| 697 | $ ISSEVEN := ,PTHREAD_USE_D4 |
| 698 | $! |
| 699 | $! End The VMS Version Check. |
| 700 | $! |
| 701 | $ ENDIF |
| 702 | $! |
Richard Levitte | b6d0def | 2002-10-31 16:46:52 +0000 | [diff] [blame] | 703 | $! End The P5 Check. |
Ulf Möller | 7d7d2cb | 1999-05-13 11:37:32 +0000 | [diff] [blame] | 704 | $! |
| 705 | $ ENDIF |
| 706 | $! |
Richard Levitte | 537c982 | 2011-03-19 10:58:14 +0000 | [diff] [blame] | 707 | $! Check P6 (POINTER_SIZE). |
Richard Levitte | b7ef916 | 2010-12-14 19:19:04 +0000 | [diff] [blame] | 708 | $! |
Richard Levitte | 537c982 | 2011-03-19 10:58:14 +0000 | [diff] [blame] | 709 | $ IF (P6 .NES. "") .AND. (ARCH .NES. "VAX") |
Richard Levitte | b7ef916 | 2010-12-14 19:19:04 +0000 | [diff] [blame] | 710 | $ THEN |
Richard Levitte | b7ef916 | 2010-12-14 19:19:04 +0000 | [diff] [blame] | 711 | $! |
Richard Levitte | 537c982 | 2011-03-19 10:58:14 +0000 | [diff] [blame] | 712 | $ IF (P6 .EQS. "32") |
Richard Levitte | b7ef916 | 2010-12-14 19:19:04 +0000 | [diff] [blame] | 713 | $ THEN |
Richard Levitte | 3a660e7 | 2011-03-25 16:20:35 +0000 | [diff] [blame] | 714 | $ POINTER_SIZE = " /POINTER_SIZE=32" |
Richard Levitte | b7ef916 | 2010-12-14 19:19:04 +0000 | [diff] [blame] | 715 | $ ELSE |
Richard Levitte | 4ec3e8c | 2011-03-25 09:40:48 +0000 | [diff] [blame] | 716 | $ POINTER_SIZE = F$EDIT( P6, "COLLAPSE, UPCASE") |
| 717 | $ IF ((POINTER_SIZE .EQS. "64") .OR. - |
| 718 | (POINTER_SIZE .EQS. "64=") .OR. - |
| 719 | (POINTER_SIZE .EQS. "64=ARGV")) |
Richard Levitte | b7ef916 | 2010-12-14 19:19:04 +0000 | [diff] [blame] | 720 | $ THEN |
Richard Levitte | 537c982 | 2011-03-19 10:58:14 +0000 | [diff] [blame] | 721 | $ ARCHD = ARCH+ "_64" |
Richard Levitte | b7ef916 | 2010-12-14 19:19:04 +0000 | [diff] [blame] | 722 | $ LIB32 = "" |
Richard Levitte | 3a660e7 | 2011-03-25 16:20:35 +0000 | [diff] [blame] | 723 | $ POINTER_SIZE = " /POINTER_SIZE=64" |
Richard Levitte | b7ef916 | 2010-12-14 19:19:04 +0000 | [diff] [blame] | 724 | $ ELSE |
| 725 | $! |
Richard Levitte | 537c982 | 2011-03-19 10:58:14 +0000 | [diff] [blame] | 726 | $! Tell The User Entered An Invalid Option. |
Richard Levitte | b7ef916 | 2010-12-14 19:19:04 +0000 | [diff] [blame] | 727 | $! |
| 728 | $ WRITE SYS$OUTPUT "" |
Richard Levitte | 537c982 | 2011-03-19 10:58:14 +0000 | [diff] [blame] | 729 | $ WRITE SYS$OUTPUT "The Option ", P6, - |
| 730 | " Is Invalid. The Valid Options Are:" |
Richard Levitte | b7ef916 | 2010-12-14 19:19:04 +0000 | [diff] [blame] | 731 | $ WRITE SYS$OUTPUT "" |
Richard Levitte | 4ec3e8c | 2011-03-25 09:40:48 +0000 | [diff] [blame] | 732 | $ WRITE SYS$OUTPUT - |
| 733 | " """" : Compile with default (short) pointers." |
| 734 | $ WRITE SYS$OUTPUT - |
| 735 | " 32 : Compile with 32-bit (short) pointers." |
| 736 | $ WRITE SYS$OUTPUT - |
| 737 | " 64 : Compile with 64-bit (long) pointers (auto ARGV)." |
| 738 | $ WRITE SYS$OUTPUT - |
| 739 | " 64= : Compile with 64-bit (long) pointers (no ARGV)." |
| 740 | $ WRITE SYS$OUTPUT - |
| 741 | " 64=ARGV : Compile with 64-bit (long) pointers (ARGV)." |
Richard Levitte | b7ef916 | 2010-12-14 19:19:04 +0000 | [diff] [blame] | 742 | $ WRITE SYS$OUTPUT "" |
Richard Levitte | 537c982 | 2011-03-19 10:58:14 +0000 | [diff] [blame] | 743 | $! |
Richard Levitte | b7ef916 | 2010-12-14 19:19:04 +0000 | [diff] [blame] | 744 | $! Time To EXIT. |
| 745 | $! |
Richard Levitte | 537c982 | 2011-03-19 10:58:14 +0000 | [diff] [blame] | 746 | $ EXIT |
Richard Levitte | b7ef916 | 2010-12-14 19:19:04 +0000 | [diff] [blame] | 747 | $! |
| 748 | $ ENDIF |
Richard Levitte | 537c982 | 2011-03-19 10:58:14 +0000 | [diff] [blame] | 749 | $! |
Richard Levitte | b7ef916 | 2010-12-14 19:19:04 +0000 | [diff] [blame] | 750 | $ ENDIF |
| 751 | $! |
Richard Levitte | 537c982 | 2011-03-19 10:58:14 +0000 | [diff] [blame] | 752 | $! End The P6 (POINTER_SIZE) Check. |
Richard Levitte | b7ef916 | 2010-12-14 19:19:04 +0000 | [diff] [blame] | 753 | $! |
| 754 | $ ENDIF |
| 755 | $! |
Richard Levitte | 537c982 | 2011-03-19 10:58:14 +0000 | [diff] [blame] | 756 | $! Set basic C compiler /INCLUDE directories. |
| 757 | $! |
| 758 | $ CC_INCLUDES = "SYS$DISK:[-.CRYPTO],SYS$DISK:[-]" |
| 759 | $! |
Richard Levitte | b6d0def | 2002-10-31 16:46:52 +0000 | [diff] [blame] | 760 | $! Check To See If P3 Is Blank. |
Ulf Möller | 7d7d2cb | 1999-05-13 11:37:32 +0000 | [diff] [blame] | 761 | $! |
Richard Levitte | b6d0def | 2002-10-31 16:46:52 +0000 | [diff] [blame] | 762 | $ IF (P3.EQS."") |
Ulf Möller | 7d7d2cb | 1999-05-13 11:37:32 +0000 | [diff] [blame] | 763 | $ THEN |
| 764 | $! |
| 765 | $! O.K., The User Didn't Specify A Compiler, Let's Try To |
| 766 | $! Find Out Which One To Use. |
| 767 | $! |
| 768 | $! Check To See If We Have GNU C. |
| 769 | $! |
| 770 | $ IF (F$TRNLNM("GNU_CC").NES."") |
| 771 | $ THEN |
| 772 | $! |
| 773 | $! Looks Like GNUC, Set To Use GNUC. |
| 774 | $! |
Richard Levitte | b6d0def | 2002-10-31 16:46:52 +0000 | [diff] [blame] | 775 | $ P3 = "GNUC" |
Ulf Möller | 7d7d2cb | 1999-05-13 11:37:32 +0000 | [diff] [blame] | 776 | $! |
| 777 | $! End The GNU C Compiler Check. |
| 778 | $! |
| 779 | $ ELSE |
| 780 | $! |
| 781 | $! Check To See If We Have VAXC Or DECC. |
| 782 | $! |
Richard Levitte | cc8cc9a | 2009-05-15 16:36:56 +0000 | [diff] [blame] | 783 | $ IF (ARCH.NES."VAX").OR.(F$TRNLNM("DECC$CC_DEFAULT").NES."") |
Ulf Möller | 7d7d2cb | 1999-05-13 11:37:32 +0000 | [diff] [blame] | 784 | $ THEN |
| 785 | $! |
| 786 | $! Looks Like DECC, Set To Use DECC. |
| 787 | $! |
Richard Levitte | b6d0def | 2002-10-31 16:46:52 +0000 | [diff] [blame] | 788 | $ P3 = "DECC" |
Ulf Möller | 7d7d2cb | 1999-05-13 11:37:32 +0000 | [diff] [blame] | 789 | $! |
| 790 | $! Else... |
| 791 | $! |
| 792 | $ ELSE |
| 793 | $! |
| 794 | $! Looks Like VAXC, Set To Use VAXC. |
| 795 | $! |
Richard Levitte | b6d0def | 2002-10-31 16:46:52 +0000 | [diff] [blame] | 796 | $ P3 = "VAXC" |
Ulf Möller | 7d7d2cb | 1999-05-13 11:37:32 +0000 | [diff] [blame] | 797 | $! |
| 798 | $! End The VAXC Compiler Check. |
| 799 | $! |
| 800 | $ ENDIF |
| 801 | $! |
| 802 | $! End The DECC & VAXC Compiler Check. |
| 803 | $! |
| 804 | $ ENDIF |
| 805 | $! |
| 806 | $! End The Compiler Check. |
| 807 | $! |
| 808 | $ ENDIF |
| 809 | $! |
Richard Levitte | b6d0def | 2002-10-31 16:46:52 +0000 | [diff] [blame] | 810 | $! Check To See If We Have A Option For P4. |
Ulf Möller | 7d7d2cb | 1999-05-13 11:37:32 +0000 | [diff] [blame] | 811 | $! |
Richard Levitte | b6d0def | 2002-10-31 16:46:52 +0000 | [diff] [blame] | 812 | $ IF (P4.EQS."") |
Ulf Möller | 7d7d2cb | 1999-05-13 11:37:32 +0000 | [diff] [blame] | 813 | $ THEN |
| 814 | $! |
| 815 | $! Find out what socket library we have available |
| 816 | $! |
| 817 | $ IF F$PARSE("SOCKETSHR:") .NES. "" |
| 818 | $ THEN |
| 819 | $! |
| 820 | $! We have SOCKETSHR, and it is my opinion that it's the best to use. |
| 821 | $! |
Richard Levitte | b6d0def | 2002-10-31 16:46:52 +0000 | [diff] [blame] | 822 | $ P4 = "SOCKETSHR" |
Ulf Möller | 7d7d2cb | 1999-05-13 11:37:32 +0000 | [diff] [blame] | 823 | $! |
| 824 | $! Tell the user |
| 825 | $! |
| 826 | $ WRITE SYS$OUTPUT "Using SOCKETSHR for TCP/IP" |
| 827 | $! |
| 828 | $! Else, let's look for something else |
| 829 | $! |
| 830 | $ ELSE |
| 831 | $! |
| 832 | $! Like UCX (the reason to do this before Multinet is that the UCX |
| 833 | $! emulation is easier to use...) |
| 834 | $! |
| 835 | $ IF F$TRNLNM("UCX$IPC_SHR") .NES. "" - |
| 836 | .OR. F$PARSE("SYS$SHARE:UCX$IPC_SHR.EXE") .NES. "" - |
| 837 | .OR. F$PARSE("SYS$LIBRARY:UCX$IPC.OLB") .NES. "" |
| 838 | $ THEN |
| 839 | $! |
| 840 | $! Last resort: a UCX or UCX-compatible library |
| 841 | $! |
Richard Levitte | b6d0def | 2002-10-31 16:46:52 +0000 | [diff] [blame] | 842 | $ P4 = "UCX" |
Ulf Möller | 7d7d2cb | 1999-05-13 11:37:32 +0000 | [diff] [blame] | 843 | $! |
| 844 | $! Tell the user |
| 845 | $! |
| 846 | $ WRITE SYS$OUTPUT "Using UCX or an emulation thereof for TCP/IP" |
| 847 | $! |
| 848 | $! That was all... |
| 849 | $! |
| 850 | $ ENDIF |
| 851 | $ ENDIF |
| 852 | $ ENDIF |
| 853 | $! |
| 854 | $! Set Up Initial CC Definitions, Possibly With User Ones |
| 855 | $! |
Richard Levitte | b6d0def | 2002-10-31 16:46:52 +0000 | [diff] [blame] | 856 | $ CCDEFS = "TCPIP_TYPE_''P4'" |
Ulf Möller | 7d7d2cb | 1999-05-13 11:37:32 +0000 | [diff] [blame] | 857 | $ IF F$TYPE(USER_CCDEFS) .NES. "" THEN CCDEFS = CCDEFS + "," + USER_CCDEFS |
| 858 | $ CCEXTRAFLAGS = "" |
| 859 | $ IF F$TYPE(USER_CCFLAGS) .NES. "" THEN CCEXTRAFLAGS = USER_CCFLAGS |
Richard Levitte | 4ec3e8c | 2011-03-25 09:40:48 +0000 | [diff] [blame] | 860 | $ CCDISABLEWARNINGS = "" !!! "LONGLONGTYPE,LONGLONGSUFX,FOUNDCR" |
Ulf Möller | 7d7d2cb | 1999-05-13 11:37:32 +0000 | [diff] [blame] | 861 | $ IF F$TYPE(USER_CCDISABLEWARNINGS) .NES. "" THEN - |
Richard Levitte | cde28e1 | 2000-02-27 10:41:31 +0000 | [diff] [blame] | 862 | CCDISABLEWARNINGS = CCDISABLEWARNINGS + "," + USER_CCDISABLEWARNINGS |
Ulf Möller | 7d7d2cb | 1999-05-13 11:37:32 +0000 | [diff] [blame] | 863 | $! |
Richard Levitte | 537c982 | 2011-03-19 10:58:14 +0000 | [diff] [blame] | 864 | $! Check To See If We Have A ZLIB Option. |
| 865 | $! |
| 866 | $ ZLIB = P7 |
| 867 | $ IF (ZLIB .NES. "") |
| 868 | $ THEN |
| 869 | $! |
| 870 | $! Check for expected ZLIB files. |
| 871 | $! |
| 872 | $ err = 0 |
| 873 | $ file1 = f$parse( "zlib.h", ZLIB, , , "SYNTAX_ONLY") |
| 874 | $ if (f$search( file1) .eqs. "") |
| 875 | $ then |
| 876 | $ WRITE SYS$OUTPUT "" |
| 877 | $ WRITE SYS$OUTPUT "The Option ", ZLIB, " Is Invalid." |
| 878 | $ WRITE SYS$OUTPUT " Can't find header: ''file1'" |
| 879 | $ err = 1 |
| 880 | $ endif |
| 881 | $ file1 = f$parse( "A.;", ZLIB)- "A.;" |
| 882 | $! |
| 883 | $ file2 = f$parse( ZLIB, "libz.olb", , , "SYNTAX_ONLY") |
| 884 | $ if (f$search( file2) .eqs. "") |
| 885 | $ then |
| 886 | $ if (err .eq. 0) |
| 887 | $ then |
| 888 | $ WRITE SYS$OUTPUT "" |
| 889 | $ WRITE SYS$OUTPUT "The Option ", ZLIB, " Is Invalid." |
| 890 | $ endif |
| 891 | $ WRITE SYS$OUTPUT " Can't find library: ''file2'" |
| 892 | $ WRITE SYS$OUTPUT "" |
| 893 | $ err = err+ 2 |
| 894 | $ endif |
| 895 | $ if (err .eq. 1) |
| 896 | $ then |
| 897 | $ WRITE SYS$OUTPUT "" |
| 898 | $ endif |
| 899 | $! |
| 900 | $ if (err .ne. 0) |
| 901 | $ then |
| 902 | $ EXIT |
| 903 | $ endif |
| 904 | $! |
| 905 | $ CCDEFS = """ZLIB=1"", "+ CCDEFS |
| 906 | $ CC_INCLUDES = CC_INCLUDES+ ", "+ file1 |
| 907 | $ ZLIB_LIB = ", ''file2' /library" |
| 908 | $! |
| 909 | $! Print info |
| 910 | $! |
| 911 | $ WRITE SYS$OUTPUT "ZLIB library spec: ", file2 |
| 912 | $! |
| 913 | $! End The ZLIB Check. |
| 914 | $! |
| 915 | $ ENDIF |
| 916 | $! |
| 917 | $! Check To See If The User Entered A Valid Parameter. |
Ulf Möller | 7d7d2cb | 1999-05-13 11:37:32 +0000 | [diff] [blame] | 918 | $! |
Richard Levitte | b6d0def | 2002-10-31 16:46:52 +0000 | [diff] [blame] | 919 | $ IF (P3.EQS."VAXC").OR.(P3.EQS."DECC").OR.(P3.EQS."GNUC") |
Ulf Möller | 7d7d2cb | 1999-05-13 11:37:32 +0000 | [diff] [blame] | 920 | $ THEN |
| 921 | $! |
| 922 | $! Check To See If The User Wanted DECC. |
| 923 | $! |
Richard Levitte | b6d0def | 2002-10-31 16:46:52 +0000 | [diff] [blame] | 924 | $ IF (P3.EQS."DECC") |
Ulf Möller | 7d7d2cb | 1999-05-13 11:37:32 +0000 | [diff] [blame] | 925 | $ THEN |
| 926 | $! |
| 927 | $! Looks Like DECC, Set To Use DECC. |
| 928 | $! |
| 929 | $ COMPILER = "DECC" |
| 930 | $! |
| 931 | $! Tell The User We Are Using DECC. |
| 932 | $! |
| 933 | $ WRITE SYS$OUTPUT "Using DECC 'C' Compiler." |
| 934 | $! |
| 935 | $! Use DECC... |
| 936 | $! |
| 937 | $ CC = "CC" |
| 938 | $ IF ARCH.EQS."VAX" .AND. F$TRNLNM("DECC$CC_DEFAULT").NES."/DECC" - |
| 939 | THEN CC = "CC/DECC" |
Richard Levitte | 3a660e7 | 2011-03-25 16:20:35 +0000 | [diff] [blame] | 940 | $ CC = CC + " /''CC_OPTIMIZE' /''DEBUGGER' /STANDARD=RELAXED"+ - |
Richard Levitte | 4ec3e8c | 2011-03-25 09:40:48 +0000 | [diff] [blame] | 941 | "''POINTER_SIZE' /NOLIST /PREFIX=ALL" + - |
Richard Levitte | 3a660e7 | 2011-03-25 16:20:35 +0000 | [diff] [blame] | 942 | " /INCLUDE=(''CC_INCLUDES') " + CCEXTRAFLAGS |
Ulf Möller | 7d7d2cb | 1999-05-13 11:37:32 +0000 | [diff] [blame] | 943 | $! |
| 944 | $! Define The Linker Options File Name. |
| 945 | $! |
Richard Levitte | 537c982 | 2011-03-19 10:58:14 +0000 | [diff] [blame] | 946 | $ OPT_FILE = "VAX_DECC_OPTIONS.OPT" |
Ulf Möller | 7d7d2cb | 1999-05-13 11:37:32 +0000 | [diff] [blame] | 947 | $! |
| 948 | $! End DECC Check. |
| 949 | $! |
| 950 | $ ENDIF |
| 951 | $! |
| 952 | $! Check To See If We Are To Use VAXC. |
| 953 | $! |
Richard Levitte | b6d0def | 2002-10-31 16:46:52 +0000 | [diff] [blame] | 954 | $ IF (P3.EQS."VAXC") |
Ulf Möller | 7d7d2cb | 1999-05-13 11:37:32 +0000 | [diff] [blame] | 955 | $ THEN |
| 956 | $! |
| 957 | $! Looks Like VAXC, Set To Use VAXC. |
| 958 | $! |
| 959 | $ COMPILER = "VAXC" |
| 960 | $! |
| 961 | $! Tell The User We Are Using VAX C. |
| 962 | $! |
| 963 | $ WRITE SYS$OUTPUT "Using VAXC 'C' Compiler." |
| 964 | $! |
| 965 | $! Compile Using VAXC. |
| 966 | $! |
| 967 | $ CC = "CC" |
Richard Levitte | cc8cc9a | 2009-05-15 16:36:56 +0000 | [diff] [blame] | 968 | $ IF ARCH.NES."VAX" |
Ulf Möller | 7d7d2cb | 1999-05-13 11:37:32 +0000 | [diff] [blame] | 969 | $ THEN |
Richard Levitte | cc8cc9a | 2009-05-15 16:36:56 +0000 | [diff] [blame] | 970 | $ WRITE SYS$OUTPUT "There is no VAX C on ''ARCH'!" |
Ulf Möller | 7d7d2cb | 1999-05-13 11:37:32 +0000 | [diff] [blame] | 971 | $ EXIT |
| 972 | $ ENDIF |
| 973 | $ IF F$TRNLNM("DECC$CC_DEFAULT").EQS."/DECC" THEN CC = "CC/VAXC" |
| 974 | $ CC = CC + "/''CC_OPTIMIZE'/''DEBUGGER'/NOLIST" + - |
Richard Levitte | 537c982 | 2011-03-19 10:58:14 +0000 | [diff] [blame] | 975 | "/INCLUDE=(''CC_INCLUDES')" + CCEXTRAFLAGS |
Ulf Möller | 7d7d2cb | 1999-05-13 11:37:32 +0000 | [diff] [blame] | 976 | $ CCDEFS = CCDEFS + ",""VAXC""" |
| 977 | $! |
| 978 | $! Define <sys> As SYS$COMMON:[SYSLIB] |
| 979 | $! |
| 980 | $ DEFINE/NOLOG SYS SYS$COMMON:[SYSLIB] |
| 981 | $! |
| 982 | $! Define The Linker Options File Name. |
| 983 | $! |
Richard Levitte | 537c982 | 2011-03-19 10:58:14 +0000 | [diff] [blame] | 984 | $ OPT_FILE = "VAX_VAXC_OPTIONS.OPT" |
Ulf Möller | 7d7d2cb | 1999-05-13 11:37:32 +0000 | [diff] [blame] | 985 | $! |
| 986 | $! End VAXC Check |
| 987 | $! |
| 988 | $ ENDIF |
| 989 | $! |
| 990 | $! Check To See If We Are To Use GNU C. |
| 991 | $! |
Richard Levitte | b6d0def | 2002-10-31 16:46:52 +0000 | [diff] [blame] | 992 | $ IF (P3.EQS."GNUC") |
Ulf Möller | 7d7d2cb | 1999-05-13 11:37:32 +0000 | [diff] [blame] | 993 | $ THEN |
| 994 | $! |
| 995 | $! Looks Like GNUC, Set To Use GNUC. |
| 996 | $! |
| 997 | $ COMPILER = "GNUC" |
| 998 | $! |
| 999 | $! Tell The User We Are Using GNUC. |
| 1000 | $! |
| 1001 | $ WRITE SYS$OUTPUT "Using GNU 'C' Compiler." |
| 1002 | $! |
| 1003 | $! Use GNU C... |
| 1004 | $! |
Ulf Möller | 8c197cc | 1999-07-28 23:25:59 +0000 | [diff] [blame] | 1005 | $ IF F$TYPE(GCC) .EQS. "" THEN GCC := GCC |
| 1006 | $ CC = GCC+"/NOCASE_HACK/''GCC_OPTIMIZE'/''DEBUGGER'/NOLIST" + - |
Richard Levitte | 537c982 | 2011-03-19 10:58:14 +0000 | [diff] [blame] | 1007 | "/INCLUDE=(''CC_INCLUDES')" + CCEXTRAFLAGS |
Ulf Möller | 7d7d2cb | 1999-05-13 11:37:32 +0000 | [diff] [blame] | 1008 | $! |
| 1009 | $! Define The Linker Options File Name. |
| 1010 | $! |
Richard Levitte | 537c982 | 2011-03-19 10:58:14 +0000 | [diff] [blame] | 1011 | $ OPT_FILE = "VAX_GNUC_OPTIONS.OPT" |
Ulf Möller | 7d7d2cb | 1999-05-13 11:37:32 +0000 | [diff] [blame] | 1012 | $! |
| 1013 | $! End The GNU C Check. |
| 1014 | $! |
| 1015 | $ ENDIF |
| 1016 | $! |
| 1017 | $! Set up default defines |
| 1018 | $! |
| 1019 | $ CCDEFS = """FLAT_INC=1""," + CCDEFS |
| 1020 | $! |
Ulf Möller | 7d7d2cb | 1999-05-13 11:37:32 +0000 | [diff] [blame] | 1021 | $! Finish up the definition of CC. |
| 1022 | $! |
| 1023 | $ IF COMPILER .EQS. "DECC" |
| 1024 | $ THEN |
| 1025 | $ IF CCDISABLEWARNINGS .EQS. "" |
| 1026 | $ THEN |
| 1027 | $ CC4DISABLEWARNINGS = "DOLLARID" |
| 1028 | $ ELSE |
| 1029 | $ CC4DISABLEWARNINGS = CCDISABLEWARNINGS + ",DOLLARID" |
Richard Levitte | 3a660e7 | 2011-03-25 16:20:35 +0000 | [diff] [blame] | 1030 | $ CCDISABLEWARNINGS = " /WARNING=(DISABLE=(" + CCDISABLEWARNINGS + "))" |
Ulf Möller | 7d7d2cb | 1999-05-13 11:37:32 +0000 | [diff] [blame] | 1031 | $ ENDIF |
Richard Levitte | 3a660e7 | 2011-03-25 16:20:35 +0000 | [diff] [blame] | 1032 | $ CC4DISABLEWARNINGS = " /WARNING=(DISABLE=(" + CC4DISABLEWARNINGS + "))" |
Ulf Möller | 7d7d2cb | 1999-05-13 11:37:32 +0000 | [diff] [blame] | 1033 | $ ELSE |
| 1034 | $ CCDISABLEWARNINGS = "" |
| 1035 | $ CC4DISABLEWARNINGS = "" |
| 1036 | $ ENDIF |
Richard Levitte | 3a660e7 | 2011-03-25 16:20:35 +0000 | [diff] [blame] | 1037 | $ CC2 = CC + " /DEFINE=(" + CCDEFS + ",_POSIX_C_SOURCE)" + CCDISABLEWARNINGS |
| 1038 | $ CC3 = CC + " /DEFINE=(" + CCDEFS + ISSEVEN + ")" + CCDISABLEWARNINGS |
| 1039 | $ CC = CC + " /DEFINE=(" + CCDEFS + ")" + CCDISABLEWARNINGS |
Ulf Möller | 7d7d2cb | 1999-05-13 11:37:32 +0000 | [diff] [blame] | 1040 | $ IF COMPILER .EQS. "DECC" |
| 1041 | $ THEN |
| 1042 | $ CC4 = CC - CCDISABLEWARNINGS + CC4DISABLEWARNINGS |
| 1043 | $ CC5 = CC3 - CCDISABLEWARNINGS + CC4DISABLEWARNINGS |
| 1044 | $ ELSE |
| 1045 | $ CC4 = CC |
| 1046 | $ CC5 = CC3 |
| 1047 | $ ENDIF |
| 1048 | $! |
| 1049 | $! Show user the result |
| 1050 | $! |
Richard Levitte | 265e892 | 2002-08-15 08:28:38 +0000 | [diff] [blame] | 1051 | $ WRITE/SYMBOL SYS$OUTPUT "Main Compiling Command: ",CC |
Ulf Möller | 7d7d2cb | 1999-05-13 11:37:32 +0000 | [diff] [blame] | 1052 | $! |
Richard Levitte | 537c982 | 2011-03-19 10:58:14 +0000 | [diff] [blame] | 1053 | $! Else The User Entered An Invalid Argument. |
Ulf Möller | 7d7d2cb | 1999-05-13 11:37:32 +0000 | [diff] [blame] | 1054 | $! |
| 1055 | $ ELSE |
| 1056 | $! |
| 1057 | $! Tell The User We Don't Know What They Want. |
| 1058 | $! |
| 1059 | $ WRITE SYS$OUTPUT "" |
Richard Levitte | b6d0def | 2002-10-31 16:46:52 +0000 | [diff] [blame] | 1060 | $ WRITE SYS$OUTPUT "The Option ",P3," Is Invalid. The Valid Options Are:" |
Ulf Möller | 7d7d2cb | 1999-05-13 11:37:32 +0000 | [diff] [blame] | 1061 | $ WRITE SYS$OUTPUT "" |
| 1062 | $ WRITE SYS$OUTPUT " VAXC : To Compile With VAX C." |
| 1063 | $ WRITE SYS$OUTPUT " DECC : To Compile With DEC C." |
| 1064 | $ WRITE SYS$OUTPUT " GNUC : To Compile With GNU C." |
| 1065 | $ WRITE SYS$OUTPUT "" |
| 1066 | $! |
| 1067 | $! Time To EXIT. |
| 1068 | $! |
| 1069 | $ EXIT |
| 1070 | $ ENDIF |
| 1071 | $! |
| 1072 | $! Time to check the contents, and to make sure we get the correct library. |
| 1073 | $! |
Richard Levitte | b6d0def | 2002-10-31 16:46:52 +0000 | [diff] [blame] | 1074 | $ IF P4.EQS."SOCKETSHR" .OR. P4.EQS."MULTINET" .OR. P4.EQS."UCX" - |
| 1075 | .OR. P4.EQS."TCPIP" .OR. P4.EQS."NONE" |
Ulf Möller | 7d7d2cb | 1999-05-13 11:37:32 +0000 | [diff] [blame] | 1076 | $ THEN |
| 1077 | $! |
| 1078 | $! Check to see if SOCKETSHR was chosen |
| 1079 | $! |
Richard Levitte | b6d0def | 2002-10-31 16:46:52 +0000 | [diff] [blame] | 1080 | $ IF P4.EQS."SOCKETSHR" |
Ulf Möller | 7d7d2cb | 1999-05-13 11:37:32 +0000 | [diff] [blame] | 1081 | $ THEN |
| 1082 | $! |
| 1083 | $! Set the library to use SOCKETSHR |
| 1084 | $! |
Richard Levitte | 537c982 | 2011-03-19 10:58:14 +0000 | [diff] [blame] | 1085 | $ TCPIP_LIB = ",SYS$DISK:[-.VMS]SOCKETSHR_SHR.OPT /OPTIONS" |
Ulf Möller | 7d7d2cb | 1999-05-13 11:37:32 +0000 | [diff] [blame] | 1086 | $! |
| 1087 | $! Done with SOCKETSHR |
| 1088 | $! |
| 1089 | $ ENDIF |
| 1090 | $! |
| 1091 | $! Check to see if MULTINET was chosen |
| 1092 | $! |
Richard Levitte | b6d0def | 2002-10-31 16:46:52 +0000 | [diff] [blame] | 1093 | $ IF P4.EQS."MULTINET" |
Ulf Möller | 7d7d2cb | 1999-05-13 11:37:32 +0000 | [diff] [blame] | 1094 | $ THEN |
| 1095 | $! |
| 1096 | $! Set the library to use UCX emulation. |
| 1097 | $! |
Richard Levitte | b6d0def | 2002-10-31 16:46:52 +0000 | [diff] [blame] | 1098 | $ P4 = "UCX" |
Ulf Möller | 7d7d2cb | 1999-05-13 11:37:32 +0000 | [diff] [blame] | 1099 | $! |
| 1100 | $! Done with MULTINET |
| 1101 | $! |
| 1102 | $ ENDIF |
| 1103 | $! |
| 1104 | $! Check to see if UCX was chosen |
| 1105 | $! |
Richard Levitte | b6d0def | 2002-10-31 16:46:52 +0000 | [diff] [blame] | 1106 | $ IF P4.EQS."UCX" |
Ulf Möller | 7d7d2cb | 1999-05-13 11:37:32 +0000 | [diff] [blame] | 1107 | $ THEN |
| 1108 | $! |
| 1109 | $! Set the library to use UCX. |
| 1110 | $! |
Richard Levitte | 537c982 | 2011-03-19 10:58:14 +0000 | [diff] [blame] | 1111 | $ TCPIP_LIB = ",SYS$DISK:[-.VMS]UCX_SHR_DECC.OPT /OPTIONS" |
Ulf Möller | 7d7d2cb | 1999-05-13 11:37:32 +0000 | [diff] [blame] | 1112 | $ IF F$TRNLNM("UCX$IPC_SHR") .NES. "" |
| 1113 | $ THEN |
Richard Levitte | 537c982 | 2011-03-19 10:58:14 +0000 | [diff] [blame] | 1114 | $ TCPIP_LIB = ",SYS$DISK:[-.VMS]UCX_SHR_DECC_LOG.OPT /OPTIONS" |
Ulf Möller | 7d7d2cb | 1999-05-13 11:37:32 +0000 | [diff] [blame] | 1115 | $ ELSE |
| 1116 | $ IF COMPILER .NES. "DECC" .AND. ARCH .EQS. "VAX" THEN - |
Richard Levitte | 537c982 | 2011-03-19 10:58:14 +0000 | [diff] [blame] | 1117 | TCPIP_LIB = ",SYS$DISK:[-.VMS]UCX_SHR_VAXC.OPT /OPTIONS" |
Ulf Möller | 7d7d2cb | 1999-05-13 11:37:32 +0000 | [diff] [blame] | 1118 | $ ENDIF |
| 1119 | $! |
| 1120 | $! Done with UCX |
| 1121 | $! |
| 1122 | $ ENDIF |
| 1123 | $! |
Richard Levitte | b935754 | 2002-05-22 11:37:20 +0000 | [diff] [blame] | 1124 | $! Check to see if TCPIP was chosen |
| 1125 | $! |
Richard Levitte | b6d0def | 2002-10-31 16:46:52 +0000 | [diff] [blame] | 1126 | $ IF P4.EQS."TCPIP" |
Richard Levitte | b935754 | 2002-05-22 11:37:20 +0000 | [diff] [blame] | 1127 | $ THEN |
| 1128 | $! |
| 1129 | $! Set the library to use TCPIP (post UCX). |
| 1130 | $! |
Richard Levitte | 537c982 | 2011-03-19 10:58:14 +0000 | [diff] [blame] | 1131 | $ TCPIP_LIB = ",SYS$DISK:[-.VMS]TCPIP_SHR_DECC.OPT /OPTIONS" |
Richard Levitte | b935754 | 2002-05-22 11:37:20 +0000 | [diff] [blame] | 1132 | $! |
| 1133 | $! Done with TCPIP |
| 1134 | $! |
| 1135 | $ ENDIF |
| 1136 | $! |
| 1137 | $! Check to see if NONE was chosen |
| 1138 | $! |
Richard Levitte | b6d0def | 2002-10-31 16:46:52 +0000 | [diff] [blame] | 1139 | $ IF P4.EQS."NONE" |
Richard Levitte | b935754 | 2002-05-22 11:37:20 +0000 | [diff] [blame] | 1140 | $ THEN |
| 1141 | $! |
| 1142 | $! Do not use a TCPIP library. |
| 1143 | $! |
| 1144 | $ TCPIP_LIB = "" |
| 1145 | $! |
| 1146 | $! Done with NONE |
| 1147 | $! |
| 1148 | $ ENDIF |
| 1149 | $! |
Ulf Möller | 7d7d2cb | 1999-05-13 11:37:32 +0000 | [diff] [blame] | 1150 | $! Print info |
| 1151 | $! |
Richard Levitte | 537c982 | 2011-03-19 10:58:14 +0000 | [diff] [blame] | 1152 | $ WRITE SYS$OUTPUT "TCP/IP library spec: ", TCPIP_LIB- "," |
Ulf Möller | 7d7d2cb | 1999-05-13 11:37:32 +0000 | [diff] [blame] | 1153 | $! |
Richard Levitte | 537c982 | 2011-03-19 10:58:14 +0000 | [diff] [blame] | 1154 | $! Else The User Entered An Invalid Argument. |
Ulf Möller | 7d7d2cb | 1999-05-13 11:37:32 +0000 | [diff] [blame] | 1155 | $! |
| 1156 | $ ELSE |
| 1157 | $! |
| 1158 | $! Tell The User We Don't Know What They Want. |
| 1159 | $! |
| 1160 | $ WRITE SYS$OUTPUT "" |
Richard Levitte | b6d0def | 2002-10-31 16:46:52 +0000 | [diff] [blame] | 1161 | $ WRITE SYS$OUTPUT "The Option ",P4," Is Invalid. The Valid Options Are:" |
Ulf Möller | 7d7d2cb | 1999-05-13 11:37:32 +0000 | [diff] [blame] | 1162 | $ WRITE SYS$OUTPUT "" |
| 1163 | $ WRITE SYS$OUTPUT " SOCKETSHR : To link with SOCKETSHR TCP/IP library." |
| 1164 | $ WRITE SYS$OUTPUT " UCX : To link with UCX TCP/IP library." |
Richard Levitte | b935754 | 2002-05-22 11:37:20 +0000 | [diff] [blame] | 1165 | $ WRITE SYS$OUTPUT " TCPIP : To link with TCPIP (post UCX) TCP/IP library." |
Ulf Möller | 7d7d2cb | 1999-05-13 11:37:32 +0000 | [diff] [blame] | 1166 | $ WRITE SYS$OUTPUT "" |
| 1167 | $! |
| 1168 | $! Time To EXIT. |
| 1169 | $! |
| 1170 | $ EXIT |
| 1171 | $! |
| 1172 | $! Done with TCP/IP libraries |
| 1173 | $! |
| 1174 | $ ENDIF |
| 1175 | $! |
| 1176 | $! Time To RETURN... |
| 1177 | $! |
| 1178 | $ RETURN |
| 1179 | $! |
| 1180 | $ INITIALISE: |
| 1181 | $! |
| 1182 | $! Save old value of the logical name OPENSSL |
| 1183 | $! |
| 1184 | $ __SAVE_OPENSSL = F$TRNLNM("OPENSSL","LNM$PROCESS_TABLE") |
| 1185 | $! |
| 1186 | $! Save directory information |
| 1187 | $! |
| 1188 | $ __HERE = F$PARSE(F$PARSE("A.;",F$ENVIRONMENT("PROCEDURE"))-"A.;","[]A.;") - "A.;" |
Richard Levitte | 7b5ffd6 | 2001-10-29 13:05:28 +0000 | [diff] [blame] | 1189 | $ __HERE = F$EDIT(__HERE,"UPCASE") |
Ulf Möller | 7d7d2cb | 1999-05-13 11:37:32 +0000 | [diff] [blame] | 1190 | $ __TOP = __HERE - "SSL]" |
| 1191 | $ __INCLUDE = __TOP + "INCLUDE.OPENSSL]" |
| 1192 | $! |
| 1193 | $! Set up the logical name OPENSSL to point at the include directory |
| 1194 | $! |
| 1195 | $ DEFINE OPENSSL/NOLOG '__INCLUDE' |
| 1196 | $! |
| 1197 | $! Done |
| 1198 | $! |
| 1199 | $ RETURN |
| 1200 | $! |
| 1201 | $ CLEANUP: |
| 1202 | $! |
| 1203 | $! Restore the logical name OPENSSL if it had a value |
| 1204 | $! |
| 1205 | $ IF __SAVE_OPENSSL .EQS. "" |
| 1206 | $ THEN |
| 1207 | $ DEASSIGN OPENSSL |
| 1208 | $ ELSE |
| 1209 | $ DEFINE/NOLOG OPENSSL '__SAVE_OPENSSL' |
| 1210 | $ ENDIF |
| 1211 | $! |
| 1212 | $! Done |
| 1213 | $! |
| 1214 | $ RETURN |