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