diff options
author | Carlos Garnacho <carlosg@gnome.org> | 2017-08-25 18:23:39 +0200 |
---|---|---|
committer | Carlos Garnacho <carlosg@gnome.org> | 2017-08-25 18:26:35 +0200 |
commit | 1f9740138dfd85dc03e2595c3b16de999a4674cd (patch) | |
tree | 3f1d336f495bb3c51f416c086fd2c2b6b310dfc5 /meson.build | |
parent | 1c6cbc7293cd0fd4c5dca196607cd51cd6cf22fc (diff) | |
download | tracker-1f9740138dfd85dc03e2595c3b16de999a4674cd.tar.gz |
meson: Fix SQLite FTS5 check
Can't compile without main()
Diffstat (limited to 'meson.build')
-rw-r--r-- | meson.build | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/meson.build b/meson.build index 7fdd5b3ad..4945c9a99 100644 --- a/meson.build +++ b/meson.build @@ -103,14 +103,17 @@ endif if enable_fts sqlite3_builtin_fts5_test = ''' #include <sqlite3.h> - sqlite3 *db; - int rc; - rc = sqlite3_open(":memory:", &db); - if (rc!=SQLITE_OK) return -1; - rc = sqlite3_exec(db, "create table a(text)", 0, 0, 0); - if (rc!=SQLITE_OK) return -1; - rc = sqlite3_exec(db, "create virtual table t using fts5(content='a',text)", 0, 0, 0); - if (rc!=SQLITE_OK) return -1; + + int main (int argc, char *argv[]) { + sqlite3 *db; + int rc; + rc = sqlite3_open(":memory:", &db); + if (rc!=SQLITE_OK) return -1; + rc = sqlite3_exec(db, "create table a(text)", 0, 0, 0); + if (rc!=SQLITE_OK) return -1; + rc = sqlite3_exec(db, "create virtual table t using fts5(content='a',text)", 0, 0, 0); + if (rc!=SQLITE_OK) return -1; + } ''' sqlite3_has_builtin_fts5 = cc.compiles(sqlite3_builtin_fts5_test, |