2
0

makevms.com 39 KB

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