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