From: Sebastian Kemper Date: Thu, 27 Dec 2018 09:53:58 +0000 (+0100) Subject: sqlite3: add configure switches to menuselect X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=0b6d2678c14aec4c1498b9ca756a2317e4919118;p=feed%2Fpackages.git 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 --- diff --git a/libs/sqlite3/Config-lib.in b/libs/sqlite3/Config-lib.in new file mode 100644 index 0000000000..aa6357b53c --- /dev/null +++ b/libs/sqlite3/Config-lib.in @@ -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 diff --git a/libs/sqlite3/Config.in b/libs/sqlite3/Config.in deleted file mode 100644 index 8e8fa6ec9f..0000000000 --- a/libs/sqlite3/Config.in +++ /dev/null @@ -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 diff --git a/libs/sqlite3/Makefile b/libs/sqlite3/Makefile index b56af53602..d1a558717d 100644 --- a/libs/sqlite3/Makefile +++ b/libs/sqlite3/Makefile @@ -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