forked from realpine/alpine
-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.ac
1667 lines (1514 loc) · 46.3 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.
dnl /* ========================================================================
dnl * Copyright 2006-2008 University of Washington
dnl *
dnl * Licensed under the Apache License, Version 2.0 (the "License");
dnl * you may not use this file except in compliance with the License.
dnl * You may obtain a copy of the License at
dnl *
dnl * http://www.apache.org/licenses/LICENSE-2.0
dnl *
dnl * ========================================================================
dnl */
AC_PREREQ([2.57])
AC_REVISION([$Id: configure.ac 1266 2009-07-14 18:39:12Z hubert@u.washington.edu $])
dnl Alpine Version Number is in $srcdir/VERSION
AC_INIT(alpine, m4_normalize(m4_include([VERSION])), [alpine-contact@u.washington.edu])
AC_CONFIG_SRCDIR([include/system.h])
AC_CONFIG_HEADERS([include/config.h])
AM_INIT_AUTOMAKE([foreign nostdinc])
AM_MAINTAINER_MODE
AC_CANONICAL_HOST
AC_LANG(C)
AC_MSG_NOTICE([Configuring for $PACKAGE_STRING ($host))])
# start out with intent to build Web Alpine
WEB_BUILD=web/src/alpined.d
dnl CHECK PROGRAMS
AC_PROG_CC
AC_PROG_CC_STDC
AC_PROG_INSTALL
AC_PROG_MAKE_SET
AC_PROG_LN_S
AC_PROG_AWK
AC_PROG_RANLIB
AC_PROG_LIBTOOL
AC_PATH_PROG(AR, ar, ar)
AC_PATH_PROG(RM, rm, rm)
AC_PATH_PROG(CP, cp, cp)
AC_PATH_PROG(LN, ln, ln)
AC_PATH_PROG(SED, sed, sed)
AC_PATH_PROG(MAKE, make)
dnl COMPILE-TIME OPTIONS
AM_GNU_GETTEXT_VERSION([0.16.1])
AM_GNU_GETTEXT([external])
dnl enable dmalloc per http://dmalloc.com
dnl NOTE: does not check c-client
AC_MSG_CHECKING([option: dmalloc enabled])
AC_ARG_ENABLE(dmalloc, AC_HELP_STRING([--enable-dmalloc],[Enable dmalloc debugging]))
if test x$enable_dmalloc = "xyes" ; then
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no])
fi
AC_ARG_WITH(dmalloc-dir,
AC_HELP_STRING([--with-dmalloc-dir=DIR], [Root of dmalloc lib/include path]),
[
if test "x$withval" != "xno" ; then
enable_dmalloc = "yes"
CPPFLAGS="$CPPCFLAGS -I${withval}"
LDFLAGS="$LDFLAGS -L${withval}"
fi
])
if test x$enable_dmalloc = "xyes" ; then
AC_DEFINE(ENABLE_DMALLOC, 1, [Define enable dmalloc debugging])
fi
localedir="\${datadir}/locale"
AC_ARG_WITH(localedir,
AC_HELP_STRING([--with-localedir=DIR], [Name of gettext locale directory]),
[
case $withval in
yes)
;;
no)
;;
*)
localedir=$withval
;;
esac
])
AC_SUBST(localedir, "[$localedir]")
# Setup OS-Specific features
case "$host" in
*darwin*)
dnl OS X Universal Binary Support
AC_ARG_ENABLE(osx-universal-binaries,
AC_HELP_STRING([--enable-osx-universal-binaries],[Produce universal binaries under OS X [[default=no]]]))
if test "x$enable_osx_universal_binaries" = "xyes" ; then
if test "x$enable_dependency_tracking" != xno ; then
AC_MSG_ERROR([--enable-osx-universal-binary requires --disable-dependency-tracking.
Please re-run configure with these options:
--disable-dependency-tracking --enable-osx-universal-binary])
fi
if [test -d /Developer/SDKs/MacOSX10.5.sdk] ; then
alpine_sysroot=/Developer/SDKs/MacOSX10.5.sdk
elif [test -d /Developer/SDKs/MacOSX10.4u.sdk] ; then
alpine_sysroot=/Developer/SDKs/MacOSX10.4u.sdk
else
AC_MSG_ERROR([No suitable MacOSX SDK found. Make sure Xcode tools are installed])
fi
ub_cflags="-isysroot $alpine_sysroot -arch ppc -arch i386"
ub_ldflags="-Wl,-syslibroot,$alpine_sysroot -arch ppc -arch i386"
AM_CFLAGS="$AM_CFLAGS $ub_cflags"
AM_LDFLAGS="$AM_LDFLAGS $ub_ldflags"
alpine_c_client_cflags="$alpine_c_client_cflags $ub_cflags"
alpine_c_client_ldflags="$alpine_c_client_ldflags $ub_ldflags"
fi
;;
esac
AC_ARG_WITH(include-path,
AC_HELP_STRING([--with-include-path=PATHS], [Colon-separated list of directories used for include file search]),
[
case $withval in
no)
;;
yes)
;;
*)
new_cppflags="-I`echo ${withval} | ${SED} 's/:/ -I/g'`"
CPPFLAGS="$CPPFLAGS ${new_cppflags}"
alpine_c_client_cflags="$alpine_c_client_cflags ${new_cppflags}"
;;
esac
])
AC_ARG_WITH(lib-path,
AC_HELP_STRING([--with-lib-path=PATHS], [Colon-separated list of directories used for library search]),
[
case $withval in
no)
;;
yes)
;;
*)
new_ldflags="-L`echo ${withval} | ${SED} 's/:/ -L/g'`"
LDFLAGS="$LDFLAGS $new_ldflags"
alpine_c_client_ldflags="$alpine_c_client_ldflags ${new_ldflags}"
;;
esac
])
AC_ARG_WITH(pubcookie,
AC_HELP_STRING([--with-pubcookie], [Include support for UW-Pubcookie Web Authentication]),
[
if test "x$withval" != "xno" ; then
WEB_PUBCOOKIE_BUILD=web/src/pubcookie
fi
])
AC_ARG_WITH(web-bin,
AC_HELP_STRING([--with-web-bin=PATH], [Directory to hold Web Alpine component binary files]),
[
case "$withval" in
no)
;;
yes)
;;
*)
WEB_BINDIR=$withval
;;
esac
])
dnl disable debug, turned on by default
AC_MSG_CHECKING([option: debugging is enabled])
AC_ARG_ENABLE(debug, AC_HELP_STRING([--disable-debug],[Exclude debug messages from source]))
if test x$enable_debug != "xno" ; then
AM_CFLAGS="$AM_CFLAGS -g"
AC_DEFINE([DEBUG], [1], [Compile in debugging])
AC_DEFINE([DEBUGJOURNAL], [1], [Display debug messages in journal])
AC_MSG_RESULT([yes])
else
dnl ??? set AM_CFLAGS to optimize ???
AC_MSG_RESULT([no])
fi
dnl disable optimization, on by default
AC_MSG_CHECKING([option: optimization is enabled])
AC_ARG_ENABLE(optimization, AC_HELP_STRING([--disable-optimization],[Exclude optimizing compiler flags]))
if test x$enable_optimization != "xno" ; then
AC_MSG_RESULT([yes])
else
CFLAGS="`echo $AM_CFLAGS | ${SED} 's/-O2//'`"
alpine_c_client_gccoptlevel="-O0"
AC_MSG_RESULT([no])
fi
dnl disable mouse support
AC_MSG_CHECKING([option: mouse support enabled])
AC_ARG_ENABLE(mouse, AC_HELP_STRING([--disable-mouse], [Disable mouse support]))
if test x$enable_mouse != "xno" ; then
AC_DEFINE([MOUSE], [], [Compile in mouse support])
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no])
fi
dnl enable quotas
AC_MSG_CHECKING([option: quotas enabled])
AC_ARG_ENABLE(quotas, AC_HELP_STRING([--enable-quotas],[Enable disk quota checking on startup]))
if test x$enable_quotas = "xyes" ; then
AC_DEFINE([USE_QUOTAS], [], [Compile in quota check on startup])
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no])
fi
AC_MSG_CHECKING([option: From changing enabled])
AC_ARG_ENABLE(from_changing, AC_HELP_STRING([--disable-from-changing],[Disallow users changing From addresss]))
if test x$enable_from_changing != "xno" ; then
AC_MSG_RESULT([yes])
else
AC_DEFINE([NEVER_ALLOW_CHANGING_FROM], [], [Disallow users changing their From address])
AC_MSG_RESULT([no])
fi
dnl enable background posting support
AC_MSG_CHECKING([option: background post enabled])
AC_ARG_ENABLE(background-post, AC_HELP_STRING([--disable-background-post],[Disable background posting]))
if test x$enable_background_post != "xno" ; then
AC_DEFINE([BACKGROUND_POST], [], [Enable background posting support])
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no])
fi
dnl enable keyboard locking support
AC_MSG_CHECKING([option: keyboard lock enabled])
AC_ARG_ENABLE(keyboard-lock, AC_HELP_STRING([--disable-keyboard-lock],[Disable keyboard locking]))
if test x$enable_keyboard_lock != "xno" ; then
AC_DEFINE([KEYBOARD_LOCK], [], [Enable keyboard lock support])
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no])
fi
dnl enable from encoding support
AC_MSG_CHECKING([option: from encoding enabled])
AC_ARG_ENABLE(from-encoding, AC_HELP_STRING([--enable-from-encoding],[Enable From encoding in sent messages]))
if test x$enable_from_encoding = "xyes" ; then
AC_DEFINE([ENCODE_FROMS], [], [Enable From address encoding in sent messages])
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no])
fi
dnl OPTION: name of local submission agent
dnl Might not be sendmail, but it MUST speak SMTP on stdin/stdout
AC_ARG_WITH(smtp-msa,
AC_HELP_STRING([--with-smtp-msa=PATH],[Local Mail Submission Agent (sendmail)]),
[
case "$withval" in
no)
;;
yes)
AC_PATH_PROG(SENDMAIL, sendmail, "", $PATH:/usr/sbin:/usr/lib)
;;
*)
SENDMAIL=$withval
;;
esac
],
[
AC_PATH_PROG(SENDMAIL, sendmail, "", $PATH:/usr/sbin:/usr/lib)
])
if test -n "$SENDMAIL" ; then
AC_DEFINE_UNQUOTED([SENDMAIL], "$SENDMAIL", [Local mail submission agent])
fi
dnl OPTION: local msa arguments
smtp_msa_flags="-bs -odb -oem"
AC_ARG_WITH(smtp-msa-flags,
AC_HELP_STRING([--with-smtp-msa-flags=FLAGS],[MSA flags for SMTP on stdin/stdout (-bs -odb -oem)]),
[
if test "x$withval" != "xno" ; then
smtp_msa_flags=$withval
fi
])
AC_DEFINE_UNQUOTED([SENDMAILFLAGS], "$smtp_msa_flags", [Local MSA flags for SMTP on stdin/stdout])
dnl OPTION: name of local news posting agent and flags
npa="inews"
AC_ARG_WITH(npa,
AC_HELP_STRING([--with-npa=PATH],[Posting agent when no nntp-servers defined (inews)]),
[
case "$withval" in
no)
;;
yes)
AC_PATH_PROG(NPA_PROG, inews, "", $PATH:/usr/sbin:/usr/lib)
;;
*)
NPA_PROG=$withval
;;
esac
],
[
AC_PATH_PROG(NPA_PROG, inews, "", $PATH:/usr/sbin:/usr/lib)
])
npa_flags="-h"
AC_ARG_WITH(npa-flags,
AC_HELP_STRING([--with-npa-flags=FLAGS],[Flags to allow posting via local agent (-h)]),
[
if test "x$withval" != "xno" ; then
npa_flags=$withval
fi
])
if test -n "$NPA_PROG" ; then
AC_DEFINE_UNQUOTED([SENDNEWS], "$NPA_PROG $npa_flags", [Posting agent to use when no nntp-servers defined])
fi
dnl OPTION: password changing program
AC_ARG_WITH(password-prog,
AC_HELP_STRING([--with-password-prog=PATH],[Password change program (/bin/passwd)]),
[
case "$withval" in
no)
;;
yes)
AC_PATH_PROG(PWPROG, passwd, "", $PATH:/usr/sbin:/usr/lib)
;;
*)
AC_PATH_PROG(PWPROG, $withval, "", $PATH:/usr/sbin:/usr/lib)
;;
esac
],
[
AC_PATH_PROG(PWPROG, passwd, "", $PATH:/usr/sbin:/usr/lib)
])
if test -n "$PWPROG" ; then
AC_DEFINE_UNQUOTED([PASSWD_PROG], "$PWPROG", [Program users use to change their password])
fi
dnl OPTION: basic spell checking program
AC_ARG_WITH(simple-spellcheck,
AC_HELP_STRING([--with-simple-spellcheck=PROG],[Spellcheck program reads stdin, emits misspellings on stdout]),
[
if test "x$withval" != "xno" ; then
SPELLPROG=$withval
fi
],
[
AC_CHECK_PROG([SPELLPROG], [hunspell], [hunspell], [])
if test -z "$SPELLPROG" ; then
AC_CHECK_PROG([SPELLPROG], [aspell], [aspell], [])
if test -z "$SPELLPROG" ; then
AC_CHECK_PROG([SPELLPROG], [ispell], [ispell], [])
if test -z "$SPELLPROG" ; then
SPELLPROG="spell"
fi
fi
fi
])
if test "x$SPELLPROG" != "xno" ; then
AC_PATH_PROG(alpine_simple_spellcheck, $SPELLPROG)
if test -n "$alpine_simple_spellcheck" ; then
case "$SPELLPROG" in
hunspell)
alpine_simple_spellcheck="$alpine_simple_spellcheck -l"
;;
aspell)
alpine_simple_spellcheck="$alpine_simple_spellcheck --dont-backup --mode=email list"
;;
ispell)
alpine_simple_spellcheck="$alpine_simple_spellcheck -l"
;;
*)
;;
esac
fi
fi
dnl OPTION: interactive spell checking program
AC_ARG_WITH(interactive-spellcheck,
AC_HELP_STRING([--with-interactive-spellcheck=PROG],[Interactive, filewise spell checker]),
[
if test "x$withval" != "xno" ; then
ISPELLPROG=$withval
fi
],
[
AC_CHECK_PROG([ISPELLPROG], [hunspell], [hunspell], [])
if test -z "$ISPELLPROG" ; then
AC_CHECK_PROG([ISPELLPROG], [aspell], [aspell], [])
if test -z "$SPELLPROG" ; then
ISPELLPROG="ispell"
fi
fi
])
if test "x$ISPELLPROG" != "xno" ; then
AC_PATH_PROG(alpine_interactive_spellcheck, $ISPELLPROG)
if test -n "$alpine_interactive_spellcheck" ; then
case "$ISPELLPROG" in
aspell)
alpine_interactive_spellcheck="$alpine_interactive_spellcheck --dont-backup --mode=email check"
;;
*)
;;
esac
fi
fi
if test -n "$alpine_interactive_spellcheck" ; then
AC_DEFINE_UNQUOTED([DF_VAR_SPELLER], "$alpine_interactive_spellcheck", [Interactive, filewise spell checker])
fi
if test -z "$alpine_simple_spellcheck" -a -n "$alpine_interactive_spellcheck" ; then
alpine_simple_spellcheck=test
fi
AC_DEFINE_UNQUOTED([SPELLER], "$alpine_simple_spellcheck", [Simple spell checker: reads stdin, emits misspellings on stdout])
dnl OPTION: system-pinerc
dnl NOTE: historically we used /lib for the config dir.
dnl don't ask, it was a long time ago. but, we can't
dnl change it now without breaking compatibility
case "$prefix" in
NONE) dpv=/usr/local/lib/pine.conf ;;
*) dpv=${prefix}/lib/pine.conf ;;
esac
AC_ARG_WITH(system-pinerc,
AC_HELP_STRING([--with-system-pinerc=VALUE], [System pinerc (/usr/local/lib/pine.conf)]),
[
case "$withval" in
no)
;;
yes)
;;
*)
dpv=$withval
;;
esac
])
AC_DEFINE_UNQUOTED(SYSTEM_PINERC, "$dpv", [System pinerc])
dnl OPTION: system-fixed-pinerc
dnl NOTE: historically we used /lib for the config dir.
dnl don't ask, it was a long time ago. but, we can't
dnl change it now without breaking compatibility
case "$prefix" in
NONE) dpv=/usr/local/lib/pine.conf.fixed ;;
*) dpv=${prefix}/lib/pine.conf.fixed ;;
esac
AC_ARG_WITH(system-fixed-pinerc,
AC_HELP_STRING([--with-system-fixed-pinerc=VALUE], [System fixed pinerc (/usr/local/lib/pine.conf.fixed)]),
[
case "$withval" in
no)
;;
yes)
;;
*)
dpv=$withval
;;
esac
])
AC_DEFINE_UNQUOTED(SYSTEM_PINERC_FIXED, "$dpv", [System fixed pinerc])
dnl Function to simplify setting alpine/pico defaults
dnl usage: PINEVAR(configure-name, definition-name, definition-value, help)
AC_DEFUN([PINEVAR],
[
dpv=$3
AC_ARG_WITH($1,
AC_HELP_STRING(--with-$1=VALUE, [$4 ($3)]),
[
if test "x$withval" != "xno" ; then
dpv=$withval
fi
])
AC_DEFINE_UNQUOTED($2, "$dpv", [Default configuration value])
])
dnl Function to simplify setting pine/pico defaults
dnl usage: PINEVAR_UNQUOTED(configure-name, definition-name, definition-value, help)
AC_DEFUN([PINEVAR_UNQUOTED],
[
dpv=$3
AC_ARG_WITH($1,
AC_HELP_STRING(--with-$1=VALUE, [$4 ($3)]),
[
if test "x$withval" != "xno" ; then
dpv=$withval
fi
])
AC_DEFINE_UNQUOTED($2, $dpv, [Default configuration value])
])
PINEVAR(mailcheck-interval, DF_MAILCHECK, 150, [Specify default mail-check-interval])
PINEVAR_UNQUOTED(checkpoint-interval, CHECK_POINT_TIME, 420, [Specify default checkpoint-interval])
PINEVAR_UNQUOTED(checkpoint-frequency, CHECK_POINT_FREQ, 12, [State change count before checkpoint])
PINEVAR_UNQUOTED(display-rows, DEFAULT_LINES_ON_TERMINAL, 24, [Initial rows on display])
PINEVAR_UNQUOTED(display-columns, DEFAULT_COLUMNS_ON_TERMINAL, 80, [Initial columns on display])
PINEVAR_UNQUOTED(max-display-rows, MAX_SCREEN_ROWS, 200, [Maximum display rows])
PINEVAR_UNQUOTED(max-display-columns, MAX_SCREEN_COLS, 500, [Maximum display columns])
PINEVAR(fill-column, DF_FILLCOL, 74, [Default fill column])
PINEVAR_UNQUOTED(max_fill-column, MAX_FILLCOL, 80, [Maximum fill column])
PINEVAR_UNQUOTED(debug-level, DEFAULT_DEBUG, 2, [Specify default debug verbosity level])
PINEVAR_UNQUOTED(debug-files, NUMDEBUGFILES, 4, [Specify number of debug files])
PINEVAR(debug-file, DEBUGFILE, [.pine-debug], [Specify debug file name])
PINEVAR(forwarded-keyword, FORWARDED_FLAG, ["\$Forwarded"], [IMAP (c-client) keyword to store forwarded status])
PINEVAR(display-overlap, DF_OVERLAP, [2], [Lines preserved while paging])
PINEVAR(display-margin, DF_MARGIN, [0], [Lines visible while scrolling])
PINEVAR(default-fcc, DF_DEFAULT_FCC, [sent-mail], [Default sent mail folder])
PINEVAR(default-save-folder, DEFAULT_SAVE, [saved-messages], [Default save folder])
PINEVAR(default-legacy-postponed-folder, POSTPONED_MAIL, [postponed-mail], [Pre Pine 3.90 postponed folder])
PINEVAR(default-postponed-folder, POSTPONED_MSGS, [postponed-msgs], [Default postponed folder])
PINEVAR(default-trash-folder, TRASH_FOLDER, [Trash], [Default Trash folder for Web Alpine])
PINEVAR(default-interrupted-mail, INTERRUPTED_MAIL, [.pine-interrupted-mail], [Default folder for interrupted mail])
PINEVAR(default-dead-letter-folder, DEADLETTER, [dead.letter], [Default dead letter folder])
PINEVAR(default-mail-directory, DF_MAIL_DIRECTORY, [mail], [Default mail directory])
PINEVAR(default-inbox-name, INBOX_NAME, [INBOX], [Default inbox name])
PINEVAR(default-signature-file, DF_SIGNATURE_FILE, [.signature], [Default signature file])
PINEVAR(default-elm-style-save, DF_ELM_STYLE_SAVE, [no], [Default to Elm style save])
PINEVAR(default-header-in-reply, DF_HEADER_IN_REPLY, [no], [Include header in reply])
PINEVAR(default-old-style-reply, DF_OLD_STYLE_REPLY, [no], [Default to old style reply])
PINEVAR(default-use-only-domain-name, DF_USE_ONLY_DOMAIN_NAME, [no], [Default to using only the domain name])
PINEVAR(default-save-by-sender, DF_SAVE_BY_SENDER, [no], [Default to save by sender])
PINEVAR(default-sort-key, DF_SORT_KEY, [arrival], [Default sort key])
PINEVAR(default-addressbook-sort-rule, DF_AB_SORT_RULE, [fullname-with-lists-last], [Default addressbook sort rule])
PINEVAR(default-folder-sort-rule, DF_FLD_SORT_RULE, [alphabetical], [Default folder sort rule])
PINEVAR(default-saved-message-name-rule, DF_SAVED_MSG_NAME_RULE, [default-folder], [Default saved message name rule])
PINEVAR(default-fcc-rule, DF_FCC_RULE, [default-fcc], [Default fcc rule])
PINEVAR(default-standard-printer, DF_STANDARD_PRINTER, [lpr], [Default standard printern])
PINEVAR(default-ansi-printer, ANSI_PRINTER, [attached-to-ansi], [ANSI printer definition])
PINEVAR(default-addressbook, DF_ADDRESSBOOK, [.addressbook], [Default addressbook name])
PINEVAR(default-local-fullname, DF_LOCAL_FULLNAME, ["Local Support"], [Default local support fullname])
PINEVAR(default-local-address, DF_LOCAL_ADDRESS, [postmaster], [Default local support address])
PINEVAR(default-keyboard-lock-count, DF_KBLOCK_PASSWD_COUNT, [1], [Default keyboard lock count])
PINEVAR(default-remote-addressbook-history, DF_REMOTE_ABOOK_HISTORY, [3], [Default address book history count])
PINEVAR(smime-public-cert-directory, DF_PUBLICCERT_DIR, [.alpine-smime/public], [Default Public Cert Directory])
PINEVAR(smime-private-key-directory, DF_PRIVATEKEY_DIR, [.alpine-smime/private], [Default Private Key Directory])
PINEVAR(smime-cacert-directory, DF_CACERT_DIR, [.alpine-smime/ca], [Default Cert Authority Directory])
PINEVAR_UNQUOTED(default-printer, DF_DEFAULT_PRINTER, [ANSI_PRINTER], [Default printer])
dnl set PASSFILE?
AC_ARG_WITH(passfile,
AC_HELP_STRING([--with-passfile=FILENAME],[Password cache file (NOT secure, NOT recommended)]),
[
case "$withval" in
no)
;;
yes)
;;
*)
alpine_PASSFILE=$withval
;;
esac
])
dnl os-specific credential cache?
AC_ARG_WITH(local-password-cache,
AC_HELP_STRING([--without-local-password-cache],[Disable OS-specific password cache, if supported]),
[
alpine_os_credential_cache=$withval
])
dnl Particular os-specific credential cache?
AC_ARG_WITH(local-password-cache-method,
AC_HELP_STRING([--with-local-password-cache-method],[OS-specific credential cache (OSX=APPLEKEYCHAIN, Windows=WINCRED)]),
[
alpine_os_credential_cache_method=$withval
])
if test -n "$alpine_PASSFILE" ; then
case $alpine_os_credential_cache in
no)
;;
*)
alpine_os_credential_cache="no"
AC_MSG_NOTICE([--with-passfile definition overrides OS-Specific password caching])
;;
esac
AC_DEFINE_UNQUOTED([PASSFILE], "$alpine_PASSFILE", [Password cache file (NOT secure. NOT recommended)])
fi
dnl set DF_SSHPATH?
AC_ARG_WITH(default-sshpath,
AC_HELP_STRING([--with-default-sshpath=FILENAME],[set default value of ssh command path (defining should cause ssh to be preferred to rsh)]),
[
case "$withval" in
no)
;;
yes)
;;
*)
AC_DEFINE_UNQUOTED([DF_SSHPATH], "$withval", [set default value of ssh command path (defining should cause ssh to be preferred to rsh)])
;;
esac
])
dnl set DF_SSHCMD?
AC_ARG_WITH(default-sshcmd,
AC_HELP_STRING([--with-default-sshcmd=PERCENT_S_STRING],[set default value of ssh command string (usually "%s %s -l %s exec /etc/r%sd")]),
[
case "$withval" in
no)
;;
yes)
;;
*)
AC_DEFINE_UNQUOTED([DF_SSHCMD], "$withval", [set default value of ssh command string (usually "%s %s -l %s exec /etc/r%sd")])
;;
esac
])
dnl Include SSL?
dnl Set SSLDIR for c-client make
AC_ARG_WITH(ssl,
AC_HELP_STRING([--without-ssl],[Disable SSL support (OpenSSL)]),
[ with_ssl=$withval ])
if test "x$with_ssl" = "xno" ; then
alpine_SSLTYPE="none"
else
dnl preload c-client default locations/options
case $host in
*-linux-gnu)
if test -f /etc/fedora-release -o -f /etc/redhat-release -o -f /etc/redhat_version ; then
alpine_SSLTYPE="nopwd"
if test -d /etc/pki/tls ; then
alpine_SSLDIR="/etc/pki/tls"
else
alpine_SSLDIR="/usr/share/ssl"
fi
elif test -f /etc/SuSE-release ; then
alpine_SSLTYPE="nopwd"
alpine_SSLDIR="/usr/share/ssl"
elif test -d /etc/osso-af-init ; then
alpine_SSLTYPE="nopwd"
alpine_SSLDIR="/usr"
alpine_SSLCERTS="/usr/share/certs"
else
alpine_SSLTYPE="nopwd"
alpine_SSLDIR="/usr"
alpine_SSLCERTS="/etc/ssl/certs"
fi
;;
*-apple-darwin*)
alpine_SSLTYPE="nopwd"
alpine_SSLCERTS="/System/Library/OpenSSL/certs"
;;
*-openbsd*)
alpine_SSLTYPE="nopwd"
alpine_SSLDIR="/usr"
alpine_SSLCERTS="/etc/ssl/certs"
;;
*-sco-sysv* | *-sysv*UnixWare | *-sysv*OpenUNIX)
alpine_SSLTYPE="sco.nopwd"
alpine_SSLDIR=/usr/local/ssl
;;
*-*-solaris*)
if test -d /usr/sfw/include/openssl ; then
alpine_SSLDIR="/usr/sfw"
elif test -d /opt/csw/include/openssl ; then
alpine_SSLDIR="/opt/csw"
if test -d /opt/csw/ssl/certs ; then
alpine_SSLCERTS="/opt/csw/ssl/certs"
fi
fi
if test -z "$alpine_SSLCERTS" -a -d /etc/certs ; then
alpine_SSLCERTS="/etc/certs"
fi
;;
*)
alpine_SSLTYPE="nopwd"
alpine_SSLDIR=/usr/local/ssl
;;
esac
AC_ARG_WITH(ssl-dir,
AC_HELP_STRING([--with-ssl-dir=DIR], [Root of SSL lib/include path]),
[
if test "x$withval" != "xno" ; then
alpine_SSLDIR=$withval
fi
])
AC_ARG_WITH(ssl-certs-dir,
AC_HELP_STRING([--with-ssl-certs-dir=DIR], [Path to SSL certificate directory]),
[
if test "x$withval" != "xno" ; then
alpine_SSLCERTS=$withval
fi
])
AC_ARG_WITH(ssl-include-dir,
AC_HELP_STRING([--with-ssl-include-dir=DIR], [SSL include file path]),
[
if test "x$withval" != "xno" ; then
alpine_SSLINCLUDE=$withval
fi
])
AC_ARG_WITH(ssl-lib-dir,
AC_HELP_STRING([--with-ssl-lib-dir=DIR], [SSL library path]),
[
if test "x$withval" != "xno" ; then
alpine_SSLLIB=$withval
fi
])
dnl setup globals so tests below work
if test -n "$alpine_SSLINCLUDE" ; then
CPPCFLAGS="-I$alpine_SSLINCLUDE $CPPFLAGS"
elif test -n "$alpine_SSLDIR" ; then
CPPFLAGS="-I${alpine_SSLDIR}/include $CPPFLAGS"
fi
if test -n "$alpine_SSLLIB" ; then
LDFLAGS="-L$alpine_SSLLIB $LDFLAGS"
elif test -n "$alpine_SSLDIR" ; then
LDFLAGS="-L${alpine_SSLDIR}/lib $LDFLAGS"
fi
fi
dnl Include Kerberos?
dnl Set GSSDIR for c-client make
AC_ARG_WITH(krb5,
AC_HELP_STRING([--without-krb5],[Disable Kerberos support]),
[ with_krb5=$withval ])
if test "x$with_krb5" = "xno" ; then
alpine_GSSTYPE="none"
else
alpine_GSSTYPE=
AC_ARG_WITH(krb5-dir,
AC_HELP_STRING([--with-krb5-dir=DIR], [Root of Kerberos lib/include path]),
[
if test "x$withval" != "xno" ; then
CPPFLAGS="$CPPFLAGS -I${withval}/include"
LDFLAGS="$LDFLAGS -L${withval}/lib"
fi
])
AC_ARG_WITH(krb5-include-dir,
AC_HELP_STRING([--with-krb5-include-dir=DIR], [Kerberos include file path]),
[
if test "x$withval" != "xno" ; then
CPPFLAGS="$CPPFLAGS -I$withval"
fi
])
AC_ARG_WITH(krb5-lib-dir,
AC_HELP_STRING([--with-krb5-lib-dir=DIR], [Kerberos library path]),
[
if test "x$withval" != "xno" ; then
LDFLAGS="$LDFLAGS -L$withval"
fi
])
fi
dnl Include LDAP?
AC_ARG_WITH(ldap,
AC_HELP_STRING([--without-ldap],[Disable LDAP query support]),
[ with_ldap=$withval ])
if test "x$with_ldap" = "xno" ; then
alpine_with_ldap=
AC_MSG_NOTICE([Excluding LDAP Support])
else
dnl Do stuff to figure out where OpenLDAP is
alpine_with_ldap=yes
AC_ARG_WITH(ldap-dir,
AC_HELP_STRING([--with-ldap-dir=DIR], [Root of LDAP lib/include path]),
[
if test "x$withval" != "xno" ; then
CPPFLAGS="$CPPFLAGS -I${withval}/include"
LDFLAGS="$LDFLAGS -L${withval}/lib"
fi
])
AC_ARG_WITH(ldap-include-dir,
AC_HELP_STRING([--with-ldap-include-dir=DIR], [Directory containing LDAP include files]),
[
if test "x$withval" != "xno" ; then
CPPFLAGS="$CPPFLAGS -I$withval"
fi
])
AC_ARG_WITH(ldap-lib-dir,
AC_HELP_STRING([--with-ldap-lib-dir=DIR], [LDAP library path]),
[
if test "x$withval" != "xno" ; then
LDFLAGS="$LDFLAGS -L$withval"
fi
])
fi
dnl Include SMIME?
AC_ARG_WITH(smime,
AC_HELP_STRING([--without-smime],[Disable S/MIME]),
[ with_smime=$withval ])
dnl Include TCL?
AC_ARG_WITH(tcl,
AC_HELP_STRING([--without-tcl],[Disable TCL, thus Web Alpine support]),
[ with_tcl=$withval ])
if test "x$with_tcl" = "xno" ; then
WEB_BUILD=
AC_MSG_NOTICE([Excluding TCL Support, and thus Web Alpine Support])
else
AC_ARG_WITH(tcl-lib,
AC_HELP_STRING([--with-tcl-lib=LIBRARY], [Specific TCL Library, like \"tcl8.4\"]),
[
if test "x$withval" != "xno" ; then
alpine_TCLLIB=$withval
fi
])
AC_ARG_WITH(tcl-include,
AC_HELP_STRING([--with-tcl-include=DIR], [Directory containing TCL include files]),
[
if test "x$withval" != "xno" ; then
CPPFLAGS="$CPPFLAGS -I$withval"
alpine_TCLINC=$withval
fi
])
fi
AC_ARG_WITH(supplied-regex,
AC_HELP_STRING([--with-supplied-regex],[Use regex library supplied with alpine]),
[ alpine_REGEX=$withval ])
AC_ARG_WITH(pthread,
AC_HELP_STRING([--without-pthread],[Do NOT test for nor build with POSIX thread support]),
[ with_pthread=$withval ])
AC_ARG_WITH(system-mail-directory,
AC_HELP_STRING([--with-system-mail-directory=DIR], [Directory where local mail is delivered]),
[
if test "x$withval" != "xno" ; then
alpine_with_local_maildir="$withval"
fi
])
AC_ARG_WITH(c-client-target,
AC_HELP_STRING([--with-c-client-target=TARGET], [IMAP build target (see imap/Makefile)]),
[
if test "x$withval" != "xno" ;then
alpine_with_c_client_target="$withval"
fi
])
dnl Without IPv6?
AC_ARG_WITH(ipv6,
AC_HELP_STRING([--without-ipv6],[Disable IPv6, primarily to work around resolver problems]),
[ with_ipv6=$withval ])
if test "x$with_ipv6" = "xno" ; then
AC_MSG_NOTICE([Excluding IPv6 Support])
c_client_specials="${c_client_specials}IP6=4 "
c_client_ip6="true"
else
c_client_ip6="touch imap/ip6"
fi
dnl CHECK LIBRARIES
if test x$enable_dmalloc = "xyes" ; then
if test "x$with_pthread" = "xyes" ; then
dmalloc_lib=dmallocth
else
dmalloc_lib=dmalloc
fi
AC_CHECK_LIB($dmalloc_lib,dmalloc_shutdown,,
[
AC_ERROR([$dmalloc_lib requested, but -ldmalloc not found])
])
fi
dnl which terminal cabability database
AC_CHECK_LIB(tinfo, setupterm,
[
alpine_termdata=info
LIBS="$LIBS -ltinfo"
],
[
AC_CHECK_LIB(ncurses, setupterm,
[
alpine_termdata=info
LIBS="$LIBS -lncurses"
],
[
AC_CHECK_LIB(curses, setupterm,
[
alpine_termdata=info
LIBS="$LIBS -lcurses"
],
[
AC_CHECK_LIB(termlib, tgetent,
[
alpine_termdata=cap
LIBS="$LIBS -ltermlib"
],
[
AC_CHECK_LIB(termcap, tgetent,
[
alpine_termdata=cap
LIBS="$LIBS -ltermcap"
],
[
AC_ERROR([Terminfo/termcap not found])
])
])
])
])
])
case $alpine_termdata in
info)
AC_DEFINE(HAS_TERMINFO, [1], [Define if systems uses terminfo terminal database])
;;
cap)
AC_DEFINE(HAS_TERMCAP, [1], [Define if systems uses termcap terminal database])
;;
esac
dnl provide LDAP support?
if test "$alpine_with_ldap" = "yes" ; then
alpine_has_ldap=
AC_CHECK_LIB(lber, ber_alloc,
[
LIBS="$LIBS -llber"
])
AC_SEARCH_LIBS(ldap_init,ldap,
[
alpine_has_ldap=yes
],
[
AC_SEARCH_LIBS(ldap_open,ldap,
[
alpine_has_ldap=yes
])
])
if test "$alpine_has_ldap" = "yes" ; then
AC_MSG_NOTICE([Including LDAP Support])
AC_DEFINE([ENABLE_LDAP], [], [Enable LDAP query support])
dnl we use deprecated functions (ldap_get_values)
dnl OpenLDAP 2.3.x doesn't define LDAP_DEPRECATED by default like 2.2.x
AC_MSG_CHECKING([if we should define LDAP_DEPRECATED])
AC_RUN_IFELSE(
[AC_LANG_SOURCE([[
#include <stdio.h>
#include <string.h>
#include <ldap.h>
int main(void) {
if (LDAP_VENDOR_VERSION >= 20300)
exit(0);
exit(2);
}
]])],
[
AC_MSG_RESULT(yes)
AC_DEFINE(LDAP_DEPRECATED, 1,
[Define if you use OpenLDAP 2.3.x deprecated functions])
],
[
AC_MSG_RESULT(no)
],
[
AC_MSG_WARN([cross compiling: not checking])
]
)
else
AC_MSG_NOTICE([Cannot find LDAP functions! Excluding LDAP support.])
fi
fi