forked from holger24/AFD
-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.ac
1842 lines (1697 loc) · 62.5 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.59])
AC_INIT([afd],[1.4.13],[[email protected]])
AC_CONFIG_SRCDIR(src/init_afd/afd.c)
AC_CONFIG_AUX_DIR(ac-tools)
dnl# AC_PREFIX_DEFAULT("/usr/local/afd")
dnl# [no-dependencies dist-bzip2]
AM_INIT_AUTOMAKE([dist-bzip2 subdir-objects])
AC_CONFIG_HEADERS([config.h:ac-tools/config.h.in])
AC_USE_SYSTEM_EXTENSIONS
AM_SILENT_RULES([yes])
REQUIRES=""
BUILD_REQUIRES=""
BUILD_REQUIRES_REDHAT=""
AFD_VERSION="$VERSION"
AC_SUBST(AFD_VERSION)
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[long long i;]])],[AC_DEFINE(HAVE_LONG_LONG, 1, Define if C compiler supports long long type.)],[])
compile_alda=false
dnl# --------------------------------------------------------------------------
dnl# Checking Configure Command Line Options
dnl# --------------------------------------------------------------------------
AC_ARG_ENABLE(input_log,
[ --disable-input_log disable input_log support],
[AM_CONDITIONAL(WITH_INPUT_LOG, false)
ac_cv_input_log=""],
[AC_DEFINE([_INPUT_LOG], [], [With input log support])
ac_cv_input_log="INPUT "
compile_alda=true
AM_CONDITIONAL(WITH_INPUT_LOG, true)])
AC_ARG_ENABLE(distribution_log,
[ --disable-distribution_log disable distribution_log support],
[AM_CONDITIONAL(WITH_DISTRIBUTION_LOG, false)
ac_cv_distribution_log=""],
[AC_DEFINE([_DISTRIBUTION_LOG], [], [With distribution log support])
ac_cv_distribution_log="DISTRIBUTION "
AM_CONDITIONAL(WITH_DISTRIBUTION_LOG, true)])
AC_ARG_ENABLE(output_log,
[ --disable-output_log disable output_log support],
[AM_CONDITIONAL(WITH_OUTPUT_LOG, false)
ac_cv_output_log=""],
[AC_DEFINE([_OUTPUT_LOG], [], [With output log support])
ac_cv_output_log="OUTPUT "
compile_alda=true
AM_CONDITIONAL(WITH_OUTPUT_LOG, true)])
AC_ARG_ENABLE(confirmation_log,
[ --enable-confirmation_log enable confirmation_log support],
[AC_DEFINE([_CONFIRMATION_LOG], [], [With confirmation log support])
ac_cv_confirmation_log="CONFIRMATION "
AM_CONDITIONAL(WITH_CONFIRMATION_LOG, true)],
[AM_CONDITIONAL(WITH_CONFIRMATION_LOG, false)
ac_cv_confirmation_log=""])
AC_ARG_ENABLE(delete_log,
[ --disable-delete_log disable delete_log support],
[AM_CONDITIONAL(WITH_DELETE_LOG, false)
ac_cv_delete_log=""],
[AC_DEFINE([_DELETE_LOG], [], [With delete log support])
ac_cv_delete_log="DELETE "
compile_alda=true
AM_CONDITIONAL(WITH_DELETE_LOG, true)])
AC_ARG_ENABLE(production_log,
[ --disable-production_log disable production_log support],
[AM_CONDITIONAL(WITH_PRODUCTION_LOG, false)
ac_cv_production_log=""],
[AC_DEFINE([_PRODUCTION_LOG], [], [With production log support])
ac_cv_production_log="PRODUCTION "
compile_alda=true
AM_CONDITIONAL(WITH_PRODUCTION_LOG, true)])
AC_ARG_ENABLE(maintainer_log,
[ --enable-maintainer_log enable maintainer_log support],
[AC_DEFINE([_MAINTAINER_LOG], [], [With maintainer log support])
ac_cv_maintainer_log="MAINTAINER "
AM_CONDITIONAL(WITH_MAINTAINER_LOG, true)],
[AM_CONDITIONAL(WITH_MAINTAINER_LOG, false)
ac_cv_maintainer_log=""])
AC_ARG_ENABLE(transfer_rate_log,
[ --enable-transfer_rate_log enable transfer_rate_log support],
[AC_DEFINE([_TRANSFER_RATE_LOG], [], [With transfer_rate_log support])
ac_cv_transfer_rate_log="TRANSFER_RATE "
AM_CONDITIONAL(WITH_TRANSFER_RATE_LOG, true)],
[AM_CONDITIONAL(WITH_TRANSFER_RATE_LOG, false)
ac_cv_transfer_rate_log=""])
AC_ARG_ENABLE(alda_cache_positioning,
[ --disable-alda_cache_positioning disable ALDA cache positioning support],
[AC_DEFINE([WITH_LOG_CACHE], [], [With ALDA cache positioning support])
ac_cv_alda_cache="ALDA-Cache "
AM_CONDITIONAL(WITH_ALDA_CACHE_POSITIONING, true)],
[AM_CONDITIONAL(WITH_ALDA_CACHE_POSITIONING, false)
ac_cv_alda_cache=""])
AM_CONDITIONAL(WITH_ALDA, $compile_alda)
AC_ARG_ENABLE(ncurses_ui,
[ --disable-ncurses_ui disable nCurses support],
[ac_cv_ncurses_ui="no"],
[ac_cv_ncurses_ui="yes "])
AC_ARG_ENABLE(sse42,
[ --disable-sse42 disable SSE4.2 optimizations],
[ac_cv_allow_sse42="no"],
[ac_cv_allow_sse42="yes"])
AC_ARG_ENABLE(inotify,
[ --disable-inotify disable inotify support],
[ac_cv_allow_inotify="no"],
[ac_cv_allow_inotify="yes"])
AC_ARG_ENABLE(new_motif_name,
[ --disable-new_motif_name when motif is required sets package name to openmotif],
[ac_cv_new_motif_name="openmotif"],
[ac_cv_new_motif_name="motif"])
AC_ARG_ENABLE(error_queue,
[ --disable-error_queue disable error_queue support],
[AM_CONDITIONAL(ERROR_QUEUE_SUPPORT, false)
ac_cv_error_queue="no"],
[AC_DEFINE([WITH_ERROR_QUEUE], [], [With error queue support])
ac_cv_error_queue="yes"
AM_CONDITIONAL(ERROR_QUEUE_SUPPORT, true)])
AC_ARG_ENABLE(fifo_rw_support,
[ --disable-fifo_rw_support disable opening fifo for RW],
[AM_CONDITIONAL(WITH_FIFO_RW_SUPPORT, false)
AC_DEFINE([WITHOUT_FIFO_RW_SUPPORT], [], [Without fifo RW support])
ac_cv_fifo_rw_support="no"],
[ac_cv_fifo_rw_support="yes"
AM_CONDITIONAL(WITH_FIFO_RW_SUPPORT, true)])
AC_ARG_ENABLE(wmo_support,
[ --disable-wmo_support disable WMO socket support],
[AM_CONDITIONAL(WITH_WMO_SUPPORT, false)
ac_cv_wmo_support=""],
[AC_DEFINE([_WITH_WMO_SUPPORT], [], [With WMO socket support])
ac_cv_wmo_support="WMO "
AM_CONDITIONAL(WITH_WMO_SUPPORT, true)])
AC_ARG_ENABLE(loc_support,
[ --disable-loc_support disable support for copying files locally],
[AM_CONDITIONAL(WITH_LOC_SUPPORT, false)
ac_cv_loc_support=""],
[AC_DEFINE([_WITH_LOC_SUPPORT], [], [With support for copying files locally])
ac_cv_loc_support="LOC "
AM_CONDITIONAL(WITH_LOC_SUPPORT, true)])
AC_ARG_ENABLE(fd_exec_support,
[ --disable-fd_exec_support disable support for transmitting files via external program],
[AM_CONDITIONAL(WITH_FD_EXEC_SUPPORT, false)
ac_cv_fd_exec_support=""],
[AC_DEFINE([_WITH_FD_EXEC_SUPPORT], [], [With support for transmitting files via external program])
ac_cv_fd_exec_support="EXEC "
AM_CONDITIONAL(WITH_FD_EXEC_SUPPORT, true)])
AC_ARG_ENABLE(ftp_support,
[ --disable-ftp_support disable FTP support],
[AM_CONDITIONAL(WITH_FTP_SUPPORT, false)
ac_cv_ftp_support=""],
[AC_DEFINE([_WITH_FTP_SUPPORT], [], [With FTP support])
ac_cv_ftp_support="FTP "
AM_CONDITIONAL(WITH_FTP_SUPPORT, true)])
AC_ARG_ENABLE(scp_support,
[ --disable-scp_support disable SCP support],
[AM_CONDITIONAL(WITH_SCP_SUPPORT, false)
ac_cv_scp_support=""],
[AC_DEFINE([_WITH_SCP_SUPPORT], [], [With SCP support])
ac_cv_scp_support="SCP "
AM_CONDITIONAL(WITH_SCP_SUPPORT, true)])
AC_ARG_ENABLE(smtp_support,
[ --disable-smtp_support disable SMTP support],
[AM_CONDITIONAL(WITH_SMTP_SUPPORT, false)
ac_cv_smtp_support=""],
[AC_DEFINE([_WITH_SMTP_SUPPORT], [], [With SMTP support])
ac_cv_smtp_support="SMTP "
AM_CONDITIONAL(WITH_SMTP_SUPPORT, true)])
AC_ARG_ENABLE(http_support,
[ --disable-http_support disable HTTP support],
[AM_CONDITIONAL(WITH_HTTP_SUPPORT, false)
ac_cv_http_support=""],
[AC_DEFINE([_WITH_HTTP_SUPPORT], [], [With HTTP support])
ac_cv_http_support="HTTP "
AM_CONDITIONAL(WITH_HTTP_SUPPORT, true)])
AC_ARG_ENABLE(sftp_support,
[ --disable-sftp_support disable SFTP support],
[AM_CONDITIONAL(WITH_SFTP_SUPPORT, false)
ac_cv_sftp_support=""],
[AC_DEFINE([_WITH_SFTP_SUPPORT], [], [With SFTP support])
ac_cv_sftp_support="SFTP "
AM_CONDITIONAL(WITH_SFTP_SUPPORT, true)])
AC_ARG_ENABLE(html_gui,
[ --enable-html_gui enable HTML gui],
[AM_CONDITIONAL(WITH_HTML_GUI, true)
ac_cv_html_gui="yes"],
[ac_cv_html_gui="no"
AM_CONDITIONAL(WITH_HTML_GUI, false)])
AC_ARG_ENABLE(ip_database,
[ --enable-ip_database enable internal IP database],
[AM_CONDITIONAL(WITH_IP_DATABASE, true)
AC_DEFINE([WITH_IP_DB], [], [With internal IP database])
ac_cv_ip_database="yes"],
[ac_cv_ip_database="no"
AM_CONDITIONAL(WITH_IP_DATABASE, false)])
AC_ARG_ENABLE(onetime_support,
[ --enable-onetime_support enable support for onetime jobs],
[AM_CONDITIONAL(WITH_ONETIME_SUPPORT, true)
AC_DEFINE([WITH_ONETIME], [], [With onetime support])
ac_cv_onetime_support="yes"],
[ac_cv_onetime_support="no"
AM_CONDITIONAL(WITH_ONETIME_SUPPORT, false)])
AC_ARG_ENABLE(dupcheck_support,
[ --disable-dupcheck_support disable duplicate check support],
[AM_CONDITIONAL(WITHOUT_DUPCHECK, true)
ac_cv_dupcheck_support="no"],
[AC_DEFINE([WITH_DUP_CHECK], [], [With duplicate check support])
ac_cv_dupcheck_support="yes"
AM_CONDITIONAL(WITHOUT_DUPCHECK, false)])
AC_ARG_ENABLE(trans_exec,
[ --disable-trans_exec disable trans_exec support],
[AM_CONDITIONAL(WITH_TRANS_EXEC, false)
ac_cv_trans_exec="no"],
[AC_DEFINE([_WITH_TRANS_EXEC], [], [With trans_exec support])
ac_cv_trans_exec="yes "
AM_CONDITIONAL(WITH_TRANS_EXEC, true)])
AC_ARG_ENABLE(largefile,
[ --disable-largefile disable large file support],
[ac_cv_largefile="$enableval"],
[ac_cv_largefile="yes"])
AC_ARG_ENABLE(verify_fsa,
[ --disable-verify_fsa disable verify_fsa support],
[if test x$enableval = xyes; then
AC_DEFINE([_VERIFY_FSA], [], [With verify FSA support])
fi],
[AC_DEFINE([_VERIFY_FSA], [], [With verify FSA support])])
AC_ARG_ENABLE(ignore_duplicate_jobs,
[ --disable-ignore_duplicate_jobs disable ignoring duplicate job entries],
[if test x$enableval = xyes; then
AC_DEFINE([IGNORE_DUPLICATE_JOB_IDS], [], [With ignoring duplicate jobs])
fi],
[AC_DEFINE([IGNORE_DUPLICATE_JOB_IDS], [], [With ignoring duplicate jobs])])
AC_ARG_ENABLE(with_ctrl_accelerator,
[ --enable-with_ctrl_accelerator use ctrl key as accelerator],
[if test x$enableval = xyes; then
AC_DEFINE([WITH_CTRL_ACCELERATOR], [], [Use ctrl key as accelerator])
fi])
AC_ARG_ENABLE(with_archive_copy_info,
[ --enable-with_archive_copy_info inform when files are copied when archived],
[if test x$enableval = xyes; then
AC_DEFINE([WITH_ARCHIVE_COPY_INFO], [], [Inform when files are copied when archived])
fi])
AC_ARG_ENABLE(error_offline_for_new_host,
[ --enable-error_offline_for_new_host new host have error offline set],
[if test x$enableval = xyes; then
AC_DEFINE([ERROR_OFFLINE_FOR_NEW_HOST], [], [New host have error offline set])
fi])
AC_ARG_ENABLE(with_afdbench_settings,
[ --enable-with_afdbench_settings enables settings for running afdbench],
[AC_DEFINE([AFDBENCH_CONFIG], [], [Enables settings for running afdbench])
ac_cv_with_afdbench_settings="yes"],
[ac_cv_with_afdbench_settings="no"])
AC_ARG_ENABLE(auto_create_config,
[ --disable-auto_create_config disable automatic creation of configuration],
[ac_cv_auto_create_config="no"],
[AC_DEFINE([WITH_AUTO_CONFIG], [], [With automatic creation of configuration])
ac_cv_auto_create_config="yes"])
AC_ARG_ENABLE(afd_ctrl_proc_check,
[ --disable-afd_ctrl_proc_check disable afd_ctrl dialog checking for main AFD process],
[ac_cv_afd_ctrl_proc_check="no"],
[AC_DEFINE([AFD_CTRL_PROC_CHECK], [], [With afd_ctrl dialog checking for main AFD process])
ac_cv_afd_ctrl_proc_check="yes"])
AC_ARG_ENABLE(report_empty_dir_scan,
[ --enable-report_empty_dir_scan enable reporting empty dir scans],
[AC_DEFINE([REPORT_EMPTY_DIR_SCANS], [], [Report empty directory scans])
ac_cv_report_empty_dir_scan="yes"],
[ac_cv_report_empty_dir_scan="no"])
AC_ARG_ENABLE(expand_path_in_message,
[ --enable-expand_path_in_message enable expanding path in message],
[AC_DEFINE([EXPAND_PATH_IN_MESSAGE], [], [Expand path in message])
ac_cv_expand_path_in_message="yes"],
[ac_cv_expand_path_in_message="no"])
AC_ARG_ENABLE(statistics_in_fifodir,
[ --enable-statistics_in_fifodir statistics are stored in fifodir],
[AC_DEFINE([STAT_IN_FIFODIR], [], [Statistics in fifodir])
ac_cv_statistics_in_fifodir="yes"],
[ac_cv_statistics_in_fifodir="no"])
AC_ARG_ENABLE(setuid_progs,
[ --enable-setuid_progs enable setuid flag when installing],
[ac_cv_setuid_progs="$enableval"
AC_DEFINE([WITH_SETUID_PROGS], [], [Set some programms setuid.])
AM_CONDITIONAL(WITH_SETUID, true)],
[ac_cv_setuid_progs="no"
AM_CONDITIONAL(WITH_SETUID, false)])
AC_ARG_ENABLE(atpd_support,
[ --enable-atpd_support enable ATPD support],
[AM_CONDITIONAL(WITH_ATPD_SUPPORT, true)
AC_DEFINE([_WITH_ATPD_SUPPORT], [], [With ATPD support])
ac_cv_atpd_support="ATPD "],
[ac_cv_atpd_support=""
AM_CONDITIONAL(WITH_ATPD_SUPPORT, false)])
AC_ARG_ENABLE(wmod_support,
[ --enable-wmod_support enable WMOD support],
[AM_CONDITIONAL(WITH_WMOD_SUPPORT, true)
AC_DEFINE([_WITH_WMOD_SUPPORT], [], [With WMOD support])
ac_cv_wmod_support="WMOD "],
[ac_cv_wmod_support=""
AM_CONDITIONAL(WITH_WMOD_SUPPORT, false)])
AC_ARG_ENABLE(de_mail_support,
[ --enable-de_mail_support enable DE-mail support],
[AM_CONDITIONAL(WITH_DE_MAIL_SUPPORT, true)
AC_DEFINE([_WITH_DE_MAIL_SUPPORT], [], [With DE-mail support])
ac_cv_demail_support="DE-mail "],
[ac_cv_demail_support=""
AM_CONDITIONAL(WITH_DE_MAIL_SUPPORT, false)])
AC_ARG_ENABLE(with_unlink_delay,
[ --enable-with_unlink_delay enable delay and retry when unlink fails],
[if test x$enableval = xyes; then
AC_DEFINE([WITH_UNLINK_DELAY], [], [Enable delay and retry when unlink fails])
fi])
AC_ARG_ENABLE(multi_dir_scans,
[ --enable-multi_dir_scans enable multiple directory scans],
[if test x$enableval = xyes; then
AC_DEFINE([WITH_MULTI_DIR_SCANS], [], [Enable multiple directory scans])
fi])
AC_ARG_ENABLE(multi_fs_support,
[ --enable-multi_fs_support enable multiple local filesystem support],
[AM_CONDITIONAL(WITH_MULTI_FS_SUPPORT, true)
AC_DEFINE([MULTI_FS_SUPPORT], [], [Enable multiple local filesystem support])
ac_cv_multi_fs_support="yes"],
[ac_cv_multi_fs_support="no"
AM_CONDITIONAL(WITH_MULTI_FS_SUPPORT, false)])
AC_ARG_ENABLE(ftp_reuse_data_port,
[ --enable-ftp_reuse_data_port enable reusing FTP data port],
[if test x$enableval = xyes; then
AC_DEFINE([FTP_REUSE_DATA_PORT], [], [With reusing FTP data port])
fi])
AC_ARG_ENABLE(ascii_only_subject,
[ --enable-ascii_only_subject enable ASCII only subjet in mail],
[if test x$enableval = xyes; then
AC_DEFINE([WITH_ASCII_ONLY_SUBJECT], [], [With ASCII only subjects])
fi])
AC_ARG_ENABLE(ms_error_workaround,
[ --enable-ms_error_workaround enable workaround for MS FTP bug],
[if test x$enableval = xyes; then
AC_DEFINE([WITH_MS_ERROR_WORKAROUND], [], [With MS FTP error workaround])
fi])
AC_ARG_ENABLE(ftp_reuse_data_port,
[ --enable-no_auto_basic_auth disable automatic default basic HTTP authorization],
[if test x$enableval = xyes; then
AC_DEFINE([HTTP_NO_AUTO_BASIC_AUTH], [], [Without automatic HTTP basic auth])
fi])
AC_ARG_ENABLE(group_can_write,
[ --enable-group_can_write allow group write access],
[if test x$enableval = xyes; then
AC_DEFINE([GROUP_CAN_WRITE], [], [Allow group write access])
fi
ac_cv_group_can_write="$enableval"],
[ac_cv_group_can_write="no"])
AC_ARG_ENABLE(lockdebug,
[ --enable-lockdebug enable debug messages of locking],
[if test x$enableval = xyes; then
AC_DEFINE([LOCK_DEBUG], [], [With debug messages of locking])
fi])
AC_ARG_ENABLE(show_exec_times,
[ --enable-show_exec_times enable show exec times when rereading DIR_CONFIG],
[if test x$enableval = xyes; then
AC_DEFINE([SHOW_EXEC_TIMES], [], [With show exec times])
fi])
AC_ARG_ENABLE(sendfile_support,
[ --enable-sendfile_support enable sendfile support],
[if test x$enableval = xyes; then
AC_DEFINE([WITH_SENDFILE], [], [With sendfile support])
fi])
AC_ARG_ENABLE(splice_support,
[ --enable-splice_support enable splice support],
[if test x$enableval = xyes; then
AC_DEFINE([WITH_SPLICE_SUPPORT], [], [With splice support])
fi])
AC_ARG_ENABLE(readyfile,
[ --enable-readyfile enable readyfile support],
[if test x$enableval = xyes; then
AC_DEFINE([WITH_READY_FILES], [], [With FSS-type ready files])
fi])
AC_ARG_ENABLE(map_support,
[ --enable-map_support enable MAP support],
[if test x$enableval = xyes; then
AC_DEFINE([_WITH_MAP_SUPPORT], [], [With MAP support])
AM_CONDITIONAL(WITH_MAP_SUPPORT, true)
else
AM_CONDITIONAL(WITH_MAP_SUPPORT, false)
fi],
[AM_CONDITIONAL(WITH_MAP_SUPPORT, false)])
AC_ARG_WITH(map-libraries,
[ --with-map-libraries=DIR location where MAP libraries are],
afd_map_lib_dir="$withval")
if test "x$afd_map_lib_dir" = "x"
then
AFD_MAP_LIBS=""
else
AFD_MAP_LIBS="-L$afd_map_lib_dir -lmfse2 -lz -lfaxe -lgeo"
fi
AC_SUBST(AFD_MAP_LIBS)
AC_ARG_ENABLE(dfax_support,
[ --enable-dfax_support enable DFAX support],
[if test x$enableval = xyes; then
AC_DEFINE([_WITH_DFAX_SUPPORT], [], [With DFAX support])
AM_CONDITIONAL(WITH_DFAX_SUPPORT, true)
ac_cv_dfax_support="DFAX "
else
AM_CONDITIONAL(WITH_DFAX_SUPPORT, false)
ac_cv_dfax_support=""
fi],
[AM_CONDITIONAL(WITH_DFAX_SUPPORT, false)
ac_cv_dfax_support=""])
AC_ARG_WITH(dfax-libraries,
[ --with-dfax-libraries=DIR location where DFAX libraries are],
afd_dfax_lib_dir="$withval")
if test "x$afd_dfax_lib_dir" = "x"
then
AFD_DFAX_LIBS="-lDivaS"
else
AFD_DFAX_LIBS="-L$afd_dfax_lib_dir -lDivaS"
fi
AC_SUBST(AFD_DFAX_LIBS)
AC_ARG_ENABLE(passwd_in_msg,
[ --enable-passwd_in_msg enable password in message],
[if test x$enableval = xyes; then
AC_DEFINE([WITH_PASSWD_IN_MSG], [], [With password in message])
fi])
AC_ARG_ENABLE(eumetsat,
[ --enable-eumetsat enable eumetsat header support],
[if test x$enableval = xyes; then
AC_DEFINE([WITH_EUMETSAT_HEADERS], [], [With eumetsat header support])
AM_CONDITIONAL(WITH_MISC_LIB, true)
else
AM_CONDITIONAL(WITH_MISC_LIB, false)
fi],
AM_CONDITIONAL(WITH_MISC_LIB, true))
AC_ARG_ENABLE([ssl],
[ --disable-ssl disable TLS/SSL support],
[if test x$enableval = xyes
then
if test x$enableval != xyes
then
ssl_all_roots=$enableval
else
ssl_all_roots="/usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /usr /opt"
fi
with_ssl="yes"
else
with_ssl="no"
fi],
[if test x$enableval != xyes
then
ssl_all_roots=$enableval
else
ssl_all_roots="/usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /usr /opt"
fi
with_ssl="yes"])
AC_ARG_WITH(ssl-includes,
[ --with-ssl-includes=DIR location where TLS/SSL includes are],
ssl_include_dir="$withval")
AC_ARG_WITH(ssl-libraries,
[ --with-ssl-libraries=DIR location where TLS/SSL libraries are],
ssl_lib_dir="$withval")
AC_ARG_ENABLE(editres,
[ --enable-editres enable editres support],
[if test x$enableval = xyes; then
AC_DEFINE([WITH_EDITRES], [], [With editres support])
fi])
AC_ARG_ENABLE(efence,
[ --enable-efence enable debugging with Electric Fence],
[ac_cv_efence="$enableval"],
[ac_cv_efence="no"])
AC_ARG_ENABLE(systemd,
[ --enable-systemd enable systemd support],
[ac_cv_systemd="$enableval"],
[ac_cv_systemd="no"])
dnl **** Check if we should build with GUI and with which widget set.
AC_ARG_WITH(gui,
[ --with-gui=GUI Where GUI is either motif (default), gtk or none],
if test "x$with_gui" = xmotif || test "x$with_gui" = xgtk ; then
afd_gui="$with_gui"
else
afd_gui=
fi ,
afd_gui="motif")
dnl **** Check if we want to compile in the XOR key.
AC_ARG_WITH(xor-key,
AS_HELP_STRING([--with-xor-key=KEY],
[Where KEY can be any ascii string]),
AC_DEFINE_UNQUOTED([XOR_KEY], ["$with_xor_key"], [With compiled in XOR key]),
with_xor_key="")
dnl **** check if we want to compile afd_mon only
compile_afd_mon_only=false
AC_ARG_ENABLE(compile_afd_mon_only,
[ --enable-compile_afd_mon_only enable compiling of afd_mon only],
[case "${enableval}" in
yes) compile_afd_mon_only=true
AC_DEFINE([WITH_AFD_MON], [], [With afd_mon support]) ;;
no) compile_afd_mon_only=false;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-compile_afd_mon_only) ;;
esac],[compile_afd_mon_only=false])
AM_CONDITIONAL(WITH_AFD_MON_ONLY, $compile_afd_mon_only)
dnl **** check if we want to use afd_mon
afd_mon=false
AC_ARG_ENABLE(afd_mon,
[ --enable-afd_mon enable afd_mon support],
[case "${enableval}" in
yes) afd_mon=true
AC_DEFINE([WITH_AFD_MON], [], [With afd_mon support]) ;;
no) afd_mon=false;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-afd_mon) ;;
esac
ac_cv_afd_mon="$enableval"],[afd_mon=false;ac_cv_afd_mon="no"])
AM_CONDITIONAL(WITH_AFD_MON, $afd_mon)
if test "$afd_mon" = "false"
then
if test "$compile_afd_mon_only" = "true"
then
WITH_AFD_MON_SPEC=1
else
WITH_AFD_MON_SPEC=0
fi
else
WITH_AFD_MON_SPEC=1
fi
AC_SUBST(WITH_AFD_MON_SPEC)
dnl **** check if user wants to compile with debugging support
AC_ARG_ENABLE(compiler_debug,
[ --enable-compiler-debug turn on debugging],
[case "${enableval}" in
yes) compiler_debug=true ;;
no) compiler_debug=false;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-compiler-debug) ;;
esac],[compiler_debug=false])
dnl **** check if user wants to compile with compiler warnings
AC_ARG_ENABLE(compiler_warn,
[ --enable-compiler-warn turn on compiler warnings],
[case "${enableval}" in
yes) compiler_warn=true ;;
no) compiler_warn=false;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-compiler-warn) ;;
esac],[compiler_warn=false])
dnl **** check if user wants to compile with optimization support
AC_ARG_ENABLE(compiler_optimizations,
[ --enable-compiler-optimizations Enable optimization of the binaries],
[case "$enableval" in
yes) compiler_optimizations=true ;;
no) compiler_optimizations=false;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-compiler-optimizations) ;;
esac],[compiler_optimizations=false])
dnl **** check if user wants to compile with security support
AC_ARG_ENABLE(compiler_security,
[ --enable-compiler-security Enable compiler security options],
[case "$enableval" in
yes) compiler_security=true ;;
no) compiler_security=false;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-compiler-security) ;;
esac],[compiler_security=false])
dnl **** check if user wants to compile with address sanitizer
AC_ARG_ENABLE(compiler_address_sanitizer,
[ --enable-compiler-address-sanitizer Enable compiler address sanitizer],
[case "$enableval" in
yes) compiler_address_sanitizer=true ;;
no) compiler_address_sanitizer=false;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-compiler-address-sanitizer) ;;
esac],[compiler_address_sanitizer=false])
dnl **** check if user wants to compile with analyzer
AC_ARG_ENABLE(compiler_analyzer,
[ --enable-compiler-analyzer Enable compiler analyzer],
[case "$enableval" in
yes) compiler_analyzer=true ;;
no) compiler_analyzer=false;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-compiler-analyzer) ;;
esac],[compiler_analyzer=false])
dnl **** check if user wants to compile with profiling information
AC_ARG_ENABLE(compiler_profiling,
[ --enable-compiler-profiling Enable compiler profiling support],
[case "$enableval" in
yes) compiler_profiling=true ;;
no) compiler_profiling=false;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-compiler-profiling) ;;
esac],[compiler_profiling=false])
dnl **** check if user wants to use fortify option of glibc/gcc
AC_ARG_ENABLE(use_fortify,
[ --enable-use_fortify Enable glibc/gcc fortify option],
[case "$enableval" in
yes) use_fortify=true ;;
no) use_fortify=false;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-use_fortify) ;;
esac],[use_fortify=false])
dnl **** check if user wants to compile with 64-bit support
AC_ARG_ENABLE(compile_64_bit,
[ --enable-compile-64-bit Enable compiling 64-bit binaries],
[case "$enableval" in
yes) compile_64_bit=true ;;
no) compile_64_bit=false;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-compile-64-bit) ;;
esac],[compile_64_bit=false])
dnl **** Enable/disable distro-style RPMs (taken from heartbeat)
AC_ARG_ENABLE([distro-rpm],
[ --enable-distro-rpm Enable distro-style RPMs [default=no]],
[], [enable_distro_rpm=no])
case $enable_distro_rpm in
yes) DISTRO_STYLE_RPMS=1;;
*) DISTRO_STYLE_RPMS=0;;
esac
AC_SUBST(DISTRO_STYLE_RPMS)
dnl
dnl *** some numeric configurable values
dnl
AC_ARG_WITH(max-no-of-parallel-jobs,
AS_HELP_STRING([--with-max-no-of-parallel-jobs=N],
[max number of parallel transfers per host (default=5)]),
[],
if test "$ac_cv_with_afdbench_settings" = "yes"
then
with_max_no_of_parallel_jobs=12
else
with_max_no_of_parallel_jobs=9
fi)
AC_DEFINE_UNQUOTED([MAX_NO_PARALLEL_JOBS], [$with_max_no_of_parallel_jobs], [
The value of MAX_NO_PARALLEL_JOBS determines the number of parallel
transfers per host. The default is 9, which should be enough in most
cases. However, on some long distance lines or lines with high latencies
it might be necessary to increase this value.])
AC_ARG_WITH(default-no-of-parallel-jobs,
AS_HELP_STRING([--with-default-no-of-parallel-jobs=N],
[default number of parallel transfers per host (default=3)]),
, with_default_no_of_parallel_jobs=3)
AC_DEFINE_UNQUOTED([DEFAULT_NO_PARALLEL_JOBS], [$with_default_no_of_parallel_jobs], [
The value of DEFAULT_NO_PARALLEL_JOBS determines the default number of
parallel transfers per host. The default is 3.])
AC_ARG_WITH(default-archive-unit,
AS_HELP_STRING([--with-default-archive-unit=N],
[default archive unit in seconds (default=86400)]),
[],
with_default_archive_unit=86400)
AC_DEFINE_UNQUOTED([DEFAULT_ARCHIVE_UNIT], [$with_default_archive_unit], [
The value of DEFAULT_ARCHIVE_UNIT determines the default archive unit
in seconds. Best is to leave this at it default for one day (86400 seconds).])
AC_ARG_WITH(max-hostname-length,
AS_HELP_STRING([--with-max-hostname-length=N],
[maximum host alias name length (default=8)]),
, with_max_hostname_length=8)
AC_DEFINE_UNQUOTED([MAX_HOSTNAME_LENGTH], [$with_max_hostname_length], [
The value of MAX_HOSTNAME_LENGTH determines how long the host alias
name length in the afd_ctrl dialog may be.])
AC_ARG_WITH(max-dir-alias-length,
AS_HELP_STRING([--with-max-dir-alias-length=N],
[maximum directory alias name length (default=10)]),
, with_max_dir_alias_length=10)
AC_DEFINE_UNQUOTED([MAX_DIR_ALIAS_LENGTH], [$with_max_dir_alias_length], [
The value of MAX_DIR_ALIAS_LENGTH determines how long the directory alias
name length in the dir_ctrl dialog may be.])
AC_ARG_WITH(max-afdname-length,
AS_HELP_STRING([--with-max-afdname-length=N],
[maximum AFD alias name length (default=12)]),
, with_max_afdname_length=12)
AC_DEFINE_UNQUOTED([MAX_AFDNAME_LENGTH], [$with_max_afdname_length], [
The value of MAX_AFDNAME_LENGTH determines how long the AFD alias
name length in the mon_ctrl dialog may be.])
AC_ARG_WITH(max-real-hostname-length,
AS_HELP_STRING([--with-max-real-hostname-length=N],
[maximum real hostname length (default=70)]),
, with_max_real_hostname_length=70)
AC_DEFINE_UNQUOTED([MAX_REAL_HOSTNAME_LENGTH], [$with_max_real_hostname_length], [
The value of MAX_REAL_HOSTNAME_LENGTH determines how long the real
hostname or its IP number may be.])
AC_ARG_WITH(max-recipient-length,
AS_HELP_STRING([--with-max-recipient-length=N],
[maximum recipient length (default=256)]),
, with_max_recipient_length=256)
AC_DEFINE_UNQUOTED([MAX_RECIPIENT_LENGTH], [$with_max_recipient_length], [
The value of MAX_RECIPIENT_LENGTH sets the maximum length of a recipient.])
dnl **** check where init/rc directory is, taken from heartbeat
AC_MSG_CHECKING(which init (rc) directory to use)
INITDIR=""
for initdir in /etc/init.d /etc/rc.d/init.d /sbin/init.d \
/usr/local/etc/rc.d /etc/rc.d
do
if test -d $initdir
then
INITDIR=$initdir
AC_MSG_RESULT($INITDIR);
break
fi
done
AC_ARG_WITH(initdir,
[ --with-initdir=DIR directroy for init (rc) scripts [${INITDIR}]],
[ if test x"$withval" = xprefix; then INITDIR=${prefix}; else
INITDIR="$withval"; fi ])
AC_SUBST(INITDIR)
AC_MSG_CHECKING(which sysconfig directory to use)
SYSCONFIGDIR=""
for sysconfigdir in /etc/sysconfig ${prefix}/etc
do
if test -d $sysconfigdir
then
SYSCONFIGDIR=$sysconfigdir
AC_MSG_RESULT($SYSCONFIGDIR);
break
fi
done
AC_ARG_WITH(sysconfigdir,
[ --with-sysconfigdir=DIR directory for afd users initialized by init script [${SYSCONFIGDIR}]],
[ if test x"$withval" = xprefix; then SYSCONFIGDIR=${prefix}; else
SYSCONFIGDIR="$withval"; fi ])
AC_SUBST(SYSCONFIGDIR)
cleaned_configure_args=""
for j in ${ac_configure_args}
do
case $j in
*--libdir=*) ;;
*) cleaned_configure_args="$cleaned_configure_args $j" ;;
esac
done
AC_SUBST(cleaned_configure_args)
dnl **** check if datadir, docdir and mandir are set, needed for spec file
dnl **** This was taken from the heartbeat package.
prefix_orig="$prefix"
prefix=`eval echo "$prefix"`
case $prefix in
NONE) prefix=/usr;;
esac
var() {
case $1 in
*'${'*) res=`eval echo "$1"`;;
*) res="$1";;
esac
case "$res" in
""|NONE) echo "$2";;
*) echo "$res";;
esac
}
exec_prefix=`var "$exec_prefix" "$prefix"`
bindir=`var "$bindir" "$exec_prefix/bin"`
sbindir=`var "$sbindir" "$exec_prefix/sbin"`
datarootdir=`var "$datarootdir" "$prefix/share"`
datadir=`var "$datadir" "$prefix/share"`
sysconfdir=`var "$sysconfdir" "$prefix/etc"`
mandir=`var "$mandir" "$exec_prefix/man"`
docdir=${datadir}/doc/afd
dnl **** check under which user to install
BINARY_OWNER="root"
AC_ARG_WITH(rpm-binary-owner,
[ --with-rpm-binary-owner=BINARY_OWNER
BINARY_OWNER who owns the RPM binaries. [default=root] ],
[ BINARY_OWNER="$withval" ],
[ BINARY_OWNER="root" ],
)
AC_SUBST(BINARY_OWNER)
AC_ARG_WITH(rpm-binary-group,
[ --with-rpm-binary-group=BINARY_GROUP
BINARY_GROUP who owns the RPM binaries. [default=BINARY_OWNER] ],
[ BINARY_GROUP="$withval" ],
[ BINARY_GROUP=$BINARY_OWNER ],
)
AC_SUBST(BINARY_GROUP)
dnl Check for host type
AC_CANONICAL_HOST
dnl Checks for programs.
AC_PROG_INSTALL
AC_PROG_CC
AC_PROG_RANLIB
DISTRO=""
DISTRO_VERSION=0
case "${host_os}"
in
aix*) if test "${compile_64_bit}" = "true"
then
if test "x${GCC}" = "xyes"
then
OS_FLAG="-m64"
else
OS_FLAG="-q64"
fi
else
OS_FLAG=""
fi
AM_CONDITIONAL(IS_LINUX, false)
;;
bsdi*) OS_FLAG=""
AM_CONDITIONAL(IS_LINUX, false)
;;
cygwin*) OS_FLAG="-D_CYGWIN"
AM_CONDITIONAL(IS_LINUX, false)
;;
freebsd*) OS_FLAG="-DFREEBSD"
AM_CONDITIONAL(IS_LINUX, false)
;;
hpux*) if test "${compile_64_bit}" = "true"
then
if test "x${GCC}" = "xyes"
then
OS_FLAG="-mlp64 -D_HPUX"
else
OS_FLAG="+DD64 -D_HPUX"
fi
else
OS_FLAG="-D_HPUX"
fi
if test "${compiler_debug}" = "false"
then
CFLAGS=`echo " $CFLAGS " | sed 's/ -g / /g'`
fi
AM_CONDITIONAL(IS_LINUX, false)
;;
irix*) if test "x$afd_map_lib_dir" = "x"
then
if test "${compile_64_bit}" = "true"
then
if test "x${GCC}" = "xyes"
then
OS_FLAG="-m64 -DMMAP_KILLER -DIRIX"
else
OS_FLAG="-64 -DMMAP_KILLER -DIRIX"
fi
else
OS_FLAG="-DMMAP_KILLER -DIRIX"
fi
else
dnl **** MAP libs are only available in 32 Bit
OS_FLAG="-32 -DMMAP_KILLER -DIRIX"
fi
AM_CONDITIONAL(IS_LINUX, false)
;;
linux*) if test "${compile_64_bit}" = "true"
then
OS_FLAG="-m64 -DLINUX"
else
OS_FLAG="-DLINUX"
fi
AM_CONDITIONAL(IS_LINUX, true)
dnl **** Try determine distribution.
if test -f /etc/os-release
then
DISTRO=$(grep "^ID=" /etc/os-release | cut -d= -f2 | tr -d \")
if test "$DISTRO" = "centos"
then
DISTRO="redhat"
else
if test "$DISTRO" = "scientific"
then
DISTRO="redhat"
fi
fi
DISTRO_VERSION=$(grep "^VERSION_ID=" /etc/os-release | cut -d= -f2 | tr -dc '0-9.' | cut -d'.' -f1)
fi
if test "$DISTRO" = ""
then
if test -f /etc/fedora-release
then
DISTRO="fedora"
DISTRO_VERSION=`head -1 /etc/fedora-release | tr -dc '0-9.' | cut -d'.' -f1`
else
if test -f /etc/redhat-release
then
DISTRO="redhat"
DISTRO_VERSION=`head -1 /etc/redhat-release | tr -dc '0-9.' | cut -d'.' -f1`
else
if test -f /etc/SuSE-release
then
head -1 /etc/SuSE-release | grep -i enterprise > /dev/null
if test $? -eq 0
then
DISTRO="sles"
DISTRO_VERSION=`grep VERSION /etc/SuSE-release | cut -d " " -f 3`
else
head -1 /etc/SuSE-release | grep -i open > /dev/null
if test $? -eq 0
then
DISTRO="opensuse"
DISTRO_VERSION=`grep VERSION /etc/SuSE-release | cut -d " " -f 3 | cut -d "." -f 1`
else
DISTRO="suse"
fi
fi
else
if test -f /etc/slackware-release
then
DISTRO="slackware"
else
if test -f /etc/debian_release
then
DISTRO="debian"
else
if test -f /etc/gentoo-release
then
DISTRO="gentoo"
else
if test -f /etc/yellowdog-release
then
DISTRO="yellowdog"
else
DISTRO="unknown"
fi
fi
fi
fi
fi
fi
fi
fi
;;
netbsd*) OS_FLAG=""
AM_CONDITIONAL(IS_LINUX, false)
;;
sco*) OS_FLAG="-D_SCO"
AM_CONDITIONAL(IS_LINUX, false)
;;
solaris*) OS_FLAG="-D_SUN"
AM_CONDITIONAL(IS_LINUX, false)
;;
sunos*) OS_FLAG="-D_SUN"
AM_CONDITIONAL(IS_LINUX, false)
;;