1ebfedea0SLionel Sambuc$! 2ebfedea0SLionel Sambuc$! SSL-LIB.COM 3ebfedea0SLionel Sambuc$! Written By: Robert Byer 4ebfedea0SLionel Sambuc$! Vice-President 5ebfedea0SLionel Sambuc$! A-Com Computing, Inc. 6ebfedea0SLionel Sambuc$! byer@mail.all-net.net 7ebfedea0SLionel Sambuc$! 8ebfedea0SLionel Sambuc$! Changes by Richard Levitte <richard@levitte.org> 9ebfedea0SLionel Sambuc$! 10ebfedea0SLionel Sambuc$! This command file compiles and creates the "[.xxx.EXE.SSL]LIBSSL.OLB" 11ebfedea0SLionel Sambuc$! library for OpenSSL. The "xxx" denotes the machine architecture of 12ebfedea0SLionel Sambuc$! ALPHA, IA64 or VAX. 13ebfedea0SLionel Sambuc$! 14ebfedea0SLionel Sambuc$! It is written to detect what type of machine you are compiling on 15ebfedea0SLionel Sambuc$! (i.e. ALPHA or VAX) and which "C" compiler you have (i.e. VAXC, DECC 16ebfedea0SLionel Sambuc$! or GNU C) or you can specify which compiler to use. 17ebfedea0SLionel Sambuc$! 18ebfedea0SLionel Sambuc$! Specify the following as P1 to build just that part or ALL to just 19ebfedea0SLionel Sambuc$! build everything. 20ebfedea0SLionel Sambuc$! 21ebfedea0SLionel Sambuc$! LIBRARY To just compile the [.xxx.EXE.SSL]LIBSSL.OLB Library. 22ebfedea0SLionel Sambuc$! SSL_TASK To just compile the [.xxx.EXE.SSL]SSL_TASK.EXE 23ebfedea0SLionel Sambuc$! 24ebfedea0SLionel Sambuc$! Specify DEBUG or NODEBUG as P2 to compile with or without debugger 25ebfedea0SLionel Sambuc$! information. 26ebfedea0SLionel Sambuc$! 27ebfedea0SLionel Sambuc$! Specify which compiler at P3 to try to compile under. 28ebfedea0SLionel Sambuc$! 29ebfedea0SLionel Sambuc$! VAXC For VAX C. 30ebfedea0SLionel Sambuc$! DECC For DEC C. 31ebfedea0SLionel Sambuc$! GNUC For GNU C. 32ebfedea0SLionel Sambuc$! 33ebfedea0SLionel Sambuc$! If you don't specify a compiler, it will try to determine which 34ebfedea0SLionel Sambuc$! "C" compiler to use. 35ebfedea0SLionel Sambuc$! 36ebfedea0SLionel Sambuc$! P4, if defined, sets a TCP/IP library to use, through one of the following 37ebfedea0SLionel Sambuc$! keywords: 38ebfedea0SLionel Sambuc$! 39ebfedea0SLionel Sambuc$! UCX for UCX 40ebfedea0SLionel Sambuc$! TCPIP for TCPIP (post UCX) 41ebfedea0SLionel Sambuc$! SOCKETSHR for SOCKETSHR+NETLIB 42ebfedea0SLionel Sambuc$! 43ebfedea0SLionel Sambuc$! P5, if defined, sets a compiler thread NOT needed on OpenVMS 7.1 (and up) 44ebfedea0SLionel Sambuc$! 45ebfedea0SLionel Sambuc$! P6, if defined, specifies the C pointer size. Ignored on VAX. 46ebfedea0SLionel Sambuc$! ("64=ARGV" gives more efficient code with HP C V7.3 or newer.) 47ebfedea0SLionel Sambuc$! Supported values are: 48ebfedea0SLionel Sambuc$! 49ebfedea0SLionel Sambuc$! "" Compile with default (/NOPOINTER_SIZE) 50ebfedea0SLionel Sambuc$! 32 Compile with /POINTER_SIZE=32 (SHORT) 51ebfedea0SLionel Sambuc$! 64 Compile with /POINTER_SIZE=64[=ARGV] (LONG[=ARGV]) 52ebfedea0SLionel Sambuc$! (Automatically select ARGV if compiler supports it.) 53ebfedea0SLionel Sambuc$! 64= Compile with /POINTER_SIZE=64 (LONG). 54ebfedea0SLionel Sambuc$! 64=ARGV Compile with /POINTER_SIZE=64=ARGV (LONG=ARGV). 55ebfedea0SLionel Sambuc$! 56ebfedea0SLionel Sambuc$! P7, if defined, specifies a directory where ZLIB files (zlib.h, 57ebfedea0SLionel Sambuc$! libz.olb) may be found. Optionally, a non-default object library 58ebfedea0SLionel Sambuc$! name may be included ("dev:[dir]libz_64.olb", for example). 59ebfedea0SLionel Sambuc$! 60ebfedea0SLionel Sambuc$! 61ebfedea0SLionel Sambuc$! Announce/identify. 62ebfedea0SLionel Sambuc$! 63ebfedea0SLionel Sambuc$ proc = f$environment( "procedure") 64ebfedea0SLionel Sambuc$ write sys$output "@@@ "+ - 65ebfedea0SLionel Sambuc f$parse( proc, , , "name")+ f$parse( proc, , , "type") 66ebfedea0SLionel Sambuc$! 67ebfedea0SLionel Sambuc$! Define A TCP/IP Library That We Will Need To Link To. 68ebfedea0SLionel Sambuc$! (That Is, If We Need To Link To One.) 69ebfedea0SLionel Sambuc$! 70ebfedea0SLionel Sambuc$ TCPIP_LIB = "" 71ebfedea0SLionel Sambuc$ ZLIB_LIB = "" 72ebfedea0SLionel Sambuc$! 73ebfedea0SLionel Sambuc$! Check What Architecture We Are Using. 74ebfedea0SLionel Sambuc$! 75ebfedea0SLionel Sambuc$ IF (F$GETSYI("CPU").LT.128) 76ebfedea0SLionel Sambuc$ THEN 77ebfedea0SLionel Sambuc$! 78ebfedea0SLionel Sambuc$! The Architecture Is VAX. 79ebfedea0SLionel Sambuc$! 80ebfedea0SLionel Sambuc$ ARCH = "VAX" 81ebfedea0SLionel Sambuc$! 82ebfedea0SLionel Sambuc$! Else... 83ebfedea0SLionel Sambuc$! 84ebfedea0SLionel Sambuc$ ELSE 85ebfedea0SLionel Sambuc$! 86ebfedea0SLionel Sambuc$! The Architecture Is Alpha, IA64 or whatever comes in the future. 87ebfedea0SLionel Sambuc$! 88ebfedea0SLionel Sambuc$ ARCH = F$EDIT( F$GETSYI( "ARCH_NAME"), "UPCASE") 89ebfedea0SLionel Sambuc$ IF (ARCH .EQS. "") THEN ARCH = "UNK" 90ebfedea0SLionel Sambuc$! 91ebfedea0SLionel Sambuc$! End The Architecture Check. 92ebfedea0SLionel Sambuc$! 93ebfedea0SLionel Sambuc$ ENDIF 94ebfedea0SLionel Sambuc$! 95ebfedea0SLionel Sambuc$ ARCHD = ARCH 96ebfedea0SLionel Sambuc$ LIB32 = "32" 97ebfedea0SLionel Sambuc$ OPT_FILE = "" 98ebfedea0SLionel Sambuc$ POINTER_SIZE = "" 99ebfedea0SLionel Sambuc$! 100ebfedea0SLionel Sambuc$! Check To Make Sure We Have Valid Command Line Parameters. 101ebfedea0SLionel Sambuc$! 102ebfedea0SLionel Sambuc$ GOSUB CHECK_OPTIONS 103ebfedea0SLionel Sambuc$! 104ebfedea0SLionel Sambuc$! Define The OBJ and EXE Directories. 105ebfedea0SLionel Sambuc$! 106ebfedea0SLionel Sambuc$ OBJ_DIR := SYS$DISK:[-.'ARCHD'.OBJ.SSL] 107ebfedea0SLionel Sambuc$ EXE_DIR := SYS$DISK:[-.'ARCHD'.EXE.SSL] 108ebfedea0SLionel Sambuc$! 109ebfedea0SLionel Sambuc$! Specify the destination directory in any /MAP option. 110ebfedea0SLionel Sambuc$! 111ebfedea0SLionel Sambuc$ if (LINKMAP .eqs. "MAP") 112ebfedea0SLionel Sambuc$ then 113ebfedea0SLionel Sambuc$ LINKMAP = LINKMAP+ "=''EXE_DIR'" 114ebfedea0SLionel Sambuc$ endif 115ebfedea0SLionel Sambuc$! 116ebfedea0SLionel Sambuc$! Add the location prefix to the linker options file name. 117ebfedea0SLionel Sambuc$! 118ebfedea0SLionel Sambuc$ if (OPT_FILE .nes. "") 119ebfedea0SLionel Sambuc$ then 120ebfedea0SLionel Sambuc$ OPT_FILE = EXE_DIR+ OPT_FILE 121ebfedea0SLionel Sambuc$ endif 122ebfedea0SLionel Sambuc$! 123ebfedea0SLionel Sambuc$! Initialise logical names and such 124ebfedea0SLionel Sambuc$! 125ebfedea0SLionel Sambuc$ GOSUB INITIALISE 126ebfedea0SLionel Sambuc$! 127ebfedea0SLionel Sambuc$! Tell The User What Kind of Machine We Run On. 128ebfedea0SLionel Sambuc$! 129ebfedea0SLionel Sambuc$ WRITE SYS$OUTPUT "Host system architecture: ''ARCHD'" 130ebfedea0SLionel Sambuc$! 131ebfedea0SLionel Sambuc$! Check To See If The Architecture Specific OBJ Directory Exists. 132ebfedea0SLionel Sambuc$! 133ebfedea0SLionel Sambuc$ IF (F$PARSE(OBJ_DIR).EQS."") 134ebfedea0SLionel Sambuc$ THEN 135ebfedea0SLionel Sambuc$! 136ebfedea0SLionel Sambuc$! It Dosen't Exist, So Create It. 137ebfedea0SLionel Sambuc$! 138ebfedea0SLionel Sambuc$ CREATE/DIR 'OBJ_DIR' 139ebfedea0SLionel Sambuc$! 140ebfedea0SLionel Sambuc$! End The Architecture Specific OBJ Directory Check. 141ebfedea0SLionel Sambuc$! 142ebfedea0SLionel Sambuc$ ENDIF 143ebfedea0SLionel Sambuc$! 144ebfedea0SLionel Sambuc$! Check To See If The Architecture Specific Directory Exists. 145ebfedea0SLionel Sambuc$! 146ebfedea0SLionel Sambuc$ IF (F$PARSE(EXE_DIR).EQS."") 147ebfedea0SLionel Sambuc$ THEN 148ebfedea0SLionel Sambuc$! 149ebfedea0SLionel Sambuc$! It Dosen't Exist, So Create It. 150ebfedea0SLionel Sambuc$! 151ebfedea0SLionel Sambuc$ CREATE/DIR 'EXE_DIR' 152ebfedea0SLionel Sambuc$! 153ebfedea0SLionel Sambuc$! End The Architecture Specific Directory Check. 154ebfedea0SLionel Sambuc$! 155ebfedea0SLionel Sambuc$ ENDIF 156ebfedea0SLionel Sambuc$! 157ebfedea0SLionel Sambuc$! Define The Library Name. 158ebfedea0SLionel Sambuc$! 159ebfedea0SLionel Sambuc$ SSL_LIB := 'EXE_DIR'SSL_LIBSSL'LIB32'.OLB 160ebfedea0SLionel Sambuc$! 161ebfedea0SLionel Sambuc$! Define The CRYPTO-LIB We Are To Use. 162ebfedea0SLionel Sambuc$! 163ebfedea0SLionel Sambuc$ CRYPTO_LIB := SYS$DISK:[-.'ARCHD'.EXE.CRYPTO]SSL_LIBCRYPTO'LIB32'.OLB 164ebfedea0SLionel Sambuc$! 165ebfedea0SLionel Sambuc$! Set up exceptional compilations. 166ebfedea0SLionel Sambuc$! 167ebfedea0SLionel Sambuc$ CC5_SHOWN = 0 168ebfedea0SLionel Sambuc$! 169ebfedea0SLionel Sambuc$! Check To See What We Are To Do. 170ebfedea0SLionel Sambuc$! 171ebfedea0SLionel Sambuc$ IF (BUILDALL.EQS."TRUE") 172ebfedea0SLionel Sambuc$ THEN 173ebfedea0SLionel Sambuc$! 174ebfedea0SLionel Sambuc$! Since Nothing Special Was Specified, Do Everything. 175ebfedea0SLionel Sambuc$! 176ebfedea0SLionel Sambuc$ GOSUB LIBRARY 177ebfedea0SLionel Sambuc$ GOSUB SSL_TASK 178ebfedea0SLionel Sambuc$! 179ebfedea0SLionel Sambuc$! Else... 180ebfedea0SLionel Sambuc$! 181ebfedea0SLionel Sambuc$ ELSE 182ebfedea0SLionel Sambuc$! 183ebfedea0SLionel Sambuc$! Build Just What The User Wants Us To Build. 184ebfedea0SLionel Sambuc$! 185ebfedea0SLionel Sambuc$ GOSUB 'BUILDALL' 186ebfedea0SLionel Sambuc$! 187ebfedea0SLionel Sambuc$! End The BUILDALL Check. 188ebfedea0SLionel Sambuc$! 189ebfedea0SLionel Sambuc$ ENDIF 190ebfedea0SLionel Sambuc$! 191ebfedea0SLionel Sambuc$! Time To EXIT. 192ebfedea0SLionel Sambuc$! 193ebfedea0SLionel Sambuc$ EXIT: 194ebfedea0SLionel Sambuc$ GOSUB CLEANUP 195ebfedea0SLionel Sambuc$ EXIT 196ebfedea0SLionel Sambuc$! 197ebfedea0SLionel Sambuc$! Compile The Library. 198ebfedea0SLionel Sambuc$! 199ebfedea0SLionel Sambuc$ LIBRARY: 200ebfedea0SLionel Sambuc$! 201ebfedea0SLionel Sambuc$! Check To See If We Already Have A "[.xxx.EXE.SSL]SSL_LIBSSL''LIB32'.OLB" Library... 202ebfedea0SLionel Sambuc$! 203ebfedea0SLionel Sambuc$ IF (F$SEARCH(SSL_LIB).EQS."") 204ebfedea0SLionel Sambuc$ THEN 205ebfedea0SLionel Sambuc$! 206ebfedea0SLionel Sambuc$! Guess Not, Create The Library. 207ebfedea0SLionel Sambuc$! 208ebfedea0SLionel Sambuc$ LIBRARY/CREATE/OBJECT 'SSL_LIB' 209ebfedea0SLionel Sambuc$! 210ebfedea0SLionel Sambuc$! End The Library Exist Check. 211ebfedea0SLionel Sambuc$! 212ebfedea0SLionel Sambuc$ ENDIF 213ebfedea0SLionel Sambuc$! 214ebfedea0SLionel Sambuc$! Define The Different SSL "library" Files. 215ebfedea0SLionel Sambuc$! 216ebfedea0SLionel Sambuc$ LIB_SSL = "s2_meth, s2_srvr, s2_clnt, s2_lib, s2_enc, s2_pkt,"+ - 217*0a6a1f1dSLionel Sambuc "s3_meth, s3_srvr, s3_clnt, s3_lib, s3_enc, s3_pkt, s3_both, s3_cbc,"+ - 218ebfedea0SLionel Sambuc "s23_meth,s23_srvr,s23_clnt,s23_lib, s23_pkt,"+ - 219ebfedea0SLionel Sambuc "t1_meth, t1_srvr, t1_clnt, t1_lib, t1_enc,"+ - 220ebfedea0SLionel Sambuc "d1_meth, d1_srvr, d1_clnt, d1_lib, d1_pkt,"+ - 221ebfedea0SLionel Sambuc "d1_both,d1_enc,d1_srtp,"+ - 222ebfedea0SLionel Sambuc "ssl_lib,ssl_err2,ssl_cert,ssl_sess,"+ - 223ebfedea0SLionel Sambuc "ssl_ciph,ssl_stat,ssl_rsa,"+ - 224ebfedea0SLionel Sambuc "ssl_asn1,ssl_txt,ssl_algs,"+ - 225*0a6a1f1dSLionel Sambuc "bio_ssl,ssl_err,kssl,tls_srp,t1_reneg,ssl_utst" 226ebfedea0SLionel Sambuc$! 227ebfedea0SLionel Sambuc$ COMPILEWITH_CC5 = "" 228ebfedea0SLionel Sambuc$! 229ebfedea0SLionel Sambuc$! Tell The User That We Are Compiling The Library. 230ebfedea0SLionel Sambuc$! 231ebfedea0SLionel Sambuc$ WRITE SYS$OUTPUT "Building The ",SSL_LIB," Library." 232ebfedea0SLionel Sambuc$! 233ebfedea0SLionel Sambuc$! Define A File Counter And Set It To "0" 234ebfedea0SLionel Sambuc$! 235ebfedea0SLionel Sambuc$ FILE_COUNTER = 0 236ebfedea0SLionel Sambuc$! 237ebfedea0SLionel Sambuc$! Top Of The File Loop. 238ebfedea0SLionel Sambuc$! 239ebfedea0SLionel Sambuc$ NEXT_FILE: 240ebfedea0SLionel Sambuc$! 241ebfedea0SLionel Sambuc$! O.K, Extract The File Name From The File List. 242ebfedea0SLionel Sambuc$! 243*0a6a1f1dSLionel Sambuc$ FILE_NAME = F$EDIT(F$ELEMENT(FILE_COUNTER,",",LIB_SSL),"COLLAPSE") 244ebfedea0SLionel Sambuc$! 245ebfedea0SLionel Sambuc$! Check To See If We Are At The End Of The File List. 246ebfedea0SLionel Sambuc$! 247ebfedea0SLionel Sambuc$ IF (FILE_NAME.EQS.",") THEN GOTO FILE_DONE 248ebfedea0SLionel Sambuc$! 249ebfedea0SLionel Sambuc$! Increment The Counter. 250ebfedea0SLionel Sambuc$! 251ebfedea0SLionel Sambuc$ FILE_COUNTER = FILE_COUNTER + 1 252ebfedea0SLionel Sambuc$! 253ebfedea0SLionel Sambuc$! Create The Source File Name. 254ebfedea0SLionel Sambuc$! 255ebfedea0SLionel Sambuc$ SOURCE_FILE = "SYS$DISK:[]" + FILE_NAME + ".C" 256ebfedea0SLionel Sambuc$! 257ebfedea0SLionel Sambuc$! Create The Object File Name. 258ebfedea0SLionel Sambuc$! 259ebfedea0SLionel Sambuc$ OBJECT_FILE = OBJ_DIR + FILE_NAME + ".OBJ" 260ebfedea0SLionel Sambuc$ ON WARNING THEN GOTO NEXT_FILE 261ebfedea0SLionel Sambuc$! 262ebfedea0SLionel Sambuc$! Check To See If The File We Want To Compile Is Actually There. 263ebfedea0SLionel Sambuc$! 264ebfedea0SLionel Sambuc$ IF (F$SEARCH(SOURCE_FILE).EQS."") 265ebfedea0SLionel Sambuc$ THEN 266ebfedea0SLionel Sambuc$! 267ebfedea0SLionel Sambuc$! Tell The User That The File Dosen't Exist. 268ebfedea0SLionel Sambuc$! 269ebfedea0SLionel Sambuc$ WRITE SYS$OUTPUT "" 270ebfedea0SLionel Sambuc$ WRITE SYS$OUTPUT "The File ",SOURCE_FILE," Dosen't Exist." 271ebfedea0SLionel Sambuc$ WRITE SYS$OUTPUT "" 272ebfedea0SLionel Sambuc$! 273ebfedea0SLionel Sambuc$! Exit The Build. 274ebfedea0SLionel Sambuc$! 275ebfedea0SLionel Sambuc$ EXIT 276ebfedea0SLionel Sambuc$! 277ebfedea0SLionel Sambuc$! End The File Exists Check. 278ebfedea0SLionel Sambuc$! 279ebfedea0SLionel Sambuc$ ENDIF 280ebfedea0SLionel Sambuc$! 281ebfedea0SLionel Sambuc$! Tell The User What File We Are Compiling. 282ebfedea0SLionel Sambuc$! 283ebfedea0SLionel Sambuc$ WRITE SYS$OUTPUT " ",FILE_NAME,".c" 284ebfedea0SLionel Sambuc$! 285ebfedea0SLionel Sambuc$! Compile The File. 286ebfedea0SLionel Sambuc$! 287ebfedea0SLionel Sambuc$ ON ERROR THEN GOTO NEXT_FILE 288ebfedea0SLionel Sambuc$ CC/OBJECT='OBJECT_FILE' 'SOURCE_FILE' 289ebfedea0SLionel Sambuc$! 290ebfedea0SLionel Sambuc$! Add It To The Library. 291ebfedea0SLionel Sambuc$! 292ebfedea0SLionel Sambuc$ LIBRARY/REPLACE/OBJECT 'SSL_LIB' 'OBJECT_FILE' 293ebfedea0SLionel Sambuc$! 294ebfedea0SLionel Sambuc$! Time To Clean Up The Object File. 295ebfedea0SLionel Sambuc$! 296ebfedea0SLionel Sambuc$ DELETE 'OBJECT_FILE';* 297ebfedea0SLionel Sambuc$! 298ebfedea0SLionel Sambuc$! Go Back And Get The Next File Name. 299ebfedea0SLionel Sambuc$! 300ebfedea0SLionel Sambuc$ GOTO NEXT_FILE 301ebfedea0SLionel Sambuc$! 302ebfedea0SLionel Sambuc$! All Done With This Library. 303ebfedea0SLionel Sambuc$! 304ebfedea0SLionel Sambuc$ FILE_DONE: 305ebfedea0SLionel Sambuc$! 306ebfedea0SLionel Sambuc$! Tell The User That We Are All Done. 307ebfedea0SLionel Sambuc$! 308ebfedea0SLionel Sambuc$ WRITE SYS$OUTPUT "Library ",SSL_LIB," Compiled." 309ebfedea0SLionel Sambuc$! 310ebfedea0SLionel Sambuc$! Time To RETURN. 311ebfedea0SLionel Sambuc$! 312ebfedea0SLionel Sambuc$ RETURN 313ebfedea0SLionel Sambuc$ SSL_TASK: 314ebfedea0SLionel Sambuc$! 315ebfedea0SLionel Sambuc$! Check To See If We Have The Proper Libraries. 316ebfedea0SLionel Sambuc$! 317ebfedea0SLionel Sambuc$ GOSUB LIB_CHECK 318ebfedea0SLionel Sambuc$! 319ebfedea0SLionel Sambuc$! Check To See If We Have A Linker Option File. 320ebfedea0SLionel Sambuc$! 321ebfedea0SLionel Sambuc$ GOSUB CHECK_OPT_FILE 322ebfedea0SLionel Sambuc$! 323ebfedea0SLionel Sambuc$! Check To See If The File We Want To Compile Is Actually There. 324ebfedea0SLionel Sambuc$! 325ebfedea0SLionel Sambuc$ IF (F$SEARCH("SYS$DISK:[]SSL_TASK.C").EQS."") 326ebfedea0SLionel Sambuc$ THEN 327ebfedea0SLionel Sambuc$! 328ebfedea0SLionel Sambuc$! Tell The User That The File Dosen't Exist. 329ebfedea0SLionel Sambuc$! 330ebfedea0SLionel Sambuc$ WRITE SYS$OUTPUT "" 331ebfedea0SLionel Sambuc$ WRITE SYS$OUTPUT "The File SSL_TASK.C Dosen't Exist." 332ebfedea0SLionel Sambuc$ WRITE SYS$OUTPUT "" 333ebfedea0SLionel Sambuc$! 334ebfedea0SLionel Sambuc$! Exit The Build. 335ebfedea0SLionel Sambuc$! 336ebfedea0SLionel Sambuc$ EXIT 337ebfedea0SLionel Sambuc$! 338ebfedea0SLionel Sambuc$! End The SSL_TASK.C File Check. 339ebfedea0SLionel Sambuc$! 340ebfedea0SLionel Sambuc$ ENDIF 341ebfedea0SLionel Sambuc$! 342ebfedea0SLionel Sambuc$ COMPILEWITH_CC5 = "" !!! ",ssl_task," 343ebfedea0SLionel Sambuc$! 344ebfedea0SLionel Sambuc$! Tell The User We Are Creating The SSL_TASK. 345ebfedea0SLionel Sambuc$! 346ebfedea0SLionel Sambuc$! Tell The User We Are Creating The SSL_TASK. 347ebfedea0SLionel Sambuc$! 348ebfedea0SLionel Sambuc$ WRITE SYS$OUTPUT "Creating SSL_TASK OSU HTTP SSL Engine." 349ebfedea0SLionel Sambuc$! 350ebfedea0SLionel Sambuc$! Tell The User What File We Are Compiling. 351ebfedea0SLionel Sambuc$! 352ebfedea0SLionel Sambuc$ FILE_NAME = "ssl_task" 353ebfedea0SLionel Sambuc$ WRITE SYS$OUTPUT " ",FILE_NAME,".c" 354ebfedea0SLionel Sambuc$! 355ebfedea0SLionel Sambuc$! Compile The File. 356ebfedea0SLionel Sambuc$! 357ebfedea0SLionel Sambuc$ ON ERROR THEN GOTO SSL_TASK_END 358ebfedea0SLionel Sambuc$! 359ebfedea0SLionel Sambuc$ FILE_NAME0 = ","+ F$ELEMENT(0,".",FILE_NAME)+ "," 360ebfedea0SLionel Sambuc$ IF COMPILEWITH_CC5 - FILE_NAME0 .NES. COMPILEWITH_CC5 361ebfedea0SLionel Sambuc$ THEN 362ebfedea0SLionel Sambuc$ if (.not. CC5_SHOWN) 363ebfedea0SLionel Sambuc$ then 364ebfedea0SLionel Sambuc$ CC5_SHOWN = 1 365ebfedea0SLionel Sambuc$ write sys$output " \Using special rule (5)" 366ebfedea0SLionel Sambuc$ x = " "+ CC5 367ebfedea0SLionel Sambuc$ write /symbol sys$output x 368ebfedea0SLionel Sambuc$ endif 369ebfedea0SLionel Sambuc$ CC5 /OBJECT='OBJ_DIR''FILE_NAME'.OBJ SYS$DISK:[]'FILE_NAME'.C 370ebfedea0SLionel Sambuc$ ELSE 371ebfedea0SLionel Sambuc$ CC /OBJECT='OBJ_DIR''FILE_NAME'.OBJ SYS$DISK:[]'FILE_NAME'.C 372ebfedea0SLionel Sambuc$ ENDIF 373ebfedea0SLionel Sambuc$! 374ebfedea0SLionel Sambuc$! Link The Program. 375ebfedea0SLionel Sambuc$! 376ebfedea0SLionel Sambuc$ LINK /'DEBUGGER' /'LINKMAP' /'TRACEBACK' /EXE='EXE_DIR'SSL_TASK.EXE - 377ebfedea0SLionel Sambuc 'OBJ_DIR'SSL_TASK.OBJ, - 378ebfedea0SLionel Sambuc 'SSL_LIB'/LIBRARY, - 379ebfedea0SLionel Sambuc 'CRYPTO_LIB'/LIBRARY - 380ebfedea0SLionel Sambuc 'TCPIP_LIB' - 381ebfedea0SLionel Sambuc 'ZLIB_LIB' - 382ebfedea0SLionel Sambuc ,'OPT_FILE' /OPTIONS 383ebfedea0SLionel Sambuc$! 384ebfedea0SLionel Sambuc$! Time To Return. 385ebfedea0SLionel Sambuc$! 386ebfedea0SLionel Sambuc$SSL_TASK_END: 387ebfedea0SLionel Sambuc$ RETURN 388ebfedea0SLionel Sambuc$! 389ebfedea0SLionel Sambuc$! Check For The Link Option FIle. 390ebfedea0SLionel Sambuc$! 391ebfedea0SLionel Sambuc$ CHECK_OPT_FILE: 392ebfedea0SLionel Sambuc$! 393ebfedea0SLionel Sambuc$! Check To See If We Need To Make A VAX C Option File. 394ebfedea0SLionel Sambuc$! 395ebfedea0SLionel Sambuc$ IF (COMPILER.EQS."VAXC") 396ebfedea0SLionel Sambuc$ THEN 397ebfedea0SLionel Sambuc$! 398ebfedea0SLionel Sambuc$! Check To See If We Already Have A VAX C Linker Option File. 399ebfedea0SLionel Sambuc$! 400ebfedea0SLionel Sambuc$ IF (F$SEARCH(OPT_FILE).EQS."") 401ebfedea0SLionel Sambuc$ THEN 402ebfedea0SLionel Sambuc$! 403ebfedea0SLionel Sambuc$! We Need A VAX C Linker Option File. 404ebfedea0SLionel Sambuc$! 405ebfedea0SLionel Sambuc$ CREATE 'OPT_FILE' 406ebfedea0SLionel Sambuc$DECK 407ebfedea0SLionel Sambuc! 408ebfedea0SLionel Sambuc! Default System Options File To Link Against 409ebfedea0SLionel Sambuc! The Sharable VAX C Runtime Library. 410ebfedea0SLionel Sambuc! 411ebfedea0SLionel SambucSYS$SHARE:VAXCRTL.EXE/SHARE 412ebfedea0SLionel Sambuc$EOD 413ebfedea0SLionel Sambuc$! 414ebfedea0SLionel Sambuc$! End The Option File Check. 415ebfedea0SLionel Sambuc$! 416ebfedea0SLionel Sambuc$ ENDIF 417ebfedea0SLionel Sambuc$! 418ebfedea0SLionel Sambuc$! End The VAXC Check. 419ebfedea0SLionel Sambuc$! 420ebfedea0SLionel Sambuc$ ENDIF 421ebfedea0SLionel Sambuc$! 422ebfedea0SLionel Sambuc$! Check To See If We Need A GNU C Option File. 423ebfedea0SLionel Sambuc$! 424ebfedea0SLionel Sambuc$ IF (COMPILER.EQS."GNUC") 425ebfedea0SLionel Sambuc$ THEN 426ebfedea0SLionel Sambuc$! 427ebfedea0SLionel Sambuc$! Check To See If We Already Have A GNU C Linker Option File. 428ebfedea0SLionel Sambuc$! 429ebfedea0SLionel Sambuc$ IF (F$SEARCH(OPT_FILE).EQS."") 430ebfedea0SLionel Sambuc$ THEN 431ebfedea0SLionel Sambuc$! 432ebfedea0SLionel Sambuc$! We Need A GNU C Linker Option File. 433ebfedea0SLionel Sambuc$! 434ebfedea0SLionel Sambuc$ CREATE 'OPT_FILE' 435ebfedea0SLionel Sambuc$DECK 436ebfedea0SLionel Sambuc! 437ebfedea0SLionel Sambuc! Default System Options File To Link Against 438ebfedea0SLionel Sambuc! The Sharable C Runtime Library. 439ebfedea0SLionel Sambuc! 440ebfedea0SLionel SambucGNU_CC:[000000]GCCLIB/LIBRARY 441ebfedea0SLionel SambucSYS$SHARE:VAXCRTL/SHARE 442ebfedea0SLionel Sambuc$EOD 443ebfedea0SLionel Sambuc$! 444ebfedea0SLionel Sambuc$! End The Option File Check. 445ebfedea0SLionel Sambuc$! 446ebfedea0SLionel Sambuc$ ENDIF 447ebfedea0SLionel Sambuc$! 448ebfedea0SLionel Sambuc$! End The GNU C Check. 449ebfedea0SLionel Sambuc$! 450ebfedea0SLionel Sambuc$ ENDIF 451ebfedea0SLionel Sambuc$! 452ebfedea0SLionel Sambuc$! Check To See If We Need A DEC C Option File. 453ebfedea0SLionel Sambuc$! 454ebfedea0SLionel Sambuc$ IF (COMPILER.EQS."DECC") 455ebfedea0SLionel Sambuc$ THEN 456ebfedea0SLionel Sambuc$! 457ebfedea0SLionel Sambuc$! Check To See If We Already Have A DEC C Linker Option File. 458ebfedea0SLionel Sambuc$! 459ebfedea0SLionel Sambuc$ IF (F$SEARCH(OPT_FILE).EQS."") 460ebfedea0SLionel Sambuc$ THEN 461ebfedea0SLionel Sambuc$! 462ebfedea0SLionel Sambuc$! Figure Out If We Need A non-VAX Or A VAX Linker Option File. 463ebfedea0SLionel Sambuc$! 464ebfedea0SLionel Sambuc$ IF (ARCH.EQS."VAX") 465ebfedea0SLionel Sambuc$ THEN 466ebfedea0SLionel Sambuc$! 467ebfedea0SLionel Sambuc$! We Need A DEC C Linker Option File For VAX. 468ebfedea0SLionel Sambuc$! 469ebfedea0SLionel Sambuc$ CREATE 'OPT_FILE' 470ebfedea0SLionel Sambuc$DECK 471ebfedea0SLionel Sambuc! 472ebfedea0SLionel Sambuc! Default System Options File To Link Against 473ebfedea0SLionel Sambuc! The Sharable DEC C Runtime Library. 474ebfedea0SLionel Sambuc! 475ebfedea0SLionel SambucSYS$SHARE:DECC$SHR.EXE/SHARE 476ebfedea0SLionel Sambuc$EOD 477ebfedea0SLionel Sambuc$! 478ebfedea0SLionel Sambuc$! Else... 479ebfedea0SLionel Sambuc$! 480ebfedea0SLionel Sambuc$ ELSE 481ebfedea0SLionel Sambuc$! 482ebfedea0SLionel Sambuc$! Create The non-VAX Linker Option File. 483ebfedea0SLionel Sambuc$! 484ebfedea0SLionel Sambuc$ CREATE 'OPT_FILE' 485ebfedea0SLionel Sambuc$DECK 486ebfedea0SLionel Sambuc! 487ebfedea0SLionel Sambuc! Default System Options File For non-VAX To Link Against 488ebfedea0SLionel Sambuc! The Sharable C Runtime Library. 489ebfedea0SLionel Sambuc! 490ebfedea0SLionel SambucSYS$SHARE:CMA$OPEN_LIB_SHR/SHARE 491ebfedea0SLionel SambucSYS$SHARE:CMA$OPEN_RTL/SHARE 492ebfedea0SLionel Sambuc$EOD 493ebfedea0SLionel Sambuc$! 494ebfedea0SLionel Sambuc$! End The DEC C Option File Check. 495ebfedea0SLionel Sambuc$! 496ebfedea0SLionel Sambuc$ ENDIF 497ebfedea0SLionel Sambuc$! 498ebfedea0SLionel Sambuc$! End The Option File Search. 499ebfedea0SLionel Sambuc$! 500ebfedea0SLionel Sambuc$ ENDIF 501ebfedea0SLionel Sambuc$! 502ebfedea0SLionel Sambuc$! End The DEC C Check. 503ebfedea0SLionel Sambuc$! 504ebfedea0SLionel Sambuc$ ENDIF 505ebfedea0SLionel Sambuc$! 506ebfedea0SLionel Sambuc$! Tell The User What Linker Option File We Are Using. 507ebfedea0SLionel Sambuc$! 508ebfedea0SLionel Sambuc$ WRITE SYS$OUTPUT "Using Linker Option File ",OPT_FILE,"." 509ebfedea0SLionel Sambuc$! 510ebfedea0SLionel Sambuc$! Time To RETURN. 511ebfedea0SLionel Sambuc$! 512ebfedea0SLionel Sambuc$ RETURN 513ebfedea0SLionel Sambuc$ LIB_CHECK: 514ebfedea0SLionel Sambuc$! 515ebfedea0SLionel Sambuc$! Look For The VAX Library LIBSSL.OLB. 516ebfedea0SLionel Sambuc$! 517ebfedea0SLionel Sambuc$ IF (F$SEARCH(SSL_LIB).EQS."") 518ebfedea0SLionel Sambuc$ THEN 519ebfedea0SLionel Sambuc$! 520ebfedea0SLionel Sambuc$! Tell The User We Can't Find The LIBSSL.OLB Library. 521ebfedea0SLionel Sambuc$! 522ebfedea0SLionel Sambuc$ WRITE SYS$OUTPUT "" 523ebfedea0SLionel Sambuc$ WRITE SYS$OUTPUT "Can't Find The Library ",SSL_LIB,"." 524ebfedea0SLionel Sambuc$ WRITE SYS$OUTPUT "We Can't Link Without It." 525ebfedea0SLionel Sambuc$ WRITE SYS$OUTPUT "" 526ebfedea0SLionel Sambuc$! 527ebfedea0SLionel Sambuc$! Since We Can't Link Without It, Exit. 528ebfedea0SLionel Sambuc$! 529ebfedea0SLionel Sambuc$ EXIT 530ebfedea0SLionel Sambuc$! 531ebfedea0SLionel Sambuc$! End The LIBSSL.OLB Library Check. 532ebfedea0SLionel Sambuc$! 533ebfedea0SLionel Sambuc$ ENDIF 534ebfedea0SLionel Sambuc$! 535ebfedea0SLionel Sambuc$! Look For The Library LIBCRYPTO.OLB. 536ebfedea0SLionel Sambuc$! 537ebfedea0SLionel Sambuc$ IF (F$SEARCH(CRYPTO_LIB).EQS."") 538ebfedea0SLionel Sambuc$ THEN 539ebfedea0SLionel Sambuc$! 540ebfedea0SLionel Sambuc$! Tell The User We Can't Find The LIBCRYPTO.OLB Library. 541ebfedea0SLionel Sambuc$! 542ebfedea0SLionel Sambuc$ WRITE SYS$OUTPUT "" 543ebfedea0SLionel Sambuc$ WRITE SYS$OUTPUT "Can't Find The Library ",CRYPTO_LIB,"." 544ebfedea0SLionel Sambuc$ WRITE SYS$OUTPUT "We Can't Link Without It." 545ebfedea0SLionel Sambuc$ WRITE SYS$OUTPUT "" 546ebfedea0SLionel Sambuc$! 547ebfedea0SLionel Sambuc$! Since We Can't Link Without It, Exit. 548ebfedea0SLionel Sambuc$! 549ebfedea0SLionel Sambuc$ EXIT 550ebfedea0SLionel Sambuc$! 551ebfedea0SLionel Sambuc$! End The LIBCRYPTO.OLB Library Check. 552ebfedea0SLionel Sambuc$! 553ebfedea0SLionel Sambuc$ ENDIF 554ebfedea0SLionel Sambuc$! 555ebfedea0SLionel Sambuc$! Time To Return. 556ebfedea0SLionel Sambuc$! 557ebfedea0SLionel Sambuc$ RETURN 558ebfedea0SLionel Sambuc$! 559ebfedea0SLionel Sambuc$! Check The User's Options. 560ebfedea0SLionel Sambuc$! 561ebfedea0SLionel Sambuc$ CHECK_OPTIONS: 562ebfedea0SLionel Sambuc$! 563ebfedea0SLionel Sambuc$! Check To See If P1 Is Blank. 564ebfedea0SLionel Sambuc$! 565ebfedea0SLionel Sambuc$ IF (P1.EQS."ALL") 566ebfedea0SLionel Sambuc$ THEN 567ebfedea0SLionel Sambuc$! 568ebfedea0SLionel Sambuc$! P1 Is Blank, So Build Everything. 569ebfedea0SLionel Sambuc$! 570ebfedea0SLionel Sambuc$ BUILDALL = "TRUE" 571ebfedea0SLionel Sambuc$! 572ebfedea0SLionel Sambuc$! Else... 573ebfedea0SLionel Sambuc$! 574ebfedea0SLionel Sambuc$ ELSE 575ebfedea0SLionel Sambuc$! 576ebfedea0SLionel Sambuc$! Else, Check To See If P1 Has A Valid Argument. 577ebfedea0SLionel Sambuc$! 578ebfedea0SLionel Sambuc$ IF (P1.EQS."LIBRARY").OR.(P1.EQS."SSL_TASK") 579ebfedea0SLionel Sambuc$ THEN 580ebfedea0SLionel Sambuc$! 581ebfedea0SLionel Sambuc$! A Valid Argument. 582ebfedea0SLionel Sambuc$! 583ebfedea0SLionel Sambuc$ BUILDALL = P1 584ebfedea0SLionel Sambuc$! 585ebfedea0SLionel Sambuc$! Else... 586ebfedea0SLionel Sambuc$! 587ebfedea0SLionel Sambuc$ ELSE 588ebfedea0SLionel Sambuc$! 589ebfedea0SLionel Sambuc$! Tell The User We Don't Know What They Want. 590ebfedea0SLionel Sambuc$! 591ebfedea0SLionel Sambuc$ WRITE SYS$OUTPUT "" 592ebfedea0SLionel Sambuc$ WRITE SYS$OUTPUT "The Option ",P1," Is Invalid. The Valid Options Are:" 593ebfedea0SLionel Sambuc$ WRITE SYS$OUTPUT "" 594ebfedea0SLionel Sambuc$ WRITE SYS$OUTPUT " ALL : Just Build Everything." 595ebfedea0SLionel Sambuc$ WRITE SYS$OUTPUT " LIBRARY : To Compile Just The [.xxx.EXE.SSL]LIBSSL.OLB Library." 596ebfedea0SLionel Sambuc$ WRITE SYS$OUTPUT " SSL_TASK : To Compile Just The [.xxx.EXE.SSL]SSL_TASK.EXE Program." 597ebfedea0SLionel Sambuc$ WRITE SYS$OUTPUT "" 598ebfedea0SLionel Sambuc$ WRITE SYS$OUTPUT " Where 'xxx' Stands For:" 599ebfedea0SLionel Sambuc$ WRITE SYS$OUTPUT "" 600ebfedea0SLionel Sambuc$ WRITE SYS$OUTPUT " ALPHA[64]: Alpha Architecture." 601ebfedea0SLionel Sambuc$ WRITE SYS$OUTPUT " IA64[64] : IA64 Architecture." 602ebfedea0SLionel Sambuc$ WRITE SYS$OUTPUT " VAX : VAX Architecture." 603ebfedea0SLionel Sambuc$ WRITE SYS$OUTPUT "" 604ebfedea0SLionel Sambuc$! 605ebfedea0SLionel Sambuc$! Time To EXIT. 606ebfedea0SLionel Sambuc$! 607ebfedea0SLionel Sambuc$ EXIT 608ebfedea0SLionel Sambuc$! 609ebfedea0SLionel Sambuc$! End The Valid Argument Check. 610ebfedea0SLionel Sambuc$! 611ebfedea0SLionel Sambuc$ ENDIF 612ebfedea0SLionel Sambuc$! 613ebfedea0SLionel Sambuc$! End The P1 Check. 614ebfedea0SLionel Sambuc$! 615ebfedea0SLionel Sambuc$ ENDIF 616ebfedea0SLionel Sambuc$! 617ebfedea0SLionel Sambuc$! Check To See If P2 Is Blank. 618ebfedea0SLionel Sambuc$! 619ebfedea0SLionel Sambuc$ IF (P2.EQS."NODEBUG") 620ebfedea0SLionel Sambuc$ THEN 621ebfedea0SLionel Sambuc$! 622ebfedea0SLionel Sambuc$! P2 Is NODEBUG, So Compile Without Debugger Information. 623ebfedea0SLionel Sambuc$! 624ebfedea0SLionel Sambuc$ DEBUGGER = "NODEBUG" 625ebfedea0SLionel Sambuc$ LINKMAP = "NOMAP" 626ebfedea0SLionel Sambuc$ TRACEBACK = "NOTRACEBACK" 627ebfedea0SLionel Sambuc$ GCC_OPTIMIZE = "OPTIMIZE" 628ebfedea0SLionel Sambuc$ CC_OPTIMIZE = "OPTIMIZE" 629ebfedea0SLionel Sambuc$ WRITE SYS$OUTPUT "No Debugger Information Will Be Produced During Compile." 630ebfedea0SLionel Sambuc$ WRITE SYS$OUTPUT "Compiling With Compiler Optimization." 631ebfedea0SLionel Sambuc$! 632ebfedea0SLionel Sambuc$! Else... 633ebfedea0SLionel Sambuc$! 634ebfedea0SLionel Sambuc$ ELSE 635ebfedea0SLionel Sambuc$! 636ebfedea0SLionel Sambuc$! Check To See If We Are To Compile With Debugger Information. 637ebfedea0SLionel Sambuc$! 638ebfedea0SLionel Sambuc$ IF (P2.EQS."DEBUG") 639ebfedea0SLionel Sambuc$ THEN 640ebfedea0SLionel Sambuc$! 641ebfedea0SLionel Sambuc$! Compile With Debugger Information. 642ebfedea0SLionel Sambuc$! 643ebfedea0SLionel Sambuc$ DEBUGGER = "DEBUG" 644ebfedea0SLionel Sambuc$ LINKMAP = "MAP" 645ebfedea0SLionel Sambuc$ TRACEBACK = "TRACEBACK" 646ebfedea0SLionel Sambuc$ GCC_OPTIMIZE = "NOOPTIMIZE" 647ebfedea0SLionel Sambuc$ CC_OPTIMIZE = "NOOPTIMIZE" 648ebfedea0SLionel Sambuc$ WRITE SYS$OUTPUT "Debugger Information Will Be Produced During Compile." 649ebfedea0SLionel Sambuc$ WRITE SYS$OUTPUT "Compiling Without Compiler Optimization." 650ebfedea0SLionel Sambuc$ ELSE 651ebfedea0SLionel Sambuc$! 652ebfedea0SLionel Sambuc$! Tell The User Entered An Invalid Option. 653ebfedea0SLionel Sambuc$! 654ebfedea0SLionel Sambuc$ WRITE SYS$OUTPUT "" 655ebfedea0SLionel Sambuc$ WRITE SYS$OUTPUT "The Option ",P2," Is Invalid. The Valid Options Are:" 656ebfedea0SLionel Sambuc$ WRITE SYS$OUTPUT "" 657ebfedea0SLionel Sambuc$ WRITE SYS$OUTPUT " DEBUG : Compile With The Debugger Information." 658ebfedea0SLionel Sambuc$ WRITE SYS$OUTPUT " NODEBUG : Compile Without The Debugger Information." 659ebfedea0SLionel Sambuc$ WRITE SYS$OUTPUT "" 660ebfedea0SLionel Sambuc$! 661ebfedea0SLionel Sambuc$! Time To EXIT. 662ebfedea0SLionel Sambuc$! 663ebfedea0SLionel Sambuc$ EXIT 664ebfedea0SLionel Sambuc$! 665ebfedea0SLionel Sambuc$! End The Valid Argument Check. 666ebfedea0SLionel Sambuc$! 667ebfedea0SLionel Sambuc$ ENDIF 668ebfedea0SLionel Sambuc$! 669ebfedea0SLionel Sambuc$! End The P2 Check. 670ebfedea0SLionel Sambuc$! 671ebfedea0SLionel Sambuc$ ENDIF 672ebfedea0SLionel Sambuc$! 673ebfedea0SLionel Sambuc$! Special Threads For OpenVMS v7.1 Or Later 674ebfedea0SLionel Sambuc$! 675ebfedea0SLionel Sambuc$! Written By: Richard Levitte 676ebfedea0SLionel Sambuc$! richard@levitte.org 677ebfedea0SLionel Sambuc$! 678ebfedea0SLionel Sambuc$! 679ebfedea0SLionel Sambuc$! Check To See If We Have A Option For P5. 680ebfedea0SLionel Sambuc$! 681ebfedea0SLionel Sambuc$ IF (P5.EQS."") 682ebfedea0SLionel Sambuc$ THEN 683ebfedea0SLionel Sambuc$! 684ebfedea0SLionel Sambuc$! Get The Version Of VMS We Are Using. 685ebfedea0SLionel Sambuc$! 686ebfedea0SLionel Sambuc$ ISSEVEN := 687ebfedea0SLionel Sambuc$ TMP = F$ELEMENT(0,"-",F$EXTRACT(1,4,F$GETSYI("VERSION"))) 688ebfedea0SLionel Sambuc$ TMP = F$INTEGER(F$ELEMENT(0,".",TMP)+F$ELEMENT(1,".",TMP)) 689ebfedea0SLionel Sambuc$! 690ebfedea0SLionel Sambuc$! Check To See If The VMS Version Is v7.1 Or Later. 691ebfedea0SLionel Sambuc$! 692ebfedea0SLionel Sambuc$ IF (TMP.GE.71) 693ebfedea0SLionel Sambuc$ THEN 694ebfedea0SLionel Sambuc$! 695ebfedea0SLionel Sambuc$! We Have OpenVMS v7.1 Or Later, So Use The Special Threads. 696ebfedea0SLionel Sambuc$! 697ebfedea0SLionel Sambuc$ ISSEVEN := ,PTHREAD_USE_D4 698ebfedea0SLionel Sambuc$! 699ebfedea0SLionel Sambuc$! End The VMS Version Check. 700ebfedea0SLionel Sambuc$! 701ebfedea0SLionel Sambuc$ ENDIF 702ebfedea0SLionel Sambuc$! 703ebfedea0SLionel Sambuc$! End The P5 Check. 704ebfedea0SLionel Sambuc$! 705ebfedea0SLionel Sambuc$ ENDIF 706ebfedea0SLionel Sambuc$! 707ebfedea0SLionel Sambuc$! Check P6 (POINTER_SIZE). 708ebfedea0SLionel Sambuc$! 709ebfedea0SLionel Sambuc$ IF (P6 .NES. "") .AND. (ARCH .NES. "VAX") 710ebfedea0SLionel Sambuc$ THEN 711ebfedea0SLionel Sambuc$! 712ebfedea0SLionel Sambuc$ IF (P6 .EQS. "32") 713ebfedea0SLionel Sambuc$ THEN 714ebfedea0SLionel Sambuc$ POINTER_SIZE = " /POINTER_SIZE=32" 715ebfedea0SLionel Sambuc$ ELSE 716ebfedea0SLionel Sambuc$ POINTER_SIZE = F$EDIT( P6, "COLLAPSE, UPCASE") 717ebfedea0SLionel Sambuc$ IF ((POINTER_SIZE .EQS. "64") .OR. - 718ebfedea0SLionel Sambuc (POINTER_SIZE .EQS. "64=") .OR. - 719ebfedea0SLionel Sambuc (POINTER_SIZE .EQS. "64=ARGV")) 720ebfedea0SLionel Sambuc$ THEN 721ebfedea0SLionel Sambuc$ ARCHD = ARCH+ "_64" 722ebfedea0SLionel Sambuc$ LIB32 = "" 723ebfedea0SLionel Sambuc$ POINTER_SIZE = " /POINTER_SIZE=64" 724ebfedea0SLionel Sambuc$ ELSE 725ebfedea0SLionel Sambuc$! 726ebfedea0SLionel Sambuc$! Tell The User Entered An Invalid Option. 727ebfedea0SLionel Sambuc$! 728ebfedea0SLionel Sambuc$ WRITE SYS$OUTPUT "" 729ebfedea0SLionel Sambuc$ WRITE SYS$OUTPUT "The Option ", P6, - 730ebfedea0SLionel Sambuc " Is Invalid. The Valid Options Are:" 731ebfedea0SLionel Sambuc$ WRITE SYS$OUTPUT "" 732ebfedea0SLionel Sambuc$ WRITE SYS$OUTPUT - 733ebfedea0SLionel Sambuc " """" : Compile with default (short) pointers." 734ebfedea0SLionel Sambuc$ WRITE SYS$OUTPUT - 735ebfedea0SLionel Sambuc " 32 : Compile with 32-bit (short) pointers." 736ebfedea0SLionel Sambuc$ WRITE SYS$OUTPUT - 737ebfedea0SLionel Sambuc " 64 : Compile with 64-bit (long) pointers (auto ARGV)." 738ebfedea0SLionel Sambuc$ WRITE SYS$OUTPUT - 739ebfedea0SLionel Sambuc " 64= : Compile with 64-bit (long) pointers (no ARGV)." 740ebfedea0SLionel Sambuc$ WRITE SYS$OUTPUT - 741ebfedea0SLionel Sambuc " 64=ARGV : Compile with 64-bit (long) pointers (ARGV)." 742ebfedea0SLionel Sambuc$ WRITE SYS$OUTPUT "" 743ebfedea0SLionel Sambuc$! 744ebfedea0SLionel Sambuc$! Time To EXIT. 745ebfedea0SLionel Sambuc$! 746ebfedea0SLionel Sambuc$ EXIT 747ebfedea0SLionel Sambuc$! 748ebfedea0SLionel Sambuc$ ENDIF 749ebfedea0SLionel Sambuc$! 750ebfedea0SLionel Sambuc$ ENDIF 751ebfedea0SLionel Sambuc$! 752ebfedea0SLionel Sambuc$! End The P6 (POINTER_SIZE) Check. 753ebfedea0SLionel Sambuc$! 754ebfedea0SLionel Sambuc$ ENDIF 755ebfedea0SLionel Sambuc$! 756ebfedea0SLionel Sambuc$! Set basic C compiler /INCLUDE directories. 757ebfedea0SLionel Sambuc$! 758ebfedea0SLionel Sambuc$ CC_INCLUDES = "SYS$DISK:[-.CRYPTO],SYS$DISK:[-]" 759ebfedea0SLionel Sambuc$! 760ebfedea0SLionel Sambuc$! Check To See If P3 Is Blank. 761ebfedea0SLionel Sambuc$! 762ebfedea0SLionel Sambuc$ IF (P3.EQS."") 763ebfedea0SLionel Sambuc$ THEN 764ebfedea0SLionel Sambuc$! 765ebfedea0SLionel Sambuc$! O.K., The User Didn't Specify A Compiler, Let's Try To 766ebfedea0SLionel Sambuc$! Find Out Which One To Use. 767ebfedea0SLionel Sambuc$! 768ebfedea0SLionel Sambuc$! Check To See If We Have GNU C. 769ebfedea0SLionel Sambuc$! 770ebfedea0SLionel Sambuc$ IF (F$TRNLNM("GNU_CC").NES."") 771ebfedea0SLionel Sambuc$ THEN 772ebfedea0SLionel Sambuc$! 773ebfedea0SLionel Sambuc$! Looks Like GNUC, Set To Use GNUC. 774ebfedea0SLionel Sambuc$! 775ebfedea0SLionel Sambuc$ P3 = "GNUC" 776ebfedea0SLionel Sambuc$! 777ebfedea0SLionel Sambuc$! End The GNU C Compiler Check. 778ebfedea0SLionel Sambuc$! 779ebfedea0SLionel Sambuc$ ELSE 780ebfedea0SLionel Sambuc$! 781ebfedea0SLionel Sambuc$! Check To See If We Have VAXC Or DECC. 782ebfedea0SLionel Sambuc$! 783ebfedea0SLionel Sambuc$ IF (ARCH.NES."VAX").OR.(F$TRNLNM("DECC$CC_DEFAULT").NES."") 784ebfedea0SLionel Sambuc$ THEN 785ebfedea0SLionel Sambuc$! 786ebfedea0SLionel Sambuc$! Looks Like DECC, Set To Use DECC. 787ebfedea0SLionel Sambuc$! 788ebfedea0SLionel Sambuc$ P3 = "DECC" 789ebfedea0SLionel Sambuc$! 790ebfedea0SLionel Sambuc$! Else... 791ebfedea0SLionel Sambuc$! 792ebfedea0SLionel Sambuc$ ELSE 793ebfedea0SLionel Sambuc$! 794ebfedea0SLionel Sambuc$! Looks Like VAXC, Set To Use VAXC. 795ebfedea0SLionel Sambuc$! 796ebfedea0SLionel Sambuc$ P3 = "VAXC" 797ebfedea0SLionel Sambuc$! 798ebfedea0SLionel Sambuc$! End The VAXC Compiler Check. 799ebfedea0SLionel Sambuc$! 800ebfedea0SLionel Sambuc$ ENDIF 801ebfedea0SLionel Sambuc$! 802ebfedea0SLionel Sambuc$! End The DECC & VAXC Compiler Check. 803ebfedea0SLionel Sambuc$! 804ebfedea0SLionel Sambuc$ ENDIF 805ebfedea0SLionel Sambuc$! 806ebfedea0SLionel Sambuc$! End The Compiler Check. 807ebfedea0SLionel Sambuc$! 808ebfedea0SLionel Sambuc$ ENDIF 809ebfedea0SLionel Sambuc$! 810ebfedea0SLionel Sambuc$! Check To See If We Have A Option For P4. 811ebfedea0SLionel Sambuc$! 812ebfedea0SLionel Sambuc$ IF (P4.EQS."") 813ebfedea0SLionel Sambuc$ THEN 814ebfedea0SLionel Sambuc$! 815ebfedea0SLionel Sambuc$! Find out what socket library we have available 816ebfedea0SLionel Sambuc$! 817ebfedea0SLionel Sambuc$ IF F$PARSE("SOCKETSHR:") .NES. "" 818ebfedea0SLionel Sambuc$ THEN 819ebfedea0SLionel Sambuc$! 820ebfedea0SLionel Sambuc$! We have SOCKETSHR, and it is my opinion that it's the best to use. 821ebfedea0SLionel Sambuc$! 822ebfedea0SLionel Sambuc$ P4 = "SOCKETSHR" 823ebfedea0SLionel Sambuc$! 824ebfedea0SLionel Sambuc$! Tell the user 825ebfedea0SLionel Sambuc$! 826ebfedea0SLionel Sambuc$ WRITE SYS$OUTPUT "Using SOCKETSHR for TCP/IP" 827ebfedea0SLionel Sambuc$! 828ebfedea0SLionel Sambuc$! Else, let's look for something else 829ebfedea0SLionel Sambuc$! 830ebfedea0SLionel Sambuc$ ELSE 831ebfedea0SLionel Sambuc$! 832ebfedea0SLionel Sambuc$! Like UCX (the reason to do this before Multinet is that the UCX 833ebfedea0SLionel Sambuc$! emulation is easier to use...) 834ebfedea0SLionel Sambuc$! 835ebfedea0SLionel Sambuc$ IF F$TRNLNM("UCX$IPC_SHR") .NES. "" - 836ebfedea0SLionel Sambuc .OR. F$PARSE("SYS$SHARE:UCX$IPC_SHR.EXE") .NES. "" - 837ebfedea0SLionel Sambuc .OR. F$PARSE("SYS$LIBRARY:UCX$IPC.OLB") .NES. "" 838ebfedea0SLionel Sambuc$ THEN 839ebfedea0SLionel Sambuc$! 840ebfedea0SLionel Sambuc$! Last resort: a UCX or UCX-compatible library 841ebfedea0SLionel Sambuc$! 842ebfedea0SLionel Sambuc$ P4 = "UCX" 843ebfedea0SLionel Sambuc$! 844ebfedea0SLionel Sambuc$! Tell the user 845ebfedea0SLionel Sambuc$! 846ebfedea0SLionel Sambuc$ WRITE SYS$OUTPUT "Using UCX or an emulation thereof for TCP/IP" 847ebfedea0SLionel Sambuc$! 848ebfedea0SLionel Sambuc$! That was all... 849ebfedea0SLionel Sambuc$! 850ebfedea0SLionel Sambuc$ ENDIF 851ebfedea0SLionel Sambuc$ ENDIF 852ebfedea0SLionel Sambuc$ ENDIF 853ebfedea0SLionel Sambuc$! 854ebfedea0SLionel Sambuc$! Set Up Initial CC Definitions, Possibly With User Ones 855ebfedea0SLionel Sambuc$! 856ebfedea0SLionel Sambuc$ CCDEFS = "TCPIP_TYPE_''P4'" 857ebfedea0SLionel Sambuc$ IF F$TYPE(USER_CCDEFS) .NES. "" THEN CCDEFS = CCDEFS + "," + USER_CCDEFS 858ebfedea0SLionel Sambuc$ CCEXTRAFLAGS = "" 859ebfedea0SLionel Sambuc$ IF F$TYPE(USER_CCFLAGS) .NES. "" THEN CCEXTRAFLAGS = USER_CCFLAGS 860*0a6a1f1dSLionel Sambuc$ CCDISABLEWARNINGS = "" !!! "MAYLOSEDATA3" !!! "LONGLONGTYPE,LONGLONGSUFX,FOUNDCR" 861*0a6a1f1dSLionel Sambuc$ IF F$TYPE(USER_CCDISABLEWARNINGS) .NES. "" 862*0a6a1f1dSLionel Sambuc$ THEN 863*0a6a1f1dSLionel Sambuc$ IF CCDISABLEWARNINGS .NES. "" THEN CCDISABLEWARNINGS = CCDISABLEWARNINGS + "," 864*0a6a1f1dSLionel Sambuc$ CCDISABLEWARNINGS = CCDISABLEWARNINGS + USER_CCDISABLEWARNINGS 865*0a6a1f1dSLionel Sambuc$ ENDIF 866ebfedea0SLionel Sambuc$! 867ebfedea0SLionel Sambuc$! Check To See If We Have A ZLIB Option. 868ebfedea0SLionel Sambuc$! 869ebfedea0SLionel Sambuc$ ZLIB = P7 870ebfedea0SLionel Sambuc$ IF (ZLIB .NES. "") 871ebfedea0SLionel Sambuc$ THEN 872ebfedea0SLionel Sambuc$! 873ebfedea0SLionel Sambuc$! Check for expected ZLIB files. 874ebfedea0SLionel Sambuc$! 875ebfedea0SLionel Sambuc$ err = 0 876ebfedea0SLionel Sambuc$ file1 = f$parse( "zlib.h", ZLIB, , , "SYNTAX_ONLY") 877ebfedea0SLionel Sambuc$ if (f$search( file1) .eqs. "") 878ebfedea0SLionel Sambuc$ then 879ebfedea0SLionel Sambuc$ WRITE SYS$OUTPUT "" 880ebfedea0SLionel Sambuc$ WRITE SYS$OUTPUT "The Option ", ZLIB, " Is Invalid." 881ebfedea0SLionel Sambuc$ WRITE SYS$OUTPUT " Can't find header: ''file1'" 882ebfedea0SLionel Sambuc$ err = 1 883ebfedea0SLionel Sambuc$ endif 884ebfedea0SLionel Sambuc$ file1 = f$parse( "A.;", ZLIB)- "A.;" 885ebfedea0SLionel Sambuc$! 886ebfedea0SLionel Sambuc$ file2 = f$parse( ZLIB, "libz.olb", , , "SYNTAX_ONLY") 887ebfedea0SLionel Sambuc$ if (f$search( file2) .eqs. "") 888ebfedea0SLionel Sambuc$ then 889ebfedea0SLionel Sambuc$ if (err .eq. 0) 890ebfedea0SLionel Sambuc$ then 891ebfedea0SLionel Sambuc$ WRITE SYS$OUTPUT "" 892ebfedea0SLionel Sambuc$ WRITE SYS$OUTPUT "The Option ", ZLIB, " Is Invalid." 893ebfedea0SLionel Sambuc$ endif 894ebfedea0SLionel Sambuc$ WRITE SYS$OUTPUT " Can't find library: ''file2'" 895ebfedea0SLionel Sambuc$ WRITE SYS$OUTPUT "" 896ebfedea0SLionel Sambuc$ err = err+ 2 897ebfedea0SLionel Sambuc$ endif 898ebfedea0SLionel Sambuc$ if (err .eq. 1) 899ebfedea0SLionel Sambuc$ then 900ebfedea0SLionel Sambuc$ WRITE SYS$OUTPUT "" 901ebfedea0SLionel Sambuc$ endif 902ebfedea0SLionel Sambuc$! 903ebfedea0SLionel Sambuc$ if (err .ne. 0) 904ebfedea0SLionel Sambuc$ then 905ebfedea0SLionel Sambuc$ EXIT 906ebfedea0SLionel Sambuc$ endif 907ebfedea0SLionel Sambuc$! 908ebfedea0SLionel Sambuc$ CCDEFS = """ZLIB=1"", "+ CCDEFS 909ebfedea0SLionel Sambuc$ CC_INCLUDES = CC_INCLUDES+ ", "+ file1 910ebfedea0SLionel Sambuc$ ZLIB_LIB = ", ''file2' /library" 911ebfedea0SLionel Sambuc$! 912ebfedea0SLionel Sambuc$! Print info 913ebfedea0SLionel Sambuc$! 914ebfedea0SLionel Sambuc$ WRITE SYS$OUTPUT "ZLIB library spec: ", file2 915ebfedea0SLionel Sambuc$! 916ebfedea0SLionel Sambuc$! End The ZLIB Check. 917ebfedea0SLionel Sambuc$! 918ebfedea0SLionel Sambuc$ ENDIF 919ebfedea0SLionel Sambuc$! 920ebfedea0SLionel Sambuc$! Check To See If The User Entered A Valid Parameter. 921ebfedea0SLionel Sambuc$! 922ebfedea0SLionel Sambuc$ IF (P3.EQS."VAXC").OR.(P3.EQS."DECC").OR.(P3.EQS."GNUC") 923ebfedea0SLionel Sambuc$ THEN 924ebfedea0SLionel Sambuc$! 925ebfedea0SLionel Sambuc$! Check To See If The User Wanted DECC. 926ebfedea0SLionel Sambuc$! 927ebfedea0SLionel Sambuc$ IF (P3.EQS."DECC") 928ebfedea0SLionel Sambuc$ THEN 929ebfedea0SLionel Sambuc$! 930ebfedea0SLionel Sambuc$! Looks Like DECC, Set To Use DECC. 931ebfedea0SLionel Sambuc$! 932ebfedea0SLionel Sambuc$ COMPILER = "DECC" 933ebfedea0SLionel Sambuc$! 934ebfedea0SLionel Sambuc$! Tell The User We Are Using DECC. 935ebfedea0SLionel Sambuc$! 936ebfedea0SLionel Sambuc$ WRITE SYS$OUTPUT "Using DECC 'C' Compiler." 937ebfedea0SLionel Sambuc$! 938ebfedea0SLionel Sambuc$! Use DECC... 939ebfedea0SLionel Sambuc$! 940ebfedea0SLionel Sambuc$ CC = "CC" 941ebfedea0SLionel Sambuc$ IF ARCH.EQS."VAX" .AND. F$TRNLNM("DECC$CC_DEFAULT").NES."/DECC" - 942ebfedea0SLionel Sambuc THEN CC = "CC/DECC" 943ebfedea0SLionel Sambuc$ CC = CC + " /''CC_OPTIMIZE' /''DEBUGGER' /STANDARD=RELAXED"+ - 944ebfedea0SLionel Sambuc "''POINTER_SIZE' /NOLIST /PREFIX=ALL" + - 945ebfedea0SLionel Sambuc " /INCLUDE=(''CC_INCLUDES') " + CCEXTRAFLAGS 946ebfedea0SLionel Sambuc$! 947ebfedea0SLionel Sambuc$! Define The Linker Options File Name. 948ebfedea0SLionel Sambuc$! 949ebfedea0SLionel Sambuc$ OPT_FILE = "VAX_DECC_OPTIONS.OPT" 950ebfedea0SLionel Sambuc$! 951ebfedea0SLionel Sambuc$! End DECC Check. 952ebfedea0SLionel Sambuc$! 953ebfedea0SLionel Sambuc$ ENDIF 954ebfedea0SLionel Sambuc$! 955ebfedea0SLionel Sambuc$! Check To See If We Are To Use VAXC. 956ebfedea0SLionel Sambuc$! 957ebfedea0SLionel Sambuc$ IF (P3.EQS."VAXC") 958ebfedea0SLionel Sambuc$ THEN 959ebfedea0SLionel Sambuc$! 960ebfedea0SLionel Sambuc$! Looks Like VAXC, Set To Use VAXC. 961ebfedea0SLionel Sambuc$! 962ebfedea0SLionel Sambuc$ COMPILER = "VAXC" 963ebfedea0SLionel Sambuc$! 964ebfedea0SLionel Sambuc$! Tell The User We Are Using VAX C. 965ebfedea0SLionel Sambuc$! 966ebfedea0SLionel Sambuc$ WRITE SYS$OUTPUT "Using VAXC 'C' Compiler." 967ebfedea0SLionel Sambuc$! 968ebfedea0SLionel Sambuc$! Compile Using VAXC. 969ebfedea0SLionel Sambuc$! 970ebfedea0SLionel Sambuc$ CC = "CC" 971ebfedea0SLionel Sambuc$ IF ARCH.NES."VAX" 972ebfedea0SLionel Sambuc$ THEN 973ebfedea0SLionel Sambuc$ WRITE SYS$OUTPUT "There is no VAX C on ''ARCH'!" 974ebfedea0SLionel Sambuc$ EXIT 975ebfedea0SLionel Sambuc$ ENDIF 976ebfedea0SLionel Sambuc$ IF F$TRNLNM("DECC$CC_DEFAULT").EQS."/DECC" THEN CC = "CC/VAXC" 977ebfedea0SLionel Sambuc$ CC = CC + "/''CC_OPTIMIZE'/''DEBUGGER'/NOLIST" + - 978ebfedea0SLionel Sambuc "/INCLUDE=(''CC_INCLUDES')" + CCEXTRAFLAGS 979ebfedea0SLionel Sambuc$ CCDEFS = CCDEFS + ",""VAXC""" 980ebfedea0SLionel Sambuc$! 981ebfedea0SLionel Sambuc$! Define <sys> As SYS$COMMON:[SYSLIB] 982ebfedea0SLionel Sambuc$! 983ebfedea0SLionel Sambuc$ DEFINE/NOLOG SYS SYS$COMMON:[SYSLIB] 984ebfedea0SLionel Sambuc$! 985ebfedea0SLionel Sambuc$! Define The Linker Options File Name. 986ebfedea0SLionel Sambuc$! 987ebfedea0SLionel Sambuc$ OPT_FILE = "VAX_VAXC_OPTIONS.OPT" 988ebfedea0SLionel Sambuc$! 989ebfedea0SLionel Sambuc$! End VAXC Check 990ebfedea0SLionel Sambuc$! 991ebfedea0SLionel Sambuc$ ENDIF 992ebfedea0SLionel Sambuc$! 993ebfedea0SLionel Sambuc$! Check To See If We Are To Use GNU C. 994ebfedea0SLionel Sambuc$! 995ebfedea0SLionel Sambuc$ IF (P3.EQS."GNUC") 996ebfedea0SLionel Sambuc$ THEN 997ebfedea0SLionel Sambuc$! 998ebfedea0SLionel Sambuc$! Looks Like GNUC, Set To Use GNUC. 999ebfedea0SLionel Sambuc$! 1000ebfedea0SLionel Sambuc$ COMPILER = "GNUC" 1001ebfedea0SLionel Sambuc$! 1002ebfedea0SLionel Sambuc$! Tell The User We Are Using GNUC. 1003ebfedea0SLionel Sambuc$! 1004ebfedea0SLionel Sambuc$ WRITE SYS$OUTPUT "Using GNU 'C' Compiler." 1005ebfedea0SLionel Sambuc$! 1006ebfedea0SLionel Sambuc$! Use GNU C... 1007ebfedea0SLionel Sambuc$! 1008ebfedea0SLionel Sambuc$ IF F$TYPE(GCC) .EQS. "" THEN GCC := GCC 1009ebfedea0SLionel Sambuc$ CC = GCC+"/NOCASE_HACK/''GCC_OPTIMIZE'/''DEBUGGER'/NOLIST" + - 1010ebfedea0SLionel Sambuc "/INCLUDE=(''CC_INCLUDES')" + CCEXTRAFLAGS 1011ebfedea0SLionel Sambuc$! 1012ebfedea0SLionel Sambuc$! Define The Linker Options File Name. 1013ebfedea0SLionel Sambuc$! 1014ebfedea0SLionel Sambuc$ OPT_FILE = "VAX_GNUC_OPTIONS.OPT" 1015ebfedea0SLionel Sambuc$! 1016ebfedea0SLionel Sambuc$! End The GNU C Check. 1017ebfedea0SLionel Sambuc$! 1018ebfedea0SLionel Sambuc$ ENDIF 1019ebfedea0SLionel Sambuc$! 1020ebfedea0SLionel Sambuc$! Set up default defines 1021ebfedea0SLionel Sambuc$! 1022ebfedea0SLionel Sambuc$ CCDEFS = """FLAT_INC=1""," + CCDEFS 1023ebfedea0SLionel Sambuc$! 1024ebfedea0SLionel Sambuc$! Finish up the definition of CC. 1025ebfedea0SLionel Sambuc$! 1026ebfedea0SLionel Sambuc$ IF COMPILER .EQS. "DECC" 1027ebfedea0SLionel Sambuc$ THEN 1028*0a6a1f1dSLionel Sambuc$! Not all compiler versions support MAYLOSEDATA3. 1029*0a6a1f1dSLionel Sambuc$ OPT_TEST = "MAYLOSEDATA3" 1030*0a6a1f1dSLionel Sambuc$ DEFINE /USER_MODE SYS$ERROR NL: 1031*0a6a1f1dSLionel Sambuc$ DEFINE /USER_MODE SYS$OUTPUT NL: 1032*0a6a1f1dSLionel Sambuc$ 'CC' /NOCROSS_REFERENCE /NOLIST /NOOBJECT - 1033*0a6a1f1dSLionel Sambuc /WARNINGS = DISABLE = ('OPT_TEST', EMPTYFILE) NL: 1034*0a6a1f1dSLionel Sambuc$ IF ($SEVERITY) 1035*0a6a1f1dSLionel Sambuc$ THEN 1036*0a6a1f1dSLionel Sambuc$ IF CCDISABLEWARNINGS .NES. "" THEN - 1037*0a6a1f1dSLionel Sambuc CCDISABLEWARNINGS = CCDISABLEWARNINGS+ "," 1038*0a6a1f1dSLionel Sambuc$ CCDISABLEWARNINGS = CCDISABLEWARNINGS+ OPT_TEST 1039*0a6a1f1dSLionel Sambuc$ ENDIF 1040ebfedea0SLionel Sambuc$ IF CCDISABLEWARNINGS .EQS. "" 1041ebfedea0SLionel Sambuc$ THEN 1042ebfedea0SLionel Sambuc$ CC4DISABLEWARNINGS = "DOLLARID" 1043ebfedea0SLionel Sambuc$ ELSE 1044ebfedea0SLionel Sambuc$ CC4DISABLEWARNINGS = CCDISABLEWARNINGS + ",DOLLARID" 1045ebfedea0SLionel Sambuc$ CCDISABLEWARNINGS = " /WARNING=(DISABLE=(" + CCDISABLEWARNINGS + "))" 1046ebfedea0SLionel Sambuc$ ENDIF 1047ebfedea0SLionel Sambuc$ CC4DISABLEWARNINGS = " /WARNING=(DISABLE=(" + CC4DISABLEWARNINGS + "))" 1048ebfedea0SLionel Sambuc$ ELSE 1049ebfedea0SLionel Sambuc$ CCDISABLEWARNINGS = "" 1050ebfedea0SLionel Sambuc$ CC4DISABLEWARNINGS = "" 1051ebfedea0SLionel Sambuc$ ENDIF 1052ebfedea0SLionel Sambuc$ CC2 = CC + " /DEFINE=(" + CCDEFS + ",_POSIX_C_SOURCE)" + CCDISABLEWARNINGS 1053ebfedea0SLionel Sambuc$ CC3 = CC + " /DEFINE=(" + CCDEFS + ISSEVEN + ")" + CCDISABLEWARNINGS 1054ebfedea0SLionel Sambuc$ CC = CC + " /DEFINE=(" + CCDEFS + ")" + CCDISABLEWARNINGS 1055ebfedea0SLionel Sambuc$ IF COMPILER .EQS. "DECC" 1056ebfedea0SLionel Sambuc$ THEN 1057ebfedea0SLionel Sambuc$ CC4 = CC - CCDISABLEWARNINGS + CC4DISABLEWARNINGS 1058ebfedea0SLionel Sambuc$ CC5 = CC3 - CCDISABLEWARNINGS + CC4DISABLEWARNINGS 1059ebfedea0SLionel Sambuc$ ELSE 1060ebfedea0SLionel Sambuc$ CC4 = CC 1061ebfedea0SLionel Sambuc$ CC5 = CC3 1062ebfedea0SLionel Sambuc$ ENDIF 1063ebfedea0SLionel Sambuc$! 1064ebfedea0SLionel Sambuc$! Show user the result 1065ebfedea0SLionel Sambuc$! 1066ebfedea0SLionel Sambuc$ WRITE/SYMBOL SYS$OUTPUT "Main Compiling Command: ",CC 1067ebfedea0SLionel Sambuc$! 1068ebfedea0SLionel Sambuc$! Else The User Entered An Invalid Argument. 1069ebfedea0SLionel Sambuc$! 1070ebfedea0SLionel Sambuc$ ELSE 1071ebfedea0SLionel Sambuc$! 1072ebfedea0SLionel Sambuc$! Tell The User We Don't Know What They Want. 1073ebfedea0SLionel Sambuc$! 1074ebfedea0SLionel Sambuc$ WRITE SYS$OUTPUT "" 1075ebfedea0SLionel Sambuc$ WRITE SYS$OUTPUT "The Option ",P3," Is Invalid. The Valid Options Are:" 1076ebfedea0SLionel Sambuc$ WRITE SYS$OUTPUT "" 1077ebfedea0SLionel Sambuc$ WRITE SYS$OUTPUT " VAXC : To Compile With VAX C." 1078ebfedea0SLionel Sambuc$ WRITE SYS$OUTPUT " DECC : To Compile With DEC C." 1079ebfedea0SLionel Sambuc$ WRITE SYS$OUTPUT " GNUC : To Compile With GNU C." 1080ebfedea0SLionel Sambuc$ WRITE SYS$OUTPUT "" 1081ebfedea0SLionel Sambuc$! 1082ebfedea0SLionel Sambuc$! Time To EXIT. 1083ebfedea0SLionel Sambuc$! 1084ebfedea0SLionel Sambuc$ EXIT 1085ebfedea0SLionel Sambuc$ ENDIF 1086ebfedea0SLionel Sambuc$! 1087ebfedea0SLionel Sambuc$! Time to check the contents, and to make sure we get the correct library. 1088ebfedea0SLionel Sambuc$! 1089ebfedea0SLionel Sambuc$ IF P4.EQS."SOCKETSHR" .OR. P4.EQS."MULTINET" .OR. P4.EQS."UCX" - 1090ebfedea0SLionel Sambuc .OR. P4.EQS."TCPIP" .OR. P4.EQS."NONE" 1091ebfedea0SLionel Sambuc$ THEN 1092ebfedea0SLionel Sambuc$! 1093ebfedea0SLionel Sambuc$! Check to see if SOCKETSHR was chosen 1094ebfedea0SLionel Sambuc$! 1095ebfedea0SLionel Sambuc$ IF P4.EQS."SOCKETSHR" 1096ebfedea0SLionel Sambuc$ THEN 1097ebfedea0SLionel Sambuc$! 1098ebfedea0SLionel Sambuc$! Set the library to use SOCKETSHR 1099ebfedea0SLionel Sambuc$! 1100ebfedea0SLionel Sambuc$ TCPIP_LIB = ",SYS$DISK:[-.VMS]SOCKETSHR_SHR.OPT /OPTIONS" 1101ebfedea0SLionel Sambuc$! 1102ebfedea0SLionel Sambuc$! Done with SOCKETSHR 1103ebfedea0SLionel Sambuc$! 1104ebfedea0SLionel Sambuc$ ENDIF 1105ebfedea0SLionel Sambuc$! 1106ebfedea0SLionel Sambuc$! Check to see if MULTINET was chosen 1107ebfedea0SLionel Sambuc$! 1108ebfedea0SLionel Sambuc$ IF P4.EQS."MULTINET" 1109ebfedea0SLionel Sambuc$ THEN 1110ebfedea0SLionel Sambuc$! 1111ebfedea0SLionel Sambuc$! Set the library to use UCX emulation. 1112ebfedea0SLionel Sambuc$! 1113ebfedea0SLionel Sambuc$ P4 = "UCX" 1114ebfedea0SLionel Sambuc$! 1115ebfedea0SLionel Sambuc$! Done with MULTINET 1116ebfedea0SLionel Sambuc$! 1117ebfedea0SLionel Sambuc$ ENDIF 1118ebfedea0SLionel Sambuc$! 1119ebfedea0SLionel Sambuc$! Check to see if UCX was chosen 1120ebfedea0SLionel Sambuc$! 1121ebfedea0SLionel Sambuc$ IF P4.EQS."UCX" 1122ebfedea0SLionel Sambuc$ THEN 1123ebfedea0SLionel Sambuc$! 1124ebfedea0SLionel Sambuc$! Set the library to use UCX. 1125ebfedea0SLionel Sambuc$! 1126ebfedea0SLionel Sambuc$ TCPIP_LIB = ",SYS$DISK:[-.VMS]UCX_SHR_DECC.OPT /OPTIONS" 1127ebfedea0SLionel Sambuc$ IF F$TRNLNM("UCX$IPC_SHR") .NES. "" 1128ebfedea0SLionel Sambuc$ THEN 1129ebfedea0SLionel Sambuc$ TCPIP_LIB = ",SYS$DISK:[-.VMS]UCX_SHR_DECC_LOG.OPT /OPTIONS" 1130ebfedea0SLionel Sambuc$ ELSE 1131ebfedea0SLionel Sambuc$ IF COMPILER .NES. "DECC" .AND. ARCH .EQS. "VAX" THEN - 1132ebfedea0SLionel Sambuc TCPIP_LIB = ",SYS$DISK:[-.VMS]UCX_SHR_VAXC.OPT /OPTIONS" 1133ebfedea0SLionel Sambuc$ ENDIF 1134ebfedea0SLionel Sambuc$! 1135ebfedea0SLionel Sambuc$! Done with UCX 1136ebfedea0SLionel Sambuc$! 1137ebfedea0SLionel Sambuc$ ENDIF 1138ebfedea0SLionel Sambuc$! 1139ebfedea0SLionel Sambuc$! Check to see if TCPIP was chosen 1140ebfedea0SLionel Sambuc$! 1141ebfedea0SLionel Sambuc$ IF P4.EQS."TCPIP" 1142ebfedea0SLionel Sambuc$ THEN 1143ebfedea0SLionel Sambuc$! 1144ebfedea0SLionel Sambuc$! Set the library to use TCPIP (post UCX). 1145ebfedea0SLionel Sambuc$! 1146ebfedea0SLionel Sambuc$ TCPIP_LIB = ",SYS$DISK:[-.VMS]TCPIP_SHR_DECC.OPT /OPTIONS" 1147ebfedea0SLionel Sambuc$! 1148ebfedea0SLionel Sambuc$! Done with TCPIP 1149ebfedea0SLionel Sambuc$! 1150ebfedea0SLionel Sambuc$ ENDIF 1151ebfedea0SLionel Sambuc$! 1152ebfedea0SLionel Sambuc$! Check to see if NONE was chosen 1153ebfedea0SLionel Sambuc$! 1154ebfedea0SLionel Sambuc$ IF P4.EQS."NONE" 1155ebfedea0SLionel Sambuc$ THEN 1156ebfedea0SLionel Sambuc$! 1157ebfedea0SLionel Sambuc$! Do not use a TCPIP library. 1158ebfedea0SLionel Sambuc$! 1159ebfedea0SLionel Sambuc$ TCPIP_LIB = "" 1160ebfedea0SLionel Sambuc$! 1161ebfedea0SLionel Sambuc$! Done with NONE 1162ebfedea0SLionel Sambuc$! 1163ebfedea0SLionel Sambuc$ ENDIF 1164ebfedea0SLionel Sambuc$! 1165ebfedea0SLionel Sambuc$! Print info 1166ebfedea0SLionel Sambuc$! 1167ebfedea0SLionel Sambuc$ WRITE SYS$OUTPUT "TCP/IP library spec: ", TCPIP_LIB- "," 1168ebfedea0SLionel Sambuc$! 1169ebfedea0SLionel Sambuc$! Else The User Entered An Invalid Argument. 1170ebfedea0SLionel Sambuc$! 1171ebfedea0SLionel Sambuc$ ELSE 1172ebfedea0SLionel Sambuc$! 1173ebfedea0SLionel Sambuc$! Tell The User We Don't Know What They Want. 1174ebfedea0SLionel Sambuc$! 1175ebfedea0SLionel Sambuc$ WRITE SYS$OUTPUT "" 1176ebfedea0SLionel Sambuc$ WRITE SYS$OUTPUT "The Option ",P4," Is Invalid. The Valid Options Are:" 1177ebfedea0SLionel Sambuc$ WRITE SYS$OUTPUT "" 1178ebfedea0SLionel Sambuc$ WRITE SYS$OUTPUT " SOCKETSHR : To link with SOCKETSHR TCP/IP library." 1179ebfedea0SLionel Sambuc$ WRITE SYS$OUTPUT " UCX : To link with UCX TCP/IP library." 1180ebfedea0SLionel Sambuc$ WRITE SYS$OUTPUT " TCPIP : To link with TCPIP (post UCX) TCP/IP library." 1181ebfedea0SLionel Sambuc$ WRITE SYS$OUTPUT "" 1182ebfedea0SLionel Sambuc$! 1183ebfedea0SLionel Sambuc$! Time To EXIT. 1184ebfedea0SLionel Sambuc$! 1185ebfedea0SLionel Sambuc$ EXIT 1186ebfedea0SLionel Sambuc$! 1187ebfedea0SLionel Sambuc$! Done with TCP/IP libraries 1188ebfedea0SLionel Sambuc$! 1189ebfedea0SLionel Sambuc$ ENDIF 1190ebfedea0SLionel Sambuc$! 1191ebfedea0SLionel Sambuc$! Time To RETURN... 1192ebfedea0SLionel Sambuc$! 1193ebfedea0SLionel Sambuc$ RETURN 1194ebfedea0SLionel Sambuc$! 1195ebfedea0SLionel Sambuc$ INITIALISE: 1196ebfedea0SLionel Sambuc$! 1197ebfedea0SLionel Sambuc$! Save old value of the logical name OPENSSL 1198ebfedea0SLionel Sambuc$! 1199ebfedea0SLionel Sambuc$ __SAVE_OPENSSL = F$TRNLNM("OPENSSL","LNM$PROCESS_TABLE") 1200ebfedea0SLionel Sambuc$! 1201ebfedea0SLionel Sambuc$! Save directory information 1202ebfedea0SLionel Sambuc$! 1203ebfedea0SLionel Sambuc$ __HERE = F$PARSE(F$PARSE("A.;",F$ENVIRONMENT("PROCEDURE"))-"A.;","[]A.;") - "A.;" 1204ebfedea0SLionel Sambuc$ __HERE = F$EDIT(__HERE,"UPCASE") 1205ebfedea0SLionel Sambuc$ __TOP = __HERE - "SSL]" 1206ebfedea0SLionel Sambuc$ __INCLUDE = __TOP + "INCLUDE.OPENSSL]" 1207ebfedea0SLionel Sambuc$! 1208ebfedea0SLionel Sambuc$! Set up the logical name OPENSSL to point at the include directory 1209ebfedea0SLionel Sambuc$! 1210ebfedea0SLionel Sambuc$ DEFINE OPENSSL/NOLOG '__INCLUDE' 1211ebfedea0SLionel Sambuc$! 1212ebfedea0SLionel Sambuc$! Done 1213ebfedea0SLionel Sambuc$! 1214ebfedea0SLionel Sambuc$ RETURN 1215ebfedea0SLionel Sambuc$! 1216ebfedea0SLionel Sambuc$ CLEANUP: 1217ebfedea0SLionel Sambuc$! 1218ebfedea0SLionel Sambuc$! Restore the logical name OPENSSL if it had a value 1219ebfedea0SLionel Sambuc$! 1220ebfedea0SLionel Sambuc$ IF __SAVE_OPENSSL .EQS. "" 1221ebfedea0SLionel Sambuc$ THEN 1222ebfedea0SLionel Sambuc$ DEASSIGN OPENSSL 1223ebfedea0SLionel Sambuc$ ELSE 1224ebfedea0SLionel Sambuc$ DEFINE/NOLOG OPENSSL '__SAVE_OPENSSL' 1225ebfedea0SLionel Sambuc$ ENDIF 1226ebfedea0SLionel Sambuc$! 1227ebfedea0SLionel Sambuc$! Done 1228ebfedea0SLionel Sambuc$! 1229ebfedea0SLionel Sambuc$ RETURN 1230