--- 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
 
@@ -27309,8 +27309,8 @@
 if test $ac_cv_lib_popt_poptGetContext = yes; then
 
       WITH_POPT_SUBDIR=
-      WITH_POPT_INCLUDE=
-      WITH_POPT_LIB="-lpopt"
+      WITH_POPT_INCLUDE='-I${prefix}/include'
+      WITH_POPT_LIB='${prefix}/lib/libpopt.la'
 
 fi
 
@@ -27545,8 +27545,8 @@
 _ACEOF
 
     WITH_SQLITE3_SUBDIR=
-    WITH_SQLITE3_INCLUDE=
-    WITH_SQLITE3_LIB="-lsqlite"
+    WITH_SQLITE3_INCLUDE='-I${prefix}/include'
+    WITH_SQLITE3_LIB='${prefix}/lib/libsqlite3.la'
     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
 
  ;;
 
