opensslconf.h.in revision 296341
11558Srgrimes/* crypto/opensslconf.h.in */
21558Srgrimes
31558Srgrimes/* Generate 80386 code? */
41558Srgrimes#undef I386_ONLY
51558Srgrimes
61558Srgrimes#if !(defined(VMS) || defined(__VMS)) /* VMS uses logical names instead */
71558Srgrimes#if defined(HEADER_CRYPTLIB_H) && !defined(OPENSSLDIR)
81558Srgrimes#define ENGINESDIR "/usr/local/lib/engines"
91558Srgrimes#define OPENSSLDIR "/usr/local/ssl"
101558Srgrimes#endif
111558Srgrimes#endif
121558Srgrimes
131558Srgrimes#undef OPENSSL_UNISTD
141558Srgrimes#define OPENSSL_UNISTD <unistd.h>
151558Srgrimes
161558Srgrimes#undef OPENSSL_EXPORT_VAR_AS_FUNCTION
171558Srgrimes
181558Srgrimes#if defined(HEADER_IDEA_H) && !defined(IDEA_INT)
191558Srgrimes#define IDEA_INT unsigned int
201558Srgrimes#endif
211558Srgrimes
221558Srgrimes#if defined(HEADER_MD2_H) && !defined(MD2_INT)
231558Srgrimes#define MD2_INT unsigned int
241558Srgrimes#endif
251558Srgrimes
261558Srgrimes#if defined(HEADER_RC2_H) && !defined(RC2_INT)
271558Srgrimes/* I need to put in a mod for the alpha - eay */
281558Srgrimes#define RC2_INT unsigned int
291558Srgrimes#endif
301558Srgrimes
3113171Swollman#if defined(HEADER_RC4_H)
321558Srgrimes#if !defined(RC4_INT)
331558Srgrimes/* using int types make the structure larger but make the code faster
341558Srgrimes * on most boxes I have tested - up to %20 faster. */
351558Srgrimes/*
361558Srgrimes * I don't know what does "most" mean, but declaring "int" is a must on:
3737907Scharnier * - Intel P6 because partial register stalls are very expensive;
3885048Sru * - elder Alpha because it lacks byte load/store instructions;
3937907Scharnier */
401558Srgrimes#define RC4_INT unsigned int
411558Srgrimes#endif
42196527Scharnier#if !defined(RC4_CHUNK)
43196527Scharnier/*
44196527Scharnier * This enables code handling data aligned at natural CPU word
451558Srgrimes * boundary. See crypto/rc4/rc4_enc.c for further details.
461558Srgrimes */
471558Srgrimes#undef RC4_CHUNK
481558Srgrimes#endif
491558Srgrimes#endif
5051639Sbillf
51253234Shrs#if (defined(HEADER_NEW_DES_H) || defined(HEADER_DES_H)) && !defined(DES_LONG)
521558Srgrimes/* If this is set to 'unsigned int' on a DEC Alpha, this gives about a
531558Srgrimes * %20 speed up (longs are 8 bytes, int's are 4). */
541558Srgrimes#ifndef DES_LONG
551558Srgrimes#define DES_LONG unsigned long
561558Srgrimes#endif
5778140Sru#endif
5817046Sjulian
591558Srgrimes#if defined(HEADER_BN_H) && !defined(CONFIG_HEADER_BN_H)
601558Srgrimes#define CONFIG_HEADER_BN_H
611558Srgrimes#undef BN_LLONG
6220287Swollman
6320287Swollman/* Should we define BN_DIV2W here? */
641558Srgrimes
6569793Sobrien/* Only one for the following should be defined */
661558Srgrimes#undef SIXTY_FOUR_BIT_LONG
671558Srgrimes#undef SIXTY_FOUR_BIT
681558Srgrimes#define THIRTY_TWO_BIT
6913171Swollman#endif
7020287Swollman
7178064Sume#if defined(HEADER_RC4_LOCL_H) && !defined(CONFIG_HEADER_RC4_LOCL_H)
721558Srgrimes#define CONFIG_HEADER_RC4_LOCL_H
731558Srgrimes/* if this is defined data[i] is used instead of *data, this is a %20
74204406Suqs * speedup on x86 */
751558Srgrimes#undef RC4_INDEX
761558Srgrimes#endif
771558Srgrimes
781558Srgrimes#if defined(HEADER_BF_LOCL_H) && !defined(CONFIG_HEADER_BF_LOCL_H)
791558Srgrimes#define CONFIG_HEADER_BF_LOCL_H
801558Srgrimes#undef BF_PTR
811558Srgrimes#endif /* HEADER_BF_LOCL_H */
821558Srgrimes
831558Srgrimes#if defined(HEADER_DES_LOCL_H) && !defined(CONFIG_HEADER_DES_LOCL_H)
8454263Sshin#define CONFIG_HEADER_DES_LOCL_H
8554263Sshin#ifndef DES_DEFAULT_OPTIONS
8654263Sshin/* the following is tweaked from a config script, that is why it is a
8717046Sjulian * protected undef/define */
881558Srgrimes#ifndef DES_PTR
8978140Sru#undef DES_PTR
9078064Sume#endif
911558Srgrimes
921558Srgrimes/* This helps C compiler generate the correct code for multiple functional
931558Srgrimes * units.  It reduces register dependancies at the expense of 2 more
9482651Sru * registers */
951558Srgrimes#ifndef DES_RISC1
96196527Scharnier#undef DES_RISC1
97253236Shrs#endif
981558Srgrimes
991558Srgrimes#ifndef DES_RISC2
1001558Srgrimes#undef DES_RISC2
10182651Sru#endif
102253234Shrs
103253234Shrs#if defined(DES_RISC1) && defined(DES_RISC2)
104196527Scharnier#error YOU SHOULD NOT HAVE BOTH DES_RISC1 AND DES_RISC2 DEFINED!!!!!
105204406Suqs#endif
106204406Suqs
107204406Suqs/* Unroll the inner loop, this sometimes helps, sometimes hinders.
108204406Suqs * Very mucy CPU dependant */
109253234Shrs#ifndef DES_UNROLL
110253236Shrs#undef DES_UNROLL
111204406Suqs#endif
112204406Suqs
11397062Sume/* These default values were supplied by
114204406Suqs * Peter Gutman <pgut001@cs.auckland.ac.nz>
11597062Sume * They are only used if nothing else has been defined */
116204406Suqs#if !defined(DES_PTR) && !defined(DES_RISC1) && !defined(DES_RISC2) && !defined(DES_UNROLL)
117204406Suqs/* Special defines which change the way the code is built depending on the
118253234Shrs   CPU and OS.  For SGI machines you can use _MIPS_SZLONG (32 or 64) to find
119204406Suqs   even newer MIPS CPU's, but at the moment one size fits all for
120204406Suqs   optimization options.  Older Sparc's work better with only UNROLL, but
121253234Shrs   there's no way to tell at compile time what it is you're running on */
122216297Sglebius 
123216297Sglebius#if defined( sun )		/* Newer Sparc's */
124204406Suqs#  define DES_PTR
125253234Shrs#  define DES_RISC1
126216297Sglebius#  define DES_UNROLL
127204406Suqs#elif defined( __ultrix )	/* Older MIPS */
128253234Shrs#  define DES_PTR
129204406Suqs#  define DES_RISC2
130253234Shrs#  define DES_UNROLL
131253234Shrs#elif defined( __osf1__ )	/* Alpha */
132204406Suqs#  define DES_PTR
133204406Suqs#  define DES_RISC2
134204406Suqs#elif defined ( _AIX )		/* RS6000 */
1351558Srgrimes  /* Unknown */
136253234Shrs#elif defined( __hpux )		/* HP-PA */
137253234Shrs  /* Unknown */
138253234Shrs#elif defined( __aux )		/* 68K */
139253234Shrs  /* Unknown */
140253234Shrs#elif defined( __dgux )		/* 88K (but P6 in latest boxes) */
141253234Shrs#  define DES_UNROLL
142253234Shrs#elif defined( __sgi )		/* Newer MIPS */
143253234Shrs#  define DES_PTR
144253234Shrs#  define DES_RISC2
145253234Shrs#  define DES_UNROLL
146253234Shrs#elif defined(i386) || defined(__i386__)	/* x86 boxes, should be gcc */
147253234Shrs#  define DES_PTR
148204406Suqs#  define DES_RISC1
14913171Swollman#  define DES_UNROLL
15018286Sbde#endif /* Systems-specific speed defines */
151196527Scharnier#endif
1521558Srgrimes
153204406Suqs#endif /* DES_DEFAULT_OPTIONS */
15413171Swollman#endif /* HEADER_DES_LOCL_H */
1551558Srgrimes