userdb: Allow "+", ":", and "_" in usernames.
[hcoop/debian/courier-authlib.git] / sha1 / configure.in
CommitLineData
d9898ee8 1dnl Process this file with autoconf to produce a configure script.
2dnl $Id: configure.in,v 1.7 2005/04/03 16:22:09 mrsam Exp $
3dnl
4dnl Copyright 2001-2004 Double Precision, Inc.
5dnl See COPYING for distribution information.
6
7AC_PREREQ(2.59)
8AC_INIT(libsha1, 1.21, courier-users@lists.sourceforge.net)
9
10>confdefs.h # Kill PACKAGE_ macros
11
12AC_CONFIG_SRCDIR([hmac.c])
13AM_CONFIG_HEADER([config.h])
14AM_INIT_AUTOMAKE([foreign no-define])
15
16AM_CONDITIONAL(HMACC, test -d ${srcdir}/../libhmac)
17
18dnl Checks for programs.
19AC_PROG_CC
20AC_PROG_INSTALL
21AC_PROG_LN_S
22AC_PROG_LIBTOOL
23
24if test "$GCC" = yes
25then
26 CFLAGS="-Wall $CFLAGS"
27fi
28CFLAGS="$CFLAGS -I$srcdir/.. -I.."
29
30dnl Checks for libraries.
31
32dnl Checks for header files.
33
34AC_CHECK_HEADERS(sys/types.h)
35
36AC_ARG_WITH(int32,
37[ --with-int32='type' use 'type' for an unsigned 32 bit integer type
38 ( default is 'unsigned')],
39 int32="$withval", [
40
41 AC_MSG_CHECKING(for uint32_t)
42
43 AC_TRY_COMPILE([
44#if HAVE_SYS_TYPES_H
45#include <sys/types.h>
46#endif
47 ],[
48 uint32_t i=0;
49 ], [ AC_MSG_RESULT(yes) ; int32="uint32_t"], [
50
51 AC_MSG_RESULT(no)
52 AC_MSG_CHECKING(for u_int_32_t)
53
54 AC_TRY_COMPILE([
55#if HAVE_SYS_TYPES_H
56#include <sys/types.h>
57#endif
58 ],[
59 u_int32_t i=0;
60 ], [AC_MSG_RESULT(yes); int32="u_int32_t"],[
61
62 AC_MSG_RESULT(no)
63
64 AC_CHECK_SIZEOF(unsigned, 0)
65 if test "$ac_cv_sizeof_unsigned" != 4
66 then
67 AC_CHECK_SIZEOF(unsigned long, 0)
68 if test "$ac_cv_sizeof_unsigned_long" != 4
69 then
70 AC_CHECK_SIZEOF(unsigned short, 0)
71 if test "$ac_cv_sizeof_unsigned_short" != 4
72 then
73 AC_ERROR(--with-int32 option is required)
74 fi
75 int32="unsigned short"
76 else
77 int32="unsigned long"
78 fi
79 else
80 int32="unsigned"
81 fi
82 ])
83 ])
84 ]
85)
86UINT32="$int32"
87
88AC_DEFINE_UNQUOTED(SHA1_WORD, $UINT32, [ 32 bit data type ])
89
90dnl Checks for typedefs, structures, and compiler characteristics.
91AC_C_CONST
92
93dnl Checks for library functions.
94AC_HEADER_STDC
95
96AC_OUTPUT(Makefile)