Make check and splint clean.
authorjbj <devnull@localhost>
Sat, 15 Jun 2002 18:49:02 +0000 (18:49 +0000)
committerjbj <devnull@localhost>
Sat, 15 Jun 2002 18:49:02 +0000 (18:49 +0000)
Don't install fooopt files, they are merely ASM_FOO switches.
Don't install beecrypt.{api,win}.h
Get rid of autocruft files in CVS.

CVS patchset: 5490
CVS date: 2002/06/15 18:49:02

30 files changed:
beecrypt/.lclintrc
beecrypt/Makefile.am
beecrypt/Makefile.in
beecrypt/acconfig.h [deleted file]
beecrypt/aes.c
beecrypt/aes.h
beecrypt/aesopt.h
beecrypt/beecrypt.c
beecrypt/beecrypt.h
beecrypt/beecrypt.win.h
beecrypt/blowfish.c
beecrypt/blowfishopt.h
beecrypt/config.h [deleted file]
beecrypt/config.h.in
beecrypt/configure.ac
beecrypt/docs/Makefile.in
beecrypt/fips186.c
beecrypt/fips186.h
beecrypt/gas/Makefile.in
beecrypt/hmac.c
beecrypt/masm/Makefile.in
beecrypt/mp32.c
beecrypt/mp32opt.h
beecrypt/mtprng.c
beecrypt/mwerks/Makefile.in
beecrypt/sha1.c
beecrypt/sha1.h
beecrypt/sha1opt.h
beecrypt/tests/Makefile.in
beecrypt/tests/beetest.c

index b430486..4705085 100644 (file)
 +strict                        # lclint level
 
 # --- not-yet at strict level
--exportconst           # 4 occurences
--exportfcn             # 317 occurences
--exporttype            # 52 occurences
--exportvar             # 10 occurences
--protoparamname
+-exportconst           # 4
+-exportfcn             # 308
+-exporttype            # 53
+-exportvar             # 14
+-protoparamname                # 826
 
 -ansi-reserved-internal        # goofy
 
--ptrarith              # 217 occurences
+-ptrarith              # 212
 
--compdestroy           # 6 occurences
--mustdefine            # 50 occurences
+-compdestroy           # 6
+-mustdefine            # 49
 
--bitwisesigned         # 69 occurences
--strictops             # 37 occurences
--sizeoftype            # 124 occurences
+-bitwisesigned         # 77
+-strictops             # 48
+-sizeoftype            # 22
 
 -impcheckedstrictglobs
 -impcheckedstrictstatics
 -strictbranchstate
--strictdestroy         # 18 occurences
 
--forblock              # 10 occurences
--ifblock               # 406 occurences
--whileblock            # 23 occurences
--sys-dir-errors                # 30 occurences
+-forblock              # 15
+-ifblock               # 455
+-whileblock            # 25
+-sys-dir-errors                # 1296
 
 # --- not-yet at checks level
--predboolptr           # 121 occurences
--allglobs              # 219 occurences, painful
+-predboolptr           # 98
 -ansi-reserved         # goofy
 
-# don't-bother-me-yet parameters
-
 # --- not-yet at standard level
--boolops               # 58 occurences
--predboolint           # 203 occurences
--type                  # 844 occurences
-
-# --- not-yet at weak level
--predboolothers
+-boolops               # 49
+-predboolint           # 238
+-type                  # 965
index 66443c7..85d608e 100644 (file)
@@ -54,11 +54,11 @@ libbeecrypt_la_LIBADD = aesopt.lo blowfishopt.lo mp32opt.lo sha1opt.lo
 
 libbeecrypt_la_LDFLAGS = -version-info $(LIBBEECRYPT_LT_CURRENT):$(LIBBEECRYPT_LT_REVISION):$(LIBBEECRYPT_LT_AGE)
 
-pkginclude_HEADERS = aes.h aesopt.h base64.h beecrypt.h beecrypt.api.h beecrypt.win.h blockmode.h blockpad.h blowfish.h blowfishopt.h dhaes.h dldp.h dlkp.h dlpk.h dlsvdp-dh.h dsa.h elgamal.h endianness.h entropy.h fips186.h hmac.h hmacmd5.h hmacsha1.h hmacsha256.h md5.h memchunk.h mp32.h mp32barrett.h mp32number.h mp32opt.h mp32prime.h mtprng.h rsa.h rsakp.h rsapk.h sha1.h sha1opt.h sha256.h timestamp.h
+pkginclude_HEADERS = aes.h base64.h beecrypt.h blockmode.h blockpad.h blowfish.h dhaes.h dldp.h dlkp.h dlpk.h dlsvdp-dh.h dsa.h elgamal.h endianness.h entropy.h fips186.h hmac.h hmacmd5.h hmacsha1.h hmacsha256.h md5.h memchunk.h mp32.h mp32barrett.h mp32number.h mp32prime.h mtprng.h rsa.h rsakp.h rsapk.h sha1.h sha256.h timestamp.h
 
-EXTRA_DIST = BENCHMARKS BUGS CONTRIBUTORS Doxyfile.in Doxyheader README README.DARWIN README.DLL README.WIN32 beecrypt.def beecrypt.rc beecrypt.spec types.h javaglue.h installgen.sh
+noinst_HEADERS = aesopt.h beecrypt.api.h beecrypt.win.h blowfishopt.h debug.h mp32opt.h sha1opt.h system.h
 
-noinst_HEADERS = debug.h system.h
+EXTRA_DIST = BENCHMARKS BUGS CONTRIBUTORS Doxyfile.in Doxyheader README README.DARWIN README.DLL README.WIN32 beecrypt.def beecrypt.rc beecrypt.spec types.h javaglue.h installgen.sh
 
 .PHONY: beetest
 beetest: all
index 62690fb..a076e63 100644 (file)
@@ -88,12 +88,8 @@ POST_INSTALL = :
 NORMAL_UNINSTALL = :
 PRE_UNINSTALL = :
 POST_UNINSTALL = :
-build_alias = @build_alias@
-build_triplet = @build@
 host_alias = @host_alias@
 host_triplet = @host@
-target_alias = @target_alias@
-target_triplet = @target@
 
 EXEEXT = @EXEEXT@
 OBJEXT = @OBJEXT@
@@ -103,13 +99,12 @@ AS = @AS@
 AWK = @AWK@
 CC = @CC@
 CPP = @CPP@
+CXX = @CXX@
 DEPDIR = @DEPDIR@
 DLLTOOL = @DLLTOOL@
 ECHO = @ECHO@
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-LD = @LD@
 LIBTOOL = @LIBTOOL@
-LIBTOOL_DEPS = @LIBTOOL_DEPS@
 LN_S = @LN_S@
 OBJDUMP = @OBJDUMP@
 PACKAGE = @PACKAGE@
@@ -157,11 +152,11 @@ libbeecrypt_la_LIBADD = aesopt.lo blowfishopt.lo mp32opt.lo sha1opt.lo
 
 libbeecrypt_la_LDFLAGS = -version-info $(LIBBEECRYPT_LT_CURRENT):$(LIBBEECRYPT_LT_REVISION):$(LIBBEECRYPT_LT_AGE)
 
-pkginclude_HEADERS = aes.h aesopt.h base64.h beecrypt.h beecrypt.api.h beecrypt.win.h blockmode.h blockpad.h blowfish.h blowfishopt.h dhaes.h dldp.h dlkp.h dlpk.h dlsvdp-dh.h dsa.h elgamal.h endianness.h entropy.h fips186.h hmac.h hmacmd5.h hmacsha1.h hmacsha256.h md5.h memchunk.h mp32.h mp32barrett.h mp32number.h mp32opt.h mp32prime.h mtprng.h rsa.h rsakp.h rsapk.h sha1.h sha1opt.h sha256.h timestamp.h
+pkginclude_HEADERS = aes.h base64.h beecrypt.h blockmode.h blockpad.h blowfish.h dhaes.h dldp.h dlkp.h dlpk.h dlsvdp-dh.h dsa.h elgamal.h endianness.h entropy.h fips186.h hmac.h hmacmd5.h hmacsha1.h hmacsha256.h md5.h memchunk.h mp32.h mp32barrett.h mp32number.h mp32prime.h mtprng.h rsa.h rsakp.h rsapk.h sha1.h sha256.h timestamp.h
 
-EXTRA_DIST = BENCHMARKS BUGS CONTRIBUTORS Doxyfile.in Doxyheader README README.DARWIN README.DLL README.WIN32 beecrypt.def beecrypt.rc beecrypt.spec types.h javaglue.h installgen.sh
+noinst_HEADERS = aesopt.h beecrypt.api.h beecrypt.win.h blowfishopt.h debug.h mp32opt.h sha1opt.h system.h
 
-noinst_HEADERS = debug.h system.h
+EXTRA_DIST = BENCHMARKS BUGS CONTRIBUTORS Doxyfile.in Doxyheader README README.DARWIN README.DLL README.WIN32 beecrypt.def beecrypt.rc beecrypt.spec types.h javaglue.h installgen.sh
 
 DOXYGEN = /usr/bin/doxygen
 subdir = .
@@ -205,10 +200,9 @@ RECURSIVE_TARGETS = info-recursive dvi-recursive install-info-recursive \
        uninstall-recursive check-recursive installcheck-recursive
 DIST_COMMON = README $(noinst_HEADERS) $(pkginclude_HEADERS) AUTHORS \
        COPYING COPYING.LIB ChangeLog Doxyfile.in INSTALL Makefile.am \
-       Makefile.in NEWS acconfig.h aclocal.m4 beecrypt.spec.in \
-       config.guess config.h.in config.sub configure configure.ac \
-       depcomp install-sh ltconfig ltmain.sh missing mkinstalldirs \
-       types.h.in
+       Makefile.in NEWS aclocal.m4 beecrypt.spec.in config.guess \
+       config.h.in config.sub configure configure.ac depcomp \
+       install-sh ltconfig ltmain.sh missing mkinstalldirs types.h.in
 DIST_SUBDIRS = $(SUBDIRS)
 SOURCES = $(libbeecrypt_la_SOURCES)
 
@@ -241,7 +235,7 @@ stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
        @rm -f stamp-h1
        cd $(top_builddir) && $(SHELL) ./config.status config.h
 
-$(srcdir)/config.h.in:  $(top_srcdir)/configure.ac $(ACLOCAL_M4) $(top_srcdir)/acconfig.h
+$(srcdir)/config.h.in:  $(top_srcdir)/configure.ac $(ACLOCAL_M4) 
        cd $(top_srcdir) && $(AUTOHEADER)
        touch $(srcdir)/config.h.in
 
