summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarlos Garnacho <carlosg@gnome.org>2017-08-21 22:04:28 +0200
committerCarlos Garnacho <carlosg@gnome.org>2017-08-22 12:43:32 +0200
commit84c8cc2590f18bfd6c1b3e633b84622d193061a1 (patch)
tree342aa9fe5376498e115b49753b5af3306643eff9
parent5fd569e52501d58b94326ba4f0f6ebe6bb31e1eb (diff)
downloadtracker-84c8cc2590f18bfd6c1b3e633b84622d193061a1.tar.gz
build: Mandate that sqlite3 >= 3.20.0 has fts5 builtin
That sqlite3 version brought incompatibilities in the fts5 interface, fts5 modules generated from < 3.20.0 trees won't work with sqlite3 >= 3.20.0, and viceversa. Since it's not feasible nor desirable to include an additional fts5 module copy nor an embedded sqlite3 amalgamation copy, mandate that SQLite was compiled with --enable-fts5 if >= 3.20.0 is found. The current copy of the fts5 module is kept around for sqlite3 < 3.20.0, so we don't make this a mandatory requirement for earlier versions. https://bugzilla.gnome.org/show_bug.cgi?id=785883
-rw-r--r--configure.ac7
-rw-r--r--meson.build4
2 files changed, 11 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 147831399..8761d191a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -621,6 +621,13 @@ if test "x$have_tracker_fts" = "xyes"; then
else
have_builtin_fts5="no"
+ # Sqlite 3.20 broke compatibility of the fts5 module both ways, demand
+ # that it's builtin into sqlite from that version on.
+ PKG_CHECK_EXISTS([sqlite3 >= 3.20.0], sqlite_builtin_fts5_forced=yes, sqlite_builtin_fts5_forced=no)
+ if test "x$sqlite_builtin_fts5_forced" == "xyes"; then
+ AC_MSG_ERROR([sqlite3 >= 3.20.0 must be compiled with --enable-fts5])
+ fi
+
# Make sure SQLite has extension loading enabled
AX_SQLITE_AUTO_EXTENSION
if test "x$ax_cv_sqlite_auto_extension" != "xyes"; then
diff --git a/meson.build b/meson.build
index 60e14eb4d..8f66e72a6 100644
--- a/meson.build
+++ b/meson.build
@@ -115,6 +115,10 @@ if enable_fts
sqlite3_has_builtin_fts5 = cc.compiles(sqlite3_builtin_fts5_test,
name: 'sqlite3 has builtin FTS5 module')
+
+ if not sqlite3_has_builtin_fts5 and sqlite.version() >= '3.20.0'
+ error('sqlite3 >= 3.20.0 must be compiled with --enable-fts5')
+ endif
endif
##################################################################