-
Notifications
You must be signed in to change notification settings - Fork 145
/
Makefile.am
2208 lines (1918 loc) · 56.9 KB
/
Makefile.am
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
#
# @configure_input@
#
# Copyright (c) 1994-2008 Carnegie Mellon University. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in
# the documentation and/or other materials provided with the
# distribution.
#
# 3. The name "Carnegie Mellon University" must not be used to
# endorse or promote products derived from this software without
# prior written permission. For permission or any legal
# details, please contact
# Carnegie Mellon University
# Center for Technology Transfer and Enterprise Creation
# 4615 Forbes Avenue
# Suite 302
# Pittsburgh, PA 15213
# (412) 268-7393, fax: (412) 268-7395
# innovation@andrew.cmu.edu
#
# 4. Redistributions of any form whatsoever must retain the following
# acknowledgment:
# "This product includes software developed by Computing Services
# at Carnegie Mellon University (http://www.cmu.edu/computing/)."
#
# CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
# THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
# AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
# FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
# AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
# OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#
ACLOCAL_AMFLAGS = -I cmulocal
AM_CFLAGS = @PERL_CCCDLFLAGS@ $(GCOV_CFLAGS)
AM_CXXFLAGS = $(GCOV_CXXFLAGS)
AM_CPPFLAGS = \
$(COM_ERR_CPPFLAGS) \
-I${top_builddir} \
-I${top_builddir}/lib \
-I${top_srcdir} \
-I${top_srcdir}/lib \
-DLIBEXEC_DIR=\"$(libexecdir)\" \
-DSBIN_DIR=\"$(sbindir)\" \
-DSYSCONF_DIR=\"$(sysconfdir)\" \
${DEFS} \
${LOCALDEFS} \
$(SASLFLAGS) \
$(SSL_CPPFLAGS) \
$(ICU_CFLAGS)
if HAVE_LDAP
AM_CPPFLAGS += $(LDAP_CPPFLAGS)
endif # HAVE_LDAP
AM_LDFLAGS = $(COV_LDFLAGS) $(ICU_LIBS)
# have distcheck try to build with all optional components enabled, to aid
# detection of missing files for these components
AM_DISTCHECK_CONFIGURE_FLAGS = \
--enable-http \
--enable-calalarmd \
--enable-replication \
--with-openssl=yes \
--enable-nntp \
--enable-murder \
--enable-idled \
--enable-sieve \
--enable-autocreate \
--enable-backup \
--enable-xapian \
--enable-jmap \
--with-ldap
BUILT_SOURCES = \
lib/imapopts.c \
lib/imapopts.h
CLEANFILES = \
lib/chartable.c \
lib/imapopts.c \
lib/imapopts.h
DISTCLEANFILES = \
com_err/et/compile_et \
imap/http_err.c \
imap/http_err.h \
imap/imap_err.c \
imap/imap_err.h \
imap/jmap_err.c \
imap/jmap_err.h \
imap/lmtp_err.c \
imap/lmtp_err.h \
imap/mupdate_err.c \
imap/mupdate_err.h \
imap/nntp_err.c \
imap/nntp_err.h \
imap/promdata.c \
imap/promdata.h \
imap/tz_err.c \
imap/tz_err.h \
perl/sieve/scripts/installsieve \
perl/sieve/scripts/sieveshell \
sieve/sieve_err.c \
sieve/sieve_err.h
MAINTAINERCLEANFILES = \
doc/legacy/murder.png \
doc/legacy/netnews.png \
imap/http_caldav_js.h \
imap/http_carddav_js.h \
man/imapd.conf.5 \
man/sieveshell.1 \
sieve/addr.h \
sieve/sieve.h
SUBDIRS = .
DIST_SUBDIRS = . perl/annotator perl/imap perl/sieve/managesieve
dist_sbin_SCRIPTS =
dist_sysconf_DATA =
lib_LTLIBRARIES = lib/libcyrus_min.la lib/libcyrus.la
check_PROGRAMS =
libexec_PROGRAMS =
sbin_PROGRAMS =
noinst_HEADERS =
noinst_LTLIBRARIES =
noinst_PROGRAMS =
if COM_ERR
COMPILE_ET_DEP = com_err/et/compile_et
BUILT_SOURCES += com_err/et/compile_et com_err/et/libcyrus_com_err.la
lib_LTLIBRARIES += com_err/et/libcyrus_com_err.la
endif # COM_ERR
bin_PROGRAMS = imtest/imtest
if SERVER
BUILT_SOURCES += \
imap/http_err.c \
imap/http_err.h \
imap/imap_err.c \
imap/imap_err.h \
imap/lmtp_err.c \
imap/lmtp_err.h \
imap/mupdate_err.c \
imap/mupdate_err.h \
imap/promdata.c \
imap/promdata.h \
lib/htmlchar.c \
lib/htmlchar.h \
imap/rfc822_header.c \
imap/rfc822_header.h \
imap/mailbox_header_cache.h
lib_LTLIBRARIES += imap/libcyrus_imap.la
libexec_PROGRAMS += \
master/master \
imap/imapd \
imap/lmtpd \
imap/pop3d \
imap/promstatsd \
imap/smmapd \
ptclient/ptloader
sbin_PROGRAMS += \
imap/arbitron \
imap/chk_cyrus \
imap/ctl_conversationsdb \
imap/ctl_cyrusdb \
imap/ctl_deliver \
imap/ctl_mboxlist \
imap/cvt_cyrusdb \
imap/cyr_df \
imap/cyr_ls \
imap/cyr_pwd \
imap/cyr_withlock_run \
imap/cyrdump \
imap/cyr_dbtool \
imap/cyr_deny \
imap/cyr_expire \
imap/cyr_info \
imap/cyr_buildinfo \
imap/cyr_synclog \
imap/cyr_userseen \
imap/cyr_virusscan \
imap/deliver \
imap/ipurge \
imap/mbexamine \
imap/mbpath \
imap/mbtool \
imap/quota \
imap/reconstruct \
imap/relocate_by_id \
imap/cvt_xlist_specialuse \
ptclient/ptdump \
ptclient/ptexpire
dist_sbin_SCRIPTS += \
imap/cyr_cd.sh
noinst_PROGRAMS += \
imap/message_test \
imap/search_test
if USE_SQUAT
noinst_PROGRAMS += imap/squat_dump
endif
if SQUATTER
# Despite the name, the squatter program handles any search engine
sbin_PROGRAMS += imap/squatter
endif
if NNTPD
libexec_PROGRAMS += imap/nntpd
sbin_PROGRAMS += imap/fetchnews
BUILT_SOURCES += imap/nntp_err.c
endif # NNTPD
libexec_PROGRAMS += imap/fud
if IDLED
libexec_PROGRAMS += imap/idled
endif # IDLED
if MURDER
libexec_PROGRAMS += imap/mupdate
endif # MURDER
if CALALARMD
libexec_PROGRAMS += imap/calalarmd
endif
if HTTPD
AM_CPPFLAGS += $(HTTP_CPPFLAGS)
AM_LDFLAGS += $(HTTP_LIBS)
BUILT_SOURCES += \
imap/http_caldav_js.h \
imap/http_carddav_js.h \
imap/tz_err.c \
imap/tz_err.h
libexec_PROGRAMS += imap/httpd
check_PROGRAMS += imap/ical_apply_patch
sbin_PROGRAMS += \
imap/ctl_zoneinfo \
imap/dav_reconstruct
endif # HTTPD
if REPLICATION
libexec_PROGRAMS += imap/sync_server
sbin_PROGRAMS += imap/sync_client imap/sync_reset
endif # REPLICATION
if BACKUP
noinst_LTLIBRARIES += backup/libcyrus_backup.la
noinst_HEADERS += backup/backup.h
libexec_PROGRAMS += backup/backupd
sbin_PROGRAMS += backup/ctl_backups backup/cyr_backup backup/restore
endif # BACKUP
if HAVE_SSL
sbin_PROGRAMS += imap/tls_prune
endif # HAVE_SSL
sbin_PROGRAMS += imap/unexpunge
if SIEVE
check_PROGRAMS += notifyd/notifytest
libexec_PROGRAMS += notifyd/notifyd
endif # SIEVE
endif # SERVER
if CMULOCAL
dist_sysconf_DATA += depot/rc.local.imap depot/rc.local.ptclient
sbin_PROGRAMS += netnews/remotepurge
endif # CMULOCAL
if PERL
SUBDIRS += perl/annotator perl/imap
noinst_LTLIBRARIES += perl/libcyrus.la perl/libcyrus_min.la
endif # PERL
if SIEVE
if PERL
SUBDIRS += perl/sieve/managesieve
noinst_LTLIBRARIES += perl/sieve/lib/libisieve.la
endif # PERL
BUILT_SOURCES += sieve/addr.c sieve/sieve.c sieve/sieve_err.c
noinst_LTLIBRARIES += sieve/libcyrus_sieve_lex.la
lib_LTLIBRARIES += sieve/libcyrus_sieve.la
check_PROGRAMS += sieve/test sieve/test_mailbox
sbin_PROGRAMS += sieve/sievec sieve/sieved
if SERVER
libexec_PROGRAMS += timsieved/timsieved
endif # SERVER
endif # SIEVE
EXTRA_DIST = \
COPYING \
README.md \
VERSION \
cassandane \
com_err/et/et_c.awk \
com_err/et/et_h.awk \
com_err/et/test1.et \
com_err/et/test2.et \
com_err/et/test_et.c \
contrib/sieve-spamassassin \
contrib/fud-client.c \
contrib/deliver-notify-zephyr.patch \
contrib/add-cyrus-user \
contrib/README \
contrib/cyrusv2.mc \
contrib/dkim_canon_ischedule.patch \
contrib/notify_unix/notify \
contrib/notify_unix/net-server-prefork-0.01.tgz \
contrib/notify_unix/README \
contrib/notify_unix/sql_notify.pl \
contrib/notify_unix/simple_notify.pl \
contrib/squatrunner.pl \
contrib/mupdate-test.pl \
contrib/squatrunner.txt \
cunit/cacert.pem \
cunit/cert.pem \
cunit/cunit.pl \
cunit/cunit-to-junit.pl \
cunit/key.pem \
cunit/vg.supp \
doc/legacy/murder.png \
doc/legacy/netnews.png \
doc \
docsrc \
imap/http_caldav.js \
imap/http_carddav.js \
imap/http_err.et \
imap/imap_err.et \
imap/jmap_err.et \
imap/lmtp_err.et \
imap/mailbox_header_cache.gperf \
imap/mupdate_err.et \
imap/nntp_err.et \
imap/promdata.p \
imap/rfc822_header.st \
imap/tz_err.et \
lib/charset/aliases.txt \
lib/charset/UnicodeData.txt \
lib/charset/unifix.txt \
lib/charset/us-ascii.t \
lib/htmlchar.st \
lib/imapoptions \
man/arbitronsort.pl.1 \
man/masssievec.8 \
man/mkimap.8 \
man/mknewsgroups.8 \
man/rehash.8 \
man/translatesieve.8 \
master/README \
netnews/inn.diffs \
perl/annotator/Daemon.pm \
perl/annotator/Makefile.PL \
perl/annotator/Makefile.PL.in \
perl/annotator/MANIFEST \
perl/annotator/MANIFEST.in \
perl/annotator/Message.pm \
perl/annotator/README \
perl/imap/Changes \
perl/imap/cyradm.sh \
perl/imap/cyrperl.h \
perl/imap/examples/auditmbox.pl \
perl/imap/examples/imapcollate.pl \
perl/imap/examples/imapdu.pl \
perl/imap/IMAP/Admin.pm \
perl/imap/IMAP/Shell.pm \
perl/imap/IMAP.pm \
perl/imap/IMAP.xs \
perl/imap/Makefile.PL \
perl/imap/Makefile.PL.in \
perl/imap/MANIFEST \
perl/imap/MANIFEST.in \
perl/imap/README \
perl/imap/t/01-imclient.t \
perl/imap/t/02-admin.t \
perl/imap/typemap \
perl/imap/xsutil.c \
perl/sieve/managesieve/Makefile.PL \
perl/sieve/managesieve/Makefile.PL.in \
perl/sieve/managesieve/managesieve.h \
perl/sieve/managesieve/managesieve.pm \
perl/sieve/managesieve/managesieve.xs \
perl/sieve/managesieve/MANIFEST \
perl/sieve/managesieve/MANIFEST.in \
perl/sieve/managesieve/typemap \
ptclient/README \
ptclient/test.c \
ptclient/test2.c \
sieve/addr.h \
sieve/sieve.h \
sieve/sieve_err.et \
sieve/tests/testExtension \
sieve/tests/testExtension/uberExtensionTestScript.key \
sieve/tests/testExtension/testm \
sieve/tests/testExtension/testm/uetest-envelope \
sieve/tests/testExtension/testm/uetest-asub \
sieve/tests/testExtension/testm/uetest-areg \
sieve/tests/testExtension/testm/uetest-count \
sieve/tests/testExtension/testm/uetest-value \
sieve/tests/testExtension/testm/uetest-hreg \
sieve/tests/testExtension/serverm \
sieve/tests/testExtension/serverm/uetmail-hreg \
sieve/tests/testExtension/serverm/uetmail-value \
sieve/tests/testExtension/serverm/uetmail-count2 \
sieve/tests/testExtension/serverm/uetmail-envelope \
sieve/tests/testExtension/serverm/uetmail-asub \
sieve/tests/testExtension/serverm/uetmail-value2 \
sieve/tests/testExtension/serverm/uetmail-areg \
sieve/tests/testExtension/serverm/uetmail-count \
sieve/tests/testExtension/uberExtensionTestScript.s \
sieve/tests/README \
sieve/tests/action \
sieve/tests/action/testm \
sieve/tests/action/testm/uatest-keep \
sieve/tests/action/testm/uatest-redirect \
sieve/tests/action/testm/uatest-discard \
sieve/tests/action/testm/uatest-stop2 \
sieve/tests/action/testm/uatest-stop \
sieve/tests/action/serverm \
sieve/tests/action/serverm/uamail-stop2 \
sieve/tests/action/serverm/uamail-redirect \
sieve/tests/action/serverm/uamail-stop \
sieve/tests/action/serverm/uamail-keep \
sieve/tests/action/serverm/uamail-discard \
sieve/tests/action/uberActionScript.key \
sieve/tests/action/uberActionScript.s \
sieve/tests/test \
sieve/tests/test/uberTestScript.key \
sieve/tests/test/testm \
sieve/tests/test/testm/utest-header \
sieve/tests/test/testm/utest-address \
sieve/tests/test/serverm \
sieve/tests/test/serverm/utmail-address \
sieve/tests/test/serverm/utmail-header \
sieve/tests/test/uberTestScript.s \
sieve/tests/actionExtensions \
sieve/tests/actionExtensions/uberExtensionActionScript.s \
sieve/tests/actionExtensions/testm \
sieve/tests/actionExtensions/testm/ueatest-flag4 \
sieve/tests/actionExtensions/testm/ueatest-flag2 \
sieve/tests/actionExtensions/testm/ueatest-fileinto \
sieve/tests/actionExtensions/testm/ueatest-denotify \
sieve/tests/actionExtensions/testm/ueatest-vacation \
sieve/tests/actionExtensions/testm/ueatest-reject \
sieve/tests/actionExtensions/testm/ueatest-mark \
sieve/tests/actionExtensions/testm/ueatest-denotify2 \
sieve/tests/actionExtensions/testm/ueatest-flag5 \
sieve/tests/actionExtensions/testm/ueatest-notify2 \
sieve/tests/actionExtensions/testm/ueatest-notify \
sieve/tests/actionExtensions/testm/ueatest-flag1 \
sieve/tests/actionExtensions/testm/ueatest-flag3 \
sieve/tests/actionExtensions/testm/ueatest-unmark \
sieve/tests/actionExtensions/uberExtensionActionScript.key \
sieve/tests/actionExtensions/serverm \
sieve/tests/actionExtensions/serverm/ueamail-flag4 \
sieve/tests/actionExtensions/serverm/ueamail-denotify \
sieve/tests/actionExtensions/serverm/ueamail-mark \
sieve/tests/actionExtensions/serverm/ueamail-denotify2 \
sieve/tests/actionExtensions/serverm/ueamail-flag2 \
sieve/tests/actionExtensions/serverm/ueamail-unmark \
sieve/tests/actionExtensions/serverm/ueamail-reject \
sieve/tests/actionExtensions/serverm/ueamail-flag3 \
sieve/tests/actionExtensions/serverm/ueamail-fileinto \
sieve/tests/actionExtensions/serverm/ueamail-flag1 \
sieve/tests/actionExtensions/serverm/ueamail-notify \
sieve/tests/actionExtensions/serverm/ueamail-flag5 \
sieve/tests/actionExtensions/serverm/ueamail-notify2 \
sieve/tests/actionExtensions/serverm/ueamail-vacation \
timsieved/TODO
TEXINFO_TEX = com_err/et/texinfo.tex
dist_noinst_SCRIPTS = \
com_err/et/compile_et.sh \
com_err/et/config_script \
imap/promdatagen \
lib/mkchartable.pl \
perl/sieve/scripts/installsieve.pl \
perl/sieve/scripts/sieveshell.pl \
tools/arbitronsort.pl \
tools/compile_st.pl \
tools/config2header \
tools/config2rst \
tools/config2sample \
tools/fixsearchpath.pl \
tools/git-version.sh \
tools/masssievec \
tools/mkimap \
tools/mknewsgroups \
tools/perl2rst \
tools/rehash \
tools/translatesieve
noinst_MAN = \
com_err/et/com_err.3 \
com_err/et/compile_et.1
noinst_TEXINFOS = com_err/et/com_err.texinfo
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = libcyrus_min.pc libcyrus.pc libcyrus_sieve.pc libcyrus_imap.pc
com_err_et_libcyrus_com_err_la_SOURCES = \
com_err/et/com_err.c \
com_err/et/com_err.h \
com_err/et/error_message.c \
com_err/et/error_table.h \
com_err/et/et_name.c \
com_err/et/init_et.c \
com_err/et/internal.h \
com_err/et/mit-sipb-copyright.h
com_err_et_libcyrus_com_err_la_CFLAGS = $(AM_CFLAGS) $(CFLAG_VISIBILITY)
com_err/et/compile_et: com_err/et/compile_et.sh com_err/et/config_script \
config.h
@${top_srcdir}/com_err/et/config_script ${top_srcdir}/com_err/et/compile_et.sh ${AWK} ${SED} > $@
@chmod 755 $@
# ---- Libraries ----
# SIEVE is the libraries that sieve-using components need to link with
#
# This is empty if sieve is not enabled, so it can be used unconditionally
# elsewhere.
if SIEVE
LD_SIEVE_ADD = sieve/libcyrus_sieve.la $(LD_BASIC_ADD)
else
LD_SIEVE_ADD =
endif
# BASIC is the libraries that every Cyrus program (except master) will
# need to link with.
#
# Note that several places in the code use -lcrypto, e.g. for SHA1 or
# MD5 algorithms, without needing SSL. Currently we have no way of
# minimally linking such code.
LD_BASIC_ADD = lib/libcyrus.la lib/libcyrus_min.la ${LIBS} \
${LIB_SASL} $(SSL_LIBS) $(GCOV_LIBS)
# UTILITY is the libraries that utility programs which use Cyrus'
# mailbox and message handling code need to link with.
LD_UTILITY_ADD = imap/libcyrus_imap.la $(LD_BASIC_ADD) $(LD_SIEVE_ADD) $(COM_ERR_LIBS)
# SERVER is the libraries that network-facing servers need to link with
#
# Note that the code is horribly intertwingled e.g. in imap/global.c
# so that even utilities which never open a socket need to link against
# the SASL library.
LD_SERVER_ADD = $(LD_UTILITY_ADD) $(LIB_WRAP)
# ----
if USE_LIBCHARDET
AM_LDFLAGS += $(LIBCHARDET_LIBS)
AM_CPPFLAGS += $(LIBCHARDET_CFLAGS)
LD_SERVER_ADD += $(LIBCHARDET_LIBS)
endif
if USE_JANSSON
AM_LDFLAGS += $(JANSSON_LIBS)
AM_CPPFLAGS += $(JANSSON_CFLAGS)
LD_SERVER_ADD += $(JANSSON_LIBS)
endif
if HAVE_GUESSTZ
AM_LDFLAGS += $(GUESSTZ_LIBS)
AM_CPPFLAGS += $(GUESSTZ_CFLAGS)
LD_SERVER_ADD += $(GUESSTZ_LIBS)
endif
if CUNIT
CUNIT_PROJECT = cunit/default.cunit
BUILT_SOURCES += cunit/registers.h $(CUNIT_PROJECT)
CLEANFILES += cunit/registers.h $(CUNIT_PROJECT)
check_PROGRAMS += cunit/unit
cunit_FRAMEWORK = \
cunit/unit.c \
cunit/cyrunit.h \
cunit/syslog.c \
cunit/cunit-syslog.h \
cunit/timeout.c \
cunit/timeout.h \
cunit/timezones.c \
cunit/timezones.h \
cunit/timeofday.c \
cunit/timeofday.h
cunit_TESTS = \
cunit/aaa-db.testc \
cunit/annotate.testc \
cunit/arrayu64.testc \
cunit/backend.testc \
cunit/binhex.testc \
cunit/bitvector.testc \
cunit/buf.testc \
cunit/bufarray.testc \
cunit/byteorder.testc \
cunit/charset.testc \
cunit/command.testc \
cunit/conversations.testc \
cunit/cyr_qsort_r.testc \
cunit/crc32.testc \
cunit/dlist.testc \
cunit/duplicate.testc \
cunit/getxstring.testc \
cunit/glob.testc \
cunit/guid.testc \
cunit/hash.testc \
cunit/hashset.testc \
cunit/imapurl.testc \
cunit/imparse.testc \
cunit/libconfig.testc \
cunit/mailbox.testc \
cunit/mboxname.testc \
cunit/md5.testc \
cunit/message.testc \
cunit/message_iter_msgid.testc \
cunit/message_guid.testc \
cunit/parseaddr.testc \
cunit/parse.testc \
cunit/proc.testc \
cunit/procinfo.testc \
cunit/prot.testc \
cunit/ptrarray.testc \
cunit/quota.testc \
cunit/rfc822tok.testc \
cunit/search_expr.testc \
cunit/seqset.testc \
cunit/slowio.testc \
cunit/smallarrayu64.testc
if SIEVE
cunit_TESTS += cunit/sieve.testc
endif
cunit_TESTS += \
cunit/spool.testc \
cunit/squat.testc \
cunit/strarray.testc \
cunit/strconcat.testc \
cunit/strhash.testc \
cunit/stristr.testc \
cunit/times.testc \
cunit/tok.testc \
cunit/vparse.testc \
cunit/dynarray.testc \
cunit/xsha1.testc
if HTTPD
cunit_TESTS += cunit/ical_support.testc
endif
cunit_unit_SOURCES = $(cunit_FRAMEWORK) $(cunit_TESTS) \
imap/mutex_fake.c imap/spool.c imap/search_expr.c
cunit_unit_LDADD = $(LD_SIEVE_ADD) $(LD_UTILITY_ADD) -lcunit
CUNIT_PL = $(top_srcdir)/cunit/cunit.pl --project $(CUNIT_PROJECT)
# don't discard the temporary source file if building with coverage
if HAVE_COVERAGE
CUNIT_RM = true
else
CUNIT_RM = $(RM)
endif
.testc.o:
$(AM_V_at)$(CUNIT_PL) --generate-wrapper $<
$(AM_V_CC)$(COMPILE) -c -o $@ $<-cunit.c
$(AM_V_at)$(CUNIT_RM) $<-cunit.c
$(CUNIT_PROJECT):
$(AM_V_at)$(RM) $@
$(AM_V_GEN)$(CUNIT_PL) --add-sources $(addprefix $(top_srcdir)/,$(cunit_TESTS))
cunit/registers.h: $(CUNIT_PROJECT)
$(AM_V_GEN)$(CUNIT_PL) --generate-register-function $@
# To run under Valgrind, do: make VG=1 check
VALGRIND = libtool --mode=execute valgrind \
--tool=memcheck \
--leak-check=full \
--suppressions=vg.supp \
--error-exitcode=75
check-local:
@echo "Running unit tests"
@vg= ; \
test -z "$$VG" || vg="$(VALGRIND)" ; \
f="-v" ; \
test "x$$CUFORMAT" = xjunit && f="-x" ; \
cd cunit ; \
$$vg ./unit $$f ; \
retval=$$? ; \
if [ "x$$CUFORMAT" = xjunit ] ; then \
$(RM) -rf reports ; mkdir reports ; ./cunit-to-junit.pl ; \
fi ; \
exit $$retval
# Run every test individually, as if you had run them one at a time as
# `make check-suitename:testname` manually. Mainly useful for detecting
# abstraction failures within our testing infrastructure -- if tests
# succeed with `make check` but fail with `make check-discrete`, or
# vice-versa, some state is leaking between tests!
#
# This assumes your sh supports arithmetic and process substitutions.
# Sorry <3
check-discrete: cunit/unit
@echo "Running unit tests, one at a time"
@vg= ; \
test -z "$$VG" || vg="$(VALGRIND) --quiet --log-fd=3" ; \
cd cunit ; \
fails=0 ; \
tests=0 ; \
while read t ; do \
tests=$$(($$tests + 1)) ; \
if $$vg ./unit $$t >/dev/null 3>&2 2>/dev/null ; then \
echo "[ OK ] $$t" ; \
else \
fails=$$(($$fails + 1)) ; \
echo "[FAILED] $$t" ; \
fi ; \
done < <( ./unit -l ) ; \
echo "$$fails/$$tests tests failed" ; \
exit $$fails
check-%: cunit/unit
@echo "Running unit tests for $*"
@vg= ; \
test -z "$$VG" || vg="$(VALGRIND)" ; \
cd cunit ; \
$$vg ./unit -v $* ; \
retval=$$? ; \
exit $$retval
endif
includedir=@includedir@/cyrus
include_HEADERS = \
lib/acl.h \
lib/arrayu64.h \
lib/assert.h \
lib/auth.h \
lib/auth_pts.h \
lib/bitvector.h \
lib/bloom.h \
lib/bsearch.h \
lib/bufarray.h \
lib/charset.h \
lib/chartable.h \
lib/command.h \
lib/crc32.h \
lib/cyr_lock.h \
lib/cyr_qsort_r.h \
lib/cyrusdb.h \
lib/dynarray.h \
lib/glob.h \
lib/gmtoff.h \
lib/hash.h \
lib/hashset.h \
lib/hashu64.h \
lib/imapurl.h \
lib/imclient.h \
lib/imparse.h \
lib/iostat.h \
lib/iptostring.h \
lib/libcyr_cfg.h \
lib/lsort.h \
lib/map.h \
lib/mappedfile.h \
lib/mkgmtime.h \
lib/mpool.h \
lib/murmurhash2.h \
lib/nonblock.h \
lib/parseaddr.h \
lib/proc.h \
lib/procinfo.h \
lib/retry.h \
lib/rfc822tok.h \
lib/seqset.h \
lib/signals.h \
lib/smallarrayu64.h \
lib/sqldb.h \
lib/strarray.h \
lib/strhash.h \
lib/stristr.h \
lib/times.h \
lib/tok.h \
lib/vparse.h \
lib/wildmat.h \
lib/xmalloc.h \
lib/xunlink.h
nodist_include_HEADERS = \
lib/imapopts.h
nobase_include_HEADERS = sieve/sieve_interface.h
nobase_nodist_include_HEADERS = sieve/sieve_err.h
noinst_HEADERS += \
lib/byteorder.h \
lib/gai.h \
lib/libconfig.h \
lib/md5.h \
lib/prot.h \
lib/ptrarray.h \
lib/slowio.h \
lib/util.h \
lib/xsha1.h \
lib/xstrlcat.h \
lib/xstrlcpy.h \
lib/xstrnchr.h
backup_libcyrus_backup_la_SOURCES = \
lib/gzuncat.c \
lib/gzuncat.h \
backup/lcb.c \
backup/lcb_append.c \
backup/lcb_backupdb.c \
backup/lcb_compact.c \
backup/lcb_indexr.c \
backup/lcb_indexw.c \
backup/lcb_internal.c \
backup/lcb_internal.h \
backup/lcb_partlist.c \
backup/lcb_read.c \
backup/lcb_sqlconsts.c \
backup/lcb_sqlconsts.h \
backup/lcb_verify.c
backup_libcyrus_backup_la_LIBADD = $(LD_BASIC_ADD)
backup_backupd_SOURCES = \
imap/mutex_fake.c \
imap/sync_support.c \
imap/sync_support.h \
master/service.c \
backup/backupd.c
backup_backupd_LDADD = backup/libcyrus_backup.la $(LD_SIEVE_ADD) $(LD_SERVER_ADD)
backup_ctl_backups_SOURCES = \
imap/mutex_fake.c \
imap/sync_support.c \
imap/sync_support.h \
backup/ctl_backups.c
backup_ctl_backups_LDADD = backup/libcyrus_backup.la $(LD_SIEVE_ADD) $(LD_UTILITY_ADD)
backup_cyr_backup_SOURCES = \
imap/mutex_fake.c \
backup/cyr_backup.c
backup_cyr_backup_LDADD = backup/libcyrus_backup.la $(LD_UTILITY_ADD)
backup_restore_SOURCES = \
imap/mutex_fake.c \
imap/sync_support.c \
imap/sync_support.h \
backup/restore.c
backup_restore_LDADD = backup/libcyrus_backup.la $(LD_SIEVE_ADD) $(LD_UTILITY_ADD)
imap_arbitron_SOURCES = imap/arbitron.c imap/cli_fatal.c imap/mutex_fake.c
imap_arbitron_LDADD = $(LD_UTILITY_ADD)
imap_chk_cyrus_SOURCES = imap/chk_cyrus.c imap/cli_fatal.c imap/mutex_fake.c
imap_chk_cyrus_LDADD = $(LD_UTILITY_ADD)
imap_ctl_conversationsdb_SOURCES = imap/ctl_conversationsdb.c imap/mutex_fake.c
imap_ctl_conversationsdb_LDADD = $(LD_UTILITY_ADD)
imap_ctl_cyrusdb_SOURCES = imap/cli_fatal.c imap/ctl_cyrusdb.c imap/mutex_fake.c
imap_ctl_cyrusdb_LDADD = $(LD_UTILITY_ADD)
imap_ctl_deliver_SOURCES = imap/cli_fatal.c imap/ctl_deliver.c imap/mutex_fake.c
imap_ctl_deliver_LDADD = $(LD_UTILITY_ADD)
imap_ctl_mboxlist_SOURCES = imap/cli_fatal.c imap/ctl_mboxlist.c imap/mutex_fake.c
imap_ctl_mboxlist_LDADD = $(LD_UTILITY_ADD)
imap_ctl_zoneinfo_SOURCES = imap/cli_fatal.c imap/ctl_zoneinfo.c imap/mutex_fake.c imap/zoneinfo_db.c imap/xml_support.c
imap_ctl_zoneinfo_LDADD = $(LD_UTILITY_ADD)
imap_cvt_cyrusdb_SOURCES = imap/cli_fatal.c imap/cvt_cyrusdb.c imap/mutex_fake.c
imap_cvt_cyrusdb_LDADD = $(LD_UTILITY_ADD)
imap_cyrdump_SOURCES = imap/cli_fatal.c imap/cyrdump.c imap/mutex_fake.c
imap_cyrdump_LDADD = $(LD_UTILITY_ADD)
imap_cyr_dbtool_SOURCES = imap/cli_fatal.c imap/cyr_dbtool.c imap/mutex_fake.c
imap_cyr_dbtool_LDADD = $(LD_UTILITY_ADD)
imap_cyr_deny_SOURCES = imap/cli_fatal.c imap/cyr_deny.c imap/mutex_fake.c
imap_cyr_deny_LDADD = $(LD_UTILITY_ADD)
imap_cyr_df_SOURCES = imap/cli_fatal.c imap/cyr_df.c imap/mutex_fake.c
imap_cyr_df_LDADD = $(LD_UTILITY_ADD)
imap_cyr_ls_SOURCES = imap/cli_fatal.c imap/cyr_ls.c imap/mutex_fake.c
imap_cyr_ls_LDADD = $(LD_UTILITY_ADD)
imap_cyr_pwd_SOURCES = imap/cli_fatal.c imap/cyr_pwd.c imap/mutex_fake.c
imap_cyr_pwd_LDADD = $(LD_UTILITY_ADD)
imap_cyr_withlock_run_SOURCES = imap/cli_fatal.c imap/cyr_withlock_run.c imap/mutex_fake.c
imap_cyr_withlock_run_LDADD = $(LD_UTILITY_ADD)
imap_cyr_expire_SOURCES = imap/cli_fatal.c imap/cyr_expire.c imap/mutex_fake.c
imap_cyr_expire_LDADD = $(LD_UTILITY_ADD)
imap_cyr_info_SOURCES = imap/cli_fatal.c imap/cyr_info.c imap/mutex_fake.c master/masterconf.c
imap_cyr_info_LDADD = $(LD_UTILITY_ADD)
imap_cyr_buildinfo_SOURCES = imap/cli_fatal.c imap/cyr_buildinfo.c imap/mutex_fake.c master/masterconf.c
imap_cyr_buildinfo_LDADD = $(LD_UTILITY_ADD)
imap_cyr_synclog_SOURCES = imap/cli_fatal.c imap/cyr_synclog.c imap/mutex_fake.c
imap_cyr_synclog_LDADD = $(LD_UTILITY_ADD)
imap_cyr_userseen_SOURCES = imap/cli_fatal.c imap/cyr_userseen.c imap/mutex_fake.c
imap_cyr_userseen_LDADD = $(LD_UTILITY_ADD)
imap_cyr_virusscan_SOURCES = imap/cli_fatal.c imap/cyr_virusscan.c imap/mutex_fake.c
imap_cyr_virusscan_CFLAGS = $(AM_CFLAGS) $(CLAMAV_CFLAGS) $(CFLAG_VISIBILITY)
imap_cyr_virusscan_LDADD = $(LD_UTILITY_ADD) $(CLAMAV_LIBS)
imap_deliver_SOURCES = \
imap/deliver.c \
imap/lmtpengine.c \
imap/mutex_fake.c \
imap/proxy.c \
imap/spool.c
nodist_imap_deliver_SOURCES = imap/lmtp_err.c
imap_deliver_LDADD = $(LD_UTILITY_ADD)
imap_fetchnews_SOURCES = imap/cli_fatal.c imap/fetchnews.c imap/mutex_fake.c
imap_fetchnews_LDADD = $(LD_UTILITY_ADD)
imap_fud_SOURCES = imap/fud.c imap/mutex_fake.c master/service.c
imap_fud_LDADD = $(LD_SERVER_ADD)
imap_idled_SOURCES = imap/idled.c imap/mutex_fake.c
imap_idled_LDADD = $(LD_UTILITY_ADD)
imap_calalarmd_SOURCES = imap/calalarmd.c imap/mutex_fake.c
imap_calalarmd_LDADD = $(LD_SERVER_ADD)
imap_imapd_SOURCES = \
imap/imap_proxy.c \
imap/imap_proxy.h \
imap/imapd.c \
imap/imapd.h \
imap/mutex_fake.c \
imap/proxy.c \
imap/proxy.h \
imap/sync_support.c \
imap/sync_support.h \
master/service.c
if AUTOCREATE
imap_imapd_SOURCES += \
imap/autocreate.h \
imap/autocreate.c
endif
imap_imapd_LDADD = $(LD_SIEVE_ADD) $(LD_SERVER_ADD)
imap_ipurge_SOURCES = imap/cli_fatal.c imap/ipurge.c imap/mutex_fake.c
imap_ipurge_LDADD = $(LD_UTILITY_ADD)
nodist_imap_libcyrus_imap_la_SOURCES = \
imap/http_err.c \