mirror of
https://github.com/sqlite/sqlite.git
synced 2024-11-21 19:29:09 +01:00
configure: document why --enable-editline does not work and emit a warning with a potential alternative/workaround if it's used. Various cosmetic cleanups.
FossilOrigin-Name: ccb8f16f8a5c500b683800672aa4bc87d2f109e87ebdabf6c54d5b6dc69718f7
This commit is contained in:
parent
ac1f151796
commit
c9f16f6562
59
auto.def
59
auto.def
@ -462,7 +462,7 @@ hwaci-if-opt-truthy with-debug {
|
||||
########################################################################
|
||||
# TCL...
|
||||
#
|
||||
# hwaci-check-tcl performs most of the --with-tcl and --with-tclsh
|
||||
# sqlite-check-tcl performs most of the --with-tcl and --with-tclsh
|
||||
# handling. Some related bits and pieces are performed before and
|
||||
# after that function is called.
|
||||
#
|
||||
@ -489,7 +489,7 @@ hwaci-if-opt-truthy with-debug {
|
||||
# components.
|
||||
#
|
||||
define TCLSH_CMD {exit 1}
|
||||
proc hwaci-check-tcl {} {
|
||||
proc sqlite-check-tcl {} {
|
||||
# TODO: document the steps this is taking.
|
||||
global top_srcdir
|
||||
puts "Checking for a suitable tcl... "
|
||||
@ -497,13 +497,13 @@ proc hwaci-check-tcl {} {
|
||||
set use_tcl $optTcl
|
||||
set with_tclsh [opt-val with-tclsh]
|
||||
set with_tcl [opt-val with-tcl]
|
||||
#puts "hwaci-check-tcl: use_tcl ${use_tcl}"
|
||||
#puts "hwaci-check-tcl: with_tclsh=${with_tclsh}"
|
||||
#puts "hwaci-check-tcl: with_tcl=$with_tcl"
|
||||
#puts "sqlite-check-tcl: use_tcl ${use_tcl}"
|
||||
#puts "sqlite-check-tcl: with_tclsh=${with_tclsh}"
|
||||
#puts "sqlite-check-tcl: with_tcl=$with_tcl"
|
||||
if {"" eq $with_tclsh && "" eq $with_tcl} {
|
||||
set with_tclsh [hwaci-first-bin-of tclsh9.0 tclsh8.6 tclsh]
|
||||
}
|
||||
#puts "hwaci-check-tcl: with_tclsh=${with_tclsh}"
|
||||
#puts "sqlite-check-tcl: with_tclsh=${with_tclsh}"
|
||||
|
||||
if {"" ne $with_tclsh} {
|
||||
if {![file isfile $with_tclsh]} {
|
||||
@ -561,11 +561,11 @@ proc hwaci-check-tcl {} {
|
||||
}
|
||||
}
|
||||
if {![file readable $cfg]} {
|
||||
hwaci-warn {
|
||||
Cannot find a usable tclConfig.sh file.
|
||||
Use --with-tcl=DIR to specify a directory where tclConfig.sh can be found.
|
||||
SQLite does not use TCL internally, but TCL is required to build SQLite
|
||||
from canonical sources and TCL is required for testing.
|
||||
hwaci-indented-notice {
|
||||
WARNING: Cannot find a usable tclConfig.sh file. Use
|
||||
--with-tcl=DIR to specify a directory where tclConfig.sh
|
||||
can be found. SQLite does not use TCL internally, but TCL
|
||||
is required for testing.
|
||||
}
|
||||
break
|
||||
}
|
||||
@ -587,10 +587,6 @@ proc hwaci-check-tcl {} {
|
||||
# config is not available, this emits empty-string entries for the
|
||||
# various options we're interested in.
|
||||
eval [exec "${top_srcdir}/tool/tclConfigShToTcl.sh" "[get-define TCL_CONFIG_SH]"]
|
||||
#puts "hwaci-check-tcl: with_tclsh=$with_tclsh"
|
||||
#puts "hwaci-check-tcl: with_tcl=$with_tcl"
|
||||
#puts "hwaci-check-tcl: cfg=$cfg"
|
||||
#puts "hwaci-check-tcl: use_tcl ${use_tcl}"
|
||||
|
||||
if {"" eq $with_tclsh} {
|
||||
set with_tclsh [get-define TCL_EXEC_PREFIX]/bin/tclsh[get-define TCL_VERSION]
|
||||
@ -646,9 +642,9 @@ proc hwaci-check-tcl {} {
|
||||
} else {
|
||||
hwaci-warn "Cannot find a usable tclsh, so cannot run tests."
|
||||
}
|
||||
}; # hwaci-check-tcl
|
||||
}; # sqlite-check-tcl
|
||||
|
||||
hwaci-check-tcl
|
||||
sqlite-check-tcl
|
||||
|
||||
########################################################################
|
||||
# Check which TCL to use as a code generator. Prefer jimsh simply
|
||||
@ -754,6 +750,8 @@ if {1} {
|
||||
# - HAVE_LINENOISE to 0 or 1
|
||||
# - HAVE_EDITLINE to 0 or 1
|
||||
#
|
||||
# Only one of ^^^ those will be set to 1.
|
||||
#
|
||||
# - LDFLAGS_READLINE = linker flags or empty string
|
||||
#
|
||||
# - CFLAGS_READLINE = compilation flags for clients or empty string
|
||||
@ -786,8 +784,31 @@ proc sqlite-check-line-editing {} {
|
||||
add-shell-opt -DHAVE_LINENOISE=1
|
||||
return "linenoise"
|
||||
} elseif {[opt-bool editline]} {
|
||||
# TODO: reimplement --enable-editline
|
||||
user-notice "WARNING: the --enable-editline flag is not yet supported"
|
||||
# --enable-editline. The problem is finding a system which has it
|
||||
# available to test on. The man pages for it on OpenBSD do not
|
||||
# match how shell.c uses it. OpenBSD has a lib named libedit but
|
||||
# no headers to go with it. The legacy configure script looked for
|
||||
# readline() in libedit (and libedit.a indeed has the
|
||||
# readline/history functions used by shell.c) but shell.c expects
|
||||
# to find <editline/readline.h> when HAVE_EDITLINE=1, and that
|
||||
# file is nowhere to be found.
|
||||
#
|
||||
# However, a workaround which works on the available systems is:
|
||||
#
|
||||
# --with-readline-lib=-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
|
||||
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.
|
||||
}
|
||||
return "none"
|
||||
} elseif {![opt-bool readline]} {
|
||||
user-notice "Readline support explicitly disabled with --disable-readline"
|
||||
|
@ -49,13 +49,24 @@ array set hwaci_ {}
|
||||
proc hwaci-warn {msg} {
|
||||
puts stderr "WARNING: $msg"
|
||||
}
|
||||
proc hwaci-notice {msg} {
|
||||
puts stderr "NOTICE: $msg"
|
||||
}
|
||||
#proc hwaci-notice {msg} {
|
||||
# puts stderr "NOTICE: $msg"
|
||||
#}
|
||||
proc hwaci-fatal {msg} {
|
||||
user-error "ERROR: $msg"
|
||||
}
|
||||
|
||||
########################################################################
|
||||
# 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]
|
||||
foreach line $lines {
|
||||
user-notice " [string trim $line]"
|
||||
}
|
||||
}
|
||||
|
||||
########################################################################
|
||||
# Returns 1 if cross-compiling, else 0.
|
||||
proc hwaci-is-cross-compiling {} {
|
||||
|
14
manifest
14
manifest
@ -1,5 +1,5 @@
|
||||
C Bring\sthe\sautomated\sreadline\sdetection\sup\sto\sparity\swith\sthe\slegacy\sconfigure\sscript.
|
||||
D 2024-10-27T04:27:47.182
|
||||
C configure:\sdocument\swhy\s--enable-editline\sdoes\snot\swork\sand\semit\sa\swarning\swith\sa\spotential\salternative/workaround\sif\sit's\sused.\sVarious\scosmetic\scleanups.
|
||||
D 2024-10-27T05:28:52.488
|
||||
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
|
||||
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
|
||||
F LICENSE.md b6e6c1baf38e4339bd3f1e0e5e5bfd0a9a93d133360691b2785c2d4b2f2dcec2
|
||||
@ -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 aba9d4d29eb7fd5a5bda791d338bf5a32e205d1164af8c9d579bb1b4083ad25d
|
||||
F auto.def dbd0ab35f0c01b421e53e851cbc6117913d60a4eeea2b75af24a1647838242ee
|
||||
F autoconf/INSTALL 83e4a25da9fd053c7b3665eaaaf7919707915903
|
||||
F autoconf/Makefile.am adedc1324b6a87fdd1265ddd336d2fb7d4f36a0e77b86ea553ae7cc4ea239347
|
||||
F autoconf/Makefile.fallback 22fe523eb36dfce31e0f6349f782eb084e86a5620b2b0b4f84a2d6133f53f5ac
|
||||
@ -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 a4276230b1c510b2a283fcaa59424a3ba77eafc441e7761286f55e3b2d155064
|
||||
F autosetup/hwaci-common.tcl 247f02d8c92999c0e76e033371c7dd41fee326e70de0251044d00b75562b0a3a
|
||||
F autosetup/jimsh0.c 27ea5f221359ef6c58780fc6c185aadbf8d3bee9a021331a3e5de0eba0dc6de6
|
||||
F autosetup/pkg-config.tcl 4e635bf39022ff65e0d5434339dd41503ea48fc53822c9c5bde88b02d3d952ba
|
||||
F autosetup/system.tcl 3a39d6e0b3bfba526fd39afe07c1d0d325e5a31925013a1ba7c671e1128e31bb
|
||||
@ -2237,8 +2237,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 8f6897b92c6a059f1c658ccce5bdc9ff3d29b41eec8298c6d46c7aeabace1d89
|
||||
R f0582379bec537e3414c67bad5681477
|
||||
P 2ddeb7a8f55735cc7f2cf95cbbb0b20c563ced87db1429816fcfb0ee89e751f0
|
||||
R 4970824a6410e0a6a11b4742e70c246f
|
||||
U stephan
|
||||
Z cffd0ba4388e6bcce9ac7e976789ab0c
|
||||
Z bb06d38a89ea42c462deaf8c72e8eb99
|
||||
# Remove this line to create a well-formed Fossil manifest.
|
||||
|
@ -1 +1 @@
|
||||
2ddeb7a8f55735cc7f2cf95cbbb0b20c563ced87db1429816fcfb0ee89e751f0
|
||||
ccb8f16f8a5c500b683800672aa4bc87d2f109e87ebdabf6c54d5b6dc69718f7
|
||||
|
Loading…
Reference in New Issue
Block a user