+# RPC is only needed for VXI support
+AC_MSG_CHECKING([for RPC support])
+AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <rpc/rpc.h>],
+ [CLIENT *rpc_test(void)],
+ [{ return clnt_create("", 0, 0, ""); }])],
+ [AC_MSG_RESULT([yes]); have_rpc=1],
+ [AC_MSG_RESULT([no]); have_rpc=0])
+# Define HAVE_RPC in config.h if we found RPC support.
+AC_DEFINE_UNQUOTED(HAVE_RPC, [$have_rpc],[Specifies whether we have RPC support.])
+# VXI support is only compiled if RPC support was found.
+AM_CONDITIONAL(NEED_RPC, test "x$have_rpc" != x0)
+