config.com 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. $ ! OpenSSL config: determine the architecture and run Configure
  2. $ !
  3. $ ! Very simple for the moment, it will take the following arguments:
  4. $ !
  5. $ ! -32 or 32 sets /POINTER_SIZE=32
  6. $ ! -64 or 64 sets /POINTER_SIZE=64
  7. $ ! -d sets debugging
  8. $ ! -h prints a usage and exits
  9. $ ! -t test mode, doesn't run Configure
  10. $
  11. $ arch == f$edit( f$getsyi( "arch_name"), "lowercase")
  12. $ pointer_size = ""
  13. $ test = 0
  14. $ here = F$PARSE("A.;",F$ENVIRONMENT("PROCEDURE"),,,"SYNTAX_ONLY") - "A.;"
  15. $
  16. $ collected_args = ""
  17. $ P_index = 0
  18. $ LOOP1:
  19. $ P_index = P_index + 1
  20. $ IF P_index .GT. 8 THEN GOTO ENDLOOP1
  21. $ P = F$EDIT(P1,"TRIM,LOWERCASE")
  22. $ IF P .EQS. "-h"
  23. $ THEN
  24. $ TEST = 1
  25. $ P = ""
  26. $ TYPE SYS$INPUT
  27. $ DECK
  28. Usage: @config [options]
  29. -32 or 32 Build with 32-bit pointer size.
  30. -64 or 64 Build with 64-bit pointer size.
  31. -d Build with debugging.
  32. -t Test mode, do not run the Configure perl script.
  33. -h This help.
  34. Any other text will be passed to the Configure perl script.
  35. See INSTALL for instructions.
  36. $ EOD
  37. $ ENDIF
  38. $ IF P .EQS. "-t"
  39. $ THEN
  40. $ test = 1
  41. $ P = ""
  42. $ ENDIF
  43. $ IF P .EQS. "-32" .OR. P .EQS. "32"
  44. $ THEN
  45. $ pointer_size = "-P32"
  46. $ P = ""
  47. $ ENDIF
  48. $ IF P .EQS. "-64" .OR. P .EQS. "64"
  49. $ THEN
  50. $ pointer_size = "-P64"
  51. $ P = ""
  52. $ ENDIF
  53. $ IF P .EQS. "-d"
  54. $ THEN
  55. $ collected_args = collected_args + " --debug"
  56. $ P = ""
  57. $ ENDIF
  58. $ IF P .NES. "" THEN -
  59. collected_args = collected_args + " " + P1
  60. $ P1 = P2
  61. $ P2 = P3
  62. $ P3 = P4
  63. $ P4 = P5
  64. $ P5 = P6
  65. $ P6 = P7
  66. $ P7 = P8
  67. $ P8 = ""
  68. $ GOTO LOOP1
  69. $ ENDLOOP1:
  70. $
  71. $ target = "vms-''arch'''pointer_size'"
  72. $ IF test
  73. $ THEN
  74. $ WRITE SYS$OUTPUT "PERL ''here'Configure ""''target'""''collected_args'"
  75. $ ELSE
  76. $ PERL 'here'Configure "''target'" 'debug' 'collected_args'
  77. $ ENDIF
  78. $ EXIT $STATUS
  79. $
  80. $ USAGE: