dovecot: Build rquota_xdr.c with rpcgen from rquota.x.
dovecot at dovecot.org
dovecot at dovecot.org
Mon Aug 6 19:07:40 EEST 2007
details: http://hg.dovecot.org/dovecot/rev/abec53314897
changeset: 6177:abec53314897
user: Timo Sirainen <tss at iki.fi>
date: Mon Aug 06 19:07:36 2007 +0300
description:
Build rquota_xdr.c with rpcgen from rquota.x.
diffstat:
3 files changed, 21 insertions(+), 3 deletions(-)
configure.in | 10 ++++++++--
src/plugins/quota/Makefile.am | 12 ++++++++++++
src/plugins/quota/quota-fs.c | 2 +-
diffs (61 lines):
diff -r 0f6d4f8dd587 -r abec53314897 configure.in
--- a/configure.in Mon Aug 06 18:25:30 2007 +0300
+++ b/configure.in Mon Aug 06 19:07:36 2007 +0300
@@ -1921,11 +1921,17 @@ AC_CHECK_HEADER(zlib.h, [
])
AM_CONDITIONAL(BUILD_ZLIB, test "$have_zlib" = "yes")
+RPCGEN=${RPCGEN-rpcgen}
+if ! $RPCGEN -c /dev/null > /dev/null; then
+ RPCGEN=
+fi
+AC_SUBST(RPCGEN)
+
have_rquota=no
-AC_CHECK_HEADER(rpcsvc/rquota.h, [
+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
-])
+fi
AM_CONDITIONAL(HAVE_RQUOTA, test "$have_rquota" = "yes")
dnl **
diff -r 0f6d4f8dd587 -r abec53314897 src/plugins/quota/Makefile.am
--- a/src/plugins/quota/Makefile.am Mon Aug 06 18:25:30 2007 +0300
+++ b/src/plugins/quota/Makefile.am Mon Aug 06 19:07:36 2007 +0300
@@ -27,6 +27,13 @@ lib10_quota_plugin_la_SOURCES = \
quota-plugin.c \
quota-storage.c
+if HAVE_RQUOTA
+rquota_xdr.c: Makefile
+ $(RPCGEN) -c /usr/include/rpcsvc/rquota.x | \
+ $(SED) -e 's/IXDR_PUT/(void)IXDR_PUT/g' \
+ -e 's/int32_t \*buf/int32_t *buf __attr_unused__/' > rquota_xdr.c
+endif
+
noinst_HEADERS = \
quota.h \
quota-fs.h \
@@ -39,3 +46,8 @@ install-exec-local:
rm -f $(DESTDIR)$(moduledir)/$$d/lib10_quota_plugin.so; \
$(LN_S) ../lib10_quota_plugin.so $(DESTDIR)$(moduledir)/$$d; \
done
+
+DISTFILES = $(DIST_COMMON) $(dist_sources) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
+
+distclean-generic:
+ rm -f Makefile rquota_xdr.c
diff -r 0f6d4f8dd587 -r abec53314897 src/plugins/quota/quota-fs.c
--- a/src/plugins/quota/quota-fs.c Mon Aug 06 18:25:30 2007 +0300
+++ b/src/plugins/quota/quota-fs.c Mon Aug 06 19:07:36 2007 +0300
@@ -25,7 +25,7 @@
#endif
#ifdef HAVE_RQUOTA
-# include <rpcsvc/rquota.h>
+# include "rquota_xdr.c"
# define RQUOTA_GETQUOTA_TIMEOUT_SECS 10
#endif
More information about the dovecot-cvs
mailing list