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 $! For 64 bit architectures (Alpha and IA64), specify the pointer size as P7.
32 $! For 32 bit architectures (VAX), P7 is ignored.
33 $! Currently supported values are:
35 $! 32 To ge a library compiled with /POINTER_SIZE=32
36 $! 64 To ge a library compiled with /POINTER_SIZE=64
38 $!-----------------------------------------------------------------------------
40 $! Set the default TCP/IP library to link against if needed
44 $! Check What Architecture We Are Using.
46 $ IF (F$GETSYI("CPU").LT.128)
49 $! The Architecture Is VAX.
57 $! The Architecture Is Alpha, IA64 or whatever comes in the future.
59 $ ARCH = F$EDIT( F$GETSYI( "ARCH_NAME"), "UPCASE")
60 $ IF (ARCH .EQS. "") THEN ARCH = "UNK"
62 $! End The Architecture Check.
66 $! Set the names of the engines we want to build
67 $! NOTE: Some might think this list ugly. However, it's made this way to
68 $! reflect the LIBNAMES variable in Makefile as closely as possible,
69 $! thereby making it fairly easy to verify that the lists are the same.
70 $! NOTE: gmp isn't built, as it's mostly a test engine and brings in another
71 $! library that isn't necessarely ported to VMS.
74 $ IF ENGINES .EQS. "," THEN -
75 ENGINES = ",4758cca,aep,atalla,cswift,chil,nuron,sureware,ubsec,padlock,"
77 $! GOST requires a 64-bit integer type, unavailable on VAX.
79 $ IF (ARCH .NES. "VAX") THEN -
80 ENGINES = ENGINES+ ",ccgost"
82 $! Set the goal directories, and create them if necessary
84 $ OBJ_DIR := SYS$DISK:[-.'ARCH'.OBJ.ENGINES]
85 $ EXE_DIR := SYS$DISK:[-.'ARCH'.EXE.ENGINES]
86 $ IF F$PARSE(OBJ_DIR) .EQS. "" THEN CREATE/DIRECTORY 'OBJ_DIR'
87 $ IF F$PARSE(EXE_DIR) .EQS. "" THEN CREATE/DIRECTORY 'EXE_DIR'
89 $! Set the goal files, and create them if necessary
91 $ CRYPTO_LIB :=SYS$DISK:[-.'ARCH'.EXE.CRYPTO]LIBCRYPTO'LIB32'.OLB
92 $ IF F$SEARCH(CRYPTO_LIB) .EQS. "" THEN LIBRARY/CREATE/OBJECT 'CRYPTO_LIB'
94 $! OK, time to check options and initialise
97 $ ACCEPT_PHASE = "ALL,ENGINES"
101 $ OPT_SPECIAL_THREADS = P5
102 $ OPT_POINTER_SIZE = P7
104 $ GOSUB CHECK_OPTIONS
106 $ GOSUB CHECK_OPT_FILE
108 $! Define what goes into each engine. VAX includes a transfer vector.
112 $ IF ARCH .EQS. "VAX"
114 $ ENGINE_ = "engine_vector.mar"
115 $ TV_OBJ_NAME = OBJ_DIR + F$PARSE(ENGINE_,,,"NAME","SYNTAX_ONLY") + ".OBJ"
116 $ TV_OBJ = ",''TV_OBJ_NAME'"
118 $ ENGINE_4758CCA = "e_4758cca"
119 $ ENGINE_aep = "e_aep"
120 $ ENGINE_atalla = "e_atalla"
121 $ ENGINE_cswift = "e_cswift"
122 $ ENGINE_chil = "e_chil"
123 $ ENGINE_nuron = "e_nuron"
124 $ ENGINE_sureware = "e_sureware"
125 $ ENGINE_ubsec = "e_ubsec"
126 $ ENGINE_padlock = "e_padlock"
128 $ ENGINE_ccgost_SUBDIR = "ccgost"
129 $ ENGINE_ccgost = "e_gost_err,gost2001_keyx,gost2001,gost89,gost94_keyx,"+ -
130 "gost_ameth,gost_asn1,gost_crypt,gost_ctl,gost_eng,"+ -
131 "gosthash,gost_keywrap,gost_md,gost_params,gost_pmeth,"+ -
134 $! Define which programs need to be linked with a TCP/IP library
136 $ TCPIP_ENGINES = ",,"
137 $ IF COMPILER .EQS. "VAXC" THEN -
140 $! Set up two loops, one that keeps track of the engines,
141 $! and one that keeps track of all the files going into
142 $! the current engine.
144 $! Here's the start of the engine loop.
149 $! Extract the current engine name, and if we've reached the end, stop
151 $ ENGINE_NAME = F$ELEMENT(ENGINE_COUNTER,",",ENGINES)
152 $ IF (ENGINE_NAME.EQS.",") THEN GOTO ENGINE_DONE
154 $ ENGINE_COUNTER = ENGINE_COUNTER + 1
156 $! Set up the engine library names.
158 $ LIB_ENGINE = "ENGINE_" + ENGINE_NAME
160 $! Check if the library module name actually is defined
162 $ IF F$TYPE('LIB_ENGINE') .EQS. ""
165 $ WRITE SYS$ERROR "The module ",ENGINE_NAME," does not exist. Continuing..."
172 $ IF ENGINE_NAME .NES. ""
174 $ WRITE SYS$OUTPUT "Compiling The ",ENGINE_NAME," Library Files. (",BUILDALL,")"
176 $ WRITE SYS$OUTPUT "Compiling Support Files. (",BUILDALL,")"
179 $! Create a .OPT file for the object files (for a real engine name).
181 $ IF ENGINE_NAME .NES. ""
183 $ OPEN/WRITE OBJECTS 'EXE_DIR''ENGINE_NAME'.OPT
186 $! Here's the start of per-engine module loop.
191 $! Extract the file name from the file list, and if we've reached the end, stop
193 $ FILE_NAME = F$ELEMENT(FILE_COUNTER,",",'LIB_ENGINE')
194 $ IF (FILE_NAME.EQS.",") THEN GOTO FILE_DONE
196 $ FILE_COUNTER = FILE_COUNTER + 1
198 $ IF FILE_NAME .EQS. "" THEN GOTO FILE_NEXT
200 $! Set up the source and object reference
202 $ IF F$TYPE('LIB_ENGINE'_SUBDIR) .EQS. ""
204 $ SOURCE_FILE = F$PARSE(FILE_NAME,"SYS$DISK:[].C",,,"SYNTAX_ONLY")
206 $ SOURCE_FILE = F$PARSE(FILE_NAME,"SYS$DISK:[."+'LIB_ENGINE'_SUBDIR+"].C",,,"SYNTAX_ONLY")
208 $ OBJECT_FILE = OBJ_DIR + F$PARSE(FILE_NAME,,,"NAME","SYNTAX_ONLY") + ".OBJ"
210 $! If we get some problem, we just go on trying to build the next module.
211 $ ON WARNING THEN GOTO FILE_NEXT
213 $! Check if the module we want to compile is actually there.
215 $ IF F$SEARCH(SOURCE_FILE) .EQS. ""
217 $ WRITE SYS$OUTPUT ""
218 $ WRITE SYS$OUTPUT "The File ",SOURCE_FILE," Doesn't Exist."
219 $ WRITE SYS$OUTPUT ""
225 $ WRITE SYS$OUTPUT " ",FILE_NAME,""
227 $! Do the dirty work.
229 $ ON ERROR THEN GOTO FILE_NEXT
230 $ IF F$EDIT(F$PARSE(SOURCE_FILE,,,"TYPE","SYNTAX_ONLY"),"UPCASE") .EQS. ".MAR"
232 $ MACRO/OBJECT='OBJECT_FILE' 'SOURCE_FILE'
234 $ CC/OBJECT='OBJECT_FILE' 'SOURCE_FILE'
237 $! Write the entry to the .OPT file (for a real engine name).
239 $ IF ENGINE_NAME .NES. ""
241 $ WRITE OBJECTS OBJECT_FILE
250 $! Do not link the support files.
252 $ IF ENGINE_NAME .EQS. "" THEN GOTO ENGINE_NEXT
254 $! Close the linker options file (for a real engine name).
258 $! Now, there are two ways to handle this. We can either build
259 $! shareable images or stick the engine object file into libcrypto.
260 $! For now, the latter is NOT supported.
262 $!!!!! LIBRARY/REPLACE 'CRYPTO_LIB' 'OBJECT_FILE'
264 $! For shareable libraries, we need to do things a little differently
265 $! depending on if we link with a TCP/IP library or not.
267 $ ENGINE_OPT := SYS$DISK:[]'ARCH'.OPT
268 $ IF TCPIP_LIB .NES. ""
270 $ LINK/'DEBUGGER'/'TRACEBACK' /SHARE='EXE_DIR''ENGINE_NAME'.EXE -
271 'EXE_DIR''ENGINE_NAME'.OPT/OPTION'TV_OBJ', -
272 'CRYPTO_LIB'/LIBRARY, -
273 'ENGINE_OPT'/OPTION,'TCPIP_LIB','OPT_FILE'/OPTION
275 $ LINK/'DEBUGGER'/'TRACEBACK' /SHARE='EXE_DIR''ENGINE_NAME'.EXE -
276 'EXE_DIR''ENGINE_NAME'.OPT/OPTION'TV_OBJ', -
277 'CRYPTO_LIB'/LIBRARY, -
278 'ENGINE_OPT'/OPTION,'OPT_FILE'/OPTION
289 $ WRITE SYS$OUTPUT "All Done..."
294 $! Check For The Link Option FIle.
298 $! Check To See If We Need To Make A VAX C Option File.
300 $ IF (COMPILER.EQS."VAXC")
303 $! Check To See If We Already Have A VAX C Linker Option File.
305 $ IF (F$SEARCH(OPT_FILE).EQS."")
308 $! We Need A VAX C Linker Option File.
313 ! Default System Options File To Link Agianst
314 ! The Sharable VAX C Runtime Library.
316 SYS$SHARE:VAXCRTL.EXE/SHARE
319 $! End The Option File Check.
323 $! End The VAXC Check.
327 $! Check To See If We Need A GNU C Option File.
329 $ IF (COMPILER.EQS."GNUC")
332 $! Check To See If We Already Have A GNU C Linker Option File.
334 $ IF (F$SEARCH(OPT_FILE).EQS."")
337 $! We Need A GNU C Linker Option File.
342 ! Default System Options File To Link Agianst
343 ! The Sharable C Runtime Library.
345 GNU_CC:[000000]GCCLIB/LIBRARY
346 SYS$SHARE:VAXCRTL/SHARE
349 $! End The Option File Check.
353 $! End The GNU C Check.
357 $! Check To See If We Need A DEC C Option File.
359 $ IF (COMPILER.EQS."DECC")
362 $! Check To See If We Already Have A DEC C Linker Option File.
364 $ IF (F$SEARCH(OPT_FILE).EQS."")
367 $! Figure Out If We Need A non-VAX Or A VAX Linker Option File.
369 $ IF ARCH .EQS. "VAX"
372 $! We Need A DEC C Linker Option File For VAX.
377 ! Default System Options File To Link Agianst
378 ! The Sharable DEC C Runtime Library.
380 SYS$SHARE:DECC$SHR.EXE/SHARE
387 $! Create The non-VAX Linker Option File.
392 ! Default System Options File For non-VAX To Link Agianst
393 ! The Sharable C Runtime Library.
395 SYS$SHARE:CMA$OPEN_LIB_SHR/SHARE
396 SYS$SHARE:CMA$OPEN_RTL/SHARE
399 $! End The DEC C Option File Check.
403 $! End The Option File Search.
407 $! End The DEC C Check.
411 $! Tell The User What Linker Option File We Are Using.
413 $ WRITE SYS$OUTPUT "Using Linker Option File ",OPT_FILE,"."
419 $! Check The User's Options.
423 $! Check To See If OPT_PHASE Is Blank.
425 $ IF (OPT_PHASE.EQS."ALL")
428 $! OPT_PHASE Is Blank, So Build Everything.
436 $! Else, Check To See If OPT_PHASE Has A Valid Argument.
438 $ IF ("," + ACCEPT_PHASE + ",") - ("," + OPT_PHASE + ",") -
439 .NES. ("," + ACCEPT_PHASE + ",")
444 $ BUILDALL = OPT_PHASE
450 $! Tell The User We Don't Know What They Want.
452 $ WRITE SYS$OUTPUT ""
453 $ WRITE SYS$OUTPUT "The option ",OPT_PHASE," is invalid. The valid options are:"
454 $ WRITE SYS$OUTPUT ""
455 $ IF ("," + ACCEPT_PHASE + ",") - ",ALL," -
456 .NES. ("," + ACCEPT_PHASE + ",") THEN -
457 WRITE SYS$OUTPUT " ALL : just build everything."
458 $ IF ("," + ACCEPT_PHASE + ",") - ",ENGINES," -
459 .NES. ("," + ACCEPT_PHASE + ",") THEN -
460 WRITE SYS$OUTPUT " ENGINES : to compile just the [.xxx.EXE.ENGINES]*.EXE hareable images."
461 $ WRITE SYS$OUTPUT ""
462 $ WRITE SYS$OUTPUT " where 'xxx' stands for:"
463 $ WRITE SYS$OUTPUT ""
464 $ WRITE SYS$OUTPUT " ALPHA : Alpha architecture."
465 $ WRITE SYS$OUTPUT " IA64 : IA64 architecture."
466 $ WRITE SYS$OUTPUT " VAX : VAX architecture."
467 $ WRITE SYS$OUTPUT ""
473 $! End The Valid Argument Check.
477 $! End The OPT_PHASE Check.
481 $! Check To See If OPT_DEBUG Is Blank.
483 $ IF (OPT_DEBUG.EQS."NODEBUG")
486 $! OPT_DEBUG Is NODEBUG, So Compile Without The Debugger Information.
488 $ DEBUGGER = "NODEBUG"
489 $ TRACEBACK = "NOTRACEBACK"
490 $ GCC_OPTIMIZE = "OPTIMIZE"
491 $ CC_OPTIMIZE = "OPTIMIZE"
492 $ MACRO_OPTIMIZE = "OPTIMIZE"
493 $ WRITE SYS$OUTPUT "No Debugger Information Will Be Produced During Compile."
494 $ WRITE SYS$OUTPUT "Compiling With Compiler Optimization."
497 $! Check To See If We Are To Compile With Debugger Information.
499 $ IF (OPT_DEBUG.EQS."DEBUG")
502 $! Compile With Debugger Information.
505 $ TRACEBACK = "TRACEBACK"
506 $ GCC_OPTIMIZE = "NOOPTIMIZE"
507 $ CC_OPTIMIZE = "NOOPTIMIZE"
508 $ MACRO_OPTIMIZE = "NOOPTIMIZE"
509 $ WRITE SYS$OUTPUT "Debugger Information Will Be Produced During Compile."
510 $ WRITE SYS$OUTPUT "Compiling Without Compiler Optimization."
513 $! They Entered An Invalid Option..
515 $ WRITE SYS$OUTPUT ""
516 $ WRITE SYS$OUTPUT "The Option ",OPT_DEBUG," Is Invalid. The Valid Options Are:"
517 $ WRITE SYS$OUTPUT ""
518 $ WRITE SYS$OUTPUT " DEBUG : Compile With The Debugger Information."
519 $ WRITE SYS$OUTPUT " NODEBUG : Compile Without The Debugger Information."
520 $ WRITE SYS$OUTPUT ""
526 $! End The Valid Argument Check.
530 $! End The OPT_DEBUG Check.
534 $! Special Threads For OpenVMS v7.1 Or Later
536 $! Written By: Richard Levitte
537 $! richard@levitte.org
540 $! Check To See If We Have A Option For OPT_SPECIAL_THREADS.
542 $ IF (OPT_SPECIAL_THREADS.EQS."")
545 $! Get The Version Of VMS We Are Using.
548 $ TMP = F$ELEMENT(0,"-",F$EXTRACT(1,4,F$GETSYI("VERSION")))
549 $ TMP = F$INTEGER(F$ELEMENT(0,".",TMP)+F$ELEMENT(1,".",TMP))
551 $! Check To See If The VMS Version Is v7.1 Or Later.
556 $! We Have OpenVMS v7.1 Or Later, So Use The Special Threads.
558 $ ISSEVEN := ,PTHREAD_USE_D4
560 $! End The VMS Version Check.
564 $! End The OPT_SPECIAL_THREADS Check.
568 $! Check To See If OPT_POINTER_SIZE Is Blank.
570 $ IF (OPT_POINTER_SIZE.EQS."")
575 $! Check is OPT_POINTER_SIZE Is Valid
577 $ IF (OPT_POINTER_SIZE.EQS."32")
579 $ POINTER_SIZE = "/POINTER_SIZE=32"
580 $ IF ARCH .EQS. "VAX"
587 $ IF (OPT_POINTER_SIZE.EQS."64")
590 $ IF ARCH .EQS. "VAX"
592 $ POINTER_SIZE = "/POINTER_SIZE=32"
594 $ POINTER_SIZE = "/POINTER_SIZE=64"
598 $! Tell The User Entered An Invalid Option..
600 $ WRITE SYS$OUTPUT ""
601 $ WRITE SYS$OUTPUT "The Option ",OPT_POINTER_SIZE," Is Invalid. The Valid Options Are:"
602 $ WRITE SYS$OUTPUT ""
603 $ WRITE SYS$OUTPUT " 32 : Compile with 32 bit pointer size"
604 $ WRITE SYS$OUTPUT " 64 : Compile with 64 bit pointer size"
605 $ WRITE SYS$OUTPUT ""
611 $! End The Valid Arguement Check.
616 $! End The OPT_POINTER_SIZE Check.
620 $! Check To See If OPT_COMPILER Is Blank.
622 $ IF (OPT_COMPILER.EQS."")
625 $! O.K., The User Didn't Specify A Compiler, Let's Try To
626 $! Find Out Which One To Use.
628 $! Check To See If We Have GNU C.
630 $ IF (F$TRNLNM("GNU_CC").NES."")
633 $! Looks Like GNUC, Set To Use GNUC.
635 $ OPT_COMPILER = "GNUC"
641 $! Check To See If We Have VAXC Or DECC.
643 $ IF (ARCH.NES."VAX").OR.(F$TRNLNM("DECC$CC_DEFAULT").NES."")
646 $! Looks Like DECC, Set To Use DECC.
648 $ OPT_COMPILER = "DECC"
654 $! Looks Like VAXC, Set To Use VAXC.
656 $ OPT_COMPILER = "VAXC"
658 $! End The VAXC Compiler Check.
662 $! End The DECC & VAXC Compiler Check.
666 $! End The Compiler Check.
670 $! Check To See If We Have A Option For OPT_TCPIP_LIB.
672 $ IF (OPT_TCPIP_LIB.EQS."")
675 $! Find out what socket library we have available
677 $ IF F$PARSE("SOCKETSHR:") .NES. ""
680 $! We have SOCKETSHR, and it is my opinion that it's the best to use.
682 $ OPT_TCPIP_LIB = "SOCKETSHR"
686 $ WRITE SYS$OUTPUT "Using SOCKETSHR for TCP/IP"
688 $! Else, let's look for something else
692 $! Like UCX (the reason to do this before Multinet is that the UCX
693 $! emulation is easier to use...)
695 $ IF F$TRNLNM("UCX$IPC_SHR") .NES. "" -
696 .OR. F$PARSE("SYS$SHARE:UCX$IPC_SHR.EXE") .NES. "" -
697 .OR. F$PARSE("SYS$LIBRARY:UCX$IPC.OLB") .NES. ""
700 $! Last resort: a UCX or UCX-compatible library
702 $ OPT_TCPIP_LIB = "UCX"
706 $ WRITE SYS$OUTPUT "Using UCX or an emulation thereof for TCP/IP"
714 $! Set Up Initial CC Definitions, Possibly With User Ones
716 $ CCDEFS = "TCPIP_TYPE_''OPT_TCPIP_LIB',DSO_VMS"
717 $ IF F$TYPE(USER_CCDEFS) .NES. "" THEN CCDEFS = CCDEFS + "," + USER_CCDEFS
719 $ IF F$TYPE(USER_CCFLAGS) .NES. "" THEN CCEXTRAFLAGS = USER_CCFLAGS
720 $ CCDISABLEWARNINGS = "LONGLONGTYPE,LONGLONGSUFX"
721 $ IF F$TYPE(USER_CCDISABLEWARNINGS) .NES. "" THEN -
722 CCDISABLEWARNINGS = CCDISABLEWARNINGS + "," + USER_CCDISABLEWARNINGS
724 $! Check To See If The User Entered A Valid Paramter.
726 $ IF (OPT_COMPILER.EQS."VAXC").OR.(OPT_COMPILER.EQS."DECC").OR.(OPT_COMPILER.EQS."GNUC")
729 $! Check To See If The User Wanted DECC.
731 $ IF (OPT_COMPILER.EQS."DECC")
734 $! Looks Like DECC, Set To Use DECC.
738 $! Tell The User We Are Using DECC.
740 $ WRITE SYS$OUTPUT "Using DECC 'C' Compiler."
745 $ IF ARCH.EQS."VAX" .AND. F$TRNLNM("DECC$CC_DEFAULT").NES."/DECC" -
747 $ CC = CC + "/''CC_OPTIMIZE'/''DEBUGGER'/STANDARD=ANSI89''POINTER_SIZE'" + -
748 "/NOLIST/PREFIX=ALL" + -
749 "/INCLUDE=(SYS$DISK:[],SYS$DISK:[.VENDOR_DEFNS])" + -
752 $! Define The Linker Options File Name.
754 $ OPT_FILE = "''EXE_DIR'VAX_DECC_OPTIONS.OPT"
760 $! Check To See If We Are To Use VAXC.
762 $ IF (OPT_COMPILER.EQS."VAXC")
765 $! Looks Like VAXC, Set To Use VAXC.
769 $! Tell The User We Are Using VAX C.
771 $ WRITE SYS$OUTPUT "Using VAXC 'C' Compiler."
773 $! Compile Using VAXC.
778 $ WRITE SYS$OUTPUT "There is no VAX C on Alpha!"
781 $ IF F$TRNLNM("DECC$CC_DEFAULT").EQS."/DECC" THEN CC = "CC/VAXC"
782 $ CC = CC + "/''CC_OPTIMIZE'/''DEBUGGER'/NOLIST" + -
783 "/INCLUDE=(SYS$DISK:[],SYS$DISK:[-],SYS$DISK:[.VENDOR_DEFNS])" + -
785 $ CCDEFS = """VAXC""," + CCDEFS
787 $! Define <sys> As SYS$COMMON:[SYSLIB]
789 $ DEFINE/NOLOG SYS SYS$COMMON:[SYSLIB]
791 $! Define The Linker Options File Name.
793 $ OPT_FILE = "''EXE_DIR'VAX_VAXC_OPTIONS.OPT"
799 $! Check To See If We Are To Use GNU C.
801 $ IF (OPT_COMPILER.EQS."GNUC")
804 $! Looks Like GNUC, Set To Use GNUC.
808 $! Tell The User We Are Using GNUC.
810 $ WRITE SYS$OUTPUT "Using GNU 'C' Compiler."
814 $ CC = "GCC/NOCASE_HACK/''GCC_OPTIMIZE'/''DEBUGGER'/NOLIST" + -
815 "/INCLUDE=(SYS$DISK:[],SYS$DISK:[-],SYS$DISK:[.VENDOR_DEFNS])" + -
818 $! Define The Linker Options File Name.
820 $ OPT_FILE = "''EXE_DIR'VAX_GNUC_OPTIONS.OPT"
822 $! End The GNU C Check.
826 $! Set up default defines
828 $ CCDEFS = """FLAT_INC=1""," + CCDEFS
830 $! Finish up the definition of CC.
832 $ IF COMPILER .EQS. "DECC"
834 $ IF CCDISABLEWARNINGS .NES. ""
836 $ CCDISABLEWARNINGS = "/WARNING=(DISABLE=(" + CCDISABLEWARNINGS + "))"
839 $ CCDISABLEWARNINGS = ""
841 $ CC = CC + "/DEFINE=(" + CCDEFS + ")" + CCDISABLEWARNINGS
843 $! Show user the result
845 $ WRITE/SYMBOL SYS$OUTPUT "Main C Compiling Command: ",CC
847 $! Else The User Entered An Invalid Argument.
851 $! Tell The User We Don't Know What They Want.
853 $ WRITE SYS$OUTPUT ""
854 $ WRITE SYS$OUTPUT "The Option ",OPT_COMPILER," Is Invalid. The Valid Options Are:"
855 $ WRITE SYS$OUTPUT ""
856 $ WRITE SYS$OUTPUT " VAXC : To Compile With VAX C."
857 $ WRITE SYS$OUTPUT " DECC : To Compile With DEC C."
858 $ WRITE SYS$OUTPUT " GNUC : To Compile With GNU C."
859 $ WRITE SYS$OUTPUT ""
865 $! End The Valid Argument Check.
869 $! Build a MACRO command for the architecture at hand
871 $ IF ARCH .EQS. "VAX" THEN MACRO = "MACRO/''DEBUGGER'"
872 $ IF ARCH .NES. "VAX" THEN MACRO = "MACRO/MIGRATION/''DEBUGGER'/''MACRO_OPTIMIZE'"
874 $! Show user the result
876 $ WRITE/SYMBOL SYS$OUTPUT "Main MACRO Compiling Command: ",MACRO
878 $! Time to check the contents, and to make sure we get the correct library.
880 $ IF OPT_TCPIP_LIB.EQS."SOCKETSHR" .OR. OPT_TCPIP_LIB.EQS."MULTINET" -
881 .OR. OPT_TCPIP_LIB.EQS."UCX" .OR. OPT_TCPIP_LIB.EQS."TCPIP" -
882 .OR. OPT_TCPIP_LIB.EQS."NONE"
885 $! Check to see if SOCKETSHR was chosen
887 $ IF OPT_TCPIP_LIB.EQS."SOCKETSHR"
890 $! Set the library to use SOCKETSHR
892 $ TCPIP_LIB = "SYS$DISK:[-.VMS]SOCKETSHR_SHR.OPT/OPT"
894 $! Done with SOCKETSHR
898 $! Check to see if MULTINET was chosen
900 $ IF OPT_TCPIP_LIB.EQS."MULTINET"
903 $! Set the library to use UCX emulation.
905 $ OPT_TCPIP_LIB = "UCX"
907 $! Done with MULTINET
911 $! Check to see if UCX was chosen
913 $ IF OPT_TCPIP_LIB.EQS."UCX"
916 $! Set the library to use UCX.
918 $ TCPIP_LIB = "SYS$DISK:[-.VMS]UCX_SHR_DECC.OPT/OPT"
919 $ IF F$TRNLNM("UCX$IPC_SHR") .NES. ""
921 $ TCPIP_LIB = "SYS$DISK:[-.VMS]UCX_SHR_DECC_LOG.OPT/OPT"
923 $ IF COMPILER .NES. "DECC" .AND. ARCH .EQS. "VAX" THEN -
924 TCPIP_LIB = "SYS$DISK:[-.VMS]UCX_SHR_VAXC.OPT/OPT"
931 $! Check to see if TCPIP was chosen
933 $ IF OPT_TCPIP_LIB.EQS."TCPIP"
936 $! Set the library to use TCPIP (post UCX).
938 $ TCPIP_LIB = "SYS$DISK:[-.VMS]TCPIP_SHR_DECC.OPT/OPT"
944 $! Check to see if NONE was chosen
946 $ IF OPT_TCPIP_LIB.EQS."NONE"
949 $! Do not use a TCPIP library.
959 $ WRITE SYS$OUTPUT "TCP/IP library spec: ", TCPIP_LIB
961 $! Else The User Entered An Invalid Argument.
965 $! Tell The User We Don't Know What They Want.
967 $ WRITE SYS$OUTPUT ""
968 $ WRITE SYS$OUTPUT "The Option ",OPT_TCPIP_LIB," Is Invalid. The Valid Options Are:"
969 $ WRITE SYS$OUTPUT ""
970 $ WRITE SYS$OUTPUT " SOCKETSHR : To link with SOCKETSHR TCP/IP library."
971 $ WRITE SYS$OUTPUT " UCX : To link with UCX TCP/IP library."
972 $ WRITE SYS$OUTPUT " TCPIP : To link with TCPIP (post UCX) TCP/IP library."
973 $ WRITE SYS$OUTPUT ""
979 $! Done with TCP/IP libraries
989 $! Save old value of the logical name OPENSSL
991 $ __SAVE_OPENSSL = F$TRNLNM("OPENSSL","LNM$PROCESS_TABLE")
993 $! Save directory information
995 $ __HERE = F$PARSE(F$PARSE("A.;",F$ENVIRONMENT("PROCEDURE"))-"A.;","[]A.;") - "A.;"
996 $ __HERE = F$EDIT(__HERE,"UPCASE")
997 $ __TOP = __HERE - "ENGINES]"
998 $ __INCLUDE = __TOP + "INCLUDE.OPENSSL]"
1000 $! Set up the logical name OPENSSL to point at the include directory
1002 $ DEFINE OPENSSL/NOLOG '__INCLUDE'
1010 $! Restore the logical name OPENSSL if it had a value
1012 $ IF __SAVE_OPENSSL .EQS. ""
1016 $ DEFINE/NOLOG OPENSSL '__SAVE_OPENSSL'