config.com 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. $ ! OpenSSL config: determine the architecture and run Configure
  2. $ ! Copyright 2016-2018 The OpenSSL Project Authors. All Rights Reserved.
  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
  8. $ !
  9. $ ! Very simple for the moment, it will take the following arguments:
  10. $ !
  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
  16. $
  17. $ arch = f$edit( f$getsyi( "arch_name"), "lowercase")
  18. $ pointer_size = ""
  19. $ dryrun = 0
  20. $ verbose = 0
  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
  28. $ P = F$EDIT(P1,"TRIM,LOWERCASE")
  29. $ IF P .EQS. "-h"
  30. $ THEN
  31. $ dryrun = 1
  32. $ P = ""
  33. $ TYPE SYS$INPUT
  34. $ DECK
  35. Usage: @config [options]
  36. -32 or 32 Build with 32-bit pointer size.
  37. -64 or 64 Build with 64-bit pointer size.
  38. -d Build with debugging.
  39. -t Test mode, do not run the Configure perl script.
  40. -v Verbose mode, show the exact Configure call that is being made.
  41. -h This help.
  42. Any other text will be passed to the Configure perl script.
  43. See INSTALL for instructions.
  44. $ EOD
  45. $ ENDIF
  46. $ IF P .EQS. "-t"
  47. $ THEN
  48. $ dryrun = 1
  49. $ verbose = 1
  50. $ P = ""
  51. $ ENDIF
  52. $ IF P .EQS. "-v"
  53. $ THEN
  54. $ verbose = 1
  55. $ P = ""
  56. $ ENDIF
  57. $ IF P .EQS. "-32" .OR. P .EQS. "32"
  58. $ THEN
  59. $ pointer_size = "-P32"
  60. $ P = ""
  61. $ ENDIF
  62. $ IF P .EQS. "-64" .OR. P .EQS. "64"
  63. $ THEN
  64. $ pointer_size = "-P64"
  65. $ P = ""
  66. $ ENDIF
  67. $ IF P .EQS. "-d"
  68. $ THEN
  69. $ collected_args = collected_args + " --debug"
  70. $ P = ""
  71. $ ENDIF
  72. $ IF P .NES. "" THEN -
  73. collected_args = collected_args + " """ + P1 + """"
  74. $ P1 = P2
  75. $ P2 = P3
  76. $ P3 = P4
  77. $ P4 = P5
  78. $ P5 = P6
  79. $ P6 = P7
  80. $ P7 = P8
  81. $ P8 = ""
  82. $ GOTO LOOP1
  83. $ ENDLOOP1:
  84. $
  85. $ target = "vms-''arch'''pointer_size'"
  86. $ IF verbose THEN -
  87. WRITE SYS$OUTPUT "PERL ''here'Configure ""''target'""",collected_args
  88. $ IF .not. dryrun THEN -
  89. PERL 'here'Configure "''target'"'collected_args'
  90. $ EXIT $STATUS