0
0
mirror of https://github.com/sqlite/sqlite.git synced 2024-11-21 19:29:09 +01:00

Add --enable-tempstore support and document some of the weirdness of trying to use an explicit prefix of --enable with non-boolean flags (autosetup unconditionally handles --enable and --disable prefixes on its own and always treats them as boolean flags).

FossilOrigin-Name: fe6fa4ce5271c6265985574e1c406dda5b57f0dc360626800b6173a8f054bdab
This commit is contained in:
stephan 2024-09-25 07:30:54 +00:00
parent 4e0208fd8e
commit cf9d95002e
3 changed files with 55 additions and 43 deletions

View File

@ -26,6 +26,32 @@ set DUMP_DEFINES_FILE defines.list
#
# In trying to helpfully map between --foo/--enable-foo/--disable-foo,
# it ends up creating some degree of confusion.
#
# Reminders about flag handling quirks..
#
# 1) autosetup treats prefixes of 'enable' and 'disable' specially,
# leading to some incompatibilities with the historical sqlite3
# configure script.
#
# Defining non-boolean flags named enable-foo requires different
# downstream handling of those flags. e.g.
#
# enable-tempstore:=no => {...}
#
# requires that [opt-val enable-tempstore], rather than [opt-val
# tempstore], be used, which is in constrast to boolean flags, where
# [opt-bool flag] must be used instead of [opt-bool enable-flag].
#
# Also, passing --enable-tempstore with no value (to presumably get the
# default value) breaks: autosetup tries to find a boolean-type tempstore
# flag and cannot, so it complains that flag --tempstore is not defined.
# i.e. --enable-tempstore requires that it be passed a value.
#
# An awkward workaround for that, discovered only by random trial and
# error, is to define both {tempstore=1} and {enable-tempstore:}. With
# that in place --enable-tempstore, with no value, works as expected
# (why? Nobody knows!) but --tempstore can only ever be legally passed 0 or
# 1.
options {
with-tclsh:PATHNAME => {Full pathname of tclsh to use}
with-tcl:DIR => {Directory containing tclConfig.sh}
@ -33,7 +59,8 @@ options {
test-status => {Enable status of tests}
threadsafe=1 => {Disable mutexing}
releasemode => {libtool link to release mode}
tempstore=0 => {an in-ram database for temporary tables never,no,yes,always}
tempstore=1 => {}
enable-tempstore: => {Use an in-ram database for temporary tables: never,no,yes,always}
editline=0 => {BSD editline support}
readline=0 => {readline support}
with-readline-lib => {readline library}
@ -226,13 +253,13 @@ if {1} {
#
# Merely changing CC and LD to the wasi-sdk's is enough to get
# sqlite3.o building in WASM format.
# XXX CC="${with_wasi_sdk}/bin/clang"
# XXX LD="${with_wasi_sdk}/bin/wasm-ld"
# XXX RANLIB="${with_wasi_sdk}/bin/llvm-ranlib"
# XXX CC="${wasiSdkDir}/bin/clang"
# XXX LD="${wasiSdkDir}/bin/wasm-ld"
# XXX RANLIB="${wasiSdkDir}/bin/llvm-ranlib"
# set cross_compiling yes
# set enable_threadsafe no
# opt-set threadsafe 0
# set use_tcl no
# set enable_tcl no
# opt-set tcl 0
# libtool is apparently hard-coded to use gcc for linking DLLs, so
# we disable the DLL build...
# set enable_shared no
@ -457,37 +484,22 @@ if {0} {
##########
# Do we want temporary databases in memory
#
if {0} {
if {[opt-bool tempstore]} {
} else {
set enable_tempstore no
if {1} {
set ts [opt-val enable-tempstore no]
set tsn 1
msg-checking "Use an in-ram database for temporary tables? "
switch -- $ts {
never { set tsn 0 }
no { set tsn 1 }
yes { set tsn 2 }
always { set tsn 3 }
default {
user-error "Invalid enable-tempstore value \[$ts]. Use one of: no, yes, always, never"
}
}
msg-checking "Checking whether to use an in-ram database for temporary tables..."
# XXX case "$enable_tempstore" in
# XXX never )
# XXX TEMP_STORE=0
msg-result "never"
# XXX ;;
# XXX no )
# XXX TEMP_STORE=1
msg-result "no"
# XXX ;;
# XXX yes )
# XXX TEMP_STORE=2
msg-result "yes"
# XXX ;;
# XXX always )
# XXX TEMP_STORE=3
msg-result "always"
# XXX ;;
# XXX * )
# XXX TEMP_STORE=1
msg-result "no"
# XXX ;;
# XXX esac
# XXX AC_SUBST TEMP_STORE
msg-result $ts
define TEMP_STORE $tsn
unset ts tsn
}
if {0} {

View File

@ -1,5 +1,5 @@
C Re-enable\sthe\s--enable-all\sbits\safter\sfiguring\sout\sthat\sautosetup(options)\sis\snot\sa\sdict,\sbut\sa\slist.
D 2024-09-25T06:25:33.251
C Add\s--enable-tempstore\ssupport\sand\sdocument\ssome\sof\sthe\sweirdness\sof\strying\sto\suse\san\sexplicit\sprefix\sof\s--enable\swith\snon-boolean\sflags\s(autosetup\sunconditionally\shandles\s--enable\sand\s--disable\sprefixes\son\sits\sown\sand\salways\streats\sthem\sas\sboolean\sflags).
D 2024-09-25T07:30:54.847
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724
@ -14,7 +14,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 612211379b4bad517472ffdc7844787ae717555779ba5d4daf91ded4e3580b33
F auto.def bf6823fc39c18f250e1a557fd1693d50907bb7c7bf64bb19c29976fcad8e9ac4
F autoconf/INSTALL 83e4a25da9fd053c7b3665eaaaf7919707915903
F autoconf/Makefile.am adedc1324b6a87fdd1265ddd336d2fb7d4f36a0e77b86ea553ae7cc4ea239347
F autoconf/Makefile.fallback 22fe523eb36dfce31e0f6349f782eb084e86a5620b2b0b4f84a2d6133f53f5ac
@ -2232,8 +2232,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 d2b883120e7ab374092d2bdef0faa22eaa9639cb103f9fbbbbfd16639fbfd323
R 6c833ff96fca19f682fd2f436027b582
P beb2a12045447586cc74f243d4f519c967595d929abe6330c2b1049897e8eaad
R cb05e4344f4a5cf418370e9015944c67
U stephan
Z 12d89494d4ba08947638b55ca875c9aa
Z 2790adfba3be68b5a200dbb2ea24a505
# Remove this line to create a well-formed Fossil manifest.

View File

@ -1 +1 @@
beb2a12045447586cc74f243d4f519c967595d929abe6330c2b1049897e8eaad
fe6fa4ce5271c6265985574e1c406dda5b57f0dc360626800b6173a8f054bdab