opensslconf.h.in 4.5 KB

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