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 $Id: configure.in,v 1.21 2009/11/08 18:14:47 mrsam Exp $
dnl
-dnl Copyright 1998 - 2004 Double Precision, Inc. See COPYING for
+dnl Copyright 1998 - 2009 Double Precision, Inc. See COPYING for
dnl distribution information.
-AC_INIT(rfc822lib, 0.12, [courier-users@lists.sourceforge.net])
+AC_INIT(rfc822lib, 0.13, [courier-users@lists.sourceforge.net])
>confdefs.h # Kill PACKAGE_ macros
AM_CONFIG_HEADER(config.h)
dnl Checks for programs.
+AC_USE_SYSTEM_EXTENSIONS
AC_PROG_CC
-AC_ISC_POSIX
-AC_AIX
-AC_MINIX
AC_PROG_LIBTOOL
if test "$GCC" = yes ; then
dnl Checks for library functions.
+AC_ARG_WITH(libidn, AC_HELP_STRING([--with-libidn=[DIR]],
+ [Support IDN (needs GNU Libidn)]),
+ libidn=$withval, libidn=yes)
+
+if test "$libidn" != "no"
+then
+ PKG_CHECK_MODULES(LIBIDN, libidn >= 0.0.0, [libidn=yes], [libidn=no])
+ if test "$libidn" != "yes"
+ then
+ libidn=no
+ AC_MSG_WARN([Libidn not found])
+ else
+ libidn=yes
+ AC_DEFINE(LIBIDN, 1, [Define to 1 if you want Libidn.])
+ fi
+fi
+AC_MSG_CHECKING([if Libidn should be used])
+AC_MSG_RESULT($libidn)
+
AC_CHECK_FUNCS(strcasecmp strncasecmp setlocale)
AC_CACHE_CHECK([how to calculate alternate timezone],librfc822_cv_SYS_TIMEZONE,
;;
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)