config.com 2.5 KB
Newer Older
1
$	! OpenSSL config: determine the architecture and run Configure
M
Matt Caswell 已提交
2
$	! Copyright 2016-2018 The OpenSSL Project Authors. All Rights Reserved.
R
Rich Salz 已提交
3
$	!
4
$	! Licensed under the Apache License 2.0 (the "License").  You may not use
R
Rich Salz 已提交
5 6 7
$	! this file except in compliance with the License.  You can obtain a
$	! copy in the file LICENSE in the source distribution or at
$	! https://www.openssl.org/source/license.html
8 9 10
$	!
$	! Very simple for the moment, it will take the following arguments:
$	!
11 12 13 14 15
$	! -32 or 32	sets /POINTER_SIZE=32
$	! -64 or 64	sets /POINTER_SIZE=64
$	! -d		sets debugging
$	! -h		prints a usage and exits
$	! -t		test mode, doesn't run Configure
16
$
17
$	arch = f$edit( f$getsyi( "arch_name"), "lowercase")
18
$	pointer_size = ""
19 20
$	dryrun = 0
$	verbose = 0
21 22 23 24 25 26 27
$	here = F$PARSE("A.;",F$ENVIRONMENT("PROCEDURE"),,,"SYNTAX_ONLY") - "A.;"
$
$	collected_args = ""
$	P_index = 0
$	LOOP1:
$	    P_index = P_index + 1
$	    IF P_index .GT. 8 THEN GOTO ENDLOOP1
28
$	    P = F$EDIT(P1,"TRIM,LOWERCASE")
29 30
$	    IF P .EQS. "-h"
$           THEN
31
$               dryrun = 1
32 33 34 35 36 37 38 39 40
$               P = ""
$               TYPE SYS$INPUT
$               DECK
Usage: @config [options]

  -32 or 32	Build with 32-bit pointer size.
  -64 or 64	Build with 64-bit pointer size.
  -d		Build with debugging.
  -t            Test mode, do not run the Configure perl script.
41
  -v            Verbose mode, show the exact Configure call that is being made.
42 43 44
  -h		This help.

Any other text will be passed to the Configure perl script.
45
See INSTALL.md for instructions.
46 47 48 49 50

$               EOD
$           ENDIF
$	    IF P .EQS. "-t"
$	    THEN
51 52 53 54 55 56 57
$		dryrun = 1
$		verbose = 1
$		P = ""
$	    ENDIF
$	    IF P .EQS. "-v"
$	    THEN
$		verbose = 1
58 59 60
$		P = ""
$	    ENDIF
$	    IF P .EQS. "-32" .OR. P .EQS. "32"
61 62
$	    THEN
$		pointer_size = "-P32"
63
$		P = ""
64
$	    ENDIF
65
$	    IF P .EQS. "-64" .OR. P .EQS. "64"
66 67
$	    THEN
$		pointer_size = "-P64"
68
$		P = ""
69
$	    ENDIF
70
$	    IF P .EQS. "-d"
71
$	    THEN
72
$               collected_args = collected_args + " --debug"
73
$		P = ""
74
$	    ENDIF
75
$	    IF P .NES. "" THEN -
76
	       collected_args = collected_args + " """ + P1 + """"
77 78 79 80 81 82 83 84 85 86 87 88
$	    P1 = P2
$	    P2 = P3
$	    P3 = P4
$	    P4 = P5
$	    P5 = P6
$	    P6 = P7
$	    P7 = P8
$	    P8 = ""
$	    GOTO LOOP1
$	ENDLOOP1:
$
$	target = "vms-''arch'''pointer_size'"
89
$       IF verbose THEN -
90
           WRITE SYS$OUTPUT "PERL ''here'Configure ""''target'""",collected_args
91
$       IF .not. dryrun THEN -
92
           PERL 'here'Configure "''target'"'collected_args'
93
$       EXIT $STATUS