d9898ee8 |
1 | dnl Process this file with autoconf to produce a configure script. |
2 | dnl $Id: configure.in,v 1.14 2004/12/10 02:34:46 mrsam Exp $ |
3 | dnl |
4 | dnl Copyright 1998 - 2004 Double Precision, Inc. See COPYING for |
5 | dnl distribution information. |
6 | |
7 | AC_PREREQ(2.59) |
8 | AC_INIT(libmd5, 1.21, courier-users@lists.sourceforge.net) |
9 | |
10 | >confdefs.h # Kill PACKAGE_ macros |
11 | |
12 | AC_CONFIG_SRCDIR([hmac.c]) |
13 | AM_CONFIG_HEADER([config.h]) |
14 | AM_INIT_AUTOMAKE([foreign no-define]) |
15 | |
16 | AM_CONDITIONAL(HMACC, test -d ${srcdir}/../libhmac) |
17 | |
18 | dnl Checks for programs. |
19 | AC_PROG_AWK |
20 | AC_PROG_INSTALL |
21 | AC_PROG_LN_S |
22 | AC_PROG_CC |
23 | AC_PROG_LIBTOOL |
24 | |
25 | if test "$GCC" = yes |
26 | then |
27 | CFLAGS="-Wall $CFLAGS" |
28 | fi |
29 | |
30 | CFLAGS="$CFLAGS -I$srcdir/.. -I.." |
31 | |
32 | dnl Checks for libraries. |
33 | |
34 | dnl Checks for header files. |
35 | AC_HEADER_STDC |
36 | |
37 | AC_CHECK_HEADERS(sys/types.h) |
38 | |
39 | |
40 | AC_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 | ) |
89 | UINT32="$int32" |
90 | |
91 | AC_DEFINE_UNQUOTED(MD5_WORD, $UINT32, [ 32 bit data type ]) |
92 | |
93 | dnl Checks for typedefs, structures, and compiler characteristics. |
94 | AC_C_CONST |
95 | |
96 | dnl Checks for library functions. |
97 | |
98 | AC_OUTPUT(Makefile) |