xref: /netbsd-src/crypto/external/bsd/openssl.old/dist/config.com (revision 4724848cf0da353df257f730694b7882798e5daf)
1*4724848cSchristos$	! OpenSSL config: determine the architecture and run Configure
2*4724848cSchristos$	! Copyright 2016-2018 The OpenSSL Project Authors. All Rights Reserved.
3*4724848cSchristos$	!
4*4724848cSchristos$	! Licensed under the OpenSSL license (the "License").  You may not use
5*4724848cSchristos$	! this file except in compliance with the License.  You can obtain a
6*4724848cSchristos$	! copy in the file LICENSE in the source distribution or at
7*4724848cSchristos$	! https://www.openssl.org/source/license.html
8*4724848cSchristos$	!
9*4724848cSchristos$	! Very simple for the moment, it will take the following arguments:
10*4724848cSchristos$	!
11*4724848cSchristos$	! -32 or 32	sets /POINTER_SIZE=32
12*4724848cSchristos$	! -64 or 64	sets /POINTER_SIZE=64
13*4724848cSchristos$	! -d		sets debugging
14*4724848cSchristos$	! -h		prints a usage and exits
15*4724848cSchristos$	! -t		test mode, doesn't run Configure
16*4724848cSchristos$
17*4724848cSchristos$	arch = f$edit( f$getsyi( "arch_name"), "lowercase")
18*4724848cSchristos$	pointer_size = ""
19*4724848cSchristos$	dryrun = 0
20*4724848cSchristos$	verbose = 0
21*4724848cSchristos$	here = F$PARSE("A.;",F$ENVIRONMENT("PROCEDURE"),,,"SYNTAX_ONLY") - "A.;"
22*4724848cSchristos$
23*4724848cSchristos$	collected_args = ""
24*4724848cSchristos$	P_index = 0
25*4724848cSchristos$	LOOP1:
26*4724848cSchristos$	    P_index = P_index + 1
27*4724848cSchristos$	    IF P_index .GT. 8 THEN GOTO ENDLOOP1
28*4724848cSchristos$	    P = F$EDIT(P1,"TRIM,LOWERCASE")
29*4724848cSchristos$	    IF P .EQS. "-h"
30*4724848cSchristos$           THEN
31*4724848cSchristos$               dryrun = 1
32*4724848cSchristos$               P = ""
33*4724848cSchristos$               TYPE SYS$INPUT
34*4724848cSchristos$               DECK
35*4724848cSchristosUsage: @config [options]
36*4724848cSchristos
37*4724848cSchristos  -32 or 32	Build with 32-bit pointer size.
38*4724848cSchristos  -64 or 64	Build with 64-bit pointer size.
39*4724848cSchristos  -d		Build with debugging.
40*4724848cSchristos  -t            Test mode, do not run the Configure perl script.
41*4724848cSchristos  -v            Verbose mode, show the exact Configure call that is being made.
42*4724848cSchristos  -h		This help.
43*4724848cSchristos
44*4724848cSchristosAny other text will be passed to the Configure perl script.
45*4724848cSchristosSee INSTALL for instructions.
46*4724848cSchristos
47*4724848cSchristos$               EOD
48*4724848cSchristos$           ENDIF
49*4724848cSchristos$	    IF P .EQS. "-t"
50*4724848cSchristos$	    THEN
51*4724848cSchristos$		dryrun = 1
52*4724848cSchristos$		verbose = 1
53*4724848cSchristos$		P = ""
54*4724848cSchristos$	    ENDIF
55*4724848cSchristos$	    IF P .EQS. "-v"
56*4724848cSchristos$	    THEN
57*4724848cSchristos$		verbose = 1
58*4724848cSchristos$		P = ""
59*4724848cSchristos$	    ENDIF
60*4724848cSchristos$	    IF P .EQS. "-32" .OR. P .EQS. "32"
61*4724848cSchristos$	    THEN
62*4724848cSchristos$		pointer_size = "-P32"
63*4724848cSchristos$		P = ""
64*4724848cSchristos$	    ENDIF
65*4724848cSchristos$	    IF P .EQS. "-64" .OR. P .EQS. "64"
66*4724848cSchristos$	    THEN
67*4724848cSchristos$		pointer_size = "-P64"
68*4724848cSchristos$		P = ""
69*4724848cSchristos$	    ENDIF
70*4724848cSchristos$	    IF P .EQS. "-d"
71*4724848cSchristos$	    THEN
72*4724848cSchristos$               collected_args = collected_args + " --debug"
73*4724848cSchristos$		P = ""
74*4724848cSchristos$	    ENDIF
75*4724848cSchristos$	    IF P .NES. "" THEN -
76*4724848cSchristos	       collected_args = collected_args + " """ + P1 + """"
77*4724848cSchristos$	    P1 = P2
78*4724848cSchristos$	    P2 = P3
79*4724848cSchristos$	    P3 = P4
80*4724848cSchristos$	    P4 = P5
81*4724848cSchristos$	    P5 = P6
82*4724848cSchristos$	    P6 = P7
83*4724848cSchristos$	    P7 = P8
84*4724848cSchristos$	    P8 = ""
85*4724848cSchristos$	    GOTO LOOP1
86*4724848cSchristos$	ENDLOOP1:
87*4724848cSchristos$
88*4724848cSchristos$	target = "vms-''arch'''pointer_size'"
89*4724848cSchristos$       IF verbose THEN -
90*4724848cSchristos           WRITE SYS$OUTPUT "PERL ''here'Configure ""''target'""",collected_args
91*4724848cSchristos$       IF .not. dryrun THEN -
92*4724848cSchristos           PERL 'here'Configure "''target'"'collected_args'
93*4724848cSchristos$       EXIT $STATUS
94