File: configure.in

package info (click to toggle)
courier 0.60.0-2
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 52,288 kB
  • ctags: 12,677
  • sloc: ansic: 165,348; cpp: 24,820; sh: 16,410; perl: 6,839; makefile: 3,621; yacc: 289; sed: 16
file content (110 lines) | stat: -rw-r--r-- 2,109 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
dnl Process this file with autoconf to produce a configure script.
dnl $Id: configure.in,v 1.18 2007/02/26 02:56:37 mrsam Exp $
dnl
dnl Copyright 1998 - 2004 Double Precision, Inc.  See COPYING for
dnl distribution information.

AC_INIT(rfc822lib, 0.12, [courier-users@lists.sourceforge.net])

>confdefs.h  # Kill PACKAGE_ macros

AC_CONFIG_SRCDIR(rfc822.c)
AM_INIT_AUTOMAKE([foreign no-define])
AM_CONFIG_HEADER(config.h)

dnl Checks for programs.
AC_PROG_CC
AC_ISC_POSIX
AC_AIX
AC_MINIX
AC_PROG_LIBTOOL

if test "$GCC" = yes ; then
        CXXFLAGS="$CXXFLAGS -Wall"
        CFLAGS="$CFLAGS -Wall"
fi

dnl Checks for libraries.

dnl Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS(locale.h)

dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_TYPE_SIZE_T
AC_STRUCT_TM

dnl Checks for library functions.

AC_CHECK_FUNCS(strcasecmp strncasecmp setlocale)

AC_CACHE_CHECK([how to calculate alternate timezone],librfc822_cv_SYS_TIMEZONE,

AC_TRY_COMPILE([
#include	<time.h>
],[
int main()
{
time_t	t=altzone;

	return (0);
}
], librfc822_cv_SYS_TIMEZONE=altzone,

	AC_TRY_COMPILE([
#include	<time.h>
],[
int main()
{
int	n=daylight;

	return (0);
}
	], librfc822_cv_SYS_TIMEZONE=daylight,

	AC_TRY_COMPILE([
#include	<time.h>

extern struct tm dummy;
],[
int main()
{
long	n=dummy.tm_gmtoff;

	return (0);
}
	] ,librfc822_cv_SYS_TIMEZONE=tm_gmtoff,
		librfc822_cv_SYS_TIMEZONE=unknown
			)
		)
	)
)

case $librfc822_cv_SYS_TIMEZONE in
tm_gmtoff)
	AC_DEFINE_UNQUOTED(USE_TIME_GMTOFF,1,
		[ The time offset is specified in the tm_gmtoff member ])
	;;
altzone)
	AC_DEFINE_UNQUOTED(USE_TIME_ALTZONE,1,
		[ The daylight savings time offset is in the altzone member ])
	;;
daylight)
	AC_DEFINE_UNQUOTED(USE_TIME_DAYLIGHT,1,
		[ The daylight savings time offset is in the tm_isdst member ])
	;;
*)
	AC_MSG_WARN([Cannot figure out how to calculate the alternate timezone, will use GMT])
	;;
esac

if test -d ../unicode
then
	AC_DEFINE_UNQUOTED(HAVE_LIBUNICODE,1,
		[ Whether we have libunicode.a ])
fi

AM_CONDITIONAL(HAVE_SGML, test -d ${srcdir}/../docbook)

AC_OUTPUT(Makefile)