Browse Source

sqlite3: add configure switches to menuselect

Adds (most) configure switches to menuselect. The defaults are _not_
changed, meaning the default configuration itself remains the same.

This enables changing the configuration through menuselect and adds
flags that other packages may use.

Config.in is renamed to Config-lib.in in anticipation of a future commit
where the cli tool package also gets a file to source.

The variables also get a prefix change from SQLITE to SQLITE3 in case
there will be a new major release in the future that may coexist with
sqlite3.

Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
lilik-openwrt-22.03
Sebastian Kemper 6 years ago
parent
commit
0b6d2678c1
3 changed files with 71 additions and 30 deletions
  1. +53
    -0
      libs/sqlite3/Config-lib.in
  2. +0
    -18
      libs/sqlite3/Config.in
  3. +18
    -12
      libs/sqlite3/Makefile

+ 53
- 0
libs/sqlite3/Config-lib.in View File

@ -0,0 +1,53 @@
menu "Configuration"
depends on PACKAGE_libsqlite3
config SQLITE3_DYNAMIC_EXTENSIONS
bool "Dynamic extensions"
default y
help
Enable loadable extensions.
config SQLITE3_FTS3
bool "FTS3 support"
default y
help
Enable FTS3 support.
config SQLITE3_FTS4
bool "FTS4 support"
depends on SQLITE3_FTS3
default y
help
Enable FTS4 support.
config SQLITE3_FTS5
bool "FTS5 support"
default y
help
Enable FTS5 support.
config SQLITE3_JSON1
bool "JSON1 extension"
default y
help
Include JSON1 support. This is the default.
config SQLITE3_RTREE
bool "R-Tree support"
default y
help
Enable R-Tree support.
config SQLITE3_SESSION
bool "Session extension"
default n
help
Enable the session extension (default no).
config SQLITE3_THREADSAFE
bool "Thread-safe library"
default y
help
Build a thread-safe library.
endmenu

+ 0
- 18
libs/sqlite3/Config.in View File

@ -1,18 +0,0 @@
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

+ 18
- 12
libs/sqlite3/Makefile View File

@ -25,8 +25,14 @@ PKG_FIXUP:=autoreconf
PKG_INSTALL:=1
PKG_CONFIG_DEPENDS := \
CONFIG_SQLITE_FTS3 \
CONFIG_SQLITE_RTREE
CONFIG_SQLITE3_DYNAMIC_EXTENSIONS \
CONFIG_SQLITE3_FTS3 \
CONFIG_SQLITE3_FTS4 \
CONFIG_SQLITE3_FTS5 \
CONFIG_SQLITE3_JSON1 \
CONFIG_SQLITE3_RTREE \
CONFIG_SQLITE3_SESSION \
CONFIG_SQLITE3_THREADSAFE
include $(INCLUDE_DIR)/package.mk
@ -57,7 +63,7 @@ $(call Package/sqlite3/Default/description)
endef
define Package/libsqlite3/config
source "$(SOURCE)/Config.in"
source "$(SOURCE)/Config-lib.in"
endef
define Package/sqlite3-cli
@ -80,19 +86,19 @@ TARGET_CFLAGS += \
-DHAVE_MALLOC_USABLE_SIZE=1 \
-DSQLITE_ENABLE_UNLOCK_NOTIFY=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 \
--disable-editline \
--disable-static-shell
--disable-static-shell \
$(if $(CONFIG_SQLITE3_DYNAMIC_EXTENSIONS),--enable-dynamic-extensions,--disable-dynamic-extensions) \
$(if $(CONFIG_SQLITE3_FTS3),--enable-fts3,--disable-fts3) \
$(if $(CONFIG_SQLITE3_FTS3),--enable-fts4,--disable-fts4) \
$(if $(CONFIG_SQLITE3_FTS3),--enable-fts5,--disable-fts5) \
$(if $(CONFIG_SQLITE3_JSON1),--enable-json1,--disable-json1) \
$(if $(CONFIG_SQLITE3_RTREE),--enable-rtree,--disable-rtree) \
$(if $(CONFIG_SQLITE3_SESSION),--enable-session,--disable-session) \
$(if $(CONFIG_SQLITE3_THREADSAFE),--enable-threadsafe,--disable-threadsafe)
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include


Loading…
Cancel
Save