summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaleb S. KEITHLEY <kkeithle@redhat.com>2018-03-28 09:01:05 -0400
committerJeff Darcy <jeff@pl.atyp.us>2018-04-02 12:50:38 +0000
commit3e3ca8307ee773e0348549a3204478cac3c46f70 (patch)
tree5dbf1ee5cec4c7b7c7be9af28c77a593b481abea
parentd0fbe01f96012b568b96b9e3b374a27ce26734a0 (diff)
build: revert configure --without-ipv6-default behaviour
patch https://review.gluster.org/19692 breaks gluster on systems with IPv6 enabled but don't have IPv6 reverse DNS. Also it defaulted to enabling ipv6-default regardless of whether --with-ipv6-default or --without-ipv6-default were specified in the options to configure. (Also the patch was merged without review.) Prefer libtirpc over glibc rpc. On newer linux with tirpc and without glibc rpc use tirpc (obviously) on less new linux with both tirpc and glibc rpc default to use tirpc, unless --without-tirpc is specified, in which case use glibc rpc On less new linux without tirpc fall back to glib rpc (obviously) ipv6-default requires libtirpc. It is off by default. It must be explicitly enabled with --with-ipv6-default. If --with-ipv6-default is specified, but tirpc is not available, disable it and issue a warning Change-Id: Ib96a230fafb83ec83a71948fe55af1215a7a6ffa BUG: 1562052 Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
-rw-r--r--configure.ac45
1 files changed, 31 insertions, 14 deletions
diff --git a/configure.ac b/configure.ac
index 9571dac76a0..6624bd63cb1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -309,18 +309,35 @@ else
CFLAGS="${CFLAGS} -g -rdynamic"
fi
+
+dnl When possible, prefer libtirpc over glibc rpc.
+dnl
+dnl On newer linux with only libtirpc, use libtirpc. (Specifying
+dnl --without-libtirpc is an error.)
+dnl
+dnl on older linux with glibc rpc and WITH libtirpc, use libtirpc
+dnl by default except when configured with --without-libtirpc.
+dnl
+dnl on old linux with glibc rpc and WITHOUT libtirpc, default to
+dnl use glibc rpc.
+dnl
AC_ARG_WITH([libtirpc],
[AC_HELP_STRING([--without-libtirpc], [Use legacy glibc RPC.])],
- [], [with_libtirpc=yes])
+ [with_libtirpc="no"], [with_libtirpc="yes"])
+dnl ipv6-default is off by default
+dnl
+dnl ipv6-default requires libtirpc. (glibc rpc does not support IPv6.)
+dnl ipv6-default can only be enabled if libtipc is enabled.
+dnl
AC_ARG_WITH([ipv6-default],
AC_HELP_STRING([--with-ipv6-default], [Set IPv6 as default.]),
- [], [with_ipv6_default=$with_libtirpc])
+ [with_ipv6_default=${with_libtirpc}], [with_ipv6_default="no"])
if test "x$ac_cv_file__etc_redhat_release" = "xyes"; then
if rpm -qa centos-release | grep centos; then
if rpm -q centos-release | grep "release-6"; then
- with_ipv6_default=no
+ with_ipv6_default="no"
fi
fi
fi
@@ -1097,26 +1114,26 @@ AC_SUBST(GF_DISTRIBUTION)
GF_HOST_OS=""
GF_LDFLAGS="-rdynamic"
-dnl include tirpc for IPv6 builds
-if test "x$with_libtirpc" = "xyes" || test "x$with_ipv6_default" = "xyes" ; then
+dnl see --with-libtirpc option check above, libtirpc(-devel) is required for
+dnl ipv6-default
+if test "x${with_libtirpc}" = "xyes" || test "x${with_ipv6_default}" = "xyes" ; then
PKG_CHECK_MODULES([TIRPC], [libtirpc],
- [with_libtirpc=yes; GF_CFLAGS="$GF_CFLAGS $TIRPC_CFLAGS"; GF_LDFLAGS="$GF_LDFLAGS $TIRPC_LIBS";],
- [with_libtirpc=missing])
+ [with_libtirpc="yes"; GF_CFLAGS="$GF_CFLAGS $TIRPC_CFLAGS"; GF_LDFLAGS="$GF_LDFLAGS $TIRPC_LIBS";],
+ [with_libtirpc="missing"; with_ipv6_default="no"])
fi
-if test "x$with_libtirpc" = "xmissing" ; then
- with_ipv6_default=no
+if test "x${with_libtirpc}" = "xmissing" ; then
AC_CHECK_HEADERS([rpc/rpc.h],[
AC_MSG_WARN([
---------------------------------------------------------------------------------
- libtirpc or ipv6-default were enabled (by default) but libtirpc-devel is not
- installed. Disabling libtirpc and ipv6-default and using legacy glibc rpc headers
- This is a transitional warning message. Eventually it will be an error message
+ libtirpc (and/or ipv6-default) were enabled but libtirpc-devel is not installed.
+ Disabling libtirpc and ipv6-default and falling back to legacy glibc rpc headers.
+ This is a transitional warning message. Eventually it will be an error message.
---------------------------------------------------------------------------------])],[
AC_MSG_ERROR([
---------------------------------------------------------------------------------
- libtirpc or ipv6-default were enabled (by default) but libtirpc-devel is not
- installed and there were no legacy glibc rpc headers and library to fall back to.
+ libtirpc (and/or ipv6-default) were enabled but libtirpc-devel is not installed
+ and there were no legacy glibc rpc headers and library to fall back to.
---------------------------------------------------------------------------------])])
fi