3 $! Original Author: UNKNOWN
4 $! Rewritten By: Robert Byer
6 $! A-Com Computing, Inc.
7 $! byer@mail.all-net.net
9 $! Changes by Richard Levitte <richard@levitte.org>
10 $! Zoltan Arpadffy <zoli@polarhome.com>
12 $! This procedure creates the SSL libraries of "[.xxx.EXE.CRYPTO]LIBCRYPTO.OLB"
13 $! "[.xxx.EXE.SSL]LIBSSL.OLB"
14 $! The "xxx" denotes the machine architecture of ALPHA, IA64 or VAX.
16 $! This procedures accepts two command line options listed below.
18 $! P1 specifies one of the following build options:
20 $! ALL Just build "everything".
21 $! CONFIG Just build the "[.CRYPTO._xxx]OPENSSLCONF.H" file.
22 $! BUILDINF Just build the "[.CRYPTO._xxx]BUILDINF.H" file.
23 $! SOFTLINKS Just fix the Unix soft links.
24 $! BUILDALL Same as ALL, except CONFIG, BUILDINF and SOFTILNKS aren't done.
25 $! CRYPTO Just build the "[.xxx.EXE.CRYPTO]LIBCRYPTO.OLB" library.
26 $! CRYPTO/x Just build the x part of the
27 $! "[.xxx.EXE.CRYPTO]LIBCRYPTO.OLB" library.
28 $! SSL Just build the "[.xxx.EXE.SSL]LIBSSL.OLB" library.
29 $! TEST Just build the "[.xxx.EXE.TEST]" test programs for OpenSSL.
30 $! APPS Just build the "[.xxx.EXE.APPS]" application programs for OpenSSL.
31 $! ENGINES Just build the "[.xxx.EXE.ENGINES]" application programs for OpenSSL.
33 $! P2, if defined, specifies the C pointer size. Ignored on VAX.
34 $! ("64=ARGV" gives more efficient code with HP C V7.3 or newer.)
35 $! Supported values are:
37 $! "" Compile with default (/NOPOINTER_SIZE).
38 $! 32 Compile with /POINTER_SIZE=32 (SHORT).
39 $! 64 Compile with /POINTER_SIZE=64[=ARGV] (LONG[=ARGV]).
40 $! (Automatically select ARGV if compiler supports it.)
41 $! 64= Compile with /POINTER_SIZE=64 (LONG).
42 $! 64=ARGV Compile with /POINTER_SIZE=64=ARGV (LONG=ARGV).
44 $! P3 specifies DEBUG or NODEBUG, to compile with or without debugging
47 $! P4 specifies which compiler to try to compile under.
52 $! LINK To only link the programs from existing object files.
53 $! (not yet implemented)
55 $! If you don't specify a compiler, it will try to determine which
56 $! "C" compiler to use.
58 $! P5, if defined, sets a TCP/IP library to use, through one of the following
61 $! UCX for UCX or UCX emulation
62 $! TCPIP for TCP/IP Services or TCP/IP Services emulation
63 $! (this is prefered over UCX)
64 $! SOCKETSHR for SOCKETSHR+NETLIB
65 $! NONE to avoid specifying which TCP/IP implementation to
66 $! use at build time (this works with DEC C). This is
69 $! P6, if defined, sets a compiler thread NOT needed on OpenVMS 7.1 (and up).
71 $! P7, if defined, specifies a directory where ZLIB files (zlib.h,
72 $! libz.olb) may be found. Optionally, a non-default object library
73 $! name may be included ("dev:[dir]libz_64.olb", for example).
78 $ proc = f$environment( "procedure")
79 $ write sys$output "@@@ "+ -
80 f$parse( proc, , , "name")+ f$parse( proc, , , "type")
82 $ DEF_ORIG = F$ENVIRONMENT( "DEFAULT")
83 $ ON ERROR THEN GOTO TIDY
84 $ ON CONTROL_C THEN GOTO TIDY
86 $! Check if we're in a batch job, and make sure we get to
87 $! the directory this script is in
89 $ IF F$MODE() .EQS. "BATCH"
91 $ COMNAME=F$ENVIRONMENT("PROCEDURE")
92 $ COMPATH=F$PARSE("A.;",COMNAME) - "A.;"
96 $! Check What Architecture We Are Using.
98 $ IF (F$GETSYI("CPU").LT.128)
101 $! The Architecture Is VAX.
109 $! The Architecture Is Alpha, IA64 or whatever comes in the future.
111 $ ARCH = F$EDIT( F$GETSYI( "ARCH_NAME"), "UPCASE")
112 $ IF (ARCH .EQS. "") THEN ARCH = "UNK"
114 $! End The Architecture Check.
124 $ VMS_VERSION = f$edit( f$getsyi( "VERSION"), "TRIM")
126 $! Check To Make Sure We Have Valid Command Line Parameters.
128 $ GOSUB CHECK_OPTIONS
130 $! Check To See What We Are To Do.
132 $ IF (BUILDCOMMAND.EQS."ALL")
135 $! Start with building the OpenSSL configuration file.
139 $! Create The "BUILDINF.H" Include File.
143 $! Fix The Unix Softlinks.
149 $ IF (BUILDCOMMAND.EQS."ALL".OR.BUILDCOMMAND.EQS."BUILDALL")
152 $! Build The [.xxx.EXE.CRYPTO]LIBCRYPTO.OLB Library.
156 $! Build The [.xxx.EXE.SSL]LIBSSL.OLB Library.
160 $! Build The [.xxx.EXE.TEST] OpenSSL Test Utilities.
164 $! Build The [.xxx.EXE.APPS] OpenSSL Application Utilities.
168 $! Build The [.xxx.EXE.ENGINES] OpenSSL Shareable Engines.
176 $! Build Just What The User Wants Us To Build.
178 $ GOSUB 'BUILDCOMMAND'
186 $! Rebuild The [.CRYPTO._xxx]OPENSSLCONF.H" file.
190 $! Tell The User We Are Creating The [.CRYPTO._xxx]OPENSSLCONF.H File.
192 $ WRITE SYS$OUTPUT "Creating [.CRYPTO.''ARCHD']OPENSSLCONF.H Include File."
194 $! First, make sure the directory exists.
196 $ IF F$PARSE("SYS$DISK:[.CRYPTO.''ARCHD']") .EQS. "" THEN -
197 CREATE/DIRECTORY SYS$DISK:[.CRYPTO.'ARCHD']
199 $! Different tar/UnZip versions/option may have named the file differently
200 $ IF F$SEARCH("[.crypto]opensslconf.h_in") .NES. ""
202 $ OPENSSLCONF_H_IN = "[.crypto]opensslconf.h_in"
204 $ IF F$SEARCH( "[.crypto]opensslconf_h.in") .NES. ""
206 $ OPENSSLCONF_H_IN = "[.crypto]opensslconf_h.in"
209 $ IF F$SEARCH( "[.crypto]opensslconf.h.in") .NES. ""
211 $ OPENSSLCONF_H_IN = "[.crypto]opensslconf.h.in"
213 $ WRITE SYS$ERROR "Couldn't find a [.crypto]opensslconf.h.in. Exiting!"
214 $ $STATUS = %X00018294 ! "%RMS-F-FNF, file not found".
220 $! Create The [.CRYPTO._xxx]OPENSSLCONF.H File.
221 $! Make sure it has the right format.
223 $ OSCH_NAME = "SYS$DISK:[.CRYPTO.''ARCHD']OPENSSLCONF.H"
224 $ CREATE /FDL=SYS$INPUT: 'OSCH_NAME'
227 $ OPEN /APPEND H_FILE 'OSCH_NAME'
229 $! Write The [.CRYPTO._xxx]OPENSSLCONF.H File.
231 $ WRITE H_FILE "/* This file was automatically built using makevms.com */"
232 $ WRITE H_FILE "/* and ''OPENSSLCONF_H_IN' */"
234 $! Write a few macros that indicate how this system was built.
237 $ WRITE H_FILE "#ifndef OPENSSL_SYS_VMS"
238 $ WRITE H_FILE "# define OPENSSL_SYS_VMS"
239 $ WRITE H_FILE "#endif"
242 $! Defined the full SDIRS here. It will be pruned depending on configuration.
243 $! This is an exact copy of what's found in Makefile.org, with spaces replaced
248 md2,md4,md5,sha,mdc2,hmac,ripemd,whrlpool,-
249 des,aes,rc2,rc4,rc5,idea,bf,cast,camellia,seed,modes,-
250 bn,ec,rsa,dsa,ecdsa,dh,ecdh,dso,engine,-
251 buffer,bio,stack,lhash,rand,err,-
252 evp,asn1,pem,x509,x509v3,conf,txt_db,pkcs7,pkcs12,comp,ocsp,ui,-
253 cms,pqueue,ts,jpake,srp,store,cmac
255 $! One of the best way to figure out what the list should be is to do
256 $! the following on a Unix system:
257 $! grep OPENSSL_NO_ crypto/include/internal/*.h crypto/*/*.h ssl/*.h engines/*.h engines/*/*.h|grep ':# *if'|sed -e 's/^.*def //'|sort|uniq
258 $! For that reason, the list will also always end up in alphabetical order
259 $ CONFIG_LOGICALS := AES,-
275 EC_NISTP_64_GCC_128,-
312 $ CONFIG_EXPERIMENTAL := JPAKE,-
314 $! The following rules, which dictate how some algorithm choices affect
315 $! others, are picked from Configure.
317 $! list = item[ ; list]
318 $! item = algos / dependents
319 $! algos = algo [, algos]
320 $! dependents = dependent [, dependents]
321 $! When a list of algos is specified in one item, it means that they must
322 $! all be disabled for the rule to apply.
323 $! When a list of dependents is specified in one item, it means that they
324 $! will all be disabled if the rule applies.
325 $! Rules are checked sequentially. If a rule disables an algorithm, it will
326 $! affect all following rules that depend on that algorithm being disabled.
327 $! To force something to be enabled or disabled, have no algorithms in the
329 $ CONFIG_DISABLE_RULES := RIJNDAEL/AES;-
342 /EC_NISTP_64_GCC_128;-
350 $ CONFIG_ENABLE_RULES := ZLIB_DYNAMIC/ZLIB;-
353 $! Architecture specific rule addtions
354 $ IF ARCH .EQS. "VAX"
356 $ ! Disable algorithms that require 64-bit integers in C
357 $ CONFIG_DISABLE_RULES = CONFIG_DISABLE_RULES + -
362 $! Keep track of things to remove from SDIRS, have the items surrounded
368 $ CONFIG_LOG_E = F$EDIT(F$ELEMENT(CONFIG_LOG_I,",",CONFIG_LOGICALS),"TRIM")
369 $ CONFIG_LOG_I = CONFIG_LOG_I + 1
370 $ IF CONFIG_LOG_E .EQS. "" THEN GOTO CONFIG_LOG_LOOP11
371 $ IF CONFIG_LOG_E .EQS. "," THEN GOTO CONFIG_LOG_LOOP11_END
372 $ IF F$TRNLNM("OPENSSL_NO_"+CONFIG_LOG_E)
374 $ CONFIG_DISABLED_'CONFIG_LOG_E' := YES
375 $ CONFIG_ENABLED_'CONFIG_LOG_E' := NO
376 $ CONFIG_CHANGED_'CONFIG_LOG_E' := YES
377 $ IF (SKIP_SDIRS - (","+CONFIG_LOG_E+",")) .EQS. SKIP_SDIRS THEN -
378 SKIP_SDIRS = SKIP_SDIRS + CONFIG_LOG_E + ","
380 $ CONFIG_DISABLED_'CONFIG_LOG_E' := NO
381 $ CONFIG_ENABLED_'CONFIG_LOG_E' := YES
382 $ ! Because all non-experimental algorithms are assumed
383 $ ! enabled by default
384 $ CONFIG_CHANGED_'CONFIG_LOG_E' := NO
385 $ IF (SKIP_SDIRS - (","+CONFIG_LOG_E+",")) .NES. SKIP_SDIRS THEN -
386 SKIP_SDIRS = SKIP_SDIRS - (CONFIG_LOG_E + ",")
388 $ GOTO CONFIG_LOG_LOOP11
389 $ CONFIG_LOG_LOOP11_END:
393 $ CONFIG_LOG_E = F$EDIT(F$ELEMENT(CONFIG_LOG_I,",",CONFIG_EXPERIMENTAL),"TRIM")
394 $ CONFIG_LOG_I = CONFIG_LOG_I + 1
395 $ IF CONFIG_LOG_E .EQS. "" THEN GOTO CONFIG_LOG_LOOP12
396 $ IF CONFIG_LOG_E .EQS. "," THEN GOTO CONFIG_LOG_LOOP12_END
397 $ IF F$TRNLNM("OPENSSL_EXPERIMENTAL_"+CONFIG_LOG_E)
399 $ CONFIG_DISABLED_'CONFIG_LOG_E' := NO
400 $ CONFIG_ENABLED_'CONFIG_LOG_E' := YES
401 $ CONFIG_CHANGED_'CONFIG_LOG_E' := YES
402 $ IF (SKIP_SDIRS - (","+CONFIG_LOG_E+",")) .NES. SKIP_SDIRS THEN -
403 SKIP_SDIRS = SKIP_SDIRS - (CONFIG_LOG_E + ",")
405 $ CONFIG_DISABLED_'CONFIG_LOG_E' := YES
406 $ CONFIG_ENABLED_'CONFIG_LOG_E' := NO
407 $ ! Because all experimental algorithms are assumed
408 $ ! disabled by default
409 $ CONFIG_CHANGED_'CONFIG_LOG_E' := NO
410 $ IF (SKIP_SDIRS - (","+CONFIG_LOG_E+",")) .EQS. SKIP_SDIRS THEN -
411 SKIP_SDIRS = SKIP_SDIRS + CONFIG_LOG_E + ","
413 $ GOTO CONFIG_LOG_LOOP12
414 $ CONFIG_LOG_LOOP12_END:
416 $! Apply cascading disable rules
417 $ CONFIG_DISABLE_I = 0
418 $ CONFIG_DISABLE_LOOP0:
419 $ CONFIG_DISABLE_E = F$EDIT(F$ELEMENT(CONFIG_DISABLE_I,";", -
420 CONFIG_DISABLE_RULES),"TRIM")
421 $ CONFIG_DISABLE_I = CONFIG_DISABLE_I + 1
422 $ IF CONFIG_DISABLE_E .EQS. "" THEN GOTO CONFIG_DISABLE_LOOP0
423 $ IF CONFIG_DISABLE_E .EQS. ";" THEN GOTO CONFIG_DISABLE_LOOP0_END
425 $ CONFIG_DISABLE_ALGOS = F$EDIT(F$ELEMENT(0,"/",CONFIG_DISABLE_E),"TRIM")
426 $ CONFIG_DISABLE_DEPENDENTS = F$EDIT(F$ELEMENT(1,"/",CONFIG_DISABLE_E),"TRIM")
429 $ CONFIG_DISABLE_LOOP1:
430 $ CONFIG_ALGO_E = F$EDIT(F$ELEMENT(CONFIG_ALGO_I,",", -
431 CONFIG_DISABLE_ALGOS),"TRIM")
432 $ CONFIG_ALGO_I = CONFIG_ALGO_I + 1
433 $ IF CONFIG_ALGO_E .EQS. "" THEN GOTO CONFIG_DISABLE_LOOP1
434 $ IF CONFIG_ALGO_E .EQS. "," THEN GOTO CONFIG_DISABLE_LOOP1_END
435 $ IF F$TYPE(CONFIG_DISABLED_'CONFIG_ALGO_E') .EQS. ""
439 $ IF .NOT. CONFIG_DISABLED_'CONFIG_ALGO_E' THEN TO_DISABLE := NO
441 $ GOTO CONFIG_DISABLE_LOOP1
442 $ CONFIG_DISABLE_LOOP1_END:
446 $ CONFIG_DEPENDENT_I = 0
447 $ CONFIG_DISABLE_LOOP2:
448 $ CONFIG_DEPENDENT_E = F$EDIT(F$ELEMENT(CONFIG_DEPENDENT_I,",", -
449 CONFIG_DISABLE_DEPENDENTS),"TRIM")
450 $ CONFIG_DEPENDENT_I = CONFIG_DEPENDENT_I + 1
451 $ IF CONFIG_DEPENDENT_E .EQS. "" THEN GOTO CONFIG_DISABLE_LOOP2
452 $ IF CONFIG_DEPENDENT_E .EQS. "," THEN GOTO CONFIG_DISABLE_LOOP2_END
453 $ CONFIG_DISABLED_'CONFIG_DEPENDENT_E' := YES
454 $ CONFIG_ENABLED_'CONFIG_DEPENDENT_E' := NO
455 $ ! Better not to assume defaults at this point...
456 $ CONFIG_CHANGED_'CONFIG_DEPENDENT_E' := YES
457 $ IF (SKIP_SDIRS - (","+CONFIG_DEPENDENT_E+",")) .EQS. SKIP_SDIRS THEN -
458 SKIP_SDIRS = SKIP_SDIRS + CONFIG_DEPENDENT_E + ","
460 "''CONFIG_DEPENDENT_E' disabled by rule ''CONFIG_DISABLE_E'"
461 $ GOTO CONFIG_DISABLE_LOOP2
462 $ CONFIG_DISABLE_LOOP2_END:
464 $ GOTO CONFIG_DISABLE_LOOP0
465 $ CONFIG_DISABLE_LOOP0_END:
467 $! Apply cascading enable rules
468 $ CONFIG_ENABLE_I = 0
469 $ CONFIG_ENABLE_LOOP0:
470 $ CONFIG_ENABLE_E = F$EDIT(F$ELEMENT(CONFIG_ENABLE_I,";", -
471 CONFIG_ENABLE_RULES),"TRIM")
472 $ CONFIG_ENABLE_I = CONFIG_ENABLE_I + 1
473 $ IF CONFIG_ENABLE_E .EQS. "" THEN GOTO CONFIG_ENABLE_LOOP0
474 $ IF CONFIG_ENABLE_E .EQS. ";" THEN GOTO CONFIG_ENABLE_LOOP0_END
476 $ CONFIG_ENABLE_ALGOS = F$EDIT(F$ELEMENT(0,"/",CONFIG_ENABLE_E),"TRIM")
477 $ CONFIG_ENABLE_DEPENDENTS = F$EDIT(F$ELEMENT(1,"/",CONFIG_ENABLE_E),"TRIM")
480 $ CONFIG_ENABLE_LOOP1:
481 $ CONFIG_ALGO_E = F$EDIT(F$ELEMENT(CONFIG_ALGO_I,",", -
482 CONFIG_ENABLE_ALGOS),"TRIM")
483 $ CONFIG_ALGO_I = CONFIG_ALGO_I + 1
484 $ IF CONFIG_ALGO_E .EQS. "" THEN GOTO CONFIG_ENABLE_LOOP1
485 $ IF CONFIG_ALGO_E .EQS. "," THEN GOTO CONFIG_ENABLE_LOOP1_END
486 $ IF F$TYPE(CONFIG_ENABLED_'CONFIG_ALGO_E') .EQS. ""
490 $ IF .NOT. CONFIG_ENABLED_'CONFIG_ALGO_E' THEN TO_ENABLE := NO
492 $ GOTO CONFIG_ENABLE_LOOP1
493 $ CONFIG_ENABLE_LOOP1_END:
497 $ CONFIG_DEPENDENT_I = 0
498 $ CONFIG_ENABLE_LOOP2:
499 $ CONFIG_DEPENDENT_E = F$EDIT(F$ELEMENT(CONFIG_DEPENDENT_I,",", -
500 CONFIG_ENABLE_DEPENDENTS),"TRIM")
501 $ CONFIG_DEPENDENT_I = CONFIG_DEPENDENT_I + 1
502 $ IF CONFIG_DEPENDENT_E .EQS. "" THEN GOTO CONFIG_ENABLE_LOOP2
503 $ IF CONFIG_DEPENDENT_E .EQS. "," THEN GOTO CONFIG_ENABLE_LOOP2_END
504 $ CONFIG_DISABLED_'CONFIG_DEPENDENT_E' := NO
505 $ CONFIG_ENABLED_'CONFIG_DEPENDENT_E' := YES
506 $ ! Better not to assume defaults at this point...
507 $ CONFIG_CHANGED_'CONFIG_DEPENDENT_E' := YES
508 $ IF (SKIP_SDIRS - (","+CONFIG_DEPENDENT_E+",")) .NES. SKIP_SDIRS THEN -
509 SKIP_SDIRS = SKIP_SDIRS - (CONFIG_DEPENDENT_E + ",")
511 "''CONFIG_DEPENDENT_E' enabled by rule ''CONFIG_ENABLE_E'"
512 $ GOTO CONFIG_ENABLE_LOOP2
513 $ CONFIG_ENABLE_LOOP2_END:
515 $ GOTO CONFIG_ENABLE_LOOP0
516 $ CONFIG_ENABLE_LOOP0_END:
519 $ SDIRS = ","+F$EDIT(SDIRS,"COLLAPSE")+","
521 $ CONFIG_SDIRS_LOOP1:
522 $ CONFIG_SKIP_E = F$EDIT(F$ELEMENT(CONFIG_SKIP_I,",",SKIP_SDIRS),"TRIM")
523 $ CONFIG_SKIP_I = CONFIG_SKIP_I + 1
524 $ IF CONFIG_SKIP_E .EQS. "" THEN GOTO CONFIG_SDIRS_LOOP1
525 $ IF CONFIG_SKIP_E .EQS. "," THEN GOTO CONFIG_SDIRS_LOOP1_END
526 $ IF (SDIRS - (","+CONFIG_SKIP_E+",")) .NES. SDIRS THEN -
527 SDIRS = SDIRS - (CONFIG_SKIP_E+",")
528 $ GOTO CONFIG_SDIRS_LOOP1
529 $ CONFIG_SDIRS_LOOP1_END:
531 $! Write to the configuration
534 $ CONFIG_LOG_E = F$EDIT(F$ELEMENT(CONFIG_LOG_I,",",CONFIG_LOGICALS),"TRIM")
535 $ CONFIG_LOG_I = CONFIG_LOG_I + 1
536 $ IF CONFIG_LOG_E .EQS. "" THEN GOTO CONFIG_LOG_LOOP2
537 $ IF CONFIG_LOG_E .EQS. "," THEN GOTO CONFIG_LOG_LOOP2_END
538 $ IF CONFIG_DISABLED_'CONFIG_LOG_E'
540 $ WRITE H_FILE "#ifndef OPENSSL_NO_",CONFIG_LOG_E
541 $ WRITE H_FILE "# define OPENSSL_NO_",CONFIG_LOG_E
542 $ WRITE H_FILE "#endif"
544 $ IF CONFIG_CHANGED_'CONFIG_LOG_E'
546 $ WRITE H_FILE "#ifndef OPENSSL_EXPERIMENTAL_",CONFIG_LOG_E
547 $ WRITE H_FILE "# ifndef OPENSSL_NO_",CONFIG_LOG_E
548 $ WRITE H_FILE "# define OPENSSL_NO_",CONFIG_LOG_E
549 $ WRITE H_FILE "# endif"
550 $ WRITE H_FILE "#endif"
552 $ IF F$TYPE(USER_CCDEFS) .NES. ""
554 $ USER_CCDEFS = USER_CCDEFS + ",OPENSSL_EXPERIMENTAL_" + CONFIG_LOG_E
556 $ USER_CCDEFS = "OPENSSL_EXPERIMENTAL_" + CONFIG_LOG_E
560 $ GOTO CONFIG_LOG_LOOP2
561 $ CONFIG_LOG_LOOP2_END:
563 $ WRITE/SYMBOL SYS$ERROR "SDIRS = """,SDIRS,""""
566 $ WRITE H_FILE "/* STCP support comes with TCPIP 5.7 ECO 2 "
567 $ WRITE H_FILE " * enable on newer systems / 2012-02-24 arpadffy */"
568 $ WRITE H_FILE "#define OPENSSL_NO_SCTP"
571 $! Add in the common "crypto/opensslconf.h.in".
573 $ TYPE 'OPENSSLCONF_H_IN' /OUTPUT=H_FILE:
575 $ IF ARCH .NES. "VAX"
578 $! Write the non-VAX specific data
580 $ WRITE H_FILE "#if defined(HEADER_RC4_H)"
581 $ WRITE H_FILE "#undef RC4_INT"
582 $ WRITE H_FILE "#define RC4_INT unsigned int"
583 $ WRITE H_FILE "#undef RC4_CHUNK"
584 $ WRITE H_FILE "#define RC4_CHUNK unsigned long long"
585 $ WRITE H_FILE "#endif"
587 $ WRITE H_FILE "#if defined(HEADER_DES_LOCL_H)"
588 $ WRITE H_FILE "#undef DES_LONG"
589 $ WRITE H_FILE "#define DES_LONG unsigned int"
590 $ WRITE H_FILE "#undef DES_PTR"
591 $ WRITE H_FILE "#define DES_PTR"
592 $ WRITE H_FILE "#undef DES_RISC1"
593 $ WRITE H_FILE "#undef DES_RISC2"
594 $ WRITE H_FILE "#define DES_RISC1"
595 $ WRITE H_FILE "#undef DES_UNROLL"
596 $ WRITE H_FILE "#define DES_UNROLL"
597 $ WRITE H_FILE "#endif"
599 $ WRITE H_FILE "#if defined(HEADER_BN_H)"
600 $ WRITE H_FILE "#undef BN_LLONG" ! Never define with SIXTY_FOUR_BIT
601 $ WRITE H_FILE "#undef SIXTY_FOUR_BIT_LONG"
602 $ WRITE H_FILE "#undef SIXTY_FOUR_BIT"
603 $ WRITE H_FILE "#define SIXTY_FOUR_BIT"
604 $ WRITE H_FILE "#undef THIRTY_TWO_BIT"
605 $ WRITE H_FILE "#undef SIXTEEN_BIT"
606 $ WRITE H_FILE "#undef EIGHT_BIT"
607 $ WRITE H_FILE "#endif"
609 $ WRITE H_FILE "#undef OPENSSL_EXPORT_VAR_AS_FUNCTION"
615 $! Write the VAX specific data
617 $ WRITE H_FILE "#if defined(HEADER_RC4_H)"
618 $ WRITE H_FILE "#undef RC4_INT"
619 $ WRITE H_FILE "#define RC4_INT unsigned char"
620 $ WRITE H_FILE "#undef RC4_CHUNK"
621 $ WRITE H_FILE "#define RC4_CHUNK unsigned long"
622 $ WRITE H_FILE "#endif"
624 $ WRITE H_FILE "#if defined(HEADER_DES_LOCL_H)"
625 $ WRITE H_FILE "#undef DES_LONG"
626 $ WRITE H_FILE "#define DES_LONG unsigned long"
627 $ WRITE H_FILE "#undef DES_PTR"
628 $ WRITE H_FILE "#define DES_PTR"
629 $ WRITE H_FILE "#undef DES_RISC1"
630 $ WRITE H_FILE "#undef DES_RISC2"
631 $ WRITE H_FILE "#undef DES_UNROLL"
632 $ WRITE H_FILE "#endif"
634 $ WRITE H_FILE "#if defined(HEADER_BN_H)"
635 $ WRITE H_FILE "#undef BN_LLONG" ! VAX C/DEC C doesn't have long long
636 $ WRITE H_FILE "#undef SIXTY_FOUR_BIT_LONG"
637 $ WRITE H_FILE "#undef SIXTY_FOUR_BIT"
638 $ WRITE H_FILE "#undef THIRTY_TWO_BIT"
639 $ WRITE H_FILE "#define THIRTY_TWO_BIT"
640 $ WRITE H_FILE "#undef SIXTEEN_BIT"
641 $ WRITE H_FILE "#undef EIGHT_BIT"
642 $ WRITE H_FILE "#endif"
644 $ WRITE H_FILE "#undef OPENSSL_EXPORT_VAR_AS_FUNCTION"
645 $ WRITE H_FILE "#define OPENSSL_EXPORT_VAR_AS_FUNCTION"
651 $! Close the [.CRYPTO._xxx]OPENSSLCONF.H file
655 $! Purge The [.CRYPTO._xxx]OPENSSLCONF.H file
657 $ PURGE SYS$DISK:[.CRYPTO.'ARCHD']OPENSSLCONF.H
659 $! That's All, Time To RETURN.
663 $! Rebuild The "[.CRYPTO._xxx]BUILDINF.H" file.
667 $! Tell The User We Are Creating The [.CRYPTO._xxx]BUILDINF.H File.
669 $ WRITE SYS$OUTPUT "Creating [.CRYPTO.''ARCHD']BUILDINF.H Include File."
671 $! Create The [.CRYPTO._xxx]BUILDINF.H File.
673 $ BIH_NAME = "SYS$DISK:[.CRYPTO.''ARCHD']BUILDINF.H"
674 $ CREATE /FDL=SYS$INPUT: 'BIH_NAME'
678 $ OPEN /APPEND H_FILE 'bih_name'
680 $! Get The Current Date & Time.
684 $! Write The [.CRYPTO._xxx]BUILDINF.H File.
687 $ if (POINTER_SIZE .nes. "")
689 $ CFLAGS = CFLAGS+ "/POINTER_SIZE=''POINTER_SIZE'"
693 $ if (CFLAGS .nes. "") then CFLAGS = CFLAGS+ " "
694 $ CFLAGS = CFLAGS+ "/DEFINE=ZLIB"
697 $ WRITE H_FILE "#define CFLAGS ""''CFLAGS'"""
698 $ WRITE H_FILE "#define PLATFORM ""VMS ''ARCHD' ''VMS_VERSION'"""
699 $ WRITE H_FILE "#define DATE ""''TIME'"" "
701 $! Close The [.CRYPTO._xxx]BUILDINF.H File.
705 $! Purge The [.CRYPTO._xxx]BUILDINF.H File.
707 $ PURGE SYS$DISK:[.CRYPTO.'ARCHD']BUILDINF.H
709 $! Delete [.CRYPTO]BUILDINF.H File, as there might be some residue from Unix.
711 $ IF F$SEARCH("[.CRYPTO]BUILDINF.H") .NES. "" THEN -
712 DELETE SYS$DISK:[.CRYPTO]BUILDINF.H;*
714 $! That's All, Time To RETURN.
718 $! Copy a lot of files around.
722 $!!!! Tell The User We Are Partly Rebuilding The [.APPS] Directory.
724 $!!! WRITE SYS$OUTPUT "Rebuilding The '[.APPS]MD4.C', '[.APPS]MD5.C' And '[.APPS]RD160.C' Files."
726 $!!! DELETE SYS$DISK:[.APPS]MD4.C;*,MD5.C;*,RMD160.C;*
728 $!!!! Copy MD4.C from [.CRYPTO.MD4] into [.APPS]
730 $!!! COPY SYS$DISK:[.CRYPTO.MD4]MD4.C SYS$DISK:[.APPS]
732 $!!!! Copy MD5.C from [.CRYPTO.MD5] into [.APPS]
733 $!!!! Tell The User We Are Rebuilding The [.include.openssl] Directory.
735 $!!!! Copy RMD160.C from [.CRYPTO.RIPEMD] into [.APPS]
737 $!!! COPY SYS$DISK:[.CRYPTO.RIPEMD]RMD160.C SYS$DISK:[.APPS]
739 $! Ensure that the [.include.openssl] directory contains a full set of
740 $! real header files. The distribution kit may have left real or fake
741 $! symlinks there. Rather than think about what's there, simply delete
742 $! the destination files (fake or real symlinks) before copying the real
743 $! header files in. (Copying a real header file onto a real symlink
744 $! merely duplicates the real header file at its source.)
746 $! Tell The User We Are Rebuilding The [.include.openssl] Directory.
748 $ WRITE SYS$OUTPUT "Rebuilding The '[.include.openssl]' Directory."
750 $! First, make sure the directory exists. If it did exist, delete all
751 $! the existing header files (or fake or real symlinks).
753 $ if f$parse( "sys$disk:[.include.openssl]") .eqs. ""
755 $ create /directory sys$disk:[.include.openssl]
757 $ delete sys$disk:[.include.openssl]*.h;*
760 $! Copy All The ".H" Files From The Main Directory.
762 $ EXHEADER := e_os2.h
763 $ copy 'exheader' sys$disk:[.include.openssl]
765 $! Copy All The ".H" Files From The [.CRYPTO] Directory Tree.
767 $ HEADER_SDIRS := , -
770 MD2, MD4, MD5, SHA, MDC2, HMAC, RIPEMD, WHRLPOOL, -
771 DES, AES, RC2, RC4, RC5, IDEA, BF, CAST, CAMELLIA, SEED, MODES, -
772 BN, EC, RSA, DSA, ECDSA, DH, ECDH, DSO, ENGINE, -
773 BUFFER, BIO, STACK, LHASH, RAND, ERR, -
774 EVP, ASN1, PEM, X509, X509V3, CONF, TXT_DB, PKCS7, PKCS12, -
776 CMS, PQUEUE, TS, JPAKE, SRP, STORE, CMAC
778 $ EXHEADER_ := crypto.h, opensslv.h, ebcdic.h, symhacks.h, ossl_typ.h
779 $ EXHEADER_'ARCHD' := opensslconf.h
780 $ EXHEADER_OBJECTS := objects.h, obj_mac.h
781 $ EXHEADER_MD2 := md2.h
782 $ EXHEADER_MD4 := md4.h
783 $ EXHEADER_MD5 := md5.h
784 $ EXHEADER_SHA := sha.h
785 $ EXHEADER_MDC2 := mdc2.h
786 $ EXHEADER_HMAC := hmac.h
787 $ EXHEADER_RIPEMD := ripemd.h
788 $ EXHEADER_WHRLPOOL := whrlpool.h
789 $ EXHEADER_DES := des.h
790 $ EXHEADER_AES := aes.h
791 $ EXHEADER_RC2 := rc2.h
792 $ EXHEADER_RC4 := rc4.h
793 $ EXHEADER_RC5 := rc5.h
794 $ EXHEADER_IDEA := idea.h
795 $ EXHEADER_BF := blowfish.h
796 $ EXHEADER_CAST := cast.h
797 $ EXHEADER_CAMELLIA := camellia.h
798 $ EXHEADER_SEED := seed.h
799 $ EXHEADER_MODES := modes.h
800 $ EXHEADER_BN := bn.h
801 $ EXHEADER_EC := ec.h
802 $ EXHEADER_RSA := rsa.h
803 $ EXHEADER_DSA := dsa.h
804 $ EXHEADER_ECDSA := ecdsa.h
805 $ EXHEADER_DH := dh.h
806 $ EXHEADER_ECDH := ecdh.h
807 $ EXHEADER_DSO := dso.h
808 $ EXHEADER_ENGINE := engine.h
809 $ EXHEADER_BUFFER := buffer.h
810 $ EXHEADER_BIO := bio.h
811 $ EXHEADER_STACK := stack.h, safestack.h
812 $ EXHEADER_LHASH := lhash.h
813 $ EXHEADER_RAND := rand.h
814 $ EXHEADER_ERR := err.h
815 $ EXHEADER_EVP := evp.h
816 $ EXHEADER_ASN1 := asn1.h, asn1_mac.h, asn1t.h
817 $ EXHEADER_PEM := pem.h, pem2.h
818 $ EXHEADER_X509 := x509.h, x509_vfy.h
819 $ EXHEADER_X509V3 := x509v3.h
820 $ EXHEADER_CONF := conf.h, conf_api.h
821 $ EXHEADER_TXT_DB := txt_db.h
822 $ EXHEADER_PKCS7 := pkcs7.h
823 $ EXHEADER_PKCS12 := pkcs12.h
824 $ EXHEADER_COMP := comp.h
825 $ EXHEADER_OCSP := ocsp.h
826 $ EXHEADER_UI := ui.h
827 $ EXHEADER_CMS := cms.h
828 $ EXHEADER_PQUEUE := pqueue.h
829 $ EXHEADER_TS := ts.h
830 $ EXHEADER_JPAKE := jpake.h
831 $ EXHEADER_SRP := srp.h
832 $!!! EXHEADER_STORE := store.h, str_compat.h
833 $ EXHEADER_STORE := store.h
834 $ EXHEADER_CMAC := cmac.h
838 $ sdir = f$edit( f$element( i, ",", header_sdirs), "trim")
840 $ if (sdir .eqs. ",") then goto loop_header_sdirs_end
841 $ hdr_list = exheader_'sdir'
842 $ if (sdir .nes. "") then sdir = "."+ sdir
843 $ copy [.crypto'sdir']'hdr_list' sys$disk:[.include.openssl]
844 $ goto loop_header_sdirs
845 $ loop_header_sdirs_end:
847 $! Copy All The ".H" Files From The [.SSL] Directory.
849 $! (keep these in the same order as ssl/Makefile)
850 $ EXHEADER := ssl.h, ssl2.h, ssl3.h, ssl23.h, tls1.h, dtls1.h, srtp.h
851 $ copy sys$disk:[.ssl]'exheader' sys$disk:[.include.openssl]
853 $! Purge the [.include.openssl] header files.
855 $ purge sys$disk:[.include.openssl]*.h
857 $! That's All, Time To RETURN.
861 $! Build The "[.xxx.EXE.CRYPTO]SSL_LIBCRYPTO''LIB32'.OLB" Library.
865 $! Tell The User What We Are Doing.
867 $ WRITE SYS$OUTPUT ""
869 "Building The [.",ARCHD,".EXE.CRYPTO]SSL_LIBCRYPTO''LIB32'.OLB Library."
871 $! Go To The [.CRYPTO] Directory.
873 $ SET DEFAULT SYS$DISK:[.CRYPTO]
875 $! Build The [.xxx.EXE.CRYPTO]LIBCRYPTO.OLB Library.
877 $ @CRYPTO-LIB LIBRARY 'DEBUGGER' "''COMPILER'" "''TCPIP_TYPE'" -
878 "''ISSEVEN'" "''BUILDPART'" "''POINTER_SIZE'" "''ZLIB'"
880 $! Go Back To The Main Directory.
888 $! Build The "[.xxx.EXE.SSL]SSL_LIBSSL''LIB32'.OLB" Library.
892 $! Tell The User What We Are Doing.
894 $ WRITE SYS$OUTPUT ""
896 "Building The [.",ARCHD,".EXE.SSL]SSL_LIBSSL''LIB32'.OLB Library."
898 $! Go To The [.SSL] Directory.
900 $ SET DEFAULT SYS$DISK:[.SSL]
902 $! Build The [.xxx.EXE.SSL]LIBSSL.OLB Library.
904 $ @SSL-LIB LIBRARY 'DEBUGGER' "''COMPILER'" "''TCPIP_TYPE'" -
905 "''ISSEVEN'" "''POINTER_SIZE'" "''ZLIB'"
907 $! Go Back To The Main Directory.
915 $! Build The OpenSSL Test Programs.
919 $! Tell The User What We Are Doing.
921 $ WRITE SYS$OUTPUT ""
922 $ WRITE SYS$OUTPUT "Building The OpenSSL [.",ARCHD,".EXE.TEST] Test Utilities."
924 $! Go To The [.TEST] Directory.
926 $ SET DEFAULT SYS$DISK:[.TEST]
928 $! Build The Test Programs.
930 $ @MAKETESTS 'DEBUGGER' "''COMPILER'" "''TCPIP_TYPE'" "''ISSEVEN'" -
931 "''POINTER_SIZE'" "''ZLIB'"
933 $! Go Back To The Main Directory.
937 $! That's All, Time To RETURN.
941 $! Build The OpenSSL Application Programs.
945 $! Tell The User What We Are Doing.
947 $ WRITE SYS$OUTPUT ""
948 $ WRITE SYS$OUTPUT "Building OpenSSL [.",ARCHD,".EXE.APPS] Applications."
950 $! Go To The [.APPS] Directory.
952 $ SET DEFAULT SYS$DISK:[.APPS]
954 $! Build The Application Programs.
956 $ @MAKEAPPS 'DEBUGGER' "''COMPILER'" "''TCPIP_TYPE'" "''ISSEVEN'" -
957 "" "''POINTER_SIZE'" "''ZLIB'"
959 $! Go Back To The Main Directory.
963 $! That's All, Time To RETURN.
967 $! Build The OpenSSL Application Programs.
971 $! Tell The User What We Are Doing.
973 $ WRITE SYS$OUTPUT ""
974 $ WRITE SYS$OUTPUT "Building OpenSSL [.",ARCHD,".EXE.ENGINES] Engines."
976 $! Go To The [.ENGINES] Directory.
978 $ SET DEFAULT SYS$DISK:[.ENGINES]
980 $! Build The Application Programs.
982 $ @MAKEENGINES ENGINES 'DEBUGGER' "''COMPILER'" "''TCPIP_TYPE'" -
983 "''ISSEVEN'" "''BUILDPART'" "''POINTER_SIZE'" "''ZLIB'"
985 $! Go Back To The Main Directory.
989 $! That's All, Time To RETURN.
993 $! Check The User's Options.
997 $! Check if there's a "part", and separate it out
999 $ BUILDPART = F$ELEMENT(1,"/",P1)
1000 $ IF BUILDPART .EQS. "/"
1004 $ P1 = F$EXTRACT(0,F$LENGTH(P1) - F$LENGTH(BUILDPART) - 1, P1)
1007 $! Check To See If P1 Is Blank.
1012 $! P1 Is ALL, So Build Everything.
1014 $ BUILDCOMMAND = "ALL"
1020 $! Else, Check To See If P1 Has A Valid Argument.
1022 $ IF (P1.EQS."CONFIG").OR.(P1.EQS."BUILDINF").OR.(P1.EQS."SOFTLINKS") -
1023 .OR.(P1.EQS."BUILDALL") -
1024 .OR.(P1.EQS."CRYPTO").OR.(P1.EQS."SSL") -
1025 .OR.(P1.EQS."TEST").OR.(P1.EQS."APPS") -
1026 .OR.(P1.EQS."ENGINES")
1029 $! A Valid Argument.
1037 $! Tell The User We Don't Know What They Want.
1039 $ WRITE SYS$OUTPUT ""
1040 $ WRITE SYS$OUTPUT "USAGE: @MAKEVMS.COM [Target] [Pointer size] [Debug option] <Compiler>"
1041 $ WRITE SYS$OUTPUT ""
1042 $ WRITE SYS$OUTPUT "Example: @MAKEVMS.COM ALL """" NODEBUG "
1043 $ WRITE SYS$OUTPUT ""
1044 $ WRITE SYS$OUTPUT "The Target ",P1," Is Invalid. The Valid Target Options Are:"
1045 $ WRITE SYS$OUTPUT ""
1046 $ WRITE SYS$OUTPUT " ALL : Just Build Everything."
1047 $ WRITE SYS$OUTPUT " CONFIG : Just build the [.CRYPTO._xxx]OPENSSLCONF.H file."
1048 $ WRITE SYS$OUTPUT " BUILDINF : Just build the [.CRYPTO._xxx]BUILDINF.H file."
1049 $ WRITE SYS$OUTPUT " SOFTLINKS: Just Fix The Unix soft links."
1050 $ WRITE SYS$OUTPUT " BUILDALL : Same as ALL, except CONFIG, BUILDINF and SOFTILNKS aren't done."
1051 $ WRITE SYS$OUTPUT " CRYPTO : To Build Just The [.xxx.EXE.CRYPTO]LIBCRYPTO.OLB Library."
1052 $ WRITE SYS$OUTPUT " CRYPTO/x : To Build Just The x Part Of The"
1053 $ WRITE SYS$OUTPUT " [.xxx.EXE.CRYPTO]LIBCRYPTO.OLB Library."
1054 $ WRITE SYS$OUTPUT " SSL : To Build Just The [.xxx.EXE.SSL]LIBSSL.OLB Library."
1055 $ WRITE SYS$OUTPUT " TEST : To Build Just The OpenSSL Test Programs."
1056 $ WRITE SYS$OUTPUT " APPS : To Build Just The OpenSSL Application Programs."
1057 $ WRITE SYS$OUTPUT " ENGINES : To Build Just The ENGINES"
1058 $ WRITE SYS$OUTPUT ""
1059 $ WRITE SYS$OUTPUT " Where 'xxx' Stands For:"
1060 $ WRITE SYS$OUTPUT ""
1061 $ WRITE SYS$OUTPUT " ALPHA[64]: Alpha Architecture."
1062 $ WRITE SYS$OUTPUT " IA64[64] : IA64 Architecture."
1063 $ WRITE SYS$OUTPUT " VAX : VAX Architecture."
1064 $ WRITE SYS$OUTPUT ""
1070 $! End The Valid Argument Check.
1074 $! End The P1 Check.
1078 $! Check P2 (POINTER_SIZE).
1080 $ IF (P2 .NES. "") .AND. (ARCH .NES. "VAX")
1083 $ IF (P2 .EQS. "32")
1085 $ POINTER_SIZE = "32"
1087 $ POINTER_SIZE = F$EDIT( P2, "COLLAPSE, UPCASE")
1088 $ IF ((POINTER_SIZE .EQS. "64") .OR. -
1089 (POINTER_SIZE .EQS. "64=") .OR. -
1090 (POINTER_SIZE .EQS. "64=ARGV"))
1092 $ ARCHD = ARCH+ "_64"
1096 $! Tell The User Entered An Invalid Option.
1098 $ WRITE SYS$OUTPUT ""
1099 $ WRITE SYS$OUTPUT "The Option ", P2, -
1100 " Is Invalid. The Valid Options Are:"
1101 $ WRITE SYS$OUTPUT ""
1102 $ WRITE SYS$OUTPUT -
1103 " """" : Compile with default (short) pointers."
1104 $ WRITE SYS$OUTPUT -
1105 " 32 : Compile with 32-bit (short) pointers."
1106 $ WRITE SYS$OUTPUT -
1107 " 64 : Compile with 64-bit (long) pointers (auto ARGV)."
1108 $ WRITE SYS$OUTPUT -
1109 " 64= : Compile with 64-bit (long) pointers (no ARGV)."
1110 $ WRITE SYS$OUTPUT -
1111 " 64=ARGV : Compile with 64-bit (long) pointers (ARGV)."
1112 $ WRITE SYS$OUTPUT ""
1122 $! End The P2 (POINTER_SIZE) Check.
1126 $! Check To See If P3 Is Blank.
1128 $ IF (P3.EQS."NODEBUG")
1131 $! P3 Is NODEBUG, So Compile Without Debugger Information.
1133 $ DEBUGGER = "NODEBUG"
1139 $! Check To See If We Are To Compile With Debugger Information.
1141 $ IF (P3.EQS."DEBUG")
1144 $! Compile With Debugger Information.
1146 $ DEBUGGER = "DEBUG"
1152 $! Tell The User Entered An Invalid Option.
1154 $ WRITE SYS$OUTPUT ""
1155 $ WRITE SYS$OUTPUT "The Option ",P3," Is Invalid. The Valid Options Are:"
1156 $ WRITE SYS$OUTPUT ""
1157 $ WRITE SYS$OUTPUT " DEBUG : Compile With The Debugger Information."
1158 $ WRITE SYS$OUTPUT " NODEBUG : Compile Without The Debugger Information."
1159 $ WRITE SYS$OUTPUT ""
1165 $! End The Valid Argument Check.
1169 $! End The P3 Check.
1173 $! Check To See If P4 Is Blank.
1178 $! O.K., The User Didn't Specify A Compiler, Let's Try To
1179 $! Find Out Which One To Use.
1181 $! Check To See If We Have GNU C.
1183 $ IF (F$TRNLNM("GNU_CC").NES."")
1186 $! Looks Like GNUC, Set To Use GNUC.
1190 $! Tell The User We Are Using GNUC.
1192 $ WRITE SYS$OUTPUT "Using GNU 'C' Compiler."
1194 $! End The GNU C Compiler Check.
1198 $! Check To See If We Have VAXC Or DECC.
1200 $ IF (F$GETSYI("CPU").GE.128).OR.(F$TRNLNM("DECC$CC_DEFAULT").EQS."/DECC")
1203 $! Looks Like DECC, Set To Use DECC.
1207 $! Tell The User We Are Using DECC.
1209 $ WRITE SYS$OUTPUT "Using DECC 'C' Compiler."
1215 $! Looks Like VAXC, Set To Use VAXC.
1219 $! Tell The User We Are Using VAX C.
1221 $ WRITE SYS$OUTPUT "Using VAXC 'C' Compiler."
1223 $! End The DECC & VAXC Compiler Check.
1231 $! Check To See If The User Entered A Valid Parameter.
1233 $ IF (P4.EQS."VAXC").OR.(P4.EQS."DECC").OR.(P4.EQS."GNUC")!.OR.(P4.EQS."LINK")
1236 $! Check To See If The User Wanted To Just LINK.
1238 $ IF (P4.EQS."LINK")
1241 $! Looks Like LINK-only
1245 $! Tell The User We Are Only Linking.
1247 $ WRITE SYS$OUTPUT "LINK Only. This actually NOT YET SUPPORTED!"
1253 $! Check To See If The User Wanted DECC.
1255 $ IF (P4.EQS."DECC")
1258 $! Looks Like DECC, Set To Use DECC.
1262 $! Tell The User We Are Using DECC.
1264 $ WRITE SYS$OUTPUT "Using DECC 'C' Compiler."
1270 $! Check To See If We Are To Use VAXC.
1272 $ IF (P4.EQS."VAXC")
1275 $! Looks Like VAXC, Set To Use VAXC.
1279 $! Tell The User We Are Using VAX C.
1281 $ WRITE SYS$OUTPUT "Using VAXC 'C' Compiler."
1287 $! Check To See If We Are To Use GNU C.
1289 $ IF (P4.EQS."GNUC")
1292 $! Looks Like GNUC, Set To Use GNUC.
1296 $! Tell The User We Are Using GNUC.
1298 $ WRITE SYS$OUTPUT "Using GNU 'C' Compiler."
1300 $! End The GNU C Check.
1304 $! Else The User Entered An Invalid Argument.
1308 $! Tell The User We Don't Know What They Want.
1310 $ WRITE SYS$OUTPUT ""
1311 $ WRITE SYS$OUTPUT "The Option ",P4," Is Invalid. The Valid Options Are:"
1312 $ WRITE SYS$OUTPUT ""
1313 $ WRITE SYS$OUTPUT " VAXC : To Compile With VAX C."
1314 $ WRITE SYS$OUTPUT " DECC : To Compile With DEC C."
1315 $ WRITE SYS$OUTPUT " GNUC : To Compile With GNU C."
1316 $ WRITE SYS$OUTPUT ""
1322 $! End The Valid Argument Check.
1326 $! End The P4 Check.
1330 $! Time to check the contents of P5, and to make sure we get the correct
1333 $ IF P5.EQS."SOCKETSHR" .OR. P5.EQS."MULTINET" .OR. P5.EQS."UCX" -
1334 .OR. P5.EQS."TCPIP" .OR. P5.EQS."NONE"
1337 $! Check to see if SOCKETSHR was chosen
1339 $ IF P5.EQS."SOCKETSHR"
1342 $! Set the library to use SOCKETSHR
1344 $ TCPIP_LIB = "SYS$DISK:[-.VMS]SOCKETSHR_SHR.OPT /OPTIONS"
1348 $ WRITE SYS$OUTPUT "Using SOCKETSHR for TCP/IP"
1350 $! Done with SOCKETSHR
1354 $! Check to see if MULTINET was chosen
1356 $ IF P5.EQS."MULTINET"
1359 $! Set the library to use UCX emulation.
1365 $ WRITE SYS$OUTPUT "Using MultiNet via UCX emulation for TCP/IP"
1367 $! Done with MULTINET
1371 $! Check to see if UCX was chosen
1376 $! Set the library to use UCX.
1378 $ TCPIP_LIB = "SYS$DISK:[-.VMS]UCX_SHR_DECC.OPT /OPTIONS"
1382 $ WRITE SYS$OUTPUT "Using UCX or an emulation thereof for TCP/IP"
1388 $! Check to see if TCPIP was chosen
1393 $! Set the library to use TCPIP (post UCX).
1395 $ TCPIP_LIB = "SYS$DISK:[-.VMS]TCPIP_SHR_DECC.OPT /OPTIONS"
1399 $ WRITE SYS$OUTPUT "Using TCPIP (post UCX) for TCP/IP"
1405 $! Check to see if NONE was chosen
1410 $! Do not use a TCPIP library.
1416 $ WRITE SYS$OUTPUT "A specific TCPIP library will not be used."
1422 $! Set the TCPIP_TYPE symbol
1428 $ WRITE SYS$OUTPUT "TCP/IP library spec: ", TCPIP_LIB
1430 $! Else The User Entered An Invalid Argument.
1436 $! Tell The User We Don't Know What They Want.
1438 $ WRITE SYS$OUTPUT ""
1439 $ WRITE SYS$OUTPUT "The Option ",P5," Is Invalid. The Valid Options Are:"
1440 $ WRITE SYS$OUTPUT ""
1441 $ WRITE SYS$OUTPUT " SOCKETSHR : To link with SOCKETSHR TCP/IP library."
1442 $ WRITE SYS$OUTPUT " UCX : To link with UCX TCP/IP library."
1443 $ WRITE SYS$OUTPUT " TCPIP : To link with TCPIP TCP/IP (post UCX) library."
1444 $ WRITE SYS$OUTPUT " NONE : To not link with a specific TCP/IP library."
1445 $ WRITE SYS$OUTPUT ""
1452 $! If TCPIP is not defined, then hardcode it to make
1453 $! it clear that no TCPIP is desired.
1458 $ TCPIP_TYPE = "NONE"
1461 $! Set the TCPIP_TYPE symbol
1467 $! Done with TCP/IP libraries
1471 $! Special Threads For OpenVMS v7.1 Or Later
1473 $! Written By: Richard Levitte
1474 $! richard@levitte.org
1477 $! Check To See If We Have A Option For P6.
1482 $! Get The Version Of VMS We Are Using.
1485 $ TMP = F$ELEMENT(0,"-",F$EXTRACT(1,4,VMS_VERSION))
1486 $ TMP = F$INTEGER(F$ELEMENT(0,".",TMP)+F$ELEMENT(1,".",TMP))
1488 $! Check To See If The VMS Version Is v7.1 Or Later.
1493 $! We Have OpenVMS v7.1 Or Later, So Use The Special Threads.
1495 $ ISSEVEN := ,PTHREAD_USE_D4
1497 $! End The VMS Version Check.
1501 $! End The P6 Check.
1506 $! Check To See If We Have A ZLIB Option.
1509 $ IF (ZLIB .NES. "")
1512 $! Check for expected ZLIB files.
1515 $ file1 = f$parse( "zlib.h", ZLIB, , , "SYNTAX_ONLY")
1516 $ if (f$search( file1) .eqs. "")
1518 $ WRITE SYS$OUTPUT ""
1519 $ WRITE SYS$OUTPUT "The Option ", ZLIB, " Is Invalid."
1520 $ WRITE SYS$OUTPUT " Can't find header: ''file1'"
1524 $ file2 = f$parse( ZLIB, "libz.olb", , , "SYNTAX_ONLY")
1525 $ if (f$search( file2) .eqs. "")
1529 $ WRITE SYS$OUTPUT ""
1530 $ WRITE SYS$OUTPUT "The Option ", ZLIB, " Is Invalid."
1532 $ WRITE SYS$OUTPUT " Can't find library: ''file2'"
1533 $ WRITE SYS$OUTPUT ""
1538 $ WRITE SYS$OUTPUT ""
1548 $ WRITE SYS$OUTPUT "ZLIB library spec: ", file2
1550 $! End The ZLIB Check.
1554 $! Time To RETURN...
1560 $! Close any open files.
1562 $ if (f$trnlnm( "h_file", "LNM$PROCESS", 0, "SUPERVISOR") .nes. "") then -
1565 $! Restore the original default device:[directory].
1567 $ SET DEFAULT 'DEF_ORIG'