91c91,106
< 	/* first try by 'normal' shared library finding */
---
> 	/* first use the compile time SEARCH_LIB_PATH */
> 	if (SEARCH_LIB_PATH) {
> 		gchar **array;
> 		gint i;
> 		array = g_strsplit (SEARCH_LIB_PATH, ":", 0);
> 		for (i = 0; array[i]; i++) {
> 			handle = find_sqlite_in_dir (array [i], name_part);
> 			if (handle)
> 				break;
> 		}
> 		g_strfreev (array);
> 		if (handle)
> 			return handle;
> 	}
> 	
> 	/* then try by 'normal' shared library finding */
106c121
< 	/* first, use LD_LIBRARY_PATH */
---
> 	/* lastly, use LD_LIBRARY_PATH */
122,136d136
< 	/* then use the compile time SEARCH_LIB_PATH */
< 	if (SEARCH_LIB_PATH) {
< 		gchar **array;
< 		gint i;
< 		array = g_strsplit (SEARCH_LIB_PATH, ":", 0);
< 		for (i = 0; array[i]; i++) {
< 			handle = find_sqlite_in_dir (array [i], name_part);
< 			if (handle)
< 				break;
< 		}
< 		g_strfreev (array);
< 		if (handle)
< 			return handle;
< 	}
< 
