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