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