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