3 $! Written By: Richard Levitte
6 $! This command file compiles and creates the various engines in form
7 $! of shared images. They are placed in [.xxx.EXE.ENGINES], where "xxx"
8 $! is ALPHA, IA64 or VAX, depending on your hardware.
10 $! P1 if this is ENGINES or ALL, the engines will build, otherwise not.
12 $! P2 DEBUG or NODEBUG to compile with or without debugger information.
16 $! GNUC for GNU C (untested)
18 $! P4 if defined, sets the TCP/IP libraries to use. UCX or TCPIP is
19 $! used by default since most other implementations come with a
20 $! compatibility library. The value must be one of the following:
23 $! SOCKETSHR for SOCKETSHR+NETLIB
24 $! TCPIP for TCPIP (post UCX)
26 $! P5 if defined, tells the compiler not to use special threads.
28 $! P6 if defined, denotes which engines to build. If not defined,
29 $! all available engines are built.
31 $! P7, if defined, specifies the C pointer size. Ignored on VAX.
32 $! ("64=ARGV" gives more efficient code with HP C V7.3 or newer.)
33 $! Supported values are:
35 $! "" Compile with default (/NOPOINTER_SIZE)
36 $! 32 Compile with /POINTER_SIZE=32 (SHORT)
37 $! 64 Compile with /POINTER_SIZE=64[=ARGV] (LONG[=ARGV])
38 $! (Automatically select ARGV if compiler supports it.)
39 $! 64= Compile with /POINTER_SIZE=64 (LONG).
40 $! 64=ARGV Compile with /POINTER_SIZE=64=ARGV (LONG=ARGV).
42 $! P8, if defined, specifies a directory where ZLIB files (zlib.h,
43 $! libz.olb) may be found. Optionally, a non-default object library
44 $! name may be included ("dev:[dir]libz_64.olb", for example).
46 $!-----------------------------------------------------------------------------
50 $ proc = f$environment( "procedure")
51 $ write sys$output "@@@ "+ -
52 f$parse( proc, , , "name")+ f$parse( proc, , , "type")
54 $ on control_c then goto exit
56 $! Set the default TCP/IP library to link against if needed
61 $! Check What Architecture We Are Using.
63 $ IF (F$GETSYI("CPU").LT.128)
66 $! The Architecture Is VAX.
74 $! The Architecture Is Alpha, IA64 or whatever comes in the future.
76 $ ARCH = F$EDIT( F$GETSYI( "ARCH_NAME"), "UPCASE")
77 $ IF (ARCH .EQS. "") THEN ARCH = "UNK"
79 $! End The Architecture Check.
88 $! Set the names of the engines we want to build
89 $! NOTE: Some might think this list ugly. However, it's made this way to
90 $! reflect the LIBNAMES variable in Makefile as closely as possible,
91 $! thereby making it fairly easy to verify that the lists are the same.
92 $! NOTE: gmp isn't built, as it's mostly a test engine and brings in another
93 $! library that isn't necessarely ported to VMS.
96 $ IF ENGINES .EQS. "," THEN -
97 ENGINES = ",4758cca,aep,atalla,cswift,chil,nuron,sureware,ubsec,padlock,"
99 $! GOST requires a 64-bit integer type, unavailable on VAX.
101 $ IF (ARCH .NES. "VAX") THEN -
102 ENGINES = ENGINES+ ",ccgost"
107 $ ACCEPT_PHASE = "ALL,ENGINES"
111 $ OPT_SPECIAL_THREADS = P5
112 $ OPT_POINTER_SIZE = P7
115 $ GOSUB CHECK_OPTIONS
117 $! Set the goal directories, and create them if necessary
119 $ OBJ_DIR := SYS$DISK:[-.'ARCHD'.OBJ.ENGINES]
120 $ EXE_DIR := SYS$DISK:[-.'ARCHD'.EXE.ENGINES]
121 $ IF F$PARSE(OBJ_DIR) .EQS. "" THEN CREATE/DIRECTORY 'OBJ_DIR'
122 $ IF F$PARSE(EXE_DIR) .EQS. "" THEN CREATE/DIRECTORY 'EXE_DIR'
124 $! Set the goal files, and create them if necessary
126 $ CRYPTO_LIB := SYS$DISK:[-.'ARCHD'.EXE.CRYPTO]SSL_LIBCRYPTO'LIB32'.OLB
127 $ IF F$SEARCH(CRYPTO_LIB) .EQS. "" THEN LIBRARY/CREATE/OBJECT 'CRYPTO_LIB'
129 $! Specify the destination directory in any /MAP option.
131 $ if (LINKMAP .eqs. "MAP")
133 $ LINKMAP = LINKMAP+ "=''EXE_DIR'"
136 $! Add the location prefix to the linker options file name.
138 $ if (OPT_FILE .nes. "")
140 $ OPT_FILE = EXE_DIR+ OPT_FILE
146 $ GOSUB CHECK_OPT_FILE
148 $! Define what goes into each engine. VAX includes a transfer vector.
152 $ IF ARCH .EQS. "VAX"
154 $ ENGINE_ = "engine_vector.mar"
155 $ TV_OBJ_NAME = OBJ_DIR + F$PARSE(ENGINE_,,,"NAME","SYNTAX_ONLY") + ".OBJ"
156 $ TV_OBJ = ",''TV_OBJ_NAME'"
158 $ ENGINE_4758CCA = "e_4758cca"
159 $ ENGINE_aep = "e_aep"
160 $ ENGINE_atalla = "e_atalla"
161 $ ENGINE_cswift = "e_cswift"
162 $ ENGINE_chil = "e_chil"
163 $ ENGINE_nuron = "e_nuron"
164 $ ENGINE_sureware = "e_sureware"
165 $ ENGINE_ubsec = "e_ubsec"
166 $ ENGINE_padlock = "e_padlock"
168 $ ENGINE_ccgost_SUBDIR = "ccgost"
169 $ ENGINE_ccgost = "e_gost_err,gost2001_keyx,gost2001,gost89,gost94_keyx,"+ -
170 "gost_ameth,gost_asn1,gost_crypt,gost_ctl,gost_eng,"+ -
171 "gosthash,gost_keywrap,gost_md,gost_params,gost_pmeth,"+ -
174 $! Define which programs need to be linked with a TCP/IP library
176 $ TCPIP_ENGINES = ",,"
177 $ IF COMPILER .EQS. "VAXC" THEN -
180 $! Set up two loops, one that keeps track of the engines,
181 $! and one that keeps track of all the files going into
182 $! the current engine.
184 $! Here's the start of the engine loop.
189 $! Extract the current engine name, and if we've reached the end, stop
191 $ ENGINE_NAME = F$ELEMENT(ENGINE_COUNTER,",",ENGINES)
192 $ IF (ENGINE_NAME.EQS.",") THEN GOTO ENGINE_DONE
194 $ ENGINE_COUNTER = ENGINE_COUNTER + 1
196 $! Set up the engine library names.
198 $ LIB_ENGINE = "ENGINE_" + ENGINE_NAME
200 $! Check if the library module name actually is defined
202 $ IF F$TYPE('LIB_ENGINE') .EQS. ""
205 $ WRITE SYS$ERROR "The module ",ENGINE_NAME," does not exist. Continuing..."
212 $ IF ENGINE_NAME .NES. ""
214 $ WRITE SYS$OUTPUT "Compiling The ",ENGINE_NAME," Library Files. (",BUILDALL,")"
216 $ WRITE SYS$OUTPUT "Compiling Support Files. (",BUILDALL,")"
219 $! Create a .OPT file for the object files (for a real engine name).
221 $ IF ENGINE_NAME .NES. ""
223 $ OPEN /WRITE OBJECTS 'EXE_DIR''ENGINE_NAME'.OPT
226 $! Here's the start of per-engine module loop.
231 $! Extract the file name from the file list, and if we've reached the end, stop
233 $ FILE_NAME = F$ELEMENT(FILE_COUNTER,",",'LIB_ENGINE')
234 $ IF (FILE_NAME.EQS.",") THEN GOTO FILE_DONE
236 $ FILE_COUNTER = FILE_COUNTER + 1
238 $ IF FILE_NAME .EQS. "" THEN GOTO FILE_NEXT
240 $! Set up the source and object reference
242 $ IF F$TYPE('LIB_ENGINE'_SUBDIR) .EQS. ""
244 $ SOURCE_FILE = F$PARSE(FILE_NAME,"SYS$DISK:[].C",,,"SYNTAX_ONLY")
246 $ SOURCE_FILE = F$PARSE(FILE_NAME,"SYS$DISK:[."+'LIB_ENGINE'_SUBDIR+"].C",,,"SYNTAX_ONLY")
248 $ OBJECT_FILE = OBJ_DIR + F$PARSE(FILE_NAME,,,"NAME","SYNTAX_ONLY") + ".OBJ"
250 $! If we get some problem, we just go on trying to build the next module.
251 $ ON WARNING THEN GOTO FILE_NEXT
253 $! Check if the module we want to compile is actually there.
255 $ IF F$SEARCH(SOURCE_FILE) .EQS. ""
257 $ WRITE SYS$OUTPUT ""
258 $ WRITE SYS$OUTPUT "The File ",SOURCE_FILE," Doesn't Exist."
259 $ WRITE SYS$OUTPUT ""
265 $ WRITE SYS$OUTPUT " ",FILE_NAME,""
267 $! Do the dirty work.
269 $ ON ERROR THEN GOTO FILE_NEXT
270 $ IF F$EDIT(F$PARSE(SOURCE_FILE,,,"TYPE","SYNTAX_ONLY"),"UPCASE") .EQS. ".MAR"
272 $ MACRO/OBJECT='OBJECT_FILE' 'SOURCE_FILE'
274 $ CC/OBJECT='OBJECT_FILE' 'SOURCE_FILE'
277 $! Write the entry to the .OPT file (for a real engine name).
279 $ IF ENGINE_NAME .NES. ""
281 $ WRITE OBJECTS OBJECT_FILE
290 $! Do not link the support files.
292 $ IF ENGINE_NAME .EQS. "" THEN GOTO ENGINE_NEXT
294 $! Close the linker options file (for a real engine name).
298 $! Now, there are two ways to handle this. We can either build
299 $! shareable images or stick the engine object file into libcrypto.
300 $! For now, the latter is NOT supported.
302 $!!!!! LIBRARY/REPLACE 'CRYPTO_LIB' 'OBJECT_FILE'
304 $! For shareable libraries, we need to do things a little differently
305 $! depending on if we link with a TCP/IP library or not.
307 $ ENGINE_OPT := SYS$DISK:[]'ARCH'.OPT
308 $ LINK /'DEBUGGER' /'LINKMAP' /'TRACEBACK' /SHARE='EXE_DIR''ENGINE_NAME'.EXE -
309 'EXE_DIR''ENGINE_NAME'.OPT /OPTIONS -
311 'CRYPTO_LIB' /LIBRARY, -
312 'ENGINE_OPT' /OPTIONS -
325 $ WRITE SYS$OUTPUT "All Done..."
330 $! Check For The Link Option FIle.
334 $! Check To See If We Need To Make A VAX C Option File.
336 $ IF (COMPILER.EQS."VAXC")
339 $! Check To See If We Already Have A VAX C Linker Option File.
341 $ IF (F$SEARCH(OPT_FILE).EQS."")
344 $! We Need A VAX C Linker Option File.
349 ! Default System Options File To Link Against
350 ! The Sharable VAX C Runtime Library.
352 SYS$SHARE:VAXCRTL.EXE/SHARE
355 $! End The Option File Check.
359 $! End The VAXC Check.
363 $! Check To See If We Need A GNU C Option File.
365 $ IF (COMPILER.EQS."GNUC")
368 $! Check To See If We Already Have A GNU C Linker Option File.
370 $ IF (F$SEARCH(OPT_FILE).EQS."")
373 $! We Need A GNU C Linker Option File.
378 ! Default System Options File To Link Against
379 ! The Sharable C Runtime Library.
381 GNU_CC:[000000]GCCLIB/LIBRARY
382 SYS$SHARE:VAXCRTL/SHARE
385 $! End The Option File Check.
389 $! End The GNU C Check.
393 $! Check To See If We Need A DEC C Option File.
395 $ IF (COMPILER.EQS."DECC")
398 $! Check To See If We Already Have A DEC C Linker Option File.
400 $ IF (F$SEARCH(OPT_FILE).EQS."")
403 $! Figure Out If We Need A non-VAX Or A VAX Linker Option File.
405 $ IF ARCH .EQS. "VAX"
408 $! We Need A DEC C Linker Option File For VAX.
413 ! Default System Options File To Link Against
414 ! The Sharable DEC C Runtime Library.
416 SYS$SHARE:DECC$SHR.EXE/SHARE
423 $! Create The non-VAX Linker Option File.
428 ! Default System Options File For non-VAX To Link Against
429 ! The Sharable C Runtime Library.
431 SYS$SHARE:CMA$OPEN_LIB_SHR/SHARE
432 SYS$SHARE:CMA$OPEN_RTL/SHARE
435 $! End The DEC C Option File Check.
439 $! End The Option File Search.
443 $! End The DEC C Check.
447 $! Tell The User What Linker Option File We Are Using.
449 $ WRITE SYS$OUTPUT "Using Linker Option File ",OPT_FILE,"."
455 $! Check The User's Options.
459 $! Check To See If OPT_PHASE Is Blank.
461 $ IF (OPT_PHASE.EQS."ALL")
464 $! OPT_PHASE Is Blank, So Build Everything.
472 $! Else, Check To See If OPT_PHASE Has A Valid Argument.
474 $ IF ("," + ACCEPT_PHASE + ",") - ("," + OPT_PHASE + ",") -
475 .NES. ("," + ACCEPT_PHASE + ",")
480 $ BUILDALL = OPT_PHASE
486 $! Tell The User We Don't Know What They Want.
488 $ WRITE SYS$OUTPUT ""
489 $ WRITE SYS$OUTPUT "The option ",OPT_PHASE," is invalid. The valid options are:"
490 $ WRITE SYS$OUTPUT ""
491 $ IF ("," + ACCEPT_PHASE + ",") - ",ALL," -
492 .NES. ("," + ACCEPT_PHASE + ",") THEN -
493 WRITE SYS$OUTPUT " ALL : just build everything."
494 $ IF ("," + ACCEPT_PHASE + ",") - ",ENGINES," -
495 .NES. ("," + ACCEPT_PHASE + ",") THEN -
496 WRITE SYS$OUTPUT " ENGINES : to compile just the [.xxx.EXE.ENGINES]*.EXE hareable images."
497 $ WRITE SYS$OUTPUT ""
498 $ WRITE SYS$OUTPUT " where 'xxx' stands for:"
499 $ WRITE SYS$OUTPUT ""
500 $ WRITE SYS$OUTPUT " ALPHA[64]: Alpha architecture."
501 $ WRITE SYS$OUTPUT " IA64[64] : IA64 architecture."
502 $ WRITE SYS$OUTPUT " VAX : VAX architecture."
503 $ WRITE SYS$OUTPUT ""
509 $! End The Valid Argument Check.
513 $! End The OPT_PHASE Check.
517 $! Check To See If OPT_DEBUG Is Blank.
519 $ IF (OPT_DEBUG.EQS."NODEBUG")
522 $! OPT_DEBUG Is NODEBUG, So Compile Without The Debugger Information.
524 $ DEBUGGER = "NODEBUG"
526 $ TRACEBACK = "NOTRACEBACK"
527 $ GCC_OPTIMIZE = "OPTIMIZE"
528 $ CC_OPTIMIZE = "OPTIMIZE"
529 $ MACRO_OPTIMIZE = "OPTIMIZE"
530 $ WRITE SYS$OUTPUT "No Debugger Information Will Be Produced During Compile."
531 $ WRITE SYS$OUTPUT "Compiling With Compiler Optimization."
534 $! Check To See If We Are To Compile With Debugger Information.
536 $ IF (OPT_DEBUG.EQS."DEBUG")
539 $! Compile With Debugger Information.
543 $ TRACEBACK = "TRACEBACK"
544 $ GCC_OPTIMIZE = "NOOPTIMIZE"
545 $ CC_OPTIMIZE = "NOOPTIMIZE"
546 $ MACRO_OPTIMIZE = "NOOPTIMIZE"
547 $ WRITE SYS$OUTPUT "Debugger Information Will Be Produced During Compile."
548 $ WRITE SYS$OUTPUT "Compiling Without Compiler Optimization."
551 $! They Entered An Invalid Option.
553 $ WRITE SYS$OUTPUT ""
554 $ WRITE SYS$OUTPUT "The Option ",OPT_DEBUG," Is Invalid. The Valid Options Are:"
555 $ WRITE SYS$OUTPUT ""
556 $ WRITE SYS$OUTPUT " DEBUG : Compile With The Debugger Information."
557 $ WRITE SYS$OUTPUT " NODEBUG : Compile Without The Debugger Information."
558 $ WRITE SYS$OUTPUT ""
564 $! End The Valid Argument Check.
568 $! End The OPT_DEBUG Check.
572 $! Special Threads For OpenVMS v7.1 Or Later
574 $! Written By: Richard Levitte
575 $! richard@levitte.org
578 $! Check To See If We Have A Option For OPT_SPECIAL_THREADS.
580 $ IF (OPT_SPECIAL_THREADS.EQS."")
583 $! Get The Version Of VMS We Are Using.
586 $ TMP = F$ELEMENT(0,"-",F$EXTRACT(1,4,F$GETSYI("VERSION")))
587 $ TMP = F$INTEGER(F$ELEMENT(0,".",TMP)+F$ELEMENT(1,".",TMP))
589 $! Check To See If The VMS Version Is v7.1 Or Later.
594 $! We Have OpenVMS v7.1 Or Later, So Use The Special Threads.
596 $ ISSEVEN := ,PTHREAD_USE_D4
598 $! End The VMS Version Check.
602 $! End The OPT_SPECIAL_THREADS Check.
606 $! Check OPT_POINTER_SIZE (P7).
608 $ IF (OPT_POINTER_SIZE .NES. "") .AND. (ARCH .NES. "VAX")
611 $ IF (OPT_POINTER_SIZE .EQS. "32")
613 $ POINTER_SIZE = " /POINTER_SIZE=32"
615 $ POINTER_SIZE = F$EDIT( OPT_POINTER_SIZE, "COLLAPSE, UPCASE")
616 $ IF ((POINTER_SIZE .EQS. "64") .OR. -
617 (POINTER_SIZE .EQS. "64=") .OR. -
618 (POINTER_SIZE .EQS. "64=ARGV"))
620 $ ARCHD = ARCH+ "_64"
622 $ POINTER_SIZE = " /POINTER_SIZE=64"
625 $! Tell The User Entered An Invalid Option.
627 $ WRITE SYS$OUTPUT ""
628 $ WRITE SYS$OUTPUT "The Option ", OPT_POINTER_SIZE, -
629 " Is Invalid. The Valid Options Are:"
630 $ WRITE SYS$OUTPUT ""
632 " """" : Compile with default (short) pointers."
634 " 32 : Compile with 32-bit (short) pointers."
636 " 64 : Compile with 64-bit (long) pointers (auto ARGV)."
638 " 64= : Compile with 64-bit (long) pointers (no ARGV)."
640 " 64=ARGV : Compile with 64-bit (long) pointers (ARGV)."
641 $ WRITE SYS$OUTPUT ""
651 $! End The OPT_POINTER_SIZE Check.
655 $! Set basic C compiler /INCLUDE directories.
657 $ CC_INCLUDES = "SYS$DISK:[],SYS$DISK:[.VENDOR_DEFNS]"
659 $! Check To See If OPT_COMPILER Is Blank.
661 $ IF (OPT_COMPILER.EQS."")
664 $! O.K., The User Didn't Specify A Compiler, Let's Try To
665 $! Find Out Which One To Use.
667 $! Check To See If We Have GNU C.
669 $ IF (F$TRNLNM("GNU_CC").NES."")
672 $! Looks Like GNUC, Set To Use GNUC.
674 $ OPT_COMPILER = "GNUC"
680 $! Check To See If We Have VAXC Or DECC.
682 $ IF (ARCH.NES."VAX").OR.(F$TRNLNM("DECC$CC_DEFAULT").NES."")
685 $! Looks Like DECC, Set To Use DECC.
687 $ OPT_COMPILER = "DECC"
693 $! Looks Like VAXC, Set To Use VAXC.
695 $ OPT_COMPILER = "VAXC"
697 $! End The VAXC Compiler Check.
701 $! End The DECC & VAXC Compiler Check.
705 $! End The Compiler Check.
709 $! Check To See If We Have A Option For OPT_TCPIP_LIB.
711 $ IF (OPT_TCPIP_LIB.EQS."")
714 $! Find out what socket library we have available
716 $ IF F$PARSE("SOCKETSHR:") .NES. ""
719 $! We have SOCKETSHR, and it is my opinion that it's the best to use.
721 $ OPT_TCPIP_LIB = "SOCKETSHR"
725 $ WRITE SYS$OUTPUT "Using SOCKETSHR for TCP/IP"
727 $! Else, let's look for something else
731 $! Like UCX (the reason to do this before Multinet is that the UCX
732 $! emulation is easier to use...)
734 $ IF F$TRNLNM("UCX$IPC_SHR") .NES. "" -
735 .OR. F$PARSE("SYS$SHARE:UCX$IPC_SHR.EXE") .NES. "" -
736 .OR. F$PARSE("SYS$LIBRARY:UCX$IPC.OLB") .NES. ""
739 $! Last resort: a UCX or UCX-compatible library
741 $ OPT_TCPIP_LIB = "UCX"
745 $ WRITE SYS$OUTPUT "Using UCX or an emulation thereof for TCP/IP"
753 $! Set Up Initial CC Definitions, Possibly With User Ones
755 $ CCDEFS = "TCPIP_TYPE_''OPT_TCPIP_LIB',DSO_VMS"
756 $ IF F$TYPE(USER_CCDEFS) .NES. "" THEN CCDEFS = CCDEFS + "," + USER_CCDEFS
758 $ IF F$TYPE(USER_CCFLAGS) .NES. "" THEN CCEXTRAFLAGS = USER_CCFLAGS
759 $ CCDISABLEWARNINGS = "" !!! "LONGLONGTYPE,LONGLONGSUFX"
760 $ IF F$TYPE(USER_CCDISABLEWARNINGS) .NES. "" THEN -
761 CCDISABLEWARNINGS = CCDISABLEWARNINGS + "," + USER_CCDISABLEWARNINGS
763 $! Check To See If We Have A ZLIB Option.
768 $! Check for expected ZLIB files.
771 $ file1 = f$parse( "zlib.h", ZLIB, , , "SYNTAX_ONLY")
772 $ if (f$search( file1) .eqs. "")
774 $ WRITE SYS$OUTPUT ""
775 $ WRITE SYS$OUTPUT "The Option ", ZLIB, " Is Invalid."
776 $ WRITE SYS$OUTPUT " Can't find header: ''file1'"
779 $ file1 = f$parse( "A.;", ZLIB)- "A.;"
781 $ file2 = f$parse( ZLIB, "libz.olb", , , "SYNTAX_ONLY")
782 $ if (f$search( file2) .eqs. "")
786 $ WRITE SYS$OUTPUT ""
787 $ WRITE SYS$OUTPUT "The Option ", ZLIB, " Is Invalid."
789 $ WRITE SYS$OUTPUT " Can't find library: ''file2'"
790 $ WRITE SYS$OUTPUT ""
795 $ WRITE SYS$OUTPUT ""
803 $ CCDEFS = """ZLIB=1"", "+ CCDEFS
804 $ CC_INCLUDES = CC_INCLUDES+ ", "+ file1
805 $ ZLIB_LIB = ", ''file2' /library"
809 $ WRITE SYS$OUTPUT "ZLIB library spec: ", file2
811 $! End The ZLIB Check.
815 $! Check To See If The User Entered A Valid Parameter.
817 $ IF (OPT_COMPILER.EQS."VAXC").OR.(OPT_COMPILER.EQS."DECC").OR.(OPT_COMPILER.EQS."GNUC")
820 $! Check To See If The User Wanted DECC.
822 $ IF (OPT_COMPILER.EQS."DECC")
825 $! Looks Like DECC, Set To Use DECC.
829 $! Tell The User We Are Using DECC.
831 $ WRITE SYS$OUTPUT "Using DECC 'C' Compiler."
836 $ IF ARCH.EQS."VAX" .AND. F$TRNLNM("DECC$CC_DEFAULT").NES."/DECC" -
838 $ CC = CC + " /''CC_OPTIMIZE' /''DEBUGGER' /STANDARD=RELAXED"+ -
839 "''POINTER_SIZE' /NOLIST /PREFIX=ALL" + -
840 " /INCLUDE=(''CC_INCLUDES') " + -
843 $! Define The Linker Options File Name.
845 $ OPT_FILE = "VAX_DECC_OPTIONS.OPT"
851 $! Check To See If We Are To Use VAXC.
853 $ IF (OPT_COMPILER.EQS."VAXC")
856 $! Looks Like VAXC, Set To Use VAXC.
860 $! Tell The User We Are Using VAX C.
862 $ WRITE SYS$OUTPUT "Using VAXC 'C' Compiler."
864 $! Compile Using VAXC.
869 $ WRITE SYS$OUTPUT "There is no VAX C on Alpha!"
872 $ IF F$TRNLNM("DECC$CC_DEFAULT").EQS."/DECC" THEN CC = "CC/VAXC"
873 $ CC = CC + "/''CC_OPTIMIZE'/''DEBUGGER'/NOLIST" + -
874 "/INCLUDE=(''CC_INCLUDES')" + -
876 $ CCDEFS = """VAXC""," + CCDEFS
878 $! Define <sys> As SYS$COMMON:[SYSLIB]
880 $ DEFINE/NOLOG SYS SYS$COMMON:[SYSLIB]
882 $! Define The Linker Options File Name.
884 $ OPT_FILE = "VAX_VAXC_OPTIONS.OPT"
890 $! Check To See If We Are To Use GNU C.
892 $ IF (OPT_COMPILER.EQS."GNUC")
895 $! Looks Like GNUC, Set To Use GNUC.
899 $! Tell The User We Are Using GNUC.
901 $ WRITE SYS$OUTPUT "Using GNU 'C' Compiler."
905 $ CC = "GCC/NOCASE_HACK/''GCC_OPTIMIZE'/''DEBUGGER'/NOLIST" + -
906 "/INCLUDE=(''CC_INCLUDES')" + -
909 $! Define The Linker Options File Name.
911 $ OPT_FILE = "VAX_GNUC_OPTIONS.OPT"
913 $! End The GNU C Check.
917 $! Set up default defines
919 $ CCDEFS = """FLAT_INC=1""," + CCDEFS
921 $! Finish up the definition of CC.
923 $ IF COMPILER .EQS. "DECC"
925 $ IF CCDISABLEWARNINGS .NES. ""
927 $ CCDISABLEWARNINGS = " /WARNING=(DISABLE=(" + CCDISABLEWARNINGS + "))"
930 $ CCDISABLEWARNINGS = ""
932 $ CC = CC + " /DEFINE=(" + CCDEFS + ")" + CCDISABLEWARNINGS
934 $! Show user the result
936 $ WRITE/SYMBOL SYS$OUTPUT "Main C Compiling Command: ",CC
938 $! Else The User Entered An Invalid Argument.
942 $! Tell The User We Don't Know What They Want.
944 $ WRITE SYS$OUTPUT ""
945 $ WRITE SYS$OUTPUT "The Option ",OPT_COMPILER," Is Invalid. The Valid Options Are:"
946 $ WRITE SYS$OUTPUT ""
947 $ WRITE SYS$OUTPUT " VAXC : To Compile With VAX C."
948 $ WRITE SYS$OUTPUT " DECC : To Compile With DEC C."
949 $ WRITE SYS$OUTPUT " GNUC : To Compile With GNU C."
950 $ WRITE SYS$OUTPUT ""
956 $! End The Valid Argument Check.
960 $! Build a MACRO command for the architecture at hand
962 $ IF ARCH .EQS. "VAX"
964 $ MACRO = "MACRO/''DEBUGGER'"
966 $ MACRO = "MACRO/MIGRATION/''DEBUGGER'/''MACRO_OPTIMIZE'"
969 $! Show user the result
971 $ WRITE/SYMBOL SYS$OUTPUT "Main MACRO Compiling Command: ",MACRO
973 $! Time to check the contents, and to make sure we get the correct library.
975 $ IF OPT_TCPIP_LIB.EQS."SOCKETSHR" .OR. OPT_TCPIP_LIB.EQS."MULTINET" -
976 .OR. OPT_TCPIP_LIB.EQS."UCX" .OR. OPT_TCPIP_LIB.EQS."TCPIP" -
977 .OR. OPT_TCPIP_LIB.EQS."NONE"
980 $! Check to see if SOCKETSHR was chosen
982 $ IF OPT_TCPIP_LIB.EQS."SOCKETSHR"
985 $! Set the library to use SOCKETSHR
987 $ TCPIP_LIB = ",SYS$DISK:[-.VMS]SOCKETSHR_SHR.OPT /OPTIONS"
989 $! Done with SOCKETSHR
993 $! Check to see if MULTINET was chosen
995 $ IF OPT_TCPIP_LIB.EQS."MULTINET"
998 $! Set the library to use UCX emulation.
1000 $ OPT_TCPIP_LIB = "UCX"
1002 $! Done with MULTINET
1006 $! Check to see if UCX was chosen
1008 $ IF OPT_TCPIP_LIB.EQS."UCX"
1011 $! Set the library to use UCX.
1013 $ TCPIP_LIB = "SYS$DISK:[-.VMS]UCX_SHR_DECC.OPT /OPTIONS"
1014 $ IF F$TRNLNM("UCX$IPC_SHR") .NES. ""
1016 $ TCPIP_LIB = ",SYS$DISK:[-.VMS]UCX_SHR_DECC_LOG.OPT /OPTIONS"
1018 $ IF COMPILER .NES. "DECC" .AND. ARCH .EQS. "VAX" THEN -
1019 TCPIP_LIB = ",SYS$DISK:[-.VMS]UCX_SHR_VAXC.OPT /OPTIONS"
1026 $! Check to see if TCPIP was chosen
1028 $ IF OPT_TCPIP_LIB.EQS."TCPIP"
1031 $! Set the library to use TCPIP (post UCX).
1033 $ TCPIP_LIB = ",SYS$DISK:[-.VMS]TCPIP_SHR_DECC.OPT /OPTIONS"
1039 $! Check to see if NONE was chosen
1041 $ IF OPT_TCPIP_LIB.EQS."NONE"
1044 $! Do not use a TCPIP library.
1054 $ WRITE SYS$OUTPUT "TCP/IP library spec: ", TCPIP_LIB- ","
1056 $! Else The User Entered An Invalid Argument.
1060 $! Tell The User We Don't Know What They Want.
1062 $ WRITE SYS$OUTPUT ""
1063 $ WRITE SYS$OUTPUT "The Option ",OPT_TCPIP_LIB," Is Invalid. The Valid Options Are:"
1064 $ WRITE SYS$OUTPUT ""
1065 $ WRITE SYS$OUTPUT " SOCKETSHR : To link with SOCKETSHR TCP/IP library."
1066 $ WRITE SYS$OUTPUT " UCX : To link with UCX TCP/IP library."
1067 $ WRITE SYS$OUTPUT " TCPIP : To link with TCPIP (post UCX) TCP/IP library."
1068 $ WRITE SYS$OUTPUT ""
1074 $! Done with TCP/IP libraries
1078 $! Time To RETURN...
1084 $! Save old value of the logical name OPENSSL
1086 $ __SAVE_OPENSSL = F$TRNLNM("OPENSSL","LNM$PROCESS_TABLE")
1088 $! Save directory information
1090 $ __HERE = F$PARSE(F$PARSE("A.;",F$ENVIRONMENT("PROCEDURE"))-"A.;","[]A.;") - "A.;"
1091 $ __HERE = F$EDIT(__HERE,"UPCASE")
1092 $ __TOP = __HERE - "ENGINES]"
1093 $ __INCLUDE = __TOP + "INCLUDE.OPENSSL]"
1095 $! Set up the logical name OPENSSL to point at the include directory
1097 $ DEFINE OPENSSL /NOLOG '__INCLUDE'
1105 $! Restore the saved logical name OPENSSL, if it had a value.
1107 $ if (f$type( __SAVE_OPENSSL) .nes. "")
1109 $ IF __SAVE_OPENSSL .EQS. ""
1113 $ DEFINE /NOLOG OPENSSL '__SAVE_OPENSSL'
1117 $! Close any open files.
1119 $ if (f$trnlnm( "objects", "LNM$PROCESS", 0, "SUPERVISOR") .nes. "") then -