forked from brunonymous/vpopmail
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfigure.ac
2289 lines (1936 loc) · 56.8 KB
/
configure.ac
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
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
dnl Process this file with autoconf to produce a configure script.
AC_PREREQ([2.71])
AC_INIT([vpopmail],[5.6.4])
PACKAGE=$PACKAGE_NAME
VERSION=$PACKAGE_VERSION
AC_CONFIG_HEADERS([config.h])
AM_INIT_AUTOMAKE()
AC_CANONICAL_HOST
#
# Default CFLAGS
#
if test -z "$CFLAGS"
then
AC_SUBST(CFLAGS, "-std=c99 -D_XOPEN_SOURCE=500")
fi
#
# Default LDFLAGS
#
if test -z "$LDFLAGS"
then
AC_SUBST(LDFLAGS, "")
fi
#----------------------------------------------------------------------
dnl Checks for programs.
AC_PROG_AWK
AC_PROG_CC
AC_PROG_INSTALL
AC_PROG_RANLIB
#AC_USE_SYSTEM_EXTENSIONS
AC_SEARCH_LIBS([strerror],[cposix])
#----------------------------------------------------------------------
AC_CHECK_LIB(crypt, crypt)
#AC_CHECK_LIB(nsl, gethostbyaddr)
#AC_CHECK_LIB(socket, getsockname)
#----------------------------------------------------------------------
dnl Checks for header files.
AC_HEADER_DIRENT
AC_CHECK_INCLUDES_DEFAULT
AC_PROG_EGREP
AC_HEADER_SYS_WAIT
AC_CHECK_HEADERS([inttypes.h arpa/inet.h endian.h byteswap.h fcntl.h memory.h sys/endian.h machine/endian.h netinet/in.h shadow.h stdlib.h string.h sys/file.h sys/param.h sys/socket.h sys/time.h syslog.h unistd.h utime.h crypt.h err.h])
#----------------------------------------------------------------------
# Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_TYPE_UID_T
AC_C_INLINE
AC_TYPE_MODE_T
AC_TYPE_OFF_T
AC_TYPE_PID_T
AC_TYPE_SIZE_T
# AC_CHECK_MEMBERS([struct stat.st_blksize])
AC_STRUCT_TM
#----------------------------------------------------------------------
# Checks for library functions.
#AC_FUNC_CHOWN
AC_FUNC_CLOSEDIR_VOID
#AC_FUNC_FORK
#AC_FUNC_LSTAT
#AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK
#AC_FUNC_MALLOC
#AC_FUNC_REALLOC
AC_CACHE_CHECK([return type of signal handlers],[ac_cv_type_signal],[AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM([#include <sys/types.h>
#include <signal.h>
],
[return *(signal (0, 0)) (0) == 1;])],
[ac_cv_type_signal=int],
[ac_cv_type_signal=void])])
AC_DEFINE_UNQUOTED([RETSIGTYPE],[$ac_cv_type_signal],[Define as the return type of signal handlers
(`int' or `void').])
#AC_FUNC_STAT
AC_FUNC_UTIME_NULL
AC_CHECK_FUNCS([htonll ntohll bzero dup2 fdatasync getcwd gethostname getpass getspnam memset mkdir putenv rmdir socket strchr strdup strerror strncasecmp strrchr strspn strstr utime warn])
AC_MSG_CHECKING(for bswap64)
AC_LINK_IFELSE([AC_LANG_PROGRAM([[
#ifdef HAVE_SYS_ENDIAN_H
#include <sys/endian.h>
#endif
#ifdef HAVE_MACHINE_ENDIAN_H
#include <machine/endian.h>
#endif
]], [[ bswap64(0); ]])],[
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_BSWAP64,1,[bswap64 defined])
],[
AC_MSG_RESULT(no)
])
#----------------------------------------------------------------------
AC_MSG_CHECKING(vpopmail configure options)
AC_MSG_RESULT(ok)
#----------------------------------------------------------------------
case "$host" in
*-*-sunos4.1.1*)
idcommand="/usr/xpg4/bin/id -u"
;;
*-*-solaris2.8*)
idcommand="/usr/xpg4/bin/id -u"
;;
*-*-solaris*)
idcommand="/usr/xpg4/bin/id -u"
;;
*)
idcommand="id -u"
;;
esac
#----------------------------------------------------------------------
AC_ARG_ENABLE(non-root-build,
[ --enable-non-root-build Build vpopmail as a non-root user, only if you know what you are doing. see README.non-root],
idtest='false', idtest='true')
#----------------------------------------------------------------------
if $idtest && test `$idcommand` != "0"
then
AC_MSG_WARN(=== vpopmail must be configured as root. ===)
AC_MSG_WARN(=== please switch to the root user and ===)
AC_MSG_WARN(=== run ./configure. Thanks ===)
AC_MSG_ERROR(aborted.)
fi
#----------------------------------------------------------------------
case "$host" in
*-*-sunos4.1.1*)
PS_COMMAND="ps -aux"
;;
*-*-solaris*)
PS_COMMAND="ps -ef"
;;
*-*-sunos*)
PS_COMMAND="ps -ef"
;;
*-sgi-5*)
PS_COMMAND="ps -ef"
;;
*-ibm-aix*)
PS_COMMAND="ps -ef"
;;
mips-dec-mach3*)
PS_COMMAND="ps -ef"
;;
*-dec-ultrix*)
PS_COMMAND="ps -ef"
;;
*-*-hpux*)
PS_COMMAND="ps -eaf"
;;
alpha-dec-osf*)
PS_COMMAND="ps -ef"
;;
*-*-nextstep*)
PS_COMMAND="ps -ef"
;;
i*86-*-bsdi*)
PS_COMMAND="ps axww"
;;
i*86-unknown-bsd*)
PS_COMMAND="ps -ef"
;;
m68k-sony-newsos*)
PS_COMMAND="ps -ef"
;;
mips-sony-bsd*)
PS_COMMAND="ps -ef"
;;
m68k-apple-aux*)
PS_COMMAND="ps -ef"
;;
m88k-dg-dgux*)
PS_COMMAND="ps -ef"
;;
t3e-*-*)
PS_COMMAND="ps -ef"
;;
*-cray-unicos*)
PS_COMMAND="ps -ef"
;;
*-*-sysv4*)
PS_COMMAND="ps -ef"
;;
*-*-machten*)
PS_COMMAND="ps -ef"
;;
i*86-unknown-sco*)
PS_COMMAND="ps -ef"
;;
*-convex-bsd*)
PS_COMMAND="ps -ef"
;;
*-sequent-ptx*)
PS_COMMAND="ps -ef"
;;
*-sequent-dynix*|*-sequent-ptx*)
PS_COMMAND="ps -ef"
;;
*-*-freebsd*)
PS_COMMAND="ps aux"
;;
*-*-netbsd*)
PS_COMMAND="ps aux"
;;
*-*-openbsd*)
PS_COMMAND="ps -aux"
;;
*-*-IRIX*)
PS_COMMAND="ps -ef"
;;
*)
PS_COMMAND="ps axww"
;;
esac
AC_DEFINE_UNQUOTED(PS_COMMAND,"$PS_COMMAND","")
#----------------------------------------------------------------------
AC_MSG_CHECKING(if we're building on Solaris)
case "$host" in
*-*-solaris*)
extralibflags="-lm -lnsl -lsocket"
AC_MSG_RESULT(yes)
#
# Check for Solaris libraries
#
AC_CHECK_LIB(m, sqrt)
AC_CHECK_LIB(nsl, gethostbyname)
AC_CHECK_LIB(socket, connect)
;;
*)
AC_MSG_RESULT(no)
extralibflags=""
;;
esac
#----------------------------------------------------------------------
AC_MSG_CHECKING(whether we can locate the qmail directory)
qmaildir=""
for f in /var/qmail
do
if test -d $f
then
qmaildir=$f
fi
done
AC_ARG_ENABLE(qmaildir,
[ --enable-qmaildir=DIR Directory where qmail control and user directories are installed [/var/qmail].],
qmaildir="$enableval",
[
if test "$qmaildir" = ""
then
AC_MSG_RESULT(no)
AC_MSG_ERROR([Unable to find your qmaildir directory, specify --enable-qmaildir.])
fi
]
)
AC_MSG_RESULT(yes)
AC_DEFINE_UNQUOTED(QMAILDIR,"$qmaildir","")
#----------------------------------------------------------------------
AC_MSG_CHECKING(whether we can locate the qmail-newu program)
qmailnewu=""
for f in "$qmaildir"/bin/qmail-newu /usr/sbin/qmail-newu
do
if test -f $f
then
qmailnewu=$f
break
fi
done
AC_ARG_ENABLE(qmail-newu,
[ --enable-qmail-newu=PATH Full path to qmail-newu program.],
qmailnewu="$enableval",
[
if test "$qmailnewu" = ""
then
AC_MSG_RESULT(no)
AC_MSG_ERROR([Unable to find your qmail-newu file, specify --enable-qmail-newu.])
fi
]
)
if test ! -f "$qmailnewu"
then
AC_MSG_RESULT(no)
AC_MSG_ERROR([Unable to find your qmail-newu file, specify --enable-qmail-newu=/full/path/to/qmail-newu])
fi
AC_MSG_RESULT(yes)
AC_DEFINE_UNQUOTED(QMAILNEWU,"$qmailnewu","")
#----------------------------------------------------------------------
AC_MSG_CHECKING(whether we can locate the qmail-inject program)
qmailinject=""
for f in "$qmaildir"/bin/qmail-inject /usr/sbin/qmail-inject /usr/bin/qmail-inject
do
if test -f $f
then
qmailinject=$f
break
fi
done
AC_ARG_ENABLE(qmail-inject,
[ --enable-qmail-inject=PATH Full path to qmail-inject program.],
qmailinject="$enableval",
[
if test "$qmailinject" = ""
then
AC_MSG_RESULT(no)
AC_MSG_ERROR([Unable to find your qmailinject file, specify --enable-qmail-inject.])
fi
]
)
if test ! -f "$qmailinject"
then
AC_MSG_RESULT(no)
AC_MSG_ERROR([Unable to find your qmail-inject file, specify --enable-qmail-inject=/full/path/to/qmail-inject])
fi
AC_MSG_RESULT(yes)
AC_DEFINE_UNQUOTED(QMAILINJECT,"$qmailinject","")
#----------------------------------------------------------------------
AC_MSG_CHECKING(whether we can locate the qmail-newmrh program)
qmailnewmrh=""
for f in "$qmaildir"/bin/qmail-newmrh /usr/sbin/qmail-newmrh
do
if test -f $f
then
qmailnewmrh=$f
break
fi
done
AC_ARG_ENABLE(qmail-newmrh,
[ --enable-qmail-newmrh=PATH Full path to qmail-newmrh program.],
qmailnewmrh="$enableval",
[
if test "$qmailnewmrh" = ""
then
AC_MSG_RESULT(no)
AC_MSG_ERROR([Unable to find your qmail-newmrh file, specify --enable-qmail-newmrh.])
fi
]
)
if test ! -f "$qmailnewmrh"
then
AC_MSG_RESULT(no)
AC_MSG_ERROR([Unable to find your qmail-newmrh file, specify --enable-qmail-qmail-newmrh=/full/path/to/qmail-newmrh])
fi
AC_MSG_RESULT(yes)
AC_DEFINE_UNQUOTED(QMAILNEWMRH,"$qmailnewmrh","")
#----------------------------------------------------------------------
AC_MSG_CHECKING(for valid vpopmail user and group)
vpopuser="vpopmail"
AC_ARG_ENABLE(vpopuser,
[ --enable-vpopuser=USER User name allocated to vpopmail [vpopmail].],
vpopuser="$enableval",
[
if test "$vpopuser" = ""
then
AC_MSG_ERROR([Unable to find your vpopmail user, specify --enable-vpopuser.])
fi
]
)
AC_DEFINE_UNQUOTED(VPOPUSER,"$vpopuser","")
AC_SUBST(vpopuser)
echo $vpopuser > vpopusername
vpopgroup="vchkpw"
AC_ARG_ENABLE(vpopgroup,
[ --enable-vpopgroup=GROUP Group name allocated to vpopmail [vchkpw].],
vpopgroup="$enableval",
[
if test "$vpopgroup" = ""
then
AC_MSG_ERROR([Unable to find your vpopmail group, specify --enable-vpopgroup.])
fi
]
)
AC_DEFINE_UNQUOTED(VPOPGROUP,"$vpopgroup","")
AC_SUBST(vpopgroup)
AC_MSG_RESULT(yes)
AC_MSG_CHECKING(whether password file entry for the vpopmail user exists)
AC_RUN_IFELSE([AC_LANG_SOURCE([[
#include <unistd.h>
#include <string.h>
#include <unistd.h>
#include <string.h>
#include <stdio.h>
#include <pwd.h>
#include <stdlib.h>
int main() {
struct passwd *pw;
char tmpbuf[100];
FILE *f;
unlink("vpopmail.dir");
unlink("vpopmail.uid");
unlink("vpopmail.gid");
if ( (f=fopen("vpopusername","r+"))==NULL) {
printf("No vpopmail user found.\n");
printf("Please add the vchkpw group and\n");
printf("vpopmail user. Then run configure again\n");
return(-1);
}
fgets(tmpbuf,100,f);
fclose(f);
tmpbuf[strlen(tmpbuf)-1] = 0;
if (( pw=getpwnam(tmpbuf)) != 0 ) {
f=fopen("vpopmail.dir","a+");
fprintf(f,"%s\n", pw->pw_dir);
fclose(f);
f=fopen("vpopmail.uid", "a+");
fprintf(f,"%d\n", pw->pw_uid);
fclose(f);
f=fopen("vpopmail.gid", "a+");
fprintf(f,"%d\n", pw->pw_gid);
fclose(f);
} else {
printf("No vpopmail user found.\n");
printf("Please add the vchkpw group and\n");
printf("vpopmail user. Then run configure again\n");
return(-1);
}
return(0);
}
]])],[AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no)
AC_MSG_ERROR(Could not compile and run even a trivial ANSI C program - check CC.)],[AC_MSG_ERROR(Could not compile and run even a trivial ANSI C program - check CC.)
])
if test ! -f vpopmail.uid
then
AC_MSG_ERROR(No vpopmail user.)
fi
if test ! -f vpopmail.gid
then
AC_MSG_ERROR(No vpopmail group.)
fi
if test ! -f vpopmail.dir
then
AC_MSG_ERROR(No vpopmail home directory)
fi
vpopmaildir=`cat vpopmail.dir`
AC_SUBST(vpopmaildir)
AC_DEFINE_UNQUOTED(VPOPMAILDIR,"$vpopmaildir","")
rm -f vpopmail.dir
vpopmailuid=`cat vpopmail.uid`
AC_DEFINE_UNQUOTED(VPOPMAILUID,$vpopmailuid,"")
rm -f vpopmail.uid
vpopmailgid=`cat vpopmail.gid`
AC_DEFINE_UNQUOTED(VPOPMAILGID,$vpopmailgid,"")
rm -f vpopmail.gid
rm -f vpopusername
#----------------------------------------------------------------------
if test ! -d $vpopmaildir/etc
then
if test ! -d $vpopmaildir
then
AC_MSG_WARN( creating $vpopmaildir )
mkdir -p $vpopmaildir
chown $vpopmailuid $vpopmaildir
chgrp $vpopmailgid $vpopmaildir
chmod 755 $vpopmaildir
fi
AC_MSG_WARN( making a vpopmail etc directory )
mkdir $vpopmaildir/etc
chown $vpopmailuid "$vpopmaildir"/etc
chgrp $vpopmailgid "$vpopmaildir"/etc
chmod 755 "$vpopmaildir"/etc
fi
#----------------------------------------------------------------------
AC_MSG_CHECKING(whether roaming-users has been enabled)
AC_ARG_ENABLE(roaming-users,
[ --enable-roaming-users Enable POP-before-SMTP functionality.],
POPRELAY=$enableval,
[
POPRELAY=no
]
)
case $POPRELAY in
1*|y*|Y*)
AC_MSG_RESULT(yes)
POPRELAY=1
AC_DEFINE_UNQUOTED(POP_AUTH_OPEN_RELAY,$POPRELAY,"")
AC_MSG_CHECKING(whether we can locate the tcprules program)
for f in /usr/local/bin/tcprules /usr/bin/tcprules
do
if test -f $f
then
tcprules_prog=$f
break
fi
done
AC_ARG_ENABLE(tcprules-prog,
[ --enable-tcprules-prog=PATH Full path to tcprules program [/usr/{local/}bin/tcprules].],
tcprules_prog="$enableval",
[
if test "$tcprules_prog" = ""
then
AC_MSG_RESULT(no)
AC_MSG_ERROR([Unable to find your tcprules prog, specify --enable-tcprules-prog.])
fi
]
)
if test ! -f "$tcprules_prog"
then
AC_MSG_RESULT(no)
AC_MSG_ERROR([Unable to find your tcprulesfile, specify --enable-tcprules-prog=/full/path/to/tcprules])
fi
AC_MSG_RESULT(yes)
AC_DEFINE_UNQUOTED(TCPRULES_PROG,"$tcprules_prog","")
AC_MSG_CHECKING(whether we can locate the tcp.smtp file)
tcpserver_file=""
for f in "$vpopmaildir"/etc/tcp.smtp /etc/tcp.smtp /etc/tcprules.d/qmail-smtpd
do
if test -f $f
then
tcpserver_file=$f
break
fi
done
AC_ARG_ENABLE(tcpserver_file,
[ --enable-tcpserver-file=PATH File where tcpserver -x relay information is stored [/home/vpopmail/etc/tcp.smtp].],
tcpserver_file="$enableval",
[
if test "$tcpserver_file" = ""
then
AC_MSG_WARN([Unable to find your tcpserver relay file.])
AC_MSG_WARN([Creating tcp.smtp in "$vpopmaildir"/etc/tcp.smtp.])
echo "127.:allow,RELAYCLIENT=\"\"" > "$vpopmaildir"/etc/tcp.smtp
tcpserver_file="$vpopmaildir"/etc/tcp.smtp
fi
]
)
if test ! -f "$tcpserver_file"
then
AC_MSG_ERROR([Unable to find your tcp.smtp file, specify --enable-tcpserver-path=/full/path/to/tcp.smtp])
fi
AC_MSG_RESULT(yes)
AC_DEFINE_UNQUOTED(TCP_FILE,"$tcpserver_file","")
AC_MSG_CHECKING(whether rebuild-tcpserver-file is been enabled)
AC_ARG_ENABLE(rebuild-tcpserver-file,
[ --disable-rebuild-tcpserver-file Disable rebuilding of tcpserver relay control file.],
REBUILD_TCPSERVER=$enableval,
[
REBUILD_TCPSERVER=y
]
)
case $REBUILD_TCPSERVER in
1*|y*|Y*)
AC_MSG_RESULT(yes)
REBUILD_TCPSERVER=1
AC_DEFINE_UNQUOTED(REBUILD_TCPSERVER,$REBUILD_TCPSERVER,"")
;;
*)
AC_MSG_RESULT(no)
;;
esac
relay_clear_minutes="180"
AC_ARG_ENABLE(relay-clear-minutes,
[ --enable-relay-clear-minutes=# Expire time for roaming users after pop authentication [180].],
relay_clear_minutes="$enableval",
)
AC_DEFINE_UNQUOTED(RELAY_CLEAR_MINUTES,$relay_clear_minutes,"")
open_smtp_cur="$vpopmaildir/etc/open-smtp"
open_smtp_tmp="$vpopmaildir/etc/open-smtp.tmp"
open_smtp_lok="$vpopmaildir/etc/open-smtp.lock"
AC_DEFINE_UNQUOTED(OPEN_SMTP_CUR_FILE,"$open_smtp_cur","")
AC_DEFINE_UNQUOTED(OPEN_SMTP_TMP_FILE,"$open_smtp_tmp","")
AC_DEFINE_UNQUOTED(OPEN_SMTP_LOK_FILE,"$open_smtp_lok","")
;;
*)
AC_MSG_RESULT(no)
;;
esac
#----------------------------------------------------------------------
AC_MSG_CHECKING(whether learn-passwords is enabled)
AC_ARG_ENABLE(learn-passwords,
[ --enable-learn-passwords If no password is stored for a user, learn it the first time they authenticate.],
ENABLE_LEARN_PASSWORDS=$enableval,
[
ENABLE_LEARN_PASSWORDS=n
]
)
case $ENABLE_LEARN_PASSWORDS in
1*|y*|Y*)
AC_MSG_RESULT(yes)
ENABLE_LEARN_PASSWORDS=1
AC_DEFINE_UNQUOTED(ENABLE_LEARN_PASSWORDS,$ENABLE_LEARN_PASSWORDS,"")
;;
*)
AC_MSG_RESULT(no)
;;
esac
#----------------------------------------------------------------------
AC_MSG_CHECKING(whether md5-passwords is enabled)
AC_ARG_ENABLE(md5-passwords,
[ --disable-md5-passwords Use DES crypt() instead of MD5 encryption for passwords.],
ENABLE_MD5_PASSWORDS=$enableval,
[
ENABLE_MD5_PASSWORDS=n
]
)
case $ENABLE_MD5_PASSWORDS in
1*|y*|Y*)
AC_MSG_RESULT(yes)
ENABLE_MD5_PASSWORDS=1
AC_DEFINE_UNQUOTED(MD5_PASSWORDS,$ENABLE_MD5_PASSWORDS,"")
;;
*)
AC_MSG_RESULT(no)
;;
esac
#----------------------------------------------------------------------
AC_MSG_CHECKING(whether sha512-passwords is enabled)
AC_ARG_ENABLE(sha512-passwords,
[ --disable-sha512-passwords Use DES crypt() instead of SHA512 encryption for passwords.],
ENABLE_SHA512_PASSWORDS=$enableval,
[
ENABLE_SHA512_PASSWORDS=y
]
)
case $ENABLE_SHA512_PASSWORDS in
1*|y*|Y*)
AC_MSG_RESULT(yes)
ENABLE_SHA512_PASSWORDS=1
AC_DEFINE_UNQUOTED(SHA512_PASSWORDS,$ENABLE_SHA512_PASSWORDS,"")
;;
*)
AC_MSG_RESULT(no)
;;
esac
#----------------------------------------------------------------------
AC_MSG_CHECKING(whether file-locking is enabled)
AC_ARG_ENABLE(file-locking,
[ --disable-file-locking Don't use file locking.],
FILE_LOCKING=$enableval,
[
FILE_LOCKING=y
]
)
case $FILE_LOCKING in
1*|y*|Y*)
AC_MSG_RESULT(yes)
FILE_LOCKING=1
AC_DEFINE_UNQUOTED(FILE_LOCKING,$FILE_LOCKING,"")
;;
*)
AC_MSG_RESULT(no)
;;
esac
#----------------------------------------------------------------------
AC_MSG_CHECKING(whether file-sync is enabled)
AC_ARG_ENABLE(file-sync,
[ --enable-file-sync Enable file sync after each message is delivered.],
FILE_SYNC=$enableval,
[
FILE_SYNC=n
]
)
case $FILE_SYNC in
1*|y*|Y*)
AC_MSG_RESULT(yes)
FILE_SYNC=1
AC_DEFINE_UNQUOTED(FILE_SYNC,$FILE_SYNC,"")
;;
*)
AC_MSG_RESULT(no)
;;
esac
#----------------------------------------------------------------------
AC_MSG_CHECKING(whether make-seekable is enabled)
AC_ARG_ENABLE(make-seekable,
[ --disable-make-seekable Don't try to make input to vdelivermail seekable.],
MAKE_SEEKABLE=$enableval,
[
MAKE_SEEKABLE=y
]
)
case $MAKE_SEEKABLE in
1*|y*|Y*)
AC_MSG_RESULT(yes)
MAKE_SEEKABLE=1
AC_DEFINE_UNQUOTED(MAKE_SEEKABLE,$MAKE_SEEKABLE,"")
;;
*)
AC_MSG_RESULT(no)
;;
esac
#----------------------------------------------------------------------
AC_MSG_CHECKING(whether clear-passwd is enabled)
AC_ARG_ENABLE(clear-passwd,
[ --disable-clear-passwd Don't store a cleartext version of the password in addition to the encrypted version.],
CLEAR_PASS=$enableval,
[
CLEAR_PASS=n
]
)
case $CLEAR_PASS in
1*|y*|Y*)
AC_MSG_RESULT(yes)
CLEAR_PASS=1
AC_DEFINE_UNQUOTED(CLEAR_PASS,$CLEAR_PASS,"")
;;
*)
AC_MSG_RESULT(no)
;;
esac
#----------------------------------------------------------------------
AC_MSG_CHECKING(whether user-big-dir is enabled)
AC_ARG_ENABLE(users-big-dir,
[ --disable-users-big-dir Disable hashing of user directories.],
USERS_BIG_DIR=$enableval,
[
USERS_BIG_DIR=y
]
)
case $USERS_BIG_DIR in
1*|y*|Y*)
AC_MSG_RESULT(yes)
USERS_BIG_DIR=1
AC_DEFINE_UNQUOTED(USERS_BIG_DIR,$USERS_BIG_DIR,"")
;;
*)
AC_MSG_RESULT(no)
;;
esac
#----------------------------------------------------------------------
AC_MSG_CHECKING(whether sqwebmail-pass is enabled)
AC_ARG_ENABLE(sqwebmail-pass,
[ --enable-sqwebmail-pass Store a copy of the user's password in the the user's maildir for use by pre-v3 sqwebmail.],
ENABLE_SQWEBMAIL_PASS=$enableval,
[
ENABLE_SQWEBMAIL_PASS=n
]
)
case $ENABLE_SQWEBMAIL_PASS in
1*|y*|Y*)
AC_MSG_RESULT(yes)
ENABLE_SQWEBMAIL_PASS=1
AC_DEFINE_UNQUOTED(SQWEBMAIL_PASS,$ENABLE_SQWEBMAIL_PASS,"")
;;
*)
AC_MSG_RESULT(no)
;;
esac
#----------------------------------------------------------------------
AC_MSG_CHECKING(whether qmail-ext is enabled)
AC_ARG_ENABLE(qmail-ext,
[ --enable-qmail-ext Enable qmail email address extension support.],
QMAIL_EXT=$enableval,
[
QMAIL_EXT=n
]
)
case $QMAIL_EXT in
1*|y*|Y*)
AC_MSG_RESULT(yes)
QMAIL_EXT=1
AC_DEFINE_UNQUOTED(QMAIL_EXT,$QMAIL_EXT,"")
;;
*)
AC_MSG_RESULT(no)
;;
esac
#----------------------------------------------------------------------
AC_MSG_CHECKING(whether ip-alias-domains is enabled)
AC_ARG_ENABLE(ip-alias-domains,
[ --enable-ip-alias-domains Enable mapping of default domain via reverse ip lookup table.],
IPALIAS=$enableval,
[
IPALIAS=no
]
)
case $IPALIAS in
1*|y*|Y*)
AC_MSG_RESULT(yes)
IPALIAS=1
AC_DEFINE_UNQUOTED(IP_ALIAS_DOMAINS,$IPALIAS,"")
;;
*)
AC_MSG_RESULT(no)
;;
esac
#----------------------------------------------------------------------
AC_MSG_CHECKING(whether onchange script is enabled)
AC_ARG_ENABLE(onchange-script,
[ --enable-onchange-script Enable onchange script. See README.onchange for more info.],
ENABLE_ONCHANGE_SCRIPT=$enableval,
[
ENABLE_ONCHANGE_SCRIPT=0
]
)
case $ENABLE_ONCHANGE_SCRIPT in
1*|y*|Y*)
AC_MSG_RESULT(yes)
ENABLE_ONCHANGE_SCRIPT=1
AC_DEFINE_UNQUOTED(ONCHANGE_SCRIPT,$ENABLE_ONCHANGE_SCRIPT,"")
;;
*)
AC_MSG_RESULT(no)
;;
esac
#----------------------------------------------------------------------
AC_MSG_CHECKING(whether onchange script before and after is enabled)
AC_ARG_ENABLE(onchange-script-before-and-after,
[ --enable-onchange-script-before-and-after Enable onchange script before and after changes. See README.onchange for more info.],
ENABLE_ONCHANGE_SCRIPT_BEFORE_AND_AFTER=$enableval,
[
ENABLE_ONCHANGE_SCRIPT_BEFORE_AND_AFTER=0
]
)
case $ENABLE_ONCHANGE_SCRIPT_BEFORE_AND_AFTER in
1*|y*|Y*)
AC_MSG_RESULT(yes)
ENABLE_ONCHANGE_SCRIPT_BEFORE_AND_AFTER=1
AC_DEFINE_UNQUOTED(ONCHANGE_SCRIPT_BEFORE_AND_AFTER,$ENABLE_ONCHANGE_SCRIPT_BEFORE_AND_AFTER,"")
;;
*)
AC_MSG_RESULT(no)
;;
esac
#----------------------------------------------------------------------
#----------------------------------------------------------------------
AC_MSG_CHECKING(whether spamassassin is enabled)
AC_ARG_ENABLE(spamassassin,
[ --enable-spamassassin Enable spamassassin. See README.spamassassin for more info.],
ENABLE_SPAMASSASSIN=$enableval,
[
ENABLE_SPAMASSASSIN=0
]
)
case $ENABLE_SPAMASSASSIN in
0*|n*|N*)
AC_MSG_RESULT(no)
;;
*)
AC_MSG_RESULT(yes)
ENABLE_SPAMASSASSIN=1
AC_DEFINE_UNQUOTED(SPAMASSASSIN,$ENABLE_SPAMASSASSIN,"")
AC_MSG_CHECKING(whether we can locate the spamc program)
for f in /usr/bin/spamc /usr/local/bin/spamc
do
if test -f $f
then
spamc_prog=$f
break
fi
done
AC_ARG_ENABLE(spamc-prog,
[ --enable-spamc-prog=PATH Full path to spamc program [/usr/{local/}bin/spamc].],
spamc_prog="$enableval",
[
if test "$spamc_prog" = ""
then
AC_MSG_RESULT(no)
AC_MSG_ERROR([Unable to find your spamc prog, specify --enable-spamc-prog.])
fi
]
)
if test ! -f "$spamc_prog"
then
AC_MSG_RESULT(no)
AC_MSG_ERROR([Unable to find your spamc program, specify --enable-spamc-prog=/full/path/to/spamc])
fi
AC_MSG_RESULT(yes)
AC_DEFINE_UNQUOTED(SPAMC_PROG,"$spamc_prog","")
;;
esac
#----------------------------------------------------------------------