3 $! Written By: Robert Byer
5 $! A-Com Computing, Inc.
6 $! byer@mail.all-net.net
8 $! Changes by Richard Levitte <richard@levitte.org>
10 $! This command files compiles and creates all the various different
11 $! "test" programs for the different types of encryption for OpenSSL.
12 $! It was written so it would try to determine what "C" compiler to
13 $! use or you can specify which "C" compiler to use.
15 $! The test "executables" will be placed in a directory called
16 $! [.xxx.EXE.TEST] where "xxx" denotes ALPHA, IA64, or VAX, depending
17 $! on your machine architecture.
19 $! Specify DEBUG or NODEBUG P1 to compile with or without debugger
22 $! Specify which compiler at P2 to try to compile under.
28 $! If you don't specify a compiler, it will try to determine which
29 $! "C" compiler to use.
31 $! P3, if defined, sets a TCP/IP library to use, through one of the following
35 $! SOCKETSHR for SOCKETSHR+NETLIB
37 $! P4, if defined, sets a compiler thread NOT needed on OpenVMS 7.1 (and up)
40 $! P5, if defined, specifies the C pointer size. Ignored on VAX.
41 $! ("64=ARGV" gives more efficient code with HP C V7.3 or newer.)
42 $! Supported values are:
44 $! "" Compile with default (/NOPOINTER_SIZE)
45 $! 32 Compile with /POINTER_SIZE=32 (SHORT)
46 $! 64 Compile with /POINTER_SIZE=64[=ARGV] (LONG[=ARGV])
47 $! (Automatically select ARGV if compiler supports it.)
48 $! 64= Compile with /POINTER_SIZE=64 (LONG).
49 $! 64=ARGV Compile with /POINTER_SIZE=64=ARGV (LONG=ARGV).
51 $! P6, if defined, specifies a directory where ZLIB files (zlib.h,
52 $! libz.olb) may be found. Optionally, a non-default object library
53 $! name may be included ("dev:[dir]libz_64.olb", for example).
58 $ proc = f$environment( "procedure")
59 $ write sys$output "@@@ "+ -
60 f$parse( proc, , , "name")+ f$parse( proc, , , "type")
62 $! Define A TCP/IP Library That We Will Need To Link To.
63 $! (That is, If We Need To Link To One.)
68 $! Check Which Architecture We Are Using.
70 $ if (f$getsyi( "cpu") .lt. 128)
74 $ ARCH = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE")
75 $ if (ARCH .eqs. "") then ARCH = "UNK"
83 $! Check To Make Sure We Have Valid Command Line Parameters.
87 $! Define The OBJ and EXE Directories.
89 $ OBJ_DIR := SYS$DISK:[-.'ARCHD'.OBJ.TEST]
90 $ EXE_DIR := SYS$DISK:[-.'ARCHD'.EXE.TEST]
92 $! Specify the destination directory in any /MAP option.
94 $ if (LINKMAP .eqs. "MAP")
96 $ LINKMAP = LINKMAP+ "=''EXE_DIR'"
99 $! Add the location prefix to the linker options file name.
101 $ if (OPT_FILE .nes. "")
103 $ OPT_FILE = EXE_DIR+ OPT_FILE
106 $! Initialise logical names and such
110 $! Tell The User What Kind of Machine We Run On.
112 $ WRITE SYS$OUTPUT "Host system architecture: ''ARCHD'"
114 $! Define The CRYPTO-LIB We Are To Use.
116 $ CRYPTO_LIB := SYS$DISK:[-.'ARCHD'.EXE.CRYPTO]SSL_LIBCRYPTO'LIB32'.OLB
118 $! Define The SSL We Are To Use.
120 $ SSL_LIB := SYS$DISK:[-.'ARCHD'.EXE.SSL]SSL_LIBSSL'LIB32'.OLB
122 $! Create the OBJ and EXE Directories, if needed.
124 $ IF (F$PARSE(OBJ_DIR).EQS."") THEN -
125 CREATE /DIRECTORY 'OBJ_DIR'
126 $ IF (F$PARSE(EXE_DIR).EQS."") THEN -
127 CREATE /DIRECTORY 'EXE_DIR'
129 $! Check To See If We Have The Proper Libraries.
133 $! Check To See If We Have A Linker Option File.
135 $ GOSUB CHECK_OPT_FILE
137 $! Define The TEST Files.
138 $! NOTE: Some might think this list ugly. However, it's made this way to
139 $! reflect the EXE variable in Makefile as closely as possible,
140 $! thereby making it fairly easy to verify that the lists are the same.
142 $ TEST_FILES = "BNTEST,ECTEST,ECDSATEST,ECDHTEST,IDEATEST,"+ -
143 "MD2TEST,MD4TEST,MD5TEST,HMACTEST,WP_TEST,"+ -
144 "RC2TEST,RC4TEST,RC5TEST,"+ -
145 "DESTEST,SHA1TEST,SHA256T,SHA512T,"+ -
146 "MDC2TEST,RMDTEST,"+ -
147 "RANDTEST,DHTEST,ENGINETEST,"+ -
148 "GOST2814789TEST,"+ -
149 "BFTEST,CASTTEST,SSLTEST,"+ -
150 "EXPTEST,DSATEST,RSA_TEST,"+ -
151 "EVP_TEST,EVP_EXTRA_TEST,IGETEST,"+ -
152 "JPAKETEST,SRPTEST,V3NAMETEST,"+ -
153 "HEARTBEAT_TEST,P5_CRPT2_TEST,"+ -
155 $! Should we add MTTEST,PQ_TEST,LH_TEST,DIVTEST,TABTEST as well?
157 $! Additional directory information.
158 $ T_D_BNTEST := [-.crypto.bn]
159 $ T_D_ECTEST := [-.crypto.ec]
160 $ T_D_ECDSATEST := [-.crypto.ecdsa]
161 $ T_D_ECDHTEST := [-.crypto.ecdh]
162 $ T_D_IDEATEST := [-.crypto.idea]
163 $ T_D_MD2TEST := [-.crypto.md2]
164 $ T_D_MD4TEST := [-.crypto.md4]
165 $ T_D_MD5TEST := [-.crypto.md5]
166 $ T_D_HMACTEST := [-.crypto.hmac]
167 $ T_D_WP_TEST := [-.crypto.whrlpool]
168 $ T_D_RC2TEST := [-.crypto.rc2]
169 $ T_D_RC4TEST := [-.crypto.rc4]
170 $ T_D_RC5TEST := [-.crypto.rc5]
171 $ T_D_DESTEST := [-.crypto.des]
172 $ T_D_SHATEST := [-.crypto.sha]
173 $ T_D_SHA1TEST := [-.crypto.sha]
174 $ T_D_SHA256T := [-.crypto.sha]
175 $ T_D_SHA512T := [-.crypto.sha]
176 $ T_D_MDC2TEST := [-.crypto.mdc2]
177 $ T_D_RMDTEST := [-.crypto.ripemd]
178 $ T_D_RANDTEST := [-.crypto.rand]
179 $ T_D_DHTEST := [-.crypto.dh]
180 $ T_D_ENGINETEST := [-.crypto.engine]
181 $ T_D_GOST2814789TEST := [-.engines.ccgost]
182 $ T_D_BFTEST := [-.crypto.bf]
183 $ T_D_CASTTEST := [-.crypto.cast]
184 $ T_D_SSLTEST := [-.ssl]
185 $ T_D_EXPTEST := [-.crypto.bn]
186 $ T_D_DSATEST := [-.crypto.dsa]
187 $ T_D_RSA_TEST := [-.crypto.rsa]
188 $ T_D_EVP_TEST := [-.crypto.evp]
189 $ T_D_EVP_EXTRA_TEST := [-.crypto.evp]
190 $ T_D_IGETEST := [-.test]
191 $ T_D_JPAKETEST := [-.crypto.jpake]
192 $ T_D_SRPTEST := [-.crypto.srp]
193 $ T_D_V3NAMETEST := [-.crypto.x509v3]
194 $ T_D_HEARTBEAT_TEST := [-.ssl]
195 $ T_D_P5_CRPT2_TEST := [-.crypto.evp]
196 $ T_D_CONSTANT_TIME_TEST := [-.crypto]
198 $ TCPIP_PROGRAMS = ",,"
199 $ IF COMPILER .EQS. "VAXC" THEN -
200 TCPIP_PROGRAMS = ",SSLTEST,"
202 $! Define A File Counter And Set It To "0".
206 $! Top Of The File Loop.
210 $! O.K, Extract The File Name From The File List.
212 $ FILE_NAME = F$ELEMENT(FILE_COUNTER,",",TEST_FILES)
214 $! Check To See If We Are At The End Of The File List.
216 $ IF (FILE_NAME.EQS.",") THEN GOTO FILE_DONE
218 $! Increment The Counter.
220 $ FILE_COUNTER = FILE_COUNTER + 1
222 $! Create The Source File Name.
224 $ SOURCE_FILE = "SYS$DISK:" + T_D_'FILE_NAME' + FILE_NAME + ".C"
226 $! Create The Object File Name.
228 $ OBJECT_FILE = OBJ_DIR + FILE_NAME + ".OBJ"
230 $! Create The Executable File Name.
232 $ EXE_FILE = EXE_DIR + FILE_NAME + ".EXE"
233 $ ON WARNING THEN GOTO NEXT_FILE
235 $! Check To See If The File We Want To Compile Actually Exists.
237 $ IF (F$SEARCH(SOURCE_FILE).EQS."")
240 $! Tell The User That The File Dosen't Exist.
242 $ WRITE SYS$OUTPUT ""
243 $ WRITE SYS$OUTPUT "The File ",SOURCE_FILE," Dosen't Exist."
244 $ WRITE SYS$OUTPUT ""
251 $! Tell The User What We Are Building.
253 $ WRITE SYS$OUTPUT "Building The ",FILE_NAME," Test Program."
257 $ ON ERROR THEN GOTO NEXT_FILE
258 $ CC /OBJECT='OBJECT_FILE' 'SOURCE_FILE'
259 $ ON WARNING THEN GOTO NEXT_FILE
261 $! Check If What We Are About To Compile Works Without A TCP/IP Library.
263 $ IF ((TCPIP_LIB.EQS."").AND.((TCPIP_PROGRAMS-FILE_NAME).NES.TCPIP_PROGRAMS))
266 $! Inform The User That A TCP/IP Library Is Needed To Compile This Program.
269 FILE_NAME," Needs A TCP/IP Library. Can't Link. Skipping..."
272 $! End The TCP/IP Library Check.
276 $! Link The Program, Check To See If We Need To Link With RSAREF Or Not.
277 $! Check To See If We Are To Link With A Specific TCP/IP Library.
279 $! Don't Link With The RSAREF Routines And TCP/IP Library.
281 $ LINK /'DEBUGGER' /'LINKMAP' /'TRACEBACK' /EXECTABLE = 'EXE_FILE' -
283 'SSL_LIB' /LIBRARY, -
284 'CRYPTO_LIB' /LIBRARY -
289 $! Go Back And Do It Again.
293 $! All Done With This Library Part.
297 $! All Done, Time To Exit.
303 $! Check For The Link Option FIle.
307 $! Check To See If We Need To Make A VAX C Option File.
309 $ IF (COMPILER.EQS."VAXC")
312 $! Check To See If We Already Have A VAX C Linker Option File.
314 $ IF (F$SEARCH(OPT_FILE).EQS."")
317 $! We Need A VAX C Linker Option File.
322 ! Default System Options File To Link Against
323 ! The Sharable VAX C Runtime Library.
325 SYS$SHARE:VAXCRTL.EXE /SHAREABLE
328 $! End The Option File Check.
332 $! End The VAXC Check.
336 $! Check To See If We Need A GNU C Option File.
338 $ IF (COMPILER.EQS."GNUC")
341 $! Check To See If We Already Have A GNU C Linker Option File.
343 $ IF (F$SEARCH(OPT_FILE).EQS."")
346 $! We Need A GNU C Linker Option File.
351 ! Default System Options File To Link Against
352 ! The Sharable C Runtime Library.
354 GNU_CC:[000000]GCCLIB.OLB /LIBRARY
355 SYS$SHARE:VAXCRTL.EXE /SHAREABLE
358 $! End The Option File Check.
362 $! End The GNU C Check.
366 $! Check To See If We Need A DEC C Option File.
368 $ IF (COMPILER.EQS."DECC")
371 $! Check To See If We Already Have A DEC C Linker Option File.
373 $ IF (F$SEARCH(OPT_FILE).EQS."")
376 $! Figure Out If We Need A non-VAX Or A VAX Linker Option File.
378 $ IF (ARCH.EQS."VAX")
381 $! We Need A DEC C Linker Option File For VAX.
386 ! Default System Options File To Link Against
387 ! The Sharable DEC C Runtime Library.
389 SYS$SHARE:DECC$SHR.EXE /SHAREABLE
396 $! Create The non-VAX Linker Option File.
401 ! Default System Options File For non-VAX To Link Against
402 ! The Sharable C Runtime Library.
404 SYS$SHARE:CMA$OPEN_LIB_SHR.EXE /SHAREABLE
405 SYS$SHARE:CMA$OPEN_RTL.EXE /SHAREABLE
408 $! End The DEC C Option File Check.
412 $! End The Option File Search.
416 $! End The DEC C Check.
420 $! Tell The User What Linker Option File We Are Using.
422 $ WRITE SYS$OUTPUT "Using Linker Option File ",OPT_FILE,"."
428 $! Check To See If We Have The Appropiate Libraries.
432 $! Look For The Library LIBCRYPTO.OLB.
434 $ IF (F$SEARCH(CRYPTO_LIB).EQS."")
437 $! Tell The User We Can't Find The LIBCRYPTO.OLB Library.
439 $ WRITE SYS$OUTPUT ""
440 $ WRITE SYS$OUTPUT "Can't Find The Library ",CRYPTO_LIB,"."
441 $ WRITE SYS$OUTPUT "We Can't Link Without It."
442 $ WRITE SYS$OUTPUT ""
444 $! Since We Can't Link Without It, Exit.
448 $! End The Crypto Library Check.
452 $! Look For The Library LIBSSL.OLB.
454 $ IF (F$SEARCH(SSL_LIB).EQS."")
457 $! Tell The User We Can't Find The LIBSSL.OLB Library.
459 $ WRITE SYS$OUTPUT ""
460 $ WRITE SYS$OUTPUT "Can't Find The Library ",SSL_LIB,"."
461 $ WRITE SYS$OUTPUT "Some Of The Test Programs Need To Link To It."
462 $ WRITE SYS$OUTPUT ""
464 $! Since We Can't Link Without It, Exit.
468 $! End The SSL Library Check.
476 $! Check The User's Options.
480 $! Set basic C compiler /INCLUDE directories.
482 $ CC_INCLUDES = "SYS$DISK:[],SYS$DISK:[-],SYS$DISK:[-.CRYPTO]"
484 $! Check To See If P1 Is Blank.
486 $ IF (P1.EQS."NODEBUG")
489 $! P1 Is NODEBUG, So Compile Without Debugger Information.
491 $ DEBUGGER = "NODEBUG"
493 $ TRACEBACK = "NOTRACEBACK"
494 $ GCC_OPTIMIZE = "OPTIMIZE"
495 $ CC_OPTIMIZE = "OPTIMIZE"
496 $ WRITE SYS$OUTPUT "No Debugger Information Will Be Produced During Compile."
497 $ WRITE SYS$OUTPUT "Compiling With Compiler Optimization."
503 $! Check To See If We Are To Compile With Debugger Information.
505 $ IF (P1.EQS."DEBUG")
508 $! Compile With Debugger Information.
512 $ TRACEBACK = "TRACEBACK"
513 $ GCC_OPTIMIZE = "NOOPTIMIZE"
514 $ CC_OPTIMIZE = "NOOPTIMIZE"
515 $ WRITE SYS$OUTPUT "Debugger Information Will Be Produced During Compile."
516 $ WRITE SYS$OUTPUT "Compiling Without Compiler Optimization."
522 $! Tell The User Entered An Invalid Option.
524 $ WRITE SYS$OUTPUT ""
525 $ WRITE SYS$OUTPUT "The Option ",P1," Is Invalid. The Valid Options Are:"
526 $ WRITE SYS$OUTPUT ""
527 $ WRITE SYS$OUTPUT " DEBUG : Compile With The Debugger Information."
528 $ WRITE SYS$OUTPUT " NODEBUG : Compile Without The Debugger Information."
529 $ WRITE SYS$OUTPUT ""
535 $! End The Valid Argument Check.
543 $! Check P5 (POINTER_SIZE).
545 $ IF (P5 .NES. "") .AND. (ARCH .NES. "VAX")
550 $ POINTER_SIZE = " /POINTER_SIZE=32"
552 $ POINTER_SIZE = F$EDIT( P5, "COLLAPSE, UPCASE")
553 $ IF ((POINTER_SIZE .EQS. "64") .OR. -
554 (POINTER_SIZE .EQS. "64=") .OR. -
555 (POINTER_SIZE .EQS. "64=ARGV"))
557 $ ARCHD = ARCH+ "_64"
559 $ IF (F$EXTRACT( 2, 1, POINTER_SIZE) .EQS. "=")
561 $! Explicit user choice: "64" or "64=ARGV".
562 $ IF (POINTER_SIZE .EQS. "64=") THEN POINTER_SIZE = "64"
565 $ DEFINE /USER_MODE SYS$OUTPUT NL:
566 $ DEFINE /USER_MODE SYS$ERROR NL:
567 $ CC /NOLIST /NOOBJECT /POINTER_SIZE=64=ARGV NL:
568 $ IF ($STATUS .AND. %X0FFF0000) .EQ. %X00030000
570 $ ! If we got here, it means DCL complained like this:
571 $ ! %DCL-W-NOVALU, value not allowed - remove value specification
574 $ ! If the compiler was run, logicals defined in /USER would
575 $ ! have been deassigned automatically. However, when DCL
576 $ ! complains, they aren't, so we do it here (it might be
577 $ ! unnecessary, but just in case there will be another error
578 $ ! message further on that we don't want to miss)
579 $ DEASSIGN /USER_MODE SYS$ERROR
580 $ DEASSIGN /USER_MODE SYS$OUTPUT
582 $ POINTER_SIZE = POINTER_SIZE + "=ARGV"
586 $ POINTER_SIZE = " /POINTER_SIZE=''POINTER_SIZE'"
589 $! Tell The User Entered An Invalid Option.
591 $ WRITE SYS$OUTPUT ""
592 $ WRITE SYS$OUTPUT "The Option ", P5, -
593 " Is Invalid. The Valid Options Are:"
594 $ WRITE SYS$OUTPUT ""
596 " """" : Compile with default (short) pointers."
598 " 32 : Compile with 32-bit (short) pointers."
600 " 64 : Compile with 64-bit (long) pointers (auto ARGV)."
602 " 64= : Compile with 64-bit (long) pointers (no ARGV)."
604 " 64=ARGV : Compile with 64-bit (long) pointers (ARGV)."
605 $ WRITE SYS$OUTPUT ""
615 $! End The P5 (POINTER_SIZE) Check.
619 $! Check To See If P2 Is Blank.
624 $! O.K., The User Didn't Specify A Compiler, Let's Try To
625 $! Find Out Which One To Use.
627 $! Check To See If We Have GNU C.
629 $ IF (F$TRNLNM("GNU_CC").NES."")
632 $! Looks Like GNUC, Set To Use GNUC.
636 $! End The GNU C Compiler Check.
640 $! Check To See If We Have VAXC Or DECC.
642 $ IF (ARCH.NES."VAX").OR.(F$TRNLNM("DECC$CC_DEFAULT").NES."")
645 $! Looks Like DECC, Set To Use DECC.
653 $! Looks Like VAXC, Set To Use VAXC.
657 $! End The VAXC Compiler Check.
661 $! End The DECC & VAXC Compiler Check.
665 $! End The Compiler Check.
669 $! Check To See If We Have A Option For P3.
674 $! Find out what socket library we have available
676 $ IF F$PARSE("SOCKETSHR:") .NES. ""
679 $! We have SOCKETSHR, and it is my opinion that it's the best to use.
685 $ WRITE SYS$OUTPUT "Using SOCKETSHR for TCP/IP"
687 $! Else, let's look for something else
691 $! Like UCX (the reason to do this before Multinet is that the UCX
692 $! emulation is easier to use...)
694 $ IF F$TRNLNM("UCX$IPC_SHR") .NES. "" -
695 .OR. F$PARSE("SYS$SHARE:UCX$IPC_SHR.EXE") .NES. "" -
696 .OR. F$PARSE("SYS$LIBRARY:UCX$IPC.OLB") .NES. ""
699 $! Last resort: a UCX or UCX-compatible library
705 $ WRITE SYS$OUTPUT "Using UCX or an emulation thereof for TCP/IP"
713 $! Set Up Initial CC Definitions, Possibly With User Ones
715 $ CCDEFS = "TCPIP_TYPE_''P3'"
716 $ IF F$TYPE(USER_CCDEFS) .NES. "" THEN CCDEFS = CCDEFS + "," + USER_CCDEFS
718 $ IF F$TYPE(USER_CCFLAGS) .NES. "" THEN CCEXTRAFLAGS = USER_CCFLAGS
719 $ CCDISABLEWARNINGS = "" !!! "LONGLONGTYPE,LONGLONGSUFX,FOUNDCR"
720 $ IF F$TYPE(USER_CCDISABLEWARNINGS) .NES. "" THEN -
721 CCDISABLEWARNINGS = CCDISABLEWARNINGS + "," + USER_CCDISABLEWARNINGS
723 $! Check To See If We Have A ZLIB Option.
729 $! Check for expected ZLIB files.
732 $ file1 = f$parse( "zlib.h", ZLIB, , , "SYNTAX_ONLY")
733 $ if (f$search( file1) .eqs. "")
735 $ WRITE SYS$OUTPUT ""
736 $ WRITE SYS$OUTPUT "The Option ", ZLIB, " Is Invalid."
737 $ WRITE SYS$OUTPUT " Can't find header: ''file1'"
740 $ file1 = f$parse( "A.;", ZLIB)- "A.;"
742 $ file2 = f$parse( ZLIB, "libz.olb", , , "SYNTAX_ONLY")
743 $ if (f$search( file2) .eqs. "")
747 $ WRITE SYS$OUTPUT ""
748 $ WRITE SYS$OUTPUT "The Option ", ZLIB, " Is Invalid."
750 $ WRITE SYS$OUTPUT " Can't find library: ''file2'"
751 $ WRITE SYS$OUTPUT ""
756 $ WRITE SYS$OUTPUT ""
764 $ CCDEFS = """ZLIB=1"", "+ CCDEFS
765 $ CC_INCLUDES = CC_INCLUDES+ ", "+ file1
766 $ ZLIB_LIB = ", ''file2' /library"
770 $ WRITE SYS$OUTPUT "ZLIB library spec: ", file2
776 $! Check To See If The User Entered A Valid Parameter.
778 $ IF (P2.EQS."VAXC").OR.(P2.EQS."DECC").OR.(P2.EQS."GNUC")
781 $! Check To See If The User Wanted DECC.
786 $! Looks Like DECC, Set To Use DECC.
790 $! Tell The User We Are Using DECC.
792 $ WRITE SYS$OUTPUT "Using DECC 'C' Compiler."
797 $ IF ARCH.EQS."VAX" .AND. F$TRNLNM("DECC$CC_DEFAULT").NES."/DECC" -
799 $ CC = CC + " /''CC_OPTIMIZE' /''DEBUGGER' /STANDARD=RELAXED"+ -
800 "''POINTER_SIZE' /NOLIST /PREFIX=ALL" + -
801 " /INCLUDE=(''CC_INCLUDES') " + CCEXTRAFLAGS
803 $! Define The Linker Options File Name.
805 $ OPT_FILE = "VAX_DECC_OPTIONS.OPT"
811 $! Check To See If We Are To Use VAXC.
816 $! Looks Like VAXC, Set To Use VAXC.
820 $! Tell The User We Are Using VAX C.
822 $ WRITE SYS$OUTPUT "Using VAXC 'C' Compiler."
824 $! Compile Using VAXC.
829 $ WRITE SYS$OUTPUT "There is no VAX C on ''ARCH'!"
832 $ IF F$TRNLNM("DECC$CC_DEFAULT").EQS."/DECC" THEN CC = "CC /VAXC"
833 $ CC = CC + "/''CC_OPTIMIZE' /''DEBUGGER' /NOLIST" + -
834 "/INCLUDE=(''CC_INCLUDES')" + CCEXTRAFLAGS
835 $ CCDEFS = CCDEFS + ",""VAXC"""
837 $! Define <sys> As SYS$COMMON:[SYSLIB]
839 $ DEFINE /NOLOG SYS SYS$COMMON:[SYSLIB]
841 $! Define The Linker Options File Name.
843 $ OPT_FILE = "VAX_VAXC_OPTIONS.OPT"
849 $! Check To See If We Are To Use GNU C.
854 $! Looks Like GNUC, Set To Use GNUC.
858 $! Tell The User We Are Using GNUC.
860 $ WRITE SYS$OUTPUT "Using GNU 'C' Compiler."
864 $ CC = "GCC /NOCASE_HACK /''GCC_OPTIMIZE' /''DEBUGGER' /NOLIST" + -
865 "/INCLUDE=(''CC_INCLUDES')" + CCEXTRAFLAGS
867 $! Define The Linker Options File Name.
869 $ OPT_FILE = "VAX_GNUC_OPTIONS.OPT"
871 $! End The GNU C Check.
875 $! Set up default defines
877 $ CCDEFS = """FLAT_INC=1""," + CCDEFS
879 $! Finish up the definition of CC.
881 $ IF COMPILER .EQS. "DECC"
883 $ IF CCDISABLEWARNINGS .EQS. ""
885 $ CC4DISABLEWARNINGS = "DOLLARID"
887 $ CC4DISABLEWARNINGS = CCDISABLEWARNINGS + ",DOLLARID"
888 $ CCDISABLEWARNINGS = " /WARNING=(DISABLE=(" + CCDISABLEWARNINGS + "))"
890 $ CC4DISABLEWARNINGS = " /WARNING=(DISABLE=(" + CC4DISABLEWARNINGS + "))"
892 $ CCDISABLEWARNINGS = ""
893 $ CC4DISABLEWARNINGS = ""
895 $ CC = CC + " /DEFINE=(" + CCDEFS + ")" + CCDISABLEWARNINGS
897 $! Show user the result
899 $ WRITE /SYMBOL SYS$OUTPUT "Main Compiling Command: ", CC
901 $! Else The User Entered An Invalid Argument.
905 $! Tell The User We Don't Know What They Want.
907 $ WRITE SYS$OUTPUT ""
908 $ WRITE SYS$OUTPUT "The Option ",P2," Is Invalid. The Valid Options Are:"
909 $ WRITE SYS$OUTPUT ""
910 $ WRITE SYS$OUTPUT " VAXC : To Compile With VAX C."
911 $ WRITE SYS$OUTPUT " DECC : To Compile With DEC C."
912 $ WRITE SYS$OUTPUT " GNUC : To Compile With GNU C."
913 $ WRITE SYS$OUTPUT ""
920 $! Time to check the contents, and to make sure we get the correct library.
922 $ IF P3.EQS."SOCKETSHR" .OR. P3.EQS."MULTINET" .OR. P3.EQS."UCX" -
923 .OR. P3.EQS."TCPIP" .OR. P3.EQS."NONE"
926 $! Check to see if SOCKETSHR was chosen
928 $ IF P3.EQS."SOCKETSHR"
931 $! Set the library to use SOCKETSHR
933 $ TCPIP_LIB = ",SYS$DISK:[-.VMS]SOCKETSHR_SHR.OPT /OPTIONS"
935 $! Done with SOCKETSHR
939 $! Check to see if MULTINET was chosen
941 $ IF P3.EQS."MULTINET"
944 $! Set the library to use UCX emulation.
948 $! Done with MULTINET
952 $! Check to see if UCX was chosen
957 $! Set the library to use UCX.
959 $ TCPIP_LIB = ",SYS$DISK:[-.VMS]UCX_SHR_DECC.OPT /OPTIONS"
960 $ IF F$TRNLNM("UCX$IPC_SHR") .NES. ""
962 $ TCPIP_LIB = ",SYS$DISK:[-.VMS]UCX_SHR_DECC_LOG.OPT /OPTIONS"
964 $ IF COMPILER .NES. "DECC" .AND. ARCH .EQS. "VAX" THEN -
965 TCPIP_LIB = ",SYS$DISK:[-.VMS]UCX_SHR_VAXC.OPT /OPTIONS"
972 $! Check to see if TCPIP was chosen
977 $! Set the library to use TCPIP (post UCX).
979 $ TCPIP_LIB = ",SYS$DISK:[-.VMS]TCPIP_SHR_DECC.OPT /OPTIONS"
985 $! Check to see if NONE was chosen
990 $! Do not use a TCPIP library.
1000 $ WRITE SYS$OUTPUT "TCP/IP library spec: ", TCPIP_LIB- ","
1002 $! Else The User Entered An Invalid Argument.
1006 $! Tell The User We Don't Know What They Want.
1008 $ WRITE SYS$OUTPUT ""
1009 $ WRITE SYS$OUTPUT "The Option ",P3," Is Invalid. The Valid Options Are:"
1010 $ WRITE SYS$OUTPUT ""
1011 $ WRITE SYS$OUTPUT " SOCKETSHR : To link with SOCKETSHR TCP/IP library."
1012 $ WRITE SYS$OUTPUT " UCX : To link with UCX TCP/IP library."
1013 $ WRITE SYS$OUTPUT " TCPIP : To link with TCPIP (post UCX) TCP/IP library."
1014 $ WRITE SYS$OUTPUT ""
1020 $! Done with TCP/IP libraries
1024 $! Special Threads For OpenVMS v7.1 Or Later
1026 $! Written By: Richard Levitte
1027 $! richard@levitte.org
1030 $! Check To See If We Have A Option For P4.
1035 $! Get The Version Of VMS We Are Using.
1038 $ TMP = F$ELEMENT(0,"-",F$EXTRACT(1,4,F$GETSYI("VERSION")))
1039 $ TMP = F$INTEGER(F$ELEMENT(0,".",TMP)+F$ELEMENT(1,".",TMP))
1041 $! Check To See If The VMS Version Is v7.1 Or Later.
1046 $! We Have OpenVMS v7.1 Or Later, So Use The Special Threads.
1048 $ ISSEVEN := ,PTHREAD_USE_D4
1050 $! End The VMS Version Check.
1054 $! End The P4 Check.
1058 $! Time To RETURN...
1064 $! Save old value of the logical name OPENSSL
1066 $ __SAVE_OPENSSL = F$TRNLNM("OPENSSL","LNM$PROCESS_TABLE")
1068 $! Save directory information
1070 $ __HERE = F$PARSE(F$PARSE("A.;",F$ENVIRONMENT("PROCEDURE"))-"A.;","[]A.;") - "A.;"
1071 $ __HERE = F$EDIT(__HERE,"UPCASE")
1072 $ __TOP = __HERE - "TEST]"
1073 $ __INCLUDE = __TOP + "INCLUDE.OPENSSL]"
1074 $ __INTERNAL = __TOP + "CRYPTO.INCLUDE.INTERNAL]"
1076 $! Set up the logical name OPENSSL to point at the include directory
1078 $ DEFINE OPENSSL /NOLOG '__INCLUDE'
1079 $ DEFINE INTERNAL /NOLOG '__INTERNAL'
1087 $! Restore the logical name OPENSSL if it had a value
1089 $ IF __SAVE_OPENSSL .EQS. ""
1094 $ DEFINE /NOLOG OPENSSL '__SAVE_OPENSSL'