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 "executeables" will be placed in a directory called
16 $! [.xxx.EXE.TEST] where "xxx" denotes AXP or VAX depending on your machines
19 $! Specify RSAREF as P1 to compile with the RSAREF library instead of
20 $! the regular one. If you specify NORSAREF it will compile with the
21 $! regular RSAREF routines. (Note: If you are in the United States
22 $! you MUST compile with RSAREF unless you have a license from RSA).
24 $! Note: The RSAREF libraries are NOT INCLUDED and you have to
25 $! download it from "ftp://ftp.rsa.com/rsaref". You have to
26 $! get the ".tar-Z" file as the ".zip" file dosen't have the
27 $! directory structure stored. You have to extract the file
28 $! into the [.RSAREF] directory under the root directory as that
29 $! is where the scripts will look for the files.
31 $! Specify DEBUG or NODEBUG P2 to compile with or without debugger
34 $! Specify which compiler at P3 to try to compile under.
40 $! If you don't speficy a compiler, it will try to determine which
41 $! "C" compiler to use.
43 $! P4, if defined, sets a TCP/IP library to use, through one of the following
47 $! SOCKETSHR for SOCKETSHR+NETLIB
49 $! P5, if defined, sets a compiler thread NOT needed on OpenVMS 7.1 (and up)
52 $! Define A TCP/IP Library That We Will Need To Link To.
53 $! (That is, If Wee Need To Link To One.)
57 $! Check Which Architecture We Are Using.
59 $ IF (F$GETSYI("CPU").GE.128)
62 $! The Architecture Is AXP.
70 $! The Architecture Is VAX.
74 $! End The Architecture Check.
78 $! Check To Make Sure We Have Valid Command Line Parameters.
82 $! Initialise logical names and such
86 $! Tell The User What Kind of Machine We Run On.
88 $ WRITE SYS$OUTPUT "Compiling On A ",ARCH," Machine."
90 $! Define The CRYPTO-LIB We Are To Use.
92 $ CRYPTO_LIB := SYS$DISK:[-.'ARCH'.EXE.CRYPTO]LIBCRYPTO.OLB
94 $! Define The RSAREF-LIB We Are To Use.
96 $ RSAREF_LIB := SYS$DISK:[-.'ARCH'.EXE.RSAREF]LIBRSAGLUE.OLB
98 $! Define The SSL We Are To Use.
100 $ SSL_LIB := SYS$DISK:[-.'ARCH'.EXE.SSL]LIBSSL.OLB
102 $! Define The OBJ Directory.
104 $ OBJ_DIR := SYS$DISK:[-.'ARCH'.OBJ.TEST]
106 $! Check To See If The Architecture Specific OBJ Directory Exists.
108 $ IF (F$PARSE(OBJ_DIR).EQS."")
111 $! The EXE Directory Dosen't Exist, So Create It.
113 $ CREATE/DIRECTORY 'OBJ_DIR'
115 $! End The Architecture Specific OBJ Directory Check.
119 $! Define The EXE Directory.
121 $ EXE_DIR := SYS$DISK:[-.'ARCH'.EXE.TEST]
123 $! Check To See If The Architecture Specific EXE Directory Exists.
125 $ IF (F$PARSE(EXE_DIR).EQS."")
128 $! The EXE Directory Dosen't Exist, So Create It.
130 $ CREATE/DIRECTORY 'EXE_DIR'
132 $! End The Architecture Specific EXE Directory Check.
136 $! Check To See If We Have The Proper Libraries.
140 $! Check To See If We Have A Linker Option File.
142 $ GOSUB CHECK_OPT_FILE
144 $! Define The TEST Files.
146 $ TEST_FILES = "BNTEST,IDEATEST,MD2TEST,MD4TEST,MD5TEST,HMACTEST,"+ -
147 "RC2TEST,RC4TEST,RC5TEST,"+ -
148 "DESTEST,SHATEST,SHA1TEST,MDC2TEST,RMDTEST,"+ -
149 "RANDTEST,DHTEST,"+ -
150 "BFTEST,CASTTEST,SSLTEST,EXPTEST,DSATEST,RSA_TEST,ENGINETEST"
151 $ TCPIP_PROGRAMS = ",,"
152 $ IF COMPILER .EQS. "VAXC" THEN -
153 TCPIP_PROGRAMS = ",SSLTEST,"
155 $! Define A File Counter And Set It To "0".
159 $! Top Of The File Loop.
163 $! O.K, Extract The File Name From The File List.
165 $ FILE_NAME = F$ELEMENT(FILE_COUNTER,",",TEST_FILES)
167 $! Check To See If We Are At The End Of The File List.
169 $ IF (FILE_NAME.EQS.",") THEN GOTO FILE_DONE
171 $! Increment The Counter.
173 $ FILE_COUNTER = FILE_COUNTER + 1
175 $! Create The Source File Name.
177 $ SOURCE_FILE = "SYS$DISK:[]" + FILE_NAME + ".C"
179 $! Create The Object File Name.
181 $ OBJECT_FILE = OBJ_DIR + FILE_NAME + ".OBJ"
183 $! Create The Executable File Name.
185 $ EXE_FILE = EXE_DIR + FILE_NAME + ".EXE"
186 $ ON WARNING THEN GOTO NEXT_FILE
188 $! Check To See If The File We Want To Compile Actually Exists.
190 $ IF (F$SEARCH(SOURCE_FILE).EQS."")
193 $! Tell The User That The File Dosen't Exist.
195 $ WRITE SYS$OUTPUT ""
196 $ WRITE SYS$OUTPUT "The File ",SOURCE_FILE," Dosen't Exist."
197 $ WRITE SYS$OUTPUT ""
204 $! Tell The User What We Are Building.
206 $ WRITE SYS$OUTPUT "Building The ",FILE_NAME," Test Program."
210 $ ON ERROR THEN GOTO NEXT_FILE
211 $ CC/OBJECT='OBJECT_FILE' 'SOURCE_FILE'
212 $ ON WARNING THEN GOTO NEXT_FILE
214 $! Check If What We Are About To Compile Works Without A TCP/IP Library.
216 $ IF ((TCPIP_LIB.EQS."").AND.((TCPIP_PROGRAMS-FILE_NAME).NES.TCPIP_PROGRAMS))
219 $! Inform The User That A TCP/IP Library Is Needed To Compile This Program.
221 $ WRITE SYS$OUTPUT FILE_NAME," Needs A TCP/IP Library. Can't Link. Skipping..."
224 $! End The TCP/IP Library Check.
228 $! Link The Program, Check To See If We Need To Link With RSAREF Or Not.
230 $ IF (RSAREF.EQS."TRUE")
233 $! Check To See If We Are To Link With A Specific TCP/IP Library.
235 $ IF (TCPIP_LIB.NES."")
238 $! Link With The RSAREF Library And A Specific TCP/IP Library.
240 $ LINK/'DEBUGGER'/'TRACEBACK' /EXE='EXE_FILE' -
242 'SSL_LIB'/LIBRARY,'CRYPTO_LIB'/LIBRARY,'RSAREF_LIB'/LIBRARY, -
243 'TCPIP_LIB','OPT_FILE'/OPTION
249 $! Link With The RSAREF Library And NO TCP/IP Library.
251 $ LINK/'DEBUGGER'/'TRACEBACK' /EXE='EXE_FILE' -
253 'SSL_LIB'/LIBRARY,'CRYPTO_LIB'/LIBRARY,'RSAREF_LIB'/LIBRARY, -
256 $! End The TCP/IP Library Check.
264 $! Don't Link With The RSAREF Routines.
267 $! Check To See If We Are To Link With A Specific TCP/IP Library.
269 $ IF (TCPIP_LIB.NES."")
272 $! Don't Link With The RSAREF Routines And TCP/IP Library.
274 $ LINK/'DEBUGGER'/'TRACEBACK' /EXE='EXE_FILE' -
276 'SSL_LIB'/LIBRARY,'CRYPTO_LIB'/LIBRARY, -
277 'TCPIP_LIB','OPT_FILE'/OPTION
283 $! Don't Link With The RSAREF Routines And Link With A TCP/IP Library.
285 $ LINK/'DEBUGGER'/'TRACEBACK' /EXE='EXE_FILE' -
287 'SSL_LIB'/LIBRARY,'CRYPTO_LIB'/LIBRARY, -
290 $! End The TCP/IP Library Check.
294 $! End The RSAREF Link Check.
298 $! Go Back And Do It Again.
302 $! All Done With This Library Part.
306 $! All Done, Time To Exit.
312 $! Check For The Link Option FIle.
316 $! Check To See If We Need To Make A VAX C Option File.
318 $ IF (COMPILER.EQS."VAXC")
321 $! Check To See If We Already Have A VAX C Linker Option File.
323 $ IF (F$SEARCH(OPT_FILE).EQS."")
326 $! We Need A VAX C Linker Option File.
331 ! Default System Options File To Link Agianst
332 ! The Sharable VAX C Runtime Library.
334 SYS$SHARE:VAXCRTL.EXE/SHARE
337 $! End The Option File Check.
341 $! End The VAXC Check.
345 $! Check To See If We Need A GNU C Option File.
347 $ IF (COMPILER.EQS."GNUC")
350 $! Check To See If We Already Have A GNU C Linker Option File.
352 $ IF (F$SEARCH(OPT_FILE).EQS."")
355 $! We Need A GNU C Linker Option File.
360 ! Default System Options File To Link Agianst
361 ! The Sharable C Runtime Library.
363 GNU_CC:[000000]GCCLIB/LIBRARY
364 SYS$SHARE:VAXCRTL/SHARE
367 $! End The Option File Check.
371 $! End The GNU C Check.
375 $! Check To See If We Need A DEC C Option File.
377 $ IF (COMPILER.EQS."DECC")
380 $! Check To See If We Already Have A DEC C Linker Option File.
382 $ IF (F$SEARCH(OPT_FILE).EQS."")
385 $! Figure Out If We Need An AXP Or A VAX Linker Option File.
387 $ IF (ARCH.EQS."VAX")
390 $! We Need A DEC C Linker Option File For VAX.
395 ! Default System Options File To Link Agianst
396 ! The Sharable DEC C Runtime Library.
398 SYS$SHARE:DECC$SHR.EXE/SHARE
405 $! Create The AXP Linker Option File.
410 ! Default System Options File For AXP To Link Agianst
411 ! The Sharable C Runtime Library.
413 SYS$SHARE:CMA$OPEN_LIB_SHR/SHARE
414 SYS$SHARE:CMA$OPEN_RTL/SHARE
417 $! End The VAX/AXP DEC C Option File Check.
421 $! End The Option File Search.
425 $! End The DEC C Check.
429 $! Tell The User What Linker Option File We Are Using.
431 $ WRITE SYS$OUTPUT "Using Linker Option File ",OPT_FILE,"."
437 $! Check To See If We Have The Appropiate Libraries.
441 $! Look For The Library LIBCRYPTO.OLB.
443 $ IF (F$SEARCH(CRYPTO_LIB).EQS."")
446 $! Tell The User We Can't Find The LIBCRYPTO.OLB Library.
448 $ WRITE SYS$OUTPUT ""
449 $ WRITE SYS$OUTPUT "Can't Find The Library ",CRYPTO_LIB,"."
450 $ WRITE SYS$OUTPUT "We Can't Link Without It."
451 $ WRITE SYS$OUTPUT ""
453 $! Since We Can't Link Without It, Exit.
457 $! End The Crypto Library Check.
461 $! See If We Need The RSAREF Library...
463 $ IF (RSAREF.EQS."TRUE")
466 $! Look For The Library LIBRSAGLUE.OLB.
468 $ IF (F$SEARCH(RSAREF_LIB).EQS."")
471 $! Tell The User We Can't Find The LIBRSAGLUE.OLB Library.
473 $ WRITE SYS$OUTPUT ""
474 $ WRITE SYS$OUTPUT "Can't Find The Library ",RSAREF_LIB,"."
475 $ WRITE SYS$OUTPUT "We Can't Link Without It."
476 $ WRITE SYS$OUTPUT ""
478 $! Since We Can't Link Without It, Exit.
483 $! End The RSAREF Library Check.
487 $! Look For The Library LIBSSL.OLB.
489 $ IF (F$SEARCH(SSL_LIB).EQS."")
492 $! Tell The User We Can't Find The LIBSSL.OLB Library.
494 $ WRITE SYS$OUTPUT ""
495 $ WRITE SYS$OUTPUT "Can't Find The Library ",SSL_LIB,"."
496 $ WRITE SYS$OUTPUT "Some Of The Test Programs Need To Link To It."
497 $ WRITE SYS$OUTPUT ""
499 $! Since We Can't Link Without It, Exit.
503 $! End The SSL Library Check.
511 $! Check The User's Options.
515 $! Check To See If P1 Is Blank.
517 $ IF (P1.EQS."NORSAREF")
520 $! P1 Is NORSAREF, So Compile With The Regular RSA Libraries.
525 $! Check To See If We Are To Use The RSAREF Library.
527 $ IF (P1.EQS."RSAREF")
530 $! Check To Make Sure We Have The RSAREF Source Code Directory.
532 $ IF (F$SEARCH("SYS$DISK:[-.RSAREF]SOURCE.DIR").EQS."")
535 $! We Don't Have The RSAREF Souce Code Directory, So Tell The
538 $ WRITE SYS$OUTPUT ""
539 $ WRITE SYS$OUTPUT "It appears that you don't have the RSAREF Souce Code."
540 $ WRITE SYS$OUTPUT "You need to go to 'ftp://ftp.rsa.com/rsaref'. You have to"
541 $ WRITE SYS$OUTPUT "get the '.tar-Z' file as the '.zip' file dosen't have the"
542 $ WRITE SYS$OUTPUT "directory structure stored. You have to extract the file"
543 $ WRITE SYS$OUTPUT "into the [.RSAREF] directory under the root directory"
544 $ WRITE SYS$OUTPUT "as that is where the scripts will look for the files."
545 $ WRITE SYS$OUTPUT ""
551 $! Else, Compile Using The RSAREF Library.
558 $! They Entered An Invalid Option..
560 $ WRITE SYS$OUTPUT ""
561 $ WRITE SYS$OUTPUT "The Option ",P1," Is Invalid. The Valid Options Are:"
562 $ WRITE SYS$OUTPUT ""
563 $ WRITE SYS$OUTPUT " RSAREF : Compile With The RSAREF Library."
564 $ WRITE SYS$OUTPUT " NORSAREF : Compile With The Regular RSA Library."
565 $ WRITE SYS$OUTPUT ""
571 $! End The Valid Arguement Check.
579 $! Check To See If P2 Is Blank.
581 $ IF (P2.EQS."NODEBUG")
584 $! P2 Is NODEBUG, So Compile Without Debugger Information.
586 $ DEBUGGER = "NODEBUG"
587 $ TRACEBACK = "NOTRACEBACK"
588 $ GCC_OPTIMIZE = "OPTIMIZE"
589 $ CC_OPTIMIZE = "OPTIMIZE"
590 $ WRITE SYS$OUTPUT "No Debugger Information Will Be Produced During Compile."
591 $ WRITE SYS$OUTPUT "Compiling With Compiler Optimization."
597 $! Check To See If We Are To Compile With Debugger Information.
599 $ IF (P2.EQS."DEBUG")
602 $! Compile With Debugger Information.
605 $ TRACEBACK = "TRACEBACK"
606 $ GCC_OPTIMIZE = "NOOPTIMIZE"
607 $ CC_OPTIMIZE = "NOOPTIMIZE"
608 $ WRITE SYS$OUTPUT "Debugger Information Will Be Produced During Compile."
609 $ WRITE SYS$OUTPUT "Compiling Without Compiler Optimization."
615 $! Tell The User Entered An Invalid Option..
617 $ WRITE SYS$OUTPUT ""
618 $ WRITE SYS$OUTPUT "The Option ",P2," Is Invalid. The Valid Options Are:"
619 $ WRITE SYS$OUTPUT ""
620 $ WRITE SYS$OUTPUT " DEBUG : Compile With The Debugger Information."
621 $ WRITE SYS$OUTPUT " NODEBUG : Compile Without The Debugger Information."
622 $ WRITE SYS$OUTPUT ""
628 $! End The Valid Arguement Check.
636 $! Check To See If P3 Is Blank.
641 $! O.K., The User Didn't Specify A Compiler, Let's Try To
642 $! Find Out Which One To Use.
644 $! Check To See If We Have GNU C.
646 $ IF (F$TRNLNM("GNU_CC").NES."")
649 $! Looks Like GNUC, Set To Use GNUC.
653 $! End The GNU C Compiler Check.
657 $! Check To See If We Have VAXC Or DECC.
659 $ IF (ARCH.EQS."AXP").OR.(F$TRNLNM("DECC$CC_DEFAULT").NES."")
662 $! Looks Like DECC, Set To Use DECC.
670 $! Looks Like VAXC, Set To Use VAXC.
674 $! End The VAXC Compiler Check.
678 $! End The DECC & VAXC Compiler Check.
682 $! End The Compiler Check.
686 $! Check To See If We Have A Option For P4.
691 $! Find out what socket library we have available
693 $ IF F$PARSE("SOCKETSHR:") .NES. ""
696 $! We have SOCKETSHR, and it is my opinion that it's the best to use.
702 $ WRITE SYS$OUTPUT "Using SOCKETSHR for TCP/IP"
704 $! Else, let's look for something else
708 $! Like UCX (the reason to do this before Multinet is that the UCX
709 $! emulation is easier to use...)
711 $ IF F$TRNLNM("UCX$IPC_SHR") .NES. "" -
712 .OR. F$PARSE("SYS$SHARE:UCX$IPC_SHR.EXE") .NES. "" -
713 .OR. F$PARSE("SYS$LIBRARY:UCX$IPC.OLB") .NES. ""
716 $! Last resort: a UCX or UCX-compatible library
722 $ WRITE SYS$OUTPUT "Using UCX or an emulation thereof for TCP/IP"
730 $! Set Up Initial CC Definitions, Possibly With User Ones
732 $ CCDEFS = "VMS=1,TCPIP_TYPE_''P4'"
733 $ IF F$TRNLNM("OPENSSL_NO_ASM") THEN CCDEFS = CCDEFS + ",NO_ASM"
734 $ IF F$TRNLNM("OPENSSL_NO_RSA") THEN CCDEFS = CCDEFS + ",NO_RSA"
735 $ IF F$TRNLNM("OPENSSL_NO_DSA") THEN CCDEFS = CCDEFS + ",NO_DSA"
736 $ IF F$TRNLNM("OPENSSL_NO_DH") THEN CCDEFS = CCDEFS + ",NO_DH"
737 $ IF F$TRNLNM("OPENSSL_NO_MD2") THEN CCDEFS = CCDEFS + ",NO_MD2"
738 $ IF F$TRNLNM("OPENSSL_NO_MD5") THEN CCDEFS = CCDEFS + ",NO_MD5"
739 $ IF F$TRNLNM("OPENSSL_NO_RIPEMD") THEN CCDEFS = CCDEFS + ",NO_RIPEMD"
740 $ IF F$TRNLNM("OPENSSL_NO_SHA") THEN CCDEFS = CCDEFS + ",NO_SHA"
741 $ IF F$TRNLNM("OPENSSL_NO_SHA0") THEN CCDEFS = CCDEFS + ",NO_SHA0"
742 $ IF F$TRNLNM("OPENSSL_NO_SHA1") THEN CCDEFS = CCDEFS + ",NO_SHA1"
743 $ IF F$TRNLNM("OPENSSL_NO_DES")
745 $ CCDEFS = CCDEFS + ",NO_DES,NO_MDC2"
747 $ IF F$TRNLNM("OPENSSL_NO_MDC2") THEN CCDEFS = CCDEFS + ",NO_MDC2"
749 $ IF F$TRNLNM("OPENSSL_NO_RC2") THEN CCDEFS = CCDEFS + ",NO_RC2"
750 $ IF F$TRNLNM("OPENSSL_NO_RC4") THEN CCDEFS = CCDEFS + ",NO_RC4"
751 $ IF F$TRNLNM("OPENSSL_NO_RC5") THEN CCDEFS = CCDEFS + ",NO_RC5"
752 $ IF F$TRNLNM("OPENSSL_NO_IDEA") THEN CCDEFS = CCDEFS + ",NO_IDEA"
753 $ IF F$TRNLNM("OPENSSL_NO_BF") THEN CCDEFS = CCDEFS + ",NO_BF"
754 $ IF F$TRNLNM("OPENSSL_NO_CAST") THEN CCDEFS = CCDEFS + ",NO_CAST"
755 $ IF F$TRNLNM("OPENSSL_NO_HMAC") THEN CCDEFS = CCDEFS + ",NO_HMAC"
756 $ IF F$TRNLNM("OPENSSL_NO_SSL2") THEN CCDEFS = CCDEFS + ",NO_SSL2"
757 $ IF F$TYPE(USER_CCDEFS) .NES. "" THEN CCDEFS = CCDEFS + "," + USER_CCDEFS
759 $ IF F$TYPE(USER_CCFLAGS) .NES. "" THEN CCEXTRAFLAGS = USER_CCFLAGS
760 $ CCDISABLEWARNINGS = "LONGLONGTYPE,LONGLONGSUFX"
761 $ IF F$TYPE(USER_CCDISABLEWARNINGS) .NES. "" THEN -
762 CCDISABLEWARNINGS = CCDISABLEWARNINGS + "," + USER_CCDISABLEWARNINGS
764 $! Check To See If The User Entered A Valid Paramter.
766 $ IF (P3.EQS."VAXC").OR.(P3.EQS."DECC").OR.(P3.EQS."GNUC")
769 $! Check To See If The User Wanted DECC.
774 $! Looks Like DECC, Set To Use DECC.
778 $! Tell The User We Are Using DECC.
780 $ WRITE SYS$OUTPUT "Using DECC 'C' Compiler."
785 $ IF ARCH.EQS."VAX" .AND. F$TRNLNM("DECC$CC_DEFAULT").NES."/DECC" -
787 $ CC = CC + "/''CC_OPTIMIZE'/''DEBUGGER'/STANDARD=ANSI89" + -
788 "/NOLIST/PREFIX=ALL" + CCEXTRAFLAGS
790 $! Define The Linker Options File Name.
792 $ OPT_FILE = "SYS$DISK:[]VAX_DECC_OPTIONS.OPT"
798 $! Check To See If We Are To Use VAXC.
803 $! Looks Like VAXC, Set To Use VAXC.
807 $! Tell The User We Are Using VAX C.
809 $ WRITE SYS$OUTPUT "Using VAXC 'C' Compiler."
811 $! Compile Using VAXC.
816 $ WRITE SYS$OUTPUT "There is no VAX C on Alpha!"
819 $ IF F$TRNLNM("DECC$CC_DEFAULT").EQS."/DECC" THEN CC = "CC/VAXC"
820 $ CC = CC + "/''CC_OPTIMIZE'/''DEBUGGER'/NOLIST" + CCEXTRAFLAGS
821 $ CCDEFS = CCDEFS + ",""VAXC"""
823 $! Define <sys> As SYS$COMMON:[SYSLIB]
825 $ DEFINE/NOLOG SYS SYS$COMMON:[SYSLIB]
827 $! Define The Linker Options File Name.
829 $ OPT_FILE = "SYS$DISK:[]VAX_VAXC_OPTIONS.OPT"
835 $! Check To See If We Are To Use GNU C.
840 $! Looks Like GNUC, Set To Use GNUC.
844 $! Tell The User We Are Using GNUC.
846 $ WRITE SYS$OUTPUT "Using GNU 'C' Compiler."
850 $ CC = "GCC/NOCASE_HACK/''GCC_OPTIMIZE'/''DEBUGGER'/NOLIST" + CCEXTRAFLAGS
852 $! Define The Linker Options File Name.
854 $ OPT_FILE = "SYS$DISK:[]VAX_GNUC_OPTIONS.OPT"
856 $! End The GNU C Check.
860 $! Set up default defines
862 $ CCDEFS = """FLAT_INC=1""," + CCDEFS
864 $! Check To See If We Are To Compile With RSAREF Routines.
866 $ IF (RSAREF.EQS."TRUE")
869 $! Compile With RSAREF.
871 $ CCDEFS = CCDEFS + ",""RSAref=1"""
873 $! Tell The User This.
875 $ WRITE SYS$OUTPUT "Compiling With RSAREF Routines."
877 $! Else, We Don't Care. Compile Without The RSAREF Library.
881 $! Tell The User We Are Compile Without The RSAREF Routines.
883 $ WRITE SYS$OUTPUT "Compiling Without The RSAREF Routines.
885 $! End The RSAREF Check.
889 $! Finish up the definition of CC.
891 $ IF COMPILER .EQS. "DECC"
893 $ IF CCDISABLEWARNINGS .EQS. ""
895 $ CC4DISABLEWARNINGS = "DOLLARID"
897 $ CC4DISABLEWARNINGS = CCDISABLEWARNINGS + ",DOLLARID"
898 $ CCDISABLEWARNINGS = "/WARNING=(DISABLE=(" + CCDISABLEWARNINGS + "))"
900 $ CC4DISABLEWARNINGS = "/WARNING=(DISABLE=(" + CC4DISABLEWARNINGS + "))"
902 $ CCDISABLEWARNINGS = ""
903 $ CC4DISABLEWARNINGS = ""
905 $ CC = CC + "/DEFINE=(" + CCDEFS + ")" + CCDISABLEWARNINGS
907 $! Show user the result
909 $ WRITE SYS$OUTPUT "Main Compiling Command: ",CC
911 $! Else The User Entered An Invalid Arguement.
915 $! Tell The User We Don't Know What They Want.
917 $ WRITE SYS$OUTPUT ""
918 $ WRITE SYS$OUTPUT "The Option ",P3," Is Invalid. The Valid Options Are:"
919 $ WRITE SYS$OUTPUT ""
920 $ WRITE SYS$OUTPUT " VAXC : To Compile With VAX C."
921 $ WRITE SYS$OUTPUT " DECC : To Compile With DEC C."
922 $ WRITE SYS$OUTPUT " GNUC : To Compile With GNU C."
923 $ WRITE SYS$OUTPUT ""
930 $! Time to check the contents, and to make sure we get the correct library.
932 $ IF P4.EQS."SOCKETSHR" .OR. P4.EQS."MULTINET" .OR. P4.EQS."UCX"
935 $! Check to see if SOCKETSHR was chosen
937 $ IF P4.EQS."SOCKETSHR"
940 $! Set the library to use SOCKETSHR
942 $ TCPIP_LIB = "[-.VMS]SOCKETSHR_SHR.OPT/OPT"
944 $! Done with SOCKETSHR
948 $! Check to see if MULTINET was chosen
950 $ IF P4.EQS."MULTINET"
953 $! Set the library to use UXC emulation.
957 $! Done with MULTINET
961 $! Check to see if UCX was chosen
966 $! Set the library to use UCX.
968 $ TCPIP_LIB = "[-.VMS]UCX_SHR_DECC.OPT/OPT"
969 $ IF F$TRNLNM("UCX$IPC_SHR") .NES. ""
971 $ TCPIP_LIB = "[-.VMS]UCX_SHR_DECC_LOG.OPT/OPT"
973 $ IF COMPILER .NES. "DECC" .AND. ARCH .EQS. "VAX" THEN -
974 TCPIP_LIB = "[-.VMS]UCX_SHR_VAXC.OPT/OPT"
983 $ WRITE SYS$OUTPUT "TCP/IP library spec: ", TCPIP_LIB
985 $! Else The User Entered An Invalid Arguement.
989 $! Tell The User We Don't Know What They Want.
991 $ WRITE SYS$OUTPUT ""
992 $ WRITE SYS$OUTPUT "The Option ",P4," Is Invalid. The Valid Options Are:"
993 $ WRITE SYS$OUTPUT ""
994 $ WRITE SYS$OUTPUT " SOCKETSHR : To link with SOCKETSHR TCP/IP library."
995 $ WRITE SYS$OUTPUT " UCX : To link with UCX TCP/IP library."
996 $ WRITE SYS$OUTPUT ""
1002 $! Done with TCP/IP libraries
1006 $! Special Threads For OpenVMS v7.1 Or Later
1008 $! Written By: Richard Levitte
1009 $! richard@levitte.org
1012 $! Check To See If We Have A Option For P5.
1017 $! Get The Version Of VMS We Are Using.
1020 $ TMP = F$ELEMENT(0,"-",F$EXTRACT(1,4,F$GETSYI("VERSION")))
1021 $ TMP = F$INTEGER(F$ELEMENT(0,".",TMP)+F$ELEMENT(1,".",TMP))
1023 $! Check To See If The VMS Version Is v7.1 Or Later.
1028 $! We Have OpenVMS v7.1 Or Later, So Use The Special Threads.
1030 $ ISSEVEN := ,PTHREAD_USE_D4
1032 $! End The VMS Version Check.
1036 $! End The P5 Check.
1040 $! Time To RETURN...
1046 $! Save old value of the logical name OPENSSL
1048 $ __SAVE_OPENSSL = F$TRNLNM("OPENSSL","LNM$PROCESS_TABLE")
1050 $! Save directory information
1052 $ __HERE = F$PARSE(F$PARSE("A.;",F$ENVIRONMENT("PROCEDURE"))-"A.;","[]A.;") - "A.;"
1053 $ __TOP = __HERE - "TEST]"
1054 $ __INCLUDE = __TOP + "INCLUDE.OPENSSL]"
1056 $! Set up the logical name OPENSSL to point at the include directory
1058 $ DEFINE OPENSSL/NOLOG '__INCLUDE'
1066 $! Restore the logical name OPENSSL if it had a value
1068 $ IF __SAVE_OPENSSL .EQS. ""
1072 $ DEFINE/NOLOG OPENSSL '__SAVE_OPENSSL'