crypto-lib.com 37 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513
  1. $!
  2. $! CRYPTO-LIB.COM
  3. $! Written By: Robert Byer
  4. $! Vice-President
  5. $! A-Com Computing, Inc.
  6. $! byer@mail.all-net.net
  7. $!
  8. $! Changes by Richard Levitte <richard@levitte.org>
  9. $! Zoltan Arpadffy <arpadffy@polarhome.com>
  10. $!
  11. $! This command files compiles and creates the "[.xxx.EXE.CRYPTO]LIBCRYPTO.OLB"
  12. $! library for OpenSSL. The "xxx" denotes the machine architecture, ALPHA,
  13. $! IA64 or VAX.
  14. $!
  15. $! It was re-written so it would try to determine what "C" compiler to use
  16. $! or you can specify which "C" compiler to use.
  17. $!
  18. $! Specify the following as P1 to build just that part or ALL to just
  19. $! build everything.
  20. $!
  21. $! LIBRARY To just compile the [.xxx.EXE.CRYPTO]LIBCRYPTO.OLB Library.
  22. $! APPS To just compile the [.xxx.EXE.CRYPTO]*.EXE
  23. $! ALL To do both LIBRARY and APPS
  24. $!
  25. $! Specify DEBUG or NODEBUG as P2 to compile with or without debugger
  26. $! information.
  27. $!
  28. $! Specify which compiler at P3 to try to compile under.
  29. $!
  30. $! VAXC For VAX C.
  31. $! DECC For DEC C.
  32. $! GNUC For GNU C.
  33. $!
  34. $! If you don't specify a compiler, it will try to determine which
  35. $! "C" compiler to use.
  36. $!
  37. $! P4, if defined, sets a TCP/IP library to use, through one of the following
  38. $! keywords:
  39. $!
  40. $! UCX For UCX
  41. $! TCPIP For TCPIP (post UCX)
  42. $! SOCKETSHR For SOCKETSHR+NETLIB
  43. $!
  44. $! P5, if defined, sets a compiler thread NOT needed on OpenVMS 7.1 (and up)
  45. $!
  46. $! P6, if defined, sets a choice of crypto methods to compile.
  47. $! WARNING: this should only be done to recompile some part of an already
  48. $! fully compiled library.
  49. $!
  50. $! P7, if defined, specifies the C pointer size. Ignored on VAX.
  51. $! ("64=ARGV" gives more efficient code with HP C V7.3 or newer.)
  52. $! Supported values are:
  53. $!
  54. $! "" Compile with default (/NOPOINTER_SIZE)
  55. $! 32 Compile with /POINTER_SIZE=32 (SHORT)
  56. $! 64 Compile with /POINTER_SIZE=64[=ARGV] (LONG[=ARGV]).
  57. $! (Automatically select ARGV if compiler supports it.)
  58. $! 64= Compile with /POINTER_SIZE=64 (LONG).
  59. $! 64=ARGV Compile with /POINTER_SIZE=64=ARGV (LONG=ARGV).
  60. $!
  61. $! P8, if defined, specifies a directory where ZLIB files (zlib.h,
  62. $! libz.olb) may be found. Optionally, a non-default object library
  63. $! name may be included ("dev:[dir]libz_64.olb", for example).
  64. $!
  65. $!
  66. $! Announce/identify.
  67. $!
  68. $ proc = f$environment( "procedure")
  69. $ write sys$output "@@@ "+ -
  70. f$parse( proc, , , "name")+ f$parse( proc, , , "type")
  71. $!
  72. $! Define A TCP/IP Library That We Will Need To Link To.
  73. $! (That Is, If We Need To Link To One.)
  74. $!
  75. $ TCPIP_LIB = ""
  76. $ ZLIB_LIB = ""
  77. $!
  78. $! Check Which Architecture We Are Using.
  79. $!
  80. $ IF (F$GETSYI("CPU").LT.128)
  81. $ THEN
  82. $!
  83. $! The Architecture Is VAX
  84. $!
  85. $ ARCH = "VAX"
  86. $!
  87. $! Else...
  88. $!
  89. $ ELSE
  90. $!
  91. $! The Architecture Is Alpha, IA64 or whatever comes in the future.
  92. $!
  93. $ ARCH = F$EDIT( F$GETSYI( "ARCH_NAME"), "UPCASE")
  94. $ IF (ARCH .EQS. "") THEN ARCH = "UNK"
  95. $!
  96. $! End The Architecture Check.
  97. $!
  98. $ ENDIF
  99. $!
  100. $ ARCHD = ARCH
  101. $ LIB32 = "32"
  102. $ OPT_FILE = ""
  103. $ POINTER_SIZE = ""
  104. $!
  105. $! Define The Different Encryption Types.
  106. $! NOTE: Some might think this list ugly. However, it's made this way to
  107. $! reflect the SDIRS variable in [-]Makefile.org as closely as possible,
  108. $! thereby making it fairly easy to verify that the lists are the same.
  109. $!
  110. $ ET_WHIRLPOOL = "WHRLPOOL"
  111. $ IF ARCH .EQS. "VAX" THEN ET_WHIRLPOOL = ""
  112. $ ENCRYPT_TYPES = "Basic,"+ -
  113. "OBJECTS,"+ -
  114. "MD2,MD4,MD5,SHA,MDC2,HMAC,RIPEMD,"+ET_WHIRLPOOL+","+ -
  115. "DES,AES,RC2,RC4,RC5,IDEA,BF,CAST,CAMELLIA,SEED,MODES,"+ -
  116. "BN,EC,RSA,DSA,ECDSA,DH,ECDH,DSO,ENGINE,"+ -
  117. "BUFFER,BIO,STACK,LHASH,RAND,ERR,"+ -
  118. "EVP,EVP_2,EVP_3,ASN1,ASN1_2,PEM,X509,X509V3,"+ -
  119. "CONF,TXT_DB,PKCS7,PKCS12,COMP,OCSP,UI,KRB5,"+ -
  120. "CMS,PQUEUE,TS,JPAKE,SRP,STORE,CMAC"
  121. $!
  122. $! Check To Make Sure We Have Valid Command Line Parameters.
  123. $!
  124. $ GOSUB CHECK_OPTIONS
  125. $!
  126. $! Define The OBJ and EXE Directories.
  127. $!
  128. $ OBJ_DIR := SYS$DISK:[-.'ARCHD'.OBJ.CRYPTO]
  129. $ EXE_DIR := SYS$DISK:[-.'ARCHD'.EXE.CRYPTO]
  130. $!
  131. $! Specify the destination directory in any /MAP option.
  132. $!
  133. $ if (LINKMAP .eqs. "MAP")
  134. $ then
  135. $ LINKMAP = LINKMAP+ "=''EXE_DIR'"
  136. $ endif
  137. $!
  138. $! Add the location prefix to the linker options file name.
  139. $!
  140. $ if (OPT_FILE .nes. "")
  141. $ then
  142. $ OPT_FILE = EXE_DIR+ OPT_FILE
  143. $ endif
  144. $!
  145. $! Initialise logical names and such
  146. $!
  147. $ GOSUB INITIALISE
  148. $!
  149. $! Tell The User What Kind of Machine We Run On.
  150. $!
  151. $ WRITE SYS$OUTPUT "Host system architecture: ''ARCHD'"
  152. $!
  153. $!
  154. $! Check To See If The Architecture Specific OBJ Directory Exists.
  155. $!
  156. $ IF (F$PARSE(OBJ_DIR).EQS."")
  157. $ THEN
  158. $!
  159. $! It Dosen't Exist, So Create It.
  160. $!
  161. $ CREATE/DIR 'OBJ_DIR'
  162. $!
  163. $! End The Architecture Specific OBJ Directory Check.
  164. $!
  165. $ ENDIF
  166. $!
  167. $! Check To See If The Architecture Specific Directory Exists.
  168. $!
  169. $ IF (F$PARSE(EXE_DIR).EQS."")
  170. $ THEN
  171. $!
  172. $! It Dosen't Exist, So Create It.
  173. $!
  174. $ CREATE/DIRECTORY 'EXE_DIR'
  175. $!
  176. $! End The Architecture Specific Directory Check.
  177. $!
  178. $ ENDIF
  179. $!
  180. $! Define The Library Name.
  181. $!
  182. $ LIB_NAME := 'EXE_DIR'SSL_LIBCRYPTO'LIB32'.OLB
  183. $!
  184. $! Define The CRYPTO-LIB We Are To Use.
  185. $!
  186. $ CRYPTO_LIB := 'EXE_DIR'SSL_LIBCRYPTO'LIB32'.OLB
  187. $!
  188. $! Check To See If We Already Have A "[.xxx.EXE.CRYPTO]LIBCRYPTO.OLB" Library...
  189. $!
  190. $ IF (F$SEARCH(LIB_NAME).EQS."")
  191. $ THEN
  192. $!
  193. $! Guess Not, Create The Library.
  194. $!
  195. $ LIBRARY/CREATE/OBJECT 'LIB_NAME'
  196. $!
  197. $! End The Library Check.
  198. $!
  199. $ ENDIF
  200. $!
  201. $! Build our options file for the application
  202. $!
  203. $ GOSUB CHECK_OPT_FILE
  204. $!
  205. $! Define The Different Encryption "library" Strings.
  206. $!
  207. $ APPS_DES = "DES/DES,CBC3_ENC"
  208. $ APPS_PKCS7 = "ENC/ENC;DEC/DEC;SIGN/SIGN;VERIFY/VERIFY,EXAMPLE"
  209. $
  210. $ LIB_ = "cryptlib,mem,mem_clr,mem_dbg,cversion,ex_data,cpt_err,ebcdic,uid,o_time,o_str,o_dir,thr_id,lock,fips_ers"
  211. $ LIB_MD2 = "md2_dgst,md2_one"
  212. $ LIB_MD4 = "md4_dgst,md4_one"
  213. $ LIB_MD5 = "md5_dgst,md5_one"
  214. $ LIB_SHA = "sha_dgst,sha1dgst,sha_one,sha1_one,sha256,sha512"
  215. $ LIB_MDC2 = "mdc2dgst,mdc2_one"
  216. $ LIB_HMAC = "hmac,hm_ameth,hm_pmeth"
  217. $ LIB_RIPEMD = "rmd_dgst,rmd_one"
  218. $ LIB_WHRLPOOL = "wp_dgst,wp_block"
  219. $ LIB_DES = "set_key,ecb_enc,cbc_enc,"+ -
  220. "ecb3_enc,cfb64enc,cfb64ede,cfb_enc,ofb64ede,"+ -
  221. "enc_read,enc_writ,ofb64enc,"+ -
  222. "ofb_enc,str2key,pcbc_enc,qud_cksm,rand_key,"+ -
  223. "des_enc,fcrypt_b,"+ -
  224. "fcrypt,xcbc_enc,rpc_enc,cbc_cksm,"+ -
  225. "ede_cbcm_enc,des_old,des_old2,read2pwd"
  226. $ LIB_RC2 = "rc2_ecb,rc2_skey,rc2_cbc,rc2cfb64,rc2ofb64"
  227. $ LIB_RC4 = "rc4_skey,rc4_enc"
  228. $ LIB_RC5 = "rc5_skey,rc5_ecb,rc5_enc,rc5cfb64,rc5ofb64"
  229. $ LIB_IDEA = "i_cbc,i_cfb64,i_ofb64,i_ecb,i_skey"
  230. $ LIB_BF = "bf_skey,bf_ecb,bf_enc,bf_cfb64,bf_ofb64"
  231. $ LIB_CAST = "c_skey,c_ecb,c_enc,c_cfb64,c_ofb64"
  232. $ LIB_CAMELLIA = "camellia,cmll_misc,cmll_ecb,cmll_cbc,cmll_ofb,"+ -
  233. "cmll_cfb,cmll_ctr"
  234. $ LIB_SEED = "seed,seed_ecb,seed_cbc,seed_cfb,seed_ofb"
  235. $ LIB_MODES = "cbc128,ctr128,cts128,cfb128,ofb128,gcm128"
  236. $ LIB_BN_ASM = "[.asm]vms.mar,vms-helper"
  237. $ IF F$TRNLNM("OPENSSL_NO_ASM") .OR. ARCH .NES. "VAX" THEN -
  238. LIB_BN_ASM = "bn_asm"
  239. $ LIB_BN = "bn_add,bn_div,bn_exp,bn_lib,bn_ctx,bn_mul,bn_mod,"+ -
  240. "bn_print,bn_rand,bn_shift,bn_word,bn_blind,"+ -
  241. "bn_kron,bn_sqrt,bn_gcd,bn_prime,bn_err,bn_sqr,"+LIB_BN_ASM+","+ -
  242. "bn_recp,bn_mont,bn_mpi,bn_exp2,bn_gf2m,bn_nist,"+ -
  243. "bn_depr,bn_const,bn_x931p"
  244. $ LIB_EC = "ec_lib,ecp_smpl,ecp_mont,ecp_nist,ec_cvt,ec_mult,"+ -
  245. "ec_err,ec_curve,ec_check,ec_print,ec_asn1,ec_key,"+ -
  246. "ec2_smpl,ec2_mult,ec_ameth,ec_pmeth,eck_prn,"+ -
  247. "ecp_nistp224,ecp_oct,ec2_oct,ec_oct"
  248. $ LIB_RSA = "rsa_eay,rsa_gen,rsa_lib,rsa_sign,rsa_saos,rsa_err,"+ -
  249. "rsa_pk1,rsa_ssl,rsa_none,rsa_oaep,rsa_chk,rsa_null,"+ -
  250. "rsa_pss,rsa_x931,rsa_asn1,rsa_depr,rsa_ameth,rsa_prn,"+ -
  251. "rsa_pmeth,rsa_crpt,rsa_x931g"
  252. $ LIB_DSA = "dsa_gen,dsa_key,dsa_lib,dsa_asn1,dsa_vrf,dsa_sign,"+ -
  253. "dsa_err,dsa_ossl,dsa_depr,dsa_ameth,dsa_pmeth,dsa_prn"
  254. $ LIB_ECDSA = "ecs_lib,ecs_asn1,ecs_ossl,ecs_sign,ecs_vrf,ecs_err"
  255. $ LIB_DH = "dh_asn1,dh_gen,dh_key,dh_lib,dh_check,dh_err,dh_depr,"+ -
  256. "dh_ameth,dh_pmeth,dh_prn"
  257. $ LIB_ECDH = "ech_lib,ech_ossl,ech_key,ech_err"
  258. $ LIB_DSO = "dso_dl,dso_dlfcn,dso_err,dso_lib,dso_null,"+ -
  259. "dso_openssl,dso_win32,dso_vms,dso_beos"
  260. $ LIB_ENGINE = "eng_err,eng_lib,eng_list,eng_init,eng_ctrl,"+ -
  261. "eng_table,eng_pkey,eng_fat,eng_all,"+ -
  262. "tb_rsa,tb_dsa,tb_ecdsa,tb_dh,tb_ecdh,tb_rand,tb_store,"+ -
  263. "tb_cipher,tb_digest,tb_pkmeth,tb_asnmth,"+ -
  264. "eng_openssl,eng_dyn,eng_cnf,eng_cryptodev,"+ -
  265. "eng_aesni"
  266. $ LIB_AES = "aes_core,aes_misc,aes_ecb,aes_cbc,aes_cfb,aes_ofb,"+ -
  267. "aes_ige,aes_wrap"
  268. $ LIB_BUFFER = "buffer,buf_str,buf_err"
  269. $ LIB_BIO = "bio_lib,bio_cb,bio_err,"+ -
  270. "bss_mem,bss_null,bss_fd,"+ -
  271. "bss_file,bss_sock,bss_conn,"+ -
  272. "bf_null,bf_buff,b_print,b_dump,"+ -
  273. "b_sock,bss_acpt,bf_nbio,bss_rtcp,bss_bio,bss_log,"+ -
  274. "bss_dgram,"+ -
  275. "bf_lbuf"
  276. $ LIB_STACK = "stack"
  277. $ LIB_LHASH = "lhash,lh_stats"
  278. $ LIB_RAND = "md_rand,randfile,rand_lib,rand_err,rand_egd,"+ -
  279. "rand_vms"
  280. $ LIB_ERR = "err,err_all,err_prn"
  281. $ LIB_OBJECTS = "o_names,obj_dat,obj_lib,obj_err,obj_xref"
  282. $ LIB_EVP = "encode,digest,evp_enc,evp_key,evp_acnf,"+ -
  283. "e_des,e_bf,e_idea,e_des3,e_camellia,"+ -
  284. "e_rc4,e_aes,names,e_seed,"+ -
  285. "e_xcbc_d,e_rc2,e_cast,e_rc5"
  286. $ LIB_EVP_2 = "m_null,m_md2,m_md4,m_md5,m_sha,m_sha1,m_wp," + -
  287. "m_dss,m_dss1,m_mdc2,m_ripemd,m_ecdsa,"+ -
  288. "p_open,p_seal,p_sign,p_verify,p_lib,p_enc,p_dec,"+ -
  289. "bio_md,bio_b64,bio_enc,evp_err,e_null,"+ -
  290. "c_all,c_allc,c_alld,evp_lib,bio_ok,"+-
  291. "evp_pkey,evp_pbe,p5_crpt,p5_crpt2"
  292. $ LIB_EVP_3 = "e_old,pmeth_lib,pmeth_fn,pmeth_gn,m_sigver"
  293. $ LIB_ASN1 = "a_object,a_bitstr,a_utctm,a_gentm,a_time,a_int,a_octet,"+ -
  294. "a_print,a_type,a_set,a_dup,a_d2i_fp,a_i2d_fp,"+ -
  295. "a_enum,a_utf8,a_sign,a_digest,a_verify,a_mbstr,a_strex,"+ -
  296. "x_algor,x_val,x_pubkey,x_sig,x_req,x_attrib,x_bignum,"+ -
  297. "x_long,x_name,x_x509,x_x509a,x_crl,x_info,x_spki,nsseq,"+ -
  298. "x_nx509,d2i_pu,d2i_pr,i2d_pu,i2d_pr"
  299. $ LIB_ASN1_2 = "t_req,t_x509,t_x509a,t_crl,t_pkey,t_spki,t_bitst,"+ -
  300. "tasn_new,tasn_fre,tasn_enc,tasn_dec,tasn_utl,tasn_typ,"+ -
  301. "tasn_prn,tasn_scn,ameth_lib,"+ -
  302. "f_int,f_string,n_pkey,"+ -
  303. "f_enum,x_pkey,a_bool,x_exten,bio_asn1,bio_ndef,asn_mime,"+ -
  304. "asn1_gen,asn1_par,asn1_lib,asn1_err,a_bytes,a_strnid,"+ -
  305. "evp_asn1,asn_pack,p5_pbe,p5_pbev2,p8_pkey,asn_moid"
  306. $ LIB_PEM = "pem_sign,pem_seal,pem_info,pem_lib,pem_all,pem_err,"+ -
  307. "pem_x509,pem_xaux,pem_oth,pem_pk8,pem_pkey,pvkfmt"
  308. $ LIB_X509 = "x509_def,x509_d2,x509_r2x,x509_cmp,"+ -
  309. "x509_obj,x509_req,x509spki,x509_vfy,"+ -
  310. "x509_set,x509cset,x509rset,x509_err,"+ -
  311. "x509name,x509_v3,x509_ext,x509_att,"+ -
  312. "x509type,x509_lu,x_all,x509_txt,"+ -
  313. "x509_trs,by_file,by_dir,x509_vpm"
  314. $ LIB_X509V3 = "v3_bcons,v3_bitst,v3_conf,v3_extku,v3_ia5,v3_lib,"+ -
  315. "v3_prn,v3_utl,v3err,v3_genn,v3_alt,v3_skey,v3_akey,v3_pku,"+ -
  316. "v3_int,v3_enum,v3_sxnet,v3_cpols,v3_crld,v3_purp,v3_info,"+ -
  317. "v3_ocsp,v3_akeya,v3_pmaps,v3_pcons,v3_ncons,v3_pcia,v3_pci,"+ -
  318. "pcy_cache,pcy_node,pcy_data,pcy_map,pcy_tree,pcy_lib,"+ -
  319. "v3_asid,v3_addr"
  320. $ LIB_CONF = "conf_err,conf_lib,conf_api,conf_def,conf_mod,conf_mall,conf_sap"
  321. $ LIB_TXT_DB = "txt_db"
  322. $ LIB_PKCS7 = "pk7_asn1,pk7_lib,pkcs7err,pk7_doit,pk7_smime,pk7_attr,"+ -
  323. "pk7_mime,bio_pk7"
  324. $ LIB_PKCS12 = "p12_add,p12_asn,p12_attr,p12_crpt,p12_crt,p12_decr,"+ -
  325. "p12_init,p12_key,p12_kiss,p12_mutl,"+ -
  326. "p12_utl,p12_npas,pk12err,p12_p8d,p12_p8e"
  327. $ LIB_COMP = "comp_lib,comp_err,"+ -
  328. "c_rle,c_zlib"
  329. $ LIB_OCSP = "ocsp_asn,ocsp_ext,ocsp_ht,ocsp_lib,ocsp_cl,"+ -
  330. "ocsp_srv,ocsp_prn,ocsp_vfy,ocsp_err"
  331. $ LIB_UI_COMPAT = ",ui_compat"
  332. $ LIB_UI = "ui_err,ui_lib,ui_openssl,ui_util"+LIB_UI_COMPAT
  333. $ LIB_KRB5 = "krb5_asn"
  334. $ LIB_CMS = "cms_lib,cms_asn1,cms_att,cms_io,cms_smime,cms_err,"+ -
  335. "cms_sd,cms_dd,cms_cd,cms_env,cms_enc,cms_ess,"+ -
  336. "cms_pwri"
  337. $ LIB_PQUEUE = "pqueue"
  338. $ LIB_TS = "ts_err,ts_req_utils,ts_req_print,ts_rsp_utils,ts_rsp_print,"+ -
  339. "ts_rsp_sign,ts_rsp_verify,ts_verify_ctx,ts_lib,ts_conf,"+ -
  340. "ts_asn1"
  341. $ LIB_JPAKE = "jpake,jpake_err"
  342. $ LIB_SRP = "srp_lib,srp_vfy"
  343. $ LIB_STORE = "str_err,str_lib,str_meth,str_mem"
  344. $ LIB_CMAC = "cmac,cm_ameth,cm_pmeth"
  345. $!
  346. $! Setup exceptional compilations
  347. $!
  348. $ CC3_SHOWN = 0
  349. $ CC4_SHOWN = 0
  350. $ CC5_SHOWN = 0
  351. $ CC6_SHOWN = 0
  352. $!
  353. $! The following lists must have leading and trailing commas, and no
  354. $! embedded spaces. (They are scanned for ",name,".)
  355. $!
  356. $ ! Add definitions for no threads on OpenVMS 7.1 and higher.
  357. $ COMPILEWITH_CC3 = ",bss_rtcp,"
  358. $ ! Disable the DOLLARID warning. Not needed with /STANDARD=RELAXED.
  359. $ COMPILEWITH_CC4 = "" !!! ",a_utctm,bss_log,o_time,o_dir,"
  360. $ ! Disable disjoint optimization on VAX with DECC.
  361. $ COMPILEWITH_CC5 = ",md2_dgst,md4_dgst,md5_dgst,mdc2dgst," + -
  362. "seed,sha_dgst,sha1dgst,rmd_dgst,bf_enc,"
  363. $ ! Disable the MIXLINKAGE warning.
  364. $ COMPILEWITH_CC6 = "" !!! ",enc_read,set_key,"
  365. $!
  366. $! Figure Out What Other Modules We Are To Build.
  367. $!
  368. $ BUILD_SET:
  369. $!
  370. $! Define A Module Counter.
  371. $!
  372. $ MODULE_COUNTER = 0
  373. $!
  374. $! Top Of The Loop.
  375. $!
  376. $ MODULE_NEXT:
  377. $!
  378. $! Extract The Module Name From The Encryption List.
  379. $!
  380. $ MODULE_NAME = F$ELEMENT(MODULE_COUNTER,",",ENCRYPT_TYPES)
  381. $ IF MODULE_NAME.EQS."Basic" THEN MODULE_NAME = ""
  382. $ MODULE_NAME1 = MODULE_NAME
  383. $!
  384. $! Check To See If We Are At The End Of The Module List.
  385. $!
  386. $ IF (MODULE_NAME.EQS.",")
  387. $ THEN
  388. $!
  389. $! We Are At The End Of The Module List, Go To MODULE_DONE.
  390. $!
  391. $ GOTO MODULE_DONE
  392. $!
  393. $! End The Module List Check.
  394. $!
  395. $ ENDIF
  396. $!
  397. $! Increment The Moudle Counter.
  398. $!
  399. $ MODULE_COUNTER = MODULE_COUNTER + 1
  400. $!
  401. $! Create The Library and Apps Module Names.
  402. $!
  403. $ LIB_MODULE = "LIB_" + MODULE_NAME
  404. $ APPS_MODULE = "APPS_" + MODULE_NAME
  405. $ IF (F$EXTRACT(0,5,MODULE_NAME).EQS."ASN1_")
  406. $ THEN
  407. $ MODULE_NAME = "ASN1"
  408. $ ENDIF
  409. $ IF (F$EXTRACT(0,4,MODULE_NAME).EQS."EVP_")
  410. $ THEN
  411. $ MODULE_NAME = "EVP"
  412. $ ENDIF
  413. $!
  414. $! Set state (can be LIB and APPS)
  415. $!
  416. $ STATE = "LIB"
  417. $ IF BUILDALL .EQS. "APPS" THEN STATE = "APPS"
  418. $!
  419. $! Check if the library module name actually is defined
  420. $!
  421. $ IF F$TYPE('LIB_MODULE') .EQS. ""
  422. $ THEN
  423. $ WRITE SYS$ERROR ""
  424. $ WRITE SYS$ERROR "The module ",MODULE_NAME1," does not exist. Continuing..."
  425. $ WRITE SYS$ERROR ""
  426. $ GOTO MODULE_NEXT
  427. $ ENDIF
  428. $!
  429. $! Top Of The Module Loop.
  430. $!
  431. $ MODULE_AGAIN:
  432. $!
  433. $! Tell The User What Module We Are Building.
  434. $!
  435. $ IF (MODULE_NAME1.NES."")
  436. $ THEN
  437. $ IF STATE .EQS. "LIB"
  438. $ THEN
  439. $ WRITE SYS$OUTPUT "Compiling The ",MODULE_NAME1," Library Files. (",BUILDALL,",",STATE,")"
  440. $ ELSE IF F$TYPE('APPS_MODULE') .NES. ""
  441. $ THEN
  442. $ WRITE SYS$OUTPUT "Compiling The ",MODULE_NAME1," Applications. (",BUILDALL,",",STATE,")"
  443. $ ENDIF
  444. $ ENDIF
  445. $ ENDIF
  446. $!
  447. $! Define A File Counter And Set It To "0".
  448. $!
  449. $ FILE_COUNTER = 0
  450. $ APPLICATION = ""
  451. $ APPLICATION_COUNTER = 0
  452. $!
  453. $! Top Of The File Loop.
  454. $!
  455. $ NEXT_FILE:
  456. $!
  457. $! Look in the LIB_MODULE is we're in state LIB
  458. $!
  459. $ IF STATE .EQS. "LIB"
  460. $ THEN
  461. $!
  462. $! O.K, Extract The File Name From The File List.
  463. $!
  464. $ FILE_NAME = F$ELEMENT(FILE_COUNTER,",",'LIB_MODULE')
  465. $!
  466. $! else
  467. $!
  468. $ ELSE
  469. $ FILE_NAME = ","
  470. $!
  471. $ IF F$TYPE('APPS_MODULE') .NES. ""
  472. $ THEN
  473. $!
  474. $! Extract The File Name From The File List.
  475. $! This part is a bit more complicated.
  476. $!
  477. $ IF APPLICATION .EQS. ""
  478. $ THEN
  479. $ APPLICATION = F$ELEMENT(APPLICATION_COUNTER,";",'APPS_MODULE')
  480. $ APPLICATION_COUNTER = APPLICATION_COUNTER + 1
  481. $ APPLICATION_OBJECTS = F$ELEMENT(1,"/",APPLICATION)
  482. $ APPLICATION = F$ELEMENT(0,"/",APPLICATION)
  483. $ FILE_COUNTER = 0
  484. $ ENDIF
  485. $
  486. $! WRITE SYS$OUTPUT "DEBUG: SHOW SYMBOL APPLICATION*"
  487. $! SHOW SYMBOL APPLICATION*
  488. $!
  489. $ IF APPLICATION .NES. ";"
  490. $ THEN
  491. $ FILE_NAME = F$ELEMENT(FILE_COUNTER,",",APPLICATION_OBJECTS)
  492. $ IF FILE_NAME .EQS. ","
  493. $ THEN
  494. $ APPLICATION = ""
  495. $ GOTO NEXT_FILE
  496. $ ENDIF
  497. $ ENDIF
  498. $ ENDIF
  499. $ ENDIF
  500. $!
  501. $! Check To See If We Are At The End Of The File List.
  502. $!
  503. $ IF (FILE_NAME.EQS.",")
  504. $ THEN
  505. $!
  506. $! We Are At The End Of The File List, Change State Or Goto FILE_DONE.
  507. $!
  508. $ IF STATE .EQS. "LIB" .AND. BUILDALL .NES. "LIBRARY"
  509. $ THEN
  510. $ STATE = "APPS"
  511. $ GOTO MODULE_AGAIN
  512. $ ELSE
  513. $ GOTO FILE_DONE
  514. $ ENDIF
  515. $!
  516. $! End The File List Check.
  517. $!
  518. $ ENDIF
  519. $!
  520. $! Increment The Counter.
  521. $!
  522. $ FILE_COUNTER = FILE_COUNTER + 1
  523. $!
  524. $! Create The Source File Name.
  525. $!
  526. $ TMP_FILE_NAME = F$ELEMENT(1,"]",FILE_NAME)
  527. $ IF TMP_FILE_NAME .EQS. "]" THEN TMP_FILE_NAME = FILE_NAME
  528. $ IF F$ELEMENT(0,".",TMP_FILE_NAME) .EQS. TMP_FILE_NAME THEN -
  529. FILE_NAME = FILE_NAME + ".c"
  530. $ IF (MODULE_NAME.NES."")
  531. $ THEN
  532. $ SOURCE_FILE = "SYS$DISK:[." + MODULE_NAME+ "]" + FILE_NAME
  533. $ ELSE
  534. $ SOURCE_FILE = "SYS$DISK:[]" + FILE_NAME
  535. $ ENDIF
  536. $ SOURCE_FILE = SOURCE_FILE - "]["
  537. $!
  538. $! Create The Object File Name.
  539. $!
  540. $ OBJECT_FILE = OBJ_DIR + F$PARSE(FILE_NAME,,,"NAME","SYNTAX_ONLY") + ".OBJ"
  541. $ ON WARNING THEN GOTO NEXT_FILE
  542. $!
  543. $! Check To See If The File We Want To Compile Is Actually There.
  544. $!
  545. $ IF (F$SEARCH(SOURCE_FILE).EQS."")
  546. $ THEN
  547. $!
  548. $! Tell The User That The File Doesn't Exist.
  549. $!
  550. $ WRITE SYS$OUTPUT ""
  551. $ WRITE SYS$OUTPUT "The File ",SOURCE_FILE," Doesn't Exist."
  552. $ WRITE SYS$OUTPUT ""
  553. $!
  554. $! Exit The Build.
  555. $!
  556. $ GOTO EXIT
  557. $!
  558. $! End The File Exist Check.
  559. $!
  560. $ ENDIF
  561. $!
  562. $! Tell The User We Are Compiling The File.
  563. $!
  564. $ IF (MODULE_NAME.EQS."")
  565. $ THEN
  566. $ WRITE SYS$OUTPUT "Compiling The ",FILE_NAME," File. (",BUILDALL,",",STATE,")"
  567. $ ENDIF
  568. $ IF (MODULE_NAME.NES."")
  569. $ THEN
  570. $ WRITE SYS$OUTPUT " ",FILE_NAME,""
  571. $ ENDIF
  572. $!
  573. $! Compile The File.
  574. $!
  575. $ ON ERROR THEN GOTO NEXT_FILE
  576. $ FILE_NAME0 = ","+ F$ELEMENT(0,".",FILE_NAME)+ ","
  577. $ IF FILE_NAME - ".mar" .NES. FILE_NAME
  578. $ THEN
  579. $ MACRO/OBJECT='OBJECT_FILE' 'SOURCE_FILE'
  580. $ ELSE
  581. $ IF COMPILEWITH_CC3 - FILE_NAME0 .NES. COMPILEWITH_CC3
  582. $ THEN
  583. $ write sys$output " \Using special rule (3)"
  584. $ if (.not. CC3_SHOWN)
  585. $ then
  586. $ CC3_SHOWN = 1
  587. $ x = " "+ CC3
  588. $ write /symbol sys$output x
  589. $ endif
  590. $ CC3/OBJECT='OBJECT_FILE' 'SOURCE_FILE'
  591. $ ELSE
  592. $ IF COMPILEWITH_CC4 - FILE_NAME0 .NES. COMPILEWITH_CC4
  593. $ THEN
  594. $ write /symbol sys$output " \Using special rule (4)"
  595. $ if (.not. CC4_SHOWN)
  596. $ then
  597. $ CC4_SHOWN = 1
  598. $ x = " "+ CC4
  599. $ write /symbol sys$output x
  600. $ endif
  601. $ CC4/OBJECT='OBJECT_FILE' 'SOURCE_FILE'
  602. $ ELSE
  603. $ IF CC5_DIFFERENT .AND. -
  604. (COMPILEWITH_CC5 - FILE_NAME0 .NES. COMPILEWITH_CC5)
  605. $ THEN
  606. $ write sys$output " \Using special rule (5)"
  607. $ if (.not. CC5_SHOWN)
  608. $ then
  609. $ CC5_SHOWN = 1
  610. $ x = " "+ CC5
  611. $ write /symbol sys$output x
  612. $ endif
  613. $ CC5/OBJECT='OBJECT_FILE' 'SOURCE_FILE'
  614. $ ELSE
  615. $ IF COMPILEWITH_CC6 - FILE_NAME0 .NES. COMPILEWITH_CC6
  616. $ THEN
  617. $ write sys$output " \Using special rule (6)"
  618. $ if (.not. CC6_SHOWN)
  619. $ then
  620. $ CC6_SHOWN = 1
  621. $ x = " "+ CC6
  622. $ write /symbol sys$output x
  623. $ endif
  624. $ CC6/OBJECT='OBJECT_FILE' 'SOURCE_FILE'
  625. $ ELSE
  626. $ CC/OBJECT='OBJECT_FILE' 'SOURCE_FILE'
  627. $ ENDIF
  628. $ ENDIF
  629. $ ENDIF
  630. $ ENDIF
  631. $ ENDIF
  632. $ IF STATE .EQS. "LIB"
  633. $ THEN
  634. $!
  635. $! Add It To The Library.
  636. $!
  637. $ LIBRARY/REPLACE 'LIB_NAME' 'OBJECT_FILE'
  638. $!
  639. $! Time To Clean Up The Object File.
  640. $!
  641. $ DELETE 'OBJECT_FILE';*
  642. $ ENDIF
  643. $!
  644. $! Go Back And Do It Again.
  645. $!
  646. $ GOTO NEXT_FILE
  647. $!
  648. $! All Done With This Library Part.
  649. $!
  650. $ FILE_DONE:
  651. $!
  652. $! Time To Build Some Applications
  653. $!
  654. $ IF F$TYPE('APPS_MODULE') .NES. "" .AND. BUILDALL .NES. "LIBRARY"
  655. $ THEN
  656. $ APPLICATION_COUNTER = 0
  657. $ NEXT_APPLICATION:
  658. $ APPLICATION = F$ELEMENT(APPLICATION_COUNTER,";",'APPS_MODULE')
  659. $ IF APPLICATION .EQS. ";" THEN GOTO APPLICATION_DONE
  660. $
  661. $ APPLICATION_COUNTER = APPLICATION_COUNTER + 1
  662. $ APPLICATION_OBJECTS = F$ELEMENT(1,"/",APPLICATION)
  663. $ APPLICATION = F$ELEMENT(0,"/",APPLICATION)
  664. $
  665. $! WRITE SYS$OUTPUT "DEBUG: SHOW SYMBOL APPLICATION*"
  666. $! SHOW SYMBOL APPLICATION*
  667. $!
  668. $! Tell the user what happens
  669. $!
  670. $ WRITE SYS$OUTPUT " ",APPLICATION,".exe"
  671. $!
  672. $! Link The Program.
  673. $!
  674. $ ON ERROR THEN GOTO NEXT_APPLICATION
  675. $!
  676. $! Link With A TCP/IP Library.
  677. $!
  678. $ LINK /'DEBUGGER' /'LINKMAP' /'TRACEBACK' -
  679. /EXE='EXE_DIR''APPLICATION'.EXE -
  680. 'OBJ_DIR''APPLICATION_OBJECTS', -
  681. 'CRYPTO_LIB'/LIBRARY -
  682. 'TCPIP_LIB' -
  683. 'ZLIB_LIB' -
  684. ,'OPT_FILE' /OPTIONS
  685. $!
  686. $ GOTO NEXT_APPLICATION
  687. $ APPLICATION_DONE:
  688. $ ENDIF
  689. $!
  690. $! Go Back And Get The Next Module.
  691. $!
  692. $ GOTO MODULE_NEXT
  693. $!
  694. $! All Done With This Module.
  695. $!
  696. $ MODULE_DONE:
  697. $!
  698. $! Tell The User That We Are All Done.
  699. $!
  700. $ WRITE SYS$OUTPUT "All Done..."
  701. $ EXIT:
  702. $ GOSUB CLEANUP
  703. $ EXIT
  704. $!
  705. $! Check For The Link Option FIle.
  706. $!
  707. $ CHECK_OPT_FILE:
  708. $!
  709. $! Check To See If We Need To Make A VAX C Option File.
  710. $!
  711. $ IF (COMPILER.EQS."VAXC")
  712. $ THEN
  713. $!
  714. $! Check To See If We Already Have A VAX C Linker Option File.
  715. $!
  716. $ IF (F$SEARCH(OPT_FILE).EQS."")
  717. $ THEN
  718. $!
  719. $! We Need A VAX C Linker Option File.
  720. $!
  721. $ CREATE 'OPT_FILE'
  722. $DECK
  723. !
  724. ! Default System Options File To Link Against
  725. ! The Sharable VAX C Runtime Library.
  726. !
  727. SYS$SHARE:VAXCRTL.EXE/SHARE
  728. $EOD
  729. $!
  730. $! End The Option File Check.
  731. $!
  732. $ ENDIF
  733. $!
  734. $! End The VAXC Check.
  735. $!
  736. $ ENDIF
  737. $!
  738. $! Check To See If We Need A GNU C Option File.
  739. $!
  740. $ IF (COMPILER.EQS."GNUC")
  741. $ THEN
  742. $!
  743. $! Check To See If We Already Have A GNU C Linker Option File.
  744. $!
  745. $ IF (F$SEARCH(OPT_FILE).EQS."")
  746. $ THEN
  747. $!
  748. $! We Need A GNU C Linker Option File.
  749. $!
  750. $ CREATE 'OPT_FILE'
  751. $DECK
  752. !
  753. ! Default System Options File To Link Against
  754. ! The Sharable C Runtime Library.
  755. !
  756. GNU_CC:[000000]GCCLIB/LIBRARY
  757. SYS$SHARE:VAXCRTL/SHARE
  758. $EOD
  759. $!
  760. $! End The Option File Check.
  761. $!
  762. $ ENDIF
  763. $!
  764. $! End The GNU C Check.
  765. $!
  766. $ ENDIF
  767. $!
  768. $! Check To See If We Need A DEC C Option File.
  769. $!
  770. $ IF (COMPILER.EQS."DECC")
  771. $ THEN
  772. $!
  773. $! Check To See If We Already Have A DEC C Linker Option File.
  774. $!
  775. $ IF (F$SEARCH(OPT_FILE).EQS."")
  776. $ THEN
  777. $!
  778. $! Figure Out If We Need A non-VAX Or A VAX Linker Option File.
  779. $!
  780. $ IF ARCH .EQS. "VAX"
  781. $ THEN
  782. $!
  783. $! We Need A DEC C Linker Option File For VAX.
  784. $!
  785. $ CREATE 'OPT_FILE'
  786. $DECK
  787. !
  788. ! Default System Options File To Link Against
  789. ! The Sharable DEC C Runtime Library.
  790. !
  791. SYS$SHARE:DECC$SHR.EXE/SHARE
  792. $EOD
  793. $!
  794. $! Else...
  795. $!
  796. $ ELSE
  797. $!
  798. $! Create The non-VAX Linker Option File.
  799. $!
  800. $ CREATE 'OPT_FILE'
  801. $DECK
  802. !
  803. ! Default System Options File For non-VAX To Link Against
  804. ! The Sharable C Runtime Library.
  805. !
  806. SYS$SHARE:CMA$OPEN_LIB_SHR/SHARE
  807. SYS$SHARE:CMA$OPEN_RTL/SHARE
  808. $EOD
  809. $!
  810. $! End The DEC C Option File Check.
  811. $!
  812. $ ENDIF
  813. $!
  814. $! End The Option File Search.
  815. $!
  816. $ ENDIF
  817. $!
  818. $! End The DEC C Check.
  819. $!
  820. $ ENDIF
  821. $!
  822. $! Tell The User What Linker Option File We Are Using.
  823. $!
  824. $ WRITE SYS$OUTPUT "Using Linker Option File ",OPT_FILE,"."
  825. $!
  826. $! Time To RETURN.
  827. $!
  828. $ RETURN
  829. $!
  830. $! Check The User's Options.
  831. $!
  832. $ CHECK_OPTIONS:
  833. $!
  834. $! Check To See If P1 Is Blank.
  835. $!
  836. $ IF (P1.EQS."ALL")
  837. $ THEN
  838. $!
  839. $! P1 Is Blank, So Build Everything.
  840. $!
  841. $ BUILDALL = "TRUE"
  842. $!
  843. $! Else...
  844. $!
  845. $ ELSE
  846. $!
  847. $! Else, Check To See If P1 Has A Valid Argument.
  848. $!
  849. $ IF (P1.EQS."LIBRARY").OR.(P1.EQS."APPS")
  850. $ THEN
  851. $!
  852. $! A Valid Argument.
  853. $!
  854. $ BUILDALL = P1
  855. $!
  856. $! Else...
  857. $!
  858. $ ELSE
  859. $!
  860. $! Tell The User We Don't Know What They Want.
  861. $!
  862. $ WRITE SYS$OUTPUT ""
  863. $ WRITE SYS$OUTPUT "The Option ",P1," Is Invalid. The Valid Options Are:"
  864. $ WRITE SYS$OUTPUT ""
  865. $ WRITE SYS$OUTPUT " ALL : Just Build Everything."
  866. $ WRITE SYS$OUTPUT " LIBRARY : To Compile Just The [.xxx.EXE.CRYPTO]LIBCRYPTO.OLB Library."
  867. $ WRITE SYS$OUTPUT " APPS : To Compile Just The [.xxx.EXE.CRYPTO]*.EXE Programs."
  868. $ WRITE SYS$OUTPUT ""
  869. $ WRITE SYS$OUTPUT " Where 'xxx' Stands For:"
  870. $ WRITE SYS$OUTPUT ""
  871. $ WRITE SYS$OUTPUT " ALPHA[64]: Alpha Architecture."
  872. $ WRITE SYS$OUTPUT " IA64[64] : IA64 Architecture."
  873. $ WRITE SYS$OUTPUT " VAX : VAX Architecture."
  874. $ WRITE SYS$OUTPUT ""
  875. $!
  876. $! Time To EXIT.
  877. $!
  878. $ EXIT
  879. $!
  880. $! End The Valid Argument Check.
  881. $!
  882. $ ENDIF
  883. $!
  884. $! End The P1 Check.
  885. $!
  886. $ ENDIF
  887. $!
  888. $! Check To See If P2 Is Blank.
  889. $!
  890. $ IF (P2.EQS."NODEBUG")
  891. $ THEN
  892. $!
  893. $! P2 Is NODEBUG, So Compile Without The Debugger Information.
  894. $!
  895. $ DEBUGGER = "NODEBUG"
  896. $ LINKMAP = "NOMAP"
  897. $ TRACEBACK = "NOTRACEBACK"
  898. $ GCC_OPTIMIZE = "OPTIMIZE"
  899. $ CC_OPTIMIZE = "OPTIMIZE"
  900. $ MACRO_OPTIMIZE = "OPTIMIZE"
  901. $ WRITE SYS$OUTPUT "No Debugger Information Will Be Produced During Compile."
  902. $ WRITE SYS$OUTPUT "Compiling With Compiler Optimization."
  903. $ ELSE
  904. $!
  905. $! Check To See If We Are To Compile With Debugger Information.
  906. $!
  907. $ IF (P2.EQS."DEBUG")
  908. $ THEN
  909. $!
  910. $! Compile With Debugger Information.
  911. $!
  912. $ DEBUGGER = "DEBUG"
  913. $ LINKMAP = "MAP"
  914. $ TRACEBACK = "TRACEBACK"
  915. $ GCC_OPTIMIZE = "NOOPTIMIZE"
  916. $ CC_OPTIMIZE = "NOOPTIMIZE"
  917. $ MACRO_OPTIMIZE = "NOOPTIMIZE"
  918. $ WRITE SYS$OUTPUT "Debugger Information Will Be Produced During Compile."
  919. $ WRITE SYS$OUTPUT "Compiling Without Compiler Optimization."
  920. $ ELSE
  921. $!
  922. $! They Entered An Invalid Option.
  923. $!
  924. $ WRITE SYS$OUTPUT ""
  925. $ WRITE SYS$OUTPUT "The Option ",P2," Is Invalid. The Valid Options Are:"
  926. $ WRITE SYS$OUTPUT ""
  927. $ WRITE SYS$OUTPUT " DEBUG : Compile With The Debugger Information."
  928. $ WRITE SYS$OUTPUT " NODEBUG : Compile Without The Debugger Information."
  929. $ WRITE SYS$OUTPUT ""
  930. $!
  931. $! Time To EXIT.
  932. $!
  933. $ EXIT
  934. $!
  935. $! End The Valid Argument Check.
  936. $!
  937. $ ENDIF
  938. $!
  939. $! End The P2 Check.
  940. $!
  941. $ ENDIF
  942. $!
  943. $! Special Threads For OpenVMS v7.1 Or Later
  944. $!
  945. $! Written By: Richard Levitte
  946. $! richard@levitte.org
  947. $!
  948. $!
  949. $! Check To See If We Have A Option For P5.
  950. $!
  951. $ IF (P5.EQS."")
  952. $ THEN
  953. $!
  954. $! Get The Version Of VMS We Are Using.
  955. $!
  956. $ ISSEVEN :=
  957. $ TMP = F$ELEMENT(0,"-",F$EXTRACT(1,4,F$GETSYI("VERSION")))
  958. $ TMP = F$INTEGER(F$ELEMENT(0,".",TMP)+F$ELEMENT(1,".",TMP))
  959. $!
  960. $! Check To See If The VMS Version Is v7.1 Or Later.
  961. $!
  962. $ IF (TMP.GE.71)
  963. $ THEN
  964. $!
  965. $! We Have OpenVMS v7.1 Or Later, So Use The Special Threads.
  966. $!
  967. $ ISSEVEN := ,PTHREAD_USE_D4
  968. $!
  969. $! End The VMS Version Check.
  970. $!
  971. $ ENDIF
  972. $!
  973. $! End The P5 Check.
  974. $!
  975. $ ENDIF
  976. $!
  977. $! Check P7 (POINTER_SIZE).
  978. $!
  979. $ IF (P7 .NES. "") .AND. (ARCH .NES. "VAX")
  980. $ THEN
  981. $!
  982. $ IF (P7 .EQS. "32")
  983. $ THEN
  984. $ POINTER_SIZE = " /POINTER_SIZE=32"
  985. $ ELSE
  986. $ POINTER_SIZE = F$EDIT( P7, "COLLAPSE, UPCASE")
  987. $ IF ((POINTER_SIZE .EQS. "64") .OR. -
  988. (POINTER_SIZE .EQS. "64=") .OR. -
  989. (POINTER_SIZE .EQS. "64=ARGV"))
  990. $ THEN
  991. $ ARCHD = ARCH+ "_64"
  992. $ LIB32 = ""
  993. $ POINTER_SIZE = " /POINTER_SIZE=64"
  994. $ ELSE
  995. $!
  996. $! Tell The User Entered An Invalid Option.
  997. $!
  998. $ WRITE SYS$OUTPUT ""
  999. $ WRITE SYS$OUTPUT "The Option ", P7, -
  1000. " Is Invalid. The Valid Options Are:"
  1001. $ WRITE SYS$OUTPUT ""
  1002. $ WRITE SYS$OUTPUT -
  1003. " """" : Compile with default (short) pointers."
  1004. $ WRITE SYS$OUTPUT -
  1005. " 32 : Compile with 32-bit (short) pointers."
  1006. $ WRITE SYS$OUTPUT -
  1007. " 64 : Compile with 64-bit (long) pointers (auto ARGV)."
  1008. $ WRITE SYS$OUTPUT -
  1009. " 64= : Compile with 64-bit (long) pointers (no ARGV)."
  1010. $ WRITE SYS$OUTPUT -
  1011. " 64=ARGV : Compile with 64-bit (long) pointers (ARGV)."
  1012. $ WRITE SYS$OUTPUT ""
  1013. $!
  1014. $! Time To EXIT.
  1015. $!
  1016. $ EXIT
  1017. $!
  1018. $ ENDIF
  1019. $!
  1020. $ ENDIF
  1021. $!
  1022. $! End The P7 (POINTER_SIZE) Check.
  1023. $!
  1024. $ ENDIF
  1025. $!
  1026. $! Set basic C compiler /INCLUDE directories.
  1027. $!
  1028. $ CC_INCLUDES = "SYS$DISK:[.''ARCHD'],SYS$DISK:[],SYS$DISK:[-],"+ -
  1029. "SYS$DISK:[.ENGINE.VENDOR_DEFNS],SYS$DISK:[.EVP],SYS$DISK:[.ASN1],"+ -
  1030. "SYS$DISK:[.MODES]"
  1031. $!
  1032. $! Check To See If P3 Is Blank.
  1033. $!
  1034. $ IF (P3.EQS."")
  1035. $ THEN
  1036. $!
  1037. $! O.K., The User Didn't Specify A Compiler, Let's Try To
  1038. $! Find Out Which One To Use.
  1039. $!
  1040. $! Check To See If We Have GNU C.
  1041. $!
  1042. $ IF (F$TRNLNM("GNU_CC").NES."")
  1043. $ THEN
  1044. $!
  1045. $! Looks Like GNUC, Set To Use GNUC.
  1046. $!
  1047. $ P3 = "GNUC"
  1048. $!
  1049. $! Else...
  1050. $!
  1051. $ ELSE
  1052. $!
  1053. $! Check To See If We Have VAXC Or DECC.
  1054. $!
  1055. $ IF (ARCH.NES."VAX").OR.(F$TRNLNM("DECC$CC_DEFAULT").NES."")
  1056. $ THEN
  1057. $!
  1058. $! Looks Like DECC, Set To Use DECC.
  1059. $!
  1060. $ P3 = "DECC"
  1061. $!
  1062. $! Else...
  1063. $!
  1064. $ ELSE
  1065. $!
  1066. $! Looks Like VAXC, Set To Use VAXC.
  1067. $!
  1068. $ P3 = "VAXC"
  1069. $!
  1070. $! End The VAXC Compiler Check.
  1071. $!
  1072. $ ENDIF
  1073. $!
  1074. $! End The DECC & VAXC Compiler Check.
  1075. $!
  1076. $ ENDIF
  1077. $!
  1078. $! End The Compiler Check.
  1079. $!
  1080. $ ENDIF
  1081. $!
  1082. $! Check To See If We Have A Option For P4.
  1083. $!
  1084. $ IF (P4.EQS."")
  1085. $ THEN
  1086. $!
  1087. $! Find out what socket library we have available
  1088. $!
  1089. $ IF F$PARSE("SOCKETSHR:") .NES. ""
  1090. $ THEN
  1091. $!
  1092. $! We have SOCKETSHR, and it is my opinion that it's the best to use.
  1093. $!
  1094. $ P4 = "SOCKETSHR"
  1095. $!
  1096. $! Tell the user
  1097. $!
  1098. $ WRITE SYS$OUTPUT "Using SOCKETSHR for TCP/IP"
  1099. $!
  1100. $! Else, let's look for something else
  1101. $!
  1102. $ ELSE
  1103. $!
  1104. $! Like UCX (the reason to do this before Multinet is that the UCX
  1105. $! emulation is easier to use...)
  1106. $!
  1107. $ IF F$TRNLNM("UCX$IPC_SHR") .NES. "" -
  1108. .OR. F$PARSE("SYS$SHARE:UCX$IPC_SHR.EXE") .NES. "" -
  1109. .OR. F$PARSE("SYS$LIBRARY:UCX$IPC.OLB") .NES. ""
  1110. $ THEN
  1111. $!
  1112. $! Last resort: a UCX or UCX-compatible library
  1113. $!
  1114. $ P4 = "UCX"
  1115. $!
  1116. $! Tell the user
  1117. $!
  1118. $ WRITE SYS$OUTPUT "Using UCX or an emulation thereof for TCP/IP"
  1119. $!
  1120. $! That was all...
  1121. $!
  1122. $ ENDIF
  1123. $ ENDIF
  1124. $ ENDIF
  1125. $!
  1126. $! Set Up Initial CC Definitions, Possibly With User Ones
  1127. $!
  1128. $ CCDEFS = "TCPIP_TYPE_''P4',DSO_VMS"
  1129. $ IF F$TYPE(USER_CCDEFS) .NES. "" THEN CCDEFS = CCDEFS + "," + USER_CCDEFS
  1130. $ CCEXTRAFLAGS = ""
  1131. $ IF F$TYPE(USER_CCFLAGS) .NES. "" THEN CCEXTRAFLAGS = USER_CCFLAGS
  1132. $ CCDISABLEWARNINGS = "" !!! "LONGLONGTYPE,LONGLONGSUFX,FOUNDCR"
  1133. $ IF F$TYPE(USER_CCDISABLEWARNINGS) .NES. "" THEN -
  1134. CCDISABLEWARNINGS = CCDISABLEWARNINGS + "," + USER_CCDISABLEWARNINGS
  1135. $!
  1136. $! Check To See If We Have A ZLIB Option.
  1137. $!
  1138. $ ZLIB = P8
  1139. $ IF (ZLIB .NES. "")
  1140. $ THEN
  1141. $!
  1142. $! Check for expected ZLIB files.
  1143. $!
  1144. $ err = 0
  1145. $ file1 = f$parse( "zlib.h", ZLIB, , , "SYNTAX_ONLY")
  1146. $ if (f$search( file1) .eqs. "")
  1147. $ then
  1148. $ WRITE SYS$OUTPUT ""
  1149. $ WRITE SYS$OUTPUT "The Option ", ZLIB, " Is Invalid."
  1150. $ WRITE SYS$OUTPUT " Can't find header: ''file1'"
  1151. $ err = 1
  1152. $ endif
  1153. $ file1 = f$parse( "A.;", ZLIB)- "A.;"
  1154. $!
  1155. $ file2 = f$parse( ZLIB, "libz.olb", , , "SYNTAX_ONLY")
  1156. $ if (f$search( file2) .eqs. "")
  1157. $ then
  1158. $ if (err .eq. 0)
  1159. $ then
  1160. $ WRITE SYS$OUTPUT ""
  1161. $ WRITE SYS$OUTPUT "The Option ", ZLIB, " Is Invalid."
  1162. $ endif
  1163. $ WRITE SYS$OUTPUT " Can't find library: ''file2'"
  1164. $ WRITE SYS$OUTPUT ""
  1165. $ err = err+ 2
  1166. $ endif
  1167. $ if (err .eq. 1)
  1168. $ then
  1169. $ WRITE SYS$OUTPUT ""
  1170. $ endif
  1171. $!
  1172. $ if (err .ne. 0)
  1173. $ then
  1174. $ EXIT
  1175. $ endif
  1176. $!
  1177. $ CCDEFS = """ZLIB=1"", "+ CCDEFS
  1178. $ CC_INCLUDES = CC_INCLUDES+ ", "+ file1
  1179. $ ZLIB_LIB = ", ''file2' /library"
  1180. $!
  1181. $! Print info
  1182. $!
  1183. $ WRITE SYS$OUTPUT "ZLIB library spec: ", file2
  1184. $!
  1185. $! End The ZLIB Check.
  1186. $!
  1187. $ ENDIF
  1188. $!
  1189. $! Check To See If The User Entered A Valid Parameter.
  1190. $!
  1191. $ IF (P3.EQS."VAXC").OR.(P3.EQS."DECC").OR.(P3.EQS."GNUC")
  1192. $ THEN
  1193. $!
  1194. $! Check To See If The User Wanted DECC.
  1195. $!
  1196. $ IF (P3.EQS."DECC")
  1197. $ THEN
  1198. $!
  1199. $! Looks Like DECC, Set To Use DECC.
  1200. $!
  1201. $ COMPILER = "DECC"
  1202. $!
  1203. $! Tell The User We Are Using DECC.
  1204. $!
  1205. $ WRITE SYS$OUTPUT "Using DECC 'C' Compiler."
  1206. $!
  1207. $! Use DECC...
  1208. $!
  1209. $ CC = "CC"
  1210. $ IF ARCH.EQS."VAX" .AND. F$TRNLNM("DECC$CC_DEFAULT").NES."/DECC" -
  1211. THEN CC = "CC/DECC"
  1212. $ CC = CC + " /''CC_OPTIMIZE' /''DEBUGGER' /STANDARD=RELAXED"+ -
  1213. "''POINTER_SIZE' /NOLIST /PREFIX=ALL" + -
  1214. " /INCLUDE=(''CC_INCLUDES')"+ -
  1215. CCEXTRAFLAGS
  1216. $!
  1217. $! Define The Linker Options File Name.
  1218. $!
  1219. $ OPT_FILE = "VAX_DECC_OPTIONS.OPT"
  1220. $!
  1221. $! End DECC Check.
  1222. $!
  1223. $ ENDIF
  1224. $!
  1225. $! Check To See If We Are To Use VAXC.
  1226. $!
  1227. $ IF (P3.EQS."VAXC")
  1228. $ THEN
  1229. $!
  1230. $! Looks Like VAXC, Set To Use VAXC.
  1231. $!
  1232. $ COMPILER = "VAXC"
  1233. $!
  1234. $! Tell The User We Are Using VAX C.
  1235. $!
  1236. $ WRITE SYS$OUTPUT "Using VAXC 'C' Compiler."
  1237. $!
  1238. $! Compile Using VAXC.
  1239. $!
  1240. $ CC = "CC"
  1241. $ IF ARCH.NES."VAX"
  1242. $ THEN
  1243. $ WRITE SYS$OUTPUT "There is no VAX C on ''ARCH'!"
  1244. $ EXIT
  1245. $ ENDIF
  1246. $ IF F$TRNLNM("DECC$CC_DEFAULT").EQS."/DECC" THEN CC = "CC/VAXC"
  1247. $ CC = CC + "/''CC_OPTIMIZE'/''DEBUGGER'/NOLIST" + -
  1248. "/INCLUDE=(''CC_INCLUDES')"+ -
  1249. CCEXTRAFLAGS
  1250. $ CCDEFS = """VAXC""," + CCDEFS
  1251. $!
  1252. $! Define <sys> As SYS$COMMON:[SYSLIB]
  1253. $!
  1254. $ DEFINE/NOLOG SYS SYS$COMMON:[SYSLIB]
  1255. $!
  1256. $! Define The Linker Options File Name.
  1257. $!
  1258. $ OPT_FILE = "VAX_VAXC_OPTIONS.OPT"
  1259. $!
  1260. $! End VAXC Check
  1261. $!
  1262. $ ENDIF
  1263. $!
  1264. $! Check To See If We Are To Use GNU C.
  1265. $!
  1266. $ IF (P3.EQS."GNUC")
  1267. $ THEN
  1268. $!
  1269. $! Looks Like GNUC, Set To Use GNUC.
  1270. $!
  1271. $ COMPILER = "GNUC"
  1272. $!
  1273. $! Tell The User We Are Using GNUC.
  1274. $!
  1275. $ WRITE SYS$OUTPUT "Using GNU 'C' Compiler."
  1276. $!
  1277. $! Use GNU C...
  1278. $!
  1279. $ CC = "GCC/NOCASE_HACK/''GCC_OPTIMIZE'/''DEBUGGER'/NOLIST" + -
  1280. "/INCLUDE=(''CC_INCLUDES')"+ -
  1281. CCEXTRAFLAGS
  1282. $!
  1283. $! Define The Linker Options File Name.
  1284. $!
  1285. $ OPT_FILE = "VAX_GNUC_OPTIONS.OPT"
  1286. $!
  1287. $! End The GNU C Check.
  1288. $!
  1289. $ ENDIF
  1290. $!
  1291. $! Set up default defines
  1292. $!
  1293. $ CCDEFS = """FLAT_INC=1""," + CCDEFS
  1294. $!
  1295. $! Finish up the definition of CC.
  1296. $!
  1297. $ IF COMPILER .EQS. "DECC"
  1298. $ THEN
  1299. $ IF CCDISABLEWARNINGS .EQS. ""
  1300. $ THEN
  1301. $ CC4DISABLEWARNINGS = "DOLLARID"
  1302. $ CC6DISABLEWARNINGS = "MIXLINKAGE"
  1303. $ ELSE
  1304. $ CC4DISABLEWARNINGS = CCDISABLEWARNINGS + ",DOLLARID"
  1305. $ CC6DISABLEWARNINGS = CCDISABLEWARNINGS + ",MIXLINKAGE"
  1306. $ CCDISABLEWARNINGS = " /WARNING=(DISABLE=(" + CCDISABLEWARNINGS + "))"
  1307. $ ENDIF
  1308. $ CC4DISABLEWARNINGS = " /WARNING=(DISABLE=(" + CC4DISABLEWARNINGS + "))"
  1309. $ CC6DISABLEWARNINGS = " /WARNING=(DISABLE=(" + CC6DISABLEWARNINGS + "))"
  1310. $ ELSE
  1311. $ CCDISABLEWARNINGS = ""
  1312. $ CC4DISABLEWARNINGS = ""
  1313. $ CC6DISABLEWARNINGS = ""
  1314. $ ENDIF
  1315. $ CC3 = CC + " /DEFINE=(" + CCDEFS + ISSEVEN + ")" + CCDISABLEWARNINGS
  1316. $ CC = CC + " /DEFINE=(" + CCDEFS + ")" + CCDISABLEWARNINGS
  1317. $ IF ARCH .EQS. "VAX" .AND. COMPILER .EQS. "DECC" .AND. P2 .NES. "DEBUG"
  1318. $ THEN
  1319. $ CC5 = CC + " /OPTIMIZE=NODISJOINT"
  1320. $ CC5_DIFFERENT = 1
  1321. $ ELSE
  1322. $ CC5 = CC
  1323. $ CC5_DIFFERENT = 0
  1324. $ ENDIF
  1325. $ CC4 = CC - CCDISABLEWARNINGS + CC4DISABLEWARNINGS
  1326. $ CC6 = CC - CCDISABLEWARNINGS + CC6DISABLEWARNINGS
  1327. $!
  1328. $! Show user the result
  1329. $!
  1330. $ WRITE/SYMBOL SYS$OUTPUT "Main C Compiling Command: ",CC
  1331. $!
  1332. $! Else The User Entered An Invalid Argument.
  1333. $!
  1334. $ ELSE
  1335. $!
  1336. $! Tell The User We Don't Know What They Want.
  1337. $!
  1338. $ WRITE SYS$OUTPUT ""
  1339. $ WRITE SYS$OUTPUT "The Option ",P3," Is Invalid. The Valid Options Are:"
  1340. $ WRITE SYS$OUTPUT ""
  1341. $ WRITE SYS$OUTPUT " VAXC : To Compile With VAX C."
  1342. $ WRITE SYS$OUTPUT " DECC : To Compile With DEC C."
  1343. $ WRITE SYS$OUTPUT " GNUC : To Compile With GNU C."
  1344. $ WRITE SYS$OUTPUT ""
  1345. $!
  1346. $! Time To EXIT.
  1347. $!
  1348. $ EXIT
  1349. $!
  1350. $! End The Valid Argument Check.
  1351. $!
  1352. $ ENDIF
  1353. $!
  1354. $! Build a MACRO command for the architecture at hand
  1355. $!
  1356. $ IF ARCH .EQS. "VAX" THEN MACRO = "MACRO/''DEBUGGER'"
  1357. $ IF ARCH .NES. "VAX" THEN MACRO = "MACRO/MIGRATION/''DEBUGGER'/''MACRO_OPTIMIZE'"
  1358. $!
  1359. $! Show user the result
  1360. $!
  1361. $ WRITE/SYMBOL SYS$OUTPUT "Main MACRO Compiling Command: ",MACRO
  1362. $!
  1363. $! Time to check the contents, and to make sure we get the correct library.
  1364. $!
  1365. $ IF P4.EQS."SOCKETSHR" .OR. P4.EQS."MULTINET" .OR. P4.EQS."UCX" -
  1366. .OR. P4.EQS."TCPIP" .OR. P4.EQS."NONE"
  1367. $ THEN
  1368. $!
  1369. $! Check to see if SOCKETSHR was chosen
  1370. $!
  1371. $ IF P4.EQS."SOCKETSHR"
  1372. $ THEN
  1373. $!
  1374. $! Set the library to use SOCKETSHR
  1375. $!
  1376. $ TCPIP_LIB = ",SYS$DISK:[-.VMS]SOCKETSHR_SHR.OPT /OPTIONS"
  1377. $!
  1378. $! Done with SOCKETSHR
  1379. $!
  1380. $ ENDIF
  1381. $!
  1382. $! Check to see if MULTINET was chosen
  1383. $!
  1384. $ IF P4.EQS."MULTINET"
  1385. $ THEN
  1386. $!
  1387. $! Set the library to use UCX emulation.
  1388. $!
  1389. $ P4 = "UCX"
  1390. $!
  1391. $! Done with MULTINET
  1392. $!
  1393. $ ENDIF
  1394. $!
  1395. $! Check to see if UCX was chosen
  1396. $!
  1397. $ IF P4.EQS."UCX"
  1398. $ THEN
  1399. $!
  1400. $! Set the library to use UCX.
  1401. $!
  1402. $ TCPIP_LIB = ",SYS$DISK:[-.VMS]UCX_SHR_DECC.OPT /OPTIONS"
  1403. $ IF F$TRNLNM("UCX$IPC_SHR") .NES. ""
  1404. $ THEN
  1405. $ TCPIP_LIB = ",SYS$DISK:[-.VMS]UCX_SHR_DECC_LOG.OPT /OPTIONS"
  1406. $ ELSE
  1407. $ IF COMPILER .NES. "DECC" .AND. ARCH .EQS. "VAX" THEN -
  1408. TCPIP_LIB = ",SYS$DISK:[-.VMS]UCX_SHR_VAXC.OPT /OPTIONS"
  1409. $ ENDIF
  1410. $!
  1411. $! Done with UCX
  1412. $!
  1413. $ ENDIF
  1414. $!
  1415. $! Check to see if TCPIP was chosen
  1416. $!
  1417. $ IF P4.EQS."TCPIP"
  1418. $ THEN
  1419. $!
  1420. $! Set the library to use TCPIP (post UCX).
  1421. $!
  1422. $ TCPIP_LIB = ",SYS$DISK:[-.VMS]TCPIP_SHR_DECC.OPT /OPTIONS"
  1423. $!
  1424. $! Done with TCPIP
  1425. $!
  1426. $ ENDIF
  1427. $!
  1428. $! Check to see if NONE was chosen
  1429. $!
  1430. $ IF P4.EQS."NONE"
  1431. $ THEN
  1432. $!
  1433. $! Do not use a TCPIP library.
  1434. $!
  1435. $ TCPIP_LIB = ""
  1436. $!
  1437. $! Done with TCPIP
  1438. $!
  1439. $ ENDIF
  1440. $!
  1441. $! Print info
  1442. $!
  1443. $ WRITE SYS$OUTPUT "TCP/IP library spec: ", TCPIP_LIB- ","
  1444. $!
  1445. $! Else The User Entered An Invalid Argument.
  1446. $!
  1447. $ ELSE
  1448. $!
  1449. $! Tell The User We Don't Know What They Want.
  1450. $!
  1451. $ WRITE SYS$OUTPUT ""
  1452. $ WRITE SYS$OUTPUT "The Option ",P4," Is Invalid. The Valid Options Are:"
  1453. $ WRITE SYS$OUTPUT ""
  1454. $ WRITE SYS$OUTPUT " SOCKETSHR : To link with SOCKETSHR TCP/IP library."
  1455. $ WRITE SYS$OUTPUT " UCX : To link with UCX TCP/IP library."
  1456. $ WRITE SYS$OUTPUT " TCPIP : To link with TCPIP (post UCX) TCP/IP library."
  1457. $ WRITE SYS$OUTPUT ""
  1458. $!
  1459. $! Time To EXIT.
  1460. $!
  1461. $ EXIT
  1462. $!
  1463. $! Done with TCP/IP libraries
  1464. $!
  1465. $ ENDIF
  1466. $!
  1467. $! Check if the user wanted to compile just a subset of all the encryption
  1468. $! methods.
  1469. $!
  1470. $ IF P6 .NES. ""
  1471. $ THEN
  1472. $ ENCRYPT_TYPES = P6
  1473. $ ENDIF
  1474. $!
  1475. $! Time To RETURN...
  1476. $!
  1477. $ RETURN
  1478. $!
  1479. $ INITIALISE:
  1480. $!
  1481. $! Save old value of the logical name OPENSSL
  1482. $!
  1483. $ __SAVE_OPENSSL = F$TRNLNM("OPENSSL","LNM$PROCESS_TABLE")
  1484. $!
  1485. $! Save directory information
  1486. $!
  1487. $ __HERE = F$PARSE(F$PARSE("A.;",F$ENVIRONMENT("PROCEDURE"))-"A.;","[]A.;") - "A.;"
  1488. $ __HERE = F$EDIT(__HERE,"UPCASE")
  1489. $ __TOP = __HERE - "CRYPTO]"
  1490. $ __INCLUDE = __TOP + "INCLUDE.OPENSSL]"
  1491. $!
  1492. $! Set up the logical name OPENSSL to point at the include directory
  1493. $!
  1494. $ DEFINE OPENSSL/NOLOG '__INCLUDE'
  1495. $!
  1496. $! Done
  1497. $!
  1498. $ RETURN
  1499. $!
  1500. $ CLEANUP:
  1501. $!
  1502. $! Restore the logical name OPENSSL if it had a value
  1503. $!
  1504. $ IF __SAVE_OPENSSL .EQS. ""
  1505. $ THEN
  1506. $ DEASSIGN OPENSSL
  1507. $ ELSE
  1508. $ DEFINE/NOLOG OPENSSL '__SAVE_OPENSSL'
  1509. $ ENDIF
  1510. $!
  1511. $! Done
  1512. $!
  1513. $ RETURN