1 dnl Process this file with autoconf to produce a configure script.
2 dnl $Id: configure.in,v 1.8 2008/12/18 12:08:25 mrsam Exp $
4 dnl Copyright 2001-2004 Double Precision, Inc.
5 dnl See COPYING for distribution information.
8 AC_INIT(libsha1, 1.21, courier-users@lists.sourceforge.net)
10 >confdefs.h # Kill PACKAGE_ macros
12 AC_CONFIG_SRCDIR([hmac.c])
13 AM_CONFIG_HEADER([config.h])
14 AM_INIT_AUTOMAKE([foreign no-define])
16 AM_CONDITIONAL(HMACC, test -d ${srcdir}/../libhmac)
18 dnl Checks for programs.
26 CFLAGS="-Wall $CFLAGS"
28 CFLAGS="$CFLAGS -I$srcdir/.. -I.."
30 dnl Checks for libraries.
32 dnl Checks for header files.
34 AC_CHECK_HEADERS(sys/types.h)
37 [ --with-int32='type' use 'type' for an unsigned 32 bit integer type
38 ( default is 'unsigned')],
41 AC_MSG_CHECKING(for uint32_t)
45 #include <sys/types.h>
49 ], [ AC_MSG_RESULT(yes) ; int32="uint32_t"], [
52 AC_MSG_CHECKING(for u_int_32_t)
56 #include <sys/types.h>
60 ], [AC_MSG_RESULT(yes); int32="u_int32_t"],[
64 AC_CHECK_SIZEOF(unsigned, 0)
65 if test "$ac_cv_sizeof_unsigned" != 4
67 AC_CHECK_SIZEOF(unsigned long, 0)
68 if test "$ac_cv_sizeof_unsigned_long" != 4
70 AC_CHECK_SIZEOF(unsigned short, 0)
71 if test "$ac_cv_sizeof_unsigned_short" != 4
73 AC_ERROR(--with-int32 option is required)
75 int32="unsigned short"
88 AC_DEFINE_UNQUOTED(SHA1_WORD, $UINT32, [ 32 bit data type ])
91 [ --with-int64='type' use 'type' for an unsigned 64 bit integer type
92 ( default is 'unsigned')],
95 AC_MSG_CHECKING(for uint64_t)
99 #include <sys/types.h>
103 ], [ AC_MSG_RESULT(yes) ; int64="uint64_t"], [
106 AC_MSG_CHECKING(for u_int_64_t)
110 #include <sys/types.h>
114 ], [AC_MSG_RESULT(yes); int64="u_int64_t"],[
118 AC_CHECK_SIZEOF(unsigned, 0)
119 if test "$ac_cv_sizeof_unsigned" != 8
121 AC_CHECK_SIZEOF(unsigned long, 0)
122 if test "$ac_cv_sizeof_unsigned_long" != 8
124 AC_CHECK_SIZEOF(unsigned long long, 0)
125 if test "$ac_cv_sizeof_unsigned_long_long" != 8
127 AC_CHECK_SIZEOF(unsigned short, 0)
128 if test "$ac_cv_sizeof_unsigned_short" != 8
130 AC_ERROR(--with-int64 option is required)
132 int64="unsigned short"
134 int64="unsigned long long"
137 int64="unsigned long"
148 AC_DEFINE_UNQUOTED(SHA512_WORD, $UINT64, [ 64 bit data type ])
149 dnl Checks for typedefs, structures, and compiler characteristics.
152 dnl Checks for library functions.