From 80468a84ea3044a5227c57a258dc6e508c88d468 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Wed, 6 Feb 2019 13:25:47 +0000 Subject: [PATCH] Choose libtirpc or another RPC library for XDR headers and library. Signed-off-by: Richard W.M. Jones --- configure.ac | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/configure.ac b/configure.ac index 4294146..be62260 100644 --- a/configure.ac +++ b/configure.ac @@ -158,4 +158,24 @@ AC_ARG_WITH(randomseed, AC_MSG_RESULT("/var/run/random-seed") ]) +# Check for an RPC library, starting with libtirpc. +PKG_CHECK_MODULES([RPC], [libtirpc], [], [ + # If we don't have libtirpc, then we must have and + # some library to link to in libdir. + RPC_CFLAGS="" + AC_CHECK_HEADER([rpc/rpc.h],[],[ + AC_MSG_ERROR([XDR header files are required]) + ], + [#include ]) + + old_LIBS="$LIBS" + LIBS="" + AC_SEARCH_LIBS([xdrmem_create],[rpc xdr nsl]) + RPC_LIBS="$LIBS" + LIBS="$old_LIBS" + + AC_SUBST([RPC_CFLAGS]) + AC_SUBST([RPC_LIBS]) +]) + AC_OUTPUT([Makefile src/Makefile]) -- 2.31.1