opensslconf.h.in 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154
  1. /* crypto/opensslconf.h.in */
  2. /* Generate 80386 code? */
  3. #undef I386_ONLY
  4. #if !(defined(VMS) || defined(__VMS)) /* VMS uses logical names instead */
  5. #if defined(HEADER_CRYPTLIB_H) && !defined(OPENSSLDIR)
  6. #define ENGINESDIR "/usr/local/lib/engines"
  7. #define OPENSSLDIR "/usr/local/ssl"
  8. #endif
  9. #endif
  10. #undef OPENSSL_UNISTD
  11. #define OPENSSL_UNISTD <unistd.h>
  12. #undef OPENSSL_EXPORT_VAR_AS_FUNCTION
  13. #if defined(HEADER_IDEA_H) && !defined(IDEA_INT)
  14. #define IDEA_INT unsigned int
  15. #endif
  16. #if defined(HEADER_MD2_H) && !defined(MD2_INT)
  17. #define MD2_INT unsigned int
  18. #endif
  19. #if defined(HEADER_RC2_H) && !defined(RC2_INT)
  20. /* I need to put in a mod for the alpha - eay */
  21. #define RC2_INT unsigned int
  22. #endif
  23. #if defined(HEADER_RC4_H)
  24. #if !defined(RC4_INT)
  25. /* using int types make the structure larger but make the code faster
  26. * on most boxes I have tested - up to %20 faster. */
  27. /*
  28. * I don't know what does "most" mean, but declaring "int" is a must on:
  29. * - Intel P6 because partial register stalls are very expensive;
  30. * - elder Alpha because it lacks byte load/store instructions;
  31. */
  32. #define RC4_INT unsigned int
  33. #endif
  34. #if !defined(RC4_CHUNK)
  35. /*
  36. * This enables code handling data aligned at natural CPU word
  37. * boundary. See crypto/rc4/rc4_enc.c for further details.
  38. */
  39. #undef RC4_CHUNK
  40. #endif
  41. #endif
  42. #if (defined(HEADER_NEW_DES_H) || defined(HEADER_DES_H)) && !defined(DES_LONG)
  43. /* If this is set to 'unsigned int' on a DEC Alpha, this gives about a
  44. * %20 speed up (longs are 8 bytes, int's are 4). */
  45. #ifndef DES_LONG
  46. #define DES_LONG unsigned long
  47. #endif
  48. #endif
  49. #if defined(HEADER_BN_H) && !defined(CONFIG_HEADER_BN_H)
  50. #define CONFIG_HEADER_BN_H
  51. #undef BN_LLONG
  52. /* Should we define BN_DIV2W here? */
  53. /* Only one for the following should be defined */
  54. #undef SIXTY_FOUR_BIT_LONG
  55. #undef SIXTY_FOUR_BIT
  56. #define THIRTY_TWO_BIT
  57. #endif
  58. #if defined(HEADER_RC4_LOCL_H) && !defined(CONFIG_HEADER_RC4_LOCL_H)
  59. #define CONFIG_HEADER_RC4_LOCL_H
  60. /* if this is defined data[i] is used instead of *data, this is a %20
  61. * speedup on x86 */
  62. #undef RC4_INDEX
  63. #endif
  64. #if defined(HEADER_BF_LOCL_H) && !defined(CONFIG_HEADER_BF_LOCL_H)
  65. #define CONFIG_HEADER_BF_LOCL_H
  66. #undef BF_PTR
  67. #endif /* HEADER_BF_LOCL_H */
  68. #if defined(HEADER_DES_LOCL_H) && !defined(CONFIG_HEADER_DES_LOCL_H)
  69. #define CONFIG_HEADER_DES_LOCL_H
  70. #ifndef DES_DEFAULT_OPTIONS
  71. /* the following is tweaked from a config script, that is why it is a
  72. * protected undef/define */
  73. #ifndef DES_PTR
  74. #undef DES_PTR
  75. #endif
  76. /* This helps C compiler generate the correct code for multiple functional
  77. * units. It reduces register dependancies at the expense of 2 more
  78. * registers */
  79. #ifndef DES_RISC1
  80. #undef DES_RISC1
  81. #endif
  82. #ifndef DES_RISC2
  83. #undef DES_RISC2
  84. #endif
  85. #if defined(DES_RISC1) && defined(DES_RISC2)
  86. #error YOU SHOULD NOT HAVE BOTH DES_RISC1 AND DES_RISC2 DEFINED!!!!!
  87. #endif
  88. /* Unroll the inner loop, this sometimes helps, sometimes hinders.
  89. * Very mucy CPU dependant */
  90. #ifndef DES_UNROLL
  91. #undef DES_UNROLL
  92. #endif
  93. /* These default values were supplied by
  94. * Peter Gutman <pgut001@cs.auckland.ac.nz>
  95. * They are only used if nothing else has been defined */
  96. #if !defined(DES_PTR) && !defined(DES_RISC1) && !defined(DES_RISC2) && !defined(DES_UNROLL)
  97. /* Special defines which change the way the code is built depending on the
  98. CPU and OS. For SGI machines you can use _MIPS_SZLONG (32 or 64) to find
  99. even newer MIPS CPU's, but at the moment one size fits all for
  100. optimization options. Older Sparc's work better with only UNROLL, but
  101. there's no way to tell at compile time what it is you're running on */
  102. #if defined( sun ) /* Newer Sparc's */
  103. # define DES_PTR
  104. # define DES_RISC1
  105. # define DES_UNROLL
  106. #elif defined( __ultrix ) /* Older MIPS */
  107. # define DES_PTR
  108. # define DES_RISC2
  109. # define DES_UNROLL
  110. #elif defined( __osf1__ ) /* Alpha */
  111. # define DES_PTR
  112. # define DES_RISC2
  113. #elif defined ( _AIX ) /* RS6000 */
  114. /* Unknown */
  115. #elif defined( __hpux ) /* HP-PA */
  116. /* Unknown */
  117. #elif defined( __aux ) /* 68K */
  118. /* Unknown */
  119. #elif defined( __dgux ) /* 88K (but P6 in latest boxes) */
  120. # define DES_UNROLL
  121. #elif defined( __sgi ) /* Newer MIPS */
  122. # define DES_PTR
  123. # define DES_RISC2
  124. # define DES_UNROLL
  125. #elif defined(i386) || defined(__i386__) /* x86 boxes, should be gcc */
  126. # define DES_PTR
  127. # define DES_RISC1
  128. # define DES_UNROLL
  129. #endif /* Systems-specific speed defines */
  130. #endif
  131. #endif /* DES_DEFAULT_OPTIONS */
  132. #endif /* HEADER_DES_LOCL_H */