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