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
6 The getrpcbynumber() function may not be available in the C library,
7 but only in the libtirpc library. Take this into account when checking
8 for the existence of getrpcbynumber() and getrpcbynumber_r().
10 Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
12 configure.ac | 10 +++++++++-
13 1 file changed, 9 insertions(+), 1 deletion(-)
15 diff --git a/configure.ac b/configure.ac
16 index 41216c9..1bbecfa 100644
19 @@ -390,7 +390,15 @@ AC_CHECK_FUNCS([alarm atexit dup2 fdatasync ftruncate getcwd \
20 getnameinfo getrpcbyname getifaddrs \
21 gettimeofday hasmntopt inet_ntoa innetgr memset mkdir pathconf \
22 realpath rmdir select socket strcasecmp strchr strdup \
23 - strerror strrchr strtol strtoul sigprocmask getrpcbynumber getrpcbynumber_r])
24 + strerror strrchr strtol strtoul sigprocmask])
28 +CFLAGS="$CFLAGS $AM_CPPFLAGS"
29 +LIBS="$LIBS $LIBTIRPC"
30 +AC_CHECK_FUNCS([getrpcbynumber getrpcbynumber_r])
34 if test "$ac_cv_func_getrpcbynumber_r" != "yes" -a "$ac_cv_func_getrpcbynumber" != "yes"; then
35 AC_MSG_ERROR([Neither getrpcbynumber_r nor getrpcbynumber are available])