summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoland Hieber <rhi@pengutronix.de>2021-05-25 14:02:28 -0400
committerSteve Dickson <steved@redhat.com>2021-05-25 14:02:28 -0400
commitbe7365239abf8556773b063730621967b9971708 (patch)
treefaa41ea8ee11a3f58cea4a0bac04337ff4b4d3a9
parent0b5864da6b74c6e7fa2672f6088fde4d8f16b21b (diff)
downloadnfs-utils-2-5-4-rc5.tar.gz
configure: check for rpc/rpc.h presencenfs-utils-2-5-4-rc5
Recent versions of glibc (since 2.26?) no longer supply rpc/rpc.h, and in previous versions, RPC was optional. Detect such cases and prompt the user to build with libtirpc instead. Signed-off-by: Roland Hieber <rhi@pengutronix.de> Signed-off-by: Steve Dickson <steved@redhat.com>
-rw-r--r--configure.ac7
1 files changed, 7 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index f2e1bd3..25e988d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -335,6 +335,13 @@ AC_CHECK_HEADERS([sched.h], [], [])
AC_CHECK_FUNCS([unshare fstatat statx], [] , [])
AC_LIBPTHREAD([])
+# rpc/rpc.h can come from the glibc or from libtirpc
+nfsutils_save_CPPFLAGS="${CPPFLAGS}"
+CPPFLAGS="${CPPFLAGS} ${TIRPC_CFLAGS}"
+AC_CHECK_HEADER(rpc/rpc.h, ,
+ AC_MSG_ERROR([Header file rpc/rpc.h not found - maybe try building with --enable-tirpc]))
+CPPFLAGS="${nfsutils_save_CPPFLAGS}"
+
if test "$enable_nfsv4" = yes; then
dnl check for libevent libraries and headers
AC_LIBEVENT