makevms.com 27 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132
  1. $!
  2. $! MAKEVMS.COM
  3. $! Original Author: UNKNOWN
  4. $! Rewritten By: Robert Byer
  5. $! Vice-President
  6. $! A-Com Computing, Inc.
  7. $! byer@mail.all-net.net
  8. $!
  9. $! Changes by Richard Levitte <richard@levitte.org>
  10. $!
  11. $! This procedure creates the SSL libraries of "[.xxx.EXE.CRYPTO]LIBCRYPTO.OLB"
  12. $! "[.xxx.EXE.SSL]LIBSSL.OLB"
  13. $! The "xxx" denotes the machine architecture of AXP or VAX.
  14. $!
  15. $! This procedures accepts two command line options listed below.
  16. $!
  17. $! Specify one of the following build options for P1.
  18. $!
  19. $! ALL Just build "everything".
  20. $! CONFIG Just build the "[.CRYPTO]OPENSSLCONF.H" file.
  21. $! BUILDINF Just build the "[.CRYPTO]BUILDINF.H" file.
  22. $! SOFTLINKS Just fix the Unix soft links.
  23. $! BUILDALL Same as ALL, except CONFIG, BUILDINF and SOFTILNKS aren't done.
  24. $! CRYPTO Just build the "[.xxx.EXE.CRYPTO]LIBCRYPTO.OLB" library.
  25. $! CRYPTO/x Just build the x part of the
  26. $! "[.xxx.EXE.CRYPTO]LIBCRYPTO.OLB" library.
  27. $! SSL Just build the "[.xxx.EXE.SSL]LIBSSL.OLB" library.
  28. $! SSL_TASK Just build the "[.xxx.EXE.SSL]SSL_TASK.EXE" program.
  29. $! TEST Just build the "[.xxx.EXE.TEST]" test programs for OpenSSL.
  30. $! APPS Just build the "[.xxx.EXE.APPS]" application programs for OpenSSL.
  31. $! ENGINES Just build the "[.xxx.EXE.ENGINES]" application programs for OpenSSL.
  32. $!
  33. $!
  34. $! P2 is ignored (it was used to denote if RSAref should be used or not,
  35. $! and is simply kept so surrounding scripts don't get confused)
  36. $!
  37. $! Speficy DEBUG or NODEBUG as P3 to compile with or without debugging
  38. $! information.
  39. $!
  40. $! Specify which compiler at P4 to try to compile under.
  41. $!
  42. $! VAXC For VAX C.
  43. $! DECC For DEC C.
  44. $! GNUC For GNU C.
  45. $! LINK To only link the programs from existing object files.
  46. $! (not yet implemented)
  47. $!
  48. $! If you don't speficy a compiler, it will try to determine which
  49. $! "C" compiler to use.
  50. $!
  51. $! P5, if defined, sets a TCP/IP library to use, through one of the following
  52. $! keywords:
  53. $!
  54. $! UCX for UCX or UCX emulation
  55. $! TCPIP for TCP/IP Services or TCP/IP Services emulation
  56. $! (this is prefered over UCX)
  57. $! SOCKETSHR for SOCKETSHR+NETLIB
  58. $! NONE to avoid specifying which TCP/IP implementation to
  59. $! use at build time (this works with DEC C). This is
  60. $! the default.
  61. $!
  62. $! P6, if defined, sets a compiler thread NOT needed on OpenVMS 7.1 (and up)
  63. $!
  64. $!
  65. $! Check if we're in a batch job, and make sure we get to
  66. $! the directory this script is in
  67. $!
  68. $ IF F$MODE() .EQS. "BATCH"
  69. $ THEN
  70. $ COMNAME=F$ENVIRONMENT("PROCEDURE")
  71. $ COMPATH=F$PARSE("A.;",COMNAME) - "A.;"
  72. $ SET DEF 'COMPATH'
  73. $ ENDIF
  74. $!
  75. $! Check Which Architecture We Are Using.
  76. $!
  77. $ IF (F$GETSYI("CPU").GE.128)
  78. $ THEN
  79. $!
  80. $! The Architecture Is AXP.
  81. $!
  82. $ ARCH := AXP
  83. $!
  84. $! Else...
  85. $!
  86. $ ELSE
  87. $!
  88. $! The Architecture Is VAX.
  89. $!
  90. $ ARCH := VAX
  91. $!
  92. $! End The Architecture Check.
  93. $!
  94. $ ENDIF
  95. $!
  96. $! Check To Make Sure We Have Valid Command Line Parameters.
  97. $!
  98. $ GOSUB CHECK_OPTIONS
  99. $!
  100. $! Check To See What We Are To Do.
  101. $!
  102. $ IF (BUILDCOMMAND.EQS."ALL")
  103. $ THEN
  104. $!
  105. $! Start with building the OpenSSL configuration file.
  106. $!
  107. $ GOSUB CONFIG
  108. $!
  109. $! Create The "BUILDINF.H" Include File.
  110. $!
  111. $ GOSUB BUILDINF
  112. $!
  113. $! Fix The Unix Softlinks.
  114. $!
  115. $ GOSUB SOFTLINKS
  116. $!
  117. $ ENDIF
  118. $!
  119. $ IF (BUILDCOMMAND.EQS."ALL".OR.BUILDCOMMAND.EQS."BUILDALL")
  120. $ THEN
  121. $!
  122. $! Build The [.xxx.EXE.CRYPTO]LIBCRYPTO.OLB Library.
  123. $!
  124. $ GOSUB CRYPTO
  125. $!
  126. $! Build The [.xxx.EXE.SSL]LIBSSL.OLB Library.
  127. $!
  128. $ GOSUB SSL
  129. $!
  130. $! Build The [.xxx.EXE.SSL]SSL_TASK.EXE DECNet SSL Engine.
  131. $!
  132. $ GOSUB SSL_TASK
  133. $!
  134. $! Build The [.xxx.EXE.TEST] OpenSSL Test Utilities.
  135. $!
  136. $ GOSUB TEST
  137. $!
  138. $! Build The [.xxx.EXE.APPS] OpenSSL Application Utilities.
  139. $!
  140. $ GOSUB APPS
  141. $!
  142. $! Build The [.xxx.EXE.ENGINES] OpenSSL Shareable Engines.
  143. $!
  144. $ GOSUB ENGINES
  145. $!
  146. $! Else...
  147. $!
  148. $ ELSE
  149. $!
  150. $! Build Just What The User Wants Us To Build.
  151. $!
  152. $ GOSUB 'BUILDCOMMAND'
  153. $!
  154. $ ENDIF
  155. $!
  156. $! Time To EXIT.
  157. $!
  158. $ EXIT
  159. $!
  160. $! Rebuild The "[.CRYPTO]OPENSSLCONF.H" file.
  161. $!
  162. $ CONFIG:
  163. $!
  164. $! Tell The User We Are Creating The [.CRYPTO]OPENSSLCONF.H File.
  165. $!
  166. $ WRITE SYS$OUTPUT "Creating [.CRYPTO]OPENSSLCONF.H Include File."
  167. $!
  168. $! Create The [.CRYPTO]OPENSSLCONF.H File.
  169. $!
  170. $ OPEN/WRITE H_FILE SYS$DISK:[.CRYPTO]OPENSSLCONF.H
  171. $!
  172. $! Write The [.CRYPTO]OPENSSLCONF.H File.
  173. $!
  174. $ WRITE H_FILE "/* This file was automatically built using makevms.com */"
  175. $ WRITE H_FILE "/* and [.CRYPTO]OPENSSLCONF.H_IN */"
  176. $
  177. $!
  178. $! Write a few macros that indicate how this system was built.
  179. $!
  180. $ WRITE H_FILE ""
  181. $ WRITE H_FILE "#ifndef OPENSSL_SYS_VMS"
  182. $ WRITE H_FILE "# define OPENSSL_SYS_VMS"
  183. $ WRITE H_FILE "#endif"
  184. $ CONFIG_LOGICALS := NO_ASM,NO_RSA,NO_DSA,NO_DH,NO_MD2,NO_MD5,NO_RIPEMD,WHRLPOOL,-
  185. NO_SHA,NO_SHA0,NO_SHA1,NO_DES/NO_MDC2;NO_MDC2,NO_RC2,NO_RC4,NO_RC5,-
  186. NO_IDEA,NO_BF,NO_CAST,NO_CAMELLIA,NO_SEED,NO_HMAC,NO_SSL2
  187. $ CONFIG_LOG_I = 0
  188. $ CONFIG_LOG_LOOP:
  189. $ CONFIG_LOG_E1 = F$ELEMENT(CONFIG_LOG_I,",",CONFIG_LOGICALS)
  190. $ CONFIG_LOG_I = CONFIG_LOG_I + 1
  191. $ IF CONFIG_LOG_E1 .EQS. "" THEN GOTO CONFIG_LOG_LOOP
  192. $ IF CONFIG_LOG_E1 .EQS. "," THEN GOTO CONFIG_LOG_LOOP_END
  193. $ CONFIG_LOG_E2 = F$EDIT(CONFIG_LOG_E1,"TRIM")
  194. $ CONFIG_LOG_E1 = F$ELEMENT(0,";",CONFIG_LOG_E2)
  195. $ CONFIG_LOG_E2 = F$ELEMENT(1,";",CONFIG_LOG_E2)
  196. $ CONFIG_LOG_E0 = F$ELEMENT(0,"/",CONFIG_LOG_E1)
  197. $ CONFIG_LOG_E1 = F$ELEMENT(1,"/",CONFIG_LOG_E1)
  198. $ IF F$TRNLNM("OPENSSL_"+CONFIG_LOG_E0)
  199. $ THEN
  200. $ WRITE H_FILE "#ifndef OPENSSL_",CONFIG_LOG_E0
  201. $ WRITE H_FILE "# define OPENSSL_",CONFIG_LOG_E0
  202. $ WRITE H_FILE "#endif"
  203. $ IF CONFIG_LOG_E1 .NES. "/"
  204. $ THEN
  205. $ WRITE H_FILE "#ifndef OPENSSL_",CONFIG_LOG_E1
  206. $ WRITE H_FILE "# define OPENSSL_",CONFIG_LOG_E1
  207. $ WRITE H_FILE "#endif"
  208. $ ENDIF
  209. $ ELSE
  210. $ IF CONFIG_LOG_E2 .NES. ";"
  211. $ THEN
  212. $ IF F$TRNLNM("OPENSSL_"+CONFIG_LOG_E2)
  213. $ THEN
  214. $ WRITE H_FILE "#ifndef OPENSSL_",CONFIG_LOG_E2
  215. $ WRITE H_FILE "# define OPENSSL_",CONFIG_LOG_E2
  216. $ WRITE H_FILE "#endif"
  217. $ ENDIF
  218. $ ENDIF
  219. $ ENDIF
  220. $ GOTO CONFIG_LOG_LOOP
  221. $ CONFIG_LOG_LOOP_END:
  222. $ WRITE H_FILE "#ifndef OPENSSL_NO_STATIC_ENGINE"
  223. $ WRITE H_FILE "# define OPENSSL_NO_STATIC_ENGINE"
  224. $ WRITE H_FILE "#endif"
  225. $ WRITE H_FILE "#ifndef OPENSSL_THREADS"
  226. $ WRITE H_FILE "# define OPENSSL_THREADS"
  227. $ WRITE H_FILE "#endif"
  228. $ WRITE H_FILE "#ifndef OPENSSL_NO_KRB5"
  229. $ WRITE H_FILE "# define OPENSSL_NO_KRB5"
  230. $ WRITE H_FILE "#endif"
  231. $ WRITE H_FILE ""
  232. $!
  233. $! Different tar version may have named the file differently
  234. $ IF F$SEARCH("[.CRYPTO]OPENSSLCONF.H_IN") .NES. ""
  235. $ THEN
  236. $ TYPE [.CRYPTO]OPENSSLCONF.H_IN /OUTPUT=H_FILE:
  237. $ ELSE
  238. $ IF F$SEARCH("[.CRYPTO]OPENSSLCONF_H.IN") .NES. ""
  239. $ THEN
  240. $ TYPE [.CRYPTO]OPENSSLCONF_H.IN /OUTPUT=H_FILE:
  241. $ ELSE
  242. $ ! For ODS-5
  243. $ IF F$SEARCH("[.CRYPTO]OPENSSLCONF.H.IN") .NES. ""
  244. $ THEN
  245. $ TYPE [.CRYPTO]OPENSSLCONF.H.IN /OUTPUT=H_FILE:
  246. $ ELSE
  247. $ WRITE SYS$ERROR "Couldn't find a [.CRYPTO]OPENSSLCONF.H_IN. Exiting!"
  248. $ EXIT 0
  249. $ ENDIF
  250. $ ENDIF
  251. $ ENDIF
  252. $ IF ARCH .EQS. "AXP"
  253. $ THEN
  254. $!
  255. $! Write the Alpha specific data
  256. $!
  257. $ WRITE H_FILE "#if defined(HEADER_RC4_H)"
  258. $ WRITE H_FILE "#undef RC4_INT"
  259. $ WRITE H_FILE "#define RC4_INT unsigned int"
  260. $ WRITE H_FILE "#undef RC4_CHUNK"
  261. $ WRITE H_FILE "#define RC4_CHUNK unsigned long long"
  262. $ WRITE H_FILE "#endif"
  263. $!
  264. $ WRITE H_FILE "#if defined(HEADER_DES_LOCL_H)"
  265. $ WRITE H_FILE "#undef DES_LONG"
  266. $ WRITE H_FILE "#define DES_LONG unsigned int"
  267. $ WRITE H_FILE "#undef DES_PTR"
  268. $ WRITE H_FILE "#define DES_PTR"
  269. $ WRITE H_FILE "#undef DES_RISC1"
  270. $ WRITE H_FILE "#undef DES_RISC2"
  271. $ WRITE H_FILE "#define DES_RISC1"
  272. $ WRITE H_FILE "#undef DES_UNROLL"
  273. $ WRITE H_FILE "#define DES_UNROLL"
  274. $ WRITE H_FILE "#endif"
  275. $!
  276. $ WRITE H_FILE "#if defined(HEADER_BN_H)"
  277. $ WRITE H_FILE "#undef BN_LLONG" ! Never define with SIXTY_FOUR_BIT
  278. $ WRITE H_FILE "#undef SIXTY_FOUR_BIT_LONG"
  279. $ WRITE H_FILE "#undef SIXTY_FOUR_BIT"
  280. $ WRITE H_FILE "#define SIXTY_FOUR_BIT"
  281. $ WRITE H_FILE "#undef THIRTY_TWO_BIT"
  282. $ WRITE H_FILE "#undef SIXTEEN_BIT"
  283. $ WRITE H_FILE "#undef EIGHT_BIT"
  284. $ WRITE H_FILE "#endif"
  285. $
  286. $ WRITE H_FILE "#undef OPENSSL_EXPORT_VAR_AS_FUNCTION"
  287. $!
  288. $! Else...
  289. $!
  290. $ ELSE
  291. $!
  292. $! Write the VAX specific data
  293. $!
  294. $ WRITE H_FILE "#if defined(HEADER_RC4_H)"
  295. $ WRITE H_FILE "#undef RC4_INT"
  296. $ WRITE H_FILE "#define RC4_INT unsigned char"
  297. $ WRITE H_FILE "#undef RC4_CHUNK"
  298. $ WRITE H_FILE "#define RC4_CHUNK unsigned long"
  299. $ WRITE H_FILE "#endif"
  300. $!
  301. $ WRITE H_FILE "#if defined(HEADER_DES_LOCL_H)"
  302. $ WRITE H_FILE "#undef DES_LONG"
  303. $ WRITE H_FILE "#define DES_LONG unsigned long"
  304. $ WRITE H_FILE "#undef DES_PTR"
  305. $ WRITE H_FILE "#define DES_PTR"
  306. $ WRITE H_FILE "#undef DES_RISC1"
  307. $ WRITE H_FILE "#undef DES_RISC2"
  308. $ WRITE H_FILE "#undef DES_UNROLL"
  309. $ WRITE H_FILE "#endif"
  310. $!
  311. $ WRITE H_FILE "#if defined(HEADER_BN_H)"
  312. $ WRITE H_FILE "#undef BN_LLONG" ! VAX C/DEC C doesn't have long long
  313. $ WRITE H_FILE "#undef SIXTY_FOUR_BIT_LONG"
  314. $ WRITE H_FILE "#undef SIXTY_FOUR_BIT"
  315. $ WRITE H_FILE "#undef THIRTY_TWO_BIT"
  316. $ WRITE H_FILE "#define THIRTY_TWO_BIT"
  317. $ WRITE H_FILE "#undef SIXTEEN_BIT"
  318. $ WRITE H_FILE "#undef EIGHT_BIT"
  319. $ WRITE H_FILE "#endif"
  320. $!
  321. $ WRITE H_FILE "#if defined(HEADER_SHA_H)"
  322. $ WRITE H_FILE "#undef OPENSSL_NO_SHA512"
  323. $ WRITE H_FILE "#define OPENSSL_NO_SHA512"
  324. $ WRITE H_FILE "#endif"
  325. $!
  326. $ WRITE H_FILE "#undef OPENSSL_EXPORT_VAR_AS_FUNCTION"
  327. $ WRITE H_FILE "#define OPENSSL_EXPORT_VAR_AS_FUNCTION"
  328. $!
  329. $! End
  330. $!
  331. $ ENDIF
  332. $!
  333. $! Close the [.CRYPTO]OPENSSLCONF.H file
  334. $!
  335. $ CLOSE H_FILE
  336. $!
  337. $! That's All, Time To RETURN.
  338. $!
  339. $ RETURN
  340. $!
  341. $! Rebuild The "[.CRYPTO]BUILDINF.H" file.
  342. $!
  343. $ BUILDINF:
  344. $!
  345. $! Tell The User We Are Creating The [.CRYPTO]BUILDINF.H File.
  346. $!
  347. $ WRITE SYS$OUTPUT "Creating [.CRYPTO]BUILDINF.H Include File."
  348. $!
  349. $! Create The [.CRYPTO]BUILDINF.H File.
  350. $!
  351. $ OPEN/WRITE H_FILE SYS$DISK:[.CRYPTO]BUILDINF.H
  352. $!
  353. $! Get The Current Date & Time.
  354. $!
  355. $ TIME = F$TIME()
  356. $!
  357. $! Write The [.CRYPTO]BUILDINF.H File.
  358. $!
  359. $ WRITE H_FILE "#define CFLAGS """" /* Not filled in for now */"
  360. $ WRITE H_FILE "#define PLATFORM ""VMS"""
  361. $ WRITE H_FILE "#define DATE ""''TIME'"" "
  362. $!
  363. $! Close The [.CRYPTO]BUILDINF.H File.
  364. $!
  365. $ CLOSE H_FILE
  366. $!
  367. $! That's All, Time To RETURN.
  368. $!
  369. $ RETURN
  370. $!
  371. $! Copy a lot of files around.
  372. $!
  373. $ SOFTLINKS:
  374. $!
  375. $! Tell The User We Are Partly Rebuilding The [.APPS] Directory.
  376. $!
  377. $ WRITE SYS$OUTPUT "Rebuilding The '[.APPS]MD4.C', '[.APPS]MD5.C' And '[.APPS]RMD160.C' Files."
  378. $!
  379. $ DELETE SYS$DISK:[.APPS]MD4.C;*,MD5.C;*,RMD160.C;*
  380. $!
  381. $! Copy MD4.C from [.CRYPTO.MD4] into [.APPS]
  382. $!
  383. $ COPY SYS$DISK:[.CRYPTO.MD4]MD4.C SYS$DISK:[.APPS]
  384. $!
  385. $! Copy MD5.C from [.CRYPTO.MD5] into [.APPS]
  386. $!
  387. $ COPY SYS$DISK:[.CRYPTO.MD5]MD5.C SYS$DISK:[.APPS]
  388. $!
  389. $! Copy RMD160.C from [.CRYPTO.RIPEMD] into [.APPS]
  390. $!
  391. $ COPY SYS$DISK:[.CRYPTO.RIPEMD]RMD160.C SYS$DISK:[.APPS]
  392. $!
  393. $! Tell The User We Are Partly Rebuilding The [.TEST] Directory.
  394. $!
  395. $ WRITE SYS$OUTPUT "Rebuilding The '[.TEST]*.C' Files."
  396. $!
  397. $! First, We Have To "Rebuild" The "[.TEST]" Directory, So Delete
  398. $! All The "C" Files That Are Currently There Now.
  399. $!
  400. $ DELETE SYS$DISK:[.TEST]*.C;*
  401. $ DELETE SYS$DISK:[.TEST]EVPTESTS.TXT;*
  402. $!
  403. $! Copy all the *TEST.C files from [.CRYPTO...] into [.TEST]
  404. $!
  405. $ COPY SYS$DISK:[.CRYPTO.*]%*TEST.C SYS$DISK:[.TEST]
  406. $ COPY SYS$DISK:[.CRYPTO.SHA]SHA%%%T.C SYS$DISK:[.TEST]
  407. $ COPY SYS$DISK:[.CRYPTO.EVP]EVPTESTS.TXT SYS$DISK:[.TEST]
  408. $!
  409. $! Copy all the *TEST.C files from [.SSL...] into [.TEST]
  410. $!
  411. $ COPY SYS$DISK:[.SSL]%*TEST.C SYS$DISK:[.TEST]
  412. $!
  413. $! Tell The User We Are Rebuilding The [.INCLUDE.OPENSSL] Directory.
  414. $!
  415. $ WRITE SYS$OUTPUT "Rebuilding The '[.INCLUDE.OPENSSL]' Directory."
  416. $!
  417. $! First, make sure the directory exists
  418. $!
  419. $ IF F$PARSE("SYS$DISK:[.INCLUDE.OPENSSL]") .EQS. "" THEN -
  420. CREATE/DIRECTORY SYS$DISK:[.INCLUDE.OPENSSL]
  421. $!
  422. $! Copy All The ".H" Files From The Main Directory.
  423. $!
  424. $ EXHEADER := e_os2.h
  425. $ COPY 'EXHEADER' SYS$DISK:[.INCLUDE.OPENSSL]
  426. $!
  427. $! Copy All The ".H" Files From The [.CRYPTO] Directory Tree.
  428. $!
  429. $ SDIRS := ,-
  430. OBJECTS,-
  431. MD2,MD4,MD5,SHA,MDC2,HMAC,RIPEMD,WHRLPOOL,-
  432. DES,RC2,RC4,RC5,IDEA,BF,CAST,CAMELLIA,SEED,-
  433. BN,EC,RSA,DSA,ECDSA,DH,ECDH,DSO,ENGINE,AES,-
  434. BUFFER,BIO,STACK,LHASH,RAND,ERR,-
  435. EVP,ASN1,PEM,X509,X509V3,CONF,TXT_DB,PKCS7,PKCS12,COMP,OCSP,UI,KRB5,-
  436. STORE,CMS,PQUEUE,TS
  437. $ EXHEADER_ := crypto.h,opensslv.h,opensslconf.h,ebcdic.h,symhacks.h,ossl_typ.h
  438. $ EXHEADER_OBJECTS := objects.h,obj_mac.h
  439. $ EXHEADER_MD2 := md2.h
  440. $ EXHEADER_MD4 := md4.h
  441. $ EXHEADER_MD5 := md5.h
  442. $ EXHEADER_SHA := sha.h
  443. $ EXHEADER_MDC2 := mdc2.h
  444. $ EXHEADER_HMAC := hmac.h
  445. $ EXHEADER_RIPEMD := ripemd.h
  446. $ EXHEADER_WHRLPOOL := whrlpool.h
  447. $ EXHEADER_DES := des.h,des_old.h
  448. $ EXHEADER_RC2 := rc2.h
  449. $ EXHEADER_RC4 := rc4.h
  450. $ EXHEADER_RC5 := rc5.h
  451. $ EXHEADER_IDEA := idea.h
  452. $ EXHEADER_BF := blowfish.h
  453. $ EXHEADER_CAST := cast.h
  454. $ EXHEADER_CAMELLIA := camellia.h
  455. $ EXHEADER_SEED := seed.h
  456. $ EXHEADER_BN := bn.h
  457. $ EXHEADER_EC := ec.h
  458. $ EXHEADER_RSA := rsa.h
  459. $ EXHEADER_DSA := dsa.h
  460. $ EXHEADER_ECDSA := ecdsa.h
  461. $ EXHEADER_DH := dh.h
  462. $ EXHEADER_ECDH := ecdh.h
  463. $ EXHEADER_DSO := dso.h
  464. $ EXHEADER_ENGINE := engine.h
  465. $ EXHEADER_AES := aes.h
  466. $ EXHEADER_BUFFER := buffer.h
  467. $ EXHEADER_BIO := bio.h
  468. $ EXHEADER_STACK := stack.h,safestack.h
  469. $ EXHEADER_LHASH := lhash.h
  470. $ EXHEADER_RAND := rand.h
  471. $ EXHEADER_ERR := err.h
  472. $ EXHEADER_EVP := evp.h
  473. $ EXHEADER_ASN1 := asn1.h,asn1_mac.h,asn1t.h
  474. $ EXHEADER_PEM := pem.h,pem2.h
  475. $ EXHEADER_X509 := x509.h,x509_vfy.h
  476. $ EXHEADER_X509V3 := x509v3.h
  477. $ EXHEADER_CONF := conf.h,conf_api.h
  478. $ EXHEADER_TXT_DB := txt_db.h
  479. $ EXHEADER_PKCS7 := pkcs7.h
  480. $ EXHEADER_PKCS12 := pkcs12.h
  481. $ EXHEADER_COMP := comp.h
  482. $ EXHEADER_OCSP := ocsp.h
  483. $ EXHEADER_UI := ui.h,ui_compat.h
  484. $ EXHEADER_KRB5 := krb5_asn.h
  485. $!EXHEADER_STORE := store.h,str_compat.h
  486. $ EXHEADER_STORE := store.h
  487. $ EXHEADER_CMS := cms.h
  488. $ EXHEADER_PQUEUE := pqueue.h
  489. $ EXHEADER_TS := ts.h
  490. $
  491. $ I = 0
  492. $ LOOP_SDIRS:
  493. $ D = F$EDIT(F$ELEMENT(I, ",", SDIRS),"TRIM")
  494. $ I = I + 1
  495. $ IF D .EQS. "," THEN GOTO LOOP_SDIRS_END
  496. $ tmp = EXHEADER_'D'
  497. $ IF D .EQS. ""
  498. $ THEN
  499. $ COPY [.CRYPTO]'tmp' SYS$DISK:[.INCLUDE.OPENSSL] !/LOG
  500. $ ELSE
  501. $ COPY [.CRYPTO.'D']'tmp' SYS$DISK:[.INCLUDE.OPENSSL] !/LOG
  502. $ ENDIF
  503. $ GOTO LOOP_SDIRS
  504. $ LOOP_SDIRS_END:
  505. $!
  506. $! Copy All The ".H" Files From The [.SSL] Directory.
  507. $!
  508. $ EXHEADER := ssl.h,ssl2.h,ssl3.h,ssl23.h,tls1.h,dtls1.h,kssl.h
  509. $ COPY SYS$DISK:[.SSL]'EXHEADER' SYS$DISK:[.INCLUDE.OPENSSL]
  510. $!
  511. $! Purge all doubles
  512. $!
  513. $ PURGE SYS$DISK:[.INCLUDE.OPENSSL]*.H
  514. $!
  515. $! That's All, Time To RETURN.
  516. $!
  517. $ RETURN
  518. $!
  519. $! Build The "[.xxx.EXE.CRYPTO]LIBCRYPTO.OLB" Library.
  520. $!
  521. $ CRYPTO:
  522. $!
  523. $! Tell The User What We Are Doing.
  524. $!
  525. $ WRITE SYS$OUTPUT ""
  526. $ WRITE SYS$OUTPUT "Building The [.",ARCH,".EXE.CRYPTO]LIBCRYPTO.OLB Library."
  527. $!
  528. $! Go To The [.CRYPTO] Directory.
  529. $!
  530. $ SET DEFAULT SYS$DISK:[.CRYPTO]
  531. $!
  532. $! Build The [.xxx.EXE.CRYPTO]LIBCRYPTO.OLB Library.
  533. $!
  534. $ @CRYPTO-LIB LIBRARY 'DEBUGGER' "''COMPILER'" "''TCPIP_TYPE'" "''ISSEVEN'" "''BUILDPART'"
  535. $!
  536. $! Build The [.xxx.EXE.CRYPTO]*.EXE Test Applications.
  537. $!
  538. $ @CRYPTO-LIB APPS 'DEBUGGER' "''COMPILER'" "''TCPIP_TYPE'" 'ISSEVEN' "''BUILDPART'"
  539. $!
  540. $! Go Back To The Main Directory.
  541. $!
  542. $ SET DEFAULT [-]
  543. $!
  544. $! Time To RETURN.
  545. $!
  546. $ RETURN
  547. $!
  548. $! Build The "[.xxx.EXE.SSL]LIBSSL.OLB" Library.
  549. $!
  550. $ SSL:
  551. $!
  552. $! Tell The User What We Are Doing.
  553. $!
  554. $ WRITE SYS$OUTPUT ""
  555. $ WRITE SYS$OUTPUT "Building The [.",ARCH,".EXE.SSL]LIBSSL.OLB Library."
  556. $!
  557. $! Go To The [.SSL] Directory.
  558. $!
  559. $ SET DEFAULT SYS$DISK:[.SSL]
  560. $!
  561. $! Build The [.xxx.EXE.SSL]LIBSSL.OLB Library.
  562. $!
  563. $ @SSL-LIB LIBRARY 'DEBUGGER' "''COMPILER'" "''TCPIP_TYPE'" 'ISSEVEN'
  564. $!
  565. $! Go Back To The Main Directory.
  566. $!
  567. $ SET DEFAULT [-]
  568. $!
  569. $! Time To Return.
  570. $!
  571. $ RETURN
  572. $!
  573. $! Build The "[.xxx.EXE.SSL]SSL_TASK.EXE" Program.
  574. $!
  575. $ SSL_TASK:
  576. $!
  577. $! Tell The User What We Are Doing.
  578. $!
  579. $ WRITE SYS$OUTPUT ""
  580. $ WRITE SYS$OUTPUT "Building DECNet Based SSL Engine, [.",ARCH,".EXE.SSL]SSL_TASK.EXE"
  581. $!
  582. $! Go To The [.SSL] Directory.
  583. $!
  584. $ SET DEFAULT SYS$DISK:[.SSL]
  585. $!
  586. $! Build The [.xxx.EXE.SSL]SSL_TASK.EXE
  587. $!
  588. $ @SSL-LIB SSL_TASK 'DEBUGGER' "''COMPILER'" "''TCPIP_TYPE'" 'ISSEVEN'
  589. $!
  590. $! Go Back To The Main Directory.
  591. $!
  592. $ SET DEFAULT [-]
  593. $!
  594. $! That's All, Time To RETURN.
  595. $!
  596. $ RETURN
  597. $!
  598. $! Build The OpenSSL Test Programs.
  599. $!
  600. $ TEST:
  601. $!
  602. $! Tell The User What We Are Doing.
  603. $!
  604. $ WRITE SYS$OUTPUT ""
  605. $ WRITE SYS$OUTPUT "Building The OpenSSL [.",ARCH,".EXE.TEST] Test Utilities."
  606. $!
  607. $! Go To The [.TEST] Directory.
  608. $!
  609. $ SET DEFAULT SYS$DISK:[.TEST]
  610. $!
  611. $! Build The Test Programs.
  612. $!
  613. $ @MAKETESTS 'DEBUGGER' "''COMPILER'" "''TCPIP_TYPE'" 'ISSEVEN'
  614. $!
  615. $! Go Back To The Main Directory.
  616. $!
  617. $ SET DEFAULT [-]
  618. $!
  619. $! That's All, Time To RETURN.
  620. $!
  621. $ RETURN
  622. $!
  623. $! Build The OpenSSL Application Programs.
  624. $!
  625. $ APPS:
  626. $!
  627. $! Tell The User What We Are Doing.
  628. $!
  629. $ WRITE SYS$OUTPUT ""
  630. $ WRITE SYS$OUTPUT "Building OpenSSL [.",ARCH,".EXE.APPS] Applications."
  631. $!
  632. $! Go To The [.APPS] Directory.
  633. $!
  634. $ SET DEFAULT SYS$DISK:[.APPS]
  635. $!
  636. $! Build The Application Programs.
  637. $!
  638. $ @MAKEAPPS 'DEBUGGER' "''COMPILER'" "''TCPIP_TYPE'" 'ISSEVEN'
  639. $!
  640. $! Go Back To The Main Directory.
  641. $!
  642. $ SET DEFAULT [-]
  643. $!
  644. $! That's All, Time To RETURN.
  645. $!
  646. $ RETURN
  647. $!
  648. $! Build The OpenSSL Application Programs.
  649. $!
  650. $ ENGINES:
  651. $!
  652. $! Tell The User What We Are Doing.
  653. $!
  654. $ WRITE SYS$OUTPUT ""
  655. $ WRITE SYS$OUTPUT "Building OpenSSL [.",ARCH,".EXE.ENGINES] Engines."
  656. $!
  657. $! Go To The [.ENGINES] Directory.
  658. $!
  659. $ SET DEFAULT SYS$DISK:[.ENGINES]
  660. $!
  661. $! Build The Application Programs.
  662. $!
  663. $ @MAKEENGINES ENGINES 'DEBUGGER' "''COMPILER'" "''TCPIP_TYPE'" 'ISSEVEN' "''BUILDPART'"
  664. $!
  665. $! Go Back To The Main Directory.
  666. $!
  667. $ SET DEFAULT [-]
  668. $!
  669. $! That's All, Time To RETURN.
  670. $!
  671. $ RETURN
  672. $!
  673. $! Check The User's Options.
  674. $!
  675. $ CHECK_OPTIONS:
  676. $!
  677. $! Check if there's a "part", and separate it out
  678. $!
  679. $ BUILDPART = F$ELEMENT(1,"/",P1)
  680. $ IF BUILDPART .EQS. "/"
  681. $ THEN
  682. $ BUILDPART = ""
  683. $ ELSE
  684. $ P1 = F$EXTRACT(0,F$LENGTH(P1) - F$LENGTH(BUILDPART) - 1, P1)
  685. $ ENDIF
  686. $!
  687. $! Check To See If P1 Is Blank.
  688. $!
  689. $ IF (P1.EQS."ALL")
  690. $ THEN
  691. $!
  692. $! P1 Is ALL, So Build Everything.
  693. $!
  694. $ BUILDCOMMAND = "ALL"
  695. $!
  696. $! Else...
  697. $!
  698. $ ELSE
  699. $!
  700. $! Else, Check To See If P1 Has A Valid Arguement.
  701. $!
  702. $ IF (P1.EQS."CONFIG").OR.(P1.EQS."BUILDINF").OR.(P1.EQS."SOFTLINKS") -
  703. .OR.(P1.EQS."BUILDALL") -
  704. .OR.(P1.EQS."CRYPTO").OR.(P1.EQS."SSL") -
  705. .OR.(P1.EQS."SSL_TASK").OR.(P1.EQS."TEST").OR.(P1.EQS."APPS")
  706. $ THEN
  707. $!
  708. $! A Valid Arguement.
  709. $!
  710. $ BUILDCOMMAND = P1
  711. $!
  712. $! Else...
  713. $!
  714. $ ELSE
  715. $!
  716. $! Tell The User We Don't Know What They Want.
  717. $!
  718. $ WRITE SYS$OUTPUT ""
  719. $ WRITE SYS$OUTPUT "The Option ",P1," Is Invalid. The Valid Options Are:"
  720. $ WRITE SYS$OUTPUT ""
  721. $ WRITE SYS$OUTPUT " ALL : Just Build Everything."
  722. $ WRITE SYS$OUTPUT " CONFIG : Just build the [.CRYPTO]OPENSSLCONF.H file."
  723. $ WRITE SYS$OUTPUT " BUILDINF : Just build the [.CRYPTO]BUILDINF.H file."
  724. $ WRITE SYS$OUTPUT " SOFTLINKS: Just Fix The Unix soft links."
  725. $ WRITE SYS$OUTPUT " BUILDALL : Same as ALL, except CONFIG, BUILDINF and SOFTILNKS aren't done."
  726. $ WRITE SYS$OUTPUT " CRYPTO : To Build Just The [.xxx.EXE.CRYPTO]LIBCRYPTO.OLB Library."
  727. $ WRITE SYS$OUTPUT " CRYPTO/x : To Build Just The x Part Of The"
  728. $ WRITE SYS$OUTPUT " [.xxx.EXE.CRYPTO]LIBCRYPTO.OLB Library."
  729. $ WRITE SYS$OUTPUT " SSL : To Build Just The [.xxx.EXE.SSL]LIBSSL.OLB Library."
  730. $ WRITE SYS$OUTPUT " SSL_TASK : To Build Just The [.xxx.EXE.SSL]SSL_TASK.EXE Program."
  731. $ WRITE SYS$OUTPUT " TEST : To Build Just The OpenSSL Test Programs."
  732. $ WRITE SYS$OUTPUT " APPS : To Build Just The OpenSSL Application Programs."
  733. $ WRITE SYS$OUTPUT ""
  734. $ WRITE SYS$OUTPUT " Where 'xxx' Stands For:"
  735. $ WRITE SYS$OUTPUT ""
  736. $ WRITE SYS$OUTPUT " AXP : Alpha Architecture."
  737. $ WRITE SYS$OUTPUT " VAX : VAX Architecture."
  738. $ WRITE SYS$OUTPUT ""
  739. $!
  740. $! Time To EXIT.
  741. $!
  742. $ EXIT
  743. $!
  744. $! End The Valid Argument Check.
  745. $!
  746. $ ENDIF
  747. $!
  748. $! End The P1 Check.
  749. $!
  750. $ ENDIF
  751. $!
  752. $! Check To See If P3 Is Blank.
  753. $!
  754. $ IF (P3.EQS."NODEBUG")
  755. $ THEN
  756. $!
  757. $! P3 Is NODEBUG, So Compile Without Debugger Information.
  758. $!
  759. $ DEBUGGER = "NODEBUG"
  760. $!
  761. $! Else...
  762. $!
  763. $ ELSE
  764. $!
  765. $! Check To See If We Are To Compile With Debugger Information.
  766. $!
  767. $ IF (P3.EQS."DEBUG")
  768. $ THEN
  769. $!
  770. $! Compile With Debugger Information.
  771. $!
  772. $ DEBUGGER = "DEBUG"
  773. $!
  774. $! Else...
  775. $!
  776. $ ELSE
  777. $!
  778. $! Tell The User Entered An Invalid Option..
  779. $!
  780. $ WRITE SYS$OUTPUT ""
  781. $ WRITE SYS$OUTPUT "The Option ",P3," Is Invalid. The Valid Options Are:"
  782. $ WRITE SYS$OUTPUT ""
  783. $ WRITE SYS$OUTPUT " DEBUG : Compile With The Debugger Information."
  784. $ WRITE SYS$OUTPUT " NODEBUG : Compile Without The Debugger Information."
  785. $ WRITE SYS$OUTPUT ""
  786. $!
  787. $! Time To EXIT.
  788. $!
  789. $ EXIT
  790. $!
  791. $! End The Valid Arguement Check.
  792. $!
  793. $ ENDIF
  794. $!
  795. $! End The P3 Check.
  796. $!
  797. $ ENDIF
  798. $!
  799. $! Check To See If P4 Is Blank.
  800. $!
  801. $ IF (P4.EQS."")
  802. $ THEN
  803. $!
  804. $! O.K., The User Didn't Specify A Compiler, Let's Try To
  805. $! Find Out Which One To Use.
  806. $!
  807. $! Check To See If We Have GNU C.
  808. $!
  809. $ IF (F$TRNLNM("GNU_CC").NES."")
  810. $ THEN
  811. $!
  812. $! Looks Like GNUC, Set To Use GNUC.
  813. $!
  814. $ COMPILER = "GNUC"
  815. $!
  816. $! Tell The User We Are Using GNUC.
  817. $!
  818. $ WRITE SYS$OUTPUT "Using GNU 'C' Compiler."
  819. $!
  820. $! End The GNU C Compiler Check.
  821. $!
  822. $ ENDIF
  823. $!
  824. $! Check To See If We Have VAXC Or DECC.
  825. $!
  826. $ IF (F$GETSYI("CPU").GE.128).OR.(F$TRNLNM("DECC$CC_DEFAULT").EQS."/DECC")
  827. $ THEN
  828. $!
  829. $! Looks Like DECC, Set To Use DECC.
  830. $!
  831. $ COMPILER = "DECC"
  832. $!
  833. $! Tell The User We Are Using DECC.
  834. $!
  835. $ WRITE SYS$OUTPUT "Using DECC 'C' Compiler."
  836. $!
  837. $! Else...
  838. $!
  839. $ ELSE
  840. $!
  841. $! Looks Like VAXC, Set To Use VAXC.
  842. $!
  843. $ COMPILER = "VAXC"
  844. $!
  845. $! Tell The User We Are Using VAX C.
  846. $!
  847. $ WRITE SYS$OUTPUT "Using VAXC 'C' Compiler."
  848. $!
  849. $! End The DECC & VAXC Compiler Check.
  850. $!
  851. $ ENDIF
  852. $!
  853. $! Else...
  854. $!
  855. $ ELSE
  856. $!
  857. $! Check To See If The User Entered A Valid Paramter.
  858. $!
  859. $ IF (P4.EQS."VAXC").OR.(P4.EQS."DECC").OR.(P4.EQS."GNUC")!.OR.(P4.EQS."LINK")
  860. $ THEN
  861. $!
  862. $! Check To See If The User Wanted To Just LINK.
  863. $!
  864. $ IF (P4.EQS."LINK")
  865. $ THEN
  866. $!
  867. $! Looks Like LINK-only
  868. $!
  869. $ COMPILER = "LINK"
  870. $!
  871. $! Tell The User We Are Only Linking.
  872. $!
  873. $ WRITE SYS$OUTPUT "LINK Only. This actually NOT YET SUPPORTED!"
  874. $!
  875. $! End LINK Check.
  876. $!
  877. $ ENDIF
  878. $!
  879. $! Check To See If The User Wanted DECC.
  880. $!
  881. $ IF (P4.EQS."DECC")
  882. $ THEN
  883. $!
  884. $! Looks Like DECC, Set To Use DECC.
  885. $!
  886. $ COMPILER = "DECC"
  887. $!
  888. $! Tell The User We Are Using DECC.
  889. $!
  890. $ WRITE SYS$OUTPUT "Using DECC 'C' Compiler."
  891. $!
  892. $! End DECC Check.
  893. $!
  894. $ ENDIF
  895. $!
  896. $! Check To See If We Are To Use VAXC.
  897. $!
  898. $ IF (P4.EQS."VAXC")
  899. $ THEN
  900. $!
  901. $! Looks Like VAXC, Set To Use VAXC.
  902. $!
  903. $ COMPILER = "VAXC"
  904. $!
  905. $! Tell The User We Are Using VAX C.
  906. $!
  907. $ WRITE SYS$OUTPUT "Using VAXC 'C' Compiler."
  908. $!
  909. $! End VAXC Check
  910. $!
  911. $ ENDIF
  912. $!
  913. $! Check To See If We Are To Use GNU C.
  914. $!
  915. $ IF (P4.EQS."GNUC")
  916. $ THEN
  917. $!
  918. $! Looks Like GNUC, Set To Use GNUC.
  919. $!
  920. $ COMPILER = "GNUC"
  921. $!
  922. $! Tell The User We Are Using GNUC.
  923. $!
  924. $ WRITE SYS$OUTPUT "Using GNU 'C' Compiler."
  925. $!
  926. $! End The GNU C Check.
  927. $!
  928. $ ENDIF
  929. $!
  930. $! Else The User Entered An Invalid Arguement.
  931. $!
  932. $ ELSE
  933. $!
  934. $! Tell The User We Don't Know What They Want.
  935. $!
  936. $ WRITE SYS$OUTPUT ""
  937. $ WRITE SYS$OUTPUT "The Option ",P4," Is Invalid. The Valid Options Are:"
  938. $ WRITE SYS$OUTPUT ""
  939. $ WRITE SYS$OUTPUT " VAXC : To Compile With VAX C."
  940. $ WRITE SYS$OUTPUT " DECC : To Compile With DEC C."
  941. $ WRITE SYS$OUTPUT " GNUC : To Compile With GNU C."
  942. $ WRITE SYS$OUTPUT ""
  943. $!
  944. $! Time To EXIT.
  945. $!
  946. $ EXIT
  947. $!
  948. $! End The Valid Arguement Check.
  949. $!
  950. $ ENDIF
  951. $!
  952. $! End The P4 Check.
  953. $!
  954. $ ENDIF
  955. $!
  956. $! Time to check the contents of P5, and to make sure we get the correct library.
  957. $!
  958. $ IF P5.EQS."SOCKETSHR" .OR. P5.EQS."MULTINET" .OR. P5.EQS."UCX" -
  959. .OR. P5.EQS."TCPIP" .OR. P5.EQS."NONE"
  960. $ THEN
  961. $!
  962. $! Check to see if SOCKETSHR was chosen
  963. $!
  964. $ IF P5.EQS."SOCKETSHR"
  965. $ THEN
  966. $!
  967. $! Set the library to use SOCKETSHR
  968. $!
  969. $ TCPIP_LIB = "SYS$DISK:[-.VMS]SOCKETSHR_SHR.OPT/OPT"
  970. $!
  971. $! Tell the user
  972. $!
  973. $ WRITE SYS$OUTPUT "Using SOCKETSHR for TCP/IP"
  974. $!
  975. $! Done with SOCKETSHR
  976. $!
  977. $ ENDIF
  978. $!
  979. $! Check to see if MULTINET was chosen
  980. $!
  981. $ IF P5.EQS."MULTINET"
  982. $ THEN
  983. $!
  984. $! Set the library to use UCX emulation.
  985. $!
  986. $ P5 = "UCX"
  987. $!
  988. $! Tell the user
  989. $!
  990. $ WRITE SYS$OUTPUT "Using MultiNet via UCX emulation for TCP/IP"
  991. $!
  992. $! Done with MULTINET
  993. $!
  994. $ ENDIF
  995. $!
  996. $! Check to see if UCX was chosen
  997. $!
  998. $ IF P5.EQS."UCX"
  999. $ THEN
  1000. $!
  1001. $! Set the library to use UCX.
  1002. $!
  1003. $ TCPIP_LIB = "SYS$DISK:[-.VMS]UCX_SHR_DECC.OPT/OPT"
  1004. $!
  1005. $! Tell the user
  1006. $!
  1007. $ WRITE SYS$OUTPUT "Using UCX or an emulation thereof for TCP/IP"
  1008. $!
  1009. $! Done with UCX
  1010. $!
  1011. $ ENDIF
  1012. $!
  1013. $! Check to see if TCPIP was chosen
  1014. $!
  1015. $ IF P5.EQS."TCPIP"
  1016. $ THEN
  1017. $!
  1018. $! Set the library to use TCPIP (post UCX).
  1019. $!
  1020. $ TCPIP_LIB = "SYS$DISK:[-.VMS]TCPIP_SHR_DECC.OPT/OPT"
  1021. $!
  1022. $! Tell the user
  1023. $!
  1024. $ WRITE SYS$OUTPUT "Using TCPIP (post UCX) for TCP/IP"
  1025. $!
  1026. $! Done with TCPIP
  1027. $!
  1028. $ ENDIF
  1029. $!
  1030. $! Check to see if NONE was chosen
  1031. $!
  1032. $ IF P5.EQS."NONE"
  1033. $ THEN
  1034. $!
  1035. $! Do not use a TCPIP library.
  1036. $!
  1037. $ TCPIP_LIB = ""
  1038. $!
  1039. $! Tell the user
  1040. $!
  1041. $ WRITE SYS$OUTPUT "A specific TCPIP library will not be used."
  1042. $!
  1043. $! Done with NONE.
  1044. $!
  1045. $ ENDIF
  1046. $!
  1047. $! Set the TCPIP_TYPE symbol
  1048. $!
  1049. $ TCPIP_TYPE = P5
  1050. $!
  1051. $! Print info
  1052. $!
  1053. $ WRITE SYS$OUTPUT "TCP/IP library spec: ", TCPIP_LIB
  1054. $!
  1055. $! Else The User Entered An Invalid Arguement.
  1056. $!
  1057. $ ELSE
  1058. $ IF P5 .NES. ""
  1059. $ THEN
  1060. $!
  1061. $! Tell The User We Don't Know What They Want.
  1062. $!
  1063. $ WRITE SYS$OUTPUT ""
  1064. $ WRITE SYS$OUTPUT "The Option ",P5," Is Invalid. The Valid Options Are:"
  1065. $ WRITE SYS$OUTPUT ""
  1066. $ WRITE SYS$OUTPUT " SOCKETSHR : To link with SOCKETSHR TCP/IP library."
  1067. $ WRITE SYS$OUTPUT " UCX : To link with UCX TCP/IP library."
  1068. $ WRITE SYS$OUTPUT " TCPIP : To link with TCPIP TCP/IP (post UCX) library."
  1069. $ WRITE SYS$OUTPUT " NONE : To not link with a specific TCP/IP library."
  1070. $ WRITE SYS$OUTPUT ""
  1071. $!
  1072. $! Time To EXIT.
  1073. $!
  1074. $ EXIT
  1075. $ ELSE
  1076. $!
  1077. $! If TCPIP is not defined, then hardcode it to make
  1078. $! it clear that no TCPIP is desired.
  1079. $!
  1080. $ IF P5 .EQS. ""
  1081. $ THEN
  1082. $ TCPIP_LIB = ""
  1083. $ TCPIP_TYPE = "NONE"
  1084. $ ELSE
  1085. $!
  1086. $! Set the TCPIP_TYPE symbol
  1087. $!
  1088. $ TCPIP_TYPE = P5
  1089. $ ENDIF
  1090. $ ENDIF
  1091. $!
  1092. $! Done with TCP/IP libraries
  1093. $!
  1094. $ ENDIF
  1095. $!
  1096. $! Special Threads For OpenVMS v7.1 Or Later
  1097. $!
  1098. $! Written By: Richard Levitte
  1099. $! richard@levitte.org
  1100. $!
  1101. $!
  1102. $! Check To See If We Have A Option For P6.
  1103. $!
  1104. $ IF (P6.EQS."")
  1105. $ THEN
  1106. $!
  1107. $! Get The Version Of VMS We Are Using.
  1108. $!
  1109. $ ISSEVEN :=
  1110. $ TMP = F$ELEMENT(0,"-",F$EXTRACT(1,4,F$GETSYI("VERSION")))
  1111. $ TMP = F$INTEGER(F$ELEMENT(0,".",TMP)+F$ELEMENT(1,".",TMP))
  1112. $!
  1113. $! Check To See If The VMS Version Is v7.1 Or Later.
  1114. $!
  1115. $ IF (TMP.GE.71)
  1116. $ THEN
  1117. $!
  1118. $! We Have OpenVMS v7.1 Or Later, So Use The Special Threads.
  1119. $!
  1120. $ ISSEVEN := ,PTHREAD_USE_D4
  1121. $!
  1122. $! End The VMS Version Check.
  1123. $!
  1124. $ ENDIF
  1125. $!
  1126. $! End The P6 Check.
  1127. $!
  1128. $ ENDIF
  1129. $!
  1130. $! Time To RETURN...
  1131. $!
  1132. $ RETURN