ssl-lib.com 27 KB

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