summaryrefslogtreecommitdiff
path: root/libs/sqlite3
diff options
context:
space:
mode:
authorHans Dedecker <dedeckeh@gmail.com>2018-01-30 16:06:08 +0100
committerHans Dedecker <dedeckeh@gmail.com>2018-01-31 17:19:42 +0100
commitaac84ff03d3877f47c579bb249d28c389f68abdc (patch)
treede7b39b5454cdfa9b597b466d7716c1f634958c0 /libs/sqlite3
parente81136758df0db432fb0dbe3184f197ffc537489 (diff)
sqlite3: add config options to disable FTS3 and RTREE
The full-text search engine version 3 (FTS3) and R*Tree (RTREE) modules are enabled by default in sqlite3; add config options which allow to disable these sqlite lib modules. Disabling FTS3 reduces the so file with 475KB while disabling RTREE reduces the so file with 121KB on x86 architecture. Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
Diffstat (limited to 'libs/sqlite3')
-rw-r--r--libs/sqlite3/Config.in18
-rw-r--r--libs/sqlite3/Makefile19
2 files changed, 36 insertions, 1 deletions
diff --git a/libs/sqlite3/Config.in b/libs/sqlite3/Config.in
new file mode 100644
index 000000000..8e8fa6ec9
--- /dev/null
+++ b/libs/sqlite3/Config.in
@@ -0,0 +1,18 @@
+menu "Configuration"
+ depends on PACKAGE_libsqlite3
+
+config SQLITE_FTS3
+ bool
+ prompt "Enable FTS3"
+ help
+ "Enable support for full-text search version 3"
+ default y
+
+config SQLITE_RTREE
+ bool
+ prompt "Enable RTREE"
+ help
+ "Enable support for the R*Tree index extension"
+ default y
+
+endmenu
diff --git a/libs/sqlite3/Makefile b/libs/sqlite3/Makefile
index b254f7f37..32f11d76d 100644
--- a/libs/sqlite3/Makefile
+++ b/libs/sqlite3/Makefile
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=sqlite
PKG_VERSION:=3210000
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-autoconf-$(PKG_VERSION).tar.gz
PKG_HASH:=d7dd516775005ad87a57f428b6f86afd206cb341722927f104d3f0cf65fbbbe3
@@ -24,6 +24,10 @@ PKG_FIXUP:=autoreconf
PKG_INSTALL:=1
+PKG_CONFIG_DEPENDS := \
+ CONFIG_SQLITE_FTS3 \
+ CONFIG_SQLITE_RTREE
+
include $(INCLUDE_DIR)/package.mk
define Package/sqlite3/Default
@@ -52,6 +56,10 @@ $(call Package/sqlite3/Default/description)
programs.
endef
+define Package/libsqlite3/config
+ source "$(SOURCE)/Config.in"
+endef
+
define Package/sqlite3-cli
$(call Package/sqlite3/Default)
SECTION:=utils
@@ -67,11 +75,20 @@ $(call Package/sqlite3/Default/description)
formats.
endef
+
TARGET_CFLAGS += $(FPIC) \
-DSQLITE_ENABLE_UNLOCK_NOTIFY=1 \
-DHAVE_ISNAN=1 \
-DHAVE_MALLOC_USABLE_SIZE=1
+ifneq ($(CONFIG_SQLITE_FTS3),y)
+TARGET_CFLAGS += -USQLITE_ENABLE_FTS3
+endif
+
+ifneq ($(CONFIG_SQLITE_RTREE),y)
+TARGET_CFLAGS += -USQLITE_ENABLE_RTREE
+endif
+
CONFIGURE_ARGS += \
--enable-shared \
--enable-static \