--- a/Makefile.in
+++ b/Makefile.in
@@ -727,10 +727,10 @@ uninstall-man: uninstall-man1 uninstall-
 
 
 .c.o:
-	$(CC) -c $(DEFS) $(ourdefs) $(AM_CFLAGS) $(CPPFLAGS) $(LDFLAGS) $<
+	$(CC) -c $(DEFS) $(ourdefs) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) $<
 
 install-exec-hook:
-	chmod u+s $(libexecdir)/rssh_chroot_helper
+	chmod u+s $(DESTDIR)$(libexecdir)/rssh_chroot_helper
 
 rpm:	dist
 	rpmbuild -ta --sign $(base).tar.gz
