Mercurial > masqmail
annotate configure.ac @ 204:5745edd5b769
removed the --disable-smtp-server configure option
masqmail will now always have the possibility to listen on a port compiled in
if you don't want it to listen on a port add this to your masqmail.conf:
listen_addresses = ""
also, if you don't start it as daemon it will not listen neither
author | meillo@marmaro.de |
---|---|
date | Fri, 16 Jul 2010 15:38:53 +0200 |
parents | 45acc5727493 |
children | 4fd237550525 |
rev | line source |
---|---|
0 | 1 dnl Process this file with autoconf to produce a configure script. |
2 | |
3 AC_PREREQ(2.59) | |
159 | 4 AC_INIT(masqmail, 0.3.0, meillo@marmaro.de) |
0 | 5 AC_CONFIG_SRCDIR([src/masqmail.c]) |
6 AM_CONFIG_HEADER(config.h) | |
7 AM_INIT_AUTOMAKE() | |
8 | |
9 dnl Checks for programs. | |
10 | |
11 dnl Checks for libraries. | |
12 | |
13 AC_PROG_CC | |
14 AC_ISC_POSIX | |
15 AC_STDC_HEADERS | |
16 dnl AC_ARG_PROGRAM | |
17 AC_PROG_RANLIB | |
18 | |
19 PKG_CHECK_MODULES(GLIB, glib-2.0) | |
181
8b17ea9fd17b
added comments on how to compile with glib-1.2
meillo@marmaro.de
parents:
175
diff
changeset
|
20 dnl # use the next line to use glib-1.2 |
8b17ea9fd17b
added comments on how to compile with glib-1.2
meillo@marmaro.de
parents:
175
diff
changeset
|
21 dnl PKG_CHECK_MODULES(GLIB, glib) |
8b17ea9fd17b
added comments on how to compile with glib-1.2
meillo@marmaro.de
parents:
175
diff
changeset
|
22 |
0 | 23 AC_SUBST(GLIB_LIBS) |
24 AC_SUBST(GLIB_CFLAGS) | |
25 | |
26 dnl resolver support (default is use it) | |
27 AC_ARG_ENABLE(resolver, | |
193
bd9704417d49
typographic fix: alignments in configure -h
meillo@marmaro.de
parents:
192
diff
changeset
|
28 [ --disable-resolver disable resolver support], |
0 | 29 if test "$enable_resolver" != 'no'; then |
30 resolver_enabled='yes' | |
31 fi, | |
32 resolver_enabled='yes' | |
33 ) | |
34 | |
35 if test "$resolver_enabled" = yes; then | |
36 AC_DEFINE(ENABLE_RESOLVER, 1, [If the resolver is to be used]) | |
37 dnl checks necessary for libc5: | |
38 dnl if there is res_search in libc, it is probably libc5 | |
39 dnl if not, it is probably libc6 and we need libresolv | |
40 AC_CHECK_LIB(c, res_search, need_resolv=no, need_resolv=yes) | |
41 if test "$need_resolv" = yes; then | |
1 | 42 AC_CHECK_LIB(resolv, res_search, |
43 has_resolv=yes; RESOLV_LIBS="-lresolv", | |
44 has_resolv=no) | |
45 if test "$has_resolv" = no; then | |
46 saved_LIBS="$LIBS" | |
47 LIBS="$LIBS -lresolv" | |
48 AC_MSG_CHECKING(for res_search in -lresolv) | |
49 AC_TRY_LINK([#include <resolv.h>], | |
50 [res_search (0, 0, 0, 0, 0);], | |
51 RESOLV_LIBS="-lresolv"; has_resolv=yes; AC_MSG_RESULT(yes), | |
52 AC_MSG_RESULT(no)); | |
53 LIBS="$saved_LIBS" | |
54 fi | |
55 if test "$has_resolv" = no; then | |
56 AC_MSG_ERROR("no libresolv") | |
57 RESOLV_LIBS='' | |
58 fi | |
0 | 59 fi |
60 else | |
61 RESOLV_LIBS='' | |
62 fi | |
63 AC_SUBST(RESOLV_LIBS) | |
64 | |
65 dnl if there is no getline, we define it using getdelim in src/masqmail.h | |
66 AC_CHECK_FUNCS(getline) | |
67 | |
68 dnl if there is no fdatasync, we define it to fsync in src/masqmail.h | |
69 AC_CHECK_FUNCS(fdatasync) | |
70 | |
71 dnl Checks for header files. | |
72 AC_HEADER_STDC | |
73 AC_CHECK_HEADERS(fcntl.h sys/time.h syslog.h unistd.h) | |
74 | |
75 dnl Checks for typedefs, structures, and compiler characteristics. | |
76 AC_C_CONST | |
77 AC_TYPE_PID_T | |
78 AC_TYPE_SIZE_T | |
79 AC_HEADER_TIME | |
80 AC_STRUCT_TM | |
81 | |
82 dnl Checks for library functions. | |
83 AC_FUNC_FNMATCH | |
84 AC_TYPE_SIGNAL | |
85 AC_FUNC_STRFTIME | |
86 AC_FUNC_VPRINTF | |
87 AC_CHECK_FUNCS(select socket strerror strstr) | |
88 | |
89 dnl user and group configuration | |
90 AC_ARG_WITH(user, | |
193
bd9704417d49
typographic fix: alignments in configure -h
meillo@marmaro.de
parents:
192
diff
changeset
|
91 [ --with-user=USER set user [mail]], |
0 | 92 ) |
93 if test "x$with_user" = 'x'; then | |
94 with_user='mail' | |
95 fi | |
96 | |
97 AC_ARG_WITH(group, | |
193
bd9704417d49
typographic fix: alignments in configure -h
meillo@marmaro.de
parents:
192
diff
changeset
|
98 [ --with-group=GROUP set group [trusted]], |
0 | 99 ) |
100 if test "x$with_group" = 'x'; then | |
101 with_group='trusted' | |
102 fi | |
103 | |
104 dnl debugging support (default is use it) | |
105 AC_ARG_ENABLE(debug, | |
193
bd9704417d49
typographic fix: alignments in configure -h
meillo@marmaro.de
parents:
192
diff
changeset
|
106 [ --disable-debug disable debugging], |
0 | 107 if test "x$enable_debug" != 'xno'; then |
108 debug_enabled='yes' | |
109 fi, | |
110 debug_enabled='yes' | |
111 ) | |
112 if test "x$debug_enabled" = xyes; then | |
113 AC_DEFINE(ENABLE_DEBUG, 1, [If debugging is enabled]) | |
114 fi | |
115 | |
116 AC_DEFINE_UNQUOTED(DEF_MAIL_USER, "${with_user}", [The mail user]) | |
117 AC_SUBST(with_user) | |
118 AC_DEFINE_UNQUOTED(DEF_MAIL_GROUP, "${with_group}", [The mail group]) | |
119 AC_SUBST(with_group) | |
120 | |
121 dnl optional features | |
122 MD5_LIBS='' | |
123 BASE64_LIBS='' | |
124 | |
125 dnl auth support (default is to not use it) | |
126 AC_ARG_ENABLE(auth, | |
193
bd9704417d49
typographic fix: alignments in configure -h
meillo@marmaro.de
parents:
192
diff
changeset
|
127 [ --enable-auth enable AUTH (RFC 2554) client support], |
0 | 128 if test "x$enable_auth" != 'xno'; then |
129 auth_enabled='yes' | |
130 fi, | |
131 ) | |
132 if test "x$auth_enabled" = xyes; then | |
133 AC_DEFINE(ENABLE_AUTH, 1, [If AUTH is enabled]) | |
134 BASE64_LIBS='base64/libbase64.a' | |
135 # MD5_LIBS='md5/libmd5c.a' | |
136 need_md5='yes' | |
137 fi | |
138 AC_SUBST(BASE64_LIBS) | |
139 | |
140 dnl maildir support (default is to not use it) | |
141 AC_ARG_ENABLE(maildir, | |
193
bd9704417d49
typographic fix: alignments in configure -h
meillo@marmaro.de
parents:
192
diff
changeset
|
142 [ --enable-maildir enable qmail style maildir support], |
0 | 143 if test "x$enable_maildir" != 'xno'; then |
144 maildir_enabled='yes' | |
145 fi, | |
146 ) | |
147 if test "x$maildir_enabled" = xyes; then | |
148 AC_DEFINE(ENABLE_MAILDIR, 1, [If Maildirs are enabled]) | |
149 fi | |
150 | |
151 dnl libcrypto | |
152 AC_ARG_WITH(libcrypto, | |
193
bd9704417d49
typographic fix: alignments in configure -h
meillo@marmaro.de
parents:
192
diff
changeset
|
153 [ --with-libcrypto use libcrypto], |
0 | 154 ) |
155 if test "x$with_libcrypto" != 'xyes'; then | |
156 with_libcrypto='no' | |
157 fi | |
158 | |
159 if test "x$need_md5" = 'xyes'; then | |
160 dnl check whether we have md5 in libcrypto if md5 needed and we shall link with libcrypto | |
161 if test "x$with_libcrypto" = "xyes"; then | |
162 AC_CHECK_LIB(crypto, MD5, has_crypto='yes', AC_MSG_ERROR('no libcrypto')) | |
163 if test "x$has_crypto" = 'xyes'; then | |
164 AC_DEFINE(USE_LIB_CRYPTO, 1, [If libcrypto is available]) | |
165 MD5_LIBS='-lcrypto' | |
166 fi | |
167 else | |
168 MD5_LIBS='md5/libmd5c.a' | |
169 fi | |
170 fi | |
171 AC_SUBST(MD5_LIBS) | |
172 | |
173 dnl ident support (default is to not use it) | |
174 IDENT_LIBS='' | |
175 AC_ARG_ENABLE(ident, | |
193
bd9704417d49
typographic fix: alignments in configure -h
meillo@marmaro.de
parents:
192
diff
changeset
|
176 [ --enable-ident enable ident (RFC 1413) support], |
0 | 177 if test "x$enable_ident" != 'xno'; then |
178 ident_enabled='yes' | |
179 fi, | |
180 ) | |
181 AC_SUBST(has_ident) | |
182 if test "x$ident_enabled" = xyes; then | |
183 AC_DEFINE(ENABLE_IDENT, 1, [If ident is enabled]) | |
184 AC_CHECK_LIB(ident, ident_id, IDENT_LIBS='-lident', IDENT_LIBS='libident/libident.a') | |
185 fi | |
186 AC_SUBST(IDENT_LIBS) | |
187 | |
188 dnl liblockfile | |
189 AC_ARG_WITH(liblockfile, | |
193
bd9704417d49
typographic fix: alignments in configure -h
meillo@marmaro.de
parents:
192
diff
changeset
|
190 [ --with-liblockfile use liblock (for Debian)], |
0 | 191 ) |
173
4917e764f108
Fix handling of --with-liblockfile=no or --without-liblockfile
meillo@marmaro.de
parents:
123
diff
changeset
|
192 if test "x$with_liblockfile" = 'xno'; then |
4917e764f108
Fix handling of --with-liblockfile=no or --without-liblockfile
meillo@marmaro.de
parents:
123
diff
changeset
|
193 with_liblockfile='' |
4917e764f108
Fix handling of --with-liblockfile=no or --without-liblockfile
meillo@marmaro.de
parents:
123
diff
changeset
|
194 fi |
0 | 195 if test "x$with_liblockfile" != 'x'; then |
196 with_liblockfile='yes' | |
197 fi | |
198 if test "x$with_liblockfile" = xyes; then | |
199 AC_CHECK_LIB(lockfile, maillock, has_lockfile=yes, AC_MSG_ERROR("no liblockfile")) | |
200 LOCKFILE_LIBS='-llockfile' | |
201 AC_DEFINE(USE_LIBLOCKFILE, 1, [If liblockfile is to be used]) | |
202 else | |
203 LOCKFILE_LIBS='' | |
204 fi | |
205 AC_SUBST(LOCKFILE_LIBS) | |
206 AC_SUBST(USE_LIBLOCKFILE) | |
207 | |
208 dnl log and spool directories | |
209 AC_ARG_WITH(logdir, | |
193
bd9704417d49
typographic fix: alignments in configure -h
meillo@marmaro.de
parents:
192
diff
changeset
|
210 [ --with-logdir=DIR set log directory [/var/log/masqmail]], |
0 | 211 , |
212 with_logdir='/var/log/masqmail/' | |
213 ) | |
151 | 214 AC_DEFINE_UNQUOTED(LOG_DIR, "${with_logdir}", [The log directory]) |
0 | 215 AC_SUBST(with_logdir) |
216 | |
217 AC_ARG_WITH(spooldir, | |
193
bd9704417d49
typographic fix: alignments in configure -h
meillo@marmaro.de
parents:
192
diff
changeset
|
218 [ --with-spooldir=DIR set spool directory [/var/spool/masqmail]], |
0 | 219 , |
220 with_spooldir='/var/spool/masqmail/' | |
221 ) | |
151 | 222 AC_DEFINE_UNQUOTED(SPOOL_DIR, "${with_spooldir}", [The spool directory]) |
0 | 223 AC_SUBST(with_spooldir) |
224 | |
225 dnl configuration file | |
226 AC_ARG_WITH(confdir, | |
193
bd9704417d49
typographic fix: alignments in configure -h
meillo@marmaro.de
parents:
192
diff
changeset
|
227 [ --with-confdir directory for configuration [/etc/masqmail]], |
0 | 228 , |
229 with_confdir='/etc/masqmail' | |
230 ) | |
231 AC_DEFINE_UNQUOTED(CONF_DIR, "${with_confdir}", [The configuration file location]) | |
232 AC_SUBST(with_confdir) | |
233 | |
234 test "x$prefix" = xNONE && prefix="$ac_default_prefix" | |
35 | 235 |
236 dnl well, /me/ thought that autoconf should make things _easy_ ... -- oku | |
237 dnl I needed the two `eval's to get the variable expanded in all cases -- meillo | |
238 dnl this is just horrible! -- meillo | |
239 AC_DEFINE_UNQUOTED(DATA_DIR, "`eval eval echo $datadir`/masqmail", [The data directory]) | |
0 | 240 |
241 dnl gymnastics to get the correct path where masqmail should be installed | |
242 dnl we need this to call ourselves in failmsg.c | |
243 if test "x${exec_prefix}" != 'xNONE'; then | |
244 AC_DEFINE_UNQUOTED(SBINDIR, "${exec_prefix}/sbin", [The sbin directory]) | |
245 else | |
246 if test "x${prefix}" != 'xNONE'; then | |
247 AC_DEFINE_UNQUOTED(SBINDIR, "${prefix}/sbin") | |
248 else | |
249 AC_DEFINE_UNQUOTED(SBINDIR, "/usr/sbin") | |
250 fi | |
251 fi | |
252 | |
253 AC_OUTPUT(Makefile \ | |
254 src/Makefile \ | |
255 src/base64/Makefile \ | |
256 src/md5/Makefile \ | |
55
185ba6c0e6f0
install man pages again, patch by Juergen Daubert
meillo@marmaro.de
parents:
52
diff
changeset
|
257 src/libident/Makefile \ |
57 | 258 man/Makefile |
0 | 259 ) |