makevms.com 40 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570
  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. $! P1 specifies one of the following build options:
  19. $!
  20. $! ALL Just build "everything".
  21. $! CONFIG Just build the "[.CRYPTO._xxx]OPENSSLCONF.H" file.
  22. $! BUILDINF Just build the "[.CRYPTO._xxx]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. $! 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. $! P2, if defined, specifies the C pointer size. Ignored on VAX.
  34. $! ("64=ARGV" gives more efficient code with HP C V7.3 or newer.)
  35. $! Supported values are:
  36. $!
  37. $! "" Compile with default (/NOPOINTER_SIZE).
  38. $! 32 Compile with /POINTER_SIZE=32 (SHORT).
  39. $! 64 Compile with /POINTER_SIZE=64[=ARGV] (LONG[=ARGV]).
  40. $! (Automatically select ARGV if compiler supports it.)
  41. $! 64= Compile with /POINTER_SIZE=64 (LONG).
  42. $! 64=ARGV Compile with /POINTER_SIZE=64=ARGV (LONG=ARGV).
  43. $!
  44. $! P3 specifies DEBUG or NODEBUG, to compile with or without debugging
  45. $! information.
  46. $!
  47. $! P4 specifies which compiler to try to compile under.
  48. $!
  49. $! VAXC For VAX C.
  50. $! DECC For DEC C.
  51. $! GNUC For GNU C.
  52. $! LINK To only link the programs from existing object files.
  53. $! (not yet implemented)
  54. $!
  55. $! If you don't specify a compiler, it will try to determine which
  56. $! "C" compiler to use.
  57. $!
  58. $! P5, if defined, sets a TCP/IP library to use, through one of the following
  59. $! keywords:
  60. $!
  61. $! UCX for UCX or UCX emulation
  62. $! TCPIP for TCP/IP Services or TCP/IP Services emulation
  63. $! (this is prefered over UCX)
  64. $! SOCKETSHR for SOCKETSHR+NETLIB
  65. $! NONE to avoid specifying which TCP/IP implementation to
  66. $! use at build time (this works with DEC C). This is
  67. $! the default.
  68. $!
  69. $! P6, if defined, sets a compiler thread NOT needed on OpenVMS 7.1 (and up).
  70. $!
  71. $! P7, if defined, specifies a directory where ZLIB files (zlib.h,
  72. $! libz.olb) may be found. Optionally, a non-default object library
  73. $! name may be included ("dev:[dir]libz_64.olb", for example).
  74. $!
  75. $!
  76. $! Announce/identify.
  77. $!
  78. $ proc = f$environment( "procedure")
  79. $ write sys$output "@@@ "+ -
  80. f$parse( proc, , , "name")+ f$parse( proc, , , "type")
  81. $!
  82. $ DEF_ORIG = F$ENVIRONMENT( "DEFAULT")
  83. $ ON ERROR THEN GOTO TIDY
  84. $ ON CONTROL_C THEN GOTO TIDY
  85. $!
  86. $! Check if we're in a batch job, and make sure we get to
  87. $! the directory this script is in
  88. $!
  89. $ IF F$MODE() .EQS. "BATCH"
  90. $ THEN
  91. $ COMNAME=F$ENVIRONMENT("PROCEDURE")
  92. $ COMPATH=F$PARSE("A.;",COMNAME) - "A.;"
  93. $ SET DEF 'COMPATH'
  94. $ ENDIF
  95. $!
  96. $! Check What Architecture We Are Using.
  97. $!
  98. $ IF (F$GETSYI("CPU").LT.128)
  99. $ THEN
  100. $!
  101. $! The Architecture Is VAX.
  102. $!
  103. $ ARCH = "VAX"
  104. $!
  105. $! Else...
  106. $!
  107. $ ELSE
  108. $!
  109. $! The Architecture Is Alpha, IA64 or whatever comes in the future.
  110. $!
  111. $ ARCH = F$EDIT( F$GETSYI( "ARCH_NAME"), "UPCASE")
  112. $ IF (ARCH .EQS. "") THEN ARCH = "UNK"
  113. $!
  114. $! End The Architecture Check.
  115. $!
  116. $ ENDIF
  117. $!
  118. $ ARCHD = ARCH
  119. $ LIB32 = "32"
  120. $ POINTER_SIZE = ""
  121. $!
  122. $! Get VMS version.
  123. $!
  124. $ VMS_VERSION = f$edit( f$getsyi( "VERSION"), "TRIM")
  125. $!
  126. $! Check To Make Sure We Have Valid Command Line Parameters.
  127. $!
  128. $ GOSUB CHECK_OPTIONS
  129. $!
  130. $! Check To See What We Are To Do.
  131. $!
  132. $ IF (BUILDCOMMAND.EQS."ALL")
  133. $ THEN
  134. $!
  135. $! Start with building the OpenSSL configuration file.
  136. $!
  137. $ GOSUB CONFIG
  138. $!
  139. $! Create The "BUILDINF.H" Include File.
  140. $!
  141. $ GOSUB BUILDINF
  142. $!
  143. $! Fix The Unix Softlinks.
  144. $!
  145. $ GOSUB SOFTLINKS
  146. $!
  147. $ ENDIF
  148. $!
  149. $ IF (BUILDCOMMAND.EQS."ALL".OR.BUILDCOMMAND.EQS."BUILDALL")
  150. $ THEN
  151. $!
  152. $! Build The [.xxx.EXE.CRYPTO]LIBCRYPTO.OLB Library.
  153. $!
  154. $ GOSUB CRYPTO
  155. $!
  156. $! Build The [.xxx.EXE.SSL]LIBSSL.OLB Library.
  157. $!
  158. $ GOSUB SSL
  159. $!
  160. $! Build The [.xxx.EXE.TEST] OpenSSL Test Utilities.
  161. $!
  162. $ GOSUB TEST
  163. $!
  164. $! Build The [.xxx.EXE.APPS] OpenSSL Application Utilities.
  165. $!
  166. $ GOSUB APPS
  167. $!
  168. $! Build The [.xxx.EXE.ENGINES] OpenSSL Shareable Engines.
  169. $!
  170. $ GOSUB ENGINES
  171. $!
  172. $! Else...
  173. $!
  174. $ ELSE
  175. $!
  176. $! Build Just What The User Wants Us To Build.
  177. $!
  178. $ GOSUB 'BUILDCOMMAND'
  179. $!
  180. $ ENDIF
  181. $!
  182. $! Time To EXIT.
  183. $!
  184. $ GOTO TIDY
  185. $!
  186. $! Rebuild The [.CRYPTO._xxx]OPENSSLCONF.H" file.
  187. $!
  188. $ CONFIG:
  189. $!
  190. $! Tell The User We Are Creating The [.CRYPTO._xxx]OPENSSLCONF.H File.
  191. $!
  192. $ WRITE SYS$OUTPUT "Creating [.CRYPTO.''ARCHD']OPENSSLCONF.H Include File."
  193. $!
  194. $! First, make sure the directory exists.
  195. $!
  196. $ IF F$PARSE("SYS$DISK:[.CRYPTO.''ARCHD']") .EQS. "" THEN -
  197. CREATE/DIRECTORY SYS$DISK:[.CRYPTO.'ARCHD']
  198. $!
  199. $! Different tar/UnZip versions/option may have named the file differently
  200. $ IF F$SEARCH("[.crypto]opensslconf.h_in") .NES. ""
  201. $ THEN
  202. $ OPENSSLCONF_H_IN = "[.crypto]opensslconf.h_in"
  203. $ ELSE
  204. $ IF F$SEARCH( "[.crypto]opensslconf_h.in") .NES. ""
  205. $ THEN
  206. $ OPENSSLCONF_H_IN = "[.crypto]opensslconf_h.in"
  207. $ ELSE
  208. $ ! For ODS-5
  209. $ IF F$SEARCH( "[.crypto]opensslconf.h.in") .NES. ""
  210. $ THEN
  211. $ OPENSSLCONF_H_IN = "[.crypto]opensslconf.h.in"
  212. $ ELSE
  213. $ WRITE SYS$ERROR "Couldn't find a [.crypto]opensslconf.h.in. Exiting!"
  214. $ $STATUS = %X00018294 ! "%RMS-F-FNF, file not found".
  215. $ GOTO TIDY
  216. $ ENDIF
  217. $ ENDIF
  218. $ ENDIF
  219. $!
  220. $! Create The [.CRYPTO._xxx]OPENSSLCONF.H File.
  221. $! Make sure it has the right format.
  222. $!
  223. $ OSCH_NAME = "SYS$DISK:[.CRYPTO.''ARCHD']OPENSSLCONF.H"
  224. $ CREATE /FDL=SYS$INPUT: 'OSCH_NAME'
  225. RECORD
  226. FORMAT stream_lf
  227. $ OPEN /APPEND H_FILE 'OSCH_NAME'
  228. $!
  229. $! Write The [.CRYPTO._xxx]OPENSSLCONF.H File.
  230. $!
  231. $ WRITE H_FILE "/* This file was automatically built using makevms.com */"
  232. $ WRITE H_FILE "/* and ''OPENSSLCONF_H_IN' */"
  233. $!
  234. $! Write a few macros that indicate how this system was built.
  235. $!
  236. $ WRITE H_FILE ""
  237. $ WRITE H_FILE "#ifndef OPENSSL_SYS_VMS"
  238. $ WRITE H_FILE "# define OPENSSL_SYS_VMS"
  239. $ WRITE H_FILE "#endif"
  240. $
  241. $!
  242. $! Defined the full SDIRS here. It will be pruned depending on configuration.
  243. $! This is an exact copy of what's found in Makefile.in, with spaces replaced
  244. $! with commas.
  245. $!
  246. $ SDIRS := -
  247. objects,-
  248. md2,md4,md5,sha,mdc2,hmac,ripemd,whrlpool,-
  249. des,aes,rc2,rc4,rc5,idea,bf,cast,camellia,seed,modes,-
  250. bn,ec,rsa,dsa,ecdsa,dh,ecdh,dso,engine,-
  251. buffer,bio,stack,lhash,rand,err,-
  252. evp,asn1,pem,x509,x509v3,conf,txt_db,pkcs7,pkcs12,comp,ocsp,ui,-
  253. cms,pqueue,ts,jpake,srp,store,cmac
  254. $
  255. $! One of the best way to figure out what the list should be is to do
  256. $! the following on a Unix system:
  257. $! grep OPENSSL_NO_ crypto/include/internal/*.h crypto/*/*.h ssl/*.h engines/*.h engines/*/*.h|grep ':# *if'|sed -e 's/^.*def //'|sort|uniq
  258. $! For that reason, the list will also always end up in alphabetical order
  259. $ CONFIG_LOGICALS := AES,-
  260. ASM,INLINE_ASM,-
  261. BF,-
  262. CAMELLIA,-
  263. CAST,-
  264. CMS,-
  265. COMP,-
  266. DEPRECATED,-
  267. DES,-
  268. DGRAM,-
  269. DH,-
  270. DSA,-
  271. EC,-
  272. EC2M,-
  273. ECDH,-
  274. ECDSA,-
  275. EC_NISTP_64_GCC_128,-
  276. ENGINE,-
  277. ERR,-
  278. GMP,-
  279. GOST,-
  280. HEARTBEATS,-
  281. HMAC,-
  282. IDEA,-
  283. JPAKE,-
  284. MD2,-
  285. MD4,-
  286. MD5,-
  287. MDC2,-
  288. NEXTPROTONEG,-
  289. OCB,-
  290. OCSP,-
  291. PSK,-
  292. RC2,-
  293. RC4,-
  294. RC5,-
  295. RFC3779,-
  296. RMD160,-
  297. RSA,-
  298. SCT,-
  299. SCRYPT,-
  300. SCTP,-
  301. SEED,-
  302. SOCK,-
  303. SRP,-
  304. SRTP,-
  305. SSL3_METHOD,-
  306. SSL_TRACE,-
  307. STATIC_ENGINE,-
  308. STDIO,-
  309. STORE,-
  310. UNIT_TEST,-
  311. WHIRLPOOL
  312. $ CONFIG_EXPERIMENTAL := JPAKE,-
  313. STORE
  314. $! The following rules, which dictate how some algorithm choices affect
  315. $! others, are picked from Configure.
  316. $! Quick syntax:
  317. $! list = item[ ; list]
  318. $! item = algos / dependents
  319. $! algos = algo [, algos]
  320. $! dependents = dependent [, dependents]
  321. $! When a list of algos is specified in one item, it means that they must
  322. $! all be disabled for the rule to apply.
  323. $! When a list of dependents is specified in one item, it means that they
  324. $! will all be disabled if the rule applies.
  325. $! Rules are checked sequentially. If a rule disables an algorithm, it will
  326. $! affect all following rules that depend on that algorithm being disabled.
  327. $! To force something to be enabled or disabled, have no algorithms in the
  328. $! algos part.
  329. $ CONFIG_DISABLE_RULES := RIJNDAEL/AES;-
  330. RMD160/RIPEMD;-
  331. DES/MDC2;-
  332. EC/ECDSA,ECDH;-
  333. MD5/SSL3,TLS1;-
  334. SHA/SSL3,TLS1;-
  335. RSA,DSA/SSL3,TLS1;-
  336. DH/SSL3,TLS1;-
  337. EC/GOST;-
  338. DSA/GOST;-
  339. DH/GOST;-
  340. /STATIC_ENGINE;-
  341. /DEPRECATED;-
  342. /EC_NISTP_64_GCC_128;-
  343. /GMP;-
  344. /MD2;-
  345. /RC5;-
  346. /RFC3779;-
  347. /SCTP;-
  348. /SSL_TRACE;-
  349. /UNIT_TEST
  350. $ CONFIG_ENABLE_RULES := ZLIB_DYNAMIC/ZLIB;-
  351. /THREADS
  352. $
  353. $! Architecture specific rule addtions
  354. $ IF ARCH .EQS. "VAX"
  355. $ THEN
  356. $ ! Disable algorithms that require 64-bit integers in C
  357. $ CONFIG_DISABLE_RULES = CONFIG_DISABLE_RULES + -
  358. ";/GOST" + -
  359. ";/WHIRLPOOL"
  360. $ ENDIF
  361. $
  362. $! Keep track of things to remove from SDIRS, have the items surrounded
  363. $! with commas
  364. $ SKIP_SDIRS = ","
  365. $
  366. $ CONFIG_LOG_I = 0
  367. $ CONFIG_LOG_LOOP11:
  368. $ CONFIG_LOG_E = F$EDIT(F$ELEMENT(CONFIG_LOG_I,",",CONFIG_LOGICALS),"TRIM")
  369. $ CONFIG_LOG_I = CONFIG_LOG_I + 1
  370. $ IF CONFIG_LOG_E .EQS. "" THEN GOTO CONFIG_LOG_LOOP11
  371. $ IF CONFIG_LOG_E .EQS. "," THEN GOTO CONFIG_LOG_LOOP11_END
  372. $ IF F$TRNLNM("OPENSSL_NO_"+CONFIG_LOG_E)
  373. $ THEN
  374. $ CONFIG_DISABLED_'CONFIG_LOG_E' := YES
  375. $ CONFIG_ENABLED_'CONFIG_LOG_E' := NO
  376. $ CONFIG_CHANGED_'CONFIG_LOG_E' := YES
  377. $ IF (SKIP_SDIRS - (","+CONFIG_LOG_E+",")) .EQS. SKIP_SDIRS THEN -
  378. SKIP_SDIRS = SKIP_SDIRS + CONFIG_LOG_E + ","
  379. $ ELSE
  380. $ CONFIG_DISABLED_'CONFIG_LOG_E' := NO
  381. $ CONFIG_ENABLED_'CONFIG_LOG_E' := YES
  382. $ ! Because all non-experimental algorithms are assumed
  383. $ ! enabled by default
  384. $ CONFIG_CHANGED_'CONFIG_LOG_E' := NO
  385. $ IF (SKIP_SDIRS - (","+CONFIG_LOG_E+",")) .NES. SKIP_SDIRS THEN -
  386. SKIP_SDIRS = SKIP_SDIRS - (CONFIG_LOG_E + ",")
  387. $ ENDIF
  388. $ GOTO CONFIG_LOG_LOOP11
  389. $ CONFIG_LOG_LOOP11_END:
  390. $
  391. $ CONFIG_LOG_I = 0
  392. $ CONFIG_LOG_LOOP12:
  393. $ CONFIG_LOG_E = F$EDIT(F$ELEMENT(CONFIG_LOG_I,",",CONFIG_EXPERIMENTAL),"TRIM")
  394. $ CONFIG_LOG_I = CONFIG_LOG_I + 1
  395. $ IF CONFIG_LOG_E .EQS. "" THEN GOTO CONFIG_LOG_LOOP12
  396. $ IF CONFIG_LOG_E .EQS. "," THEN GOTO CONFIG_LOG_LOOP12_END
  397. $ IF F$TRNLNM("OPENSSL_EXPERIMENTAL_"+CONFIG_LOG_E)
  398. $ THEN
  399. $ CONFIG_DISABLED_'CONFIG_LOG_E' := NO
  400. $ CONFIG_ENABLED_'CONFIG_LOG_E' := YES
  401. $ CONFIG_CHANGED_'CONFIG_LOG_E' := YES
  402. $ IF (SKIP_SDIRS - (","+CONFIG_LOG_E+",")) .NES. SKIP_SDIRS THEN -
  403. SKIP_SDIRS = SKIP_SDIRS - (CONFIG_LOG_E + ",")
  404. $ ELSE
  405. $ CONFIG_DISABLED_'CONFIG_LOG_E' := YES
  406. $ CONFIG_ENABLED_'CONFIG_LOG_E' := NO
  407. $ ! Because all experimental algorithms are assumed
  408. $ ! disabled by default
  409. $ CONFIG_CHANGED_'CONFIG_LOG_E' := NO
  410. $ IF (SKIP_SDIRS - (","+CONFIG_LOG_E+",")) .EQS. SKIP_SDIRS THEN -
  411. SKIP_SDIRS = SKIP_SDIRS + CONFIG_LOG_E + ","
  412. $ ENDIF
  413. $ GOTO CONFIG_LOG_LOOP12
  414. $ CONFIG_LOG_LOOP12_END:
  415. $
  416. $! Apply cascading disable rules
  417. $ CONFIG_DISABLE_I = 0
  418. $ CONFIG_DISABLE_LOOP0:
  419. $ CONFIG_DISABLE_E = F$EDIT(F$ELEMENT(CONFIG_DISABLE_I,";", -
  420. CONFIG_DISABLE_RULES),"TRIM")
  421. $ CONFIG_DISABLE_I = CONFIG_DISABLE_I + 1
  422. $ IF CONFIG_DISABLE_E .EQS. "" THEN GOTO CONFIG_DISABLE_LOOP0
  423. $ IF CONFIG_DISABLE_E .EQS. ";" THEN GOTO CONFIG_DISABLE_LOOP0_END
  424. $
  425. $ CONFIG_DISABLE_ALGOS = F$EDIT(F$ELEMENT(0,"/",CONFIG_DISABLE_E),"TRIM")
  426. $ CONFIG_DISABLE_DEPENDENTS = F$EDIT(F$ELEMENT(1,"/",CONFIG_DISABLE_E),"TRIM")
  427. $ TO_DISABLE := YES
  428. $ CONFIG_ALGO_I = 0
  429. $ CONFIG_DISABLE_LOOP1:
  430. $ CONFIG_ALGO_E = F$EDIT(F$ELEMENT(CONFIG_ALGO_I,",", -
  431. CONFIG_DISABLE_ALGOS),"TRIM")
  432. $ CONFIG_ALGO_I = CONFIG_ALGO_I + 1
  433. $ IF CONFIG_ALGO_E .EQS. "" THEN GOTO CONFIG_DISABLE_LOOP1
  434. $ IF CONFIG_ALGO_E .EQS. "," THEN GOTO CONFIG_DISABLE_LOOP1_END
  435. $ IF F$TYPE(CONFIG_DISABLED_'CONFIG_ALGO_E') .EQS. ""
  436. $ THEN
  437. $ TO_DISABLE := NO
  438. $ ELSE
  439. $ IF .NOT. CONFIG_DISABLED_'CONFIG_ALGO_E' THEN TO_DISABLE := NO
  440. $ ENDIF
  441. $ GOTO CONFIG_DISABLE_LOOP1
  442. $ CONFIG_DISABLE_LOOP1_END:
  443. $
  444. $ IF TO_DISABLE
  445. $ THEN
  446. $ CONFIG_DEPENDENT_I = 0
  447. $ CONFIG_DISABLE_LOOP2:
  448. $ CONFIG_DEPENDENT_E = F$EDIT(F$ELEMENT(CONFIG_DEPENDENT_I,",", -
  449. CONFIG_DISABLE_DEPENDENTS),"TRIM")
  450. $ CONFIG_DEPENDENT_I = CONFIG_DEPENDENT_I + 1
  451. $ IF CONFIG_DEPENDENT_E .EQS. "" THEN GOTO CONFIG_DISABLE_LOOP2
  452. $ IF CONFIG_DEPENDENT_E .EQS. "," THEN GOTO CONFIG_DISABLE_LOOP2_END
  453. $ CONFIG_DISABLED_'CONFIG_DEPENDENT_E' := YES
  454. $ CONFIG_ENABLED_'CONFIG_DEPENDENT_E' := NO
  455. $ ! Better not to assume defaults at this point...
  456. $ CONFIG_CHANGED_'CONFIG_DEPENDENT_E' := YES
  457. $ IF (SKIP_SDIRS - (","+CONFIG_DEPENDENT_E+",")) .EQS. SKIP_SDIRS THEN -
  458. SKIP_SDIRS = SKIP_SDIRS + CONFIG_DEPENDENT_E + ","
  459. $ WRITE SYS$ERROR -
  460. "''CONFIG_DEPENDENT_E' disabled by rule ''CONFIG_DISABLE_E'"
  461. $ GOTO CONFIG_DISABLE_LOOP2
  462. $ CONFIG_DISABLE_LOOP2_END:
  463. $ ENDIF
  464. $ GOTO CONFIG_DISABLE_LOOP0
  465. $ CONFIG_DISABLE_LOOP0_END:
  466. $
  467. $! Apply cascading enable rules
  468. $ CONFIG_ENABLE_I = 0
  469. $ CONFIG_ENABLE_LOOP0:
  470. $ CONFIG_ENABLE_E = F$EDIT(F$ELEMENT(CONFIG_ENABLE_I,";", -
  471. CONFIG_ENABLE_RULES),"TRIM")
  472. $ CONFIG_ENABLE_I = CONFIG_ENABLE_I + 1
  473. $ IF CONFIG_ENABLE_E .EQS. "" THEN GOTO CONFIG_ENABLE_LOOP0
  474. $ IF CONFIG_ENABLE_E .EQS. ";" THEN GOTO CONFIG_ENABLE_LOOP0_END
  475. $
  476. $ CONFIG_ENABLE_ALGOS = F$EDIT(F$ELEMENT(0,"/",CONFIG_ENABLE_E),"TRIM")
  477. $ CONFIG_ENABLE_DEPENDENTS = F$EDIT(F$ELEMENT(1,"/",CONFIG_ENABLE_E),"TRIM")
  478. $ TO_ENABLE := YES
  479. $ CONFIG_ALGO_I = 0
  480. $ CONFIG_ENABLE_LOOP1:
  481. $ CONFIG_ALGO_E = F$EDIT(F$ELEMENT(CONFIG_ALGO_I,",", -
  482. CONFIG_ENABLE_ALGOS),"TRIM")
  483. $ CONFIG_ALGO_I = CONFIG_ALGO_I + 1
  484. $ IF CONFIG_ALGO_E .EQS. "" THEN GOTO CONFIG_ENABLE_LOOP1
  485. $ IF CONFIG_ALGO_E .EQS. "," THEN GOTO CONFIG_ENABLE_LOOP1_END
  486. $ IF F$TYPE(CONFIG_ENABLED_'CONFIG_ALGO_E') .EQS. ""
  487. $ THEN
  488. $ TO_ENABLE := NO
  489. $ ELSE
  490. $ IF .NOT. CONFIG_ENABLED_'CONFIG_ALGO_E' THEN TO_ENABLE := NO
  491. $ ENDIF
  492. $ GOTO CONFIG_ENABLE_LOOP1
  493. $ CONFIG_ENABLE_LOOP1_END:
  494. $
  495. $ IF TO_ENABLE
  496. $ THEN
  497. $ CONFIG_DEPENDENT_I = 0
  498. $ CONFIG_ENABLE_LOOP2:
  499. $ CONFIG_DEPENDENT_E = F$EDIT(F$ELEMENT(CONFIG_DEPENDENT_I,",", -
  500. CONFIG_ENABLE_DEPENDENTS),"TRIM")
  501. $ CONFIG_DEPENDENT_I = CONFIG_DEPENDENT_I + 1
  502. $ IF CONFIG_DEPENDENT_E .EQS. "" THEN GOTO CONFIG_ENABLE_LOOP2
  503. $ IF CONFIG_DEPENDENT_E .EQS. "," THEN GOTO CONFIG_ENABLE_LOOP2_END
  504. $ CONFIG_DISABLED_'CONFIG_DEPENDENT_E' := NO
  505. $ CONFIG_ENABLED_'CONFIG_DEPENDENT_E' := YES
  506. $ ! Better not to assume defaults at this point...
  507. $ CONFIG_CHANGED_'CONFIG_DEPENDENT_E' := YES
  508. $ IF (SKIP_SDIRS - (","+CONFIG_DEPENDENT_E+",")) .NES. SKIP_SDIRS THEN -
  509. SKIP_SDIRS = SKIP_SDIRS - (CONFIG_DEPENDENT_E + ",")
  510. $ WRITE SYS$ERROR -
  511. "''CONFIG_DEPENDENT_E' enabled by rule ''CONFIG_ENABLE_E'"
  512. $ GOTO CONFIG_ENABLE_LOOP2
  513. $ CONFIG_ENABLE_LOOP2_END:
  514. $ ENDIF
  515. $ GOTO CONFIG_ENABLE_LOOP0
  516. $ CONFIG_ENABLE_LOOP0_END:
  517. $
  518. $! Fix SDIRS
  519. $ SDIRS = ","+F$EDIT(SDIRS,"COLLAPSE")+","
  520. $ CONFIG_SKIP_I = 0
  521. $ CONFIG_SDIRS_LOOP1:
  522. $ CONFIG_SKIP_E = F$EDIT(F$ELEMENT(CONFIG_SKIP_I,",",SKIP_SDIRS),"TRIM")
  523. $ CONFIG_SKIP_I = CONFIG_SKIP_I + 1
  524. $ IF CONFIG_SKIP_E .EQS. "" THEN GOTO CONFIG_SDIRS_LOOP1
  525. $ IF CONFIG_SKIP_E .EQS. "," THEN GOTO CONFIG_SDIRS_LOOP1_END
  526. $ IF (SDIRS - (","+CONFIG_SKIP_E+",")) .NES. SDIRS THEN -
  527. SDIRS = SDIRS - (CONFIG_SKIP_E+",")
  528. $ GOTO CONFIG_SDIRS_LOOP1
  529. $ CONFIG_SDIRS_LOOP1_END:
  530. $
  531. $! Write to the configuration
  532. $ CONFIG_LOG_I = 0
  533. $ CONFIG_LOG_LOOP2:
  534. $ CONFIG_LOG_E = F$EDIT(F$ELEMENT(CONFIG_LOG_I,",",CONFIG_LOGICALS),"TRIM")
  535. $ CONFIG_LOG_I = CONFIG_LOG_I + 1
  536. $ IF CONFIG_LOG_E .EQS. "" THEN GOTO CONFIG_LOG_LOOP2
  537. $ IF CONFIG_LOG_E .EQS. "," THEN GOTO CONFIG_LOG_LOOP2_END
  538. $ IF CONFIG_DISABLED_'CONFIG_LOG_E'
  539. $ THEN
  540. $ WRITE H_FILE "#ifndef OPENSSL_NO_",CONFIG_LOG_E
  541. $ WRITE H_FILE "# define OPENSSL_NO_",CONFIG_LOG_E
  542. $ WRITE H_FILE "#endif"
  543. $ ELSE
  544. $ IF CONFIG_CHANGED_'CONFIG_LOG_E'
  545. $ THEN
  546. $ WRITE H_FILE "#ifndef OPENSSL_EXPERIMENTAL_",CONFIG_LOG_E
  547. $ WRITE H_FILE "# ifndef OPENSSL_NO_",CONFIG_LOG_E
  548. $ WRITE H_FILE "# define OPENSSL_NO_",CONFIG_LOG_E
  549. $ WRITE H_FILE "# endif"
  550. $ WRITE H_FILE "#endif"
  551. $
  552. $ IF F$TYPE(USER_CCDEFS) .NES. ""
  553. $ THEN
  554. $ USER_CCDEFS = USER_CCDEFS + ",OPENSSL_EXPERIMENTAL_" + CONFIG_LOG_E
  555. $ ELSE
  556. $ USER_CCDEFS = "OPENSSL_EXPERIMENTAL_" + CONFIG_LOG_E
  557. $ ENDIF
  558. $ ENDIF
  559. $ ENDIF
  560. $ GOTO CONFIG_LOG_LOOP2
  561. $ CONFIG_LOG_LOOP2_END:
  562. $
  563. $ WRITE/SYMBOL SYS$ERROR "SDIRS = """,SDIRS,""""
  564. $!
  565. $ WRITE H_FILE ""
  566. $ WRITE H_FILE "/* STCP support comes with TCPIP 5.7 ECO 2 "
  567. $ WRITE H_FILE " * enable on newer systems / 2012-02-24 arpadffy */"
  568. $ WRITE H_FILE "#define OPENSSL_NO_SCTP"
  569. $ WRITE H_FILE ""
  570. $!
  571. $! Add in the common "crypto/opensslconf.h.in".
  572. $!
  573. $ TYPE 'OPENSSLCONF_H_IN' /OUTPUT=H_FILE:
  574. $!
  575. $ IF ARCH .NES. "VAX"
  576. $ THEN
  577. $!
  578. $! Write the non-VAX specific data
  579. $!
  580. $ WRITE H_FILE "#if defined(HEADER_RC4_H)"
  581. $ WRITE H_FILE "#undef RC4_INT"
  582. $ WRITE H_FILE "#define RC4_INT unsigned int"
  583. $ WRITE H_FILE "#undef RC4_CHUNK"
  584. $ WRITE H_FILE "#define RC4_CHUNK unsigned long long"
  585. $ WRITE H_FILE "#endif"
  586. $!
  587. $ WRITE H_FILE "#if defined(HEADER_DES_LOCL_H)"
  588. $ WRITE H_FILE "#undef OSSL_DES_LONG"
  589. $ WRITE H_FILE "#define OSSL_DES_LONG unsigned int"
  590. $ WRITE H_FILE "#undef DES_PTR"
  591. $ WRITE H_FILE "#define DES_PTR"
  592. $ WRITE H_FILE "#undef DES_RISC1"
  593. $ WRITE H_FILE "#undef DES_RISC2"
  594. $ WRITE H_FILE "#define DES_RISC1"
  595. $ WRITE H_FILE "#undef DES_UNROLL"
  596. $ WRITE H_FILE "#define DES_UNROLL"
  597. $ WRITE H_FILE "#endif"
  598. $!
  599. $ WRITE H_FILE "#if defined(HEADER_BN_H)"
  600. $ WRITE H_FILE "#undef BN_LLONG" ! Never define with SIXTY_FOUR_BIT
  601. $ WRITE H_FILE "#undef SIXTY_FOUR_BIT_LONG"
  602. $ WRITE H_FILE "#undef SIXTY_FOUR_BIT"
  603. $ WRITE H_FILE "#define SIXTY_FOUR_BIT"
  604. $ WRITE H_FILE "#undef THIRTY_TWO_BIT"
  605. $ WRITE H_FILE "#undef SIXTEEN_BIT"
  606. $ WRITE H_FILE "#undef EIGHT_BIT"
  607. $ WRITE H_FILE "#endif"
  608. $
  609. $ WRITE H_FILE "#undef OPENSSL_EXPORT_VAR_AS_FUNCTION"
  610. $!
  611. $! Else...
  612. $!
  613. $ ELSE
  614. $!
  615. $! Write the VAX specific data
  616. $!
  617. $ WRITE H_FILE "#if defined(HEADER_RC4_H)"
  618. $ WRITE H_FILE "#undef RC4_INT"
  619. $ WRITE H_FILE "#define RC4_INT unsigned char"
  620. $ WRITE H_FILE "#undef RC4_CHUNK"
  621. $ WRITE H_FILE "#define RC4_CHUNK unsigned long"
  622. $ WRITE H_FILE "#endif"
  623. $!
  624. $ WRITE H_FILE "#if defined(HEADER_DES_LOCL_H)"
  625. $ WRITE H_FILE "#undef OSSL_DES_LONG"
  626. $ WRITE H_FILE "#define OSSL_DES_LONG unsigned long"
  627. $ WRITE H_FILE "#undef DES_PTR"
  628. $ WRITE H_FILE "#define DES_PTR"
  629. $ WRITE H_FILE "#undef DES_RISC1"
  630. $ WRITE H_FILE "#undef DES_RISC2"
  631. $ WRITE H_FILE "#undef DES_UNROLL"
  632. $ WRITE H_FILE "#endif"
  633. $!
  634. $ WRITE H_FILE "#if defined(HEADER_BN_H)"
  635. $ WRITE H_FILE "#undef BN_LLONG" ! VAX C/DEC C doesn't have long long
  636. $ WRITE H_FILE "#undef SIXTY_FOUR_BIT_LONG"
  637. $ WRITE H_FILE "#undef SIXTY_FOUR_BIT"
  638. $ WRITE H_FILE "#undef THIRTY_TWO_BIT"
  639. $ WRITE H_FILE "#define THIRTY_TWO_BIT"
  640. $ WRITE H_FILE "#undef SIXTEEN_BIT"
  641. $ WRITE H_FILE "#undef EIGHT_BIT"
  642. $ WRITE H_FILE "#endif"
  643. $!
  644. $ WRITE H_FILE "#undef OPENSSL_EXPORT_VAR_AS_FUNCTION"
  645. $ WRITE H_FILE "#define OPENSSL_EXPORT_VAR_AS_FUNCTION"
  646. $!
  647. $! End
  648. $!
  649. $ ENDIF
  650. $!
  651. $! Close the [.CRYPTO._xxx]OPENSSLCONF.H file
  652. $!
  653. $ CLOSE H_FILE
  654. $!
  655. $! Purge The [.CRYPTO._xxx]OPENSSLCONF.H file
  656. $!
  657. $ PURGE SYS$DISK:[.CRYPTO.'ARCHD']OPENSSLCONF.H
  658. $!
  659. $! That's All, Time To RETURN.
  660. $!
  661. $ RETURN
  662. $!
  663. $! Rebuild The "[.CRYPTO._xxx]BUILDINF.H" file.
  664. $!
  665. $ BUILDINF:
  666. $!
  667. $! Tell The User We Are Creating The [.CRYPTO._xxx]BUILDINF.H File.
  668. $!
  669. $ WRITE SYS$OUTPUT "Creating [.CRYPTO.''ARCHD']BUILDINF.H Include File."
  670. $!
  671. $! Create The [.CRYPTO._xxx]BUILDINF.H File.
  672. $!
  673. $ BIH_NAME = "SYS$DISK:[.CRYPTO.''ARCHD']BUILDINF.H"
  674. $ CREATE /FDL=SYS$INPUT: 'BIH_NAME'
  675. RECORD
  676. FORMAT stream_lf
  677. $!
  678. $ OPEN /APPEND H_FILE 'bih_name'
  679. $!
  680. $! Get The Current Date & Time.
  681. $!
  682. $ TIME = F$TIME()
  683. $!
  684. $! Write The [.CRYPTO._xxx]BUILDINF.H File.
  685. $!
  686. $ CFLAGS = ""
  687. $ if (POINTER_SIZE .nes. "")
  688. $ then
  689. $ CFLAGS = CFLAGS+ "/POINTER_SIZE=''POINTER_SIZE'"
  690. $ endif
  691. $ if (ZLIB .nes. "")
  692. $ then
  693. $ if (CFLAGS .nes. "") then CFLAGS = CFLAGS+ " "
  694. $ CFLAGS = CFLAGS+ "/DEFINE=ZLIB"
  695. $ endif
  696. $!
  697. $ WRITE H_FILE "#define CFLAGS ""''CFLAGS'"""
  698. $ WRITE H_FILE "#define PLATFORM ""VMS ''ARCHD' ''VMS_VERSION'"""
  699. $ WRITE H_FILE "#define DATE ""''TIME'"" "
  700. $!
  701. $! Close The [.CRYPTO._xxx]BUILDINF.H File.
  702. $!
  703. $ CLOSE H_FILE
  704. $!
  705. $! Purge The [.CRYPTO._xxx]BUILDINF.H File.
  706. $!
  707. $ PURGE SYS$DISK:[.CRYPTO.'ARCHD']BUILDINF.H
  708. $!
  709. $! Delete [.CRYPTO]BUILDINF.H File, as there might be some residue from Unix.
  710. $!
  711. $ IF F$SEARCH("[.CRYPTO]BUILDINF.H") .NES. "" THEN -
  712. DELETE SYS$DISK:[.CRYPTO]BUILDINF.H;*
  713. $!
  714. $! That's All, Time To RETURN.
  715. $!
  716. $ RETURN
  717. $!
  718. $! Copy a lot of files around.
  719. $!
  720. $ SOFTLINKS:
  721. $!
  722. $!!!! Tell The User We Are Partly Rebuilding The [.APPS] Directory.
  723. $!!!!
  724. $!!! WRITE SYS$OUTPUT "Rebuilding The '[.APPS]MD4.C', '[.APPS]MD5.C' And '[.APPS]RD160.C' Files."
  725. $!!!!
  726. $!!! DELETE SYS$DISK:[.APPS]MD4.C;*,MD5.C;*,RMD160.C;*
  727. $!!!!
  728. $!!!! Copy MD4.C from [.CRYPTO.MD4] into [.APPS]
  729. $!!!!
  730. $!!! COPY SYS$DISK:[.CRYPTO.MD4]MD4.C SYS$DISK:[.APPS]
  731. $!!!!
  732. $!!!! Copy MD5.C from [.CRYPTO.MD5] into [.APPS]
  733. $!!!! Tell The User We Are Rebuilding The [.include.openssl] Directory.
  734. $!!!!
  735. $!!!! Copy RMD160.C from [.CRYPTO.RIPEMD] into [.APPS]
  736. $!!!!
  737. $!!! COPY SYS$DISK:[.CRYPTO.RIPEMD]RMD160.C SYS$DISK:[.APPS]
  738. $!
  739. $! Ensure that the [.include.openssl] directory contains a full set of
  740. $! real header files. The distribution kit may have left real or fake
  741. $! symlinks there. Rather than think about what's there, simply delete
  742. $! the destination files (fake or real symlinks) before copying the real
  743. $! header files in. (Copying a real header file onto a real symlink
  744. $! merely duplicates the real header file at its source.)
  745. $!
  746. $! Tell The User We Are Rebuilding The [.include.openssl] Directory.
  747. $!
  748. $ WRITE SYS$OUTPUT "Rebuilding The '[.include.openssl]' Directory."
  749. $!
  750. $! First, make sure the directory exists. If it did exist, delete all
  751. $! the existing header files (or fake or real symlinks).
  752. $!
  753. $ if f$parse( "sys$disk:[.include.openssl]") .eqs. ""
  754. $ then
  755. $ create /directory sys$disk:[.include.openssl]
  756. $ else
  757. $ delete sys$disk:[.include.openssl]*.h;*
  758. $ endif
  759. $!
  760. $! Copy All The ".H" Files From The Main Directory.
  761. $!
  762. $ EXHEADER := e_os2.h
  763. $ copy 'exheader' sys$disk:[.include.openssl]
  764. $!
  765. $! Copy All The ".H" Files From The [.CRYPTO] Directory Tree.
  766. $!
  767. $ HEADER_SDIRS := , -
  768. 'ARCHD', -
  769. OBJECTS, -
  770. MD2, MD4, MD5, SHA, MDC2, HMAC, RIPEMD, WHRLPOOL, -
  771. DES, AES, RC2, RC4, RC5, IDEA, BF, CAST, CAMELLIA, SEED, MODES, -
  772. BN, EC, RSA, DSA, ECDSA, DH, ECDH, DSO, ENGINE, -
  773. BUFFER, BIO, STACK, LHASH, RAND, ERR, -
  774. EVP, ASN1, PEM, X509, X509V3, CONF, TXT_DB, PKCS7, PKCS12, -
  775. COMP, OCSP, UI, -
  776. CMS, PQUEUE, TS, JPAKE, SRP, STORE, CMAC
  777. $!
  778. $ EXHEADER_ := crypto.h, opensslv.h, ebcdic.h, symhacks.h, ossl_typ.h
  779. $ EXHEADER_'ARCHD' := opensslconf.h
  780. $ EXHEADER_OBJECTS := objects.h, obj_mac.h
  781. $ EXHEADER_MD2 := md2.h
  782. $ EXHEADER_MD4 := md4.h
  783. $ EXHEADER_MD5 := md5.h
  784. $ EXHEADER_SHA := sha.h
  785. $ EXHEADER_MDC2 := mdc2.h
  786. $ EXHEADER_HMAC := hmac.h
  787. $ EXHEADER_RIPEMD := ripemd.h
  788. $ EXHEADER_WHRLPOOL := whrlpool.h
  789. $ EXHEADER_DES := des.h
  790. $ EXHEADER_AES := aes.h
  791. $ EXHEADER_RC2 := rc2.h
  792. $ EXHEADER_RC4 := rc4.h
  793. $ EXHEADER_RC5 := rc5.h
  794. $ EXHEADER_IDEA := idea.h
  795. $ EXHEADER_BF := blowfish.h
  796. $ EXHEADER_CAST := cast.h
  797. $ EXHEADER_CAMELLIA := camellia.h
  798. $ EXHEADER_SEED := seed.h
  799. $ EXHEADER_MODES := modes.h
  800. $ EXHEADER_BN := bn.h
  801. $ EXHEADER_EC := ec.h
  802. $ EXHEADER_RSA := rsa.h
  803. $ EXHEADER_DSA := dsa.h
  804. $ EXHEADER_ECDSA := ecdsa.h
  805. $ EXHEADER_DH := dh.h
  806. $ EXHEADER_ECDH := ecdh.h
  807. $ EXHEADER_DSO := dso.h
  808. $ EXHEADER_ENGINE := engine.h
  809. $ EXHEADER_BUFFER := buffer.h
  810. $ EXHEADER_BIO := bio.h
  811. $ EXHEADER_STACK := stack.h, safestack.h
  812. $ EXHEADER_LHASH := lhash.h
  813. $ EXHEADER_RAND := rand.h
  814. $ EXHEADER_ERR := err.h
  815. $ EXHEADER_EVP := evp.h
  816. $ EXHEADER_ASN1 := asn1.h, asn1_mac.h, asn1t.h
  817. $ EXHEADER_PEM := pem.h, pem2.h
  818. $ EXHEADER_X509 := x509.h, x509_vfy.h
  819. $ EXHEADER_X509V3 := x509v3.h
  820. $ EXHEADER_CONF := conf.h, conf_api.h
  821. $ EXHEADER_TXT_DB := txt_db.h
  822. $ EXHEADER_PKCS7 := pkcs7.h
  823. $ EXHEADER_PKCS12 := pkcs12.h
  824. $ EXHEADER_COMP := comp.h
  825. $ EXHEADER_OCSP := ocsp.h
  826. $ EXHEADER_UI := ui.h
  827. $ EXHEADER_CMS := cms.h
  828. $ EXHEADER_PQUEUE := pqueue.h
  829. $ EXHEADER_TS := ts.h
  830. $ EXHEADER_JPAKE := jpake.h
  831. $ EXHEADER_SRP := srp.h
  832. $!!! EXHEADER_STORE := store.h, str_compat.h
  833. $ EXHEADER_STORE := store.h
  834. $ EXHEADER_CMAC := cmac.h
  835. $!
  836. $ i = 0
  837. $ loop_header_sdirs:
  838. $ sdir = f$edit( f$element( i, ",", header_sdirs), "trim")
  839. $ i = i + 1
  840. $ if (sdir .eqs. ",") then goto loop_header_sdirs_end
  841. $ hdr_list = exheader_'sdir'
  842. $ if (sdir .nes. "") then sdir = "."+ sdir
  843. $ copy [.crypto'sdir']'hdr_list' sys$disk:[.include.openssl]
  844. $ goto loop_header_sdirs
  845. $ loop_header_sdirs_end:
  846. $!
  847. $! Copy All The ".H" Files From The [.SSL] Directory.
  848. $!
  849. $! (keep these in the same order as ssl/Makefile)
  850. $ EXHEADER := ssl.h, ssl2.h, ssl3.h, ssl23.h, tls1.h, dtls1.h, srtp.h
  851. $ copy sys$disk:[.ssl]'exheader' sys$disk:[.include.openssl]
  852. $!
  853. $! Purge the [.include.openssl] header files.
  854. $!
  855. $ purge sys$disk:[.include.openssl]*.h
  856. $!
  857. $! That's All, Time To RETURN.
  858. $!
  859. $ RETURN
  860. $!
  861. $! Build The "[.xxx.EXE.CRYPTO]SSL_LIBCRYPTO''LIB32'.OLB" Library.
  862. $!
  863. $ CRYPTO:
  864. $!
  865. $! Tell The User What We Are Doing.
  866. $!
  867. $ WRITE SYS$OUTPUT ""
  868. $ WRITE SYS$OUTPUT -
  869. "Building The [.",ARCHD,".EXE.CRYPTO]SSL_LIBCRYPTO''LIB32'.OLB Library."
  870. $!
  871. $! Go To The [.CRYPTO] Directory.
  872. $!
  873. $ SET DEFAULT SYS$DISK:[.CRYPTO]
  874. $!
  875. $! Build The [.xxx.EXE.CRYPTO]LIBCRYPTO.OLB Library.
  876. $!
  877. $ @CRYPTO-LIB LIBRARY 'DEBUGGER' "''COMPILER'" "''TCPIP_TYPE'" -
  878. "''ISSEVEN'" "''BUILDPART'" "''POINTER_SIZE'" "''ZLIB'"
  879. $!
  880. $! Go Back To The Main Directory.
  881. $!
  882. $ SET DEFAULT [-]
  883. $!
  884. $! Time To RETURN.
  885. $!
  886. $ RETURN
  887. $!
  888. $! Build The "[.xxx.EXE.SSL]SSL_LIBSSL''LIB32'.OLB" Library.
  889. $!
  890. $ SSL:
  891. $!
  892. $! Tell The User What We Are Doing.
  893. $!
  894. $ WRITE SYS$OUTPUT ""
  895. $ WRITE SYS$OUTPUT -
  896. "Building The [.",ARCHD,".EXE.SSL]SSL_LIBSSL''LIB32'.OLB Library."
  897. $!
  898. $! Go To The [.SSL] Directory.
  899. $!
  900. $ SET DEFAULT SYS$DISK:[.SSL]
  901. $!
  902. $! Build The [.xxx.EXE.SSL]LIBSSL.OLB Library.
  903. $!
  904. $ @SSL-LIB LIBRARY 'DEBUGGER' "''COMPILER'" "''TCPIP_TYPE'" -
  905. "''ISSEVEN'" "''POINTER_SIZE'" "''ZLIB'"
  906. $!
  907. $! Go Back To The Main Directory.
  908. $!
  909. $ SET DEFAULT [-]
  910. $!
  911. $! Time To Return.
  912. $!
  913. $ RETURN
  914. $!
  915. $! Build The OpenSSL Test Programs.
  916. $!
  917. $ TEST:
  918. $!
  919. $! Tell The User What We Are Doing.
  920. $!
  921. $ WRITE SYS$OUTPUT ""
  922. $ WRITE SYS$OUTPUT "Building The OpenSSL [.",ARCHD,".EXE.TEST] Test Utilities."
  923. $!
  924. $! Go To The [.TEST] Directory.
  925. $!
  926. $ SET DEFAULT SYS$DISK:[.TEST]
  927. $!
  928. $! Build The Test Programs.
  929. $!
  930. $ @MAKETESTS 'DEBUGGER' "''COMPILER'" "''TCPIP_TYPE'" "''ISSEVEN'" -
  931. "''POINTER_SIZE'" "''ZLIB'"
  932. $!
  933. $! Go Back To The Main Directory.
  934. $!
  935. $ SET DEFAULT [-]
  936. $!
  937. $! That's All, Time To RETURN.
  938. $!
  939. $ RETURN
  940. $!
  941. $! Build The OpenSSL Application Programs.
  942. $!
  943. $ APPS:
  944. $!
  945. $! Tell The User What We Are Doing.
  946. $!
  947. $ WRITE SYS$OUTPUT ""
  948. $ WRITE SYS$OUTPUT "Building OpenSSL [.",ARCHD,".EXE.APPS] Applications."
  949. $!
  950. $! Go To The [.APPS] Directory.
  951. $!
  952. $ SET DEFAULT SYS$DISK:[.APPS]
  953. $!
  954. $! Build The Application Programs.
  955. $!
  956. $ @MAKEAPPS 'DEBUGGER' "''COMPILER'" "''TCPIP_TYPE'" "''ISSEVEN'" -
  957. "" "''POINTER_SIZE'" "''ZLIB'"
  958. $!
  959. $! Go Back To The Main Directory.
  960. $!
  961. $ SET DEFAULT [-]
  962. $!
  963. $! That's All, Time To RETURN.
  964. $!
  965. $ RETURN
  966. $!
  967. $! Build The OpenSSL Application Programs.
  968. $!
  969. $ ENGINES:
  970. $!
  971. $! Tell The User What We Are Doing.
  972. $!
  973. $ WRITE SYS$OUTPUT ""
  974. $ WRITE SYS$OUTPUT "Building OpenSSL [.",ARCHD,".EXE.ENGINES] Engines."
  975. $!
  976. $! Go To The [.ENGINES] Directory.
  977. $!
  978. $ SET DEFAULT SYS$DISK:[.ENGINES]
  979. $!
  980. $! Build The Application Programs.
  981. $!
  982. $ @MAKEENGINES ENGINES 'DEBUGGER' "''COMPILER'" "''TCPIP_TYPE'" -
  983. "''ISSEVEN'" "''BUILDPART'" "''POINTER_SIZE'" "''ZLIB'"
  984. $!
  985. $! Go Back To The Main Directory.
  986. $!
  987. $ SET DEFAULT [-]
  988. $!
  989. $! That's All, Time To RETURN.
  990. $!
  991. $ RETURN
  992. $!
  993. $! Check The User's Options.
  994. $!
  995. $ CHECK_OPTIONS:
  996. $!
  997. $! Check if there's a "part", and separate it out
  998. $!
  999. $ BUILDPART = F$ELEMENT(1,"/",P1)
  1000. $ IF BUILDPART .EQS. "/"
  1001. $ THEN
  1002. $ BUILDPART = ""
  1003. $ ELSE
  1004. $ P1 = F$EXTRACT(0,F$LENGTH(P1) - F$LENGTH(BUILDPART) - 1, P1)
  1005. $ ENDIF
  1006. $!
  1007. $! Check To See If P1 Is Blank.
  1008. $!
  1009. $ IF (P1.EQS."ALL")
  1010. $ THEN
  1011. $!
  1012. $! P1 Is ALL, So Build Everything.
  1013. $!
  1014. $ BUILDCOMMAND = "ALL"
  1015. $!
  1016. $! Else...
  1017. $!
  1018. $ ELSE
  1019. $!
  1020. $! Else, Check To See If P1 Has A Valid Argument.
  1021. $!
  1022. $ IF (P1.EQS."CONFIG").OR.(P1.EQS."BUILDINF").OR.(P1.EQS."SOFTLINKS") -
  1023. .OR.(P1.EQS."BUILDALL") -
  1024. .OR.(P1.EQS."CRYPTO").OR.(P1.EQS."SSL") -
  1025. .OR.(P1.EQS."TEST").OR.(P1.EQS."APPS") -
  1026. .OR.(P1.EQS."ENGINES")
  1027. $ THEN
  1028. $!
  1029. $! A Valid Argument.
  1030. $!
  1031. $ BUILDCOMMAND = P1
  1032. $!
  1033. $! Else...
  1034. $!
  1035. $ ELSE
  1036. $!
  1037. $! Tell The User We Don't Know What They Want.
  1038. $!
  1039. $ WRITE SYS$OUTPUT ""
  1040. $ WRITE SYS$OUTPUT "USAGE: @MAKEVMS.COM [Target] [Pointer size] [Debug option] <Compiler>"
  1041. $ WRITE SYS$OUTPUT ""
  1042. $ WRITE SYS$OUTPUT "Example: @MAKEVMS.COM ALL """" NODEBUG "
  1043. $ WRITE SYS$OUTPUT ""
  1044. $ WRITE SYS$OUTPUT "The Target ",P1," Is Invalid. The Valid Target Options Are:"
  1045. $ WRITE SYS$OUTPUT ""
  1046. $ WRITE SYS$OUTPUT " ALL : Just Build Everything."
  1047. $ WRITE SYS$OUTPUT " CONFIG : Just build the [.CRYPTO._xxx]OPENSSLCONF.H file."
  1048. $ WRITE SYS$OUTPUT " BUILDINF : Just build the [.CRYPTO._xxx]BUILDINF.H file."
  1049. $ WRITE SYS$OUTPUT " SOFTLINKS: Just Fix The Unix soft links."
  1050. $ WRITE SYS$OUTPUT " BUILDALL : Same as ALL, except CONFIG, BUILDINF and SOFTILNKS aren't done."
  1051. $ WRITE SYS$OUTPUT " CRYPTO : To Build Just The [.xxx.EXE.CRYPTO]LIBCRYPTO.OLB Library."
  1052. $ WRITE SYS$OUTPUT " CRYPTO/x : To Build Just The x Part Of The"
  1053. $ WRITE SYS$OUTPUT " [.xxx.EXE.CRYPTO]LIBCRYPTO.OLB Library."
  1054. $ WRITE SYS$OUTPUT " SSL : To Build Just The [.xxx.EXE.SSL]LIBSSL.OLB Library."
  1055. $ WRITE SYS$OUTPUT " TEST : To Build Just The OpenSSL Test Programs."
  1056. $ WRITE SYS$OUTPUT " APPS : To Build Just The OpenSSL Application Programs."
  1057. $ WRITE SYS$OUTPUT " ENGINES : To Build Just The ENGINES"
  1058. $ WRITE SYS$OUTPUT ""
  1059. $ WRITE SYS$OUTPUT " Where 'xxx' Stands For:"
  1060. $ WRITE SYS$OUTPUT ""
  1061. $ WRITE SYS$OUTPUT " ALPHA[64]: Alpha Architecture."
  1062. $ WRITE SYS$OUTPUT " IA64[64] : IA64 Architecture."
  1063. $ WRITE SYS$OUTPUT " VAX : VAX Architecture."
  1064. $ WRITE SYS$OUTPUT ""
  1065. $!
  1066. $! Time To EXIT.
  1067. $!
  1068. $ GOTO TIDY
  1069. $!
  1070. $! End The Valid Argument Check.
  1071. $!
  1072. $ ENDIF
  1073. $!
  1074. $! End The P1 Check.
  1075. $!
  1076. $ ENDIF
  1077. $!
  1078. $! Check P2 (POINTER_SIZE).
  1079. $!
  1080. $ IF (P2 .NES. "") .AND. (ARCH .NES. "VAX")
  1081. $ THEN
  1082. $!
  1083. $ IF (P2 .EQS. "32")
  1084. $ THEN
  1085. $ POINTER_SIZE = "32"
  1086. $ ELSE
  1087. $ POINTER_SIZE = F$EDIT( P2, "COLLAPSE, UPCASE")
  1088. $ IF ((POINTER_SIZE .EQS. "64") .OR. -
  1089. (POINTER_SIZE .EQS. "64=") .OR. -
  1090. (POINTER_SIZE .EQS. "64=ARGV"))
  1091. $ THEN
  1092. $ ARCHD = ARCH+ "_64"
  1093. $ LIB32 = ""
  1094. $ ELSE
  1095. $!
  1096. $! Tell The User Entered An Invalid Option.
  1097. $!
  1098. $ WRITE SYS$OUTPUT ""
  1099. $ WRITE SYS$OUTPUT "The Option ", P2, -
  1100. " Is Invalid. The Valid Options Are:"
  1101. $ WRITE SYS$OUTPUT ""
  1102. $ WRITE SYS$OUTPUT -
  1103. " """" : Compile with default (short) pointers."
  1104. $ WRITE SYS$OUTPUT -
  1105. " 32 : Compile with 32-bit (short) pointers."
  1106. $ WRITE SYS$OUTPUT -
  1107. " 64 : Compile with 64-bit (long) pointers (auto ARGV)."
  1108. $ WRITE SYS$OUTPUT -
  1109. " 64= : Compile with 64-bit (long) pointers (no ARGV)."
  1110. $ WRITE SYS$OUTPUT -
  1111. " 64=ARGV : Compile with 64-bit (long) pointers (ARGV)."
  1112. $ WRITE SYS$OUTPUT ""
  1113. $!
  1114. $! Time To EXIT.
  1115. $!
  1116. $ GOTO TIDY
  1117. $!
  1118. $ ENDIF
  1119. $!
  1120. $ ENDIF
  1121. $!
  1122. $! End The P2 (POINTER_SIZE) Check.
  1123. $!
  1124. $ ENDIF
  1125. $!
  1126. $! Check To See If P3 Is Blank.
  1127. $!
  1128. $ IF (P3.EQS."NODEBUG")
  1129. $ THEN
  1130. $!
  1131. $! P3 Is NODEBUG, So Compile Without Debugger Information.
  1132. $!
  1133. $ DEBUGGER = "NODEBUG"
  1134. $!
  1135. $! Else...
  1136. $!
  1137. $ ELSE
  1138. $!
  1139. $! Check To See If We Are To Compile With Debugger Information.
  1140. $!
  1141. $ IF (P3.EQS."DEBUG")
  1142. $ THEN
  1143. $!
  1144. $! Compile With Debugger Information.
  1145. $!
  1146. $ DEBUGGER = "DEBUG"
  1147. $!
  1148. $! Else...
  1149. $!
  1150. $ ELSE
  1151. $!
  1152. $! Tell The User Entered An Invalid Option.
  1153. $!
  1154. $ WRITE SYS$OUTPUT ""
  1155. $ WRITE SYS$OUTPUT "The Option ",P3," Is Invalid. The Valid Options Are:"
  1156. $ WRITE SYS$OUTPUT ""
  1157. $ WRITE SYS$OUTPUT " DEBUG : Compile With The Debugger Information."
  1158. $ WRITE SYS$OUTPUT " NODEBUG : Compile Without The Debugger Information."
  1159. $ WRITE SYS$OUTPUT ""
  1160. $!
  1161. $! Time To EXIT.
  1162. $!
  1163. $ GOTO TIDY
  1164. $!
  1165. $! End The Valid Argument Check.
  1166. $!
  1167. $ ENDIF
  1168. $!
  1169. $! End The P3 Check.
  1170. $!
  1171. $ ENDIF
  1172. $!
  1173. $! Check To See If P4 Is Blank.
  1174. $!
  1175. $ IF (P4.EQS."")
  1176. $ THEN
  1177. $!
  1178. $! O.K., The User Didn't Specify A Compiler, Let's Try To
  1179. $! Find Out Which One To Use.
  1180. $!
  1181. $! Check To See If We Have GNU C.
  1182. $!
  1183. $ IF (F$TRNLNM("GNU_CC").NES."")
  1184. $ THEN
  1185. $!
  1186. $! Looks Like GNUC, Set To Use GNUC.
  1187. $!
  1188. $ COMPILER = "GNUC"
  1189. $!
  1190. $! Tell The User We Are Using GNUC.
  1191. $!
  1192. $ WRITE SYS$OUTPUT "Using GNU 'C' Compiler."
  1193. $!
  1194. $! End The GNU C Compiler Check.
  1195. $!
  1196. $ ENDIF
  1197. $!
  1198. $! Check To See If We Have VAXC Or DECC.
  1199. $!
  1200. $ IF (F$GETSYI("CPU").GE.128).OR.(F$TRNLNM("DECC$CC_DEFAULT").EQS."/DECC")
  1201. $ THEN
  1202. $!
  1203. $! Looks Like DECC, Set To Use DECC.
  1204. $!
  1205. $ COMPILER = "DECC"
  1206. $!
  1207. $! Tell The User We Are Using DECC.
  1208. $!
  1209. $ WRITE SYS$OUTPUT "Using DECC 'C' Compiler."
  1210. $!
  1211. $! Else...
  1212. $!
  1213. $ ELSE
  1214. $!
  1215. $! Looks Like VAXC, Set To Use VAXC.
  1216. $!
  1217. $ COMPILER = "VAXC"
  1218. $!
  1219. $! Tell The User We Are Using VAX C.
  1220. $!
  1221. $ WRITE SYS$OUTPUT "Using VAXC 'C' Compiler."
  1222. $!
  1223. $! End The DECC & VAXC Compiler Check.
  1224. $!
  1225. $ ENDIF
  1226. $!
  1227. $! Else...
  1228. $!
  1229. $ ELSE
  1230. $!
  1231. $! Check To See If The User Entered A Valid Parameter.
  1232. $!
  1233. $ IF (P4.EQS."VAXC").OR.(P4.EQS."DECC").OR.(P4.EQS."GNUC")!.OR.(P4.EQS."LINK")
  1234. $ THEN
  1235. $!
  1236. $! Check To See If The User Wanted To Just LINK.
  1237. $!
  1238. $ IF (P4.EQS."LINK")
  1239. $ THEN
  1240. $!
  1241. $! Looks Like LINK-only
  1242. $!
  1243. $ COMPILER = "LINK"
  1244. $!
  1245. $! Tell The User We Are Only Linking.
  1246. $!
  1247. $ WRITE SYS$OUTPUT "LINK Only. This actually NOT YET SUPPORTED!"
  1248. $!
  1249. $! End LINK Check.
  1250. $!
  1251. $ ENDIF
  1252. $!
  1253. $! Check To See If The User Wanted DECC.
  1254. $!
  1255. $ IF (P4.EQS."DECC")
  1256. $ THEN
  1257. $!
  1258. $! Looks Like DECC, Set To Use DECC.
  1259. $!
  1260. $ COMPILER = "DECC"
  1261. $!
  1262. $! Tell The User We Are Using DECC.
  1263. $!
  1264. $ WRITE SYS$OUTPUT "Using DECC 'C' Compiler."
  1265. $!
  1266. $! End DECC Check.
  1267. $!
  1268. $ ENDIF
  1269. $!
  1270. $! Check To See If We Are To Use VAXC.
  1271. $!
  1272. $ IF (P4.EQS."VAXC")
  1273. $ THEN
  1274. $!
  1275. $! Looks Like VAXC, Set To Use VAXC.
  1276. $!
  1277. $ COMPILER = "VAXC"
  1278. $!
  1279. $! Tell The User We Are Using VAX C.
  1280. $!
  1281. $ WRITE SYS$OUTPUT "Using VAXC 'C' Compiler."
  1282. $!
  1283. $! End VAXC Check
  1284. $!
  1285. $ ENDIF
  1286. $!
  1287. $! Check To See If We Are To Use GNU C.
  1288. $!
  1289. $ IF (P4.EQS."GNUC")
  1290. $ THEN
  1291. $!
  1292. $! Looks Like GNUC, Set To Use GNUC.
  1293. $!
  1294. $ COMPILER = "GNUC"
  1295. $!
  1296. $! Tell The User We Are Using GNUC.
  1297. $!
  1298. $ WRITE SYS$OUTPUT "Using GNU 'C' Compiler."
  1299. $!
  1300. $! End The GNU C Check.
  1301. $!
  1302. $ ENDIF
  1303. $!
  1304. $! Else The User Entered An Invalid Argument.
  1305. $!
  1306. $ ELSE
  1307. $!
  1308. $! Tell The User We Don't Know What They Want.
  1309. $!
  1310. $ WRITE SYS$OUTPUT ""
  1311. $ WRITE SYS$OUTPUT "The Option ",P4," Is Invalid. The Valid Options Are:"
  1312. $ WRITE SYS$OUTPUT ""
  1313. $ WRITE SYS$OUTPUT " VAXC : To Compile With VAX C."
  1314. $ WRITE SYS$OUTPUT " DECC : To Compile With DEC C."
  1315. $ WRITE SYS$OUTPUT " GNUC : To Compile With GNU C."
  1316. $ WRITE SYS$OUTPUT ""
  1317. $!
  1318. $! Time To EXIT.
  1319. $!
  1320. $ GOTO TIDY
  1321. $!
  1322. $! End The Valid Argument Check.
  1323. $!
  1324. $ ENDIF
  1325. $!
  1326. $! End The P4 Check.
  1327. $!
  1328. $ ENDIF
  1329. $!
  1330. $! Time to check the contents of P5, and to make sure we get the correct
  1331. $! library.
  1332. $!
  1333. $ IF P5.EQS."SOCKETSHR" .OR. P5.EQS."MULTINET" .OR. P5.EQS."UCX" -
  1334. .OR. P5.EQS."TCPIP" .OR. P5.EQS."NONE"
  1335. $ THEN
  1336. $!
  1337. $! Check to see if SOCKETSHR was chosen
  1338. $!
  1339. $ IF P5.EQS."SOCKETSHR"
  1340. $ THEN
  1341. $!
  1342. $! Set the library to use SOCKETSHR
  1343. $!
  1344. $ TCPIP_LIB = "SYS$DISK:[-.VMS]SOCKETSHR_SHR.OPT /OPTIONS"
  1345. $!
  1346. $! Tell the user
  1347. $!
  1348. $ WRITE SYS$OUTPUT "Using SOCKETSHR for TCP/IP"
  1349. $!
  1350. $! Done with SOCKETSHR
  1351. $!
  1352. $ ENDIF
  1353. $!
  1354. $! Check to see if MULTINET was chosen
  1355. $!
  1356. $ IF P5.EQS."MULTINET"
  1357. $ THEN
  1358. $!
  1359. $! Set the library to use UCX emulation.
  1360. $!
  1361. $ P5 = "UCX"
  1362. $!
  1363. $! Tell the user
  1364. $!
  1365. $ WRITE SYS$OUTPUT "Using MultiNet via UCX emulation for TCP/IP"
  1366. $!
  1367. $! Done with MULTINET
  1368. $!
  1369. $ ENDIF
  1370. $!
  1371. $! Check to see if UCX was chosen
  1372. $!
  1373. $ IF P5.EQS."UCX"
  1374. $ THEN
  1375. $!
  1376. $! Set the library to use UCX.
  1377. $!
  1378. $ TCPIP_LIB = "SYS$DISK:[-.VMS]UCX_SHR_DECC.OPT /OPTIONS"
  1379. $!
  1380. $! Tell the user
  1381. $!
  1382. $ WRITE SYS$OUTPUT "Using UCX or an emulation thereof for TCP/IP"
  1383. $!
  1384. $! Done with UCX
  1385. $!
  1386. $ ENDIF
  1387. $!
  1388. $! Check to see if TCPIP was chosen
  1389. $!
  1390. $ IF P5.EQS."TCPIP"
  1391. $ THEN
  1392. $!
  1393. $! Set the library to use TCPIP (post UCX).
  1394. $!
  1395. $ TCPIP_LIB = "SYS$DISK:[-.VMS]TCPIP_SHR_DECC.OPT /OPTIONS"
  1396. $!
  1397. $! Tell the user
  1398. $!
  1399. $ WRITE SYS$OUTPUT "Using TCPIP (post UCX) for TCP/IP"
  1400. $!
  1401. $! Done with TCPIP
  1402. $!
  1403. $ ENDIF
  1404. $!
  1405. $! Check to see if NONE was chosen
  1406. $!
  1407. $ IF P5.EQS."NONE"
  1408. $ THEN
  1409. $!
  1410. $! Do not use a TCPIP library.
  1411. $!
  1412. $ TCPIP_LIB = ""
  1413. $!
  1414. $! Tell the user
  1415. $!
  1416. $ WRITE SYS$OUTPUT "A specific TCPIP library will not be used."
  1417. $!
  1418. $! Done with NONE.
  1419. $!
  1420. $ ENDIF
  1421. $!
  1422. $! Set the TCPIP_TYPE symbol
  1423. $!
  1424. $ TCPIP_TYPE = P5
  1425. $!
  1426. $! Print info
  1427. $!
  1428. $ WRITE SYS$OUTPUT "TCP/IP library spec: ", TCPIP_LIB
  1429. $!
  1430. $! Else The User Entered An Invalid Argument.
  1431. $!
  1432. $ ELSE
  1433. $ IF P5 .NES. ""
  1434. $ THEN
  1435. $!
  1436. $! Tell The User We Don't Know What They Want.
  1437. $!
  1438. $ WRITE SYS$OUTPUT ""
  1439. $ WRITE SYS$OUTPUT "The Option ",P5," Is Invalid. The Valid Options Are:"
  1440. $ WRITE SYS$OUTPUT ""
  1441. $ WRITE SYS$OUTPUT " SOCKETSHR : To link with SOCKETSHR TCP/IP library."
  1442. $ WRITE SYS$OUTPUT " UCX : To link with UCX TCP/IP library."
  1443. $ WRITE SYS$OUTPUT " TCPIP : To link with TCPIP TCP/IP (post UCX) library."
  1444. $ WRITE SYS$OUTPUT " NONE : To not link with a specific TCP/IP library."
  1445. $ WRITE SYS$OUTPUT ""
  1446. $!
  1447. $! Time To EXIT.
  1448. $!
  1449. $ GOTO TIDY
  1450. $ ELSE
  1451. $!
  1452. $! If TCPIP is not defined, then hardcode it to make
  1453. $! it clear that no TCPIP is desired.
  1454. $!
  1455. $ IF P5 .EQS. ""
  1456. $ THEN
  1457. $ TCPIP_LIB = ""
  1458. $ TCPIP_TYPE = "NONE"
  1459. $ ELSE
  1460. $!
  1461. $! Set the TCPIP_TYPE symbol
  1462. $!
  1463. $ TCPIP_TYPE = P5
  1464. $ ENDIF
  1465. $ ENDIF
  1466. $!
  1467. $! Done with TCP/IP libraries
  1468. $!
  1469. $ ENDIF
  1470. $!
  1471. $! Special Threads For OpenVMS v7.1 Or Later
  1472. $!
  1473. $! Written By: Richard Levitte
  1474. $! richard@levitte.org
  1475. $!
  1476. $!
  1477. $! Check To See If We Have A Option For P6.
  1478. $!
  1479. $ IF (P6.EQS."")
  1480. $ THEN
  1481. $!
  1482. $! Get The Version Of VMS We Are Using.
  1483. $!
  1484. $ ISSEVEN :=
  1485. $ TMP = F$ELEMENT(0,"-",F$EXTRACT(1,4,VMS_VERSION))
  1486. $ TMP = F$INTEGER(F$ELEMENT(0,".",TMP)+F$ELEMENT(1,".",TMP))
  1487. $!
  1488. $! Check To See If The VMS Version Is v7.1 Or Later.
  1489. $!
  1490. $ IF (TMP.GE.71)
  1491. $ THEN
  1492. $!
  1493. $! We Have OpenVMS v7.1 Or Later, So Use The Special Threads.
  1494. $!
  1495. $ ISSEVEN := ,PTHREAD_USE_D4
  1496. $!
  1497. $! End The VMS Version Check.
  1498. $!
  1499. $ ENDIF
  1500. $!
  1501. $! End The P6 Check.
  1502. $!
  1503. $ ENDIF
  1504. $!
  1505. $!
  1506. $! Check To See If We Have A ZLIB Option.
  1507. $!
  1508. $ ZLIB = P7
  1509. $ IF (ZLIB .NES. "")
  1510. $ THEN
  1511. $!
  1512. $! Check for expected ZLIB files.
  1513. $!
  1514. $ err = 0
  1515. $ file1 = f$parse( "zlib.h", ZLIB, , , "SYNTAX_ONLY")
  1516. $ if (f$search( file1) .eqs. "")
  1517. $ then
  1518. $ WRITE SYS$OUTPUT ""
  1519. $ WRITE SYS$OUTPUT "The Option ", ZLIB, " Is Invalid."
  1520. $ WRITE SYS$OUTPUT " Can't find header: ''file1'"
  1521. $ err = 1
  1522. $ endif
  1523. $!
  1524. $ file2 = f$parse( ZLIB, "libz.olb", , , "SYNTAX_ONLY")
  1525. $ if (f$search( file2) .eqs. "")
  1526. $ then
  1527. $ if (err .eq. 0)
  1528. $ then
  1529. $ WRITE SYS$OUTPUT ""
  1530. $ WRITE SYS$OUTPUT "The Option ", ZLIB, " Is Invalid."
  1531. $ endif
  1532. $ WRITE SYS$OUTPUT " Can't find library: ''file2'"
  1533. $ WRITE SYS$OUTPUT ""
  1534. $ err = err+ 2
  1535. $ endif
  1536. $ if (err .eq. 1)
  1537. $ then
  1538. $ WRITE SYS$OUTPUT ""
  1539. $ endif
  1540. $!
  1541. $ if (err .ne. 0)
  1542. $ then
  1543. $ GOTO TIDY
  1544. $ endif
  1545. $!
  1546. $! Print info
  1547. $!
  1548. $ WRITE SYS$OUTPUT "ZLIB library spec: ", file2
  1549. $!
  1550. $! End The ZLIB Check.
  1551. $!
  1552. $ ENDIF
  1553. $!
  1554. $! Time To RETURN...
  1555. $!
  1556. $ RETURN
  1557. $!
  1558. $ TIDY:
  1559. $!
  1560. $! Close any open files.
  1561. $!
  1562. $ if (f$trnlnm( "h_file", "LNM$PROCESS", 0, "SUPERVISOR") .nes. "") then -
  1563. close h_file
  1564. $!
  1565. $! Restore the original default device:[directory].
  1566. $!
  1567. $ SET DEFAULT 'DEF_ORIG'
  1568. $!
  1569. $ EXIT
  1570. $!