makevms.com 28 KB

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