Import Debian package 0.61.0-1+lenny1
[hcoop/debian/courier-authlib.git] / rfc822 / configure.in
1 dnl Process this file with autoconf to produce a configure script.
2 dnl $Id: configure.in,v 1.18 2007/02/26 02:56:37 mrsam Exp $
3 dnl
4 dnl Copyright 1998 - 2004 Double Precision, Inc. See COPYING for
5 dnl distribution information.
6
7 AC_INIT(rfc822lib, 0.12, [courier-users@lists.sourceforge.net])
8
9 >confdefs.h # Kill PACKAGE_ macros
10
11 AC_CONFIG_SRCDIR(rfc822.c)
12 AM_INIT_AUTOMAKE([foreign no-define])
13 AM_CONFIG_HEADER(config.h)
14
15 dnl Checks for programs.
16 AC_PROG_CC
17 AC_ISC_POSIX
18 AC_AIX
19 AC_MINIX
20 AC_PROG_LIBTOOL
21
22 if test "$GCC" = yes ; then
23 CXXFLAGS="$CXXFLAGS -Wall"
24 CFLAGS="$CFLAGS -Wall"
25 fi
26
27 dnl Checks for libraries.
28
29 dnl Checks for header files.
30 AC_HEADER_STDC
31 AC_CHECK_HEADERS(locale.h)
32
33 dnl Checks for typedefs, structures, and compiler characteristics.
34 AC_C_CONST
35 AC_TYPE_SIZE_T
36 AC_STRUCT_TM
37
38 dnl Checks for library functions.
39
40 AC_CHECK_FUNCS(strcasecmp strncasecmp setlocale)
41
42 AC_CACHE_CHECK([how to calculate alternate timezone],librfc822_cv_SYS_TIMEZONE,
43
44 AC_TRY_COMPILE([
45 #include <time.h>
46 ],[
47 int main()
48 {
49 time_t t=altzone;
50
51 return (0);
52 }
53 ], librfc822_cv_SYS_TIMEZONE=altzone,
54
55 AC_TRY_COMPILE([
56 #include <time.h>
57 ],[
58 int main()
59 {
60 int n=daylight;
61
62 return (0);
63 }
64 ], librfc822_cv_SYS_TIMEZONE=daylight,
65
66 AC_TRY_COMPILE([
67 #include <time.h>
68
69 extern struct tm dummy;
70 ],[
71 int main()
72 {
73 long n=dummy.tm_gmtoff;
74
75 return (0);
76 }
77 ] ,librfc822_cv_SYS_TIMEZONE=tm_gmtoff,
78 librfc822_cv_SYS_TIMEZONE=unknown
79 )
80 )
81 )
82 )
83
84 case $librfc822_cv_SYS_TIMEZONE in
85 tm_gmtoff)
86 AC_DEFINE_UNQUOTED(USE_TIME_GMTOFF,1,
87 [ The time offset is specified in the tm_gmtoff member ])
88 ;;
89 altzone)
90 AC_DEFINE_UNQUOTED(USE_TIME_ALTZONE,1,
91 [ The daylight savings time offset is in the altzone member ])
92 ;;
93 daylight)
94 AC_DEFINE_UNQUOTED(USE_TIME_DAYLIGHT,1,
95 [ The daylight savings time offset is in the tm_isdst member ])
96 ;;
97 *)
98 AC_MSG_WARN([Cannot figure out how to calculate the alternate timezone, will use GMT])
99 ;;
100 esac
101
102 if test -d ../unicode
103 then
104 AC_DEFINE_UNQUOTED(HAVE_LIBUNICODE,1,
105 [ Whether we have libunicode.a ])
106 fi
107
108 AM_CONDITIONAL(HAVE_SGML, test -d ${srcdir}/../docbook)
109
110 AC_OUTPUT(Makefile)