opensslconf.h.in 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  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. /* The prime number generation stuff may not work when
  55. * EIGHT_BIT but I don't care since I've only used this mode
  56. * for debuging the bignum libraries */
  57. #undef SIXTY_FOUR_BIT_LONG
  58. #undef SIXTY_FOUR_BIT
  59. #define THIRTY_TWO_BIT
  60. #undef SIXTEEN_BIT
  61. #undef EIGHT_BIT
  62. #endif
  63. #if defined(HEADER_RC4_LOCL_H) && !defined(CONFIG_HEADER_RC4_LOCL_H)
  64. #define CONFIG_HEADER_RC4_LOCL_H
  65. /* if this is defined data[i] is used instead of *data, this is a %20
  66. * speedup on x86 */
  67. #undef RC4_INDEX
  68. #endif
  69. #if defined(HEADER_BF_LOCL_H) && !defined(CONFIG_HEADER_BF_LOCL_H)
  70. #define CONFIG_HEADER_BF_LOCL_H
  71. #undef BF_PTR
  72. #endif /* HEADER_BF_LOCL_H */
  73. #if defined(HEADER_DES_LOCL_H) && !defined(CONFIG_HEADER_DES_LOCL_H)
  74. #define CONFIG_HEADER_DES_LOCL_H
  75. #ifndef DES_DEFAULT_OPTIONS
  76. /* the following is tweaked from a config script, that is why it is a
  77. * protected undef/define */
  78. #ifndef DES_PTR
  79. #undef DES_PTR
  80. #endif
  81. /* This helps C compiler generate the correct code for multiple functional
  82. * units. It reduces register dependancies at the expense of 2 more
  83. * registers */
  84. #ifndef DES_RISC1
  85. #undef DES_RISC1
  86. #endif
  87. #ifndef DES_RISC2
  88. #undef DES_RISC2
  89. #endif
  90. #if defined(DES_RISC1) && defined(DES_RISC2)
  91. YOU SHOULD NOT HAVE BOTH DES_RISC1 AND DES_RISC2 DEFINED!!!!!
  92. #endif
  93. /* Unroll the inner loop, this sometimes helps, sometimes hinders.
  94. * Very mucy CPU dependant */
  95. #ifndef DES_UNROLL
  96. #undef DES_UNROLL
  97. #endif
  98. /* These default values were supplied by
  99. * Peter Gutman <pgut001@cs.auckland.ac.nz>
  100. * They are only used if nothing else has been defined */
  101. #if !defined(DES_PTR) && !defined(DES_RISC1) && !defined(DES_RISC2) && !defined(DES_UNROLL)
  102. /* Special defines which change the way the code is built depending on the
  103. CPU and OS. For SGI machines you can use _MIPS_SZLONG (32 or 64) to find
  104. even newer MIPS CPU's, but at the moment one size fits all for
  105. optimization options. Older Sparc's work better with only UNROLL, but
  106. there's no way to tell at compile time what it is you're running on */
  107. #if defined( sun ) /* Newer Sparc's */
  108. # define DES_PTR
  109. # define DES_RISC1
  110. # define DES_UNROLL
  111. #elif defined( __ultrix ) /* Older MIPS */
  112. # define DES_PTR
  113. # define DES_RISC2
  114. # define DES_UNROLL
  115. #elif defined( __osf1__ ) /* Alpha */
  116. # define DES_PTR
  117. # define DES_RISC2
  118. #elif defined ( _AIX ) /* RS6000 */
  119. /* Unknown */
  120. #elif defined( __hpux ) /* HP-PA */
  121. /* Unknown */
  122. #elif defined( __aux ) /* 68K */
  123. /* Unknown */
  124. #elif defined( __dgux ) /* 88K (but P6 in latest boxes) */
  125. # define DES_UNROLL
  126. #elif defined( __sgi ) /* Newer MIPS */
  127. # define DES_PTR
  128. # define DES_RISC2
  129. # define DES_UNROLL
  130. #elif defined(i386) || defined(__i386__) /* x86 boxes, should be gcc */
  131. # define DES_PTR
  132. # define DES_RISC1
  133. # define DES_UNROLL
  134. #endif /* Systems-specific speed defines */
  135. #endif
  136. #endif /* DES_DEFAULT_OPTIONS */
  137. #endif /* HEADER_DES_LOCL_H */