nfs-utils-0006-Let-the-configure-script-find-getrpcbynumber-in-libt.patch 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. From 7ea7814a8b87a0faa50fb9f4a486bfd7a376f3fc Mon Sep 17 00:00:00 2001
  2. From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
  3. Date: Sat, 10 Nov 2012 18:53:03 +0100
  4. Subject: [PATCH] Let the configure script find getrpcbynumber in libtirpc
  5. The getrpcbynumber() function may not be available in the C library,
  6. but only in the libtirpc library. Take this into account when checking
  7. for the existence of getrpcbynumber() and getrpcbynumber_r().
  8. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
  9. ---
  10. configure.ac | 10 +++++++++-
  11. 1 file changed, 9 insertions(+), 1 deletion(-)
  12. diff --git a/configure.ac b/configure.ac
  13. index 41216c9..1bbecfa 100644
  14. --- a/configure.ac
  15. +++ b/configure.ac
  16. @@ -390,7 +390,15 @@ AC_CHECK_FUNCS([alarm atexit dup2 fdatasync ftruncate getcwd \
  17. getnameinfo getrpcbyname getifaddrs \
  18. gettimeofday hasmntopt inet_ntoa innetgr memset mkdir pathconf \
  19. realpath rmdir select socket strcasecmp strchr strdup \
  20. - strerror strrchr strtol strtoul sigprocmask getrpcbynumber getrpcbynumber_r])
  21. + strerror strrchr strtol strtoul sigprocmask])
  22. +
  23. +save_CFLAGS=$CFLAGS
  24. +save_LIBS=$LIBS
  25. +CFLAGS="$CFLAGS $AM_CPPFLAGS"
  26. +LIBS="$LIBS $LIBTIRPC"
  27. +AC_CHECK_FUNCS([getrpcbynumber getrpcbynumber_r])
  28. +CFLAGS=$save_CFLAGS
  29. +LIBS=$save_LIBS
  30. if test "$ac_cv_func_getrpcbynumber_r" != "yes" -a "$ac_cv_func_getrpcbynumber" != "yes"; then
  31. AC_MSG_ERROR([Neither getrpcbynumber_r nor getrpcbynumber are available])
  32. --
  33. 1.7.9.5