ssl-lib.com 26 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214
  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. $! ("64=ARGV" gives more efficient code with HP C V7.3 or newer.)
  47. $! Supported values are:
  48. $!
  49. $! "" Compile with default (/NOPOINTER_SIZE)
  50. $! 32 Compile with /POINTER_SIZE=32 (SHORT)
  51. $! 64 Compile with /POINTER_SIZE=64[=ARGV] (LONG[=ARGV])
  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).
  55. $!
  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")
  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 = ""
  71. $ ZLIB_LIB = ""
  72. $!
  73. $! Check What Architecture We Are Using.
  74. $!
  75. $ IF (F$GETSYI("CPU").LT.128)
  76. $ THEN
  77. $!
  78. $! The Architecture Is VAX.
  79. $!
  80. $ ARCH = "VAX"
  81. $!
  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. $!
  91. $! End The Architecture Check.
  92. $!
  93. $ ENDIF
  94. $!
  95. $ ARCHD = ARCH
  96. $ LIB32 = "32"
  97. $ OPT_FILE = ""
  98. $ POINTER_SIZE = ""
  99. $!
  100. $! Check To Make Sure We Have Valid Command Line Parameters.
  101. $!
  102. $ GOSUB CHECK_OPTIONS
  103. $!
  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. $!
  123. $! Initialise logical names and such
  124. $!
  125. $ GOSUB INITIALISE
  126. $!
  127. $! Tell The User What Kind of Machine We Run On.
  128. $!
  129. $ WRITE SYS$OUTPUT "Host system architecture: ''ARCHD'"
  130. $!
  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. $!
  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. $!
  159. $ SSL_LIB := 'EXE_DIR'SSL_LIBSSL'LIB32'.OLB
  160. $!
  161. $! Define The CRYPTO-LIB We Are To Use.
  162. $!
  163. $ CRYPTO_LIB := SYS$DISK:[-.'ARCHD'.EXE.CRYPTO]SSL_LIBCRYPTO'LIB32'.OLB
  164. $!
  165. $! Set up exceptional compilations.
  166. $!
  167. $ CC5_SHOWN = 0
  168. $!
  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. $!
  201. $! Check To See If We Already Have A "[.xxx.EXE.SSL]SSL_LIBSSL''LIB32'.OLB" Library...
  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,"+ -
  220. "d1_meth,d1_srvr,d1_clnt,d1_lib,d1_pkt,"+ -
  221. "d1_both,d1_enc,"+ -
  222. "ssl_lib,ssl_err2,ssl_cert,ssl_sess,"+ -
  223. "ssl_ciph,ssl_stat,ssl_rsa,"+ -
  224. "ssl_asn1,ssl_txt,ssl_algs,"+ -
  225. "bio_ssl,ssl_err,kssl,tls_srp,t1_reneg"
  226. $!
  227. $ COMPILEWITH_CC5 = ""
  228. $!
  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. $!
  342. $ COMPILEWITH_CC5 = "" !!! ",ssl_task,"
  343. $!
  344. $! Tell The User We Are Creating The SSL_TASK.
  345. $!
  346. $! Tell The User We Are Creating The SSL_TASK.
  347. $!
  348. $ WRITE SYS$OUTPUT "Creating SSL_TASK OSU HTTP SSL Engine."
  349. $!
  350. $! Tell The User What File We Are Compiling.
  351. $!
  352. $ FILE_NAME = "ssl_task"
  353. $ WRITE SYS$OUTPUT " ",FILE_NAME,".c"
  354. $!
  355. $! Compile The File.
  356. $!
  357. $ ON ERROR THEN GOTO SSL_TASK_END
  358. $!
  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
  365. $ write sys$output " \Using special rule (5)"
  366. $ x = " "+ CC5
  367. $ write /symbol sys$output x
  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
  373. $!
  374. $! Link The Program.
  375. $!
  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
  383. $!
  384. $! Time To Return.
  385. $!
  386. $SSL_TASK_END:
  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. !
  408. ! Default System Options File To Link Against
  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. !
  437. ! Default System Options File To Link Against
  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. $!
  462. $! Figure Out If We Need A non-VAX Or A VAX Linker Option File.
  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. !
  472. ! Default System Options File To Link Against
  473. ! The Sharable DEC C Runtime Library.
  474. !
  475. SYS$SHARE:DECC$SHR.EXE/SHARE
  476. $EOD
  477. $!
  478. $! Else...
  479. $!
  480. $ ELSE
  481. $!
  482. $! Create The non-VAX Linker Option File.
  483. $!
  484. $ CREATE 'OPT_FILE'
  485. $DECK
  486. !
  487. ! Default System Options File For non-VAX To Link Against
  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. $!
  494. $! End The DEC C Option File Check.
  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. $!
  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. $!
  576. $! Else, Check To See If P1 Has A Valid Argument.
  577. $!
  578. $ IF (P1.EQS."LIBRARY").OR.(P1.EQS."SSL_TASK")
  579. $ THEN
  580. $!
  581. $! A Valid Argument.
  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 ""
  600. $ WRITE SYS$OUTPUT " ALPHA[64]: Alpha Architecture."
  601. $ WRITE SYS$OUTPUT " IA64[64] : IA64 Architecture."
  602. $ WRITE SYS$OUTPUT " VAX : VAX Architecture."
  603. $ WRITE SYS$OUTPUT ""
  604. $!
  605. $! Time To EXIT.
  606. $!
  607. $ EXIT
  608. $!
  609. $! End The Valid Argument Check.
  610. $!
  611. $ ENDIF
  612. $!
  613. $! End The P1 Check.
  614. $!
  615. $ ENDIF
  616. $!
  617. $! Check To See If P2 Is Blank.
  618. $!
  619. $ IF (P2.EQS."NODEBUG")
  620. $ THEN
  621. $!
  622. $! P2 Is NODEBUG, So Compile Without Debugger Information.
  623. $!
  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."
  631. $!
  632. $! Else...
  633. $!
  634. $ ELSE
  635. $!
  636. $! Check To See If We Are To Compile With Debugger Information.
  637. $!
  638. $ IF (P2.EQS."DEBUG")
  639. $ THEN
  640. $!
  641. $! Compile With Debugger Information.
  642. $!
  643. $ DEBUGGER = "DEBUG"
  644. $ LINKMAP = "MAP"
  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. $!
  652. $! Tell The User Entered An Invalid Option.
  653. $!
  654. $ WRITE SYS$OUTPUT ""
  655. $ WRITE SYS$OUTPUT "The Option ",P2," Is Invalid. The Valid Options Are:"
  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. $!
  665. $! End The Valid Argument Check.
  666. $!
  667. $ ENDIF
  668. $!
  669. $! End The P2 Check.
  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. $!
  679. $! Check To See If We Have A Option For P5.
  680. $!
  681. $ IF (P5.EQS."")
  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. $!
  703. $! End The P5 Check.
  704. $!
  705. $ ENDIF
  706. $!
  707. $! Check P6 (POINTER_SIZE).
  708. $!
  709. $ IF (P6 .NES. "") .AND. (ARCH .NES. "VAX")
  710. $ THEN
  711. $!
  712. $ IF (P6 .EQS. "32")
  713. $ THEN
  714. $ POINTER_SIZE = " /POINTER_SIZE=32"
  715. $ ELSE
  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"))
  720. $ THEN
  721. $ ARCHD = ARCH+ "_64"
  722. $ LIB32 = ""
  723. $ POINTER_SIZE = " /POINTER_SIZE=64"
  724. $ ELSE
  725. $!
  726. $! Tell The User Entered An Invalid Option.
  727. $!
  728. $ WRITE SYS$OUTPUT ""
  729. $ WRITE SYS$OUTPUT "The Option ", P6, -
  730. " Is Invalid. The Valid Options Are:"
  731. $ WRITE SYS$OUTPUT ""
  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)."
  742. $ WRITE SYS$OUTPUT ""
  743. $!
  744. $! Time To EXIT.
  745. $!
  746. $ EXIT
  747. $!
  748. $ ENDIF
  749. $!
  750. $ ENDIF
  751. $!
  752. $! End The P6 (POINTER_SIZE) Check.
  753. $!
  754. $ ENDIF
  755. $!
  756. $! Set basic C compiler /INCLUDE directories.
  757. $!
  758. $ CC_INCLUDES = "SYS$DISK:[-.CRYPTO],SYS$DISK:[-]"
  759. $!
  760. $! Check To See If P3 Is Blank.
  761. $!
  762. $ IF (P3.EQS."")
  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. $!
  775. $ P3 = "GNUC"
  776. $!
  777. $! End The GNU C Compiler Check.
  778. $!
  779. $ ELSE
  780. $!
  781. $! Check To See If We Have VAXC Or DECC.
  782. $!
  783. $ IF (ARCH.NES."VAX").OR.(F$TRNLNM("DECC$CC_DEFAULT").NES."")
  784. $ THEN
  785. $!
  786. $! Looks Like DECC, Set To Use DECC.
  787. $!
  788. $ P3 = "DECC"
  789. $!
  790. $! Else...
  791. $!
  792. $ ELSE
  793. $!
  794. $! Looks Like VAXC, Set To Use VAXC.
  795. $!
  796. $ P3 = "VAXC"
  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. $!
  810. $! Check To See If We Have A Option For P4.
  811. $!
  812. $ IF (P4.EQS."")
  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. $!
  822. $ P4 = "SOCKETSHR"
  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. $!
  842. $ P4 = "UCX"
  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. $!
  856. $ CCDEFS = "TCPIP_TYPE_''P4'"
  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
  860. $ CCDISABLEWARNINGS = "" !!! "LONGLONGTYPE,LONGLONGSUFX,FOUNDCR"
  861. $ IF F$TYPE(USER_CCDISABLEWARNINGS) .NES. "" THEN -
  862. CCDISABLEWARNINGS = CCDISABLEWARNINGS + "," + USER_CCDISABLEWARNINGS
  863. $!
  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.
  918. $!
  919. $ IF (P3.EQS."VAXC").OR.(P3.EQS."DECC").OR.(P3.EQS."GNUC")
  920. $ THEN
  921. $!
  922. $! Check To See If The User Wanted DECC.
  923. $!
  924. $ IF (P3.EQS."DECC")
  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"
  940. $ CC = CC + " /''CC_OPTIMIZE' /''DEBUGGER' /STANDARD=RELAXED"+ -
  941. "''POINTER_SIZE' /NOLIST /PREFIX=ALL" + -
  942. " /INCLUDE=(''CC_INCLUDES') " + CCEXTRAFLAGS
  943. $!
  944. $! Define The Linker Options File Name.
  945. $!
  946. $ OPT_FILE = "VAX_DECC_OPTIONS.OPT"
  947. $!
  948. $! End DECC Check.
  949. $!
  950. $ ENDIF
  951. $!
  952. $! Check To See If We Are To Use VAXC.
  953. $!
  954. $ IF (P3.EQS."VAXC")
  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"
  968. $ IF ARCH.NES."VAX"
  969. $ THEN
  970. $ WRITE SYS$OUTPUT "There is no VAX C on ''ARCH'!"
  971. $ EXIT
  972. $ ENDIF
  973. $ IF F$TRNLNM("DECC$CC_DEFAULT").EQS."/DECC" THEN CC = "CC/VAXC"
  974. $ CC = CC + "/''CC_OPTIMIZE'/''DEBUGGER'/NOLIST" + -
  975. "/INCLUDE=(''CC_INCLUDES')" + CCEXTRAFLAGS
  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. $!
  984. $ OPT_FILE = "VAX_VAXC_OPTIONS.OPT"
  985. $!
  986. $! End VAXC Check
  987. $!
  988. $ ENDIF
  989. $!
  990. $! Check To See If We Are To Use GNU C.
  991. $!
  992. $ IF (P3.EQS."GNUC")
  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. $!
  1005. $ IF F$TYPE(GCC) .EQS. "" THEN GCC := GCC
  1006. $ CC = GCC+"/NOCASE_HACK/''GCC_OPTIMIZE'/''DEBUGGER'/NOLIST" + -
  1007. "/INCLUDE=(''CC_INCLUDES')" + CCEXTRAFLAGS
  1008. $!
  1009. $! Define The Linker Options File Name.
  1010. $!
  1011. $ OPT_FILE = "VAX_GNUC_OPTIONS.OPT"
  1012. $!
  1013. $! End The GNU C Check.
  1014. $!
  1015. $ ENDIF
  1016. $!
  1017. $! Set up default defines
  1018. $!
  1019. $ CCDEFS = """FLAT_INC=1""," + CCDEFS
  1020. $!
  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"
  1030. $ CCDISABLEWARNINGS = " /WARNING=(DISABLE=(" + CCDISABLEWARNINGS + "))"
  1031. $ ENDIF
  1032. $ CC4DISABLEWARNINGS = " /WARNING=(DISABLE=(" + CC4DISABLEWARNINGS + "))"
  1033. $ ELSE
  1034. $ CCDISABLEWARNINGS = ""
  1035. $ CC4DISABLEWARNINGS = ""
  1036. $ ENDIF
  1037. $ CC2 = CC + " /DEFINE=(" + CCDEFS + ",_POSIX_C_SOURCE)" + CCDISABLEWARNINGS
  1038. $ CC3 = CC + " /DEFINE=(" + CCDEFS + ISSEVEN + ")" + CCDISABLEWARNINGS
  1039. $ CC = CC + " /DEFINE=(" + CCDEFS + ")" + CCDISABLEWARNINGS
  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. $!
  1051. $ WRITE/SYMBOL SYS$OUTPUT "Main Compiling Command: ",CC
  1052. $!
  1053. $! Else The User Entered An Invalid Argument.
  1054. $!
  1055. $ ELSE
  1056. $!
  1057. $! Tell The User We Don't Know What They Want.
  1058. $!
  1059. $ WRITE SYS$OUTPUT ""
  1060. $ WRITE SYS$OUTPUT "The Option ",P3," Is Invalid. The Valid Options Are:"
  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. $!
  1074. $ IF P4.EQS."SOCKETSHR" .OR. P4.EQS."MULTINET" .OR. P4.EQS."UCX" -
  1075. .OR. P4.EQS."TCPIP" .OR. P4.EQS."NONE"
  1076. $ THEN
  1077. $!
  1078. $! Check to see if SOCKETSHR was chosen
  1079. $!
  1080. $ IF P4.EQS."SOCKETSHR"
  1081. $ THEN
  1082. $!
  1083. $! Set the library to use SOCKETSHR
  1084. $!
  1085. $ TCPIP_LIB = ",SYS$DISK:[-.VMS]SOCKETSHR_SHR.OPT /OPTIONS"
  1086. $!
  1087. $! Done with SOCKETSHR
  1088. $!
  1089. $ ENDIF
  1090. $!
  1091. $! Check to see if MULTINET was chosen
  1092. $!
  1093. $ IF P4.EQS."MULTINET"
  1094. $ THEN
  1095. $!
  1096. $! Set the library to use UCX emulation.
  1097. $!
  1098. $ P4 = "UCX"
  1099. $!
  1100. $! Done with MULTINET
  1101. $!
  1102. $ ENDIF
  1103. $!
  1104. $! Check to see if UCX was chosen
  1105. $!
  1106. $ IF P4.EQS."UCX"
  1107. $ THEN
  1108. $!
  1109. $! Set the library to use UCX.
  1110. $!
  1111. $ TCPIP_LIB = ",SYS$DISK:[-.VMS]UCX_SHR_DECC.OPT /OPTIONS"
  1112. $ IF F$TRNLNM("UCX$IPC_SHR") .NES. ""
  1113. $ THEN
  1114. $ TCPIP_LIB = ",SYS$DISK:[-.VMS]UCX_SHR_DECC_LOG.OPT /OPTIONS"
  1115. $ ELSE
  1116. $ IF COMPILER .NES. "DECC" .AND. ARCH .EQS. "VAX" THEN -
  1117. TCPIP_LIB = ",SYS$DISK:[-.VMS]UCX_SHR_VAXC.OPT /OPTIONS"
  1118. $ ENDIF
  1119. $!
  1120. $! Done with UCX
  1121. $!
  1122. $ ENDIF
  1123. $!
  1124. $! Check to see if TCPIP was chosen
  1125. $!
  1126. $ IF P4.EQS."TCPIP"
  1127. $ THEN
  1128. $!
  1129. $! Set the library to use TCPIP (post UCX).
  1130. $!
  1131. $ TCPIP_LIB = ",SYS$DISK:[-.VMS]TCPIP_SHR_DECC.OPT /OPTIONS"
  1132. $!
  1133. $! Done with TCPIP
  1134. $!
  1135. $ ENDIF
  1136. $!
  1137. $! Check to see if NONE was chosen
  1138. $!
  1139. $ IF P4.EQS."NONE"
  1140. $ THEN
  1141. $!
  1142. $! Do not use a TCPIP library.
  1143. $!
  1144. $ TCPIP_LIB = ""
  1145. $!
  1146. $! Done with NONE
  1147. $!
  1148. $ ENDIF
  1149. $!
  1150. $! Print info
  1151. $!
  1152. $ WRITE SYS$OUTPUT "TCP/IP library spec: ", TCPIP_LIB- ","
  1153. $!
  1154. $! Else The User Entered An Invalid Argument.
  1155. $!
  1156. $ ELSE
  1157. $!
  1158. $! Tell The User We Don't Know What They Want.
  1159. $!
  1160. $ WRITE SYS$OUTPUT ""
  1161. $ WRITE SYS$OUTPUT "The Option ",P4," Is Invalid. The Valid Options Are:"
  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."
  1165. $ WRITE SYS$OUTPUT " TCPIP : To link with TCPIP (post UCX) TCP/IP library."
  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.;"
  1189. $ __HERE = F$EDIT(__HERE,"UPCASE")
  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