diff --git a/beecrypt/acconfig.h b/beecrypt/acconfig.h
deleted file mode 100644 (file)
index 7847d55..0000000
+++ /dev/null
@@ -1,115 +0,0 @@
-/*
- * acconfig.h
- *
- * acconfig.h pre-announces symbols defines by configure.in
- *
- * Copyright (c) 2001 Virtual Unlimited B.V.
- *
- * Author: Bob Deblier <bob@virtualunlimited.com>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- *
- */
-
-#ifndef _REENTRANT
-#define _REENTRANT
-#endif
-
-#define AIX                    0
-#define BEOS           0
-#define CYGWIN         0
-#define DARWIN         0
-#define FREEBSD                0
-#define HPUX           0
-#define LINUX          0
-#define MACOSX         0
-#define NETBSD         0
-#define OPENBSD                0
-#define OSF                    0
-#define QNX                    0
-#define SCO_UNIX       0
-#define SOLARIS                0
-#ifndef WIN32
-# define WIN32         0
-#endif
-
-#define LEADING_UNDERSCORE     0
-#define NO_UNDERSCORES         0
-
-#define JAVAGLUE       0
-
-#undef HAVE_ERRNO_H
-#undef HAVE_STRING_H
-#undef HAVE_CTYPE_H
-#undef HAVE_STDLIB_H
-#undef HAVE_MTMALLOC_H
-
-#undef HAVE_UNISTD_H
-#undef HAVE_FCNTL_H
-
-#undef HAVE_TIME_H
-
-#undef HAVE_SYS_TYPES_H
-#undef HAVE_SYS_STAT_H
-#undef HAVE_SYS_TIME_H
-
-#undef ENABLE_THREADS
-#undef HAVE_THREAD_H
-#undef HAVE_PTHREAD_H
-#undef HAVE_SYNCH_H
-#undef HAVE_SEMAPHORE_H
-
-#undef ENABLE_AIO
-#undef HAVE_AIO_H
-
-#undef HAVE_TERMIO_H
-#undef HAVE_TERMIOS_H
-
-#undef HAVE_SYS_AUDIOIO_H
-#undef HAVE_SYS_IOCTL_H
-#undef HAVE_SYS_SOUNDCARD_H
-
-#undef HAVE_GETTIMEOFDAY
-#undef HAVE_GETHRTIME
-
-#undef HAVE_DEV_DSP
-#undef HAVE_DEV_AUDIO
-#undef HAVE_DEV_RANDOM
-#undef HAVE_DEV_URANDOM
-#undef HAVE_DEV_TTY
-
-#undef HAVE_LONG_LONG
-#undef HAVE_UNSIGNED_LONG_LONG
-
-#undef INT8_TYPE
-#undef INT16_TYPE
-#undef INT32_TYPE
-#undef INT64_TYPE
-
-#undef UINT8_TYPE
-#undef UINT16_TYPE
-#undef UINT32_TYPE
-#undef UINT64_TYPE
-
-#undef FLOAT4_TYPE
-#undef DOUBLE8_TYPE
-
-#if LINUX
-#define _LIBC_REENTRANT
-#endif
-
-#ifndef __cplusplus
-#undef inline
-#endif
index 2b2bd8c..87082f7 100644 (file)
@@ -25,6 +25,8 @@
  */
 
 #include "system.h"
+#include "beecrypt.h"
+#include "aesopt.h"
 #include "aes.h"
 #include "endianness.h"
 #include "mp32.h"
index 3961a26..99d6563 100644 (file)
@@ -27,9 +27,6 @@
 #ifndef _AES_H
 #define _AES_H
 
-#include "beecrypt.h"
-#include "aesopt.h"
-
 /** \ingroup BC_aes_m
  */
 typedef struct
index 6f9c1e5..cb411eb 100644 (file)
@@ -24,9 +24,6 @@
 #ifndef _AESOPT_H
 #define _AESOPT_H
 
