From: kukuk@suse.de Date: Mon Nov 13 07:49:33 CET 2017 Fall back to libtirpc if there is no sunrpc support in glibc. --- configure.ac | 15 +++++++++++++++ 1 file changed, 15 insertions(+) Index: glusterfs-3.12.3/configure.ac =================================================================== --- glusterfs-3.12.3.orig/configure.ac +++ glusterfs-3.12.3/configure.ac @@ -431,6 +431,21 @@ AC_CHECK_HEADERS([openssl/dh.h]) AC_CHECK_HEADERS([openssl/ecdh.h]) +dnl RPC library +AC_CHECK_FUNC([xdrmem_create],[], AC_SEARCH_LIBS([xdrmem_create],[rpc xdr nsl tirpc])) +dnl Cygwin/recent glibc requires -I/usr/include/tirpc for +old_CFLAGS=$CFLAGS +AC_CACHE_CHECK([where to find ], [lv_cv_xdr_cflags], [ + for add_CFLAGS in '' '-I/usr/include/tirpc' 'missing'; do + if test x"$add_CFLAGS" = xmissing; then + lv_cv_xdr_cflags=missing; break + fi + CFLAGS="$old_CFLAGS $add_CFLAGS" + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include + ]])], [lv_cv_xdr_cflags=${add_CFLAGS:-none}; break]) + done +]) + dnl Math library AC_CHECK_LIB([m], [pow], [MATH_LIB='-lm'], [MATH_LIB='']) AC_SUBST(MATH_LIB)