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
|
From 9a58361b08e1858e3bc7ea93934b7613261da476 Mon Sep 17 00:00:00 2001
From: Timo Sirainen <timo.sirainen@dovecot.fi>
Date: Mon, 9 Jul 2018 11:33:23 +0300
Subject: [PATCH] m4: Enable rquota only if rpc/rpc.h exists
It's been removed in glibc 2.26
---
m4/quota.m4 | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/m4/quota.m4 b/m4/quota.m4
index 5840e3af89..0695b1e021 100644
--- a/m4/quota.m4
+++ b/m4/quota.m4
@@ -7,8 +7,10 @@ AC_DEFUN([DOVECOT_RPCGEN], [
have_rquota=no
if test -f /usr/include/rpcsvc/rquota.x && test -n "$RPCGEN"; then
- AC_DEFINE(HAVE_RQUOTA,, [Define if you wish to retrieve quota of NFS mounted mailboxes])
- have_rquota=yes
+ AC_CHECK_HEADER([rpc/rpc.h], [
+ AC_DEFINE(HAVE_RQUOTA,, [Define if you wish to retrieve quota of NFS mounted mailboxes])
+ have_rquota=yes
+ ])
fi
AM_CONDITIONAL(HAVE_RQUOTA, test "$have_rquota" = "yes")
])
From 5803ae4bbd420def0072e1660ea7061c0e5dbcb9 Mon Sep 17 00:00:00 2001
From: Timo Sirainen <timo.sirainen@dovecot.fi>
Date: Mon, 9 Jul 2018 11:39:59 +0300
Subject: [PATCH] m4, quota: Support rquota using libtirpc
---
m4/quota.m4 | 13 ++++++++++---
src/plugins/quota/Makefile.am | 3 ++-
2 files changed, 12 insertions(+), 4 deletions(-)
diff --git a/m4/quota.m4 b/m4/quota.m4
index 0695b1e021..d75af447e1 100644
--- a/m4/quota.m4
+++ b/m4/quota.m4
@@ -7,18 +7,25 @@ AC_DEFUN([DOVECOT_RPCGEN], [
have_rquota=no
if test -f /usr/include/rpcsvc/rquota.x && test -n "$RPCGEN"; then
- AC_CHECK_HEADER([rpc/rpc.h], [
- AC_DEFINE(HAVE_RQUOTA,, [Define if you wish to retrieve quota of NFS mounted mailboxes])
+ PKG_CHECK_MODULES(LIBTIRPC, libtirpc, [
have_rquota=yes
+ QUOTA_LIBS="$QUOTA_LIBS \$(LIBTIRPC_LIBS)"
+ ], [
+ AC_CHECK_HEADER([rpc/rpc.h], [
+ have_rquota=yes
+ ])
])
fi
+ if test "$have_rquota" = yes; then
+ AC_DEFINE(HAVE_RQUOTA,, [Define if you wish to retrieve quota of NFS mounted mailboxes])
+ fi
AM_CONDITIONAL(HAVE_RQUOTA, test "$have_rquota" = "yes")
])
AC_DEFUN([DOVECOT_QUOTA], [
AC_SEARCH_LIBS(quota_open, quota, [
AC_DEFINE(HAVE_QUOTA_OPEN,, [Define if you have quota_open()])
- QUOTA_LIBS="-lquota"
+ QUOTA_LIBS="$QUOTA_LIBS -lquota"
])
AC_SUBST(QUOTA_LIBS)
])
diff --git a/src/plugins/quota/Makefile.am b/src/plugins/quota/Makefile.am
index f220d4f075..ffebc67404 100644
--- a/src/plugins/quota/Makefile.am
+++ b/src/plugins/quota/Makefile.am
@@ -19,7 +19,8 @@ AM_CPPFLAGS = \
-I$(top_srcdir)/src/lib-storage/index/imapc \
-I$(top_srcdir)/src/lib-storage/index/maildir \
-I$(top_srcdir)/src/lib-program-client \
- -I$(top_srcdir)/src/doveadm
+ -I$(top_srcdir)/src/doveadm \
+ $(LIBTIRPC_CFLAGS)
NOPLUGIN_LDFLAGS =
lib10_doveadm_quota_plugin_la_LDFLAGS = -module -avoid-version
|