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 $
4 dnl Copyright 1998 - 2004 Double Precision, Inc. See COPYING for
5 dnl distribution information.
7 AC_INIT(rfc822lib, 0.12, [courier-users@lists.sourceforge.net])
9 >confdefs.h # Kill PACKAGE_ macros
11 AC_CONFIG_SRCDIR(rfc822.c)
12 AM_INIT_AUTOMAKE([foreign no-define])
13 AM_CONFIG_HEADER(config.h)
15 dnl Checks for programs.
22 if test "$GCC" = yes ; then
23 CXXFLAGS="$CXXFLAGS -Wall"
24 CFLAGS="$CFLAGS -Wall"
27 dnl Checks for libraries.
29 dnl Checks for header files.
31 AC_CHECK_HEADERS(locale.h)
33 dnl Checks for typedefs, structures, and compiler characteristics.
38 dnl Checks for library functions.
40 AC_CHECK_FUNCS(strcasecmp strncasecmp setlocale)
42 AC_CACHE_CHECK([how to calculate alternate timezone],librfc822_cv_SYS_TIMEZONE,
53 ], librfc822_cv_SYS_TIMEZONE=altzone,
64 ], librfc822_cv_SYS_TIMEZONE=daylight,
69 extern struct tm dummy;
73 long n=dummy.tm_gmtoff;
77 ] ,librfc822_cv_SYS_TIMEZONE=tm_gmtoff,
78 librfc822_cv_SYS_TIMEZONE=unknown
84 case $librfc822_cv_SYS_TIMEZONE in
86 AC_DEFINE_UNQUOTED(USE_TIME_GMTOFF,1,
87 [ The time offset is specified in the tm_gmtoff member ])
90 AC_DEFINE_UNQUOTED(USE_TIME_ALTZONE,1,
91 [ The daylight savings time offset is in the altzone member ])
94 AC_DEFINE_UNQUOTED(USE_TIME_DAYLIGHT,1,
95 [ The daylight savings time offset is in the tm_isdst member ])
98 AC_MSG_WARN([Cannot figure out how to calculate the alternate timezone, will use GMT])
102 if test -d ../unicode
104 AC_DEFINE_UNQUOTED(HAVE_LIBUNICODE,1,
105 [ Whether we have libunicode.a ])
108 AM_CONDITIONAL(HAVE_SGML, test -d ${srcdir}/../docbook)