-#include "beecrypt.h"
-#include "aes.h"
-
 #ifdef __cplusplus
 extern "C" {
 #endif
index 0cdf39e..dfbcafb 100644 (file)
@@ -28,7 +28,6 @@
 
 #include "system.h"
 #include "beecrypt.h"
-#include "debug.h"
 
 #if defined(__LCLINT__)
 /* XXX from /usr/include/bits/sigest.h in glibc-2.2.4 */
@@ -55,6 +54,8 @@ typedef struct
 #include "blowfish.h"
 #include "blockmode.h"
 
+#include "debug.h"
+
 /*@-type@*/ /* FIX: cast? */
 /*@observer@*/ /*@unchecked@*/
 static entropySource entropySourceList[] =
index ebca532..412cc5b 100644 (file)
@@ -51,8 +51,10 @@ typedef int (*entropyNext) (/*@out@*/ uint32* data, int size)
  */
 typedef struct
 {
-/*@observer@*/ const char* name;       /*!< entropy source name */
-/*@unused@*/ const entropyNext next;   /*!< return entropy function */
+/*@observer@*/
+    const char* name;          /*!< entropy source name */
+/*@unused@*/
+    const entropyNext next;    /*!< return entropy function */
 } entropySource;
 
 #ifdef __cplusplus
@@ -178,7 +180,8 @@ typedef int (*randomGeneratorCleanup) (randomGeneratorParam* param)
  */
 typedef struct
 {
-/*@observer@*/ const char* name;       /*!< random generator name */
+/*@observer@*/
+    const char* name;                  /*!< random generator name */
     const unsigned int paramsize;
     const randomGeneratorSetup setup;
     const randomGeneratorSeed seed;
@@ -237,8 +240,10 @@ const randomGenerator* randomGeneratorDefault(void)
  */
 typedef struct
 {
-/*@observer@*/ /*@dependent@*/ const randomGenerator* rng; /*!< global functions and parameters */
-/*@only@*/ randomGeneratorParam* param;        /*!< specific parameters */
+/*@observer@*/ /*@dependent@*/
+    const randomGenerator* rng;                /*!< global functions and parameters */
+/*@only@*/
+    randomGeneratorParam* param;       /*!< specific parameters */
 } randomGeneratorContext;
 
 #ifdef __cplusplus
@@ -321,7 +326,8 @@ typedef int (*hashFunctionDigest) (hashFunctionParam* param, /*@out@*/ uint32* d
  */
 typedef struct
 {
-/*@observer@*/ const char* name;       /*!< hash function name */
+/*@observer@*/
+    const char* name;                  /*!< hash function name */
     const unsigned int paramsize;      /*!< in bytes */
     const unsigned int blocksize;      /*!< in bytes */
     const unsigned int digestsize;     /*!< in bytes */
@@ -381,8 +387,10 @@ const hashFunction* hashFunctionDefault(void)
  */
 typedef struct
 {
-/*@observer@*/ /*@dependent@*/ const hashFunction* algo;/*!< global functions and parameters */
-/*@only@*/ hashFunctionParam* param;   /*!< specific parameters */
+/*@observer@*/ /*@dependent@*/
+    const hashFunction* algo;  /*!< global functions and parameters */
+/*@only@*/
+    hashFunctionParam* param;  /*!< specific parameters */
 } hashFunctionContext;
 
 #ifdef __cplusplus
@@ -510,7 +518,8 @@ typedef int (*keyedHashFunctionDigest) (keyedHashFunctionParam* param, /*@out@*/
  */
 typedef struct
 {
-/*@observer@*/ const char* name;       /*!< keyed hash function name */
+/*@observer@*/
+    const char* name;                  /*!< keyed hash function name */
     const unsigned int paramsize;      /*!< in bytes */
     const unsigned int blocksize;      /*!< in bytes */
     const unsigned int digestsize;     /*!< in bytes */
@@ -574,8 +583,10 @@ const keyedHashFunction* keyedHashFunctionDefault(void)
  */
 typedef struct
 {
-/*@observer@*/ /*@dependent@*/ const keyedHashFunction* algo;  /*!< global functions and parameters */
-/*@only@*/ keyedHashFunctionParam* param;      /*!< specific parameters */
+/*@observer@*/ /*@dependent@*/
+    const keyedHashFunction* algo;     /*!< global functions and parameters */
+/*@only@*/
+    keyedHashFunctionParam* param;     /*!< specific parameters */
 } keyedHashFunctionContext;
 
 #ifdef __cplusplus
@@ -755,7 +766,8 @@ typedef int (*blockCipherDecrypt) (blockCipherParam* param, uint32* dst, const u
  */
 typedef struct
 {
-/*@observer@*/ const char* name;       /*!< block cipher name */
+/*@observer@*/
+    const char* name;                  /*!< block cipher name */
     const unsigned int paramsize;      /*!< in bytes */
     const unsigned int blocksize;      /*!< in bytes */
     const unsigned int keybitsmin;     /*!< min keysize in bits */
@@ -765,7 +777,8 @@ typedef struct
     const blockCipherSetIV setiv;
     const blockCipherEncrypt encrypt;
     const blockCipherDecrypt decrypt;
-/*@dependent@*/ const blockMode* mode;
+/*@dependent@*/
+    const blockMode* mode;
 } blockCipher;
 
 #ifdef __cplusplus
@@ -819,8 +832,10 @@ const blockCipher* blockCipherDefault(void)
  */
 typedef struct
 {
-/*@observer@*/ /*@dependent@*/ const blockCipher* algo;        /*!< global functions and parameters */
-/*@only@*/ blockCipherParam* param;    /*!< specific parameters */
+/*@observer@*/ /*@dependent@*/
+    const blockCipher* algo;   /*!< global functions and parameters */
+/*@only@*/
+    blockCipherParam* param;   /*!< specific parameters */
 } blockCipherContext;
 
 #ifdef __cplusplus
index 1c0a679..f2e8796 100644 (file)
@@ -23,8 +23,8 @@
  *
  */
 
-#ifndef _CONFIG_WIN_H
-#define _CONFIG_WIN_H
+#ifndef _BEECRYPT_WIN_H
+#define _BEECRYPT_WIN_H
 
 #define _REENTRANT
 
index 61adec1..a01d532 100644 (file)
@@ -33,6 +33,8 @@
  */
 
 #include "system.h"
+#include "beecrypt.h"
+#include "blowfishopt.h"
 #include "blowfish.h"
 #include "endianness.h"
 #include "debug.h"
index 1ae2c5b..21f47e0 100644 (file)
@@ -28,9 +28,6 @@
 #ifndef _BLOWFISHOPT_H
 #define _BLOWFISHOPT_H
 
-#include "beecrypt.h"
-#include "blowfish.h"
-
 #ifdef __cplusplus
 extern "C" {
 #endif
diff --git a/beecrypt/config.h b/beecrypt/config.h
deleted file mode 100644 (file)
index 40d61dd..0000000
+++ /dev/null
@@ -1,278 +0,0 @@
-/* config.h.  Generated by configure.  */
-/* config.h.in.  Generated from configure.ac by autoheader.  */
-/*
- * acconfig.h
- *
- * acconfig.h pre-announces symbols defines by configure.in
- *
- * Copyright (c) 2001 Virtual Unlimited B.V.
- *
- * Author: Bob Deblier <bob@virtualunlimited.com>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- *
- */
-
-#ifndef _REENTRANT
-#define _REENTRANT
-#endif
-
-#define AIX                    0
-#define BEOS           0
-#define CYGWIN         0
-#define DARWIN         0
-#define FREEBSD                0
-#define HPUX           0
-#define LINUX 1
-#define MACOSX         0
-#define NETBSD         0
-#define OPENBSD                0
-#define OSF                    0
-#define QNX                    0
-#define SCO_UNIX       0
-#define SOLARIS                0
-#ifndef WIN32
-# define WIN32         0
-#endif
-
-#define LEADING_UNDERSCORE     0
-#define NO_UNDERSCORES 1
-
-#define JAVAGLUE 0
-
-#define HAVE_ERRNO_H 1
-#define HAVE_STRING_H 1
-#define HAVE_CTYPE_H 1
-#define HAVE_STDLIB_H 1
-/* #undef HAVE_MTMALLOC_H */
-
-#define HAVE_UNISTD_H 1
-#define HAVE_FCNTL_H 1
-
-#define HAVE_TIME_H 1
-
-#define HAVE_SYS_TYPES_H 1
-#define HAVE_SYS_STAT_H 1
-#define HAVE_SYS_TIME_H 1
-
-#define ENABLE_THREADS 1
-/* #undef HAVE_THREAD_H */
-#define HAVE_PTHREAD_H 1
-/* #undef HAVE_SYNCH_H */
-#define HAVE_SEMAPHORE_H 1
-
-#define ENABLE_AIO 1
-#define HAVE_AIO_H 1
-
-#define HAVE_TERMIO_H 1
-#define HAVE_TERMIOS_H 1
-
-/* #undef HAVE_SYS_AUDIOIO_H */
-#define HAVE_SYS_IOCTL_H 1
-#define HAVE_SYS_SOUNDCARD_H 1
-
-#define HAVE_GETTIMEOFDAY 1
-/* #undef HAVE_GETHRTIME */
-
-#define HAVE_DEV_DSP 1
-/* #undef HAVE_DEV_AUDIO */
-#define HAVE_DEV_RANDOM 1
-#define HAVE_DEV_URANDOM 1
-#define HAVE_DEV_TTY 1
-
-#define HAVE_LONG_LONG 1
-#define HAVE_UNSIGNED_LONG_LONG 1
-
-/* #undef INT8_TYPE */
-/* #undef INT16_TYPE */
-/* #undef INT32_TYPE */
-/* #undef INT64_TYPE */
-
-/* #undef UINT8_TYPE */
-/* #undef UINT16_TYPE */
-/* #undef UINT32_TYPE */
-/* #undef UINT64_TYPE */
-
-/* #undef FLOAT4_TYPE */
-/* #undef DOUBLE8_TYPE */
-
-#if LINUX
-#define _LIBC_REENTRANT
-#endif
-
-#ifndef __cplusplus
-/* #undef inline */
-#endif
-
-/* Define to 1 if you have the <aio.h> header file. */
-#define HAVE_AIO_H 1
-
-/* Define to 1 if you have the <ctype.h> header file. */
-#define HAVE_CTYPE_H 1
-
-/* Define to 1 if you have the <dlfcn.h> header file. */
-#define HAVE_DLFCN_H 1
-
-/* Define to 1 if you have the <errno.h> header file. */
-#define HAVE_ERRNO_H 1
-
-/* Define to 1 if you have the <fcntl.h> header file. */
-#define HAVE_FCNTL_H 1
-
-/* Define to 1 if you have the <inttypes.h> header file. */
-#define HAVE_INTTYPES_H 1
-
-/* Define to 1 if you have the `mtmalloc' library (-lmtmalloc). */
-/* #undef HAVE_LIBMTMALLOC */
-
-/* Define to 1 if you have the `pthread' library (-lpthread). */
-#define HAVE_LIBPTHREAD 1
-
-/* Define to 1 if you have the `thread' library (-lthread). */
-/* #undef HAVE_LIBTHREAD */
-
-/* Define to 1 if you have the <memory.h> header file. */
-#define HAVE_MEMORY_H 1
-
-/* Define to 1 if you have the <mtmalloc.h> header file. */
-/* #undef HAVE_MTMALLOC_H */
-
-/* Define to 1 if you have the <pthread.h> header file. */
-#define HAVE_PTHREAD_H 1
-
-/* Define to 1 if you have the <semaphore.h> header file. */
-#define HAVE_SEMAPHORE_H 1
-
-/* Define to 1 if you have the <stdint.h> header file. */
-#define HAVE_STDINT_H 1
-
-/* Define to 1 if you have the <stdlib.h> header file. */
-#define HAVE_STDLIB_H 1
-
-/* Define to 1 if you have the <strings.h> header file. */
-#define HAVE_STRINGS_H 1
-
-/* Define to 1 if you have the <string.h> header file. */
-#define HAVE_STRING_H 1
-
-/* Define to 1 if you have the <synch.h> header file. */
-/* #undef HAVE_SYNCH_H */
-
-/* Define to 1 if you have the <sys/audioio.h> header file. */
-/* #undef HAVE_SYS_AUDIOIO_H */
-
-/* Define to 1 if you have the <sys/ioctl.h> header file. */
-#define HAVE_SYS_IOCTL_H 1
-
-/* Define to 1 if you have the <sys/soundcard.h> header file. */
-#define HAVE_SYS_SOUNDCARD_H 1
-
-/* Define to 1 if you have the <sys/stat.h> header file. */
-#define HAVE_SYS_STAT_H 1
-
-/* Define to 1 if you have the <sys/time.h> header file. */
-#define HAVE_SYS_TIME_H 1
-
-/* Define to 1 if you have the <sys/types.h> header file. */
-#define HAVE_SYS_TYPES_H 1
-
-/* Define to 1 if you have the <termios.h> header file. */
-#define HAVE_TERMIOS_H 1
-
-/* Define to 1 if you have the <termio.h> header file. */
-#define HAVE_TERMIO_H 1
-
-/* Define to 1 if you have the <thread.h> header file. */
-/* #undef HAVE_THREAD_H */
-
-/* Define to 1 if you have the <time.h> header file. */
-#define HAVE_TIME_H 1
-
-/* Define to 1 if you have the <unistd.h> header file. */
-#define HAVE_UNISTD_H 1
-
-/* Name of package */
-#define PACKAGE "beecrypt"
-
-/* Define to the address where bug reports for this package should be sent. */
-#define PACKAGE_BUGREPORT ""
-
-/* Define to the full name of this package. */
-#define PACKAGE_NAME ""
-
-/* Define to the full name and version of this package. */
-#define PACKAGE_STRING ""
-
-/* Define to the one symbol short name of this package. */
-#define PACKAGE_TARNAME ""
-
-/* Define to the version of this package. */
-#define PACKAGE_VERSION ""
-
-/* The size of a `char', as computed by sizeof. */
-#define SIZEOF_CHAR 1
-
-/* The size of a `double', as computed by sizeof. */
-#define SIZEOF_DOUBLE 8
-
-/* The size of a `float', as computed by sizeof. */
-#define SIZEOF_FLOAT 4
-
-/* The size of a `int', as computed by sizeof. */
-#define SIZEOF_INT 4
-
-/* The size of a `long', as computed by sizeof. */
-#define SIZEOF_LONG 4
-
-/* The size of a `long long', as computed by sizeof. */
-#define SIZEOF_LONG_LONG 8
-
-/* The size of a `short', as computed by sizeof. */
-#define SIZEOF_SHORT 2
-
-/* The size of a `unsigned char', as computed by sizeof. */
-#define SIZEOF_UNSIGNED_CHAR 1
-
-/* The size of a `unsigned int', as computed by sizeof. */
-#define SIZEOF_UNSIGNED_INT 4
-
-/* The size of a `unsigned long', as computed by sizeof. */
-#define SIZEOF_UNSIGNED_LONG 4
-
-/* The size of a `unsigned long long', as computed by sizeof. */
-#define SIZEOF_UNSIGNED_LONG_LONG 8
-
-/* The size of a `unsigned short', as computed by sizeof. */
-#define SIZEOF_UNSIGNED_SHORT 2
-
-/* Define to 1 if you have the ANSI C header files. */
-#define STDC_HEADERS 1
-
-/* Version number of package */
-#define VERSION "2.2.0"
-
-/* Define to 1 if your processor stores words with the most significant byte
-   first (like Motorola and SPARC, unlike Intel and VAX). */
-/* #undef WORDS_BIGENDIAN */
-
-/* Define to empty if `const' does not conform to ANSI C. */
-/* #undef const */
-
-/* Define as `__inline' if that's what the C compiler calls it, or to nothing
-   if it is not supported. */
-/* #undef inline */
-
-/* Define to `unsigned' if <sys/types.h> does not define. */
-/* #undef size_t */
index b65328e..8ac982e 100644 (file)
 /* config.h.in.  Generated from configure.ac by autoheader.  */
-/*
- * acconfig.h
- *
- * acconfig.h pre-announces symbols defines by configure.in
- *
- * Copyright (c) 2001 Virtual Unlimited B.V.
- *
- * Author: Bob Deblier <bob@virtualunlimited.com>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- *
- */
+
 
 #ifndef _REENTRANT
 #define _REENTRANT
 #endif
 
-#define AIX                    0
-#define BEOS           0
-#define CYGWIN         0
-#define DARWIN         0
-#define FREEBSD                0
-#define HPUX           0
-#define LINUX          0
-#define MACOSX         0
-#define NETBSD         0
-#define OPENBSD                0
-#define OSF                    0
-#define QNX                    0
-#define SCO_UNIX       0
-#define SOLARIS                0
-#ifndef WIN32
-# define WIN32         0
-#endif
-
-#define LEADING_UNDERSCORE     0
-#define NO_UNDERSCORES         0
-
-#define JAVAGLUE       0
 
-#undef HAVE_ERRNO_H
-#undef HAVE_STRING_H
-#undef HAVE_CTYPE_H
-#undef HAVE_STDLIB_H
-#undef HAVE_MTMALLOC_H
+/* Define to 1 if you are using AIX */
+#undef AIX
 
-#undef HAVE_UNISTD_H
-#undef HAVE_FCNTL_H
+/* Define to 1 if you are using Cygwin */
+#undef CYGWIN
 
-#undef HAVE_TIME_H
+/* Define to 1 if you are using Darwin/MacOS X */
+#undef DARWIN
 
-#undef HAVE_SYS_TYPES_H
-#undef HAVE_SYS_STAT_H
-#undef HAVE_SYS_TIME_H
+/* Define to 1 if you want to enable asynchronous I/O support */
+#undef ENABLE_AIO
 
+/* Define to 1 if you want to enable multithread support */
 #undef ENABLE_THREADS
-#undef HAVE_THREAD_H
-#undef HAVE_PTHREAD_H
-#undef HAVE_SYNCH_H
-#undef HAVE_SEMAPHORE_H
-
-#undef ENABLE_AIO
-#undef HAVE_AIO_H
 
-#undef HAVE_TERMIO_H
-#undef HAVE_TERMIOS_H
+/* Define to 1 if you are using FreeBSD */
+#undef FREEBSD
 
-#undef HAVE_SYS_AUDIOIO_H
-#undef HAVE_SYS_IOCTL_H
-#undef HAVE_SYS_SOUNDCARD_H
+/* Define to 1 if you have the <aio.h> header file. */
+#undef HAVE_AIO_H
 
-#undef HAVE_GETTIMEOFDAY
-#undef HAVE_GETHRTIME
+/* Define to 1 if you have the <ctype.h> header file. */
+#undef HAVE_CTYPE_H
 
-#undef HAVE_DEV_DSP
+/* Define to 1 if your system has device /dev/audio */
 #undef HAVE_DEV_AUDIO
-#undef HAVE_DEV_RANDOM
-#undef HAVE_DEV_URANDOM
-#undef HAVE_DEV_TTY
-
-#undef HAVE_LONG_LONG
-#undef HAVE_UNSIGNED_LONG_LONG
 
-#undef INT8_TYPE
-#undef INT16_TYPE
-#undef INT32_TYPE
-#undef INT64_TYPE
-
-#undef UINT8_TYPE
-#undef UINT16_TYPE
-#undef UINT32_TYPE
-#undef UINT64_TYPE
-
-#undef FLOAT4_TYPE
-#undef DOUBLE8_TYPE
-
-#if LINUX
-#define _LIBC_REENTRANT
-#endif
+/* Define to 1 if your system has device /dev/dsp */
+#undef HAVE_DEV_DSP
 
-#ifndef __cplusplus
-#undef inline
-#endif
+/* Define to 1 if your system has device /dev/random */
+#undef HAVE_DEV_RANDOM
 
-/* Define to 1 if you have the <aio.h> header file. */
-#undef HAVE_AIO_H
+/* Define to 1 if your system has device /dev/tty */
+#undef HAVE_DEV_TTY
 
-/* Define to 1 if you have the <ctype.h> header file. */
-#undef HAVE_CTYPE_H
+/* Define to 1 if your system has device /dev/urandom */
+#undef HAVE_DEV_URANDOM
 
 /* Define to 1 if you have the <dlfcn.h> header file. */
 #undef HAVE_DLFCN_H
 /* Define to 1 if you have the <fcntl.h> header file. */
 #undef HAVE_FCNTL_H
 
+/* Define to 1 if you have the `gethrtime' function. */
+#undef HAVE_GETHRTIME
+
+/* Define to 1 if you have the `gettimeofday' function. */
+#undef HAVE_GETTIMEOFDAY
+
 /* Define to 1 if you have the <inttypes.h> header file. */
 #undef HAVE_INTTYPES_H
 
 /* Define to 1 if you have the `thread' library (-lthread). */
 #undef HAVE_LIBTHREAD
 
+/* Define to 1 if your compiler knows the 'long long' type */
+#undef HAVE_LONG_LONG
+
+/* Define to 1 if your system has a working `malloc' function. */
+#undef HAVE_MALLOC
+
+/* Define to 1 if you have the <malloc.h> header file. */
+#undef HAVE_MALLOC_H
+
+/* Define to 1 if you have the `memcmp' function. */
+#undef HAVE_MEMCMP
+
+/* Define to 1 if you have the `memmove' function. */
+#undef HAVE_MEMMOVE
+
 /* Define to 1 if you have the <memory.h> header file. */
 #undef HAVE_MEMORY_H
 
+/* Define to 1 if you have the `memset' function. */
+#undef HAVE_MEMSET
+
 /* Define to 1 if you have the <mtmalloc.h> header file. */
 #undef HAVE_MTMALLOC_H
 
 /* Define to 1 if you have the <semaphore.h> header file. */
 #undef HAVE_SEMAPHORE_H
 
+/* Define to 1 if `stat' has the bug that it succeeds when given the
+   zero-length file name argument. */
+#undef HAVE_STAT_EMPTY_STRING_BUG
+
 /* Define to 1 if you have the <stdint.h> header file. */
 #undef HAVE_STDINT_H
 
 /* Define to 1 if you have the <stdlib.h> header file. */
 #undef HAVE_STDLIB_H
 
+/* Define to 1 if you have the `strcspn' function. */
+#undef HAVE_STRCSPN
+
+/* Define to 1 if you have the `strerror' function. */
+#undef HAVE_STRERROR
+
 /* Define to 1 if you have the <strings.h> header file. */
 #undef HAVE_STRINGS_H
 
-/* Define to 1 if you have the <string.h> header file. */
+/* . */
 #undef HAVE_STRING_H
 
+/* Define to 1 if you have the `strspn' function. */
+#undef HAVE_STRSPN
+
 /* Define to 1 if you have the <synch.h> header file. */
 #undef HAVE_SYNCH_H
 
 /* Define to 1 if you have the <sys/soundcard.h> header file. */
 #undef HAVE_SYS_SOUNDCARD_H
 
-/* Define to 1 if you have the <sys/stat.h> header file. */
+/* . */
 #undef HAVE_SYS_STAT_H
 
 /* Define to 1 if you have the <sys/time.h> header file. */
 #undef HAVE_SYS_TIME_H
 
-/* Define to 1 if you have the <sys/types.h> header file. */
+/* . */
 #undef HAVE_SYS_TYPES_H
 
 /* Define to 1 if you have the <termios.h> header file. */
 /* Define to 1 if you have the <time.h> header file. */
 #undef HAVE_TIME_H
 
-/* Define to 1 if you have the <unistd.h> header file. */
+/* . */
 #undef HAVE_UNISTD_H
 
+/* Define to 1 if your compiler knows the 'unsigned long long' type */
+#undef HAVE_UNSIGNED_LONG_LONG
+
+/* Define to 1 if you are using HPUX */
+#undef HPUX
+
+/* Define to 1 if you want to include the Java code */
+#undef JAVAGLUE
+
+/* Define to 1 if your system compiles object names with leading underscores
+   */
+#undef LEADING_UNDERSCORE
+
+/* Define to 1 if you are using GNU/Linux */
+#undef LINUX
+
+/* Define to 1 if `lstat' dereferences a symlink specified with a trailing
+   slash. */
+#undef LSTAT_FOLLOWS_SLASHED_SYMLINK
+
+/* Define to 1 if you are using NetBSD */
+#undef NETBSD
+
+/* Define to 1 if you are using OpenBSD */
+#undef OPENBSD
+
+/* Define to 1 if you are using OSF */
+#undef OSF
+
 /* Name of package */
 #undef PACKAGE
 
 /* Define to the version of this package. */
 #undef PACKAGE_VERSION
 
+/* Define to 1 if you are using QNX */
+#undef QNX
+
+/* Define to 1 if you are using SCO Unix */
+#undef SCO_UNIX
+
 /* The size of a `char', as computed by sizeof. */
 #undef SIZEOF_CHAR
 
 /* The size of a `unsigned short', as computed by sizeof. */
 #undef SIZEOF_UNSIGNED_SHORT
 
+/* Define to 1 if you are using Solaris */
+#undef SOLARIS
+
 /* Define to 1 if you have the ANSI C header files. */
 #undef STDC_HEADERS
 
+/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
+#undef TIME_WITH_SYS_TIME
+
 /* Version number of package */
 #undef VERSION
 
+
+#ifndef WIN32
+#undef WIN32
+#endif
+
 /* Define to 1 if your processor stores words with the most significant byte
    first (like Motorola and SPARC, unlike Intel and VAX). */
 #undef WORDS_BIGENDIAN
    if it is not supported. */
 #undef inline
 
-/* Define to `unsigned' if <sys/types.h> does not define. */
-#undef size_t
+
+#if LINUX
+#define _LIBC_REENTRANT
+#endif
+
index f71ab13..5413871 100644 (file)
@@ -1,90 +1,13 @@
-dnl Process this file with autoconf to produce a configure script
+# Process this file with autoconf to produce a configure script.
 
-dnl Initialization
-AC_INIT(beecrypt.c)
-AC_CANONICAL_SYSTEM
-AC_CONFIG_HEADERS
-AM_INIT_AUTOMAKE(beecrypt, 2.2.0)
-AM_CONFIG_HEADER(config.h)
-
-dnl Automake
-AM_DISABLE_STATIC
+AC_INIT(beecrypt, 2.2.0, bob.deblier@pandora.be)
+AC_CANONICAL_TARGET
+AM_INIT_AUTOMAKE
+AC_CONFIG_SRCDIR([beecrypt.h])
+AM_CONFIG_HEADER([config.h])
 AC_LIBTOOL_WIN32_DLL
 
-dnl Check system type
-case $target_os in
-  cygwin*)
-    AC_DEFINE(CYGWIN)
-    AC_DEFINE(WIN32)
-    ;;
-  darwin*)
-    AC_DEFINE(DARWIN)
-    ;;
-  freebsd*)
-    AC_DEFINE(FREEBSD)
-    ;;
-  linux*)
-    AC_DEFINE(LINUX)
-    ;;
-  netbsd*)
-    AC_DEFINE(NETBSD)
-    ;;
-  openbsd*)
-    AC_DEFINE(OPENBSD)
-    ;;
-  osf*)
-    AC_DEFINE(OSF)
-    ;;
-  *qnx)
-    AC_DEFINE(QNX)
-    ;;
-  solaris*)
-    AC_DEFINE(SOLARIS)
-    ;;
-  sysv*uv*)
-    AC_DEFINE(SCO_UNIX)
-    ;;
-  *)
-    AC_MSG_WARN([Operating system type $target_os currently not supported and/or tested])
-    ;;
-esac
-case $target_os in
-  cygwin* | darwin*)
-    AC_DEFINE(LEADING_UNDERSCORE)
-    ;;
-  *)
-    AC_DEFINE(NO_UNDERSCORES)
-    ;;
-esac
-
-dnl Checks for programs.
-AC_PROG_CC
-AC_PROG_CPP
-AC_PROG_LN_S
-AM_PROG_LIBTOOL
-AC_SUBST(LIBTOOL_DEPS)
-
-AC_C_INLINE
-
-if test "$ac_cv_prog_gcc" != yes; then
-  AC_CACHE_CHECK([whether we are using Sun Workshop C], ac_cv_prog_SUNPRO_CC, [
-    AC_EGREP_CPP(yes, [
-      #ifdef __SUNPRO_C
-        yes;
-      #endif
-      ], ac_cv_prog_SUNPRO_CC=yes, ac_cv_prog_SUNPRO_CC=no)
-    ])
-  if test "$ac_cv_prog_SUNPRO_CC" != yes; then
-    AC_CACHE_CHECK([whether we are using Compaq's C compiler], ac_cv_prog_DECC, [
-      AC_EGREP_CPP(yes, [
-        #ifdef __DECC
-          yes;
-        #endif
-        ], ac_cv_prog_DECC=yes, ac_cv_prog_DECC=no)
-      ])
-  fi
-fi
-
+# Checks for package options
 AC_ARG_ENABLE(debug, [  --enable-debug          creates debugging code [default=no]],
   [ if test "$enableval" = no; then
       ac_enable_debug=no
@@ -93,7 +16,6 @@ AC_ARG_ENABLE(debug, [  --enable-debug          creates debugging code [default=
     fi
   ], [ ac_enable_debug=no])
 
-dnl Check if we need to disable optimizations
 AC_ARG_ENABLE(optimized, [  --enable-optimized      enables the assembler optimizations [default depends on --enable-debug value]],
   [ if test "$enableval" = no; then
       ac_enable_optimized=no
@@ -108,111 +30,7 @@ AC_ARG_ENABLE(optimized, [  --enable-optimized      enables the assembler optimi
     fi
   ])
 
-dnl Check if we have the necessary java components installed
-AC_ARG_WITH(javaglue, [  --with-javaglue         creates the java glue code [default=yes]],
-  [ if test "$withval" = no; then
-      ac_with_javaglue=no
-    else
-      ac_with_javaglue=yes
-    fi
-  ], [ ac_with_javaglue=yes ])
-
-if test "$ac_with_javaglue" = yes ; then
-  AC_CHECK_PROG(ac_cv_have_gcj, gcj, yes, no)
-  if test "$ac_cv_have_gcj" = yes; then
-    AC_CACHE_CHECK([for java native interface headers], ac_cv_java_include, [
-      cat > conftest.java << EOF
-public class conftest
-{
-  public static void main(String[[]] argv)
-  {
-     System.out.println(System.getProperty("java.home"));
-  }
-}
-EOF
-      java_home="`gcj --main=conftest -o conftest conftest.java; ./conftest`"
-      if test -d "$ac_cv_java_include" ; then
-        ac_cv_java_headers=yes
-      else
-       case $target_os in
-       linux*)
-         gcjpath="/usr/lib/gcc-lib/`gcj -dumpmachine`/`gcj -dumpversion`"
-         if test -f $gcjpath/include/jni.h; then
-           ac_cv_java_include="$gcjpath/include"
-         fi
-          ;;
-        *)
-          ac_cv_java_include="$java_home"/../include
-          ;;
-        esac
-        if test "X$ac_cv_java_include" != X -a -d "$ac_cv_java_include" ; then
-          ac_cv_java_headers=yes
-        else
-          AC_MSG_WARN([java headers not found, disabling javaglue])
-          ac_cv_java_headers=no
-          ac_with_javaglue=no
-        fi
-      fi
-      rm -fr conftest*
-    ])
-  else
-    AC_CHECK_PROG(ac_cv_have_java, java, yes, no)
-    if test "$ac_cv_have_java" = yes; then
-      AC_CHECK_PROG(ac_cv_have_javac, javac, yes, no)
-      if test "$ac_cv_have_javac" = yes; then
-        AC_CACHE_CHECK([for java native interface headers], ac_cv_java_include, [
-          cat > conftest.java << EOF
-public class conftest
-{
-  public static void main(String[[]] argv)
-  {
-     System.out.println(System.getProperty("java.home"));
-  }
-}
-EOF
-          java_home=`javac conftest.java; java -classpath . conftest`
-          case $target_os in
-          cygwin*)
-            java_home=`cygpath -u -p "$java_home"`
-            ;;
-          esac
-          if test -d "$ac_cv_java_include" ; then
-            ac_cv_java_headers=yes
-          else
-            case $target_os in
-            darwin*)
-              ac_cv_java_include="$java_home"/../../../Headers
-              ;;
-            *)
-              ac_cv_java_include="$java_home"/../include
-            esac
-            if test -d "$ac_cv_java_include" ; then
-              ac_cv_java_headers=yes
-            else
-              AC_MSG_WARN([java headers not found, disabling javaglue])
-              ac_cv_java_headers=no
-              ac_with_javaglue=no
-            fi
-          fi
-          rm -fr conftest*
-        ])
-      else
-        AC_MSG_WARN([javac not found, disabling javaglue])
-        ac_cv_java_headers=no
-        ac_with_javaglue=no
-      fi
-    fi
-  fi
-fi
-
-if test "$ac_with_javaglue" = yes ; then
-  AC_DEFINE(JAVAGLUE,1)
-else
-  AC_DEFINE(JAVAGLUE,0)
-fi
-
-dnl Check if we want to enable threads
-AC_ARG_ENABLE(threads, [  --enable-threads        enables multithread safety [default=yes]],
+AC_ARG_ENABLE(threads, [  --enable-threads        enables multithread support [de fault=yes]],
   [ if test "$enableval" = no; then
       ac_enable_threads=no
     else
@@ -220,7 +38,12 @@ AC_ARG_ENABLE(threads, [  --enable-threads        enables multithread safety [de
     fi
   ], [ ac_enable_threads=yes ])
 
-dnl Check if we want to enable aio
+AH_TEMPLATE([ENABLE_THREADS],[Define to 1 if you want to enable multithread support])
+
+if test "$ac_enable_threads" = yes; then
+  AC_DEFINE([ENABLE_THREADS],1)
+fi
+
 AC_ARG_ENABLE(aio, [  --enable-aio            enables asynchronous i/o for entropy gathering [default=yes]],
   [ if test "$enableval" = no; then
       ac_enable_aio=no
@@ -229,8 +52,14 @@ AC_ARG_ENABLE(aio, [  --enable-aio            enables asynchronous i/o for entro
     fi
   ], [ ac_enable_aio=yes ])
 
-dnl Check if we want to use mtmalloc
+AH_TEMPLATE([ENABLE_AIO],[Define to 1 if you want to enable asynchronous I/O support])
+
+if test "$ac_enable_aio" = yes; then
+  AC_DEFINE([ENABLE_AIO],1)
+fi
+
 AC_ARG_WITH(mtmalloc, [  --with-mtmalloc         links against the mtmalloc library [default=no]],
+
   [ if test "$withval" = no; then
       ac_with_mtmalloc=no
     else
@@ -238,63 +67,216 @@ AC_ARG_WITH(mtmalloc, [  --with-mtmalloc         links against the mtmalloc libr
     fi
   ], [ ac_with_mtmalloc=no ])
 
-dnl Product and version
-AC_SUBST(CC)
-AC_SUBST(CPP)
-AC_SUBST(LD)
-
-dnl Checks for typedefs, structures, and compiler characteristics.
-AC_C_CONST
-AC_TYPE_SIZE_T
+AC_ARG_WITH(javaglue, [  --with-javaglue         creates the java glue code [default=yes]],
+  [ if test "$withval" = no; then
+      ac_with_javaglue=no
+    else
+      ac_with_javaglue=yes
+    fi
+  ], [ ac_with_javaglue=yes ])
 
-dnl Checks for library functions.
-AC_FUNC_MEMCMP
+# Checks for programs.
+AC_PROG_CC
+AC_PROG_INSTALL
+AC_PROG_CPP
+AC_PROG_CXX
+AC_PROG_LIBTOOL
 
-dnl Checks for header files.
-AC_CHECK_HEADERS(errno.h string.h ctype.h stdlib.h)
-AC_CHECK_HEADERS(unistd.h fcntl.h)
-AC_CHECK_HEADERS(sys/types.h sys/stat.h)
-AC_CHECK_HEADERS(termio.h termios.h)
-AC_CHECK_HEADERS(sys/audioio.h sys/ioctl.h sys/soundcard.h)
+# Initialize tool flags
+CFLAGS=""
+CPPFLAGS=""
+LDFLAGS=""
 
-AC_CHECK_HEADERS(time.h sys/time.h)
-if test "$ac_cv_header_sys_time_h" = yes; then
-  AC_CHECK_FUNC(gettimeofday, [
-    AC_DEFINE(HAVE_GETTIMEOFDAY, 1)
-    ])
-  AC_CHECK_FUNC(gethrtime, [
-    AC_DEFINE(HAVE_GETHRTIME, 1)
+# Checks for compiler characteristics and flags
+if test "$ac_cv_prog_gcc" != yes; then
+  AC_CACHE_CHECK([whether we are using Sun Workshop C], ac_cv_prog_SUNPRO_CC, [
+    AC_EGREP_CPP(yes, [
+      #ifdef __SUNPRO_C
+        yes;
+      #endif
+      ], ac_cv_prog_SUNPRO_CC=yes, ac_cv_prog_SUNPRO_CC=no)
     ])
+  if test "$ac_cv_prog_SUNPRO_CC" != yes; then
+    AC_CACHE_CHECK([whether we are using Compaq's C compiler], ac_cv_prog_DECC, [
+      AC_EGREP_CPP(yes, [
+        #ifdef __DECC
+          yes;
+        #endif
+        ], ac_cv_prog_DECC=yes, ac_cv_prog_DECC=no)
+      ])
+  fi
 fi
 
+# Predefines for autoheader
+AH_TOP([
+#ifndef _REENTRANT
+#define _REENTRANT
+#endif
+])
+
+AH_TEMPLATE([AIX],[Define to 1 if you are using AIX])
+AH_TEMPLATE([CYGWIN],[Define to 1 if you are using Cygwin])
+AH_TEMPLATE([DARWIN],[Define to 1 if you are using Darwin/MacOS X])
+AH_TEMPLATE([FREEBSD],[Define to 1 if you are using FreeBSD])
+AH_TEMPLATE([HPUX],[Define to 1 if you are using HPUX])
+AH_TEMPLATE([LINUX],[Define to 1 if you are using GNU/Linux])
+AH_TEMPLATE([NETBSD],[Define to 1 if you are using NetBSD])
+AH_TEMPLATE([OPENBSD],[Define to 1 if you are using OpenBSD])
+AH_TEMPLATE([OSF],[Define to 1 if you are using OSF])
+AH_TEMPLATE([QNX],[Define to 1 if you are using QNX])
+AH_TEMPLATE([SCO_UNIX],[Define to 1 if you are using SCO Unix])
+AH_TEMPLATE([SOLARIS],[Define to 1 if you are using Solaris])
+AH_VERBATIM([WIN32],[
+#ifndef WIN32
+#undef WIN32
+#endif])
+
 case $target_os in
   cygwin*)
+    AC_DEFINE([CYGWIN])
+    AC_DEFINE([WIN32])
+    ;;
+  darwin*)
+    AC_DEFINE([DARWIN])
+    ;;
+  freebsd*)
+    AC_DEFINE([FREEBSD])
+    ;;
+  linux*)
+    AC_DEFINE([LINUX])
+    ;;
+  netbsd*)
+    AC_DEFINE([NETBSD])
+    ;;
+  openbsd*)
+    AC_DEFINE([OPENBSD])
+    ;;
+  osf*)
+    AC_DEFINE([OSF])
+    ;;
+  *qnx)
+    AC_DEFINE([QNX])
+    ;;
+  solaris*)
+    AC_DEFINE([SOLARIS])
+    ;;
+  sysv*uv*)
+    AC_DEFINE([SCO_UNIX])
     ;;
   *)
-    if test "$ac_enable_threads" = yes; then
-      AC_DEFINE(ENABLE_THREADS, 1)
-      AC_CHECK_HEADERS(thread.h pthread.h synch.h semaphore.h)
-      if test "$ac_cv_header_thread_h" = yes; then
-        AC_HAVE_LIBRARY(thread)
-      elif test  "$ac_cv_header_pthread_h" = yes; then
-        AC_HAVE_LIBRARY(pthread)
-      else
-        AC_MSG_WARN([Can't find any thread libraries])
-        AC_DEFINE(ENABLE_THREADS, 0)
+    AC_MSG_WARN([Operating system type $target_os currently not supported and/or tested])
+    ;;
+esac
+
+AH_TEMPLATE([HAVE_CTYPE_H],[.])
+AH_TEMPLATE([HAVE_ERRNO_H],[.])
+AH_TEMPLATE([HAVE_FCNTL_H],[.])
+AH_TEMPLATE([HAVE_MALLOC_H],[.])
+AH_TEMPLATE([HAVE_STDLIB_H],[.])
+AH_TEMPLATE([HAVE_STRING_H],[.])
+AH_TEMPLATE([HAVE_TERMIO_H],[.])
+AH_TEMPLATE([HAVE_TERMIOS_H],[.])
+AH_TEMPLATE([HAVE_TIME_H],[.])
+AH_TEMPLATE([HAVE_UNISTD_H],[.])
+
+AH_TEMPLATE([HAVE_SYS_AUDIOIO_H],[.])
+AH_TEMPLATE([HAVE_SYS_IOCTL_H],[.])
+AH_TEMPLATE([HAVE_SYS_SOUNDCARD_H],[.])
+AH_TEMPLATE([HAVE_SYS_STAT_H],[.])
+AH_TEMPLATE([HAVE_SYS_TIME_H],[.])
+AH_TEMPLATE([HAVE_SYS_TYPES_H],[.])
+
+AH_TEMPLATE([HAVE_THREAD_H],[.])
+AH_TEMPLATE([HAVE_PTHREAD_H],[.])
+AH_TEMPLATE([HAVE_SYNCH_H],[.])
+AH_TEMPLATE([HAVE_SEMAPHORE_H],[.])
+
+AH_TEMPLATE([HAVE_AIO_H],[.])
+AH_TEMPLATE([HAVE_MTMALLOC_H],[.])
+
+AH_TEMPLATE([HAVE_DEV_AUDIO],[Define to 1 if your system has device /dev/audio])
+AH_TEMPLATE([HAVE_DEV_DSP],[Define to 1 if your system has device /dev/dsp])
+AH_TEMPLATE([HAVE_DEV_RANDOM],[Define to 1 if your system has device /dev/random])
+AH_TEMPLATE([HAVE_DEV_URANDOM],[Define to 1 if your system has device /dev/urandom])
+AH_TEMPLATE([HAVE_DEV_TTY],[Define to 1 if your system has device /dev/tty])
+
+AH_TEMPLATE([HAVE_LONG_LONG],[Define to 1 if your compiler knows the 'long long' type])
+AH_TEMPLATE([HAVE_UNSIGNED_LONG_LONG],[Define to 1 if your compiler knows the 'unsigned long long' type])
+
+dnl AH_TEMPLATE([INT8_TYPE],[Define to 8-bit signed integer type])
+dnl AH_TEMPLATE([INT16_TYPE],[Define to 16-bit signed integer type])
+dnl AH_TEMPLATE([INT32_TYPE],[Define to 32-bit signed integer type])
+dnl AH_TEMPLATE([INT64_TYPE],[Define to 64-bit signed integer type])
+
+dnl AH_TEMPLATE([UINT8_TYPE],[Define to 8-bit unsigned integer type])
+dnl AH_TEMPLATE([UINT16_TYPE],[Define to 16-bit unsigned integer type])
+dnl AH_TEMPLATE([UINT32_TYPE],[Define to 32-bit unsigned integer type])
+dnl AH_TEMPLATE([UINT64_TYPE],[Define to 64-bit unsigned integer type])
+
+dnl AH_TEMPLATE([FLOAT4_TYPE],[Define to 32-bit floating point type])
+dnl AH_TEMPLATE([DOUBLE8_TYPE],[Define to 64-bit floating point type])
+
+AH_BOTTOM([
+#if LINUX
+#define _LIBC_REENTRANT
+#endif
+])
+
+# Checks for header files.
+AC_CHECK_HEADERS([time.h sys/time.h])
+AC_HEADER_TIME
+AC_CHECK_HEADERS([ctype.h errno.h fcntl.h malloc.h termio.h termios.h])
+AC_CHECK_HEADERS([sys/ioctl.h sys/audioio.h sys/soundcard.h])
+
+if test "$ac_enable_threads" = yes; then
+  case $target_os in
+    freebsd*)
+      CFLAGS="$CFLAGS -pthread"
+      CPPFLAGS="$CPPFLAGS -pthread"
+      LDFLAGS="$LDFLAGS -pthread"
+      ;;
+    osf*)
+      if test "$ac_cv_prog_DECC" = yes; then
+        CFLAGS="$CFLAGS -pthread"
+        CPPFLAGS="$CPPFLAGS -pthread"
       fi
-    fi
+      ;;
+    solaris*)
+      if test "$ac_cv_prog_SUNPRO_CC" = yes; then
+        CFLAGS="$CFLAGS -mt"
+      fi
+      ;;
+  esac
+  AC_CHECK_HEADERS([thread.h pthread.h synch.h semaphore.h])
+fi
+
+if test "$ac_enable_aio" = yes; then
+  AC_CHECK_HEADERS(aio.h)
+fi
+
+if test "$ac_with_mtmalloc" = yes; then
+  AC_CHECK_HEADERS(mtmalloc.h)
+fi
+
+# Checks for libraries.
+if test "$ac_enable_threads" = yes; then
+  if test "$ac_cv_header_thread_h" = yes; then
+    AC_HAVE_LIBRARY([thread])
+  elif test "$ac_cv_header_pthread_h" = yes; then
+    AC_HAVE_LIBRARY([pthread])
+  fi
+fi
 
