forked from ykaliuta/fidogate
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfigure.ac
1241 lines (1074 loc) · 35.6 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 Copyright (c) 2003-2008 Andrey Slusar <[email protected]>
dnl Copyright (c) 2003-2004 Alexandr Dobroslavskiy <[email protected]>
dnl Copyright (c) 2015-2020 Yauheni Kaliuta <[email protected]>
dnl
AC_REVISION([Revision: 1040])
AC_PREREQ(2.53)
AC_INIT([fidogate],[5.12],[[email protected]])
AC_DISABLE_OPTION_CHECKING
AM_CONFIG_HEADER([config.h])
AC_CONFIG_SRCDIR([src/common/config.c])
AC_CONFIG_AUX_DIR([build])
AC_PREFIX_DEFAULT(/usr/local/fido)
AM_INIT_AUTOMAKE([1.11 foreign subdir-objects])
AM_SILENT_RULES([yes])
AM_MAINTAINER_MODE
AC_CANONICAL_HOST
dnl Check for programs.
AC_PROG_CC
AC_PROG_CPP
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_MAKE_SET
AC_PROG_AWK
AC_PROG_YACC
if test "x$YACC" = "x"; then
AC_MSG_ERROR([yacc/bison not found, please install])
fi
# for libtool:
# LT_INIT
# AC_SUBST(LIBTOOL_DEPS)
AC_PROG_RANLIB
AM_PROG_AR
dnl Checks for header files.
AC_FUNC_ALLOCA
AC_HEADER_DIRENT
AC_HEADER_STDC
AC_HEADER_SYS_WAIT
AC_CHECK_HEADERS(fcntl.h limits.h stddef.h sys/mount.h sys/param.h sys/statfs.h sys/stat.h)
AC_CHECK_HEADERS(sys/statvfs.h sys/time.h sys/vfs.h syslog.h utime.h time.h)
AC_CHECK_HEADERS(sysexits.h malloc.h)
dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_TYPE_MODE_T
AC_TYPE_OFF_T
AC_TYPE_PID_T
AC_TYPE_SIZE_T
AC_HEADER_TIME
AC_STRUCT_TM
AC_STRUCT_TIMEZONE
dnl Checks for library functions.
AC_FUNC_CLOSEDIR_VOID
AC_FUNC_MALLOC
AC_FUNC_MEMCMP
AC_FUNC_MKTIME
dnl for future AC_FUNC_REALLOC
AC_FUNC_SETVBUF_REVERSED
AC_TYPE_SIGNAL
AC_FUNC_STAT
AC_FUNC_STRFTIME
AC_FUNC_UTIME_NULL
AC_FUNC_VPRINTF
AC_CHECK_FUNCS(gettimeofday memchr memset mkdir regcomp strcasecmp strchr)
AC_CHECK_FUNCS(strerror strncasecmp strpbrk strrchr strspn strstr stricmp utime)
AC_CHECK_FUNCS(link mktime syslog sprintf snprintf)
if ! test "x$ac_cv_func_snprintf" = xyes && \
! test "x$ac_cv_func_sprintf" = xyes; then
AC_MSG_ERROR(sprintf() or snprintf() required)
fi
dnl Redefine install scripts
INSTALL_DATA='${INSTALL} -m 640'
dnl Paths to major progs
AC_HEADER_MAJOR
AC_PATH_PROG(PERL, perl, no)
AC_PATH_PROG(PERL5, perl5, $PERL)
AC_PATH_PROG(ZIP, zip, no)
AC_PATH_PROG(RAR, rar, no)
AC_PATH_PROG(UNZIP, unzip, no)
AC_PATH_PROG(ARC, arc, no)
AC_PATH_PROG(LHA, lzh, no)
AC_PATH_PROG(UUDECODE, uudecode, no)
AM_ICONV
AS_IF([test x$am_func_iconv != xyes],
AC_MSG_ERROR([working iconv not found]))
config_vars=
# Check for a --with-logdir argument
AC_ARG_WITH(logdir, dnl
--with-logdir=DIR set fidogate log DIR,
[dnl
case "$with_logdir" in
yes) AC_MSG_ERROR([--with-logdir requires an argument; use --with-logdir=DIR]) ;;
''|no) ;;
*) logdir="$withval" ;;
esac
])
# Check for a --with-vardir argument
AC_ARG_WITH(vardir, dnl
--with-vardir=DIR set fidogate var DIR,
[dnl
case "$with_vardir" in
yes) AC_MSG_ERROR([--with-vardir requires an argument; use --with-vardir=DIR]) ;;
''|no) ;;
*) vardir="$withval" ;;
esac
])
# Check for a --with-lockdir argument
AC_ARG_WITH(lockdir, dnl
--with-lockdir=DIR set fidogate lock DIR,
[dnl
case "$with_lockdir" in
yes) AC_MSG_ERROR([--with-lockdir requires an argument; use --with-lockdir=DIR]) ;;
''|no) ;;
*) LOCKDIR="$withval" ;;
esac
])
# Check for a --with-spooldir argument
AC_ARG_WITH(spooldir, dnl
--with-spooldir=DIR set fidogate spool DIR,
[dnl
case "$with_spooldir" in
yes) AC_MSG_ERROR([--with-spooldir requires an argument; use --with-spooldir=DIR]) ;;
''|no) ;;
*) spooldir="$withval" ;;
esac
])
# Check for a --with-sysconfdir argument
AC_ARG_WITH(sysconfdir, dnl
--with-sysconfdir=DIR set fidogate config DIR,
[dnl
case "$with_sysconfdir" in
yes) AC_MSG_ERROR([--with-sysconfdir requires an argument; use --with-sysconfdir=DIR]) ;;
''|no) ;;
*) sysconfdir="$withval" ;;
esac
])
# Check for a --with-btbasedir argument
AC_ARG_WITH(btbasedir, dnl
--with-btbasedir=DIR set fidogate BTBASE DIR,
[dnl
case "$with_btbasedir" in
yes) AC_MSG_ERROR([--with-btbasedir requires an argument; use --with-btbasedir=DIR]) ;;
''|no);;
*) btbasedir="$withval"
;;
esac
])
if ! test "${btbasedir+set}" = set; then
btbasedir="${localstatedir}/spool/fido/bt"
fi
AC_SUBST(btbasedir)
# Check for a --with-netmaildir argument
AC_ARG_WITH(netmaildir, dnl
--with-netmaildir=DIR set fidogate NETMAIL DIR,
[dnl
case "$with_netmaildir" in
yes) AC_MSG_ERROR([--with-netmaildir requires an argument; use --with-netmaildir=DIR]) ;;
''|no);;
*) netmaildir="$withval"
;;
esac
])
if ! test "${netmaildir+set}" = set; then
netmaildir="${btbasedir}/netmail"
fi
AC_SUBST(netmaildir)
dnl# Check for a --with-newsbindir argument
AC_ARG_WITH(newsbindir, dnl
--with-newsbindir=DIR set INN bin directory; PATHBIN,
[dnl
case "$with_newsbindir" in
yes) AC_MSG_ERROR([--with-newsbindir requires an argument; use --with-newsbindir=DIR]) ;;
''|no) ;;
*) newsbindir="$withval" ;;
esac
])
AC_ARG_WITH([news],
[AS_HELP_STRING([--without-news], [build fidogate without news server])])
AC_ARG_WITH([inndir],
[AS_HELP_STRING([--with-inndir], [main INN directory; PATHNEWS])],
[],
[with_inndir=undefined])
AC_ARG_WITH([innetcdir],
[AS_HELP_STRING([--with-innetcdir], [INN etc directory; PATHETC])],
[],
[with_innetcdir=undefined])
AC_ARG_WITH([inndbdir],
[AS_HELP_STRING([--with-inndbdir], [INN db directory; PATHDB])],
[],
[with_inndbdir=undefined])
AC_ARG_WITH([innspooldir],
[AS_HELP_STRING([--with-innspooldir], [INN spool directory])],
[],
[with_innspooldir=undefined])
AC_ARG_ENABLE([oldbatcher],
[AS_HELP_STRING([--inn-disable-old-batcher], [disable old INN batcher])])
AC_ARG_WITH([rsf],
[AS_HELP_STRING([--without-rsf],
[build fidogate without runinc send_fidogate function])])
AC_ARG_WITH(sendmail, dnl
--with-sendmail=PATH Specify path to sendmail,
[dnl
case "$with_sendmail" in
yes|''|no) AC_MSG_ERROR([--with-sendmail requires an argument; use --with-sendmail=PATH]) ;;
*) SENDMAIL="$withval" ;;
esac
])
OWNER="news"
SRFC2FTN="rfc2ftn"
AC_ARG_WITH(owner, dnl
--with-owner=USER set possibility to run FIDOGATE from a USER,
[dnl
case "$with_owner" in
''|news|no)
withftnnews=false;;
*)
OWNER="$withval"
withftnnews=true
SRFC2FTN="ftnnews";;
esac
])
AM_CONDITIONAL(ftnnews, [test x$withftnnews = xtrue])
AC_SUBST(OWNER)
AC_SUBST(SRFC2FTN)
GROUP="news"
AC_ARG_WITH(group, dnl
--with-group=GROUP set possibility to run FIDOGATE from a GROUP,
[dnl
case "$with_group" in
''|news) ;;
*) GROUP="$withval" ;;
esac
])
AC_SUBST(GROUP)
AC_ARG_WITH(default-mailer,dnl
[--with-default-mailer=COMMAND default mailer comand],dnl
[ if test -n "$withval"; then
AC_DEFINE_UNQUOTED(DEFAULT_MAILER, "$withval",
[default mailer command])
fi
])
AC_ARG_ENABLE(local-ftn-addr,
[ --enable-local-ftn-addr use local FTN addres],dnl
[case "${enableval}" in
yes) enable_local_ftn_addr=yes ;;
no) enable_local_ftn_addr=no ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-local-ftn-addr) ;;
esac],dnl
enable_local_ftn_addr=no)
if test $enable_local_ftn_addr = yes; then
AC_DEFINE(LOCAL_FTN_ADDRESSES,
1,
[
Generate local FTN addresses, e.g.
user_name%[email protected]
instead of
])
fi
AC_ARG_ENABLE(dobsy-files,
[ --disable-dobsy-files create Binkley-style BSY],dnl
[case "${enableval}" in
yes | no) enable_dobsy_files="${enableval}" ;;
*) AC_MSG_ERROR(bad value ${enableval} for --disable-dobsy-files) ;;
esac],dnl
enable_dobsy_files=yes)
if test $enable_dobsy_files = yes; then
AC_DEFINE(DO_BSY_FILES,
1,
[Create Binkley-style BSY files for all outbound operations])
fi
AC_ARG_ENABLE(nfs-safe-lock,
[ --enable-nfs-safe-lock create lock files/BSY files in an NFS-safe way],dnl
[case "${enableval}" in
yes | no) enable_nfs_safe_lock="${enableval}" ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-nfs-safe-lock) ;;
esac],dnl
enable_nfs_safe_lock=no)
if test $enable_nfs_safe_lock = yes; then
AC_DEFINE(NFS_SAFE_LOCK_FILES,
1,
[Create lock files / BSY files in an NFS-safe way (see man 2 open)])
fi
MAXMSGSIZE=14000
AC_ARG_WITH(maxmsg-size,
[ --with-maxmsg-size=SIZE set max. message size for FIDO [14000]],
MAXMSGSIZE=$withval,)
AC_DEFINE_UNQUOTED(MAXMSGSIZE,
$MAXMSGSIZE,
[
Default max. message size for FIDO. Due to some more brain damage
in FIDONET programs we have to split larger messages into several
smaller ones. May be set with the -M option in AREAS or MaxMsgSize
in DEFAULT_CONFIG_GATE.
< 16 K -- 14000
< 32 K -- 30000
])
FTN_INVALID_DOMAIN="INVALID_FTN_ADDRESS"
AC_ARG_WITH(ftn-invalid-domain,
[ --with-ftn-invalid-domain=DOM set domain for invalid FTN addresses [INVALID_FTN_ADDRESS]],
FTN_INVALID_DOMAIN="$withval",)
AC_DEFINE_UNQUOTED(FTN_INVALID_DOMAIN,"$FTN_INVALID_DOMAIN",
[Domain for invalid FTN addresses])
SYSLOG_FACILITY=LOG_LOCAL0
AC_ARG_WITH(syslog-facility,
[ --with-syslog-facility=FAC set syslog facility [LOG_LOCAL0]],
SYSLOG_FACILITY=$withval,)
AC_DEFINE_UNQUOTED(FACILITY, $SYSLOG_FACILITY,
[
syslog facility used for logging if logfile == "syslog"
(only for HAS_SYSLOG defined)
])
CHARSET_STDFTN="cp866"
CHARSET_STDRFC="utf-8"
CHARSET_STD7BIT="us-ascii"
AC_ARG_WITH(ftn-charset,
[ --with-ftn-charset=CHS set default assumed charset for Fido messages [cp866] ],
CHARSET_STDFTN="$withval",)
AC_DEFINE_UNQUOTED(CHARSET_STDFTN, "$CHARSET_STDFTN",
[Default assumed charset for Fido messages (see also DefaultCharset)])
AC_ARG_WITH(rfc-charset,
[ --with-rfc-charset=CHS set default assumed charset for RFC messages if without MIME headers [koi8-r]],
CHARSET_STDRFC="$withval",)
AC_DEFINE_UNQUOTED(CHARSET_STDRFC, "$CHARSET_STDRFC",
[Default assumed charset for RFC messages if without MIME headers])
AC_ARG_WITH(7bit-charset,
[ --with-7bit-charset=CHS set default charset for RFC messages with forced 7bit encoding [us-ascii]],
CHARSET_STD7BIT="$withval",)
AC_DEFINE_UNQUOTED(CHARSET_STD7BIT, "$CHARSET_STD7BIT",
[Default charset for RFC messages with forced 7bit encoding])
AREAFIXMAXSTR=150
AC_ARG_WITH(afix-maxstr,
[ --with-afix-maxstr=AFS set maximum strings in areafix reports [150] ],AREAFIXMAXSTR=$withval,)
AC_DEFINE_UNQUOTED(AREAFIXMAXSTR,$AREAFIXMAXSTR,
[AFS set maximum strings in areafix reports])
AC_ARG_ENABLE(aliases-local,
[ --enable-aliases-local rewrite addresses found in ALIASES so that the sender's address is the gateway address],dnl
[case "${enableval}" in
yes | no) enable_aliases_local="${enableval}" ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-aliases-local) ;;
esac],dnl
enable_aliases_local=no)
if test $enable_aliases_local = yes; then
AC_DEFINE(ALIASES_ARE_LOCAL,
1,
[
Rewrite addresses found in ALIASES so that the sender's address is the
gateway address. The reverse direction requires suitable MTA aliases.
])
fi
AC_ARG_ENABLE(ai1,
[ --enable-ai1 Add -a option to HOSTS entries, useful only with PASSTHRU NET/ECHOMAIL],dnl
[case "${enableval}" in
yes | no) enable_ai1="${enableval}" ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-ai1) ;;
esac],dnl
enable_ai1=no)
if test $enable_ai1 = yes; then
AC_DEFINE(AI_1,
1,
[Add -a option to HOSTS entries, useful only with PASSTHRU_NET/ECHOMAIL])
fi
AC_ARG_ENABLE(best-aka,
[ --disable-best-aka disable best AKA select],dnl
[case "${enableval}" in
yes | no) enable_best_aka="${enableval}" ;;
*) AC_MSG_ERROR(bad value ${enableval} for --disable-best-aka) ;;
esac],dnl
enable_best_aka=no)
if test $enable_best_aka = yes; then
AC_DEFINE(BEST_AKA,
1,
[Enable best AKA select])
fi
AC_ARG_ENABLE(ftnacl,
[ --disable-ftnacl do'nt use ACL for FTN links ],dnl
[case "${enableval}" in
yes | no) enable_ftnacl="${enableval}" ;;
*) AC_MSG_ERROR(bad value ${enableval} for --disable-ftnacl) ;;
esac],dnl
enable_ftnacl=no)
if test $enable_ftnacl = yes; then
AC_DEFINE(FTN_ACL,
1,
[Enable ACL for FTN links])
fi
AC_ARG_WITH(desc-dir,
[ --with-desc-dir=DIR put file descriptions into ".desc/%s.desc" file instead of files.bbs],
DESC_DIR="$withval",DESC_DIR=".desc")
AC_ARG_ENABLE(desc-dir,
[ --disable-desc-dir put file descriptions into files.bbs],dnl
[case "${enableval}" in
yes | no) enable_desc_dir="${enableval}" ;;
*) AC_MSG_ERROR(bad value ${enableval} for --disable-desc-dir) ;;
esac],dnl
enable_desc_dir=yes)
if test $enable_desc_dir = yes; then
AC_DEFINE_UNQUOTED(DESC_DIR,
"$DESC_DIR",[
Put file descriptions into `.desc/%s.desc' file instead of files.bbs
.../fileecho/.desc/file.zip.desc -> ".desc",
.../fileecho/file.zip.desc ""
])
fi
AC_ARG_ENABLE(recode-file-desc,
[ --disable-recode-file-desc disable recode file descriptions],dnl
[case "${enableval}" in
yes | no) enable_recode_file_desc="${enableval}" ;;
*) AC_MSG_ERROR(bad value ${enableval} for --disable-recode-file-desc) ;;
esac],dnl
enable_recode_file_desc=yes)
if test $enable_recode_file_desc = yes; then
AC_DEFINE(RECODE_FILE_DESC,
1,
[Recode file descriptions])
fi
AC_ARG_ENABLE(af-avail,
[ --disable-af-avail change behaviour of areafix command "%list" and "%avail" ],dnl
[case "${enableval}" in
yes | no) enable_af_afail="${enableval}" ;;
*) AC_MSG_ERROR(bad value ${enableval} for --disable-af-afail) ;;
esac],dnl
enable_af_afail=yes)
if test $enable_af_afail = yes; then
AC_DEFINE(AF_AVAIL,
1,[
Enable areafix command `%avail', change behaviour of areafix
command `%list'
])
fi
AC_ARG_ENABLE(xff-echomail,
[ --disable-xff-echomail add X-FTN-From header to gated echomail],dnl
[case "${enableval}" in
yes | no) enable_xff_echomail="${enableval}" ;;
*) AC_MSG_ERROR(bad value ${enableval} for --disable-xff-echomail) ;;
esac],dnl
enable_xff_echomail=yes)
if test $enable_xff_echomail = yes; then
AC_DEFINE(X_FTN_FROM_ECHOMAIL,
1,
[Add `X-FTN-From' header in gated echomail.])
fi
AC_ARG_ENABLE(spyes,
[ --disable-spyes use SPYES config],dnl
[case "${enableval}" in
yes | no) enable_spyes="${enableval}" ;;
*) AC_MSG_ERROR(bad value ${enableval} for --disable-spyes) ;;
esac],dnl
enable_spyes=yes)
if test $enable_spyes = yes; then
AC_DEFINE(SPYES,
1,
[Added the feature "spy forwards".])
fi
AC_ARG_ENABLE(aflr,
[ --disable-aflr restricted access to areafix command %listall],dnl
[case "${enableval}" in
yes | no) enable_aflr="${enableval}" ;;
*) AC_MSG_ERROR(bad value ${enableval} for --disable-aflr) ;;
esac],dnl
enable_aflr=yes)
if test $enable_aflr = yes; then
AC_DEFINE(AF_LISTALL_RESTRICTED,
1,
[Restricted access to areafix command `%listall'])
fi
AC_ARG_ENABLE(fecho-pass,
[ --disable-fecho-pass use passthrought filearea],dnl
[case "${enableval}" in
yes | no) enable_fecho_pass="${enableval}" ;;
*) AC_MSG_ERROR(bad value ${enableval} for --disable-fecho-pass) ;;
esac],dnl
enable_fecho_pass=yes)
if test $enable_fecho_pass = yes; then
AC_DEFINE(FECHO_PASSTHROUGHT,
1,
[Enable passthrought filearea])
fi
AC_ARG_ENABLE(use-filebox,
[ --disable-use-filebox use fileboxes for fileecho],dnl
[case "${enableval}" in
yes | no) enable_use_filebox="${enableval}" ;;
*) AC_MSG_ERROR(bad value ${enableval} for --disable-use-filebox) ;;
esac],dnl
enable_use_filebox=yes)
if test $enable_use_filebox = yes; then
AC_DEFINE(USE_FILEBOX,
1,
[Enable if use fileboxes for fileecho])
fi
AC_ARG_ENABLE(tick-crc,
[ --disable-tick-crc ftntick CRC control],dnl
[case "${enableval}" in
yes | no) enable_tick_crc="${enableval}" ;;
*) AC_MSG_ERROR(bad value ${enableval} for --disable-tick-crc) ;;
esac],dnl
enable_tick_crc=yes)
if test $enable_tick_crc = yes; then
AC_DEFINE(FTNTICK_NOCRC,
1,
[Enable if no ftntick CRC control])
fi
AC_ARG_ENABLE(no-organization,
[ --enable-no-organization enable if no insert Origin line if it absence],dnl
[case "${enableval}" in
yes | no) enable_no_organization="${enableval}" ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-no-organization) ;;
esac],dnl
enable_no_organization=no)
if test $enable_no_organization = yes; then
AC_DEFINE(NOINSERT_ORGANIZATION,
1,
[Enable if no insert Origin line if it absence])
fi
AC_ARG_ENABLE(insecure-not-db,
[ --disable-insecure-not-db put insecure mail into dupe database],
[case "${enableval}" in
yes | no) enable_insecure_not_db="${enableval}" ;;
*) AC_MSG_ERROR(bad value ${enableval} for --disable-insecure-not-db) ;;
esac],dnl
enable_insecure_not_db=yes)
if test $enable_insecure_not_db = yes; then
AC_DEFINE(INSECURE_DONT_PUT_INTO_DUPE_DB,
1,
[Don't put insecure mail into dupe database])
fi
AC_ARG_ENABLE(af-ansok,
[ --enable-af-ansok change areafix answering to "ok" if subscribing],dnl
[case "${enableval}" in
yes | no) enable_af_ansok="${enableval}" ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-af-ansok) ;;
esac],dnl
enable_af_ansok=no)
if test $enable_af_ansok = yes; then
AC_DEFINE(ANSWER_OK,
1,
[Change areafix answer when subscibing to area from `subscribe' to `ok'.])
fi
AC_ARG_ENABLE(afses,
[ --enable-afses areafix send echo status],dnl
[case "${enableval}" in
yes | no) enable_afses="${enableval}" ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-afses) ;;
esac],dnl
enable_afses=no)
if test $enable_afses = yes; then
AC_DEFINE(AFSEND_ECHO_STATUS,
1,
[Enable areafix send echo status])
fi
AC_ARG_ENABLE(sub-zonegate,
[ --enable-sub-zonegate subscribe only zonegate],dnl
[case "${enableval}" in
yes) enable_sub_zonegate=yes ;;
no) enable_sub_zonegate=no ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-sub-zonegate) ;;
esac],dnl
enable_sub_zonegate=no)
if test $enable_sub_zonegate = yes; then
AC_DEFINE(SUBSCRIBE_ZONEGATE,
1,
[Enable subscribe autorization only if node listed in zonegate])
fi
AC_ARG_ENABLE(pid2rd-tid2gtv,
[ --enable-pid2rd-tid2gtv paste ^PID & ^TID kludges to message],dnl
[case "${enableval}" in
yes) enable_pid2rd_tid2gtv=yes ;;
no) enable_pid2rd_tid2gtv=no ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-pid2rd-tid2gtv) ;;
esac],dnl
enable_pid2rd_tid2gtv=no)
if test $enable_pid2rd_tid2gtv = yes; then
AC_DEFINE(PID_READER_TID_GTV,
1,
[Enable paste ^PID (mail or news reader name)
and ^TID (fidogate version) kludge])
fi
AC_ARG_ENABLE(dnt-netmail,
[ --enable-dnt-netmail do not toss netmail],dnl
[case "${enableval}" in
yes) enable_dnt_netmail=yes ;;
no) enable_dnt_netmail=no ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-dnt-netmail) ;;
esac],dnl
enable_dnt_netmail=no)
if test $enable_dnt_netmail = yes; then
AC_DEFINE(DO_NOT_TOSS_NETMAIL,
1,
[Disable tosting netmail and set directory for incoming and outgoing pkt's])
fi
AC_ARG_ENABLE(owfl,
[ --disable-owfl overwrite fileecho link],dnl
[case "${enableval}" in
yes) enable_owfl=yes ;;
no) enable_owfl=no ;;
*) AC_MSG_ERROR(bad value ${enableval} for --disable-owfl) ;;
esac],dnl
enable_owfl=yes)
if test $enable_owfl = yes; then
AC_DEFINE(OVERWRITEN_FECHO_FILE_TO_LINK,
1,
[Enable overwrite hardlink if file already exist])
fi
AC_ARG_ENABLE(active-lookup,
[ --disable-active-lookup active file lookup],dnl
[case "${enableval}" in
yes) enable_active_lookup=yes ;;
no) enable_active_lookup=no ;;
*) AC_MSG_ERROR(bad value ${enableval} for --disable-active-lookup) ;;
esac],dnl
enable_active_lookup=yes)
if test $enable_active_lookup = yes; then
AC_DEFINE(ACTIVE_LOOKUP,1,[Enable lookup to INN active file])
fi
AC_ARG_ENABLE(recode-allrfc,
[ --disable-recode-allrfc recoding some RFC header],
[case "${enableval}" in
yes) enable_recode_allrfc=yes ;;
no) enable_recode_allrfc=no ;;
*) AC_MSG_ERROR(bad value ${enableval} for --disable-recode-allrfc) ;;
esac],
enable_recode_allrfc=yes)
if test $enable_recode_allrfc = yes; then
AC_DEFINE(RECODE_ALL_RFC,1,[Recode all RFC headers])
fi
AC_ARG_ENABLE(security,
[ --disable-security disable additional address checking],dnl
[case "${enableval}" in
yes | no) enable_security="${enableval}" ;;
*) AC_MSG_ERROR(bad value ${enableval} for --disable-security) ;;
esac],dnl
enable_security=yes)
if test $enable_security = yes; then
AC_DEFINE(SECURITY,
1,
[
For the security reason enabled additional addresses checking in the
.pkt header, message header, origin and echomail ^aPATH.
If the last address in PATH is not equal to address in the pkt header,
then the address from the pkt header is inserted into PATH.
])
fi
AC_ARG_ENABLE(fts-via,
[ --disable-fts-via disable FTS format of VIA],dnl
[case "${enableval}" in
yes | no) enable_fts_via="${enableval}" ;;
*) AC_MSG_ERROR(bad value ${enableval} for --disable-fts-via) ;;
esac],dnl
enable_fts_via=yes)
if test $enable_fts_via = yes; then
AC_DEFINE(FTS_VIA,
1,
[
Change ^AVia format from:
^AVia FIDOGATE/ftntoss 2:5030/1229.0, 20010405.164323.MSK
to:
^AVia 2:5030/1229.0 @20010405.164323.MSK FIDOGATE/ftntoss
])
fi
AC_ARG_ENABLE(create-log-forwreq,
[ --enable-create-log-forwreq use msgid correspond data base],dnl
[case "${enableval}" in
yes | no) enable_create_log_forwreq="${enableval}" ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-create-log-forwreq) ;;
esac],dnl
enable_create_log_forwreq=no)
if test $enable_create_log_forwreq = yes; then
AC_DEFINE(CREATE_LOG_FORWREQ,
1,
[Don't put info about create to log
if echo created by forward request])
fi
AC_ARG_ENABLE(del-mime-if-rfc2,
[ --enable-del-mime-if-rfc2 delete MIME if rfc status set to 2],dnl
[case "${enableval}" in
yes | no) enable_del_mime_if_rfc2="${enableval}" ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-del-mime-if-rfc2) ;;
esac],dnl
enable_del_mime_if_rfc2=no)
if test $enable_del_mime_if_rfc2 = yes; then
AC_DEFINE(DEL_MIME_IF_RFC2,
1,
[Delete MIME if rfc status set to 2])
fi
AC_ARG_ENABLE(domain-to-origin,
[ --enable-domain-to-origin paste domain name to Origin message line],dnl
[case "${enableval}" in
yes | no) enable_domain_to_origin="${enableval}" ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-domain-to-origin) ;;
esac],dnl
enable_domain_to_origin=no)
if test $enable_domain_to_origin = yes; then
AC_DEFINE(DOMAIN_TO_ORIGIN,
1,
[Paste domain name to Origin message line])
fi
AC_ARG_ENABLE(do-not-toss-netmail,
[ --enable-do-not-toss-netmail disable tosting netmail and set directory for incoming and outgoing pkt's],dnl
[case "${enableval}" in
yes | no) enable_do_not_toss_netmail="${enableval}" ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-do-not-toss-netmail) ;;
esac],dnl
enable_do_not_toss_netmail=no)
if test $enable_do_not_toss_netmail = yes; then
AC_DEFINE(DO_NOT_TOSS_NETMAIL,
1,
[Disable tosting netmail and set directory
for incoming and outgoing pkt's])
fi
AC_ARG_ENABLE(sub-limit,
[ --disable-sub-limit disable set limit for subscribe areas],dnl
[case "${enableval}" in
yes | no) enable_sub_limit="${enableval}" ;;
*) AC_MSG_ERROR(bad value ${enableval} for --disable-sub-limit) ;;
esac],dnl
enable_sub_limit=yes)
if test $enable_sub_limit = yes; then
AC_DEFINE(SUB_LIMIT,
1,
[Enable set limit for subscribe areas])
fi
AC_ARG_ENABLE(fix-bad-pkt-year,
[ --enable-fix-bad-pkt-year fix bad year in pkt's],dnl
[case "${enableval}" in
yes | no) enable_fix_bad_pkt_year="${enableval}" ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-fix-bad-pkt-year) ;;
esac],dnl
enable_fix_bad_pkt_year=no)
if test $enable_fix_bad_pkt_year = yes; then
AC_DEFINE(FIX_BAD_PKT_YEAR,
1,
[Fix bad year in pkt's])
fi
AC_ARG_ENABLE(ignore-from-if-reply,
[ --enable-ignore-from-if-reply ignore From: field if REPLYTO or REPLYADDR was found],dnl
[case "${enableval}" in
yes | no) enable_ignore_from_if_reply="${enableval}" ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-ignore-from-if-reply) ;;
esac],dnl
enable_ignore_from_if_reply=no)
if test $enable_ignore_from_if_reply = yes; then
AC_DEFINE(IGNORE_FROM_IF_REPLY,
1,
[Ignore From: field if REPLYTO or REPLYADDR was found])
fi
AC_ARG_ENABLE(insert-origin,
[ --enable-insert-origin if Origin line is not present, include link address],dnl
[case "${enableval}" in
yes | no) enable_insert_origin="${enableval}" ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-insert-origin) ;;
esac],dnl
enable_insert_origin=no)
if test $enable_insert_origin = yes; then
AC_DEFINE(INSERT_ORIGIN,
1,
[If Origin line is not present, include link address])
fi
AC_ARG_ENABLE(old-toss,
[ --enable-old-toss enable old style tosting],dnl
[case "${enableval}" in
yes | no) enable_old_toss="${enableval}" ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-old-toss) ;;
esac],dnl
enable_old_toss=no)
if test $enable_old_toss = yes; then
AC_DEFINE(OLD_TOSS,
1,
[Enable old style tosting])
fi
AC_ARG_ENABLE(passthru-netmail,
[ --enable-passthru-netmail passthru operation for NetMail: FIDO->Internet->FIDO],dnl
[case "${enableval}" in
yes | no) enable_passthru_netmail="${enableval}" ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-passthru-netmail) ;;
esac],dnl
enable_passthru_netmail=no)
if test $enable_passthru_netmail = yes; then
AC_DEFINE(PASSTHRU_NETMAIL,
1,
[Passthru operation for NetMail: FIDO->Internet->FIDO])
fi
AC_ARG_ENABLE(passthru-echomail,
[ --enable-passthru-echomail passthru operation for EchoMail: FIDO->Internet->FIDO],dnl
[case "${enableval}" in
yes | no) enable_passthru_echomail="${enableval}" ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-passthru-echomail) ;;
esac],dnl
enable_passthru_echomail=no)
if test $enable_passthru_echomail = yes; then
AC_DEFINE(PASSTHRU_ECHOMAIL,
1,
[Passthru operation for EchoMail: FIDO->Internet->FIDO])
fi
AC_ARG_ENABLE(sn,
[ --enable-sn enable SN-style active_lookup],dnl
[case "${enableval}" in
yes | no) enable_sn="${enableval}" ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-sn) ;;
esac],dnl
enable_sn=no)
if test $enable_sn = yes; then
AC_DEFINE(SN,
1,
[Enable SN-style active_lookup])
fi
AC_ARG_ENABLE(syslog,
[ --enable-syslog enable if you want use syslog for log messages],
[case "${enableval}" in
yes | no) enable_syslog="${enableval}" ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-syslog) ;;
esac],dnl
enable_syslog=no)
if test $enable_syslog = yes; then
AC_DEFINE(USE_SYSLOG,
1,
[Enable if you want use syslog for log messages])
fi
XCT="xct"
AC_SUBST(XCT)
AC_ARG_ENABLE(xct,
[ --enable-xct enable X-Comment-To wrapper for inn batches],
[case "${enableval}" in
yes | no) enable_xct="${enableval}" ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-xct) ;;
esac],dnl
enable_xct=no)
if test $enable_xct = yes; then
AC_DEFINE(USE_XCT,
1,
[Enable if you want to add To header for FTN messages when gating rfc2ftn])
fi
dnl Libraries
AC_SEARCH_LIBS(regcomp, rx regex, [
AC_DEFINE(HAS_POSIX_REGEX,[],[Do we have a decent regex library?])
AC_CHECK_HEADER(rxposix.h, AC_DEFINE(HAVE_RX,[],[Do we have rxposix.h?]))])
if test "$with_news" != no ;then
AS_IF([test "x$enable_oldbatcher" != "xno"], [
AS_IF([test "x$enable_xct" = "xyes"], [
BATCHER='time $PATHBIN/batcher -N $QUEUEJOBS -b500000 -p"$XCT|$RFC2FTN -b -n" $SITE $BATCHFILE' ],
[BATCHER='time $PATHBIN/batcher -N $QUEUEJOBS -b500000 -p"$RFC2FTN -b -n" $SITE $BATCHFILE' ])],
[BATCHER='time $RFC2FTN -f $BATCHFILE -m 500'])
# MY CHECK IF
AS_CASE([$with_inndir],
[yes|no], [
AC_MSG_ERROR([--with-inndir requires an argument; use --with-inndir=PATH])],
[undefined], [PATHNEWS=""],
[PATHNEWS="$with_inndir"
AS_IF([test "$with_newsbindir" != "no"],
[ PATHBIN=$with_newsbindir ],
[ PATHBIN="$PATHNEWS/bin" ])
NEWSLIBDIR=$PATHNEWS
RNEWS="$PATHBIN/rnews"
INEWS="$PATHBIN/inews"
])
#MY CHECK CASE
AS_CASE([$with_innetcdir],
[yes|no], [
AC_MSG_ERROR([--with-innetcdir requires an argument; use --with-innetcdir=PATH])],
[undefined], [PATHETC=""],
[PATHETC="$with_innetcdir"])
AS_CASE([$with_inndbdir],
[yes|no], [
AC_MSG_ERROR([--with-inndbdir requires an argument; use --with-inndbdir=PATH])],
[undefined], [PATHDB=""],
[PATHDB="$with_inndbdir"])
AS_CASE([$with_innspooldir],