aboutsummaryrefslogtreecommitdiffhomepage
path: root/contrib/notmuch-deliver/maildrop/maildir/configure.in
blob: 1e7244431dee340e90bac94135b0db2a2ad55a9f (plain)
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
dnl $Id: configure.in,v 1.37 2008/11/27 21:51:16 mrsam Exp $
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)
LPATH="$PATH:/usr/local/bin"
AC_CANONICAL_SYSTEM
AM_INIT_AUTOMAKE([foreign no-define])
AM_CONFIG_HEADER(config.h)

dnl Checks for programs.
AC_PROG_AWK
AC_USE_SYSTEM_EXTENSIONS
AC_PROG_CC
AC_PROG_INSTALL
AC_PROG_LN_S
AC_LIBTOOL_DLOPEN
AM_PROG_LIBTOOL

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.."

dnl Checks for libraries.

dnl Checks for header files.
AC_HEADER_DIRENT
AC_HEADER_STDC
AC_HEADER_TIME
AC_CHECK_HEADERS(sys/stat.h sys/wait.h fcntl.h unistd.h sysexits.h utime.h pcre.h pcre/pcre.h)

AC_CHECK_HEADER([pcre.h],
		[LIBPCRE=-lpcre])

AC_CHECK_HEADER([pcre/pcre.h],
		[LIBPCRE=-lpcre])

AC_SUBST(LIBPCRE)

AC_HEADER_SYS_WAIT

AC_LANG_CPLUSPLUS
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

dnl Checks for library functions.
AC_CHECK_HEADER(fam.h, :, :)
AC_CHECK_FUNCS(symlink readlink strcasecmp utime utimes)
AC_CHECK_LIB(fam, FAMOpen,  [
			LIBFAM=-lfam
			AC_DEFINE_UNQUOTED(HAVE_FAM,1,
			[ Whether libfam.a is available ])

			AC_CHECK_HEADER(fam.h, : , [
AC_MSG_WARN([[The development header files and libraries for fam,]])
AC_MSG_WARN([[the File Alteration Monitor, are not installed.]])
AC_MSG_WARN([[You appear to have the FAM runtime libraries installed,]])
AC_MSG_WARN([[so you need to simply install the additional development]])
AC_MSG_WARN([[package for your operating system.]])
AC_MSG_ERROR([[FAM development libraries not found.]]) ]
					)
		  ])

AC_SUBST(LIBFAM)

echo "$LIBFAM" >maildir.libdeps

AC_CACHE_CHECK([for missing gethostname prototype],maildir_cv_SYS_GETHOSTNAME,

AC_TRY_COMPILE([
#if HAVE_UNISTD_H
#include	<unistd.h>
#endif

extern "C" 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_OUTPUT(Makefile sharedindexinstall sharedindexsplit)