opensslconf.h.in 4.9 KB

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