forked from fmlorg/fml8
-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.in
247 lines (200 loc) · 6.21 KB
/
configure.in
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
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
dnl
dnl $FML: configure.in,v 1.46 2008/05/25 02:55:25 fukachan Exp $
dnl
AC_REVISION($Revision$)
dnl Process this file with autoconf to produce a configure script.
AC_INIT(fml/libexec/loader.in)
# compile with optimisation and without debugging by default
CFLAGS=${CFLAGS-"-O"}
LDFLAGS=${LDFLAGS-""}
dnl path_check
dnl Checks for programs.
dnl perl is mandatory
AC_CHECK_PROGS(have_perl, perl)
if test ! -n "$have_perl" ; then
AC_MSG_ERROR("Perl needs to be installed to use fml")
fi
AC_PATH_PROG(PERL, perl)
AC_MSG_RESULT("checking whether optional useful commands are available or not")
AC_PATH_PROG(CC, cc)
AC_PATH_PROG(INSTALL, install)
AC_PATH_PROG(GIT, git)
AC_PATH_PROG(CKSUM, cksum)
AC_PATH_PROG(SUM, sum)
AC_PATH_PROG(MD5, md5)
AC_PATH_PROG(DIGEST, digest)
AC_PATH_PROG(LS, ls)
AC_PATH_PROG(TAR, tar)
AC_PATH_PROG(GZIP, gzip)
AC_PATH_PROG(ZCAT, zcat)
AC_PATH_PROG(GZCAT, gzcat)
AC_PATH_PROG(GUNZIP, gunzip)
AC_PATH_PROG(LHA, lha)
AC_PATH_PROG(ISH, ish)
AC_PATH_PROG(BZIP2, bzip2)
AC_PATH_PROG(BUNZIP2, bunzip2)
AC_PATH_PROG(UUENCODE, uuencode)
AC_PATH_PROG(COMPRESS, compress)
AC_PATH_PROG(SENDMAIL, sendmail)
AC_PATH_PROG(MAKEMAP, makemap)
AC_PATH_PROG(NEWALIASES, newaliases)
AC_PATH_PROG(POSTFIX, postfix)
AC_PATH_PROG(POSTALIAS, postalias)
AC_PATH_PROG(POSTCONF, postconf)
AC_PATH_PROG(POSTMAP, postmap)
AC_PATH_PROG(NKF, nkf)
AC_PATH_PROG(KAKASI, kakasi)
AC_PATH_PROG(NAMAZU, namazu)
AC_PATH_PROG(PGP, pgp)
AC_PATH_PROG(PGP5, pgp5)
AC_PATH_PROG(PGPe, pgpe)
AC_PATH_PROG(PGPK, pgpk)
AC_PATH_PROG(PGPS, pgps)
AC_PATH_PROG(PGPV, pgpv)
AC_PATH_PROG(GPG, gpg)
AC_PATH_PROG(GPGV, gpgv)
AC_PATH_PROG(GPGSPLIT, gpgsplit)
AC_PATH_PROG(LESS, less)
AC_PATH_PROG(MORE, more)
AC_PATH_PROG(W3M, w3m)
# spam filters
AC_PATH_PROG(SPAMASSASSIN, spamassassin)
AC_PATH_PROG(SPAMD, spamd)
AC_PATH_PROG(SPAMC, spamc)
AC_PATH_PROG(BOGOFILTER, bogofilter)
# virus checker
AC_PATH_PROG(CLAMSCAN, clamscan)
# editors
AC_PATH_PROG(VI, vi)
AC_PATH_PROG(NG, ng)
AC_PATH_PROG(MULE, mule)
AC_PATH_PROG(EMACS, emacs)
AC_PATH_PROG(XEMACS, xemacs)
dnl path_check_end
use_warning=yes
AC_ARG_WITH(warning,
[ --without-warning run perl as perl without -w],
use_warning=$withval)
fmlconfdir=${sysconfdir}/fml
AC_ARG_WITH(fmlconfdir,
[ --with-fmlconfdir=DIR use DIR instead of SYSCONFDIR/fml],
fmlconfdir=$withval)
AC_SUBST(fmlconfdir)
mlspooldir=/var/spool/ml
AC_ARG_WITH(mlspooldir,
[ --with-mlspooldir=DIR use DIR instead of /var/spool/ml],
mlspooldir=$withval)
AC_SUBST(mlspooldir)
fml_owner=fml
AC_ARG_WITH(fml_owner,
[ --with-fml-owner=USER use USER instead of fml],
fml_owner=$withval)
AC_SUBST(fml_owner)
fml_group=fml
AC_ARG_WITH(fml_group,
[ --with-fml-group=GROUP use GROUP instead of fml],
fml_group=$withval)
AC_SUBST(fml_group)
_hostname=`hostname`
default_domain=` expr $_hostname : '[[^\.]]*\.\(.*\)' `
AC_ARG_WITH(default_domain,
[ --with-default-domain=DOMAIN use DOMAIN as the default ML domain],
default_domain=$withval)
AC_SUBST(default_domain)
default_hostname=`hostname`
AC_ARG_WITH(default_hostname,
[ --with-default-hostname=HOSTNAME use HOSTNAME as the default hostname],
default_hostname=$withval)
AC_SUBST(default_hostname)
use_mime_component_filter=yes
AC_ARG_WITH(mime-component-filter,
[ --without-mime-component-filter disable mime_component_filter],
use_mime_component_filter=$withval)
AC_SUBST(use_mime_component_filter)
#
# ml_home_prefix_maps
#
fmlgwconfdir=${sysconfdir}/fml/config.gw
AC_ARG_WITH(fmlgwconfdir,
[ --with-group-writable-fmlconfdir=DIR instead of \$fmlconfdir/config.gw],
fmlgwconfdir=$withval)
AC_SUBST(fmlgwconfdir)
primary_ml_home_prefix_map=$fmlconfdir/ml_home_prefix
AC_ARG_WITH(ml_home_prefix_map,
[ --with-ml-home-prefix-map=PATH use PATH as primary_ml_home_prefix_map],
primary_ml_home_prefix_map=$withval)
use_group_writable_ml_home_prefix_map=no
AC_ARG_WITH(group_writable_ml_home_prefix_map,
[ --with-group-writable-ml-home-prefix-map ],
use_group_writable_ml_home_prefix_map=$withval)
if test "X$with_group_writable_ml_home_prefix_map" = "Xyes" ; then
primary_ml_home_prefix_map=$fmlgwconfdir/ml_home_prefix
fi
AC_SUBST(primary_ml_home_prefix_map)
AC_SUBST(SHELL)
AC_OUTPUT(\
Makefile \
install.pl \
config.sh \
fml/etc/install.cf \
fml/etc/main.cf \
fml/etc/default_config.cf.ja \
fml/etc/default_config.cf.en \
fml/etc/site_default_config.cf \
fml/libexec/loader \
fml/bin/fmladdr \
fml/bin/fmlalias \
fml/bin/fmlconf \
fml/bin/fmldoc \
fml/bin/fmlhtmlify \
fml/bin/fmlsch \
fml/bin/fmlproj \
fml/bin/fmlpgp \
fml/bin/fmlpgp5 \
fml/bin/fmlpgpe \
fml/bin/fmlpgpk \
fml/bin/fmlpgps \
fml/bin/fmlpgpv \
fml/bin/fmlgpg \
fml/bin/fmlgpgv \
fml/bin/fml \
fml/bin/makefml \
)
if test "X$use_warning" = "Xyes" ; then
echo "enabled: perl -w"
else
echo "disabled warning (perl -w)"
sed '1s/-w//' fml/libexec/loader > fml/libexec/loader.new.$$
mv fml/libexec/loader.new.$$ fml/libexec/loader
fi
if test -f fml/libexec/loader ; then
chmod 755 fml/libexec/loader
fi
if test -f install.pl ; then
chmod 755 install.pl
fi
echo ""
echo "fml has been configured with the following options:"
echo ""
echo " prefix: $prefix"
echo " exec_prefix: $exec_prefix"
echo " bindir: $bindir"
echo " sbindir: $sbindir"
echo " lib_dir: $libdir"
echo " libexec_dir: $libexecdir"
echo " mandir: $mandir"
echo " datarootdir: $datarootdir"
echo " datadir: $datadir"
echo " "
echo " fml process owner: $fml_owner"
echo " fml process group: $fml_group"
echo " fmlconfdir: $fmlconfdir"
echo " ml_home_prefix_map: $primary_ml_home_prefix_map"
echo " mlspooldir: $mlspooldir"
echo " default domain: $default_domain"
echo " default hostname: $default_hostname"
echo " "
echo " mime based filter: $use_mime_component_filter"
echo " "
echo "Now you must run \"make install\" as user \"root\"."
echo ""