-    if test "$ac_enable_aio" = yes; then
-      AC_CHECK_HEADERS(aio.h)
-      if test "$ac_cv_header_aio_h" = yes; then
-        AC_SEARCH_LIBS(aio_read, [c rt aio posix4], [ ], [
-          AC_MSG_ERROR([no library containing aio routines found])
-       ])
-        AC_CACHE_CHECK([whether aio works], ac_cv_have_working_aio, [
-          cat > conftest.aio << EOF
+if test "$ac_enable_aio" = yes; then
+  if test "$ac_cv_header_aio_h" = yes; then
+    AC_SEARCH_LIBS(aio_read, [c rt aio posix4], [ ], [
+      AC_MSG_ERROR([no library containing aio routines found])
+    ])
+    AC_CACHE_CHECK([whether aio works], ac_cv_have_working_aio, [
+      cat > conftest.aio << EOF
 The quick brown fox jumps over the lazy dog.
 EOF
-          AC_TRY_RUN([
+      AC_TRY_RUN([
 #if HAVE_ERRNO_H
 # include <errno.h>
 #endif
@@ -358,31 +340,306 @@ main()
   if (aio_error(&a) < 0)
     exit(1);
 
-  if (aio_return(&a) < 0)
-    exit(1);
+  if (aio_return(&a) < 0)
+    exit(1);
+
+  exit(0);
+}
+        ], ac_cv_have_working_aio=yes, ac_cv_have_working_aio=no)
+      ])
+    if test "$ac_cv_have_working_aio" = yes; then
+      AC_DEFINE([ENABLE_AIO], 1)
+    fi
+    rm -fr conftest*
+  fi
+fi
+
+if test "$ac_with_mtmalloc" = yes; then
+  if test "$ac_cv_have_mtmalloc_h" = yes; then
+    AC_HAVE_LIBRARY([mtmalloc])
+  fi
+fi
+
+# Checks for typedefs, structures, and compiler characteristics.
+AC_C_BIGENDIAN
+AC_C_CONST
+AC_C_INLINE
+
+AC_CHECK_SIZEOF(char)
+AC_CHECK_SIZEOF(unsigned char)
+if test "$ac_cv_sizeof_char" -eq 1; then
+  AC_SUBST(int8_type, "char")
+else
+  AC_MSG_ERROR([compiler has no 1 byte char])
+fi
+if test "$ac_cv_sizeof_unsigned_char" -eq 1; then
+  AC_SUBST(uint8_type, "unsigned char")
+else
+  AC_MSG_ERROR([compiler has no 1 byte unsigned char])
+fi
+
+AC_CHECK_SIZEOF(short)
+AC_CHECK_SIZEOF(unsigned short)
+if test "$ac_cv_sizeof_short" -eq 2; then
+  AC_SUBST(int16_type, "short")
+else
+  AC_MSG_ERROR([compiler has no 2 byte short])
+fi
+if test "$ac_cv_sizeof_unsigned_short" -eq 2; then
+  AC_SUBST(uint16_type, "unsigned short")
+else
+  AC_MSG_ERROR([compiler has no 2 byte unsigned short])
+fi
+
+AC_CHECK_SIZEOF(int)
+AC_CHECK_SIZEOF(unsigned int)
+AC_CHECK_SIZEOF(long)
+AC_CHECK_SIZEOF(unsigned long)
+if test "$ac_cv_sizeof_int" -eq 4; then
+  AC_SUBST(int32_type, "int")
+elif test "$ac_cv_sizeof_long" -eq 4; then
+  AC_SUBST(int32_type, "long")
+else
+  AC_MSG_ERROR([compiler has no 4 byte integer])
+fi
+if test "$ac_cv_sizeof_unsigned_int" -eq 4; then
+  AC_SUBST(uint32_type, "unsigned int")
+elif test "$ac_cv_sizeof_unsigned_long" -eq 4; then
+  AC_SUBST(uint32_type, "unsigned long")
+else
+  AC_MSG_ERROR([compiler has no 4 byte unsigned integer])
+fi
+
+if test "$ac_cv_sizeof_long" -eq 8; then
+  AC_SUBST(int64_type, "long")
+else
+  AC_CHECK_SIZEOF(long long)
+  if test "$ac_cv_sizeof_long_long" -eq 8; then
+    AC_DEFINE(HAVE_LONG_LONG)
+    AC_SUBST(int64_type, "long long")
+  else
+    AC_MSG_ERROR([compiler has no 8 byte integer])
+  fi
+fi
+if test "$ac_cv_sizeof_unsigned_long" -eq 8; then
+  AC_SUBST(uint64_type, "unsigned long")
+else
+  AC_CHECK_SIZEOF(unsigned long long)
+  if test "$ac_cv_sizeof_unsigned_long_long" -eq 8; then
+    AC_DEFINE(HAVE_UNSIGNED_LONG_LONG)
+    AC_SUBST(uint64_type, "unsigned long long")
+  else
+    AC_MSG_ERROR([compiler has no 8 byte unsigned integer])
+  fi
+fi
+
+AC_CHECK_SIZEOF(float)
+if test "$ac_cv_sizeof_float" -eq 4; then
+  AC_SUBST(float4_type, "float")
+else
+  AC_MSG_ERROR([compiler has no 4 byte float])
+fi
+
+AC_CHECK_SIZEOF(double)
+if test "$ac_cv_sizeof_double" -eq 8; then
+  AC_SUBST(double8_type, "double")
+else
+  AC_MSG_ERROR([compiler has no 8 byte double])
+fi
+
+# Checks for library functions.
+AC_FUNC_MALLOC
+AC_FUNC_MEMCMP
+AC_FUNC_STAT
+AC_CHECK_FUNCS([memset memcmp memmove strcspn strerror strspn])
+
+AH_TEMPLATE([HAVE_GETHRTIME],[.])
+AH_TEMPLATE([HAVE_GETTIMEOFDAY],[.])
+if test "$ac_cv_header_sys_time_h" = yes; then
+  AC_CHECK_FUNCS([gethrtime gettimeofday])
+fi
+
+# Checks for symbol names (used in the assembler symbol names)
+AH_TEMPLATE([LEADING_UNDERSCORE],[Define to 1 if your system compiles object names with leading underscores])
+
+case $target_os in
+  cygwin* | darwin*)
+    AC_DEFINE([LEADING_UNDERSCORE])
+    ;;
+esac
+
+# Predefines and checks for Java API support
+AH_TEMPLATE([JAVAGLUE],[Define to 1 if you want to include the Java code])
+
+if test "$ac_with_javaglue" = yes ; then
+  AC_CHECK_PROG(ac_cv_have_gcj, gcj, yes, no)
+  if test "$ac_cv_have_gcj" = yes; then
+    AC_CACHE_CHECK([for java native interface headers], ac_cv_java_include, [
+      cat > conftest.java << EOF
+public class conftest
+{
+  public static void main(String[[]] argv)
+  {
+     System.out.println(System.getProperty("java.home"));
+  }
+}
+EOF
+      java_home="`gcj --main=conftest -o conftest conftest.java; ./conftest`"
+      if test -d "$ac_cv_java_include" ; then
+        ac_cv_java_headers=yes
+      else
+       case $target_os in
+       linux*)
+         gcjpath="/usr/lib/gcc-lib/`gcj -dumpmachine`/`gcj -dumpversion`"
+         if test -f $gcjpath/include/jni.h; then
+           ac_cv_java_include="$gcjpath/include"
+         fi
+          ;;
+        *)
+          ac_cv_java_include="$java_home"/../include
+          ;;
+        esac
+        if test "X$ac_cv_java_include" != X -a -d "$ac_cv_java_include" ; then
+          ac_cv_java_headers=yes
+        else
+          AC_MSG_WARN([java headers not found, disabling javaglue])
+          ac_cv_java_headers=no
+          ac_with_javaglue=no
+        fi
+      fi
+      rm -fr conftest*
+    ])
+  else
+    AC_CHECK_PROG(ac_cv_have_java, java, yes, no)
+    if test "$ac_cv_have_java" = yes; then
+      AC_CHECK_PROG(ac_cv_have_javac, javac, yes, no)
+      if test "$ac_cv_have_javac" = yes; then
+        AC_CACHE_CHECK([for java native interface headers], ac_cv_java_include, [
+          cat > conftest.java << EOF
+public class conftest
+{
+  public static void main(String[[]] argv)
+  {
+     System.out.println(System.getProperty("java.home"));
+  }
+}
+EOF
+          java_home=`javac conftest.java; java -classpath . conftest`
+          case $target_os in
+          cygwin*)
+            java_home=`cygpath -u -p "$java_home"`
+            ;;
+          esac
+          if test -d "$ac_cv_java_include" ; then
+            ac_cv_java_headers=yes
+          else
+            case $target_os in
+            darwin*)
+              ac_cv_java_include="$java_home"/../../../Headers
+              ;;
+            *)
+              ac_cv_java_include="$java_home"/../include
+            esac
+            if test -d "$ac_cv_java_include" ; then
+              ac_cv_java_headers=yes
+            else
+              AC_MSG_WARN([java headers not found, disabling javaglue])
+              ac_cv_java_headers=no
+              ac_with_javaglue=no
+            fi
+          fi
+          rm -fr conftest*
+        ])
+      else
+        AC_MSG_WARN([javac not found, disabling javaglue])
+        ac_cv_java_headers=no
+        ac_with_javaglue=no
+      fi
+    fi
+  fi
+fi
+
+if test "$ac_with_javaglue" = yes ; then
+  AC_DEFINE([JAVAGLUE], 1)
+fi
 
