diff options
author | Thomas Petazzoni <thomas.petazzoni@free-electrons.com> | 2019-12-11 13:34:42 -0500 |
---|---|---|
committer | Steve Dickson <steved@redhat.com> | 2019-12-11 13:34:42 -0500 |
commit | 67946c288b6d36b46b3a44f52c2204af3bfbf09c (patch) | |
tree | de1f6b395d0a657d2132b9466922b043054d9fb3 | |
parent | ff3ad88c233ecd87f7983ad13836323f944540ec (diff) | |
download | nfs-utils-67946c288b6d36b46b3a44f52c2204af3bfbf09c.tar.gz |
configure.ac: Let the configure script find getrpcbynumber in libtirpc
The getrpcbynumber() function may not be available in the C library,
but only in the libtirpc library. Take this into account when checking
for the existence of getrpcbynumber() and getrpcbynumber_r().
Reviewed-by: Petr Vorel <petr.vorel@gmail.com>
[ pvorel: patch taken from Buildroot distribution ]
Signed-off-by: Petr Vorel <petr.vorel@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
-rw-r--r-- | configure.ac | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index 949ff9fc..e9699752 100644 --- a/configure.ac +++ b/configure.ac @@ -534,11 +534,23 @@ AC_FUNC_STAT AC_FUNC_VPRINTF AC_CHECK_FUNCS([alarm atexit dup2 fdatasync ftruncate getcwd \ gethostbyaddr gethostbyname gethostname getmntent \ - getnameinfo getrpcbyname getrpcbynumber getrpcbynumber_r getifaddrs \ + getnameinfo getrpcbyname getifaddrs \ gettimeofday hasmntopt inet_ntoa innetgr memset mkdir pathconf \ ppoll realpath rmdir select socket strcasecmp strchr strdup \ strerror strrchr strtol strtoul sigprocmask name_to_handle_at]) +save_CFLAGS=$CFLAGS +save_LIBS=$LIBS +CFLAGS="$CFLAGS $AM_CPPFLAGS" +LIBS="$LIBS $LIBTIRPC" +AC_CHECK_FUNCS([getrpcbynumber getrpcbynumber_r]) +CFLAGS=$save_CFLAGS +LIBS=$save_LIBS + +if test "$ac_cv_func_getrpcbynumber_r" != "yes" -a "$ac_cv_func_getrpcbynumber" != "yes"; then + AC_MSG_ERROR([Neither getrpcbynumber_r nor getrpcbynumber are available]) +fi + dnl ************************************************************* dnl Check for data sizes dnl ************************************************************* |