makevms.com 29 KB

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