-  exit(0);
-}
-            ], ac_cv_have_working_aio=yes, ac_cv_have_working_aio=no)
-          ])
-        if test "$ac_cv_have_working_aio" = yes; then
-          AC_DEFINE(ENABLE_AIO, 1)
-        fi
-        rm -fr conftest*
+# Checks for entropy sources.
+AC_CHECKING(for specific entropy devices)
+case $target_os in
+  cygwin*)
+    AC_MSG_CHECKING([for wavein])
+    AC_MSG_RESULT(yes)
+    AC_MSG_CHECKING([for wincrypt])
+    AC_MSG_RESULT(yes)
+    AC_MSG_CHECKING([for console])
+    AC_MSG_RESULT(yes)
+    ;;
+  linux*)
+    AC_CACHE_CHECK([for /dev/dsp], ac_cv_have_dev_dsp, [
+      if test -r /dev/dsp; then
+        ac_cv_have_dev_dsp=yes
+      else
+        ac_cv_have_dev_dsp=no
       fi
+      ])
+    if test "$ac_cv_have_dev_dsp" = yes; then
+      AC_DEFINE([HAVE_DEV_DSP], 1)
     fi
-
-    if test "$ac_with_mtmalloc" = yes; then
-      AC_CHECK_HEADERS(mtmalloc.h)
-      AC_HAVE_LIBRARY(mtmalloc)
+    ;;
+  solaris*)
+    AC_CACHE_CHECK([for /dev/audio], ac_cv_have_dev_audio, [
+      if test -r /dev/audio; then
+        ac_cv_have_dev_audio=yes
+      else
+        ac_cv_have_dev_audio=no
+      fi
+      ])
+    if test "$ac_cv_have_dev_audio" = yes; then
+      AC_DEFINE([HAVE_DEV_AUDIO], 1)
     fi
     ;;
