]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
m4, quota: Support rquota using libtirpc
authorTimo Sirainen <timo.sirainen@dovecot.fi>
Mon, 9 Jul 2018 08:39:59 +0000 (11:39 +0300)
committerAki Tuomi <aki.tuomi@dovecot.fi>
Tue, 7 Aug 2018 11:10:08 +0000 (14:10 +0300)
m4/quota.m4
src/plugins/quota/Makefile.am

index 0695b1e02100e11debdbdb20700b269965121e5b..d75af447e1f4b308b1962fee71cdb3edf113020f 100644 (file)
@@ -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)
 ])
index f220d4f0750c5ae6888b0288bb87dddb7526ea66..ffebc674046556aa3a617e2b03880b685d002d05 100644 (file)
@@ -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