2
0

fips-lib.com 26 KB

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