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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
|
dnl Process this file with autoconf to produce a configure script.
dnl
dnl Copyright 1998 - 2001 Double Precision, Inc. See COPYING for
dnl distribution information.
AC_INIT([maildir],[0.11],[courier-maildrop@lists.sourceforge.net])
>confdefs.h # Kill PACKAGE_ macros
AC_CONFIG_SRCDIR(maildirquota.c)
AC_CONFIG_AUX_DIR(../..)
LPATH="$PATH:/usr/local/bin"
AC_CANONICAL_TARGET
AM_INIT_AUTOMAKE([foreign no-define])
AC_CONFIG_HEADERS(config.h)
dnl Checks for programs.
AC_PROG_AWK
AC_USE_SYSTEM_EXTENSIONS
AC_PROG_CC
AC_PROG_INSTALL
AC_PROG_LN_S
_LT_SET_OPTION([LT_INIT],[dlopen])
m4_warn([obsolete],[AC_LIBTOOL_DLOPEN: Remove this warning and the call to _LT_SET_OPTION when you
put the 'dlopen' option into LT_INIT's first parameter.])
LT_INIT
AC_PROG_CXX
AC_PATH_PROGS(PERL, perl5 perl, perl, $LPATH)
if test "$GCC" = "yes"
then
CFLAGS="$CFLAGS -Wall"
fi
if test "$GXX" = "yes"
then
CXXFLAGS="$CXXFLAGS -Wall"
fi
CFLAGS="$CFLAGS -I${srcdir}/.. -I.. -I${srcdir}/../.. -I../.."
CXXFLAGS="$CXXFLAGS -I${srcdir}/.. -I.. -I${srcdir}/../.. -I../.."
dnl Checks for libraries.
dnl Checks for header files.
AC_HEADER_DIRENT
AC_CHECK_HEADERS_ONCE([sys/time.h])
# Obsolete code to be removed.
if test $ac_cv_header_sys_time_h = yes; then
AC_DEFINE([TIME_WITH_SYS_TIME],[1],[Define to 1 if you can safely include both <sys/time.h>
and <time.h>. This macro is obsolete.])
fi
# End of obsolete code.
AC_CHECK_HEADERS(sys/stat.h sys/wait.h fcntl.h unistd.h sysexits.h utime.h)
AC_CHECK_PROG(PCRE2, pcre2-config, yes, no)
if test "$PCRE2" = "yes"
then
AC_DEFINE_UNQUOTED(HAVE_PCRE2,1,[Whether the pcre library was detected])
PCRE_LDFLAGS="`pcre2-config --libs8`"
PCRE_CFLAGS="`pcre2-config --cflags`"
fi
AC_SUBST(PCRE_LDFLAGS)
AC_SUBST(PCRE_CFLAGS)
AC_HEADER_SYS_WAIT
AC_LANG([C++])
AC_CHECK_HEADERS(vector vector.h)
AC_LANG([C])
dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_TYPE_OFF_T
AC_TYPE_SIZE_T
AC_TYPE_UID_T
AC_STRUCT_TM
AC_SYS_LARGEFILE
AX_COURIER_UNICODE_CXXFLAGS
AC_SUBST(COURIER_UNICODE_CXXFLAGS)
dnl Checks for library functions.
AC_CHECK_FUNCS(symlink readlink utime utimes)
AC_CHECK_FUNCS(inotify_init inotify_init1)
AC_CACHE_CHECK([for missing gethostname prototype],maildir_cv_SYS_GETHOSTNAME,
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#if HAVE_UNISTD_H
#include <unistd.h>
#endif
extern int gethostname(int,int);
]], [[
]])],[maildir_cv_SYS_GETHOSTNAME=yes],[maildir_cv_SYS_GETHOSTNAME=no
])
)
if test $maildir_cv_SYS_GETHOSTNAME = "no"
then
AC_DEFINE_UNQUOTED(HAS_GETHOSTNAME,1,
[ Whether gethostname() is prototyped ])
fi
AC_ARG_WITH(db, [ --with-db=gdbm Use the GDBM library.
--with-db=db Use the libdb.a library.],
db="$withval", db="")
if test "$db" = "no"
then
db=""
fi
if test "$db" != ""
then
AC_DEFINE_UNQUOTED(HAVE_DBOBJ,1,
[ Whether the top-level configure script defined dbobj ])
fi
AC_ARG_WITH(trashquota, [ --with-trashquota Count deleted messages as part of the quota],
trashquota="$withval",
trashquota="no")
if test "$trashquota" = "yes"
then
AC_DEFINE_UNQUOTED(TRASHQUOTA,1,
[ Whether to count deleted messages towards the maildir quota ])
fi
test "x$prefix" = xNONE && prefix=$ac_default_prefix
test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
eval "prefix=$prefix"
eval "exec_prefix=$exec_prefix"
eval "sysconfdir=$sysconfdir"
AC_PATH_PROGS(MAILBOT, mailbot, mailbot, $LPATH)
if test -d $srcdir/../../courier
then
MAILBOT="$bindir/mailbot"
AC_DEFINE_UNQUOTED(HAVE_COURIER,1,
[ Whether building the full Courier suite. ])
fi
AC_SUBST(MAILBOT)
AM_CONDITIONAL(HAVE_SGML, test -d ${srcdir}/../docbook)
if test "$target_os" = "cygwin"
then
AC_DEFINE_UNQUOTED(MDIRSEP, "!",
[ Maildir target separator ])
else
AC_DEFINE_UNQUOTED(MDIRSEP, ":",
[ Maildir target separator ])
fi
AC_CONFIG_FILES([Makefile sharedindexinstall sharedindexsplit])
AC_OUTPUT
|