--- nfs-utils-1.2.1.orig/tools/rpcgen/Makefile.in	2009-11-04 12:15:52.000000000 +0100
+++ nfs-utils-1.2.1/tools/rpcgen/Makefile.in	2010-01-16 11:01:44.015625000 +0100
@@ -66,21 +66,21 @@ am_rpcgen_OBJECTS = rpcgen-rpc_clntout.$
 rpcgen_OBJECTS = $(am_rpcgen_OBJECTS)
 rpcgen_LDADD = $(LDADD)
 rpcgen_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
-	--mode=link $(CCLD) $(rpcgen_CFLAGS) $(CFLAGS) \
-	$(rpcgen_LDFLAGS) $(LDFLAGS) -o $@
+	--mode=link $(CCLD) $(rpcgen_CFLAGS) \
+	$(rpcgen_LDFLAGS) -o $@
 DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/support/include
 depcomp = $(SHELL) $(top_srcdir)/depcomp
 am__depfiles_maybe = depfiles
 am__mv = mv -f
-COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
-	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CFLAGS) $(HOSTCFLAGS)
 LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
 	--mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
-	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
 CCLD = $(CC)
 LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
-	--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
-	$(LDFLAGS) -o $@
+	--mode=link $(CCLD) $(AM_CFLAGS) $(HOSTCFLAGS) \
+	-o $@
 SOURCES = $(rpcgen_SOURCES)
 DIST_SOURCES = $(rpcgen_SOURCES)
 ETAGS = etags
@@ -100,10 +100,10 @@ AWK = @AWK@
 CC = $(CC_FOR_BUILD)
 CCDEPMODE = @CCDEPMODE@
 CC_FOR_BUILD = @CC_FOR_BUILD@
-CFLAGS = @CFLAGS@
+CFLAGS =
 CFLAGS_FOR_BUILD = @CFLAGS_FOR_BUILD@
 CPP = @CPP@
-CPPFLAGS = @CPPFLAGS@
+CPPFLAGS = 
 CPPFLAGS_FOR_BUILD = @CPPFLAGS_FOR_BUILD@
 CXX = @CXX@
 CXXCPP = @CXXCPP@
@@ -136,10 +136,10 @@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_P
 K5VERS = @K5VERS@
 KRBCFLAGS = @KRBCFLAGS@
 KRBDIR = @KRBDIR@
-KRBLDFLAGS = @KRBLDFLAGS@
+KRBLDFLAGS = 
 KRBLIBS = @KRBLIBS@
 LD = @LD@
-LDFLAGS = @LDFLAGS@
+LDFLAGS =
 LDFLAGS_FOR_BUILD = @LDFLAGS_FOR_BUILD@
 LIBBLKID = @LIBBLKID@
 LIBBSD = @LIBBSD@
@@ -299,7 +299,7 @@ clean-noinstPROGRAMS:
 	rm -f $$list
 rpcgen$(EXEEXT): $(rpcgen_OBJECTS) $(rpcgen_DEPENDENCIES) 
 	@rm -f rpcgen$(EXEEXT)
-	$(rpcgen_LINK) $(rpcgen_OBJECTS) $(rpcgen_LDADD) $(LIBS)
+	$(rpcgen_LINK) $(rpcgen_OBJECTS) $(rpcgen_LDADD)
 
 mostlyclean-compile:
 	-rm -f *.$(OBJEXT)
