ssl-lib.com 26 KB

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