summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorJeff Layton <jlayton@redhat.com>2012-01-16 14:39:25 -0500
committerSteve Dickson <steved@redhat.com>2012-01-16 14:40:21 -0500
commita9b897fe1aaf4927478350d4e927cf69b45b8aab (patch)
treef612e735fa00d3eb9865ee5f535ac122c47077d5 /tools
parent2e1ea708610b4831518873cebde1c96368426471 (diff)
downloadnfs-utils-a9b897fe1aaf4927478350d4e927cf69b45b8aab.tar.gz
nfs-utils-a9b897fe1aaf4927478350d4e927cf69b45b8aab.tar.xz
nfs-utils-a9b897fe1aaf4927478350d4e927cf69b45b8aab.zip
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>
Diffstat (limited to 'tools')
-rw-r--r--tools/rpcgen/Makefile.am1
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/rpcgen/Makefile.am b/tools/rpcgen/Makefile.am
index 51a2bfa..8a9ec89 100644
--- a/tools/rpcgen/Makefile.am
+++ b/tools/rpcgen/Makefile.am
@@ -12,6 +12,7 @@ rpcgen_SOURCES = rpc_clntout.c rpc_cout.c rpc_hout.c rpc_main.c \
rpcgen_CFLAGS=$(CFLAGS_FOR_BUILD)
rpcgen_CPPLAGS=$(CPPFLAGS_FOR_BUILD)
rpcgen_LDFLAGS=$(LDFLAGS_FOR_BUILD)
+rpcgen_LDADD=$(LIBTIRPC)
MAINTAINERCLEANFILES = Makefile.in