dnl Process this file with autoconf to produce a configure script.
-dnl $Id: configure.in,v 1.7 2005/04/03 16:22:09 mrsam Exp $
+dnl $Id: configure.in,v 1.8 2008/12/18 12:08:25 mrsam Exp $
dnl
dnl Copyright 2001-2004 Double Precision, Inc.
dnl See COPYING for distribution information.
AC_DEFINE_UNQUOTED(SHA1_WORD, $UINT32, [ 32 bit data type ])
+AC_ARG_WITH(int64,
+[ --with-int64='type' use 'type' for an unsigned 64 bit integer type
+ ( default is 'unsigned')],
+ int64="$withval", [
+
+ AC_MSG_CHECKING(for uint64_t)
+
+ AC_TRY_COMPILE([
+#if HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+ ],[
+ uint64_t i=0;
+ ], [ AC_MSG_RESULT(yes) ; int64="uint64_t"], [
+
+ AC_MSG_RESULT(no)
+ AC_MSG_CHECKING(for u_int_64_t)
+
+ AC_TRY_COMPILE([
+#if HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+ ],[
+ u_int64_t i=0;
+ ], [AC_MSG_RESULT(yes); int64="u_int64_t"],[
+
+ AC_MSG_RESULT(no)
+
+ AC_CHECK_SIZEOF(unsigned, 0)
+ if test "$ac_cv_sizeof_unsigned" != 8
+ then
+ AC_CHECK_SIZEOF(unsigned long, 0)
+ if test "$ac_cv_sizeof_unsigned_long" != 8
+ then
+ AC_CHECK_SIZEOF(unsigned long long, 0)
+ if test "$ac_cv_sizeof_unsigned_long_long" != 8
+ then
+ AC_CHECK_SIZEOF(unsigned short, 0)
+ if test "$ac_cv_sizeof_unsigned_short" != 8
+ then
+ AC_ERROR(--with-int64 option is required)
+ fi
+ int64="unsigned short"
+ else
+ int64="unsigned long long"
+ fi
+ else
+ int64="unsigned long"
+ fi
+ else
+ int64="unsigned"
+ fi
+ ])
+ ])
+ ]
+)
+UINT64="$int64"
+
+AC_DEFINE_UNQUOTED(SHA512_WORD, $UINT64, [ 64 bit data type ])
dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST