--- configure.orig	2007-06-22 01:21:33.000000000 +0200
+++ configure	2007-06-22 01:23:43.000000000 +0200
@@ -5347,7 +5347,7 @@
 
 if test "$ac_cv_c_compiler_gnu" = yes; then
     CFLAGS="$CFLAGS -fPIC -DPIC -D_GNU_SOURCE -D_REENTRANT -Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wno-char-subscripts"
-    LDFLAGS="-pie"
+    LDFLAGS="$LDFLAGS -pie"
 fi
 export CFLAGS LDFLAGS
 
@@ -27546,7 +27546,7 @@
 
     WITH_SQLITE3_SUBDIR=
     WITH_SQLITE3_INCLUDE=
-    WITH_SQLITE3_LIB="-lsqlite"
+    WITH_SQLITE3_LIB="-lsqlite3"
     DBLIBSRCS="$DBLIBSRCS sqlite.c"
 
 fi
@@ -36560,7 +36560,7 @@
 
 
 
-SYSCONFIGDIR="`echo /etc/rpm`"
+SYSCONFIGDIR="`echo $sysconfdir/rpm`"
 
 cat >>confdefs.h <<_ACEOF
 #define SYSCONFIGDIR "$SYSCONFIGDIR"
@@ -38371,7 +38371,7 @@
     done ;;
     "default":C) 	echo timestamp > popt/stamp-h.in
 	echo timestamp > stamp-h.in
-	[ -d perl ] && cd perl && perl Makefile.PL
+	[ -d perl ] && cd perl && $__PERL Makefile.PL
 
  ;;