]> git.notmuchmail.org Git - notmuch/blob - contrib/notmuch-deliver/maildrop/maildir/configure.in
test/python: set LD_LIBRARY_PATH and PYTHONPATH to use local notmuch
[notmuch] / contrib / notmuch-deliver / maildrop / maildir / configure.in
1 dnl $Id: configure.in,v 1.37 2008/11/27 21:51:16 mrsam Exp $
2 dnl Process this file with autoconf to produce a configure script.
3 dnl
4 dnl Copyright 1998 - 2001 Double Precision, Inc.  See COPYING for
5 dnl distribution information.
6
7 AC_INIT(maildir, 0.11, [courier-maildrop@lists.sourceforge.net])
8
9 >confdefs.h  # Kill PACKAGE_ macros
10
11 AC_CONFIG_SRCDIR(maildirquota.c)
12 LPATH="$PATH:/usr/local/bin"
13 AC_CANONICAL_SYSTEM
14 AM_INIT_AUTOMAKE([foreign no-define])
15 AM_CONFIG_HEADER(config.h)
16
17 dnl Checks for programs.
18 AC_PROG_AWK
19 AC_USE_SYSTEM_EXTENSIONS
20 AC_PROG_CC
21 AC_PROG_INSTALL
22 AC_PROG_LN_S
23 AC_LIBTOOL_DLOPEN
24 AM_PROG_LIBTOOL
25
26 AC_PROG_CXX
27
28 AC_PATH_PROGS(PERL, perl5 perl, perl, $LPATH)
29
30 if test "$GCC" = "yes"
31 then
32         CFLAGS="$CFLAGS -Wall"
33 fi
34
35 if test "$GXX" = "yes"
36 then
37         CXXFLAGS="$CXXFLAGS -Wall"
38 fi
39
40 CFLAGS="$CFLAGS -I${srcdir}/.. -I.."
41
42 dnl Checks for libraries.
43
44 dnl Checks for header files.
45 AC_HEADER_DIRENT
46 AC_HEADER_STDC
47 AC_HEADER_TIME
48 AC_CHECK_HEADERS(sys/stat.h sys/wait.h fcntl.h unistd.h sysexits.h utime.h pcre.h pcre/pcre.h)
49
50 AC_CHECK_HEADER([pcre.h],
51                 [LIBPCRE=-lpcre])
52
53 AC_CHECK_HEADER([pcre/pcre.h],
54                 [LIBPCRE=-lpcre])
55
56 AC_SUBST(LIBPCRE)
57
58 AC_HEADER_SYS_WAIT
59
60 AC_LANG_CPLUSPLUS
61 AC_CHECK_HEADERS(vector vector.h)
62 AC_LANG_C
63
64 dnl Checks for typedefs, structures, and compiler characteristics.
65 AC_C_CONST
66 AC_TYPE_OFF_T
67 AC_TYPE_SIZE_T
68 AC_TYPE_UID_T
69 AC_STRUCT_TM
70
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,  [
75                         LIBFAM=-lfam
76                         AC_DEFINE_UNQUOTED(HAVE_FAM,1,
77                         [ Whether libfam.a is available ])
78
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.]]) ]
86                                         )
87                   ])
88
89 AC_SUBST(LIBFAM)
90
91 echo "$LIBFAM" >maildir.libdeps
92
93 AC_CACHE_CHECK([for missing gethostname prototype],maildir_cv_SYS_GETHOSTNAME,
94
95 AC_TRY_COMPILE([
96 #if HAVE_UNISTD_H
97 #include        <unistd.h>
98 #endif
99
100 extern "C" int gethostname(int,int);
101 ],[
102 ],maildir_cv_SYS_GETHOSTNAME=yes,maildir_cv_SYS_GETHOSTNAME=no
103 )
104
105 )
106
107 if test $maildir_cv_SYS_GETHOSTNAME = "no"
108 then
109         AC_DEFINE_UNQUOTED(HAS_GETHOSTNAME,1,
110         [ Whether gethostname() is prototyped ])
111 fi
112
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="")
116
117 if test "$db" = "no"
118 then
119         db=""
120 fi
121
122 if test "$db" != ""
123 then
124         AC_DEFINE_UNQUOTED(HAVE_DBOBJ,1,
125         [ Whether the top-level configure script defined dbobj ])
126 fi
127
128 AC_ARG_WITH(trashquota, [  --with-trashquota       Count deleted messages as part of the quota],
129         trashquota="$withval",
130         trashquota="no")
131
132 if test "$trashquota" = "yes"
133 then
134         AC_DEFINE_UNQUOTED(TRASHQUOTA,1,
135         [ Whether to count deleted messages towards the maildir quota ])
136 fi
137
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"
143
144 AC_PATH_PROGS(MAILBOT, mailbot, mailbot, $LPATH)
145
146 if test -d $srcdir/../courier
147 then
148         MAILBOT="$bindir/mailbot"
149         AC_DEFINE_UNQUOTED(HAVE_COURIER,1,
150                                 [ Whether building the full Courier suite. ])
151 fi
152
153 AC_SUBST(MAILBOT)
154 AM_CONDITIONAL(HAVE_SGML, test -d ${srcdir}/../docbook)
155
156 if test "$target_os" = "cygwin"
157 then
158         AC_DEFINE_UNQUOTED(MDIRSEP, "!",
159         [ Maildir target separator ])
160 else
161         AC_DEFINE_UNQUOTED(MDIRSEP, ":",
162         [ Maildir target separator ])
163 fi
164
165 AC_OUTPUT(Makefile sharedindexinstall sharedindexsplit)