]> git.decadent.org.uk Git - nfs-utils.git/commit
autoconf: only link binaries that need it to libtirpc nfs-utils-1-2-6-rc6
authorJeff Layton <jlayton@redhat.com>
Mon, 16 Jan 2012 19:39:25 +0000 (14:39 -0500)
committerSteve Dickson <steved@redhat.com>
Mon, 16 Jan 2012 19:40:21 +0000 (14:40 -0500)
commita9b897fe1aaf4927478350d4e927cf69b45b8aab
treef612e735fa00d3eb9865ee5f535ac122c47077d5
parent2e1ea708610b4831518873cebde1c96368426471
autoconf: only link binaries that need it to libtirpc

This patch is essentially the same as the previous version, but has
been respun to fix up some merge conflicts with some of Chuck's
recent changes.

When we first added tirpc support, we took a "big hammer" approach, and
had it add libtirpc to $LIBS. That had the effect of making it so that
that library was linked into every binary. That's unnecessary, and
wasteful with memory.

Don't let AC_CHECK_LIB add -ltirpc to $LIBS. Instead, have the autoconf
tests set $(LIBTIRPC) in the makefiles, and have the programs that
need it explicitly include that library. In the event that we're not
using libtirpc, then set $LIBTIRPC to a blank string.

This necessitates a change to the bindresvport_sa check too. Since that
library is no longer included in $LIBS, we need to convert that check
to use AC_CHECK_LIB instead of AC_CHECK_FUNCS.

This patch also fixes a subtle bug. If the library was usable, but the
includes were not, the test would set $enable_tirpc to "no", but
HAVE_LIBTIRPC would still be true. That configuration would likely
fail to build.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
aclocal/ipv6.m4
aclocal/libtirpc.m4
tools/rpcgen/Makefile.am
utils/gssd/Makefile.am
utils/mount/Makefile.am
utils/mountd/Makefile.am
utils/nfsd/Makefile.am
utils/showmount/Makefile.am
utils/statd/Makefile.am