3 $! Written By: Robert Byer
5 $! A-Com Computing, Inc.
6 $! byer@mail.all-net.net
8 $! Changes by Richard Levitte <richard@levitte.org>
9 $! Zoltan Arpadffy <arpadffy@polarhome.com>
11 $! This command files compiles and creates the "[.xxx.EXE.CRYPTO]LIBCRYPTO.OLB"
12 $! library for OpenSSL. The "xxx" denotes the machine architecture, ALPHA,
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.
18 $! Specify the following as P1 to build just that part or ALL to just
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
25 $! Specify DEBUG or NODEBUG as P2 to compile with or without debugger
28 $! Specify which compiler at P3 to try to compile under.
34 $! If you don't specify a compiler, it will try to determine which
35 $! "C" compiler to use.
37 $! P4, if defined, sets a TCP/IP library to use, through one of the following
41 $! TCPIP For TCPIP (post UCX)
42 $! SOCKETSHR For SOCKETSHR+NETLIB
44 $! P5, if defined, sets a compiler thread NOT needed on OpenVMS 7.1 (and up)
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.
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:
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).
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).
68 $ proc = f$environment( "procedure")
69 $ write sys$output "@@@ "+ -
70 f$parse( proc, , , "name")+ f$parse( proc, , , "type")
72 $! Define A TCP/IP Library That We Will Need To Link To.
73 $! (That Is, If We Need To Link To One.)
78 $! Check Which Architecture We Are Using.
80 $ IF (F$GETSYI("CPU").LT.128)
83 $! The Architecture Is VAX
91 $! The Architecture Is Alpha, IA64 or whatever comes in the future.
93 $ ARCH = F$EDIT( F$GETSYI( "ARCH_NAME"), "UPCASE")
94 $ IF (ARCH .EQS. "") THEN ARCH = "UNK"
96 $! End The Architecture Check.
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.
110 $ ET_WHIRLPOOL = "WHRLPOOL"
111 $ IF ARCH .EQS. "VAX" THEN ET_WHIRLPOOL = ""
112 $ ENCRYPT_TYPES = "Basic,"+ -
114 "MD4,MD5,SHA,MDC2,HMAC,RIPEMD,"+ET_WHIRLPOOL+","+ -
115 "DES,AES,RC2,RC4,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"
122 $! Check To Make Sure We Have Valid Command Line Parameters.
124 $ GOSUB CHECK_OPTIONS
126 $! Define The OBJ and EXE Directories.
128 $ OBJ_DIR := SYS$DISK:[-.'ARCHD'.OBJ.CRYPTO]
129 $ EXE_DIR := SYS$DISK:[-.'ARCHD'.EXE.CRYPTO]
131 $! Specify the destination directory in any /MAP option.
133 $ if (LINKMAP .eqs. "MAP")
135 $ LINKMAP = LINKMAP+ "=''EXE_DIR'"
138 $! Add the location prefix to the linker options file name.
140 $ if (OPT_FILE .nes. "")
142 $ OPT_FILE = EXE_DIR+ OPT_FILE
145 $! Initialise logical names and such
149 $! Tell The User What Kind of Machine We Run On.
151 $ WRITE SYS$OUTPUT "Host system architecture: ''ARCHD'"
154 $! Check To See If The Architecture Specific OBJ Directory Exists.
156 $ IF (F$PARSE(OBJ_DIR).EQS."")
159 $! It Dosen't Exist, So Create It.
161 $ CREATE/DIR 'OBJ_DIR'
163 $! End The Architecture Specific OBJ Directory Check.
167 $! Check To See If The Architecture Specific Directory Exists.
169 $ IF (F$PARSE(EXE_DIR).EQS."")
172 $! It Dosen't Exist, So Create It.
174 $ CREATE/DIRECTORY 'EXE_DIR'
176 $! End The Architecture Specific Directory Check.
180 $! Define The Library Name.
182 $ LIB_NAME := 'EXE_DIR'SSL_LIBCRYPTO'LIB32'.OLB
184 $! Define The CRYPTO-LIB We Are To Use.
186 $ CRYPTO_LIB := 'EXE_DIR'SSL_LIBCRYPTO'LIB32'.OLB
188 $! Check To See If We Already Have A "[.xxx.EXE.CRYPTO]LIBCRYPTO.OLB" Library...
190 $ IF (F$SEARCH(LIB_NAME).EQS."")
193 $! Guess Not, Create The Library.
195 $ LIBRARY/CREATE/OBJECT 'LIB_NAME'
197 $! End The Library Check.
201 $! Build our options file for the application
203 $ GOSUB CHECK_OPT_FILE
205 $! Define The Different Encryption "library" Strings.
207 $!!! Test apps disabled, as they aren't supported at all,
208 $!!! not even in the unix build
209 $!!! APPS_DES = "DES/DES,CBC3_ENC"
210 $!!! APPS_PKCS7 = "ENC/ENC;DEC/DEC;SIGN/SIGN;VERIFY/VERIFY,EXAMPLE"
212 $! These variables are ordered as the SDIRS variable from the top Makefile.org
213 $! The contents of these variables are copied from the LIBOBJ variable in the
214 $! corresponding Makefile from each corresponding subdirectory, with .o stripped
215 $! and spaces replaced with commas.
216 $ LIB_ = "cryptlib,mem,mem_dbg,cversion,ex_data,cpt_err,ebcdic,"+ -
217 "uid,o_time,o_str,o_dir,o_fips.c,o_init,fips_ers,mem_clr"
218 $ LIB_OBJECTS = "o_names,obj_dat,obj_lib,obj_err,obj_xref"
219 $ LIB_MD2 = "md2_dgst,md2_one"
220 $ LIB_MD4 = "md4_dgst,md4_one"
221 $ LIB_MD5 = "md5_dgst,md5_one"
222 $ LIB_SHA = "sha_dgst,sha1dgst,sha_one,sha1_one,sha256,sha512"
223 $ LIB_MDC2 = "mdc2dgst,mdc2_one"
224 $ LIB_HMAC = "hmac,hm_ameth,hm_pmeth"
225 $ LIB_RIPEMD = "rmd_dgst,rmd_one"
226 $ LIB_WHRLPOOL = "wp_dgst,wp_block"
227 $ LIB_DES = "set_key,ecb_enc,cbc_enc,"+ -
228 "ecb3_enc,cfb64enc,cfb64ede,cfb_enc,ofb64ede,"+ -
229 "enc_read,enc_writ,ofb64enc,"+ -
230 "ofb_enc,str2key,pcbc_enc,qud_cksm,rand_key,"+ -
231 "des_enc,fcrypt_b,"+ -
232 "fcrypt,xcbc_enc,rpc_enc,cbc_cksm,"+ -
233 "ede_cbcm_enc,des_old,des_old2,read2pwd"
234 $ LIB_RC2 = "rc2_ecb,rc2_skey,rc2_cbc,rc2cfb64,rc2ofb64"
235 $ LIB_RC4 = "rc4_enc,rc4_skey,rc4_utl"
236 $ LIB_RC5 = "rc5_skey,rc5_ecb,rc5_enc,rc5cfb64,rc5ofb64"
237 $ LIB_IDEA = "i_cbc,i_cfb64,i_ofb64,i_ecb,i_skey"
238 $ LIB_BF = "bf_skey,bf_ecb,bf_enc,bf_cfb64,bf_ofb64"
239 $ LIB_CAST = "c_skey,c_ecb,c_enc,c_cfb64,c_ofb64"
240 $ LIB_CAMELLIA = "cmll_ecb,cmll_ofb,cmll_cfb,cmll_ctr,cmll_utl,"+ -
241 "camellia,cmll_misc,cmll_cbc"
242 $ LIB_SEED = "seed,seed_ecb,seed_cbc,seed_cfb,seed_ofb"
243 $ LIB_MODES = "cbc128,ctr128,cts128,cfb128,ofb128,gcm128,"+ -
245 $ LIB_BN_ASM = "[.asm]vms.mar,vms-helper"
246 $ IF F$TRNLNM("OPENSSL_NO_ASM") .OR. ARCH .NES. "VAX" THEN -
247 LIB_BN_ASM = "bn_asm"
248 $ LIB_BN = "bn_add,bn_div,bn_exp,bn_lib,bn_ctx,bn_mul,bn_mod,"+ -
249 "bn_print,bn_rand,bn_shift,bn_word,bn_blind,"+ -
250 "bn_kron,bn_sqrt,bn_gcd,bn_prime,bn_err,bn_sqr,"+LIB_BN_ASM+","+ -
251 "bn_recp,bn_mont,bn_mpi,bn_exp2,bn_gf2m,bn_nist,"+ -
252 "bn_depr,bn_const,bn_x931p"
253 $ LIB_EC = "ec_lib,ecp_smpl,ecp_mont,ecp_nist,ec_cvt,ec_mult,"+ -
254 "ec_err,ec_curve,ec_check,ec_print,ec_asn1,ec_key,"+ -
255 "ec2_smpl,ec2_mult,ec_ameth,ec_pmeth,eck_prn,"+ -
256 "ecp_nistp224,ecp_nistp256,ecp_nistp521,ecp_nistputil,"+ -
257 "ecp_oct,ec2_oct,ec_oct"
258 $ LIB_RSA = "rsa_eay,rsa_gen,rsa_lib,rsa_sign,rsa_saos,rsa_err,"+ -
259 "rsa_pk1,rsa_ssl,rsa_none,rsa_oaep,rsa_chk,rsa_null,"+ -
260 "rsa_pss,rsa_x931,rsa_asn1,rsa_depr,rsa_ameth,rsa_prn,"+ -
262 $ LIB_DSA = "dsa_gen,dsa_key,dsa_lib,dsa_asn1,dsa_vrf,dsa_sign,"+ -
263 "dsa_err,dsa_ossl,dsa_depr,dsa_ameth,dsa_pmeth,dsa_prn"
264 $ LIB_ECDSA = "ecs_lib,ecs_asn1,ecs_ossl,ecs_sign,ecs_vrf,ecs_err"
265 $ LIB_DH = "dh_asn1,dh_gen,dh_key,dh_lib,dh_check,dh_err,dh_depr,"+ -
266 "dh_ameth,dh_pmeth,dh_prn"
267 $ LIB_ECDH = "ech_lib,ech_ossl,ech_key,ech_err"
268 $ LIB_DSO = "dso_dl,dso_dlfcn,dso_err,dso_lib,dso_null,"+ -
269 "dso_openssl,dso_win32,dso_vms,dso_beos"
270 $ LIB_ENGINE = "eng_err,eng_lib,eng_list,eng_init,eng_ctrl,"+ -
271 "eng_table,eng_pkey,eng_fat,eng_all,"+ -
272 "tb_rsa,tb_dsa,tb_ecdsa,tb_dh,tb_ecdh,tb_rand,tb_store,"+ -
273 "tb_cipher,tb_digest,tb_pkmeth,tb_asnmth,"+ -
274 "eng_openssl,eng_cnf,eng_dyn,eng_cryptodev,"+ -
275 "eng_rsax,eng_rdrand"
276 $ LIB_AES = "aes_misc,aes_ecb,aes_cfb,aes_ofb,aes_ctr,aes_ige,aes_wrap,"+ -
278 $ LIB_BUFFER = "buffer,buf_str,buf_err"
279 $ LIB_BIO = "bio_lib,bio_cb,bio_err,"+ -
280 "bss_mem,bss_null,bss_fd,"+ -
281 "bss_file,bss_sock,bss_conn,"+ -
282 "bf_null,bf_buff,b_print,b_dump,"+ -
283 "b_sock,bss_acpt,bf_nbio,bss_log,bss_bio,"+ -
285 "bf_lbuf,bss_rtcp" ! The last two are VMS specific
286 $ LIB_STACK = "stack"
287 $ LIB_LHASH = "lhash,lh_stats"
288 $ LIB_RAND = "md_rand,randfile,rand_lib,rand_err,rand_egd,"+ -
289 "rand_vms" ! The last one is VMS specific
290 $ LIB_ERR = "err,err_all,err_prn"
291 $ LIB_EVP = "encode,digest,evp_enc,evp_key,evp_acnf,evp_cnf,"+ -
292 "e_des,e_bf,e_idea,e_des3,e_camellia,"+ -
293 "e_rc4,e_aes,names,e_seed,"+ -
294 "e_xcbc_d,e_rc2,e_cast,e_rc5"
295 $ LIB_EVP_2 = "m_null,m_md2,m_md4,m_md5,m_sha,m_sha1,m_wp," + -
296 "m_dss,m_dss1,m_mdc2,m_ripemd,m_ecdsa,"+ -
297 "p_open,p_seal,p_sign,p_verify,p_lib,p_enc,p_dec,"+ -
298 "bio_md,bio_b64,bio_enc,evp_err,e_null,"+ -
299 "c_all,c_allc,c_alld,evp_lib,bio_ok,"+-
300 "evp_pkey,evp_pbe,p5_crpt,p5_crpt2"
301 $ LIB_EVP_3 = "e_old,pmeth_lib,pmeth_fn,pmeth_gn,m_sigver,evp_fips,"+ -
302 "e_aes_cbc_hmac_sha1,e_rc4_hmac_md5"
303 $ LIB_ASN1 = "a_object,a_bitstr,a_utctm,a_gentm,a_time,a_int,a_octet,"+ -
304 "a_print,a_type,a_set,a_dup,a_d2i_fp,a_i2d_fp,"+ -
305 "a_enum,a_utf8,a_sign,a_digest,a_verify,a_mbstr,a_strex,"+ -
306 "x_algor,x_val,x_pubkey,x_sig,x_req,x_attrib,x_bignum,"+ -
307 "x_long,x_name,x_x509,x_x509a,x_crl,x_info,x_spki,nsseq,"+ -
308 "x_nx509,d2i_pu,d2i_pr,i2d_pu,i2d_pr"
309 $ LIB_ASN1_2 = "t_req,t_x509,t_x509a,t_crl,t_pkey,t_spki,t_bitst,"+ -
310 "tasn_new,tasn_fre,tasn_enc,tasn_dec,tasn_utl,tasn_typ,"+ -
311 "tasn_prn,ameth_lib,"+ -
312 "f_int,f_string,n_pkey,"+ -
313 "f_enum,x_pkey,a_bool,x_exten,bio_asn1,bio_ndef,asn_mime,"+ -
314 "asn1_gen,asn1_par,asn1_lib,asn1_err,a_bytes,a_strnid,"+ -
315 "evp_asn1,asn_pack,p5_pbe,p5_pbev2,p8_pkey,asn_moid"
316 $ LIB_PEM = "pem_sign,pem_seal,pem_info,pem_lib,pem_all,pem_err,"+ -
317 "pem_x509,pem_xaux,pem_oth,pem_pk8,pem_pkey,pvkfmt"
318 $ LIB_X509 = "x509_def,x509_d2,x509_r2x,x509_cmp,"+ -
319 "x509_obj,x509_req,x509spki,x509_vfy,"+ -
320 "x509_set,x509cset,x509rset,x509_err,"+ -
321 "x509name,x509_v3,x509_ext,x509_att,"+ -
322 "x509type,x509_lu,x_all,x509_txt,"+ -
323 "x509_trs,by_file,by_dir,x509_vpm"
324 $ LIB_X509V3 = "v3_bcons,v3_bitst,v3_conf,v3_extku,v3_ia5,v3_lib,"+ -
325 "v3_prn,v3_utl,v3err,v3_genn,v3_alt,v3_skey,v3_akey,v3_pku,"+ -
326 "v3_int,v3_enum,v3_sxnet,v3_cpols,v3_crld,v3_purp,v3_info,"+ -
327 "v3_ocsp,v3_akeya,v3_pmaps,v3_pcons,v3_ncons,v3_pcia,v3_pci,"+ -
328 "pcy_cache,pcy_node,pcy_data,pcy_map,pcy_tree,pcy_lib,"+ -
330 $ LIB_CONF = "conf_err,conf_lib,conf_api,conf_def,conf_mod,conf_mall,conf_sap"
331 $ LIB_TXT_DB = "txt_db"
332 $ LIB_PKCS7 = "pk7_asn1,pk7_lib,pkcs7err,pk7_doit,pk7_smime,pk7_attr,"+ -
334 $ LIB_PKCS12 = "p12_add,p12_asn,p12_attr,p12_crpt,p12_crt,p12_decr,"+ -
335 "p12_init,p12_key,p12_kiss,p12_mutl,"+ -
336 "p12_utl,p12_npas,pk12err,p12_p8d,p12_p8e"
337 $ LIB_COMP = "comp_lib,comp_err,"+ -
339 $ LIB_OCSP = "ocsp_asn,ocsp_ext,ocsp_ht,ocsp_lib,ocsp_cl,"+ -
340 "ocsp_srv,ocsp_prn,ocsp_vfy,ocsp_err"
341 $ LIB_UI_COMPAT = ",ui_compat"
342 $ LIB_UI = "ui_err,ui_lib,ui_openssl,ui_util"+LIB_UI_COMPAT
343 $ LIB_KRB5 = "krb5_asn"
344 $ LIB_CMS = "cms_lib,cms_asn1,cms_att,cms_io,cms_smime,cms_err,"+ -
345 "cms_sd,cms_dd,cms_cd,cms_env,cms_enc,cms_ess,"+ -
347 $ LIB_PQUEUE = "pqueue"
348 $ LIB_TS = "ts_err,ts_req_utils,ts_req_print,ts_rsp_utils,ts_rsp_print,"+ -
349 "ts_rsp_sign,ts_rsp_verify,ts_verify_ctx,ts_lib,ts_conf,"+ -
351 $ LIB_JPAKE = "jpake,jpake_err"
352 $ LIB_SRP = "srp_lib,srp_vfy"
353 $ LIB_STORE = "str_err,str_lib,str_meth,str_mem"
354 $ LIB_CMAC = "cmac,cm_ameth,cm_pmeth"
356 $! Setup exceptional compilations
363 $! The following lists must have leading and trailing commas, and no
364 $! embedded spaces. (They are scanned for ",name,".)
366 $ ! Add definitions for no threads on OpenVMS 7.1 and higher.
367 $ COMPILEWITH_CC3 = ",bss_rtcp,"
368 $ ! Disable the DOLLARID warning. Not needed with /STANDARD=RELAXED.
369 $ COMPILEWITH_CC4 = "" !!! ",a_utctm,bss_log,o_time,o_dir,"
370 $ ! Disable disjoint optimization on VAX with DECC.
371 $ COMPILEWITH_CC5 = ",md2_dgst,md4_dgst,md5_dgst,mdc2dgst," + -
372 "seed,sha_dgst,sha1dgst,rmd_dgst,bf_enc,"
373 $ ! Disable the MIXLINKAGE warning.
374 $ COMPILEWITH_CC6 = "" !!! ",enc_read,set_key,"
376 $! Figure Out What Other Modules We Are To Build.
380 $! Define A Module Counter.
388 $! Extract The Module Name From The Encryption List.
390 $ MODULE_NAME = F$EDIT(F$ELEMENT(MODULE_COUNTER,",",ENCRYPT_TYPES),"COLLAPSE")
391 $ IF MODULE_NAME.EQS."Basic" THEN MODULE_NAME = ""
392 $ MODULE_NAME1 = MODULE_NAME
394 $! Check To See If We Are At The End Of The Module List.
396 $ IF (MODULE_NAME.EQS.",")
399 $! We Are At The End Of The Module List, Go To MODULE_DONE.
403 $! End The Module List Check.
407 $! Increment The Moudle Counter.
409 $ MODULE_COUNTER = MODULE_COUNTER + 1
411 $! Create The Library and Apps Module Names.
413 $ LIB_MODULE = "LIB_" + MODULE_NAME
414 $ APPS_MODULE = "APPS_" + MODULE_NAME
415 $ IF (F$EXTRACT(0,5,MODULE_NAME).EQS."ASN1_")
417 $ MODULE_NAME = "ASN1"
419 $ IF (F$EXTRACT(0,4,MODULE_NAME).EQS."EVP_")
421 $ MODULE_NAME = "EVP"
424 $! Set state (can be LIB and APPS)
427 $ IF BUILDALL .EQS. "APPS" THEN STATE = "APPS"
429 $! Check if the library module name actually is defined
431 $ IF F$TYPE('LIB_MODULE') .EQS. ""
434 $ WRITE SYS$ERROR "The module ",MODULE_NAME1," does not exist. Continuing..."
439 $! Top Of The Module Loop.
443 $! Tell The User What Module We Are Building.
445 $ IF (MODULE_NAME1.NES."")
447 $ IF STATE .EQS. "LIB"
449 $ WRITE SYS$OUTPUT "Compiling The ",MODULE_NAME1," Library Files. (",BUILDALL,",",STATE,")"
450 $ ELSE IF F$TYPE('APPS_MODULE') .NES. ""
452 $ WRITE SYS$OUTPUT "Compiling The ",MODULE_NAME1," Applications. (",BUILDALL,",",STATE,")"
457 $! Define A File Counter And Set It To "0".
461 $ APPLICATION_COUNTER = 0
463 $! Top Of The File Loop.
467 $! Look in the LIB_MODULE is we're in state LIB
469 $ IF STATE .EQS. "LIB"
472 $! O.K, Extract The File Name From The File List.
474 $ FILE_NAME = F$EDIT(F$ELEMENT(FILE_COUNTER,",",'LIB_MODULE'),"COLLAPSE")
481 $ IF F$TYPE('APPS_MODULE') .NES. ""
484 $! Extract The File Name From The File List.
485 $! This part is a bit more complicated.
487 $ IF APPLICATION .EQS. ""
489 $ APPLICATION = F$ELEMENT(APPLICATION_COUNTER,";",'APPS_MODULE')
490 $ APPLICATION_COUNTER = APPLICATION_COUNTER + 1
491 $ APPLICATION_OBJECTS = F$ELEMENT(1,"/",APPLICATION)
492 $ APPLICATION = F$ELEMENT(0,"/",APPLICATION)
496 $! WRITE SYS$OUTPUT "DEBUG: SHOW SYMBOL APPLICATION*"
497 $! SHOW SYMBOL APPLICATION*
499 $ IF APPLICATION .NES. ";"
501 $ FILE_NAME = F$EDIT(F$ELEMENT(FILE_COUNTER,",",APPLICATION_OBJECTS),"COLLAPSE")
502 $ IF FILE_NAME .EQS. ","
511 $! Check To See If We Are At The End Of The File List.
513 $ IF (FILE_NAME.EQS.",")
516 $! We Are At The End Of The File List, Change State Or Goto FILE_DONE.
518 $ IF STATE .EQS. "LIB" .AND. BUILDALL .NES. "LIBRARY"
526 $! End The File List Check.
530 $! Increment The Counter.
532 $ FILE_COUNTER = FILE_COUNTER + 1
534 $! Create The Source File Name.
536 $ TMP_FILE_NAME = F$ELEMENT(1,"]",FILE_NAME)
537 $ IF TMP_FILE_NAME .EQS. "]" THEN TMP_FILE_NAME = FILE_NAME
538 $ IF F$ELEMENT(0,".",TMP_FILE_NAME) .EQS. TMP_FILE_NAME THEN -
539 FILE_NAME = FILE_NAME + ".c"
540 $ IF (MODULE_NAME.NES."")
542 $ SOURCE_FILE = "SYS$DISK:[." + MODULE_NAME+ "]" + FILE_NAME
544 $ SOURCE_FILE = "SYS$DISK:[]" + FILE_NAME
546 $ SOURCE_FILE = SOURCE_FILE - "]["
548 $! Create The Object File Name.
550 $ OBJECT_FILE = OBJ_DIR + F$PARSE(FILE_NAME,,,"NAME","SYNTAX_ONLY") + ".OBJ"
551 $ ON WARNING THEN GOTO NEXT_FILE
553 $! Check To See If The File We Want To Compile Is Actually There.
555 $ IF (F$SEARCH(SOURCE_FILE).EQS."")
558 $! Tell The User That The File Doesn't Exist.
560 $ WRITE SYS$OUTPUT ""
561 $ WRITE SYS$OUTPUT "The File ",SOURCE_FILE," Doesn't Exist."
562 $ WRITE SYS$OUTPUT ""
568 $! End The File Exist Check.
572 $! Tell The User We Are Compiling The File.
574 $ IF (MODULE_NAME.EQS."")
576 $ WRITE SYS$OUTPUT "Compiling The ",FILE_NAME," File. (",BUILDALL,",",STATE,")"
578 $ IF (MODULE_NAME.NES."")
580 $ WRITE SYS$OUTPUT " ",FILE_NAME,""
585 $ ON ERROR THEN GOTO NEXT_FILE
586 $ FILE_NAME0 = ","+ F$ELEMENT(0,".",FILE_NAME)+ ","
587 $ IF FILE_NAME - ".mar" .NES. FILE_NAME
589 $ MACRO/OBJECT='OBJECT_FILE' 'SOURCE_FILE'
591 $ IF COMPILEWITH_CC3 - FILE_NAME0 .NES. COMPILEWITH_CC3
593 $ write sys$output " \Using special rule (3)"
594 $ if (.not. CC3_SHOWN)
598 $ write /symbol sys$output x
600 $ CC3/OBJECT='OBJECT_FILE' 'SOURCE_FILE'
602 $ IF COMPILEWITH_CC4 - FILE_NAME0 .NES. COMPILEWITH_CC4
604 $ write /symbol sys$output " \Using special rule (4)"
605 $ if (.not. CC4_SHOWN)
609 $ write /symbol sys$output x
611 $ CC4/OBJECT='OBJECT_FILE' 'SOURCE_FILE'
613 $ IF CC5_DIFFERENT .AND. -
614 (COMPILEWITH_CC5 - FILE_NAME0 .NES. COMPILEWITH_CC5)
616 $ write sys$output " \Using special rule (5)"
617 $ if (.not. CC5_SHOWN)
621 $ write /symbol sys$output x
623 $ CC5/OBJECT='OBJECT_FILE' 'SOURCE_FILE'
625 $ IF COMPILEWITH_CC6 - FILE_NAME0 .NES. COMPILEWITH_CC6
627 $ write sys$output " \Using special rule (6)"
628 $ if (.not. CC6_SHOWN)
632 $ write /symbol sys$output x
634 $ CC6/OBJECT='OBJECT_FILE' 'SOURCE_FILE'
636 $ CC/OBJECT='OBJECT_FILE' 'SOURCE_FILE'
642 $ IF STATE .EQS. "LIB"
645 $! Add It To The Library.
647 $ LIBRARY/REPLACE 'LIB_NAME' 'OBJECT_FILE'
649 $! Time To Clean Up The Object File.
651 $ DELETE 'OBJECT_FILE';*
654 $! Go Back And Do It Again.
658 $! All Done With This Library Part.
662 $! Time To Build Some Applications
664 $ IF F$TYPE('APPS_MODULE') .NES. "" .AND. BUILDALL .NES. "LIBRARY"
666 $ APPLICATION_COUNTER = 0
668 $ APPLICATION = F$ELEMENT(APPLICATION_COUNTER,";",'APPS_MODULE')
669 $ IF APPLICATION .EQS. ";" THEN GOTO APPLICATION_DONE
671 $ APPLICATION_COUNTER = APPLICATION_COUNTER + 1
672 $ APPLICATION_OBJECTS = F$ELEMENT(1,"/",APPLICATION)
673 $ APPLICATION = F$ELEMENT(0,"/",APPLICATION)
675 $! WRITE SYS$OUTPUT "DEBUG: SHOW SYMBOL APPLICATION*"
676 $! SHOW SYMBOL APPLICATION*
678 $! Tell the user what happens
680 $ WRITE SYS$OUTPUT " ",APPLICATION,".exe"
684 $ ON ERROR THEN GOTO NEXT_APPLICATION
686 $! Link With A TCP/IP Library.
688 $ LINK /'DEBUGGER' /'LINKMAP' /'TRACEBACK' -
689 /EXE='EXE_DIR''APPLICATION'.EXE -
690 'OBJ_DIR''APPLICATION_OBJECTS', -
691 'CRYPTO_LIB'/LIBRARY -
696 $ GOTO NEXT_APPLICATION
700 $! Go Back And Get The Next Module.
704 $! All Done With This Module.
708 $! Tell The User That We Are All Done.
710 $ WRITE SYS$OUTPUT "All Done..."
715 $! Check For The Link Option FIle.
719 $! Check To See If We Need To Make A VAX C Option File.
721 $ IF (COMPILER.EQS."VAXC")
724 $! Check To See If We Already Have A VAX C Linker Option File.
726 $ IF (F$SEARCH(OPT_FILE).EQS."")
729 $! We Need A VAX C Linker Option File.
734 ! Default System Options File To Link Against
735 ! The Sharable VAX C Runtime Library.
737 SYS$SHARE:VAXCRTL.EXE/SHARE
740 $! End The Option File Check.
744 $! End The VAXC Check.
748 $! Check To See If We Need A GNU C Option File.
750 $ IF (COMPILER.EQS."GNUC")
753 $! Check To See If We Already Have A GNU C Linker Option File.
755 $ IF (F$SEARCH(OPT_FILE).EQS."")
758 $! We Need A GNU C Linker Option File.
763 ! Default System Options File To Link Against
764 ! The Sharable C Runtime Library.
766 GNU_CC:[000000]GCCLIB/LIBRARY
767 SYS$SHARE:VAXCRTL/SHARE
770 $! End The Option File Check.
774 $! End The GNU C Check.
778 $! Check To See If We Need A DEC C Option File.
780 $ IF (COMPILER.EQS."DECC")
783 $! Check To See If We Already Have A DEC C Linker Option File.
785 $ IF (F$SEARCH(OPT_FILE).EQS."")
788 $! Figure Out If We Need A non-VAX Or A VAX Linker Option File.
790 $ IF ARCH .EQS. "VAX"
793 $! We Need A DEC C Linker Option File For VAX.
798 ! Default System Options File To Link Against
799 ! The Sharable DEC C Runtime Library.
801 SYS$SHARE:DECC$SHR.EXE/SHARE
808 $! Create The non-VAX Linker Option File.
813 ! Default System Options File For non-VAX To Link Against
814 ! The Sharable C Runtime Library.
816 SYS$SHARE:CMA$OPEN_LIB_SHR/SHARE
817 SYS$SHARE:CMA$OPEN_RTL/SHARE
820 $! End The DEC C Option File Check.
824 $! End The Option File Search.
828 $! End The DEC C Check.
832 $! Tell The User What Linker Option File We Are Using.
834 $ WRITE SYS$OUTPUT "Using Linker Option File ",OPT_FILE,"."
840 $! Check The User's Options.
844 $! Check To See If P1 Is Blank.
849 $! P1 Is Blank, So Build Everything.
857 $! Else, Check To See If P1 Has A Valid Argument.
859 $ IF (P1.EQS."LIBRARY").OR.(P1.EQS."APPS")
870 $! Tell The User We Don't Know What They Want.
872 $ WRITE SYS$OUTPUT ""
873 $ WRITE SYS$OUTPUT "The Option ",P1," Is Invalid. The Valid Options Are:"
874 $ WRITE SYS$OUTPUT ""
875 $ WRITE SYS$OUTPUT " ALL : Just Build Everything."
876 $ WRITE SYS$OUTPUT " LIBRARY : To Compile Just The [.xxx.EXE.CRYPTO]LIBCRYPTO.OLB Library."
877 $ WRITE SYS$OUTPUT " APPS : To Compile Just The [.xxx.EXE.CRYPTO]*.EXE Programs."
878 $ WRITE SYS$OUTPUT ""
879 $ WRITE SYS$OUTPUT " Where 'xxx' Stands For:"
880 $ WRITE SYS$OUTPUT ""
881 $ WRITE SYS$OUTPUT " ALPHA[64]: Alpha Architecture."
882 $ WRITE SYS$OUTPUT " IA64[64] : IA64 Architecture."
883 $ WRITE SYS$OUTPUT " VAX : VAX Architecture."
884 $ WRITE SYS$OUTPUT ""
890 $! End The Valid Argument Check.
898 $! Check To See If P2 Is Blank.
900 $ IF (P2.EQS."NODEBUG")
903 $! P2 Is NODEBUG, So Compile Without The Debugger Information.
905 $ DEBUGGER = "NODEBUG"
907 $ TRACEBACK = "NOTRACEBACK"
908 $ GCC_OPTIMIZE = "OPTIMIZE"
909 $ CC_OPTIMIZE = "OPTIMIZE"
910 $ MACRO_OPTIMIZE = "OPTIMIZE"
911 $ WRITE SYS$OUTPUT "No Debugger Information Will Be Produced During Compile."
912 $ WRITE SYS$OUTPUT "Compiling With Compiler Optimization."
915 $! Check To See If We Are To Compile With Debugger Information.
917 $ IF (P2.EQS."DEBUG")
920 $! Compile With Debugger Information.
924 $ TRACEBACK = "TRACEBACK"
925 $ GCC_OPTIMIZE = "NOOPTIMIZE"
926 $ CC_OPTIMIZE = "NOOPTIMIZE"
927 $ MACRO_OPTIMIZE = "NOOPTIMIZE"
928 $ WRITE SYS$OUTPUT "Debugger Information Will Be Produced During Compile."
929 $ WRITE SYS$OUTPUT "Compiling Without Compiler Optimization."
932 $! They Entered An Invalid Option.
934 $ WRITE SYS$OUTPUT ""
935 $ WRITE SYS$OUTPUT "The Option ",P2," Is Invalid. The Valid Options Are:"
936 $ WRITE SYS$OUTPUT ""
937 $ WRITE SYS$OUTPUT " DEBUG : Compile With The Debugger Information."
938 $ WRITE SYS$OUTPUT " NODEBUG : Compile Without The Debugger Information."
939 $ WRITE SYS$OUTPUT ""
945 $! End The Valid Argument Check.
953 $! Special Threads For OpenVMS v7.1 Or Later
955 $! Written By: Richard Levitte
956 $! richard@levitte.org
959 $! Check To See If We Have A Option For P5.
964 $! Get The Version Of VMS We Are Using.
967 $ TMP = F$ELEMENT(0,"-",F$EXTRACT(1,4,F$GETSYI("VERSION")))
968 $ TMP = F$INTEGER(F$ELEMENT(0,".",TMP)+F$ELEMENT(1,".",TMP))
970 $! Check To See If The VMS Version Is v7.1 Or Later.
975 $! We Have OpenVMS v7.1 Or Later, So Use The Special Threads.
977 $ ISSEVEN := ,PTHREAD_USE_D4
979 $! End The VMS Version Check.
987 $! Check P7 (POINTER_SIZE).
989 $ IF (P7 .NES. "") .AND. (ARCH .NES. "VAX")
994 $ POINTER_SIZE = " /POINTER_SIZE=32"
996 $ POINTER_SIZE = F$EDIT( P7, "COLLAPSE, UPCASE")
997 $ IF ((POINTER_SIZE .EQS. "64") .OR. -
998 (POINTER_SIZE .EQS. "64=") .OR. -
999 (POINTER_SIZE .EQS. "64=ARGV"))
1001 $ ARCHD = ARCH+ "_64"
1003 $ POINTER_SIZE = " /POINTER_SIZE=64"
1006 $! Tell The User Entered An Invalid Option.
1008 $ WRITE SYS$OUTPUT ""
1009 $ WRITE SYS$OUTPUT "The Option ", P7, -
1010 " Is Invalid. The Valid Options Are:"
1011 $ WRITE SYS$OUTPUT ""
1012 $ WRITE SYS$OUTPUT -
1013 " """" : Compile with default (short) pointers."
1014 $ WRITE SYS$OUTPUT -
1015 " 32 : Compile with 32-bit (short) pointers."
1016 $ WRITE SYS$OUTPUT -
1017 " 64 : Compile with 64-bit (long) pointers (auto ARGV)."
1018 $ WRITE SYS$OUTPUT -
1019 " 64= : Compile with 64-bit (long) pointers (no ARGV)."
1020 $ WRITE SYS$OUTPUT -
1021 " 64=ARGV : Compile with 64-bit (long) pointers (ARGV)."
1022 $ WRITE SYS$OUTPUT ""
1032 $! End The P7 (POINTER_SIZE) Check.
1036 $! Set basic C compiler /INCLUDE directories.
1038 $ CC_INCLUDES = "SYS$DISK:[.''ARCHD'],SYS$DISK:[],SYS$DISK:[-],"+ -
1039 "SYS$DISK:[.ENGINE.VENDOR_DEFNS],SYS$DISK:[.MODES],SYS$DISK:[.ASN1],SYS$DISK:[.EVP]"
1041 $! Check To See If P3 Is Blank.
1046 $! O.K., The User Didn't Specify A Compiler, Let's Try To
1047 $! Find Out Which One To Use.
1049 $! Check To See If We Have GNU C.
1051 $ IF (F$TRNLNM("GNU_CC").NES."")
1054 $! Looks Like GNUC, Set To Use GNUC.
1062 $! Check To See If We Have VAXC Or DECC.
1064 $ IF (ARCH.NES."VAX").OR.(F$TRNLNM("DECC$CC_DEFAULT").NES."")
1067 $! Looks Like DECC, Set To Use DECC.
1075 $! Looks Like VAXC, Set To Use VAXC.
1079 $! End The VAXC Compiler Check.
1083 $! End The DECC & VAXC Compiler Check.
1087 $! End The Compiler Check.
1091 $! Check To See If We Have A Option For P4.
1096 $! Find out what socket library we have available
1098 $ IF F$PARSE("SOCKETSHR:") .NES. ""
1101 $! We have SOCKETSHR, and it is my opinion that it's the best to use.
1107 $ WRITE SYS$OUTPUT "Using SOCKETSHR for TCP/IP"
1109 $! Else, let's look for something else
1113 $! Like UCX (the reason to do this before Multinet is that the UCX
1114 $! emulation is easier to use...)
1116 $ IF F$TRNLNM("UCX$IPC_SHR") .NES. "" -
1117 .OR. F$PARSE("SYS$SHARE:UCX$IPC_SHR.EXE") .NES. "" -
1118 .OR. F$PARSE("SYS$LIBRARY:UCX$IPC.OLB") .NES. ""
1121 $! Last resort: a UCX or UCX-compatible library
1127 $ WRITE SYS$OUTPUT "Using UCX or an emulation thereof for TCP/IP"
1135 $! Set Up Initial CC Definitions, Possibly With User Ones
1137 $ CCDEFS = "TCPIP_TYPE_''P4',DSO_VMS"
1138 $ IF F$TYPE(USER_CCDEFS) .NES. "" THEN CCDEFS = CCDEFS + "," + USER_CCDEFS
1140 $ IF F$TYPE(USER_CCFLAGS) .NES. "" THEN CCEXTRAFLAGS = USER_CCFLAGS
1141 $ CCDISABLEWARNINGS = "" !!! "MAYLOSEDATA3" !!! "LONGLONGTYPE,LONGLONGSUFX,FOUNDCR"
1142 $ IF F$TYPE(USER_CCDISABLEWARNINGS) .NES. ""
1144 $ IF CCDISABLEWARNINGS .NES. "" THEN CCDISABLEWARNINGS = CCDISABLEWARNINGS + ","
1145 $ CCDISABLEWARNINGS = CCDISABLEWARNINGS + USER_CCDISABLEWARNINGS
1148 $! Check To See If We Have A ZLIB Option.
1151 $ IF (ZLIB .NES. "")
1154 $! Check for expected ZLIB files.
1157 $ file1 = f$parse( "zlib.h", ZLIB, , , "SYNTAX_ONLY")
1158 $ if (f$search( file1) .eqs. "")
1160 $ WRITE SYS$OUTPUT ""
1161 $ WRITE SYS$OUTPUT "The Option ", ZLIB, " Is Invalid."
1162 $ WRITE SYS$OUTPUT " Can't find header: ''file1'"
1165 $ file1 = f$parse( "A.;", ZLIB)- "A.;"
1167 $ file2 = f$parse( ZLIB, "libz.olb", , , "SYNTAX_ONLY")
1168 $ if (f$search( file2) .eqs. "")
1172 $ WRITE SYS$OUTPUT ""
1173 $ WRITE SYS$OUTPUT "The Option ", ZLIB, " Is Invalid."
1175 $ WRITE SYS$OUTPUT " Can't find library: ''file2'"
1176 $ WRITE SYS$OUTPUT ""
1181 $ WRITE SYS$OUTPUT ""
1189 $ CCDEFS = """ZLIB=1"", "+ CCDEFS
1190 $ CC_INCLUDES = CC_INCLUDES+ ", "+ file1
1191 $ ZLIB_LIB = ", ''file2' /library"
1195 $ WRITE SYS$OUTPUT "ZLIB library spec: ", file2
1197 $! End The ZLIB Check.
1201 $! Check To See If The User Entered A Valid Parameter.
1203 $ IF (P3.EQS."VAXC").OR.(P3.EQS."DECC").OR.(P3.EQS."GNUC")
1206 $! Check To See If The User Wanted DECC.
1208 $ IF (P3.EQS."DECC")
1211 $! Looks Like DECC, Set To Use DECC.
1215 $! Tell The User We Are Using DECC.
1217 $ WRITE SYS$OUTPUT "Using DECC 'C' Compiler."
1222 $ IF ARCH.EQS."VAX" .AND. F$TRNLNM("DECC$CC_DEFAULT").NES."/DECC" -
1224 $ CC = CC + " /''CC_OPTIMIZE' /''DEBUGGER' /STANDARD=RELAXED"+ -
1225 "''POINTER_SIZE' /NOLIST /PREFIX=ALL" + -
1226 " /INCLUDE=(''CC_INCLUDES')"+ -
1229 $! Define The Linker Options File Name.
1231 $ OPT_FILE = "VAX_DECC_OPTIONS.OPT"
1237 $! Check To See If We Are To Use VAXC.
1239 $ IF (P3.EQS."VAXC")
1242 $! Looks Like VAXC, Set To Use VAXC.
1246 $! Tell The User We Are Using VAX C.
1248 $ WRITE SYS$OUTPUT "Using VAXC 'C' Compiler."
1250 $! Compile Using VAXC.
1255 $ WRITE SYS$OUTPUT "There is no VAX C on ''ARCH'!"
1258 $ IF F$TRNLNM("DECC$CC_DEFAULT").EQS."/DECC" THEN CC = "CC/VAXC"
1259 $ CC = CC + "/''CC_OPTIMIZE'/''DEBUGGER'/NOLIST" + -
1260 "/INCLUDE=(''CC_INCLUDES')"+ -
1262 $ CCDEFS = """VAXC""," + CCDEFS
1264 $! Define <sys> As SYS$COMMON:[SYSLIB]
1266 $ DEFINE/NOLOG SYS SYS$COMMON:[SYSLIB]
1268 $! Define The Linker Options File Name.
1270 $ OPT_FILE = "VAX_VAXC_OPTIONS.OPT"
1276 $! Check To See If We Are To Use GNU C.
1278 $ IF (P3.EQS."GNUC")
1281 $! Looks Like GNUC, Set To Use GNUC.
1285 $! Tell The User We Are Using GNUC.
1287 $ WRITE SYS$OUTPUT "Using GNU 'C' Compiler."
1291 $ CC = "GCC/NOCASE_HACK/''GCC_OPTIMIZE'/''DEBUGGER'/NOLIST" + -
1292 "/INCLUDE=(''CC_INCLUDES')"+ -
1295 $! Define The Linker Options File Name.
1297 $ OPT_FILE = "VAX_GNUC_OPTIONS.OPT"
1299 $! End The GNU C Check.
1303 $! Set up default defines
1305 $ CCDEFS = """FLAT_INC=1""," + CCDEFS
1307 $! Finish up the definition of CC.
1309 $ IF COMPILER .EQS. "DECC"
1311 $! Not all compiler versions support MAYLOSEDATA3.
1312 $ OPT_TEST = "MAYLOSEDATA3"
1313 $ DEFINE /USER_MODE SYS$ERROR NL:
1314 $ DEFINE /USER_MODE SYS$OUTPUT NL:
1315 $ 'CC' /NOCROSS_REFERENCE /NOLIST /NOOBJECT -
1316 /WARNINGS = DISABLE = ('OPT_TEST', EMPTYFILE) NL:
1319 $ IF CCDISABLEWARNINGS .NES. "" THEN -
1320 CCDISABLEWARNINGS = CCDISABLEWARNINGS+ ","
1321 $ CCDISABLEWARNINGS = CCDISABLEWARNINGS+ OPT_TEST
1323 $ IF CCDISABLEWARNINGS .EQS. ""
1325 $ CC4DISABLEWARNINGS = "DOLLARID"
1326 $ CC6DISABLEWARNINGS = "MIXLINKAGE"
1328 $ CC4DISABLEWARNINGS = CCDISABLEWARNINGS + ",DOLLARID"
1329 $ CC6DISABLEWARNINGS = CCDISABLEWARNINGS + ",MIXLINKAGE"
1330 $ CCDISABLEWARNINGS = " /WARNING=(DISABLE=(" + CCDISABLEWARNINGS + "))"
1332 $ CC4DISABLEWARNINGS = " /WARNING=(DISABLE=(" + CC4DISABLEWARNINGS + "))"
1333 $ CC6DISABLEWARNINGS = " /WARNING=(DISABLE=(" + CC6DISABLEWARNINGS + "))"
1335 $ CCDISABLEWARNINGS = ""
1336 $ CC4DISABLEWARNINGS = ""
1337 $ CC6DISABLEWARNINGS = ""
1339 $ CC3 = CC + " /DEFINE=(" + CCDEFS + ISSEVEN + ")" + CCDISABLEWARNINGS
1340 $ CC = CC + " /DEFINE=(" + CCDEFS + ")" + CCDISABLEWARNINGS
1341 $ IF ARCH .EQS. "VAX" .AND. COMPILER .EQS. "DECC" .AND. P2 .NES. "DEBUG"
1343 $ CC5 = CC + " /OPTIMIZE=NODISJOINT"
1349 $ CC4 = CC - CCDISABLEWARNINGS + CC4DISABLEWARNINGS
1350 $ CC6 = CC - CCDISABLEWARNINGS + CC6DISABLEWARNINGS
1352 $! Show user the result
1354 $ WRITE/SYMBOL SYS$OUTPUT "Main C Compiling Command: ",CC
1356 $! Else The User Entered An Invalid Argument.
1360 $! Tell The User We Don't Know What They Want.
1362 $ WRITE SYS$OUTPUT ""
1363 $ WRITE SYS$OUTPUT "The Option ",P3," Is Invalid. The Valid Options Are:"
1364 $ WRITE SYS$OUTPUT ""
1365 $ WRITE SYS$OUTPUT " VAXC : To Compile With VAX C."
1366 $ WRITE SYS$OUTPUT " DECC : To Compile With DEC C."
1367 $ WRITE SYS$OUTPUT " GNUC : To Compile With GNU C."
1368 $ WRITE SYS$OUTPUT ""
1374 $! End The Valid Argument Check.
1378 $! Build a MACRO command for the architecture at hand
1380 $ IF ARCH .EQS. "VAX" THEN MACRO = "MACRO/''DEBUGGER'"
1381 $ IF ARCH .NES. "VAX" THEN MACRO = "MACRO/MIGRATION/''DEBUGGER'/''MACRO_OPTIMIZE'"
1383 $! Show user the result
1385 $ WRITE/SYMBOL SYS$OUTPUT "Main MACRO Compiling Command: ",MACRO
1387 $! Time to check the contents, and to make sure we get the correct library.
1389 $ IF P4.EQS."SOCKETSHR" .OR. P4.EQS."MULTINET" .OR. P4.EQS."UCX" -
1390 .OR. P4.EQS."TCPIP" .OR. P4.EQS."NONE"
1393 $! Check to see if SOCKETSHR was chosen
1395 $ IF P4.EQS."SOCKETSHR"
1398 $! Set the library to use SOCKETSHR
1400 $ TCPIP_LIB = ",SYS$DISK:[-.VMS]SOCKETSHR_SHR.OPT /OPTIONS"
1402 $! Done with SOCKETSHR
1406 $! Check to see if MULTINET was chosen
1408 $ IF P4.EQS."MULTINET"
1411 $! Set the library to use UCX emulation.
1415 $! Done with MULTINET
1419 $! Check to see if UCX was chosen
1424 $! Set the library to use UCX.
1426 $ TCPIP_LIB = ",SYS$DISK:[-.VMS]UCX_SHR_DECC.OPT /OPTIONS"
1427 $ IF F$TRNLNM("UCX$IPC_SHR") .NES. ""
1429 $ TCPIP_LIB = ",SYS$DISK:[-.VMS]UCX_SHR_DECC_LOG.OPT /OPTIONS"
1431 $ IF COMPILER .NES. "DECC" .AND. ARCH .EQS. "VAX" THEN -
1432 TCPIP_LIB = ",SYS$DISK:[-.VMS]UCX_SHR_VAXC.OPT /OPTIONS"
1439 $! Check to see if TCPIP was chosen
1444 $! Set the library to use TCPIP (post UCX).
1446 $ TCPIP_LIB = ",SYS$DISK:[-.VMS]TCPIP_SHR_DECC.OPT /OPTIONS"
1452 $! Check to see if NONE was chosen
1457 $! Do not use a TCPIP library.
1467 $ WRITE SYS$OUTPUT "TCP/IP library spec: ", TCPIP_LIB- ","
1469 $! Else The User Entered An Invalid Argument.
1473 $! Tell The User We Don't Know What They Want.
1475 $ WRITE SYS$OUTPUT ""
1476 $ WRITE SYS$OUTPUT "The Option ",P4," Is Invalid. The Valid Options Are:"
1477 $ WRITE SYS$OUTPUT ""
1478 $ WRITE SYS$OUTPUT " SOCKETSHR : To link with SOCKETSHR TCP/IP library."
1479 $ WRITE SYS$OUTPUT " UCX : To link with UCX TCP/IP library."
1480 $ WRITE SYS$OUTPUT " TCPIP : To link with TCPIP (post UCX) TCP/IP library."
1481 $ WRITE SYS$OUTPUT ""
1487 $! Done with TCP/IP libraries
1491 $! Check if the user wanted to compile just a subset of all the encryption
1496 $ ENCRYPT_TYPES = P6
1499 $! Time To RETURN...
1505 $! Save old value of the logical name OPENSSL
1507 $ __SAVE_OPENSSL = F$TRNLNM("OPENSSL","LNM$PROCESS_TABLE")
1509 $! Save directory information
1511 $ __HERE = F$PARSE(F$PARSE("A.;",F$ENVIRONMENT("PROCEDURE"))-"A.;","[]A.;") - "A.;"
1512 $ __HERE = F$EDIT(__HERE,"UPCASE")
1513 $ __TOP = __HERE - "CRYPTO]"
1514 $ __INCLUDE = __TOP + "INCLUDE.OPENSSL]"
1516 $! Set up the logical name OPENSSL to point at the include directory
1518 $ DEFINE OPENSSL/NOLOG '__INCLUDE'
1526 $! Restore the logical name OPENSSL if it had a value
1528 $ IF __SAVE_OPENSSL .EQS. ""
1532 $ DEFINE/NOLOG OPENSSL '__SAVE_OPENSSL'