Imported Debian patch 0.63.0-6
[hcoop/debian/courier-authlib.git] / md5 / configure.in
CommitLineData
d9898ee8 1dnl Process this file with autoconf to produce a configure script.
2dnl $Id: configure.in,v 1.14 2004/12/10 02:34:46 mrsam Exp $
3dnl
4dnl Copyright 1998 - 2004 Double Precision, Inc. See COPYING for
5dnl distribution information.
6
7AC_PREREQ(2.59)
8AC_INIT(libmd5, 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_AWK
20AC_PROG_INSTALL
21AC_PROG_LN_S
22AC_PROG_CC
23AC_PROG_LIBTOOL
24
25if test "$GCC" = yes
26then
27 CFLAGS="-Wall $CFLAGS"
28fi
29
30CFLAGS="$CFLAGS -I$srcdir/.. -I.."
31
32dnl Checks for libraries.
33
34dnl Checks for header files.
35AC_HEADER_STDC
36
37AC_CHECK_HEADERS(sys/types.h)
38
39
40AC_ARG_WITH(int32,
41[ --with-int32='type' use 'type' for an unsigned 32 bit integer type
42 ( default is 'unsigned')],
43 int32="$withval", [
44
45 AC_MSG_CHECKING(for uint32_t)
46
47 AC_TRY_COMPILE([
48#if HAVE_SYS_TYPES_H
49#include <sys/types.h>
50#endif
51 ],[
52 uint32_t i=0;
53 ], [ AC_MSG_RESULT(yes) ; int32="uint32_t"], [
54
55 AC_MSG_RESULT(no)
56 AC_MSG_CHECKING(for u_int_32_t)
57
58 AC_TRY_COMPILE([
59#if HAVE_SYS_TYPES_H
60#include <sys/types.h>
61#endif
62 ],[
63 u_int32_t i=0;
64 ], [AC_MSG_RESULT(yes); int32="u_int32_t"],[
65
66 AC_MSG_RESULT(no)
67
68 AC_CHECK_SIZEOF(unsigned, 0)
69 if test "$ac_cv_sizeof_unsigned" != 4
70 then
71 AC_CHECK_SIZEOF(unsigned long, 0)
72 if test "$ac_cv_sizeof_unsigned_long" != 4
73 then
74 AC_CHECK_SIZEOF(unsigned short, 0)
75 if test "$ac_cv_sizeof_unsigned_short" != 4
76 then
77 AC_ERROR(--with-int32 option is required)
78 fi
79 int32="unsigned short"
80 fi
81 int32="unsigned long"
82 else
83 int32="unsigned"
84 fi
85 ])
86 ])
87 ]
88)
89UINT32="$int32"
90
91AC_DEFINE_UNQUOTED(MD5_WORD, $UINT32, [ 32 bit data type ])
92
93dnl Checks for typedefs, structures, and compiler characteristics.
94AC_C_CONST
95
96dnl Checks for library functions.
97
98AC_OUTPUT(Makefile)