diff --git a/Makefile.in b/Makefile.in
index 9bdee26d73..67cc9ac453 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -120,6 +120,12 @@ T.cc.sqlite = $(T.cc) @TARGET_DEBUG@
# can include the generated sqlite_cfg.h.
#
T.cc.sqlite += -D_HAVE_SQLITE_CONFIG_H -DBUILD_sqlite
+#
+# -I$(prefix)/include is primarily so that the ICU
+# headers can be found.
+#
+T.cc.sqlite += -I$(prefix)/include
+
#
# main.mk will fill out T.cc.sqlite with some flags common to all builds.
@@ -241,7 +247,7 @@ AS_AUTO_DEF = $(TOP)/auto.def
# Shell commands to re-run $(TOP)/configure with the same args it was
# invoked with to produce this makefile.
#
-AS_AUTOREMAKE = @SQLITE_AUTOREMAKE@
+AS_AUTORECONFIG = @SQLITE_AUTORECONFIG@
USE_AMALGAMATION ?= @USE_AMALGAMATION@
AMALGAMATION_GEN_FLAGS ?= --linemacros=@AMALGAMATION_LINE_MACROS@
@@ -252,16 +258,16 @@ AMALGAMATION_GEN_FLAGS ?= --linemacros=@AMALGAMATION_LINE_MACROS@
SHELL_OPT ?= @OPT_SHELL@
Makefile: $(TOP)/Makefile.in $(AS_AUTO_DEF)
- $(AS_AUTOREMAKE)
+ $(AS_AUTORECONFIG)
@touch $@
sqlite3.pc: $(TOP)/sqlite3.pc.in $(AS_AUTO_DEF)
- $(AS_AUTOREMAKE)
+ $(AS_AUTORECONFIG)
@touch $@
install: install-pc # defined in main.mk
sqlite_cfg.h: $(TOP)/sqlite_cfg.h.in $(AS_AUTO_DEF)
- $(AS_AUTOREMAKE)
+ $(AS_AUTORECONFIG)
@touch $@
#
@@ -311,7 +317,7 @@ clean-autosetup:
clean: clean-autosetup
distclean-autosetup: clean
- rm -f sqlite_cfg.h config.log config.status config.defines.json Makefile sqlite3.pc
+ rm -f sqlite_cfg.h config.log config.status config.defines.* Makefile sqlite3.pc
rm -f $(TOP)/tool/emcc.sh
rm -f libsqlite3*$(T.dll)
rm -f jimsh0*
diff --git a/auto.def b/auto.def
index 074e75c10b..e2ba5f1db9 100644
--- a/auto.def
+++ b/auto.def
@@ -14,31 +14,6 @@
#
use cc cc-db cc-shared cc-lib hwaci-common pkg-config
-# Are we cross-compiling?
-set cross_compiling [hwaci-is-cross-compiling]
-if {0
- && !$cross_compiling
- && "nope" eq [get-env CC_FOR_BUILD "nope"]
- && [get-define CC] ne [get-define CC_FOR_BUILD]} {
- # Arguable/debatable...
- #
- # When _not_ cross-compiling and CC_FOR_BUILD is _not_ explcitely
- # specified, force CC_FOR_BUILD to be the same as CC, so that:
- #
- # ./configure CC=clang
- #
- # will use CC_FOR_BUILD=clang, instead of cc, for building in-tree
- # tools. This is based off of an email discussion and is thought to
- # be likely to cause less confusion than seeing 'cc' invocations
- # will when the user passes CC=clang.
- #
- # Sidebar: if we do this before the cc package is installed, it gets
- # reverted by that package. Ergo, the cc package init will tell the
- # user "Build C compiler...cc" shortly before we tell them:
- msg-result "Re-defining CC_FOR_BUILD to CC=[get-define CC]. To avoid this, explicitly pass CC_FOR_BUILD=..."
- define CC_FOR_BUILD [get-define CC]
-}
-
# $DUMP_DEFINES_TXT is the file emitted by --dump-defines, intended
# only for build debugging and not part of the public build interface.
set DUMP_DEFINES_TXT ./config.defines.txt
@@ -151,28 +126,16 @@ set DUMP_DEFINES_JSON ""; #./config.defines.json
#
########################################################################
set flags {
+ #
with-debug:=1 => {Enable debug build flags}
- with-tclsh:PATH => {Full pathname of tclsh to use}
- with-tcl:DIR => {Directory containing tclConfig.sh}
- tcl=1 => {Disable components which require TCL-dev}
- test-status => {Enable status of tests}
+ shared=1 => {Disable build of shared libary}
+ static=1 => {Disable build of static library (mostly)}
+ amalgamation=1 => {Disable the amalgamation and instead build all files separately.}
+ #
+ #
threadsafe=1 => {Disable mutexing}
with-tempstore:=no => {Use an in-ram database for temporary tables: never,no,yes,always}
- editline=0 => {BSD editline support}
- readline=1 => {Disable readline support}
largefile=1 => {Disable large file support}
- shared=1 => {Disable build of shared libary}
- static=1 => {Disable build of static library}
- with-readline-lib:LDFLAGS
- => {Readline LDFLAGS, e.g. -lreadline -lncurses}
- with-readline-inc:CFLAGS
- => {Readline CFLAGS, e.g. -I/path/to/includes}
- with-readline-header:PATH
- => {Full path to readline.h, from which --with-readline-inc will be derived}
- with-linenoise:DIR => {Source directory for linenoise.c and linenoise.h}
- with-icu-lib:LDFLAGS => {Enable SQLITE_ENABLE_ICU and add the given linker flags for the ICU libraries}
- icu-collations=0 => {Enable SQLITE_ENABLE_ICU_COLLATIONS. Requires --with-icu-lib=...}
- amalgamation=1 => {Disable the amalgamation and instead build all files separately}
load-extension=1 => {Disable loading of external extensions}
math=1 => {Disable math functions}
json=1 => {Disable JSON functions}
@@ -186,12 +149,46 @@ set flags {
geopoly => {Enable the GEOPOLY extension}
rtree => {Enable the RTREE extension}
session => {Enable the SESSION extension}
- gcov=0 => {Enable coverage testing using gcov}
- linemacros => {Enable #line macros in the amalgamation.}
+ #
+ #
+ with-tclsh:PATH => {Full pathname of tclsh to use}
+ with-tcl:DIR => {Directory containing tclConfig.sh}
+ tcl=1 => {Disable components which require TCL-dev}
+ #
+ #
+ readline=1 => {Disable readline support}
+ # --with-readline-lib is a backwards-compatible alias for
+ # --with-readline-ldflags
+ with-readline-lib:
+ with-readline-ldflags:=auto
+ => {Readline LDFLAGS, e.g. -lreadline -lncurses}
+ # --with-readline-inc is a backwards-compatible alias for
+ # --with-readline-cflags
+ with-readline-inc:
+ with-readline-cflags:=auto
+ => {Readline CFLAGS, e.g. -I/path/to/includes}
+ with-readline-header:PATH
+ => {Full path to readline.h, from which --with-readline-cflags will be derived}
+ with-linenoise:DIR => {Source directory for linenoise.c and linenoise.h}
+ editline=0 => {BSD editline support}
+ #
+ #
+ with-icu-ldflags:LDFLAGS
+ => {Enable SQLITE_ENABLE_ICU and add the given linker flags for the ICU libraries}
+ icu-collations=0 => {Enable SQLITE_ENABLE_ICU_COLLATIONS. Requires --with-icu-ldflags=...}
+ with-icu-config:=auto => {Enable SQLITE_ENABLE_ICU and fetch linker flags from the given icu-config binary}
+ #
+ #
with-wasi-sdk:=/opt/wasi-sdk
=> {Top-most dir of the wasi-sdk for a WASI build}
with-emsdk:DIR => {Top-most dir of the Emscripten SDK installation}
+ #
+ #
+ test-status => {Enable status of tests}
+ gcov=0 => {Enable coverage testing using gcov}
+ linemacros => {Enable #line macros in the amalgamation.}
dump-defines=0 => {Dump autosetup defines to $DUMP_DEFINES_TXT (for build debugging)}
+ #
}
if {"" ne $DUMP_DEFINES_JSON} {
lappend flags \
@@ -201,6 +198,15 @@ if {"" ne $DUMP_DEFINES_JSON} {
options [subst $flags]
unset flags
+#
+# Carry values from hidden --flag aliases over to their canonical flag
+# forms.
+#
+hwaci-xfer-options-aliases {
+ with-readline-inc => with-readline-cflags
+ with-readline-lib => with-readline-ldflags
+}
+
set srcdir $::autosetup(srcdir)
set top_srcdir [get-define abs_top_srcdir]
set PACKAGE_VERSION [readfile $srcdir/VERSION]
@@ -212,98 +218,49 @@ define PACKAGE_BUGREPORT [get-define PACKAGE_URL]/forum
msg-result "srcdir = $srcdir"
msg-result "top_srcdir = $top_srcdir"
-msg-result "VERSION = $PACKAGE_VERSION"
+msg-result [hwaci-bold "Configuring SQLite version $PACKAGE_VERSION"]
-define-append SQLITE_AUTOREMAKE cd '$srcdir' && '$top_srcdir/configure'
+#
+# SQLITE_AUTORECONFIG contains make target rules for re-running the
+# configure script with the same arguments it was initially invoked
+# with. This can be used to automatically reconfigure
+#
+define-append SQLITE_AUTORECONFIG cd '$::autosetup(builddir)' && '$top_srcdir/configure'
#{*}$::autosetup(argv) breaks with --flag='val with spaces', so...
foreach arg $::autosetup(argv) {
- define-append SQLITE_AUTOREMAKE '$arg'
+ define-append SQLITE_AUTORECONFIG '$arg'
}
-set outOfTreeBuild 0
+
+# Are we cross-compiling?
+set cross_compiling [hwaci-is-cross-compiling]
if {![file exists sqlite3.pc.in]} {
msg-result "This appears to be an out-of-tree build."
- set outOfTreeBuild 1
}
cc-check-tools ld ar
+define OPT_FEATURE_FLAGS {} ; # -DSQLITE_OMIT/ENABLE flags.
+define OPT_SHELL {} ; # CFLAGS for the sqlite3 CLI app
########################################################################
-# The build process allows for using a cross-compiler. But the default
-# action is to target the same platform that we are running on. The
-# configure script needs to discover the following properties of the
-# build and target systems:
-#
-# srcdir
-#
-# The is the name of the directory that contains the
-# "configure" shell script. All source files are
-# located relative to this directory.
-#
-# bindir
-#
-# The name of the directory where executables should be
-# written by the "install" target of the makefile.
-#
-# program_prefix
-#
-# Add this prefix to the names of all executables that run
-# on the target machine. Default: ""
-#
-# ENABLE_SHARED
-#
-# True if shared libraries should be generated.
-#
-# BUILD_CC
-#
-# The name of a command that is used to convert C
-# source files into executables that run on the build
-# platform.
-#
-# BUILD_CFLAGS
-#
-# Switches that the build compiler needs in order to construct
-# command-line programs.
-#
-# BUILD_LIBS
-#
-# Libraries that the build compiler needs in order to construct
-# command-line programs.
-#
-# TCL_*
-#
-# Lots of values are read in from the tclConfig.sh script,
-# if that script is available. This values are used for
-# constructing and installing the TCL extension.
-#
-# TARGET_READLINE_LIBS
-#
-# This is the library directives passed to the target linker
-# that cause the executable to link against the readline library.
-# This might be a switch like "-lreadline" or pathnames of library
-# file like "../../src/libreadline.a".
-#
-# TARGET_READLINE_INC
-#
-# This variables define the directory that contain header
-# files for the readline library. If the compiler is able
-# to find on its own, then this can be blank.
-
-#
-# OPT_FEATURE_FLAGS = -DSQLITE_OMIT/ENABLE flags.
-define OPT_FEATURE_FLAGS {}
-define OPT_SHELL {}; # CFLAGS for the sqlite3 CLI app
-
# Adds $args, if not empty, to OPT_FEATURE_FLAGS.
-proc add-feature-flag {args} {
+# If the first arg is -shell then it strips that arg
+# and passes the remaining args th sqlite-add-shell-opt
+# before adding them to OPF_FEATURE_FLAGS.
+proc sqlite-add-feature-flag {args} {
+ set shell ""
+ if {"-shell" eq [lindex $args 0]} {
+ set args [lassign $args shell]
+ }
if {"" ne $args} {
+ if {"" ne $shell} {
+ sqlite-add-shell-opt {*}$args
+ }
define-append OPT_FEATURE_FLAGS {*}$args
}
}
-# add-feature-flag -DSQLITE_JUST_TESTING=3
-
-# Adds $args, if not empty, to OPT_SHELL.
-proc add-shell-opt {args} {
+# Appends $args, if not empty, to OPT_SHELL.
+proc sqlite-add-shell-opt {args} {
if {"" ne $args} {
define-append OPT_SHELL {*}$args
}
@@ -313,11 +270,11 @@ hwaci-file-extensions
if {".exe" eq [get-define TARGET_EXEEXT]} {
define SQLITE_OS_UNIX 0
define SQLITE_OS_WIN 1
- # todo? add -DSQLITE_OS_WIN=1 to CFLAGS?
+ # todo? add -DSQLITE_OS_WIN=1 to CFLAGS or CFLAGS_sqlite3_os?
} else {
define SQLITE_OS_UNIX 1
define SQLITE_OS_WIN 0
- # todo? add -DSQLITE_OS_UNIX=1 to CFLAGS?
+ # todo? add -DSQLITE_OS_UNIX=1 to CFLAGS or CFLAGS_sqlite3_os
}
#########
@@ -433,7 +390,7 @@ if {[cc-check-includes zlib.h] && [hwaci-check-function-in-lib deflate z]} {
# Note that -DSQLITE_HAVE_ZLIB=1 is handled separately from the
# other feature flags in the autotools build. Do we need to emulate
# that?
- add-shell-opt -DSQLITE_HAVE_ZLIB=1
+ sqlite-add-shell-opt -DSQLITE_HAVE_ZLIB=1
} else {
define HAVE_ZLIB 0
define LDFLAGS_ZLIB ""
@@ -504,7 +461,7 @@ hwaci-if-opt-truthy with-debug {
# components.
#
define TCLSH_CMD {exit 1}
-define HAVE_TCL [opt-bool tcl]
+define HAVE_TCL 0
proc sqlite-check-tcl {} {
# TODO: document the steps this is taking.
if {![opt-bool tcl]} {
@@ -730,7 +687,7 @@ unset cgtcl
msg-checking "Support threadsafe operation? "
hwaci-if-opt-truthy threadsafe {
msg-result yes
- add-feature-flag -DSQLITE_THREADSAFE=1
+ sqlite-add-feature-flag -DSQLITE_THREADSAFE=1
if {![hwaci-check-function-in-lib pthread_create pthread]
|| ![hwaci-check-function-in-lib pthread_mutexattr_init pthread]} {
user-error "Missing required pthread bits"
@@ -739,7 +696,7 @@ hwaci-if-opt-truthy threadsafe {
undefine lib_pthread_create
} {
msg-result no
- add-feature-flag -DSQLITE_THREADSAFE=0
+ sqlite-add-feature-flag -DSQLITE_THREADSAFE=0
define LDFLAGS_PTHREAD ""
}
@@ -784,6 +741,7 @@ if {1} {
# Returns a string describing which line-editing approach to use, or
# "none" if no option is available.
proc sqlite-check-line-editing {} {
+ msg-result "Checking for line-editing capability..."
define HAVE_READLINE 0
define HAVE_LINENOISE 0
define HAVE_EDITLINE 0
@@ -800,10 +758,10 @@ proc sqlite-check-line-editing {} {
} elseif {![file exists $dirLn/linenoise.h] } {
hwaci-fatal "Cannot find linenoise.h in $dirLn"
}
- user-notice "Using linenoise from $dirLn"
+ msg-result "Using linenoise from $dirLn"
define CFLAGS_READLINE "-I$dirLn $dirLn/linenoise.c"
define HAVE_LINENOISE 1
- add-shell-opt -DHAVE_LINENOISE=1
+ sqlite-add-shell-opt -DHAVE_LINENOISE=1
return "linenoise"
} elseif {[opt-bool editline]} {
# --enable-editline. The problem is finding a system which has it
@@ -817,32 +775,33 @@ proc sqlite-check-line-editing {} {
#
# However, a workaround which works on the available systems is:
#
- # --with-readline-lib=-ledit
+ # --with-readline-ldflags=-ledit
#
# And then let it detect readline.h. We "could" re-map
# --enable-editline to do exactly that but it seems likely to
# break on systems for which which HAVE_EDITLINE=1 previously
# worked.
- hwaci-indented-notice {
- WARNING: the --enable-editline flag is not supported due to
+ hwaci-indented-notice -error {
+ ERROR: the --enable-editline flag is not supported due to
non-availability of systems which have it in a form which the
sqlite3 CLI shell expects to see. On some systems this can be
- worked around by passing --with-readline-lib=-ledit instead of
- --enable-editline, which will attempt to use the readline.h
- supplied by libreadline but link against -ledit.
+ worked around by passing --with-readline-ldflags=-ledit instead
+ of --enable-editline, which will attempt to use the readline.h
+ supplied by libreadline but link against -ledit. On systems
+ tested so far, that works.
}
return "none"
} elseif {![opt-bool readline]} {
- user-notice "Readline support explicitly disabled with --disable-readline"
+ msg-result "Readline support explicitly disabled with --disable-readline"
return "none"
}
- # Transform with-readline-header=X to with-readline-inc=-I...
+ # Transform with-readline-header=X to with-readline-cflags=-I...
set v [opt-val with-readline-header]
hwaci-opt-set with-readline-header ""
if {"" ne $v} {
if {"auto" eq $v} {
- hwaci-opt-set with-readline-inc auto
+ hwaci-opt-set with-readline-cflags auto
} else {
set v [file dirname $v]
if {[string match */*line $v]} {
@@ -853,12 +812,12 @@ proc sqlite-check-line-editing {} {
# work!
set v [file dirname $v]
}
- hwaci-opt-set with-readline-inc "-I$v"
+ hwaci-opt-set with-readline-cflags "-I$v"
}
}
# Look for readline.h
- set rlInc [opt-val with-readline-inc auto]
+ set rlInc [opt-val with-readline-cflags auto]
if {"auto" eq $rlInc} {
set rlInc ""
if {!$::cross_compiling} {
@@ -880,7 +839,7 @@ proc sqlite-check-line-editing {} {
# If readline.h was found/specified, look for libreadline...
set rlLib ""
if {"" ne $rlInc} {
- set rlLib [opt-val with-readline-lib]
+ set rlLib [opt-val with-readline-ldflags]
if {"" eq $rlLib || "auto" eq $rlLib} {
set rlLib ""
set libTerm ""
@@ -905,8 +864,48 @@ proc sqlite-check-line-editing {} {
define LDFLAGS_READLINE $rlLib
define CFLAGS_READLINE $rlInc
define HAVE_READLINE 1
- add-shell-opt -DHAVE_READLINE=1
- user-notice "Using readline flags: $rlInc $rlLib"
+ sqlite-add-shell-opt -DHAVE_READLINE=1
+ msg-result "Using readline flags: $rlInc $rlLib"
+
+ # Now check whether rl_completion_matches() has a signature we can use.
+ # cctest is producing unexpected test output when using:
+ # -includes {stdio.h readline/readline.h}
+ # so we have to use -source instead and write the whole test app inline
+ if {[cctest \
+ -cflags $rlInc -libs $rlLib -nooutput 1 -source {
+ #include
+ #include
+ static char * rcg(const char *z, int i){return 0;}
+ int main(void) {
+ char ** x = rl_completion_matches("one", rcg);
+ return 0;
+ }
+ }]} {
+ } else {
+ user-notice "WARNING: readline completion disabled due to rl_completion_matches() signature mismatch"
+ show-notices
+ sqlite-add-shell-opt -DSQLITE_OMIT_READLINE_COMPLETION
+ }
+
+ # Now check whether rl_completion_matches() has a signature we can use.
+ # cctest is producing unexpected test output when using:
+ # -includes {stdio.h readline/readline.h}
+ # so we have to use -source instead and write the whole test app inline
+ if {[cctest \
+ -cflags $rlInc -libs $rlLib -nooutput 1 -source {
+ #include
+ #include
+ static char * rcg(const char *z, int i){return 0;}
+ int main(void) {
+ char ** x = rl_completion_matches("one", rcg);
+ return 0;
+ }
+ }]} {
+ user-notice "Readline completion enabled"
+ } else {
+ user-notice "WARNING: readline completion disabled due to rl_completion_matches() signature mismatch"
+ add-shell-opt -DSQLITE_OMIT_READLINE_COMPLETION
+ }
return "readline"
}
@@ -923,7 +922,7 @@ hwaci-if-opt-truthy load-extension {
}
} {
define LDFLAGS_DLOPEN ""
- add-feature-flag {-DSQLITE_OMIT_LOAD_EXTENSION=1}
+ sqlite-add-feature-flag {-DSQLITE_OMIT_LOAD_EXTENSION=1}
msg-result "Disabling loadable extensions."
}
@@ -933,7 +932,7 @@ hwaci-if-opt-truthy math {
}
define LDFLAGS_MATH [get-define lib_ceil]
undefine lib_ceil
- add-feature-flag {-DSQLITE_ENABLE_MATH_FUNCTIONS}
+ sqlite-add-feature-flag {-DSQLITE_ENABLE_MATH_FUNCTIONS}
msg-result "Enabling math SQL functions [get-define LDFLAGS_MATH]"
} {
define LDFLAGS_MATH ""
@@ -957,19 +956,64 @@ if {![get-define HAVE_WASI_SDK] && [hwaci-check-emsdk]} {
unset emccsh
########################################################################
-# ICU
-if {"" ne [define LDFLAGS_ICU [join [opt-val with-icu-lib ""]]]} {
+# ICU - International Components for Unicode
+#
+# Handles these flags:
+#
+# --with-icu-ldflags=LDFLAGS
+# --with-icu-config[=/path/to/icu-config]
+# --enable-icu-collations
+#
+# If both icu-ldflags and icu-config are provided, they are
+# cumulative. If neither are provided, icu-collations is not honored
+# and a warning is emitted if it is provided.
+#
+# Design note: though we can automatically enable ICU if the
+# icu-config binary is found, we specifically do not. ICU is always an
+# opt-in feature.
+proc sqlite-check-icu {} {
+ define LDFLAGS_ICU [join [opt-val with-icu-ldflags ""]]
# Flags sets seen in the wild for ICU:
- # {-licui18n -licuuc -licudata} {-licui18n -licuuc}
- add-feature-flag -DSQLITE_ENABLE_ICU
- msg-result "Enabling ICU support with libs: [get-define LDFLAGS_ICU]"
- if {[opt-bool icu-collations]} {
- msg-result "Enabling ICU collations."
- add-feature-flag -DSQLITE_ENABLE_ICU_COLLATIONS
+ # - -licui18n -licuuc -licudata
+ # - -licui18n -licuuc
+ # - /usr/local/bin/icu-config --ldflags
+ if {[hwaci-opt-was-provided with-icu-config]} {
+ set bin [opt-val with-icu-config]
+ if {"auto" eq $bin} {
+ set bin [hwaci-first-bin-of \
+ [get-define prefix]/bin/icu-config \
+ /usr/local/bin/icu-config \
+ /usr/bin/icu-config]
+ if {"" eq $bin} {
+ hwaci-fatal "--with-icu-config=auto cannot find icu-config binary"
+ }
+ }
+ if {[file-isexec $bin]} {
+ set x [exec $bin --ldflags]
+ if {"" eq $x} {
+ hwaci-fatal "$bin --ldflags returned no data"
+ }
+ define-append LDFLAGS_ICU $x
+ } else {
+ hwaci-fatal "--with-icu-config=$bin does not refer to an executable"
+ }
}
-} elseif {[opt-bool icu-collations]} {
- hwaci-warn "ignoring --enable-icu-collations because --with-icu-lib was not specified"
-}
+ set flags [define LDFLAGS_ICU [string trim [get-define LDFLAGS_ICU]]]
+ if {"" ne $flags} {
+ sqlite-add-feature-flag -shell -DSQLITE_ENABLE_ICU
+ msg-result "Enabling ICU support with libs: $flags"
+ if {[opt-bool icu-collations]} {
+ msg-result "Enabling ICU collations."
+ sqlite-add-feature-flag -shell -DSQLITE_ENABLE_ICU_COLLATIONS
+ # Recall that shell.c builds with sqlite3.c
+ }
+ } elseif {[opt-bool icu-collations]} {
+ hwaci-warn "ignoring --enable-icu-collations because neither --with-icu-ldflags nor --with-icu-config provided any linker flags"
+ } else {
+ msg-result "ICU support is disabled."
+ }
+}; # sqlite-check-icu
+sqlite-check-icu
########################################################################
# Check for log(3) in libm and die with an error if it is not
@@ -978,7 +1022,7 @@ if {"" ne [define LDFLAGS_ICU [join [opt-val with-icu-lib ""]]]} {
# required linker flags (which may be empty even if the math APIs are
# found, depending on the OS).
proc affirm-have-math {why} {
- if {![hwaci-check-function-in-lib log m]} {
+ if {![msg-quiet hwaci-check-function-in-lib log m]} {
user-error "Missing math APIs for $why"
}
define LDFLAGS_MATH [get-define lib_log ""]
@@ -987,6 +1031,7 @@ proc affirm-have-math {why} {
########################################################################
# Handle various SQLITE_ENABLE_... feature flags.
+msg-result "Feature flags..."
foreach {boolFlag featureFlag ifSetEvalThis} {
all {} {
hwaci-opt-set fts4
@@ -1007,33 +1052,35 @@ foreach {boolFlag featureFlag ifSetEvalThis} {
hwaci-warn "not enabling memsys3 because memsys5 is enabled."
expr 0
} else {
- add-feature-flag -DSQLITE_ENABLE_MEMSYS3
+ sqlite-add-feature-flag -DSQLITE_ENABLE_MEMSYS3
}
}
} {
hwaci-if-opt-truthy $boolFlag {
- add-feature-flag $featureFlag
+ sqlite-add-feature-flag $featureFlag
if {0 != [eval $ifSetEvalThis] && "all" ne $boolFlag} {
- msg-result "Enabling $boolFlag"
+ msg-result " + $boolFlag"
}
} {
- msg-result "Not enabling $boolFlag"
+ if {"all" ne $boolFlag} {
+ msg-result " - $boolFlag"
+ }
}
}
########################################################################
# Invert the above loop's logic for some explicit SQLITE_OMIT_...
-# cases. If config option $boolFlag is set, [add-feature-flag
+# cases. If config option $boolFlag is set, [sqlite-add-feature-flag
# $featureFlag], where $featureFlag is intended to be
# -DSQLITE_OMIT_...
foreach {boolFlag featureFlag} {
json -DSQLITE_OMIT_JSON
} {
if {[hwaci-opt-truthy $boolFlag]} {
- msg-result "Enabling $boolFlag"
+ msg-result " + $boolFlag"
} else {
- add-feature-flag $featureFlag
- msg-result "Disabling $boolFlag"
+ sqlite-add-feature-flag $featureFlag
+ msg-result " - $boolFlag"
}
}
@@ -1085,11 +1132,11 @@ if {0} {
# Requires no input template...
make-config-header sqlite_cfg.h \
-bare {SIZEOF_* HAVE_DECL_*} \
- -none {HAVE_CFLAG_* LDFLAGS_* SH_* SQLITE_AUTOREMAKE
+ -none {HAVE_CFLAG_* LDFLAGS_* SH_* SQLITE_AUTORECONFIG
TARGET_* USE_GCOV TCL_*} \
-auto {HAVE_* PACKAGE_*} \
-none *
- hwaci-touch sqlite_cfg.h ; # help avoid frequent unnecessary @SQLITE_AUTOREMAKE@
+ hwaci-touch sqlite_cfg.h ; # help avoid frequent unnecessary @SQLITE_AUTORECONFIG@
}
#TODO hwaci-make-from-dot-in ext/wasm/GNUmakefile
@@ -1102,7 +1149,7 @@ if {"" ne $DUMP_DEFINES_JSON} {
define OPT_SHELL.list [get-define OPT_SHELL]
set dumpDefsOpt {
-bare {SIZEOF_* HAVE_DECL_*}
- -none {HAVE_CFLAG_* LDFLAGS_* SH_* SQLITE_AUTOREMAKE TARGET_* USE_GCOV TCL_*}
+ -none {HAVE_CFLAG_* LDFLAGS_* SH_* SQLITE_AUTORECONFIG TARGET_* USE_GCOV TCL_*}
-array {*.list}
-auto {OPT_* PACKAGE_* HAVE_*}
}
@@ -1119,9 +1166,8 @@ if {"" ne $DUMP_DEFINES_JSON} {
########################################################################
# Some build-dev/debug-only output
hwaci-if-opt-truthy dump-defines {
- global DUMP_DEFINES_TXT
- msg-result "--dump-defines is creating $DUMP_DEFINES_TXT"
- make-config-header $DUMP_DEFINES_TXT \
+ msg-result "--dump-defines is creating $::DUMP_DEFINES_TXT"
+ make-config-header $::DUMP_DEFINES_TXT \
-bare {SQLITE_OS* SQLITE_DEBUG USE_*} \
-str {BIN_* CC LD AR LDFLAG* OPT_*} \
-auto {*}
@@ -1134,4 +1180,4 @@ hwaci-if-opt-truthy dump-defines {
}
}
-msg-result "Done! Now run make."
+msg-result [hwaci-bold "Source tree is configured! Run make to build it."]
diff --git a/autosetup/hwaci-common.tcl b/autosetup/hwaci-common.tcl
index f7ff89f3a3..053a30a370 100644
--- a/autosetup/hwaci-common.tcl
+++ b/autosetup/hwaci-common.tcl
@@ -12,25 +12,28 @@
# Routines for Steve Bennett's autosetup which are common to trees
# managed in and around the umbrella of the SQLite project.
#
-# Routines with a suffix of _ are intended for internal use,
-# within this file, and are not part of the API which auto.def files
-# should rely on.
-#
# This file was initially derived from one used in the libfossil
-# project, authored by the same person who ported it here, noted here
-# only as an indication that there are no licensing issue despite this
-# code having at least two near-twins running around in other trees.
+# project, authored by the same person who ported it here, and this is
+# noted here only as an indication that there are no licensing issues
+# despite this code having at least two near-twins running around a
+# handful of third-party source trees.
#
########################################################################
#
-# Design notes: by and large, autosetup prefers to update global state
-# with the results of feature checks, e.g. whether the compiler
-# supports flag --X. In this developer's opinion that (A) causes more
-# confusion than it solves[^1] and (B) adds an unnecessary layer of
-# "voodoo" between the autosetup user and its internals. This module,
-# in contrast, instead injects the results of its own tests into
-# well-defined variables and leaves the integration of those values to
-# the caller's discretion.
+# Design notes:
+#
+# - Symbols with a suffix of _ are intended for internal use within
+# this file, and are not part of the API which auto.def files should
+# rely on.
+#
+# - By and large, autosetup prefers to update global state with the
+# results of feature checks, e.g. whether the compiler supports flag
+# --X. In this developer's opinion that (A) causes more confusion
+# than it solves[^1] and (B) adds an unnecessary layer of "voodoo"
+# between the autosetup user and its internals. This module, in
+# contrast, instead injects the results of its own tests into
+# well-defined variables and leaves the integration of those values
+# to the caller's discretion.
#
# [1]: As an example: testing for the -rpath flag, using
# cc-check-flags, can break later checks which use
@@ -45,25 +48,48 @@
# $hwaci_ is an internal-use-only array for storing whatever generic
# internal stuff we need stored.
array set hwaci_ {}
+set hwaci_(isatty) [isatty? stdout]
proc hwaci-warn {msg} {
puts stderr "WARNING: $msg"
}
-#proc hwaci-notice {msg} {
-# puts stderr "NOTICE: $msg"
-#}
proc hwaci-fatal {msg} {
- user-error "ERROR: $msg"
+ show-notices
+ puts stderr "ERROR: $msg"
+ exit 1
+}
+
+########################################################################
+# If this function believes that the current console might support
+# ANSI escape sequences then this returns $str wrapped in a sequence
+# to bold that text, else it returns $str as-is.
+proc hwaci-bold {str} {
+ if {$::autosetup(iswin) || !$::hwaci_(isatty)} {
+ return $str
+ }
+ return "\033\[1m${str}\033\[0m"
}
########################################################################
# Takes a multi-line message and emits it with consistent indentation
-# using user-notice (which means its rendering will be delayed until
-# the next time autosetup goes to output a message).
-proc hwaci-indented-notice {msg} {
- set lines [split $msg \n]
+# using [user-notice] (which means its rendering will (A) go to stderr
+# and (B) be delayed until the next time autosetup goes to output a
+# message).
+#
+# If its first argument is -error then it renders the message
+# immediately and then exits.
+proc hwaci-indented-notice {args} {
+ set fErr ""
+ switch -exact -- [lindex $args 0] {
+ -error { set args [lassign $args fErr] }
+ }
+ set lines [split [join $args] \n]
foreach line $lines {
- user-notice " [string trim $line]"
+ user-notice " [string trimleft $line]"
+ }
+ if {"" ne $fErr} {
+ show-notices
+ exit 1
}
}
@@ -93,6 +119,21 @@ proc hwaci-lshift_ {listVar {count 1}} {
return $r
}
+########################################################################
+# Expects to receive string input, which it splits on newlines, strips
+# out any lines which begin with an number of whitespace followed by a
+# '#', and returns a value containing the [append]ed results of each
+# remaining line with a \n between each.
+proc hwaci-strip-hash-comments_ {val} {
+ set x {}
+ foreach line [split $val \n] {
+ if {![string match "#*" [string trimleft $line]]} {
+ append x $line \n
+ }
+ }
+ return $x
+}
+
########################################################################
# A proxy for cc-check-function-in-lib which "undoes" any changes that
# routine makes to the LIBS define. Returns the result of
@@ -157,7 +198,7 @@ proc hwaci-find-executable-path {args} {
set verbose 0
if {[lindex $args 0] eq "-v"} {
set verbose 1
- set binName [lrange $args 1 end]
+ set args [lassign $args - binName]
msg-checking "Looking for $binName ... "
}
set check [find-executable-path $binName]
@@ -225,9 +266,30 @@ proc hwaci-require-bash {} {
return $bash
}
+########################################################################
+# Returns 1 if the user specifically provided the given configure
+# flag, else 0. This can be used to distinguish between options which
+# have a default value and those which were explicitly provided by the
+# user, even if the latter is done in a way which uses the default
+# value.
+#
+# For example, with a configure flag defined like:
+#
+# { foo-bar:=baz => {its help text} }
+#
+# This function will, when passed foo-bar, return 1 only if the user
+# passes --foo-bar to configure, even if that invocation would resolve
+# to the default value of baz. If the user does not explicitly pass in
+# --foo-bar (with or without a value) then this returns 0.
+proc hwaci-opt-was-provided {key} {
+ dict exists $::autosetup(optset) $key
+}
+
########################################################################
# Force-set autosetup option $flag to $val. The value can be fetched
# later with [opt-val], [opt-bool], and friends.
+#
+# Returns $val.
proc hwaci-opt-set {flag {val 1}} {
global autosetup
if {$flag ni $::autosetup(options)} {
@@ -236,6 +298,7 @@ proc hwaci-opt-set {flag {val 1}} {
lappend ::autosetup(options) $flag
}
dict set ::autosetup(optset) $flag $val
+ return $val
}
########################################################################
@@ -548,7 +611,7 @@ proc hwaci-looks-like-windows {{key host}} {
}
if {$key eq "build"} {
# These apply only to the local OS, not a cross-compilation target,
- # as the above check can potentially.
+ # as the above check potentially can.
if {$::autosetup(iswin)} { return 1 }
if {[find-an-executable cygpath] ne "" || $::tcl_platform(os)=="Windows NT"} {
return 1
@@ -975,3 +1038,69 @@ proc hwaci-dump-defs-json {file args} {
msg-result "Created $file"
}
}
+
+########################################################################
+# Expects a list of pairs of configure flags with the given names to
+# have been registered with autosetup, in this form:
+#
+# { alias1 => canonical1
+# aliasN => canonicalN ... }
+#
+# The names must not have their leading -- part and must be in the
+# form which autosetup will expect for passing to [opt-val NAME] and
+# friends.
+#
+# Commend lines are permitted in the input.
+#
+# If [opt-val $hidden] has a value but [opt-val
+# $canonical] does not, it copies the former over the latter. If
+# $hidden has no value set, this is a no-op. If both have explicit
+# values a fatal usage error is triggered.
+#
+# Motivation: autosetup enables "hidden aliases" in [options] lists,
+# and elides the aliases from --help output but does no further
+# handling of them. For example, when --alias is a hidden alias of
+# --canonical and a user passes --alias=X, [opt-val canonical] returns
+# no value. i.e. the script must check both [opt-val alias] and
+# [opt-val canonical]. The intent here is that this function be
+# passed such mappings immediately after [options] is called,
+# to carry over any values from hidden aliases into their canonical
+# names, so that in the above example [opt-value canonical] will
+# return X if --alias=X is passed in.
+proc hwaci-xfer-options-aliases {mapping} {
+ foreach {hidden => canonical} [hwaci-strip-hash-comments_ $mapping] {
+ set x [opt-val $hidden "~9~9~9~"]
+ if {"~9~9~9~" ne $x} {
+ if {"~0~0~0~" eq [opt-val $canonical "~0~0~0~"]} {
+ hwaci-opt-set $canonical $x
+ } else {
+ hwaci-fatal "both --$canonical and its alias --$hidden were used. Use only one or the other."
+ }
+ }
+ }
+}
+
+########################################################################
+# Arguable/debatable...
+#
+# When _not_ cross-compiling and CC_FOR_BUILD is _not_ explcitely
+# specified, force CC_FOR_BUILD to be the same as CC, so that:
+#
+# ./configure CC=clang
+#
+# will use CC_FOR_BUILD=clang, instead of cc, for building in-tree
+# tools. This is based off of an email discussion and is thought to
+# be likely to cause less confusion than seeing 'cc' invocations
+# will when the user passes CC=clang.
+#
+# Sidebar: if we do this before the cc package is installed, it gets
+# reverted by that package. Ergo, the cc package init will tell the
+# user "Build C compiler...cc" shortly before we tell them:
+proc hwaci-redefine-cc-for-build {} {
+ if {![hwaci-is-cross-compiling]
+ && "nope" eq [get-env CC_FOR_BUILD "nope"]
+ && [get-define CC] ne [get-define CC_FOR_BUILD]} {
+ user-notice "Re-defining CC_FOR_BUILD to CC=[get-define CC]. To avoid this, explicitly pass CC_FOR_BUILD=..."
+ define CC_FOR_BUILD [get-define CC]
+ }
+}
diff --git a/ext/fts5/fts5_tcl.c b/ext/fts5/fts5_tcl.c
index df4b2daa41..dd2ed82c9e 100644
--- a/ext/fts5/fts5_tcl.c
+++ b/ext/fts5/fts5_tcl.c
@@ -21,6 +21,7 @@
#include "fts5.h"
#include
#include
+#include
#ifdef SQLITE_DEBUG
extern int sqlite3_fts5_may_be_corrupt;
@@ -1631,7 +1632,7 @@ static int SQLITE_TCLAPI f5tDropCorruptTable(
*/
void f5tFree(void *p){
char *x = (char *)p;
- free(&x[-8]);
+ ckfree(&x[-8]);
}
/*
@@ -1643,14 +1644,14 @@ void f5tStrFunc(sqlite3_context *pCtx, int nArg, sqlite3_value **apArg){
zText = sqlite3_value_text(apArg[0]);
if( zText ){
- int nText = sqlite3Strlen30(zText);
- char *zCopy = (char*)malloc(nText+8);
+ sqlite3_int64 nText = strlen(zText);
+ char *zCopy = (char*)ckalloc(nText+8);
if( zCopy==0 ){
sqlite3_result_error_nomem(pCtx);
}else{
zCopy += 8;
memcpy(zCopy, zText, nText);
- sqlite3_result_text(pCtx, zCopy, nText, f5tFree);
+ sqlite3_result_text64(pCtx, zCopy, nText, f5tFree, SQLITE_UTF8);
}
}
}
diff --git a/main.mk b/main.mk
index 5dadfd2c08..5bf2cfac98 100644
--- a/main.mk
+++ b/main.mk
@@ -2074,6 +2074,29 @@ sqlite3.dll: $(LIBOBJ) sqlite3.def
$(T.cc.sqlite) $(LDFLAGS.shobj) -o $@ sqlite3.def \
-Wl,"--strip-all" $(LIBOBJ)
+#
+# Emit a list of commonly-used targets
+help:
+ @echo; echo "Frequently-used high-level make targets:"; echo; \
+ echo " - all [default] = builds most components"; \
+ echo " - clean = cleans up most build products"; \
+ echo " - distclean = cleans up all build products"; \
+ echo " - install = installs activated components"; \
+ echo; echo "Testing-related targets:"; echo; \
+ echo " - test = a number of sanity checks"; \
+ echo " - quicktest = minimal tests"; \
+ echo " - releasetest = pre-release tests"; \
+ echo " - devtest = Minimum tests required before code check-ins"; \
+ echo " - mdevtest = A variant of devtest"; \
+ echo " - sdevtest = A variant of devtest"; \
+ echo " - tcltest = Runs test/veryquick.test"; \
+ echo " - testrunner = Like tcltest but spread across multiple cores"; \
+ echo " - fuzztest = The core fuzz tester (see target docs for important info)"; \
+ echo " - valgrindfuzz = Runs fuzztest under valgrind"; \
+ echo " - soaktest = Really, really long tests"; \
+ echo " - alltest = Runs most or all TCL tests"; \
+ echo
+
# Remove build products sufficient so that subsequent makes will recompile
# everything from scratch. Do not remove:
diff --git a/manifest b/manifest
index c65d83c701..f52647eaa5 100644
--- a/manifest
+++ b/manifest
@@ -1,10 +1,10 @@
-C Merge\slatest\strunk\sinto\sthis\sbranch.
-D 2024-10-27T14:41:58.117
+C Merge\slatest\strunk\schanges\sinto\sthis\sbranch.
+D 2024-10-28T10:39:14.631
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
F LICENSE.md b6e6c1baf38e4339bd3f1e0e5e5bfd0a9a93d133360691b2785c2d4b2f2dcec2
-F Makefile.in 957cbf0d25ced08f6703b82f2070cbea791aeeb2d6059c4426c30cd87c80250f
-F Makefile.linux-generic 8df0e6ee5e4671f844caf27f88d2be7421e904639f7a0ffdce0e2cd4ea11e8c0 w Makefile.linux-gcc
+F Makefile.in 02ea00ff433902dba369d4a55b3aeb6bb1ffe2d82f777194984b8cdd7ed7c3ad
+F Makefile.linux-generic 8df0e6ee5e4671f844caf27f88d2be7421e904639f7a0ffdce0e2cd4ea11e8c0
F Makefile.msc d2d927177660945599ba88ea32f1ab5c261a96a8797380b99766e27f3aea7e4f
F README.md c3c0f19532ce28f6297a71870f3c7b424729f0e6d9ab889616d3587dd2332159
F VERSION 8dc0c3df15fd5ff0622f88fc483533fce990b1cbb2f5fb9fdfb4dbd71eef2889
@@ -13,7 +13,7 @@ F art/icon-80x90.gif 65509ce3e5f86a9cd64fe7fca2d23954199f31fe44c1e09e208c80fb83d
F art/sqlite370.eps aa97a671332b432a54e1d74ff5e8775be34200c2
F art/sqlite370.ico af56c1d00fee7cd4753e8631ed60703ed0fc6e90
F art/sqlite370.jpg d512473dae7e378a67e28ff96a34da7cb331def2
-F auto.def fbbacb5a62b32a5d6f831694cca4d429ea58f6f6a7e7d04bdd8918f08e372b89
+F auto.def 57635a8f8c2e5e91e4c21094a70bbb56473811366e75679ceec9b6626e49a826
F autoconf/INSTALL 83e4a25da9fd053c7b3665eaaaf7919707915903
F autoconf/Makefile.am adedc1324b6a87fdd1265ddd336d2fb7d4f36a0e77b86ea553ae7cc4ea239347
F autoconf/Makefile.fallback 22fe523eb36dfce31e0f6349f782eb084e86a5620b2b0b4f84a2d6133f53f5ac
@@ -22,7 +22,7 @@ F autoconf/README.first 6c4f34fe115ff55d4e8dbfa3cecf04a0188292f7
F autoconf/README.txt 5e946ffb6fbdbb114c81e1bdc862df27fce8beab557d7b0421820b0fe8fc048f
F autoconf/configure.ac ec7fa914c5e74ff212fe879f9bb6918e1234497e05facfb641f30c4d5893b277
F autoconf/tea/Makefile.in ba0556fee8da09c066bad85a4457904e46ee2c2eabaa309c0e83a78f2f151a8e
-F autoconf/tea/README.txt 61e62e519579e4a112791354d6d440f8b51ea6db3b0bab58d59f29df42d2dfe3 w autoconf/tea/README
+F autoconf/tea/README.txt 61e62e519579e4a112791354d6d440f8b51ea6db3b0bab58d59f29df42d2dfe3
F autoconf/tea/aclocal.m4 52c47aac44ce0ddb1f918b6993e8beb8eee88f43
F autoconf/tea/configure.ac ff2d745f88e493080810b67958d88b4f7a7d79f19e2ee8e7f72ffd6fc04eabc7
F autoconf/tea/doc/sqlite3.n e1fe45d4f5286ee3d0ccc877aca2a0def488e9bb
@@ -47,7 +47,7 @@ F autosetup/cc-lib.tcl 493c5935b5dd3bf9bd4eca89b07c8b1b1a9356d61783035144e21795f
F autosetup/cc-shared.tcl 4f024e94a47f427ba61de1739f6381ef0080210f9fae89112d5c1de1e5460d78
F autosetup/cc.tcl 7e2fe943ae9d45cf39e9f5b05b6230df8e719415edea5af06c30eb68680bde14
F autosetup/default.auto 5cdf016de2140e50f1db190a02039dc42fb390af1dda4cc4853e3042a9ef0e82
-F autosetup/hwaci-common.tcl 247f02d8c92999c0e76e033371c7dd41fee326e70de0251044d00b75562b0a3a
+F autosetup/hwaci-common.tcl 064900a2e7512e6e1ce9f25bb74d6850574d294b026885f0329dbe69585407dd
F autosetup/jimsh0.c 27ea5f221359ef6c58780fc6c185aadbf8d3bee9a021331a3e5de0eba0dc6de6
F autosetup/pkg-config.tcl 4e635bf39022ff65e0d5434339dd41503ea48fc53822c9c5bde88b02d3d952ba
F autosetup/system.tcl 3a39d6e0b3bfba526fd39afe07c1d0d325e5a31925013a1ba7c671e1128e31bb
@@ -120,7 +120,7 @@ F ext/fts5/fts5_hash.c adda4272be401566a6e0ba1acbe70ee5cb97fce944bc2e04dc707152a
F ext/fts5/fts5_index.c ee650a838fc0591776f7582de578f414959a76cc0118851e4c1f7d13e7365379
F ext/fts5/fts5_main.c 50eb059e51d730e8e0c77df4e568b018079e112a755c094488b0d5b1aa06afbb
F ext/fts5/fts5_storage.c 337b05e4c66fc822d031e264d65bde807ec2fab08665ca2cc8aaf9c5fa06792c
-F ext/fts5/fts5_tcl.c 9b390c318e36c0dc53af14e20198f55aa3ed46a39350ed7f46bc034e422fe778
+F ext/fts5/fts5_tcl.c 5b16a249962809b2aaaab964bf58838ea72f30b8b12373cafe612f8cc71e2a40
F ext/fts5/fts5_test_mi.c 08c11ec968148d4cb4119d96d819f8c1f329812c568bac3684f5464be177d3ee
F ext/fts5/fts5_test_tok.c 3cb0a9b508b30d17ef025ccddd26ae3dc8ddffbe76c057616e59a9aa85d36f3b
F ext/fts5/fts5_tokenize.c 033e2e43b8e852c0ef6cecc611266d61e2346e52ec7dcfb76a428fe56a07efa9
@@ -633,7 +633,7 @@ F ext/wasm/SQLTester/SQLTester.run.mjs 57f2adb33f43f2784abbf8026c1bfd049d8013af1
F ext/wasm/SQLTester/index.html 64f3435084c7d6139b08d1f2a713828a73f68de2ae6a3112cbb5980d991ba06f
F ext/wasm/SQLTester/touint8array.c 2d5ece04ec1393a6a60c4bf96385bda5e1a10ad49f3038b96460fc5e5aa7e536
F ext/wasm/api/EXPORTED_FUNCTIONS.sqlite3-core 2bcbbfe3b95c043ed6037e2708a2ee078d212dd1612c364f93588d8dc97300fe
-F ext/wasm/api/EXPORTED_FUNCTIONS.sqlite3-extras fe40d6d758646e38f8b15f709044951e10884214f5453d35502100179c388c13 w ext/wasm/api/EXPORTED_FUNCTIONS.sqlite3-session
+F ext/wasm/api/EXPORTED_FUNCTIONS.sqlite3-extras fe40d6d758646e38f8b15f709044951e10884214f5453d35502100179c388c13
F ext/wasm/api/EXPORTED_FUNCTIONS.sqlite3-see fb29e62082a658f0d81102488414d422c393c4b20cc2f685b216bc566237957b
F ext/wasm/api/EXPORTED_RUNTIME_METHODS.sqlite3-api 1ec3c73e7d66e95529c3c64ac3de2470b0e9e7fbf7a5b41261c367cf4f1b7287
F ext/wasm/api/README.md 34fe11466f9c1d81b10a0469e1114e5f1c5a6365c73d80a1a6ca639a1a358b73
@@ -708,7 +708,7 @@ F ext/wasm/wasmfs.make bc8bb227f35d5bd3863a7bd2233437c37472a0d81585979f058f9b9b5
F install-sh 9d4de14ab9fb0facae2f48780b874848cbf2f895 x
F ltmain.sh 3ff0879076df340d2e23ae905484d8c15d5fdea8
F magic.txt 5ade0bc977aa135e79e3faaea894d5671b26107cc91e70783aa7dc83f22f3ba0
-F main.mk 325f071fc9fea1b7ba498fb11eb64c93a7a2214d6013f2576ae7592c70f8e6ab
+F main.mk 3f3abb991f6e4e2d306491060b06c0b861b6ca886fcce06651483ecba12a3f6c
F mptest/config01.test 3c6adcbc50b991866855f1977ff172eb6d901271
F mptest/config02.test 4415dfe36c48785f751e16e32c20b077c28ae504
F mptest/crash01.test 61e61469e257df0850df4293d7d4d6c2af301421
@@ -718,7 +718,7 @@ F mptest/multiwrite01.test dab5c5f8f9534971efce679152c5146da265222d
F spec.template 86a4a43b99ebb3e75e6b9a735d5fd293a24e90ca
F sqlite.pc.in 42b7bf0d02e08b9e77734a47798d1a55a9e0716b
F sqlite3.1 acdff36db796e2d00225b911d3047d580cd136547298435426ce9d40347973cc
-F sqlite3.pc.in 02db2fa13bcfb301bf8af5ab06984bed583e78a678a557902726eada3bbb7ff1
+F sqlite3.pc.in 0977c03a4da7c4204bd60e784a0efb8d51a190448aba78a4e973fe7192bdaf03
F sqlite_cfg.h.in be1d075cf77134d53fdf5cc2c0919842e7e02a648c66a56e735af25ccdcaff91
F src/alter.c aa93e37e4a36a0525bbb2a2aeda20d2018f0aa995542c7dc658e031375e3f532
F src/analyze.c 9a8b67239d899ac12289db5db3f5bfe7f7a0ad1277f80f87ead1d048085876eb
@@ -789,7 +789,7 @@ F src/random.c 606b00941a1d7dd09c381d3279a058d771f406c5213c9932bbd93d5587be4b9c
F src/resolve.c c8a5372b97b2a2e972a280676f06ddb5b74e885d3b1f5ce383f839907b57ef68
F src/rowset.c 8432130e6c344b3401a8874c3cb49fefe6873fec593294de077afea2dce5ec97
F src/select.c 4b14337a2742f0c0beeba490e9a05507e9b4b12184b9cd12773501d08d48e3fe
-F src/shell.c.in 0662f9bcf0725461778d0254a06150e5d61c08c5a87a7281ccdf45552050c79d
+F src/shell.c.in 2fb0947424944f8baa1b4efdfd9eca70dc0691bbc1cb4d283db7fc142937fa3a
F src/sqlite.h.in 29fc900a58f394c7488d093fd7a8dcb14d3fa6399d5178cb20adcf88dbedfe39
F src/sqlite3.rc 5121c9e10c3964d5755191c80dd1180c122fc3a8
F src/sqlite3ext.h 3f046c04ea3595d6bfda99b781926b17e672fd6d27da2ba6d8d8fc39981dcb54
@@ -1737,7 +1737,7 @@ F test/temptable2.test 76821347810ecc88203e6ef0dd6897b6036ac788e9dd3e6b04fd4d163
F test/temptable3.test d11a0974e52b347e45ee54ef1923c91ed91e4637
F test/temptrigger.test 38f0ca479b1822d3117069e014daabcaacefffcc
F test/tester.tcl 7b44f1a9b9a2de8112695b908afc21dd9a68cd2d44e84b73f1b27b53492c0d59
-F test/testrunner.tcl bc1a8d21a1aa3a5cf7c4883cbee4b6748790fe960fad06ca5db74ec914bd6525 x
+F test/testrunner.tcl 4e764b0da245add9670d1010a69a3ac5474a5dfe15e1d3183294c23cca43ef13 x
F test/testrunner_data.tcl ba4aeea28aa03cfa6fe7e57782ddecb7a7b91c3a0b3251583cb4f0ee002de6a6
F test/thread001.test a0985c117eab62c0c65526e9fa5d1360dd1cac5b03bde223902763274ce21899
F test/thread002.test c24c83408e35ba5a952a3638b7ac03ccdf1ce4409289c54a050ac4c5f1de7502
@@ -2199,7 +2199,7 @@ F tool/spellsift.tcl 52b4b04dc4333c7ab024f09d9d66ed6b6f7c6eb00b38497a09f338fa55d
F tool/split-sqlite3c.tcl 5aa60643afca558bc732b1444ae81a522326f91e1dc5665b369c54f09e20de60
F tool/sqldiff.c 2a0987d183027c795ced13d6749061c1d2f38e24eddb428f56fa64c3a8f51e4b
F tool/sqlite3_analyzer.c.in 348ba349bbdc93c9866439f9f935d7284866a2a4e6898bc906ae1204ade56918
-F tool/sqlite3_rsync.c 6c9cac5a9197f591985b271aeff803ec4fb4db36c8eab97e1331ff64aa1b8d94 w tool/sqlite3-rsync.c
+F tool/sqlite3_rsync.c 6c9cac5a9197f591985b271aeff803ec4fb4db36c8eab97e1331ff64aa1b8d94
F tool/sqltclsh.c.in 1bcc2e9da58fadf17b0bf6a50e68c1159e602ce057210b655d50bad5aaaef898
F tool/sqltclsh.tcl 862f4cf1418df5e1315b5db3b5ebe88969e2a784525af5fbf9596592f14ed848
F tool/src-verify.c d00f93263aa2fa6ba0cba0106d95458e6effb94fdb5fc634f56834f90c05bbb4
@@ -2238,8 +2238,8 @@ F vsixtest/vsixtest.tcl 6195aba1f12a5e10efc2b8c0009532167be5e301abe5b31385638080
F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
-P 0ca002a4ab88f3e7ae1e6e518038157eaa20759f57888c2ed7e50cb92bd96348 82ab8ff399aafa3a1faec9c85e9d6bdd26636f28f3ea22287999a868bb78db57
-R cabc7b53155eda94fb26c7d836d62d67
+P 740a37c5d54b57befa86a6bb299ffa89ed4243d10db885a08ab5c63238460dad d64dcb1a897f6cc690c680cdaf85272e2dd249f36798219834116b1375f74d34
+R 8b8a720d047d766fbd0819b9a2f0b104
U dan
-Z e43f833e82b70fb9fbe2296f7ff5c4fc
+Z c21264d65e469a1605c6df634f0238d3
# Remove this line to create a well-formed Fossil manifest.
diff --git a/manifest.uuid b/manifest.uuid
index abdc2e2fe2..6d7a4ef0d5 100644
--- a/manifest.uuid
+++ b/manifest.uuid
@@ -1 +1 @@
-740a37c5d54b57befa86a6bb299ffa89ed4243d10db885a08ab5c63238460dad
+bce9a524de6dda87daa90395cd55713d2d3ccfc090e53a947548e434db5eef5e
diff --git a/sqlite3.pc.in b/sqlite3.pc.in
index 73d65dea23..a9f941b1e4 100644
--- a/sqlite3.pc.in
+++ b/sqlite3.pc.in
@@ -9,5 +9,5 @@ Name: SQLite
Description: SQL database engine
Version: @PACKAGE_VERSION@
Libs: -L${libdir} -lsqlite3
-Libs.private: @LDFLAGS_MATH@ @LDFLAGS_ZLIB@
+Libs.private: @LDFLAGS_MATH@ @LDFLAGS_ZLIB@ @LDFLAGS_ICU@
Cflags: -I${includedir}
diff --git a/src/shell.c.in b/src/shell.c.in
index bbf08f8098..df0c3500de 100644
--- a/src/shell.c.in
+++ b/src/shell.c.in
@@ -5759,7 +5759,8 @@ void close_db(sqlite3 *db){
}
}
-#if HAVE_READLINE || HAVE_EDITLINE
+#if (HAVE_READLINE || HAVE_EDITLINE) \
+ && !defined(SQLITE_OMIT_READLINE_COMPLETION)
/*
** Readline completion callbacks
*/
@@ -13259,7 +13260,7 @@ int SQLITE_CDECL wmain(int argc, wchar_t **wargv){
}
}
if( zHistory ){ shell_read_history(zHistory); }
-#if HAVE_READLINE || HAVE_EDITLINE
+#if (HAVE_READLINE || HAVE_EDITLINE) && !defined(SQLITE_OMIT_READLINE_COMPLETION)
rl_attempted_completion_function = readline_completion;
#elif HAVE_LINENOISE
linenoiseSetCompletionCallback(linenoise_completion, NULL);
diff --git a/test/testrunner.tcl b/test/testrunner.tcl
index 964465d9b2..09c9f8ac24 100755
--- a/test/testrunner.tcl
+++ b/test/testrunner.tcl
@@ -663,7 +663,9 @@ if {[llength $argv]>=1
set SQL {SELECT displaytype, displayname, state FROM jobs}
if {$pattern!=""} {
regsub -all {[^a-zA-Z0-9*.-/]} $pattern ? pattern
- append SQL " WHERE displayname GLOB '*$pattern*'"
+ set pattern [string tolower $pattern]
+ append SQL \
+ " WHERE lower(concat(state,' ',displaytype,' ',displayname)) GLOB '*$pattern*'"
}
append SQL " ORDER BY starttime"