forked from pool/glusterfs
Jan Engelhardt
ed15489d39
- glusterfs-tirpc.diff: fallback to libtirpc if there is no sunrpc support in glibc OBS-URL: https://build.opensuse.org/request/show/541852 OBS-URL: https://build.opensuse.org/package/show/filesystems/glusterfs?expand=0&rev=47
25 lines
801 B
Diff
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)
|