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.
518 $ IF (P1.EQS."NORSAREF")
521 $! P1 Is NORSAREF, So Compile With The Regular RSA Libraries.
526 $! Check To See If We Are To Use The RSAREF Library.
528 $ IF (P1.EQS."RSAREF")
531 $! Check To Make Sure We Have The RSAREF Source Code Directory.
533 $ IF (F$SEARCH("SYS$DISK:[-.RSAREF]SOURCE.DIR").EQS."")
536 $! We Don't Have The RSAREF Souce Code Directory, So Tell The
539 $ WRITE SYS$OUTPUT ""
540 $ WRITE SYS$OUTPUT "It appears that you don't have the RSAREF Souce Code."
541 $ WRITE SYS$OUTPUT "You need to go to 'ftp://ftp.rsa.com/rsaref'. You have to"
542 $ WRITE SYS$OUTPUT "get the '.tar-Z' file as the '.zip' file dosen't have the"
543 $ WRITE SYS$OUTPUT "directory structure stored. You have to extract the file"
544 $ WRITE SYS$OUTPUT "into the [.RSAREF] directory under the root directory"
545 $ WRITE SYS$OUTPUT "as that is where the scripts will look for the files."
546 $ WRITE SYS$OUTPUT ""
552 $! Else, Compile Using The RSAREF Library.
559 $! They Entered An Invalid Option..
561 $ WRITE SYS$OUTPUT ""
562 $ WRITE SYS$OUTPUT "The Option ",P1," Is Invalid. The Valid Options Are:"
563 $ WRITE SYS$OUTPUT ""
564 $ WRITE SYS$OUTPUT " RSAREF : Compile With The RSAREF Library."
565 $ WRITE SYS$OUTPUT " NORSAREF : Compile With The Regular RSA Library."
566 $ WRITE SYS$OUTPUT ""
572 $! End The Valid Arguement Check.
580 $! Check To See If P2 Is Blank.
582 $ IF (P2.EQS."NODEBUG")
585 $! P2 Is NODEBUG, So Compile Without Debugger Information.
587 $ DEBUGGER = "NODEBUG"
588 $ TRACEBACK = "NOTRACEBACK"
589 $ GCC_OPTIMIZE = "OPTIMIZE"
590 $ CC_OPTIMIZE = "OPTIMIZE"
591 $ WRITE SYS$OUTPUT "No Debugger Information Will Be Produced During Compile."
592 $ WRITE SYS$OUTPUT "Compiling With Compiler Optimization."
598 $! Check To See If We Are To Compile With Debugger Information.
600 $ IF (P2.EQS."DEBUG")
603 $! Compile With Debugger Information.
606 $ TRACEBACK = "TRACEBACK"
607 $ GCC_OPTIMIZE = "NOOPTIMIZE"
608 $ CC_OPTIMIZE = "NOOPTIMIZE"
609 $ WRITE SYS$OUTPUT "Debugger Information Will Be Produced During Compile."
610 $ WRITE SYS$OUTPUT "Compiling Without Compiler Optimization."
616 $! Tell The User Entered An Invalid Option..
618 $ WRITE SYS$OUTPUT ""
619 $ WRITE SYS$OUTPUT "The Option ",P2," Is Invalid. The Valid Options Are:"
620 $ WRITE SYS$OUTPUT ""
621 $ WRITE SYS$OUTPUT " DEBUG : Compile With The Debugger Information."
622 $ WRITE SYS$OUTPUT " NODEBUG : Compile Without The Debugger Information."
623 $ WRITE SYS$OUTPUT ""
629 $! End The Valid Arguement Check.
637 $! Check To See If P3 Is Blank.
642 $! O.K., The User Didn't Specify A Compiler, Let's Try To
643 $! Find Out Which One To Use.
645 $! Check To See If We Have GNU C.
647 $ IF (F$TRNLNM("GNU_CC").NES."")
650 $! Looks Like GNUC, Set To Use GNUC.
654 $! End The GNU C Compiler Check.
658 $! Check To See If We Have VAXC Or DECC.
660 $ IF (ARCH.EQS."AXP").OR.(F$TRNLNM("DECC$CC_DEFAULT").NES."")
663 $! Looks Like DECC, Set To Use DECC.
671 $! Looks Like VAXC, Set To Use VAXC.
675 $! End The VAXC Compiler Check.
679 $! End The DECC & VAXC Compiler Check.
683 $! End The Compiler Check.
687 $! Check To See If We Have A Option For P4.
692 $! Find out what socket library we have available
694 $ IF F$PARSE("SOCKETSHR:") .NES. ""
697 $! We have SOCKETSHR, and it is my opinion that it's the best to use.
703 $ WRITE SYS$OUTPUT "Using SOCKETSHR for TCP/IP"
705 $! Else, let's look for something else
709 $! Like UCX (the reason to do this before Multinet is that the UCX
710 $! emulation is easier to use...)
712 $ IF F$TRNLNM("UCX$IPC_SHR") .NES. "" -
713 .OR. F$PARSE("SYS$SHARE:UCX$IPC_SHR.EXE") .NES. "" -
714 .OR. F$PARSE("SYS$LIBRARY:UCX$IPC.OLB") .NES. ""
717 $! Last resort: a UCX or UCX-compatible library
723 $ WRITE SYS$OUTPUT "Using UCX or an emulation thereof for TCP/IP"
731 $! Set Up Initial CC Definitions, Possibly With User Ones
733 $ CCDEFS = "VMS=1,TCPIP_TYPE_''P4'"
734 $ IF F$TRNLNM("OPENSSL_NO_ASM") THEN CCDEFS = CCDEFS + ",NO_ASM"
735 $ IF F$TRNLNM("OPENSSL_NO_RSA") THEN CCDEFS = CCDEFS + ",NO_RSA"
736 $ IF F$TRNLNM("OPENSSL_NO_DSA") THEN CCDEFS = CCDEFS + ",NO_DSA"
737 $ IF F$TRNLNM("OPENSSL_NO_DH") THEN CCDEFS = CCDEFS + ",NO_DH"
738 $ IF F$TRNLNM("OPENSSL_NO_MD2") THEN CCDEFS = CCDEFS + ",NO_MD2"
739 $ IF F$TRNLNM("OPENSSL_NO_MD5") THEN CCDEFS = CCDEFS + ",NO_MD5"
740 $ IF F$TRNLNM("OPENSSL_NO_RIPEMD") THEN CCDEFS = CCDEFS + ",NO_RIPEMD"
741 $ IF F$TRNLNM("OPENSSL_NO_SHA") THEN CCDEFS = CCDEFS + ",NO_SHA"
742 $ IF F$TRNLNM("OPENSSL_NO_SHA0") THEN CCDEFS = CCDEFS + ",NO_SHA0"
743 $ IF F$TRNLNM("OPENSSL_NO_SHA1") THEN CCDEFS = CCDEFS + ",NO_SHA1"
744 $ IF F$TRNLNM("OPENSSL_NO_DES")
746 $ CCDEFS = CCDEFS + ",NO_DES,NO_MDC2"
748 $ IF F$TRNLNM("OPENSSL_NO_MDC2") THEN CCDEFS = CCDEFS + ",NO_MDC2"
750 $ IF F$TRNLNM("OPENSSL_NO_RC2") THEN CCDEFS = CCDEFS + ",NO_RC2"
751 $ IF F$TRNLNM("OPENSSL_NO_RC4") THEN CCDEFS = CCDEFS + ",NO_RC4"
752 $ IF F$TRNLNM("OPENSSL_NO_RC5") THEN CCDEFS = CCDEFS + ",NO_RC5"
753 $ IF F$TRNLNM("OPENSSL_NO_IDEA") THEN CCDEFS = CCDEFS + ",NO_IDEA"
754 $ IF F$TRNLNM("OPENSSL_NO_BF") THEN CCDEFS = CCDEFS + ",NO_BF"
755 $ IF F$TRNLNM("OPENSSL_NO_CAST") THEN CCDEFS = CCDEFS + ",NO_CAST"
756 $ IF F$TRNLNM("OPENSSL_NO_HMAC") THEN CCDEFS = CCDEFS + ",NO_HMAC"
757 $ IF F$TRNLNM("OPENSSL_NO_SSL2") THEN CCDEFS = CCDEFS + ",NO_SSL2"
758 $ IF F$TYPE(USER_CCDEFS) .NES. "" THEN CCDEFS = CCDEFS + "," + USER_CCDEFS
760 $ IF F$TYPE(USER_CCFLAGS) .NES. "" THEN CCEXTRAFLAGS = USER_CCFLAGS
761 $ CCDISABLEWARNINGS = "LONGLONGTYPE,LONGLONGSUFX"
762 $ IF F$TYPE(USER_CCDISABLEWARNINGS) .NES. "" THEN -
763 CCDISABLEWARNINGS = CCDISABLEWARNINGS + "," + USER_CCDISABLEWARNINGS
765 $! Check To See If The User Entered A Valid Paramter.
767 $ IF (P3.EQS."VAXC").OR.(P3.EQS."DECC").OR.(P3.EQS."GNUC")
770 $! Check To See If The User Wanted DECC.
775 $! Looks Like DECC, Set To Use DECC.
779 $! Tell The User We Are Using DECC.
781 $ WRITE SYS$OUTPUT "Using DECC 'C' Compiler."
786 $ IF ARCH.EQS."VAX" .AND. F$TRNLNM("DECC$CC_DEFAULT").NES."/DECC" -
788 $ CC = CC + "/''CC_OPTIMIZE'/''DEBUGGER'/STANDARD=ANSI89" + -
789 "/NOLIST/PREFIX=ALL" + CCEXTRAFLAGS
791 $! Define The Linker Options File Name.
793 $ OPT_FILE = "SYS$DISK:[]VAX_DECC_OPTIONS.OPT"
799 $! Check To See If We Are To Use VAXC.
804 $! Looks Like VAXC, Set To Use VAXC.
808 $! Tell The User We Are Using VAX C.
810 $ WRITE SYS$OUTPUT "Using VAXC 'C' Compiler."
812 $! Compile Using VAXC.
817 $ WRITE SYS$OUTPUT "There is no VAX C on Alpha!"
820 $ IF F$TRNLNM("DECC$CC_DEFAULT").EQS."/DECC" THEN CC = "CC/VAXC"
821 $ CC = CC + "/''CC_OPTIMIZE'/''DEBUGGER'/NOLIST" + CCEXTRAFLAGS
822 $ CCDEFS = CCDEFS + ",""VAXC"""
824 $! Define <sys> As SYS$COMMON:[SYSLIB]
826 $ DEFINE/NOLOG SYS SYS$COMMON:[SYSLIB]
828 $! Define The Linker Options File Name.
830 $ OPT_FILE = "SYS$DISK:[]VAX_VAXC_OPTIONS.OPT"
836 $! Check To See If We Are To Use GNU C.
841 $! Looks Like GNUC, Set To Use GNUC.
845 $! Tell The User We Are Using GNUC.
847 $ WRITE SYS$OUTPUT "Using GNU 'C' Compiler."
851 $ CC = "GCC/NOCASE_HACK/''GCC_OPTIMIZE'/''DEBUGGER'/NOLIST" + CCEXTRAFLAGS
853 $! Define The Linker Options File Name.
855 $ OPT_FILE = "SYS$DISK:[]VAX_GNUC_OPTIONS.OPT"
857 $! End The GNU C Check.
861 $! Set up default defines
863 $ CCDEFS = """FLAT_INC=1""," + CCDEFS
865 $! Check To See If We Are To Compile With RSAREF Routines.
867 $ IF (RSAREF.EQS."TRUE")
870 $! Compile With RSAREF.
872 $ CCDEFS = CCDEFS + ",""RSAref=1"""
874 $! Tell The User This.
876 $ WRITE SYS$OUTPUT "Compiling With RSAREF Routines."
878 $! Else, We Don't Care. Compile Without The RSAREF Library.
882 $! Tell The User We Are Compile Without The RSAREF Routines.
884 $ WRITE SYS$OUTPUT "Compiling Without The RSAREF Routines.
886 $! End The RSAREF Check.
890 $! Finish up the definition of CC.
892 $ IF COMPILER .EQS. "DECC"
894 $ IF CCDISABLEWARNINGS .EQS. ""
896 $ CC4DISABLEWARNINGS = "DOLLARID"
898 $ CC4DISABLEWARNINGS = CCDISABLEWARNINGS + ",DOLLARID"
899 $ CCDISABLEWARNINGS = "/WARNING=(DISABLE=(" + CCDISABLEWARNINGS + "))"
901 $ CC4DISABLEWARNINGS = "/WARNING=(DISABLE=(" + CC4DISABLEWARNINGS + "))"
903 $ CCDISABLEWARNINGS = ""
904 $ CC4DISABLEWARNINGS = ""
906 $ CC = CC + "/DEFINE=(" + CCDEFS + ")" + CCDISABLEWARNINGS
908 $! Show user the result
910 $ WRITE SYS$OUTPUT "Main Compiling Command: ",CC
912 $! Else The User Entered An Invalid Arguement.
916 $! Tell The User We Don't Know What They Want.
918 $ WRITE SYS$OUTPUT ""
919 $ WRITE SYS$OUTPUT "The Option ",P3," Is Invalid. The Valid Options Are:"
920 $ WRITE SYS$OUTPUT ""
921 $ WRITE SYS$OUTPUT " VAXC : To Compile With VAX C."
922 $ WRITE SYS$OUTPUT " DECC : To Compile With DEC C."
923 $ WRITE SYS$OUTPUT " GNUC : To Compile With GNU C."
924 $ WRITE SYS$OUTPUT ""
931 $! Time to check the contents, and to make sure we get the correct library.
933 $ IF P4.EQS."SOCKETSHR" .OR. P4.EQS."MULTINET" .OR. P4.EQS."UCX"
936 $! Check to see if SOCKETSHR was chosen
938 $ IF P4.EQS."SOCKETSHR"
941 $! Set the library to use SOCKETSHR
943 $ TCPIP_LIB = "[-.VMS]SOCKETSHR_SHR.OPT/OPT"
945 $! Done with SOCKETSHR
949 $! Check to see if MULTINET was chosen
951 $ IF P4.EQS."MULTINET"
954 $! Set the library to use UXC emulation.
958 $! Done with MULTINET
962 $! Check to see if UCX was chosen
967 $! Set the library to use UCX.
969 $ TCPIP_LIB = "[-.VMS]UCX_SHR_DECC.OPT/OPT"
970 $ IF F$TRNLNM("UCX$IPC_SHR") .NES. ""
972 $ TCPIP_LIB = "[-.VMS]UCX_SHR_DECC_LOG.OPT/OPT"
974 $ IF COMPILER .NES. "DECC" .AND. ARCH .EQS. "VAX" THEN -
975 TCPIP_LIB = "[-.VMS]UCX_SHR_VAXC.OPT/OPT"
984 $ WRITE SYS$OUTPUT "TCP/IP library spec: ", TCPIP_LIB
986 $! Else The User Entered An Invalid Arguement.
990 $! Tell The User We Don't Know What They Want.
992 $ WRITE SYS$OUTPUT ""
993 $ WRITE SYS$OUTPUT "The Option ",P4," Is Invalid. The Valid Options Are:"
994 $ WRITE SYS$OUTPUT ""
995 $ WRITE SYS$OUTPUT " SOCKETSHR : To link with SOCKETSHR TCP/IP library."
996 $ WRITE SYS$OUTPUT " UCX : To link with UCX TCP/IP library."
997 $ WRITE SYS$OUTPUT ""
1003 $! Done with TCP/IP libraries
1007 $! Special Threads For OpenVMS v7.1 Or Later
1009 $! Written By: Richard Levitte
1010 $! richard@levitte.org
1013 $! Check To See If We Have A Option For P5.
1018 $! Get The Version Of VMS We Are Using.
1021 $ TMP = F$ELEMENT(0,"-",F$EXTRACT(1,4,F$GETSYI("VERSION")))
1022 $ TMP = F$INTEGER(F$ELEMENT(0,".",TMP)+F$ELEMENT(1,".",TMP))
1024 $! Check To See If The VMS Version Is v7.1 Or Later.
1029 $! We Have OpenVMS v7.1 Or Later, So Use The Special Threads.
1031 $ ISSEVEN := ,PTHREAD_USE_D4
1033 $! End The VMS Version Check.
1037 $! End The P5 Check.
1041 $! Time To RETURN...
1047 $! Save old value of the logical name OPENSSL
1049 $ __SAVE_OPENSSL = F$TRNLNM("OPENSSL","LNM$PROCESS_TABLE")
1051 $! Save directory information
1053 $ __HERE = F$PARSE(F$PARSE("A.;",F$ENVIRONMENT("PROCEDURE"))-"A.;","[]A.;") - "A.;"
1054 $ __TOP = __HERE - "TEST]"
1055 $ __INCLUDE = __TOP + "INCLUDE.OPENSSL]"
1057 $! Set up the logical name OPENSSL to point at the include directory
1059 $ DEFINE OPENSSL/NOLOG '__INCLUDE'
1067 $! Restore the logical name OPENSSL if it had a value
1069 $ IF __SAVE_OPENSSL .EQS. ""
1073 $ DEFINE/NOLOG OPENSSL '__SAVE_OPENSSL'