1 From 87f88b28ac01b6449463f00b660fe7416d7f9a55 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 | 14 +++++++++++++-
13 1 file changed, 13 insertions(+), 1 deletion(-)
15 diff --git a/configure.ac b/configure.ac
16 index 8e427e3..6e42c96 100644
19 @@ -433,11 +433,23 @@ AC_FUNC_STAT
21 AC_CHECK_FUNCS([alarm atexit dup2 fdatasync ftruncate getcwd \
22 gethostbyaddr gethostbyname gethostname getmntent \
23 - getnameinfo getrpcbyname getrpcbynumber getrpcbynumber_r getifaddrs \
24 + getnameinfo getrpcbyname getifaddrs \
25 gettimeofday hasmntopt inet_ntoa innetgr memset mkdir pathconf \
26 ppoll realpath rmdir select socket strcasecmp strchr strdup \
27 strerror strrchr strtol strtoul sigprocmask name_to_handle_at])
31 +CFLAGS="$CFLAGS $AM_CPPFLAGS"
32 +LIBS="$LIBS $LIBTIRPC"
33 +AC_CHECK_FUNCS([getrpcbynumber getrpcbynumber_r])
37 +if test "$ac_cv_func_getrpcbynumber_r" != "yes" -a "$ac_cv_func_getrpcbynumber" != "yes"; then
38 + AC_MSG_ERROR([Neither getrpcbynumber_r nor getrpcbynumber are available])
41 dnl *************************************************************
42 dnl Check for data sizes
43 dnl *************************************************************