--- librsync-0.9.7/configure.ac.orig	2004-10-10 11:52:26.000000000 +0200
+++ librsync-0.9.7/configure.ac	2004-10-18 22:39:40.600385603 +0200
@@ -27,9 +27,9 @@
 AC_PROG_LIBTOOL
 
 # Checks for libraries.
-AC_CHECK_LIB(z, deflate)
-AC_CHECK_LIB(bz2, BZ2_bzCompress)
-AC_CHECK_LIB(popt, poptGetContext,,[BUILD_POPT='popt/libpopt.a'; CFLAGS="$CFLAGS -I$srcdir/popt"])
+dnl AC_CHECK_LIB(z, deflate)  -- unused
+dnl AC_CHECK_LIB(bz2, BZ2_bzCompress)  -- unused
+AC_CHECK_LIB(popt, poptGetContext,[BUILD_POPT=-lpopt],[BUILD_POPT='popt/libpopt.a'; CFLAGS="$CFLAGS -I$srcdir/popt"])
 
 # Checks for header files.
 AC_FUNC_ALLOCA
--- librsync-0.9.7/Makefile.am.orig	2004-02-08 00:17:57.000000000 +0100
+++ librsync-0.9.7/Makefile.am	2004-10-18 22:36:07.967024276 +0200
@@ -60,7 +60,7 @@
 
 rdiff_LDADD = @BUILD_POPT@ librsync.la
 
-rdiff_DEPENDENCIES = @BUILD_POPT@ librsync.la
+rdiff_DEPENDENCIES = librsync.la
 
 # this script is used to build prototab.[ch]
 noinst_SCRIPTS = mkprototab.pl
