| When cross compiling, it should not to use 'rpcgen' which is built for target, |
| it should use the one from host instead. |
| diff -ur rpcsvc-proto-1.3.1/configure.ac rpcsvc-proto-1.3.1/configure.ac |
| --- a/configure.ac |
| +++ b/configure.ac |
| @@ -16,4 +16,6 @@ |
| AC_PROG_INSTALL |
| AC_PROG_MAKE_SET |
| |
| +AM_CONDITIONAL([CROSS_COMPILING], [test "$cross_compiling" != no]) |
| + |
| AC_OUTPUT([Makefile rpcgen/Makefile rpcsvc/Makefile]) |
| diff -ur rpcsvc-proto-1.3.1/rpcsvc/Makefile.am rpcsvc-proto-1.3.1/rpcsvc/Makefile.am |
| --- a/rpcsvc/Makefile.am |
| +++ b/rpcsvc/Makefile.am |
| @@ -11,6 +11,12 @@ |
| bootparam_prot.h mount.h rex.h rusers.h key_prot.h \ |
| nfs_prot.h rquota.h sm_inter.h |
| |
| +if CROSS_COMPILING |
| +rpcgen = rpcgen |
| +else |
| +rpcgen = $(top_builddir)/rpcgen/rpcgen |
| +endif |
| + |
| %.h: %.x |
| - $(top_builddir)/rpcgen/rpcgen -h -o $@ $< |
| + $(rpcgen) -h -o $@ $< |
| |