+  *)
+    AC_MSG_WARN(no specific entropy devices present)
+    ;;
 esac
 
-dnl Checks for compiler flags
-CFLAGS=""
-CPPFLAGS=""
-LDFLAGS=""
+case $target_os in
+  cygwin*)
+    ;;
+  *)
+    AC_CHECKING(for generic entropy devices)
+    AC_CACHE_CHECK([for /dev/random], ac_cv_have_dev_random, [
+      if test -r /dev/random; then
+        ac_cv_have_dev_random=yes
+      else
+        ac_cv_have_dev_random=no
+      fi
+      ])
+    if test "$ac_cv_have_dev_random" = yes; then
+      AC_DEFINE([HAVE_DEV_RANDOM], 1)
+    fi
+    AC_CACHE_CHECK([for /dev/urandom], ac_cv_have_dev_urandom, [
+      if test -r /dev/urandom; then
+        ac_cv_have_dev_urandom=yes
+      else
+        ac_cv_have_dev_urandom=no
+      fi
+      ])
+    if test "$ac_cv_have_dev_urandom" = yes; then
+      AC_DEFINE([HAVE_DEV_URANDOM], 1)
+    fi
+    AC_CACHE_CHECK([for /dev/tty], ac_cv_have_dev_tty, [
+      if test -r /dev/tty; then
+        ac_cv_have_dev_tty=yes
+      else
+        ac_cv_have_dev_tty=no
+      fi
+      ])
+    if test "$ac_cv_have_dev_tty" = yes; then
+      AC_DEFINE([HAVE_DEV_TTY], 1)
+    fi
+    ;;
+esac
 
 if test "$ac_enable_optimized" = yes; then
   case $target_cpu in
