summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorKaleb S. KEITHLEY <kkeithle@redhat.com>2018-01-18 15:24:00 -0500
committerNiels de Vos <ndevos@redhat.com>2018-01-24 10:22:14 +0000
commit0c57232ae07f48bd6483bfe88a182f832377ef52 (patch)
treea219fc2338250c30ab8eb72889f829c09f6ca571 /configure.ac
parent78868033bc208bdb681266d0129e66f5627295a2 (diff)
build: glibc has removed rpc headers and rpcgen in Fedora28, use libtirpc
Other Linux distributions are doing the same; some others have already done so. Switch to libtirpc(-devel) and unbundled rpcgen packages. For now rpcgen is still provided by the glibc-rpcgen RPM, but rpcsvc-proto's rpcgen subpackage is available now but will not be used until glibc-rpcgen is retired. (note, rpcsvc-proto's rpcgen is just named rpcgen-...rpm. I.e. not rpcsvc-proto-rpcgen.) Right now either one will satisfy the BuildRequires: rpcgen. Also, when a .spec file has BuildRequires: foo-devel it is not necessary to also have: BuildRequires: foo or even: BuildRequires: foo foo-devel The foo-devel package has a dependency on foo, which will install foo automatically. It's usually also not necessary to have a corresponding Requires: foo as the rpmbuild process will also automatically determine the install-time dependencies. And other minor glusterfs.spec.in cleanup of ipv6-default, including sorting the argument definitions because the comment says "keep them sorted" (Though nobody appears to have ever sorted them in the first place.) Change-Id: I86f847dfda0fef83e22c6e8b761342d652a2d9ba BUG: 1536186 Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac54
1 files changed, 36 insertions, 18 deletions
diff --git a/configure.ac b/configure.ac
index ed84c661797..8eded379039 100644
--- a/configure.ac
+++ b/configure.ac
@@ -283,9 +283,9 @@ AC_CONFIG_FILES([Makefile
heal/Makefile
heal/src/Makefile
glusterfs.spec
- tools/glusterfind/src/tool.conf
- tools/glusterfind/glusterfind
- tools/glusterfind/Makefile
+ tools/glusterfind/src/tool.conf
+ tools/glusterfind/glusterfind
+ tools/glusterfind/Makefile
tools/glusterfind/src/Makefile
tools/setgfid2path/Makefile
tools/setgfid2path/src/Makefile])
@@ -316,19 +316,19 @@ else
fi
AC_ARG_WITH([libtirpc],
- AS_HELP_STRING([--with-libtirpc], [Use libtirpc as RPC implementation (instead of sunrpc)]),
- [], [with_libtirpc=no])
+ [AC_HELP_STRING([--without-libtirpc], [Use legacy glibc RPC.])],
+ [], [with_libtirpc=yes])
+AC_MSG_RESULT([$with_libtirpc])
+
+AC_ARG_WITH([ipv6-default],
+ AC_HELP_STRING([--with-ipv6-default], [Set IPv6 as default.]),
+ [with_ipv6_default=$with_libtirpc], [with_ipv6_default=no])
+AC_MSG_RESULT([$with_ipv6_default])
-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
-else
- IPV6_DEFAULT=no
-fi
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
- IPV6_DEFAULT=no;
+ with_ipv6_default=no
fi
fi
fi
@@ -1098,15 +1098,31 @@ AC_SUBST(GF_DISTRIBUTION)
GF_HOST_OS=""
GF_LDFLAGS="-rdynamic"
+DISABLE_LIBTIRPC=no
dnl include tirpc for IPv6 builds
-if test "x$with_libtirpc" = "xyes" || test "x$IPV6_DEFAULT" = "xyes" ; then
+if test "x$with_libtirpc" = "xyes" || test "x$with_ipv6_default" = "xyes" ; then
PKG_CHECK_MODULES([TIRPC], [libtirpc],
[GF_CFLAGS="$GF_CFLAGS $TIRPC_CFLAGS"; GF_LDFLAGS="$GF_LDFLAGS $TIRPC_LIBS";],
- [AC_MSG_ERROR([libtirpc requested or needed for IPv6 default but library not found])]
- )
+ [DISABLE_LIBTIRPC=yes])
fi
-if test "x$IPV6_DEFAULT" = "xyes" ; then
+if test "x$DISABLE_LIBTIRPC" = "xyes" ; then
+ with_libtirpc=no; with_ipv6_default=no
+ 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 transistional 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.
+ ---------------------------------------------------------------------------------])])
+fi
+
+if test "x$with_ipv6_default" = "xyes" ; then
GF_CFLAGS="$GF_CFLAGS -DIPV6_DEFAULT"
fi
@@ -1174,11 +1190,11 @@ fi
old_prefix=$prefix
if test "x$prefix" = xNONE; then
- prefix=$ac_default_prefix
+ prefix=$ac_default_prefix
fi
old_exec_prefix=$exec_prefix
if test "x$exec_prefix" = xNONE; then
- exec_prefix="$(eval echo $prefix)"
+ exec_prefix="$(eval echo $prefix)"
fi
GLUSTERFS_LIBEXECDIR="$(eval echo $libexecdir)/glusterfs"
GLUSTERFSD_MISCDIR="$(eval echo $prefix)/var/lib/misc/glusterfsd"
@@ -1662,4 +1678,6 @@ echo "EC dynamic support : $EC_DYNAMIC_SUPPORT"
echo "Use memory pools : $USE_MEMPOOL"
echo "Nanosecond m/atimes : $BUILD_NANOSECOND_TIMESTAMPS"
echo "Legacy gNFS server : $BUILD_GNFS"
+echo "IPV6 default : $with_ipv6_default"
+echo "Use TIRPC : $with_libtirpc"
echo