~ubuntu-branches/ubuntu/intrepid/libcrypto++/intrepid

« back to all changes in this revision

Viewing changes to configure.in

  • Committer: Bazaar Package Importer
  • Author(s): Pierre Machard
  • Date: 2004-08-27 12:35:05 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20040827123505-7evgxiu7k8memiyk
Tags: 5.2.1a-1
* Urgency set to high because lastest upload was unclean
* Rename libcrypto++-5.2.1.orig.tar.gz in  libcrypto++-5.2.1a.orig.tar.gz

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
 
2
 
AC_INIT([crypto++], 5.1)
 
2
AC_INIT([crypto++],[5.2])
3
3
AC_CONFIG_SRCDIR(configure.in)
4
4
AM_INIT_AUTOMAKE([no-define])
5
 
AM_CONFIG_HEADER([cryptopp_config.h])
 
5
AC_CONFIG_HEADERS([cryptopp_config.h])
6
6
AM_MAINTAINER_MODE
7
7
 
 
8
 
 
9
AC_CHECK_FUNCS([gethostbyname]) 
 
10
AC_CHECK_FUNCS([gettimeofday])
 
11
AC_CHECK_FUNCS([memmove])
 
12
AC_CHECK_FUNCS([memset]) 
 
13
AC_CHECK_FUNCS([pow]) 
 
14
AC_CHECK_FUNCS([select])
 
15
AC_CHECK_FUNCS([socket]) 
 
16
AC_CHECK_HEADERS([arpa/inet.h]) 
 
17
AC_CHECK_HEADERS([fcntl.h])
 
18
AC_CHECK_HEADERS([limits.h])
 
19
AC_CHECK_HEADERS([malloc.h])
 
20
AC_CHECK_HEADERS([netdb.h]) 
 
21
AC_CHECK_HEADERS([netinet/in.h])
 
22
AC_CHECK_HEADERS([stddef.h]) 
 
23
AC_CHECK_HEADERS([sys/ioctl.h]) 
 
24
AC_CHECK_HEADERS([sys/socket.h]) 
 
25
AC_CHECK_HEADERS([sys/time.h]) 
 
26
AC_CHECK_TYPES([ptrdiff_t]) 
 
27
AC_C_CONST
 
28
AC_C_INLINE
 
29
AC_FUNC_MALLOC
 
30
AC_FUNC_MEMCMP
 
31
AC_FUNC_SELECT_ARGTYPES 
 
32
AC_HEADER_STDBOOL
 
33
AC_HEADER_TIME 
 
34
 
 
35
AC_PROG_GCC_TRADITIONAL
 
36
 
 
37
AC_PROG_RANLIB
 
38
AC_TYPE_SIGNAL
 
39
AC_TYPE_SIZE_T 
 
40
 
