# /chat discussion prompted by
# https://sqlite.org/forum/forumpost/9a67df63eda9925c
set defaultCFlags {-O2}
-if {!$sqliteIsCrossCompiling} {
+if {!$::sqliteConfig(is-cross-compiling)} {
lappend defaultCFlags -g
}
define CFLAGS [proj-get-env CFLAGS $defaultCFlags]
define HAVE_WASI_SDK 0
if {$wasiSdkDir eq ""} {
return 0
- } elseif {$::sqliteIsCrossCompiling} {
+ } elseif {$::sqliteConfig(is-cross-compiling)} {
proj-fatal "Cannot combine --with-wasi-sdk with cross-compilation"
}
msg-result "Checking WASI SDK directory \[$wasiSdkDir]... "
define WASI_SDK_DIR $wasiSdkDir
# Disable numerous options which we know either can't work or are
# not useful in this build...
- msg-result "Using wasi-sdk clang. Disabling CLI shell modifying config flags:"
+ msg-result "Using wasi-sdk clang. Disabling CLI shell and modifying config flags:"
# Boolean (--enable-/--disable-) flags which must be switched off:
foreach opt {
dynlink-tools
}
}
# Remember that we now have a discrepancy beteween
- # $::sqliteIsCrossCompiling and [proj-is-cross-compiling].
- set ::sqliteIsCrossCompiling 1
+ # $::sqliteConfig(is-cross-compiling) and [proj-is-cross-compiling].
+ set ::sqliteConfig(is-cross-compiling) 1
#
# Changing --host and --target have no effect here except to
# - CFLAGS_JIMSH = any flags needed for buildng a BTCLSH-compatible
# jimsh. The defaults may be passed on to configure as
# CFLAGS_JIMSH=...
-set sqliteUseJimForCodeGen 0 ; # Set to 1 when using jimsh for code
- # generation. May affect later decisions.
proc sqlite-determine-codegen-tcl {} {
rename sqlite-determine-codegen-tcl ""
msg-result "Checking for TCL to use for code generation... "
if {$sysh && [cc-check-functions realpath]} {
define-append CFLAGS_JIMSH -DHAVE_REALPATH
define BTCLSH "\$(JIMSH)"
- set ::sqliteUseJimForCodeGen 1
+ set ::sqliteConfig(use-jim-for-codegen) 1
} elseif {$sysh && [cc-check-functions _fullpath]} {
# _fullpath() is a Windows API. It's not entirely clear
# whether we need to add {-DHAVE_SYS_TIME_H -DHAVE_DIRENT_H}
# builds it does not.
define-append CFLAGS_JIMSH -DHAVE__FULLPATH
define BTCLSH "\$(JIMSH)"
- set ::sqliteUseJimForCodeGen 1
+ set ::sqliteConfig(use-jim-for-codegen) 1
} elseif {[file-isexec [get-define TCLSH_CMD]]} {
set cgtcl [get-define TCLSH_CMD]
define BTCLSH "\$(TCLSH_CMD)"
}}
}
+# Must come after sqlite-determine-codegen-tcl
msg-result "Line-editing support for the sqlite3 shell: [sqlite-check-line-editing]"
proj-if-opt-truthy load-extension {
########################################################################
# When cross-compiling, we have to avoid using the -s flag to
# /usr/bin/install: https://sqlite.org/forum/forumpost/9a67df63eda9925c
-define IS_CROSS_COMPILING $sqliteIsCrossCompiling
+define IS_CROSS_COMPILING $sqliteConfig(is-cross-compiling)
########################################################################
# "Re-export" the autoconf-conventional --XYZdir flags into something
}
}
}}
+
use cc cc-db cc-shared cc-lib pkg-config proj
-# Are we cross-compiling? This value may be changed by certain build
-# options, so it's important that config code which checks for
+#
+# Object for communicating config-time state across various
+# auto.def-related pieces.
+#
+array set sqliteConfig {}
+
+#
+# Set to 1 when cross-compiling This value may be changed by certain
+# build options, so it's important that config code which checks for
# cross-compilation uses this var instead of
# [proj-is-cross-compiling].
-set ::sqliteIsCrossCompiling [proj-is-cross-compiling]
+#
+set sqliteConfig(is-cross-compiling) [proj-is-cross-compiling]
+
+#
+# Gets set to 1 when using jimsh for code generation. May affect later
+# decisions.
+#
+set sqliteConfig(use-jim-for-codegen) 0
########################################################################
define OPT_SHELL [lsort -unique $oFF]
msg-result "Shell options: [get-define OPT_SHELL]"
}
+ #parray ::sqliteConfig
}
########################################################################
define CFLAGS_READLINE "-I$dirLn $lnC"
define HAVE_LINENOISE $lnVal
sqlite-add-shell-opt -DHAVE_LINENOISE=$lnVal
- if {[info exists sqliteUseJimForCodeGen]
- && $::sqliteUseJimForCodeGen && 2 == $lnVal} {
+ if {$::sqliteConfig(use-jim-for-codegen) && 2 == $lnVal} {
define-append CFLAGS_JIMSH -DUSE_LINENOISE [get-define CFLAGS_READLINE]
user-notice "Adding linenoise support to jimsh."
}
set rlInc [opt-val with-readline-cflags auto]
if {"auto" eq $rlInc} {
set rlInc ""
- if {$::sqliteIsCrossCompiling} {
+ if {$::sqliteConfig(is-cross-compiling)} {
# ^^^ this check is derived from the legacy configure script.
proj-warn "Skipping check for readline.h because we're cross-compiling."
} else {
-C Move\ssome\sof\sthe\sauto.def\sfunctions\sinto\sautosetup/sqlite-config.tcl\sfor\sre-use\sin\sthe\spending\smigration\sof\sthe\sautoconf\sbundle\sto\sautosetup.\sThis\sis\sjust\sreorg,\sno\sfunctional\schanges.
-D 2025-01-19T14:53:45.375
+C Minor\sinternal\srefactoring\sof\sauto.def\sto\ssupport\sthe\spending\sautoconf\ssubdir\sport\sto\sautosetup.\sNo\sfunctional\schanges.
+D 2025-01-19T16:26:25.254
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
F LICENSE.md e108e1e69ae8e8a59e93c455654b8ac9356a11720d3345df2a4743e9590fb20d
F art/sqlite370.ico af56c1d00fee7cd4753e8631ed60703ed0fc6e90
F art/sqlite370.jpg d512473dae7e378a67e28ff96a34da7cb331def2
F art/sqlite370.svg 40b7e2fe8aac3add5d56dd86ab8d427a4eca5bcb3fe4f8946cb3794e1821d531
-F auto.def 8d8467f21bd073a7d62ad9803d958d5e5f625459cd64b97776636ca740d4f743
+F auto.def 8b7e3bdf0a9f3caccddb13175f6a2c3fdb1740220bbfe0bb8dae460a4f84d85a
F autoconf/INSTALL 83e4a25da9fd053c7b3665eaaaf7919707915903
F autoconf/Makefile.am adedc1324b6a87fdd1265ddd336d2fb7d4f36a0e77b86ea553ae7cc4ea239347
F autoconf/Makefile.fallback 22fe523eb36dfce31e0f6349f782eb084e86a5620b2b0b4f84a2d6133f53f5ac
F autosetup/jimsh0.c d40e381ea4526a067590e7b91bd4b2efa6d4980d286f908054c647b3df4aee14
F autosetup/pkg-config.tcl 4e635bf39022ff65e0d5434339dd41503ea48fc53822c9c5bde88b02d3d952ba
F autosetup/proj.tcl 2e817159b997077cb79bd871f6255276b787558f386dfc0830b0f825f6a53767
-F autosetup/sqlite-config.tcl 0a14f4deb35c150d565f13defd0d02aa2a9fb34b7ceec4de5c817f6205d90873
+F autosetup/sqlite-config.tcl e52fa291ef148712a9392203b05e86743b474065ea88bdc65cdb664dbb188783
F autosetup/system.tcl 51d4be76cd9a9074704b584e5c9cbba616202c8468cf9ba8a4f8294a7ab1dba9
F configure 9a00b21dfd13757bbfb8d89b30660a89ec1f8f3a79402b8f9f9b6fc475c3303a x
F contrib/sqlitecon.tcl 210a913ad63f9f991070821e599d600bd913e0ad
F tool/warnings-clang.sh bbf6a1e685e534c92ec2bfba5b1745f34fb6f0bc2a362850723a9ee87c1b31a7
F tool/warnings.sh 49a486c5069de041aedcbde4de178293e0463ae9918ecad7539eedf0ec77a139
F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
-P 8534af5b94be9f5b1f02453e1c3b6b3f78a698af91595bdbbfdea00676510116
-R 6870ce5e67a7ecb1dfa87ef84e5cc5df
+P 2f1e94994f3595baad4045ab05ffee0668059c23ab37a39c25b83c62bfbaea28
+R 9c60fa033887f9029838d451908d0067
U stephan
-Z 3acb6f6b529d76da2efc2bf22b964dc8
+Z ec3ab526fc22a680c0602f434f403d4d
# Remove this line to create a well-formed Fossil manifest.
-2f1e94994f3595baad4045ab05ffee0668059c23ab37a39c25b83c62bfbaea28
+01ff37584708f3f79c62c1b5ed8cceab721cf8348a69a65f0559b1ef8845e85b