#include <gtk/gtk.h>
#include <libxml/parser.h>
#include <libxml/tree.h>
-#include <sqlite3.h>
+
+#if HAVE_SQLITE3_H
+ #include <sqlite3.h>
+#elif HAVE_SQLITE_H
+ #include <sqlite.h>
+#endif
#if ENABLE_NLS
#include <libintl.h>
return TRUE;
}
+#ifdef HAVE_SQLITE
/* Open database 'dbname' */
static sqlite3*
db_open (const char* dbname,
}
return db;
}
+#endif
static gchar*
_simple_xml_element (const gchar* name,
gchar* uri;
KatzeItem* item;
gchar* uri_ready;
+ #ifdef HAVE_SQLITE
sqlite3* db;
+ #endif
#if ENABLE_NLS
bindtextdomain (GETTEXT_PACKAGE, MIDORI_LOCALEDIR);
g_error_free (error);
}
g_free (config_file);
+ #ifdef HAVE_SQLITE
config_file = g_build_filename (config_path, "history.db", NULL);
+ #endif
history = katze_array_new (KATZE_TYPE_ARRAY);
+ #ifdef HAVE_SQLITE
error = NULL;
if ((db = midori_history_initialize (history, config_file, &error)) == NULL)
{
g_error_free (error);
}
g_free (config_file);
+ #endif
/* In case of errors */
if (error_messages->len)
g_signal_connect_after (trash, "add-item",
G_CALLBACK (midori_web_list_add_item_cb), NULL);
+ #ifdef HAVE_SQLITE
g_signal_connect_after (history, "add-item",
G_CALLBACK (midori_history_add_item_cb), db);
g_signal_connect_after (history, "clear",
G_CALLBACK (midori_history_clear_cb), db);
+ #endif
g_object_set (app, "settings", settings,
"bookmarks", bookmarks,
NULL);
g_mkdir_with_parents (config_path, 0755);
g_object_unref (history);
+ #ifdef HAVE_SQLITE
db_close (db);
+ #endif
config_file = g_build_filename (config_path, "search", NULL);
error = NULL;
if (!search_engines_save_to_file (search_engines, config_file, &error))
print '\t The HTTP backend of GVfs is recommended for'
print '\t viewing source code and loading favicons.'
+ if not Params.g_options.disable_sqlite:
+ conf.check_pkg ('sqlite3', destvar='SQLITE', vnum='3.0', mandatory=False)
+ sqlite = ['not available','yes'][conf.env['HAVE_SQLITE'] == 1]
+ if not conf.check_header ('sqlite3.h', 'HAVE_SQLITE3_H'):
+ conf.check_header ('sqlite.h', 'HAVE_SQLITE_H')
+ else:
+ sqlite = 'no'
+ conf.check_message_custom ('history database', 'support', sqlite)
+
conf.check_pkg ('gtk+-2.0', destvar='GTK', vnum='2.6.0', mandatory=True)
conf.check_pkg ('gtksourceview-2.0', destvar='GTKSOURCEVIEW', vnum='2.0', mandatory=False)
- conf.check_pkg ('sqlite3', destvar='SQLITE', vnum='3.0', mandatory=False)
conf.check_pkg ('webkit-1.0', destvar='WEBKIT', vnum='0.1', mandatory=True)
conf.check_pkg ('libxml-2.0', destvar='LIBXML', vnum='2.6', mandatory=True)
help='Disables Unique support', dest='disable_unique')
opt.add_option ('--disable-gio', action='store_true', default=False,
help='Disables GIO support', dest='disable_gio')
+ opt.add_option ('--disable-sqlite', action='store_true', default=False,
+ help='Disables sqlite support', dest='disable_sqlite')
opt.add_option ('--enable-update-po', action='store_true', default=False,
help='Enables localization file updates', dest='enable_update_po')