--- configure.orig	2015-09-18 08:46:02 UTC
+++ configure
@@ -10535,7 +10535,7 @@ for i in $SQLITE_DIR ; do
          SQLITE_LIBDIR="$i/lib"
          break
       elif test -d "$i/lib" ; then
-         SQLITE_LIB="-lsqlite"
+         SQLITE_LIB="-L$i/lib -lsqlite"
          SQLITE_LIBDIR="$i/lib"
 	 break
       fi
@@ -11062,7 +11062,7 @@ for i in $SQLITE3_DIR ; do
          SQLITE3_LIBDIR="$i/lib"
          break
       elif test -d "$i/lib" ; then
-         SQLITE3_LIB="-lsqlite3"
+         SQLITE3_LIB="-L$i/lib -lsqlite3"
          SQLITE3_LIBDIR="$i/lib"
          break
       fi