@@ -460,16 +717,16 @@ else
         CFLAGS="$CFLAGS -fomit-frame-pointer"
         ;;
       i386)
-        CFLAGS="$CFLAGS -mcpu=i386 -march=i386 -fomit-frame-pointer"
+        CFLAGS="$CFLAGS -march=i386 -mcpu=i686 -fomit-frame-pointer"
         ;;
       i486)
-        CFLAGS="$CFLAGS -mcpu=i386 -march=i486 -fomit-frame-pointer"
+        CFLAGS="$CFLAGS -march=i386 -mcpu=i686 -fomit-frame-pointer"
         ;;
       i586)
-        CFLAGS="$CFLAGS -mcpu=i386 -march=i586 -fomit-frame-pointer"
+        CFLAGS="$CFLAGS -march=i386 -mcpu=i686 -fomit-frame-pointer"
         ;;
       i686)
-       CFLAGS="$CFLAGS -mcpu=i386  -march=i686 -fomit-frame-pointer"
+       CFLAGS="$CFLAGS -march=i386  -mcpu=i686 -fomit-frame-pointer"
         ;;
       sparc)
         CFLAGS="$CFLAGS -m32 -mtune=ultrasparc"
@@ -535,15 +792,6 @@ else
   fi
 fi
 
-case $target_os in
-  freebsd*)
-    if test "$ac_enable_threads" = yes; then
-      CFLAGS="$CFLAGS -pthread"
-      LDFLAGS="$LDFLAGS -pthread"
-    fi
-    ;;
-esac
-
 if test "$ac_with_javaglue" = yes ; then
   if test "$ac_cv_have_gcj" = no; then
     CFLAGS="$CFLAGS -I$ac_cv_java_include"
@@ -571,171 +819,7 @@ if test "$ac_with_javaglue" = yes ; then
   esac
 fi
 
-dnl Checks for endianness
-AC_C_BIGENDIAN
-
-dnl Checks for word sizes
-AC_CHECK_SIZEOF(char)
-AC_CHECK_SIZEOF(unsigned char)
-if test "$ac_cv_sizeof_char" -eq 1; then
-  AC_SUBST(int8_type, "char")
-else
-  AC_MSG_ERROR([compiler has no 1 byte char])
-fi
-if test "$ac_cv_sizeof_unsigned_char" -eq 1; then
-  AC_SUBST(uint8_type, "unsigned char")
-else
-  AC_MSG_ERROR([compiler has no 1 byte unsigned char])
-fi
-
-AC_CHECK_SIZEOF(short)
-AC_CHECK_SIZEOF(unsigned short)
-if test "$ac_cv_sizeof_short" -eq 2; then
-  AC_SUBST(int16_type, "short")
-else
-  AC_MSG_ERROR([compiler has no 2 byte short])
-fi
-if test "$ac_cv_sizeof_unsigned_short" -eq 2; then
-  AC_SUBST(uint16_type, "unsigned short")
-else
-  AC_MSG_ERROR([compiler has no 2 byte unsigned short])
-fi
-
-AC_CHECK_SIZEOF(int)
-AC_CHECK_SIZEOF(unsigned int)
-AC_CHECK_SIZEOF(long)
-AC_CHECK_SIZEOF(unsigned long)
-if test "$ac_cv_sizeof_int" -eq 4; then
-  AC_SUBST(int32_type, "int")
-elif test "$ac_cv_sizeof_long" -eq 4; then
-  AC_SUBST(int32_type, "long")
-else
-  AC_MSG_ERROR([compiler has no 4 byte integer])
-fi
-if test "$ac_cv_sizeof_unsigned_int" -eq 4; then
-  AC_SUBST(uint32_type, "unsigned int")
-elif test "$ac_cv_sizeof_unsigned_long" -eq 4; then
-  AC_SUBST(uint32_type, "unsigned long")
-else
-  AC_MSG_ERROR([compiler has no 4 byte unsigned integer])
-fi
-
-if test "$ac_cv_sizeof_long" -eq 8; then
-  AC_SUBST(int64_type, "long")
-else
-  AC_CHECK_SIZEOF(long long)
-  if test "$ac_cv_sizeof_long_long" -eq 8; then
-    AC_DEFINE(HAVE_LONG_LONG)
-    AC_SUBST(int64_type, "long long")
-  else
-    AC_MSG_ERROR([compiler has no 8 byte integer])
-  fi
-fi
-if test "$ac_cv_sizeof_unsigned_long" -eq 8; then
-  AC_SUBST(uint64_type, "unsigned long")
-else
-  AC_CHECK_SIZEOF(unsigned long long)
-  if test "$ac_cv_sizeof_unsigned_long_long" -eq 8; then
-    AC_DEFINE(HAVE_UNSIGNED_LONG_LONG)
-    AC_SUBST(uint64_type, "unsigned long long")
-  else
-    AC_MSG_ERROR([compiler has no 8 byte unsigned integer])
-  fi
-fi
-
-AC_CHECK_SIZEOF(float)
-if test "$ac_cv_sizeof_float" -eq 4; then
-  AC_SUBST(float4_type, "float")
-else
-  AC_MSG_ERROR([compiler has no 4 byte float])
-fi
-
-AC_CHECK_SIZEOF(double)
-if test "$ac_cv_sizeof_double" -eq 8; then
-  AC_SUBST(double8_type, "double")
-else
-  AC_MSG_ERROR([compiler has no 8 byte double])
-fi
-
-dnl Checks for devices
-AC_CHECKING(for specific entropy devices)
-case $target_os in
-  cygwin*)
-    AC_MSG_CHECKING([for wavein])
-    AC_MSG_RESULT(yes)
-    AC_MSG_CHECKING([for wincrypt])
-    AC_MSG_RESULT(yes)
-    AC_MSG_CHECKING([for console])
-    AC_MSG_RESULT(yes)
-    ;;
-  linux*)
-    AC_CACHE_CHECK([for /dev/dsp], ac_cv_have_dev_dsp, [
-      if test -r /dev/dsp; then
-        ac_cv_have_dev_dsp=yes
-      else
-        ac_cv_have_dev_dsp=no
-      fi
-      ])
-    if test "$ac_cv_have_dev_dsp" = yes; then
-      AC_DEFINE(HAVE_DEV_DSP, 1)
-    fi
-    ;;
-  solaris*)
-    AC_CACHE_CHECK([for /dev/audio], ac_cv_have_dev_audio, [
-      if test -r /dev/audio; then
-        ac_cv_have_dev_audio=yes
-      else
-        ac_cv_have_dev_audio=no
-      fi
-      ])
-    if test "$ac_cv_have_dev_audio" = yes; then
-      AC_DEFINE(HAVE_DEV_AUDIO, 1)
-    fi
-    ;;
-  *)
-    AC_MSG_WARN(no specific entropy devices present)
-    ;;
-esac
-
-case $target_os in
-  cygwin*)
-    ;;
-  *)
-    AC_CHECKING(for generic entropy devices)
-    AC_CACHE_CHECK([for /dev/random], ac_cv_have_dev_random, [
-      if test -r /dev/random; then
-        ac_cv_have_dev_random=yes
-      else
-        ac_cv_have_dev_random=no
-      fi
-      ])
-    if test "$ac_cv_have_dev_random" = yes; then
-      AC_DEFINE(HAVE_DEV_RANDOM, 1)
-    fi
-    AC_CACHE_CHECK([for /dev/urandom], ac_cv_have_dev_urandom, [
-      if test -r /dev/urandom; then
-        ac_cv_have_dev_urandom=yes
-      else
-        ac_cv_have_dev_urandom=no
-      fi
-      ])
-    if test "$ac_cv_have_dev_urandom" = yes; then
-      AC_DEFINE(HAVE_DEV_URANDOM, 1)
-    fi
-    AC_CACHE_CHECK([for /dev/tty], ac_cv_have_dev_tty, [
-      if test -r /dev/tty; then
-        ac_cv_have_dev_tty=yes
-      else
-        ac_cv_have_dev_tty=no
-      fi
-      ])
-    if test "$ac_cv_have_dev_tty" = yes; then
-      AC_DEFINE(HAVE_DEV_TTY, 1)
-    fi
-    ;;
-esac
-
-dnl Generate the assembler optimizations
+# Generate the assembler optimizations, or empty stub files.
 rm -f $srcdir/aesopt.c $srcdir/aesopt.S
 rm -f $srcdir/blowfishopt.c $srcdir/blowfishopt.S
 rm -f $srcdir/mp32opt.c $srcdir/mp32opt.S
@@ -811,12 +895,14 @@ if test ! -r $srcdir/sha1opt.S; then
 EOF
 fi
 
-dnl Output
-AC_OUTPUT([ Doxyfile Makefile beecrypt.spec types.h
-       docs/Makefile gas/Makefile masm/Makefile mwerks/Makefile
-       tests/Makefile ],
-  [     
-        echo timestamp > stamp-h.in
-  ]
-
-)
+# Generate output files.
+AC_CONFIG_FILES([Makefile
+                 Doxyfile
+                 beecrypt.spec
+                 types.h
+                 docs/Makefile
+                 gas/Makefile
+                 masm/Makefile
+                 mwerks/Makefile
+                 tests/Makefile])
+AC_OUTPUT
index 1f383b0..1bd15f9 100644 (file)
@@ -80,12 +80,8 @@ POST_INSTALL = :
 NORMAL_UNINSTALL = :
 PRE_UNINSTALL = :
 POST_UNINSTALL = :
-build_alias = @build_alias@
-build_triplet = @build@
 host_alias = @host_alias@
 host_triplet = @host@
-target_alias = @target_alias@
-target_triplet = @target@
 
 EXEEXT = @EXEEXT@
 OBJEXT = @OBJEXT@
@@ -95,13 +91,12 @@ AS = @AS@
 AWK = @AWK@
 CC = @CC@
 CPP = @CPP@
+CXX = @CXX@
 DEPDIR = @DEPDIR@
 DLLTOOL = @DLLTOOL@
 ECHO = @ECHO@
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-LD = @LD@
 LIBTOOL = @LIBTOOL@
-LIBTOOL_DEPS = @LIBTOOL_DEPS@
 LN_S = @LN_S@
 OBJDUMP = @OBJDUMP@
 PACKAGE = @PACKAGE@
index 9acf6c5..6052dec 100644 (file)
  */
 
 #include "system.h"
+#include "beecrypt.h"
 #include "fips186.h"
-#include "mp32.h"
 #include "mp32opt.h"
