opensslconf-powerpc.h revision 211934
1240116Smarcel/* $FreeBSD: head/secure/lib/libcrypto/opensslconf-powerpc.h 211934 2010-08-28 15:03:11Z nwhitehorn $ */
2240116Smarcel/* opensslconf.h */
3240116Smarcel/* WARNING: Generated automatically from opensslconf.h.in by Configure. */
4240116Smarcel
5240116Smarcel/* OpenSSL was configured with the following options: */
6240116Smarcel#ifndef OPENSSL_DOING_MAKEDEPEND
7240116Smarcel
8240116Smarcel/* Disabled by default in OpenSSL 0.9.8. */
9240116Smarcel#ifndef OPENSSL_NO_CAMELLIA
10240116Smarcel# define OPENSSL_NO_CAMELLIA
11240116Smarcel#endif
12240116Smarcel/* Disabled by default in OpenSSL 0.9.8. */
13240116Smarcel#ifndef OPENSSL_NO_CMS
14240116Smarcel# define OPENSSL_NO_CMS
15240116Smarcel#endif
16240116Smarcel/* Disabled by default in OpenSSL 0.9.8. */
17240116Smarcel#ifndef OPENSSL_NO_SEED
18240116Smarcel# define OPENSSL_NO_SEED
19240116Smarcel#endif
20240116Smarcel/* jpake is marked experimental in OpenSSL 0.9.8. */
21240116Smarcel#ifndef OPENSSL_NO_JPAKE
22240116Smarcel# define OPENSSL_NO_JPAKE
23240116Smarcel#endif
24240116Smarcel/* libgmp is not in the FreeBSD base system. */
25240116Smarcel#ifndef OPENSSL_NO_GMP
26275988Sngie# define OPENSSL_NO_GMP
27275988Sngie#endif
28240116Smarcel/* The Kerberos 5 support is MIT-specific. */
29240116Smarcel#ifndef OPENSSL_NO_KRB5
30240116Smarcel# define OPENSSL_NO_KRB5
31275988Sngie#endif
32240116Smarcel
33275988Sngie#endif /* OPENSSL_DOING_MAKEDEPEND */
34240116Smarcel#ifndef OPENSSL_THREADS
35240116Smarcel# define OPENSSL_THREADS
36240116Smarcel#endif
37240116Smarcel#ifndef OPENSSL_NO_STATIC_ENGINE
38240116Smarcel# define OPENSSL_NO_STATIC_ENGINE
39240116Smarcel#endif
40240116Smarcel
41240116Smarcel/* The OPENSSL_NO_* macros are also defined as NO_* if the application
42240116Smarcel   asks for it.  This is a transient feature that is provided for those
43240116Smarcel   who haven't had the time to do the appropriate changes in their
44240116Smarcel   applications.  */
45240116Smarcel#ifdef OPENSSL_ALGORITHM_DEFINES
46240116Smarcel# if defined(OPENSSL_NO_GMP) && !defined(NO_GMP)
47240116Smarcel#  define NO_GMP
48240116Smarcel# endif
49240116Smarcel# if defined(OPENSSL_NO_KRB5) && !defined(NO_KRB5)
50240116Smarcel#  define NO_KRB5
51240116Smarcel# endif
52240116Smarcel# endif
53240116Smarcel#ifdef OPENSSL_OTHER_DEFINES
54240116Smarcel# ifndef NO_ASM
55240116Smarcel#  define NO_ASM
56240116Smarcel# endif
57240116Smarcel#endif
58240116Smarcel
59240116Smarcel/* crypto/opensslconf.h.in */
60240116Smarcel
61240116Smarcel/* Generate 80386 code? */
62240116Smarcel#undef I386_ONLY
63240116Smarcel
64251108Smarcel#if !(defined(VMS) || defined(__VMS)) /* VMS uses logical names instead */
65240116Smarcel#if defined(HEADER_CRYPTLIB_H) && !defined(OPENSSLDIR)
66240116Smarcel#define ENGINESDIR "/usr/lib/engines"
67251108Smarcel#define OPENSSLDIR "/etc/ssl"
68240116Smarcel#endif
69240116Smarcel#endif
70240116Smarcel
71240116Smarcel#undef OPENSSL_UNISTD
72240116Smarcel#define OPENSSL_UNISTD <unistd.h>
73240116Smarcel
74240116Smarcel#undef OPENSSL_EXPORT_VAR_AS_FUNCTION
75240116Smarcel
76240116Smarcel#if defined(HEADER_IDEA_H) && !defined(IDEA_INT)
77240116Smarcel#define IDEA_INT unsigned int
78240116Smarcel#endif
79240116Smarcel
80240116Smarcel#if defined(HEADER_MD2_H) && !defined(MD2_INT)
81240116Smarcel#define MD2_INT unsigned int
82240116Smarcel#endif
83240116Smarcel
84240116Smarcel#if defined(HEADER_RC2_H) && !defined(RC2_INT)
85240116Smarcel/* I need to put in a mod for the alpha - eay */
86240116Smarcel#define RC2_INT unsigned int
87240116Smarcel#endif
88240116Smarcel
89240116Smarcel#if defined(HEADER_RC4_H)
90240116Smarcel#if !defined(RC4_INT)
91240116Smarcel/* using int types make the structure larger but make the code faster
92240116Smarcel * on most boxes I have tested - up to %20 faster. */
93240116Smarcel/*
94240116Smarcel * I don't know what does "most" mean, but declaring "int" is a must on:
95240116Smarcel * - Intel P6 because partial register stalls are very expensive;
96240116Smarcel * - elder Alpha because it lacks byte load/store instructions;
97240116Smarcel */
98240116Smarcel#define RC4_INT unsigned int
99240116Smarcel#endif
100240116Smarcel#if !defined(RC4_CHUNK)
101240116Smarcel/*
102240116Smarcel * This enables code handling data aligned at natural CPU word
103240116Smarcel * boundary. See crypto/rc4/rc4_enc.c for further details.
104240116Smarcel */
105240116Smarcel#undef RC4_CHUNK
106240116Smarcel#endif
107240116Smarcel#endif
108240116Smarcel
109240116Smarcel#if (defined(HEADER_NEW_DES_H) || defined(HEADER_DES_H)) && !defined(DES_LONG)
110240116Smarcel/* If this is set to 'unsigned int' on a DEC Alpha, this gives about a
111240116Smarcel * %20 speed up (longs are 8 bytes, int's are 4). */
112240116Smarcel#ifndef DES_LONG
113240116Smarcel#define DES_LONG unsigned int
114240116Smarcel#endif
115240116Smarcel#endif
116240116Smarcel
117240116Smarcel#if defined(HEADER_BN_H) && !defined(CONFIG_HEADER_BN_H)
118240116Smarcel#define CONFIG_HEADER_BN_H
119240116Smarcel#ifdef __powerpc64__
120240116Smarcel#undef BN_LLONG
121240116Smarcel#else
122240116Smarcel#define BN_LLONG
123240116Smarcel#endif
124240116Smarcel
125240116Smarcel/* Should we define BN_DIV2W here? */
126240116Smarcel
127240116Smarcel/* Only one for the following should be defined */
128240116Smarcel/* The prime number generation stuff may not work when
129240116Smarcel * EIGHT_BIT but I don't care since I've only used this mode
130240116Smarcel * for debuging the bignum libraries */
131240116Smarcel#ifdef __powerpc64__
132240116Smarcel#define SIXTY_FOUR_BIT_LONG
133240116Smarcel#undef THIRTY_TWO_BIT
134240116Smarcel#else
135240116Smarcel#undef SIXTY_FOUR_BIT_LONG
136240116Smarcel#define THIRTY_TWO_BIT
137240116Smarcel#endif
138240116Smarcel#undef SIXTY_FOUR_BIT
139240116Smarcel#undef SIXTEEN_BIT
140240116Smarcel#undef EIGHT_BIT
141240116Smarcel#endif
142240116Smarcel
143240116Smarcel#if defined(HEADER_RC4_LOCL_H) && !defined(CONFIG_HEADER_RC4_LOCL_H)
144240116Smarcel#define CONFIG_HEADER_RC4_LOCL_H
145240116Smarcel/* if this is defined data[i] is used instead of *data, this is a %20
146240116Smarcel * speedup on x86 */
147240116Smarcel#define RC4_INDEX
148240116Smarcel#endif
149240116Smarcel
150240116Smarcel#if defined(HEADER_BF_LOCL_H) && !defined(CONFIG_HEADER_BF_LOCL_H)
151240116Smarcel#define CONFIG_HEADER_BF_LOCL_H
152240116Smarcel#undef BF_PTR
153240116Smarcel#endif /* HEADER_BF_LOCL_H */
154240116Smarcel
155240116Smarcel#if defined(HEADER_DES_LOCL_H) && !defined(CONFIG_HEADER_DES_LOCL_H)
156240116Smarcel#define CONFIG_HEADER_DES_LOCL_H
157240116Smarcel#ifndef DES_DEFAULT_OPTIONS
158240116Smarcel/* the following is tweaked from a config script, that is why it is a
159240116Smarcel * protected undef/define */
160240116Smarcel#ifndef DES_PTR
161240116Smarcel#define DES_PTR
162240116Smarcel#endif
163240116Smarcel
164240116Smarcel/* This helps C compiler generate the correct code for multiple functional
165240116Smarcel * units.  It reduces register dependancies at the expense of 2 more
166240116Smarcel * registers */
167240116Smarcel#ifndef DES_RISC1
168240116Smarcel#define DES_RISC1
169240116Smarcel#endif
170240116Smarcel
171240116Smarcel#ifndef DES_RISC2
172240116Smarcel#undef DES_RISC2
173240116Smarcel#endif
174240116Smarcel
175240116Smarcel#if defined(DES_RISC1) && defined(DES_RISC2)
176240116SmarcelYOU SHOULD NOT HAVE BOTH DES_RISC1 AND DES_RISC2 DEFINED!!!!!
177240116Smarcel#endif
178240116Smarcel
179240116Smarcel/* Unroll the inner loop, this sometimes helps, sometimes hinders.
180240116Smarcel * Very mucy CPU dependant */
181240116Smarcel#ifndef DES_UNROLL
182240116Smarcel#define DES_UNROLL
183240116Smarcel#endif
184240116Smarcel
185240116Smarcel/* These default values were supplied by
186240116Smarcel * Peter Gutman <pgut001@cs.auckland.ac.nz>
187240116Smarcel * They are only used if nothing else has been defined */
188240116Smarcel#if !defined(DES_PTR) && !defined(DES_RISC1) && !defined(DES_RISC2) && !defined(DES_UNROLL)
189240116Smarcel/* Special defines which change the way the code is built depending on the
190240116Smarcel   CPU and OS.  For SGI machines you can use _MIPS_SZLONG (32 or 64) to find
191240116Smarcel   even newer MIPS CPU's, but at the moment one size fits all for
192240116Smarcel   optimization options.  Older Sparc's work better with only UNROLL, but
193240116Smarcel   there's no way to tell at compile time what it is you're running on */
194240116Smarcel
195240116Smarcel#if defined( sun )		/* Newer Sparc's */
196240116Smarcel#  define DES_PTR
197240116Smarcel#  define DES_RISC1
198240116Smarcel#  define DES_UNROLL
199240116Smarcel#elif defined( __ultrix )	/* Older MIPS */
200240116Smarcel#  define DES_PTR
201240116Smarcel#  define DES_RISC2
202240116Smarcel#  define DES_UNROLL
203240116Smarcel#elif defined( __osf1__ )	/* Alpha */
204240116Smarcel#  define DES_PTR
205240116Smarcel#  define DES_RISC2
206240116Smarcel#elif defined ( _AIX )		/* RS6000 */
207240116Smarcel  /* Unknown */
208240116Smarcel#elif defined( __hpux )		/* HP-PA */
209240116Smarcel  /* Unknown */
210240116Smarcel#elif defined( __aux )		/* 68K */
211240116Smarcel  /* Unknown */
212240116Smarcel#elif defined( __dgux )		/* 88K (but P6 in latest boxes) */
213240116Smarcel#  define DES_UNROLL
214240116Smarcel#elif defined( __sgi )		/* Newer MIPS */
215240116Smarcel#  define DES_PTR
216240116Smarcel#  define DES_RISC2
217240116Smarcel#  define DES_UNROLL
218240116Smarcel#elif defined( i386 )		/* x86 boxes, should be gcc */
219240116Smarcel#  define DES_PTR
220240116Smarcel#  define DES_RISC1
221240116Smarcel#  define DES_UNROLL
222240116Smarcel#endif /* Systems-specific speed defines */
223240116Smarcel#endif
224240116Smarcel
225240116Smarcel#endif /* DES_DEFAULT_OPTIONS */
226240116Smarcel#endif /* HEADER_DES_LOCL_H */
227240116Smarcel