diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/Makefile.am | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/Makefile.am b/src/Makefile.am index 95042f80..750c07be 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -180,16 +180,25 @@ libguestfs_la_LIBADD += $(FUSE_LIBS) -lulockmgr endif if HAVE_RPCGEN +RPCGEN_DEFS = +if HAVE_XDR_U_INT64_T +RPCGEN_DEFS += -DHAVE_XDR_U_INT64_T=1 +else +if HAVE_XDR_UINT64_T +RPCGEN_DEFS += -DHAVE_XDR_UINT64_T=1 +endif +endif + guestfs_protocol.c: guestfs_protocol.x rm -f $@-t $@-t2 - $(RPCGEN) -c -o $@-t $(srcdir)/$< + $(RPCGEN) $(RPCGEN_DEFS) -c -o $@-t $(srcdir)/$< sed 's,\.\./\(\.\./\)*src,.,' < $@-t > $@-t2 rm $@-t mv $@-t2 $@ guestfs_protocol.h: guestfs_protocol.x rm -f $@-t - $(RPCGEN) -h -o $@-t $(srcdir)/$< + $(RPCGEN) $(RPCGEN_DEFS) -h -o $@-t $(srcdir)/$< mv $@-t $@ endif |