+#include "mp32.h"
 #include "debug.h"
 
 /**
index 18a0b3a..45d4e7a 100644 (file)
@@ -45,7 +45,6 @@
 # endif
 #endif
 
-#include "beecrypt.h"
 #include "sha1.h"
 
 #define FIPS186_STATE_SIZE     16
index b3bffc6..96ed193 100644 (file)
@@ -80,12 +80,8 @@ POST_INSTALL = :
 NORMAL_UNINSTALL = :
 PRE_UNINSTALL = :
 POST_UNINSTALL = :
-build_alias = @build_alias@
-build_triplet = @build@
 host_alias = @host_alias@
 host_triplet = @host@
-target_alias = @target_alias@
-target_triplet = @target@
 
 EXEEXT = @EXEEXT@
 OBJEXT = @OBJEXT@
@@ -95,13 +91,12 @@ AS = @AS@
 AWK = @AWK@
 CC = @CC@
 CPP = @CPP@
+CXX = @CXX@
 DEPDIR = @DEPDIR@
 DLLTOOL = @DLLTOOL@
 ECHO = @ECHO@
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-LD = @LD@
 LIBTOOL = @LIBTOOL@
-LIBTOOL_DEPS = @LIBTOOL_DEPS@
 LN_S = @LN_S@
 OBJDUMP = @OBJDUMP@
 PACKAGE = @PACKAGE@
index d7523d3..2c2f743 100644 (file)
@@ -67,13 +67,13 @@ int hmacSetup(hmacParam* hp, const hashFunction* hash, hashFunctionParam* param,
                if (rc)
                        return -1;
 
+               memset(keydigest, 0, sizeof(keydigest));
                if (hash->digest(param, keydigest))
                        return -1;
 
                keywords = hash->digestsize >> 2;
                keybytes = hash->digestsize;
 
-               memset(keydigest, 0, sizeof(keydigest));
                (void) encodeInts(keydigest, hp->kxi, keybytes);
                (void) encodeInts(keydigest, hp->kxo, keybytes);
        }
index b3dbd97..e0be9f7 100644 (file)
@@ -80,12 +80,8 @@ POST_INSTALL = :
 NORMAL_UNINSTALL = :
 PRE_UNINSTALL = :
 POST_UNINSTALL = :
-build_alias = @build_alias@
-build_triplet = @build@
 host_alias = @host_alias@
 host_triplet = @host@
-target_alias = @target_alias@
-target_triplet = @target@
 
 EXEEXT = @EXEEXT@
 OBJEXT = @OBJEXT@
@@ -95,13 +91,12 @@ AS = @AS@
 AWK = @AWK@
 CC = @CC@
 CPP = @CPP@
+CXX = @CXX@
 DEPDIR = @DEPDIR@
 DLLTOOL = @DLLTOOL@
 ECHO = @ECHO@
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-LD = @LD@
 LIBTOOL = @LIBTOOL@
-LIBTOOL_DEPS = @LIBTOOL_DEPS@
 LN_S = @LN_S@
 OBJDUMP = @OBJDUMP@
 PACKAGE = @PACKAGE@
index 5681dfd..6a084fb 100644 (file)
@@ -26,6 +26,8 @@
  */
 
 #include "system.h"
+#include "beecrypt.h"
+#include "mp32opt.h"
 #include "mp32.h"
 #include "debug.h"
 
index eea4246..67d5897 100644 (file)
@@ -28,8 +28,6 @@
 #ifndef _MP32OPT_H
 #define _MP32OPT_H
 
-#include "beecrypt.h"
-
 #ifdef __cplusplus
 extern "C" {
 #endif
index b46c14a..1d305ee 100644 (file)
  */
 
 #include "system.h"
+#include "beecrypt.h"
 #include "mtprng.h"
-#include "mp32.h"
 #include "mp32opt.h"
+#include "mp32.h"
 #include "debug.h"
 
 #define hiBit(a)               ((a) & 0x80000000)
index e785035..5eeb79c 100644 (file)
@@ -80,12 +80,8 @@ POST_INSTALL = :
 NORMAL_UNINSTALL = :
 PRE_UNINSTALL = :
 POST_UNINSTALL = :
-build_alias = @build_alias@
-build_triplet = @build@
 host_alias = @host_alias@
 host_triplet = @host@
-target_alias = @target_alias@
-target_triplet = @target@
 
 EXEEXT = @EXEEXT@
 OBJEXT = @OBJEXT@
@@ -95,13 +91,12 @@ AS = @AS@
 AWK = @AWK@
 CC = @CC@
 CPP = @CPP@
+CXX = @CXX@
 DEPDIR = @DEPDIR@
 DLLTOOL = @DLLTOOL@
 ECHO = @ECHO@
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-LD = @LD@
 LIBTOOL = @LIBTOOL@
-LIBTOOL_DEPS = @LIBTOOL_DEPS@
 LN_S = @LN_S@
 OBJDUMP = @OBJDUMP@
 PACKAGE = @PACKAGE@
index 2aff034..8150b46 100644 (file)
@@ -29,6 +29,8 @@
  */
  
 #include "system.h"
+#include "beecrypt.h"
+#include "sha1opt.h"
 #include "sha1.h"
 #include "mp32.h"
 #include "endianness.h"
index 0d554fc..1f04a46 100644 (file)
@@ -29,7 +29,6 @@
 #define _SHA1_H
 
 #include "beecrypt.h"
-#include "sha1opt.h"
 
 /** \ingroup HASH_sha1_m
  */
index 96a9954..2b2e607 100644 (file)
@@ -28,9 +28,6 @@
 #ifndef _SHA1OPT_H
 #define _SHA1OPT_H
 
-#include "beecrypt.h"
-#include "sha1.h"
-
 #ifdef __cplusplus
 extern "C" {
 #endif
index 17485bc..000ed45 100644 (file)
@@ -80,12 +80,8 @@ POST_INSTALL = :
 NORMAL_UNINSTALL = :
 PRE_UNINSTALL = :
 POST_UNINSTALL = :
-build_alias = @build_alias@
-build_triplet = @build@
 host_alias = @host_alias@
 host_triplet = @host@
-target_alias = @target_alias@
-target_triplet = @target@
 
 EXEEXT = @EXEEXT@
 OBJEXT = @OBJEXT@
@@ -95,13 +91,12 @@ AS = @AS@
 AWK = @AWK@
 CC = @CC@
 CPP = @CPP@
+CXX = @CXX@
 DEPDIR = @DEPDIR@
 DLLTOOL = @DLLTOOL@
 ECHO = @ECHO@
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-LD = @LD@
 LIBTOOL = @LIBTOOL@
-LIBTOOL_DEPS = @LIBTOOL_DEPS@
 LN_S = @LN_S@
 OBJDUMP = @OBJDUMP@
 PACKAGE = @PACKAGE@
index ad4172b..7050513 100644 (file)
 
 #include "debug.h"
 
-/*@unused@*/ /*@observer@*/
+/*@unchecked@*/ /*@observer@*/
 static const char* dsa_p = "8df2a494492276aa3d25759bb06869cbeac0d83afb8d0cf7cbb8324f0d7882e5d0762fc5b7210eafc2e9adac32ab7aac49693dfbf83724c2ec0736ee31c80291";
-/*@unused@*/ /*@observer@*/
+/*@unchecked@*/ /*@observer@*/
 static const char* dsa_q = "c773218c737ec8ee993b4f2ded30f48edace915f";
-/*@unused@*/ /*@observer@*/
+/*@unchecked@*/ /*@observer@*/
 static const char* dsa_g = "626d027839ea0a13413163a55b4cb500299d5522956cefcb3bff10f399ce2c2e71cb9de5fa24babf58e5b79521925c9cc42e9f6f464b088cc572af53e6d78802";
-/*@unused@*/ /*@observer@*/
+/*@unchecked@*/ /*@observer@*/
 static const char* dsa_x = "2070b3223dba372fde1c0ffc7b2e3b498b260614";
-/*@unused@*/ /*@observer@*/
+/*@unchecked@*/ /*@observer@*/
 static const char* dsa_y = "19131871d75b1612a819f29d78d1b0d7346f7aa77bb62a859bfd6c5675da9d212d3a36ef1672ef660b8c7c255cc0ec74858fba33f44c06699630a76b030ee333";
-/*@unused@*/ /*@observer@*/
+/*@unchecked@*/ /*@observer@*/
 static const char* elg_n = "8df2a494492276aa3d25759bb06869cbeac0d83afb8d0cf7cbb8324f0d7882e5d0762fc5b7210eafc2e9adac32ab7aac49693dfbf83724c2ec0736ee31c80290";
 
-/*@unused@*/ static int testVectorInvMod(const dlkp_p* keypair)
+/*@unused@*/
+static int testVectorInvMod(const dlkp_p* keypair)
        /*@*/
 {
        randomGeneratorContext rngc;
@@ -91,7 +92,8 @@ static const char* elg_n = "8df2a494492276aa3d25759bb06869cbeac0d83afb8d0cf7cbb8
        return -1;
 }
 
-/*@unused@*/ static int testVectorExpMod(const dlkp_p* keypair)
+/*@unused@*/
+static int testVectorExpMod(const dlkp_p* keypair)
        /*@*/
 {
        int rc;
@@ -108,7 +110,8 @@ static const char* elg_n = "8df2a494492276aa3d25759bb06869cbeac0d83afb8d0cf7cbb8
        return rc;
 }
 
-/*@unused@*/ static int testVectorDSA(const dlkp_p* keypair)
+/*@unused@*/
+static int testVectorDSA(const dlkp_p* keypair)
        /*@*/
 {
        int rc = 0;
@@ -148,7 +151,8 @@ static const char* elg_n = "8df2a494492276aa3d25759bb06869cbeac0d83afb8d0cf7cbb8
        return rc;
 }
 
-/*@unused@*/ static int testVectorElGamalV1(const dlkp_p* keypair)
+/*@unused@*/
+static int testVectorElGamalV1(const dlkp_p* keypair)
        /*@*/
 {
        int rc = 0;
@@ -188,7 +192,8 @@ static const char* elg_n = "8df2a494492276aa3d25759bb06869cbeac0d83afb8d0cf7cbb8
        return rc;
 }
 
-/*@unused@*/ static int testVectorElGamalV3(const dlkp_p* keypair)
+/*@unused@*/
+static int testVectorElGamalV3(const dlkp_p* keypair)
        /*@*/
 {
        int rc = 0;
@@ -286,7 +291,8 @@ static int testVectorDHAES(const dlkp_p* keypair)
 }
 #endif
 
-/*@unused@*/ static int testVectorRSA(void)
+/*@unused@*/
+static int testVectorRSA(void)
        /*@globals fileSystem @*/
        /*@modifies fileSystem @*/
 {
@@ -333,7 +339,8 @@ static int testVectorDHAES(const dlkp_p* keypair)
        return -1;
 }
 
-/*@unused@*/ static int testVectorDLDP(void)
+/*@unused@*/
+static int testVectorDLDP(void)
        /*@*/
 {
        /* try generating dldp_p parameters, then see if the order of the generator is okay */
@@ -370,7 +377,8 @@ static int testVectorDHAES(const dlkp_p* keypair)
        return 0;
 }
 
-/*@unused@*/ static int testVectorMD5(void)
+/*@unused@*/
+static int testVectorMD5(void)
        /*@*/
 {
        uint32 expect[4] = { 0x90015098, 0x3cd24fb0, 0xd6963f7d, 0x28e17f72 };
@@ -386,7 +394,8 @@ static int testVectorDHAES(const dlkp_p* keypair)
        return mp32eq(4, expect, digest);
 }
 
-/*@unused@*/ static int testVectorSHA1(void)
+/*@unused@*/
+static int testVectorSHA1(void)
        /*@*/
 {
        uint32 expect[5] = { 0xA9993E36, 0x4706816A, 0xBA3E2571, 0x7850C26C, 0x9CD0D89D };
@@ -420,6 +429,7 @@ static int testVectorDHAES(const dlkp_p* keypair)
        return mp32eq(8, expect, digest);
 }
 
+/*@unchecked@*/
 static uint32 keyValue[] = 
 {
        0x00010203,