summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorJames Le Cuirot <chewi@gentoo.org>2017-11-20 20:44:45 +0000
committerAmar Tumballi <amarts@redhat.com>2017-11-22 07:13:12 +0000
commit373cdd6e76076b9e6a7028d3edfbef59d015e8a5 (patch)
treef47cd32346a6058f7a1cea75af3d6350277bb07b /configure.ac
parent521626a952a0259b7cf4a1b43205b954d0252fbc (diff)
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 <chewi@gentoo.org>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac12
1 files changed, 10 insertions, 2 deletions
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