AC_ARG_ENABLE(vala,
[ --enable-vala enable checks for vala],,
enable_vala=no)
+AC_ARG_ENABLE(sql-debugging,
+ [ --enable-sql-debugging enable SQL statement debugging],,
+ enable_sql_debugging=no)
+
+if test x$enable_sql_debugging = xyes ; then
+ VALAFLAGS="$VALAFLAGS -D RYGEL_DEBUG_SQL"
+fi
# Vala
if test x$enable_vala = xyes ; then
AM_GLIB_GNU_GETTEXT
AM_GLIB_DEFINE_LOCALEDIR([LOCALEDIR])
+AC_SUBST(VALAFLAGS)
+
dnl Shave the output
AM_SILENT_RULES([yes])
uninstalled: ${enable_uninstalled}
maemo support: ${enable_maemo}
preferences ui ${BUILD_UI}
+ SQL debugging: ${enable_sql_debugging}
Plugins:
test: ${enable_test_plugin}
tracker: ${enable_tracker_plugin}
public int exec (string sql,
GLib.Value[]? values = null,
RowCallback? callback = null) throws DatabaseError {
+ #if RYGEL_DEBUG_SQL
var t = new Timer ();
+ #endif
int rc;
if (values == null && callback == null) {
if (rc != Sqlite.DONE && rc != Sqlite.OK) {
throw new DatabaseError.SQLITE_ERROR (db.errmsg ());
}
+ #if RYGEL_DEBUG_SQL
debug ("Query: %s, Time: %f", sql, t.elapsed ());
+ #endif
return rc;
}