Skip to content

Commit

Permalink
m4, quota: Support rquota using libtirpc
Browse files Browse the repository at this point in the history
  • Loading branch information
sirainen authored and cmouse committed Aug 7, 2018
1 parent 75a4b80 commit 920369d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
13 changes: 10 additions & 3 deletions m4/quota.m4
Expand Up @@ -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)
])
3 changes: 2 additions & 1 deletion src/plugins/quota/Makefile.am
Expand Up @@ -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
Expand Down

0 comments on commit 920369d

Please sign in to comment.