--- configure.ac.orig	2007-12-12 10:35:41.000000000 +0100
+++ configure.ac	2007-06-22 01:23:43.000000000 +0200
@@ -655,8 +655,8 @@
   AC_CHECK_HEADER([popt.h], [
     AC_CHECK_LIB(popt, poptGetContext, [
       WITH_POPT_SUBDIR=
-      WITH_POPT_INCLUDE=
-      WITH_POPT_LIB="-lpopt"
+      WITH_POPT_INCLUDE='-I${prefix}/include'
+      WITH_POPT_LIB='${prefix}/lib/libpopt.la'
     ])
   ])
 fi
@@ -692,8 +692,8 @@
   AC_CHECK_LIB(sqlite, sqlite3_open, [
     AC_DEFINE(HAVE_SQLITE3_H, 1, [Define if you have the <sqlite3.h> header file])
     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"
   ])
 ],[