8
41
AC_PROG_CXX
9
42
AC_PROG_LIBTOOL
10
43
AC_PROG_INSTALL
12
45
AC_C_BIGENDIAN(
13
46
        AC_DEFINE(IS_BIG_ENDIAN, [], [Big-endian architecture]),
14
47
        AC_DEFINE(IS_LITTLE_ENDIAN, [], [Little-endian architecture]),
15
 
        AC_ERROR([Can't tell endianess of platform]))
 
48
        AC_MSG_ERROR([Can't tell endianess of platform]))
 
49
 
 
50
dnl From xemacs-21.2.43/configure.in
 
51
dnl check for Unix98 socklen_t
 
52
AC_MSG_CHECKING(for socklen_t)
 
53
AC_TRY_COMPILE([#include <sys/socket.h>
 
54
socklen_t x;
 
55
],[],[AC_MSG_RESULT(yes)],[
 
56
AC_TRY_COMPILE([#include <sys/socket.h>
 
57
int accept (int, struct sockaddr *, size_t *);
 
58
],[],[
 
59
AC_MSG_RESULT(::socklen_t)
 
60
AC_DEFINE(TYPE_OF_SOCKLEN_T,::socklen_t,[socklent_t socket])], [
 
61
AC_MSG_RESULT(int)
 
62
AC_DEFINE(TYPE_OF_SOCKLEN_T,int,[int socket])])])
 
63
 
16
64
 
17
65
AH_TOP([
18
66
#ifndef CRYPTOPP_CONFIG_H
42
90
#undef PACKAGE_STRING
43
91
#undef PACKAGE_TARNAME
44
92
#undef PACKAGE_VERSION
45
 
#define PACKAGE_BUGREPORT       _PACKAGE_BUGREPORT
46
 
#define PACKAGE_NAME            _PACKAGE_NAME
47
 
#define PACKAGE_STRING          _PACKAGE_STRING
48
 
#define PACKAGE_TARNAME         _PACKAGE_TARNAME
49
 
#define PACKAGE_VERSION         _PACKAGE_VERSION
 
93
#define PACKAGE_BUGREPORT      _PACKAGE_BUGREPORT
 
94
#define PACKAGE_NAME           _PACKAGE_NAME
 
95
#define PACKAGE_STRING         _PACKAGE_STRING
 
96
#define PACKAGE_TARNAME                _PACKAGE_TARNAME
 
97
#define PACKAGE_VERSION                _PACKAGE_VERSION
50
98
 
51
99
#endif
52
100
 
77
125
// and you want a (possibly) faster IDEA implementation using log tables
78
126
// #define IDEA_LARGECACHE
79
127
 
80
 
// Try this if you have a large cache or your CPU is slow manipulating
81
 
// individual bytes.
82
 
// #define DIAMOND_USE_PERMTABLE
83
 
 
84
128
// Define this if, for the linear congruential RNG, you want to use
85
129
// the original constants as specified in S.K. Park and K.W. Miller's
86
130
// CACM paper.
103
147
// Defining this will cause Crypto++ to make only one call to CryptAcquireContext.
104
148
#define WORKAROUND_MS_BUG_Q258000
105
149
 
 
150
#ifdef CRYPTOPP_DOXYGEN_PROCESSING
106
151
// Avoid putting "CryptoPP::" in front of everything in Doxygen output
107
 
#ifdef CRYPTOPP_DOXYGEN_PROCESSING
108
152
#       define CryptoPP
109
153
#       define NAMESPACE_BEGIN(x)
110
154
#       define NAMESPACE_END
 
155
// Get Doxygen to generate better documentation for these typedefs
 
156
#       define DOCUMENTED_TYPEDEF(x, y) class y : public x {};
111
157
#else
112
158
#       define NAMESPACE_BEGIN(x) namespace x {
113
159
#       define NAMESPACE_END }
 
160
#       define DOCUMENTED_TYPEDEF(x, y) typedef x y;
114
161
#endif
115
162
#define ANONYMOUS_NAMESPACE_BEGIN namespace {
116
163
#define USING_NAMESPACE(x) using namespace x;
117
164
#define DOCUMENTED_NAMESPACE_BEGIN(x) namespace x {
118
165
#define DOCUMENTED_NAMESPACE_END }
119
166
 
120
 
// What is the type of the third parameter to bind?
121
 
// For Unix, the new standard is ::socklen_t (typically unsigned int), and the old standard is int.
122
 
// Unfortunately there is no way to tell whether or not socklen_t is defined.
123
 
// To work around this, TYPE_OF_SOCKLEN_T is a macro so that you can change it from the makefile.
 
167
 
124
168
#ifndef TYPE_OF_SOCKLEN_T
125
 
#       if defined(_WIN32) || defined(__CYGWIN__) || defined(__MACH__)
126
 
#               define TYPE_OF_SOCKLEN_T int
127
 
#       else
128
 
#               define TYPE_OF_SOCKLEN_T ::socklen_t
129
 
#       endif
 
169
#       if defined(_WIN32) || defined(__CYGWIN__) || defined(__MACH__)
 
170
#               define TYPE_OF_SOCKLEN_T int
 
171
#       else
 
172
#               define TYPE_OF_SOCKLEN_T ::socklen_t
 
173
#       endif
130
174
#endif
131
175
 
132
176
#if defined(__CYGWIN__) && defined(PREFER_WINDOWS_STYLE_SOCKETS)
133
177
#       define __USE_W32_SOCKETS
134
178
#endif
135
179
 
136
 
typedef unsigned char byte;     // moved outside namespace for Borland C++Builder 5
 
180
typedef unsigned char byte;             // put in global namespace to avoid ambiguity with other byte typedefs
137
181
 
138
182
NAMESPACE_BEGIN(CryptoPP)
139
183
 
140
184
typedef unsigned short word16;
141
 
#if !defined(_MSC_VER) && (SIZEOF_LONG != 4)
142
 
        typedef unsigned int word32;
143
 
#else
144
 
        typedef unsigned long word32;
145
 
#endif
 
185
typedef unsigned int word32;
146
186
 
147
187
#if defined(__GNUC__) || defined(__MWERKS__)
148
 
#       define WORD64_AVAILABLE
 
188
        #define WORD64_AVAILABLE
149
189
        typedef unsigned long long word64;
150
 
#       define W64LIT(x) x##LL
 
190
        #define W64LIT(x) x##LL
151
191
#elif defined(_MSC_VER) || defined(__BCPLUSPLUS__)
152
 
#       define WORD64_AVAILABLE
 
192
        #define WORD64_AVAILABLE
153
193
        typedef unsigned __int64 word64;
154
 
#       define W64LIT(x) x##ui64
155
 
#endif
156
 
 
157
 
// defined this if your CPU is not 64-bit
158
 
#if defined(WORD64_AVAILABLE) && (SIZEOF_LONG != 8)
159
 
#       define SLOW_WORD64
160
 
#endif
161
 
 
162
 
// word should have the same size as your CPU registers
163
 
// dword should be twice as big as word
164
 
 
165
 
#if (defined(__GNUC__) && (SIZEOF_LONG == 4)) || defined(__MWERKS__)
166
 
        typedef unsigned long word;
167
 
        typedef unsigned long long dword;
168
 
#elif defined(_MSC_VER) || defined(__BCPLUSPLUS__)
169
 
        typedef unsigned __int32 word;
170
 
        typedef unsigned __int64 dword;
171
 
#else
172
 
        typedef unsigned int word;
173
 
        typedef unsigned long dword;
 
194
        #define W64LIT(x) x##ui64
 
195
#endif
 
196
 
 
197
// define largest word type
 
198
#ifdef WORD64_AVAILABLE
 
199
        typedef word64 lword;
 
200
#else
 
201
        typedef word32 lword;
 
202
#endif
 
203
 
 
204
#if defined(__alpha__) || defined(__ia64__) || defined(_ARCH_PPC64) || defined(__x86_64__) || defined(__mips64)
 
205
        // These platforms have 64-bit CPU registers. Unfortunately most C++ compilers doesn't
 
206
        // allow any way to access the 64-bit by 64-bit multiply instruction without using
 
207
        // assembly, so in order to use word64 as word, the assembly instruction must be defined
 
208
        // in Dword::Multiply().
 
209
        typedef word32 hword;
 
210
        typedef word64 word;
 
211
#else
 
212
        #define CRYPTOPP_NATIVE_DWORD_AVAILABLE
 
213
        #ifdef WORD64_AVAILABLE
 
214
                #define CRYPTOPP_SLOW_WORD64 // defined this if your CPU is not 64-bit to use alternative code that avoids word64
 
215
                typedef word16 hword;
 
216
                typedef word32 word;
 
217
                typedef word64 dword;
 
218
        #else
 
219
                typedef word8 hword;
 
220
                typedef word16 word;
 
221
                typedef word32 dword;
 
222
        #endif
174
223
#endif
175
224
 
176
225
const unsigned int WORD_SIZE = sizeof(word);
177
226
const unsigned int WORD_BITS = WORD_SIZE * 8;
178
227
 
179
 
#define LOW_WORD(x) (word)(x)
180
 
 
181
 
union dword_union
182
 
{
183
 
        dword_union (const dword &dw) : dw(dw) {}
184
 
        dword dw;
185
 
        word w[2];
186
 
};
187
 
 
188
 
#ifdef IS_LITTLE_ENDIAN
189
 
#       define HIGH_WORD(x) (dword_union(x).w[1])
190
 
#else
191
 
#       define HIGH_WORD(x) (dword_union(x).w[0])
192
 
#endif
193
 
 
194
 
// if the above HIGH_WORD macro doesn't work (if you are not sure, compile it
195
 
// and run the validation tests), try this:
196
 
// #define HIGH_WORD(x) (word)((x)>>WORD_BITS)
197
 
 
198
228
#if defined(_MSC_VER) || defined(__BCPLUSPLUS__)
199
 
#       define INTEL_INTRINSICS
200
 
#       define FAST_ROTATE
 
229
        #define INTEL_INTRINSICS
 
230
        #define FAST_ROTATE
201
231
#elif defined(__MWERKS__) && TARGET_CPU_PPC
202
 
#       define PPC_INTRINSICS
203
 
#       define FAST_ROTATE
 
232
        #define PPC_INTRINSICS
 
233
        #define FAST_ROTATE
204
234
#elif defined(__GNUC__) && defined(__i386__)
205
235
        // GCC does peephole optimizations which should result in using rotate instructions
206
 
#       define FAST_ROTATE
 
236
        #define FAST_ROTATE
207
237
#endif
208
238
 
209
239
NAMESPACE_END
216
246
#endif
217
247
 
218
248
#ifdef _MSC_VER
 
249
#define CRYPTOPP_NO_VTABLE __declspec(novtable)
 
250
#else
 
251
#define CRYPTOPP_NO_VTABLE
 
252
#endif
 
253
 
 
254
#ifdef _MSC_VER
 
255
        // 4231: nonstandard extension used : 'extern' before template explicit instantiation
219
256
        // 4250: dominance
 
257
        // 4251: member needs to have dll-interface
 
258
        // 4275: base needs to have dll-interface
220
259
        // 4660: explicitly instantiating a class that's already implicitly instantiated
221
260
        // 4661: no suitable definition provided for explicit template instantiation request
222
261
        // 4786: identifer was truncated in debug information
223
262
        // 4355: 'this' : used in base member initializer list
224
 
#       pragma warning(disable: 4250 4660 4661 4786 4355)
 
263
#       pragma warning(disable: 4231 4250 4251 4275 4660 4661 4786 4355)
 
264
#endif
 
265
 
 
266
#if (defined(_MSC_VER) && _MSC_VER <= 1300) || defined(__MWERKS__) || defined(_STLPORT_VERSION)
 
267
#define CRYPTOPP_DISABLE_UNCAUGHT_EXCEPTION
 
268
#endif
 
269
 
 
270
#ifndef CRYPTOPP_DISABLE_UNCAUGHT_EXCEPTION
 
271
#define CRYPTOPP_UNCAUGHT_EXCEPTION_AVAILABLE
 
272
#endif
 
273
 
 
274
// CodeWarrior defines _MSC_VER
 
275
#if !defined(CRYPTOPP_DISABLE_X86ASM) && ((defined(_MSC_VER) && !defined(__MWERKS__) && defined(_M_IX86)) || (defined(__GNUC__) && defined(__i386__)))
 
276
#define CRYPTOPP_X86ASM_AVAILABLE
225
277
#endif
226
278
 
227
279
// ***************** determine availability of OS features ********************
236
288
#define CRYPTOPP_UNIX_AVAILABLE
237
289
#endif
238
290
 
239
 
#if defined(WORD64_AVAILABLE) && (defined(CRYPTOPP_WIN32_AVAILABLE) || defined(CRYPTOPP_UNIX_AVAILABLE) || defined(macintosh))
 
291
#if defined(WORD64_AVAILABLE) && (defined(CRYPTOPP_WIN32_AVAILABLE) || defined(CRYPTOPP_UNIX_AVAILABLE))
240
292
#       define HIGHRES_TIMER_AVAILABLE
241
293
#endif
242
294
 
267
319
#       define OS_RNG_AVAILABLE
268
320
#endif
269
321
 
270
 
#ifdef CRYPTOPP_UNIX_AVAILABLE
 
322
#if defined(CRYPTOPP_UNIX_AVAILABLE) || defined(CRYPTOPP_DOXYGEN_PROCESSING)
271
323
#       define NONBLOCKING_RNG_AVAILABLE
272
324
#       define BLOCKING_RNG_AVAILABLE
273
325
#       define OS_RNG_AVAILABLE
280
332
#       define THREADS_AVAILABLE
281
333
#endif
282
334
 
 
335
#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
 
336
#       define CRYPTOPP_MALLOC_ALIGNMENT_IS_16
 
337
#endif
 
338
 
 
339
#if defined(__linux__) || defined(__sun__) || defined(__CYGWIN__)
 
340
#       define CRYPTOPP_MEMALIGN_AVAILABLE
 
341
#endif
 
342
 
283
343
#endif  // NO_OS_DEPENDENCE
284
344
 
 
345
// ***************** DLL related ********************
 
346
 
 
347
#ifdef CRYPTOPP_WIN32_AVAILABLE
 
348
 
 
349
#ifdef CRYPTOPP_EXPORTS
 
350
#define CRYPTOPP_IS_DLL
 
351
#define CRYPTOPP_DLL __declspec(dllexport)
 
352
#elif defined(CRYPTOPP_IMPORTS)
 
353
#define CRYPTOPP_IS_DLL
 
354
#define CRYPTOPP_DLL __declspec(dllimport)
 
355
#else
 
356
#define CRYPTOPP_DLL
 
357
#endif
 
358
 
 
359
#define CRYPTOPP_API __stdcall
 
360
#define CRYPTOPP_CDECL __cdecl
 
361
 
 
362
#else   // CRYPTOPP_WIN32_AVAILABLE
 
363
 
 
364
#define CRYPTOPP_DLL
 
365
#define CRYPTOPP_API
 
366
#define CRYPTOPP_CDECL
 
367
 
 
368
#endif  // CRYPTOPP_WIN32_AVAILABLE
 
369
 
 
370
#if defined(CRYPTOPP_MANUALLY_INSTANTIATE_TEMPLATES) && !defined(CRYPTOPP_IMPORTS)
 
371
#define CRYPTOPP_DLL_TEMPLATE_CLASS template class CRYPTOPP_DLL
 
372
#elif defined(__MWERKS__)
 
373
#define CRYPTOPP_DLL_TEMPLATE_CLASS extern class CRYPTOPP_DLL
 
374
#else
 
375
#define CRYPTOPP_DLL_TEMPLATE_CLASS extern template class CRYPTOPP_DLL
 
376
#endif
 
377
 
 
378
#if defined(CRYPTOPP_MANUALLY_INSTANTIATE_TEMPLATES) && !defined(CRYPTOPP_EXPORTS)
 
379
#define CRYPTOPP_STATIC_TEMPLATE_CLASS template class
 
380
#elif defined(__MWERKS__)
 
381
#define CRYPTOPP_STATIC_TEMPLATE_CLASS extern class
 
382
#else
 
383
#define CRYPTOPP_STATIC_TEMPLATE_CLASS extern template class
 
384
#endif
 
385
 
285
386
#endif
286
387
])
287
388
 
288
 
AC_OUTPUT([
 
389
AC_CONFIG_FILES([
289
390
        GNUmakefile
290
391
        html/Makefile
291
392
        ])
 
393
AC_OUTPUT
292
394