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