2016-01-30 14:14:58 +08:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								$	! OpenSSL config: determine the architecture and run Configure
							 | 
						
					
						
							
								
									
										
										
										
											2020-07-16 20:47:04 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								$	! Copyright 2016-2020 The OpenSSL Project Authors. All Rights Reserved.
							 | 
						
					
						
							
								
									
										
										
										
											2016-06-01 23:26:40 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								$	!
							 | 
						
					
						
							
								
									
										
										
										
											2018-12-06 21:08:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								$	! Licensed under the Apache License 2.0 (the "License").  You may not use
							 | 
						
					
						
							
								
									
										
										
										
											2016-06-01 23:26:40 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								$	! 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
							 | 
						
					
						
							
								
									
										
										
										
											2016-01-30 14:14:58 +08:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								$	!
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								$	! Very simple for the moment, it will take the following arguments:
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								$	!
							 | 
						
					
						
							
								
									
										
										
										
											2016-03-10 21:20:50 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								$	! -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
							 | 
						
					
						
							
								
									
										
										
										
											2016-01-30 14:14:58 +08:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								$
							 | 
						
					
						
							
								
									
										
										
										
											2016-07-06 07:23:41 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								$	arch = f$edit( f$getsyi( "arch_name"), "lowercase")
							 | 
						
					
						
							
								
									
										
										
										
											2016-01-30 14:14:58 +08:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								$	pointer_size = ""
							 | 
						
					
						
							
								
									
										
										
										
											2016-08-16 00:46:39 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								$	dryrun = 0
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								$	verbose = 0
							 | 
						
					
						
							
								
									
										
										
										
											2016-01-30 14:14:58 +08:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								$	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
							 | 
						
					
						
							
								
									
										
										
										
											2016-02-16 23:07:05 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								$	    P = F$EDIT(P1,"TRIM,LOWERCASE")
							 | 
						
					
						
							
								
									
										
										
										
											2016-03-10 21:20:50 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								$	    IF P .EQS. "-h"
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								$           THEN
							 | 
						
					
						
							
								
									
										
										
										
											2016-08-16 00:46:39 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								$               dryrun = 1
							 | 
						
					
						
							
								
									
										
										
										
											2016-03-10 21:20:50 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								$               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.
							 | 
						
					
						
							
								
									
										
										
										
											2016-08-16 00:46:39 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  -v            Verbose mode, show the exact Configure call that is being made.
							 | 
						
					
						
							
								
									
										
										
										
											2016-03-10 21:20:50 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  -h		This help.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								Any other text will be passed to the Configure perl script.
							 | 
						
					
						
							
								
									
										
										
										
											2020-06-10 20:15:28 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								See INSTALL.md for instructions.
							 | 
						
					
						
							
								
									
										
										
										
											2016-03-10 21:20:50 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								$               EOD
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								$           ENDIF
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								$	    IF P .EQS. "-t"
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								$	    THEN
							 | 
						
					
						
							
								
									
										
										
										
											2016-08-16 00:46:39 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								$		dryrun = 1
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								$		verbose = 1
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								$		P = ""
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								$	    ENDIF
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								$	    IF P .EQS. "-v"
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								$	    THEN
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								$		verbose = 1
							 | 
						
					
						
							
								
									
										
										
										
											2016-03-10 21:20:50 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								$		P = ""
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								$	    ENDIF
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								$	    IF P .EQS. "-32" .OR. P .EQS. "32"
							 | 
						
					
						
							
								
									
										
										
										
											2016-01-30 14:14:58 +08:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								$	    THEN
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								$		pointer_size = "-P32"
							 | 
						
					
						
							
								
									
										
										
										
											2016-02-16 23:07:05 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								$		P = ""
							 | 
						
					
						
							
								
									
										
										
										
											2016-01-30 14:14:58 +08:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								$	    ENDIF
							 | 
						
					
						
							
								
									
										
										
										
											2016-03-10 21:20:50 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								$	    IF P .EQS. "-64" .OR. P .EQS. "64"
							 | 
						
					
						
							
								
									
										
										
										
											2016-01-30 14:14:58 +08:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								$	    THEN
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								$		pointer_size = "-P64"
							 | 
						
					
						
							
								
									
										
										
										
											2016-02-16 23:07:05 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								$		P = ""
							 | 
						
					
						
							
								
									
										
										
										
											2016-01-30 14:14:58 +08:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								$	    ENDIF
							 | 
						
					
						
							
								
									
										
										
										
											2016-03-10 21:20:50 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								$	    IF P .EQS. "-d"
							 | 
						
					
						
							
								
									
										
										
										
											2016-01-30 14:14:58 +08:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								$	    THEN
							 | 
						
					
						
							
								
									
										
										
										
											2016-03-10 21:20:50 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								$               collected_args = collected_args + " --debug"
							 | 
						
					
						
							
								
									
										
										
										
											2016-02-16 23:07:05 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								$		P = ""
							 | 
						
					
						
							
								
									
										
										
										
											2016-01-30 14:14:58 +08:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								$	    ENDIF
							 | 
						
					
						
							
								
									
										
										
										
											2016-02-16 23:07:05 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								$	    IF P .NES. "" THEN -
							 | 
						
					
						
							
								
									
										
										
										
											2018-01-28 17:22:03 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									       collected_args = collected_args + " """ + P1 + """"
							 | 
						
					
						
							
								
									
										
										
										
											2016-01-30 14:14:58 +08:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								$	    P1 = P2
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								$	    P2 = P3
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								$	    P3 = P4
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								$	    P4 = P5
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								$	    P5 = P6
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								$	    P6 = P7
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								$	    P7 = P8
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								$	    P8 = ""
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								$	    GOTO LOOP1
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								$	ENDLOOP1:
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								$
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								$	target = "vms-''arch'''pointer_size'"
							 | 
						
					
						
							
								
									
										
										
										
											2016-08-16 00:46:39 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								$       IF verbose THEN -
							 | 
						
					
						
							
								
									
										
										
										
											2018-01-28 17:22:03 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								           WRITE SYS$OUTPUT "PERL ''here'Configure ""''target'""",collected_args
							 | 
						
					
						
							
								
									
										
										
										
											2016-08-16 00:46:39 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								$       IF .not. dryrun THEN -
							 | 
						
					
						
							
								
									
										
										
										
											2018-01-28 17:22:03 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								           PERL 'here'Configure "''target'"'collected_args'
							 | 
						
					
						
							
								
									
										
										
										
											2016-03-10 21:20:50 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								$       EXIT $STATUS
							 |