From 373cdd6e76076b9e6a7028d3edfbef59d015e8a5 Mon Sep 17 00:00:00 2001 From: James Le Cuirot Date: Mon, 20 Nov 2017 20:44:45 +0000 Subject: build: Allow libtirpc to be explicitly requested Some distributions like Gentoo no longer include the RPC stuff in their glibc packages. Change-Id: Ic47065e9c2f5a0ccd860df9d7185eff59990ff10 Signed-off-by: James Le Cuirot --- configure.ac | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 90e919dc488..dd75029e4e0 100644 --- a/configure.ac +++ b/configure.ac @@ -313,6 +313,10 @@ else CFLAGS="${CFLAGS} -g -rdynamic" fi +AC_ARG_WITH([libtirpc], + AS_HELP_STRING([--with-libtirpc], [Use libtirpc as RPC implementation (instead of sunrpc)]), + [], [with_libtirpc=no]) + AC_ARG_WITH([ipv6-default], AC_HELP_STRING([--with-ipv6-default], [Set IPv6 as default.])) if test "x$with_ipv6_default" = "xyes"; then IPV6_DEFAULT=yes @@ -1093,11 +1097,15 @@ GF_HOST_OS="" GF_LDFLAGS="-rdynamic" dnl include tirpc for IPv6 builds -if test "x$IPV6_DEFAULT" = "xyes"; then +if test "x$with_libtirpc" = "xyes" || test "x$IPV6_DEFAULT" = "xyes" ; then AC_CHECK_LIB([tirpc], [xdr_string], , AC_MSG_ERROR([libtirpc is required to build glusterfs with IPv6 default])) TIRPC_CFLAGS="-I/usr/include/tirpc" GF_LDFLAGS="-ltirpc $GF_LDFLAGS" - GF_CFLAGS="$GF_CFLAGS $TIRPC_CFLAGS -DIPV6_DEFAULT" + GF_CFLAGS="$GF_CFLAGS $TIRPC_CFLAGS" +fi + +if test "x$IPV6_DEFAULT" = "xyes" ; then + GF_CFLAGS="$GF_CFLAGS -DIPV6_DEFAULT" fi dnl check for gcc -Werror=format-security -- cgit