1 dnl Process this file with autoconf to produce a configure script.
3 dnl Copyright 1998 - 2001 Double Precision, Inc. See COPYING for
4 dnl distribution information.
6 AC_INIT(maildir, 0.11, [courier-maildrop@lists.sourceforge.net])
8 >confdefs.h # Kill PACKAGE_ macros
10 AC_CONFIG_SRCDIR(maildirquota.c)
11 LPATH="$PATH:/usr/local/bin"
13 AM_INIT_AUTOMAKE([foreign no-define])
14 AM_CONFIG_HEADER(config.h)
16 dnl Checks for programs.
18 AC_USE_SYSTEM_EXTENSIONS
27 AC_PATH_PROGS(PERL, perl5 perl, perl, $LPATH)
29 if test "$GCC" = "yes"
31 CFLAGS="$CFLAGS -Wall"
34 if test "$GXX" = "yes"
36 CXXFLAGS="$CXXFLAGS -Wall"
39 CFLAGS="$CFLAGS -I${srcdir}/.. -I.."
41 dnl Checks for libraries.
43 dnl Checks for header files.
47 AC_CHECK_HEADERS(sys/stat.h sys/wait.h fcntl.h unistd.h sysexits.h utime.h pcre.h pcre/pcre.h)
49 AC_CHECK_HEADER([pcre.h],
52 AC_CHECK_HEADER([pcre/pcre.h],
60 AC_CHECK_HEADERS(vector vector.h)
63 dnl Checks for typedefs, structures, and compiler characteristics.
71 dnl Checks for library functions.
72 AC_CHECK_HEADER(fam.h, :, :)
73 AC_CHECK_FUNCS(symlink readlink strcasecmp utime utimes)
74 AC_CHECK_LIB(fam, FAMOpen, [
76 AC_DEFINE_UNQUOTED(HAVE_FAM,1,
77 [ Whether libfam.a is available ])
79 AC_CHECK_HEADER(fam.h, : , [
80 AC_MSG_WARN([[The development header files and libraries for fam,]])
81 AC_MSG_WARN([[the File Alteration Monitor, are not installed.]])
82 AC_MSG_WARN([[You appear to have the FAM runtime libraries installed,]])
83 AC_MSG_WARN([[so you need to simply install the additional development]])
84 AC_MSG_WARN([[package for your operating system.]])
85 AC_MSG_ERROR([[FAM development libraries not found.]]) ]
91 echo "$LIBFAM" >maildir.libdeps
93 AC_CACHE_CHECK([for missing gethostname prototype],maildir_cv_SYS_GETHOSTNAME,
100 extern "C" int gethostname(int,int);
102 ],maildir_cv_SYS_GETHOSTNAME=yes,maildir_cv_SYS_GETHOSTNAME=no
107 if test $maildir_cv_SYS_GETHOSTNAME = "no"
109 AC_DEFINE_UNQUOTED(HAS_GETHOSTNAME,1,
110 [ Whether gethostname() is prototyped ])
113 AC_ARG_WITH(db, [ --with-db=gdbm Use the GDBM library.
114 --with-db=db Use the libdb.a library.],
115 db="$withval", db="")
124 AC_DEFINE_UNQUOTED(HAVE_DBOBJ,1,
125 [ Whether the top-level configure script defined dbobj ])
128 AC_ARG_WITH(trashquota, [ --with-trashquota Count deleted messages as part of the quota],
129 trashquota="$withval",
132 if test "$trashquota" = "yes"
134 AC_DEFINE_UNQUOTED(TRASHQUOTA,1,
135 [ Whether to count deleted messages towards the maildir quota ])
138 test "x$prefix" = xNONE && prefix=$ac_default_prefix
139 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
140 eval "prefix=$prefix"
141 eval "exec_prefix=$exec_prefix"
142 eval "sysconfdir=$sysconfdir"
144 AC_PATH_PROGS(MAILBOT, mailbot, mailbot, $LPATH)
146 if test -d $srcdir/../courier
148 MAILBOT="$bindir/mailbot"
149 AC_DEFINE_UNQUOTED(HAVE_COURIER,1,
150 [ Whether building the full Courier suite. ])
154 AM_CONDITIONAL(HAVE_SGML, test -d ${srcdir}/../docbook)
156 if test "$target_os" = "cygwin"
158 AC_DEFINE_UNQUOTED(MDIRSEP, "!",
159 [ Maildir target separator ])
161 AC_DEFINE_UNQUOTED(MDIRSEP, ":",
162 [ Maildir target separator ])
165 AC_OUTPUT(Makefile sharedindexinstall sharedindexsplit)