1
0
forked from pool/glusterfs
glusterfs/glusterfs-tirpc.diff
2017-11-14 15:36:38 +00:00

25 lines
801 B
Diff

--- configure.ac
+++ configure.ac 2017/11/13 06:44:32
@@ -399,6 +399,21 @@
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 <rpc/rpc.h>
+old_CFLAGS=$CFLAGS
+AC_CACHE_CHECK([where to find <rpc/rpc.h>], [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 <rpc/rpc.h>
+ ]])], [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)