All of lore.kernel.org
 help / color / mirror / Atom feed
From: Roland Hieber <rhi@pengutronix.de>
To: Steve Dickson <steved@redhat.com>
Cc: linux-nfs@vger.kernel.org, Roland Hieber <rhi@pengutronix.de>
Subject: [PATCH nfs-utils 2/2] configure: check for rpc/rpc.h presence
Date: Tue, 25 May 2021 13:27:29 +0200	[thread overview]
Message-ID: <20210525112729.29062-2-rhi@pengutronix.de> (raw)
In-Reply-To: <20210525112729.29062-1-rhi@pengutronix.de>

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>
---
 configure.ac | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/configure.ac b/configure.ac
index f2e1bd30d0f2..25e988dfa33c 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
-- 
2.29.2


  reply	other threads:[~2021-05-25 11:27 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-25 11:27 [PATCH nfs-utils 1/2] README: update git repository URL Roland Hieber
2021-05-25 11:27 ` Roland Hieber [this message]
2021-05-25 18:08   ` [PATCH nfs-utils 2/2] configure: check for rpc/rpc.h presence Steve Dickson
2021-05-25 18:07 ` [PATCH nfs-utils 1/2] README: update git repository URL Steve Dickson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210525112729.29062-2-rhi@pengutronix.de \
    --to=rhi@pengutronix.de \
    --cc=linux-nfs@vger.kernel.org \
    --cc=steved@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.