set sqliteConfig(is-cross-compiling) [proj-is-cross-compiling]
########################################################################
-# Processes all configure --flags for this build $buildMode must be
-# either "canonical" or "autoconf", and others may be added in the
+# Processes all configure --flags for this build, run build-specific
+# config checks, then finalize the configure process. $buildMode must
+# be either "canonical" or "autoconf", and others may be added in the
# future. After bootstrapping, $configScript is eval'd in the caller's
# scope, then post-configuration finalization is run. $configScript is
# intended to hold configure code which is specific to the given
# $buildMode, with the caveat that _some_ build-specific code is
# encapsulated in the configuration finalization step.
+#
+# The intent is that all build-mode-specific configuration goes inside
+# the $configScript argument to this function, and that an auto.def file
+# contains only two commands:
+#
+# use sqlite-config
+# sqlite-configure BUILD_NAME { build-specific configure script }
proc sqlite-configure {buildMode configScript} {
set allBuildModes {canonical autoconf}
if {$buildMode ni $allBuildModes} {
########################################################################
set allFlags {
# Structure: a list of M {Z} pairs, where M is a descriptive
- # option group name and Z is a list of X Y pairs. X is a list of
+ # option group name and Z is a list of X Y pairs. X is a list of
# $buildMode name(s) to which the Y flags apply, or {*} to apply
# to all builds. Y is a {block} in the form expected by
# autosetup's [options] command. Each block which is applicable
largefile=1
=> {This legacy flag has no effect on the library but may influence
the contents of the generated sqlite_cfg.h}
- # ^^^ It's not clear that this actually does anything, as
- # HAVE_LFS is not checked anywhere in the .c/.h/.in files.
+ # ^^^ It's not clear that LFS support actually does anything,
+ # as HAVE_LFS is not checked anywhere in the .c/.h/.in files.
load-extension=1 => {Disable loading of external extensions}
math=1 => {Disable math functions}
json=1 => {Disable JSON functions}
}; # sqlite-configure
########################################################################
-# Performs late-stage config steps common to both the canonical and
-# autoconf bundle builds.
+# Performs late-stage config steps common to all supported
+# $::sqliteConfig(build-mode) values.
proc sqlite-configure-finalize {} {
set buildMode $::sqliteConfig(build-mode)
set isCanonical [expr {$buildMode eq "canonical"}]
set isAutoconf [expr {$buildMode eq "autoconf"}]
+ proj-assert {$isCanonical || $isAutoconf} "Unknown build mode: $buildMode"
define HAVE_LFS 0
if {[opt-bool largefile]} {
sqlite-handle-math
sqlite-handle-icu
sqlite-handle-env-quirks
+ sqlite-handle-common-feature-flags
+ sqlite-finalize-feature-flags
+ ########################################################################
+ # 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 $::sqliteConfig(is-cross-compiling)
sqlite-process-dot-in-files
sqlite-post-config-validation
sqlite-dump-defines
define PACKAGE_URL {https://sqlite.org}
define PACKAGE_BUGREPORT [get-define PACKAGE_URL]/forum
define PACKAGE_STRING "[get-define PACKAGE_NAME] [get-define PACKAGE_VERSION]"
- #
- # Carry values from hidden --flag aliases over to their canonical
- # flag forms. This list must include only options which are common
- # to both the top-level auto.def and autoconf/auto.def.
- #
proj-xfer-options-aliases {
+ # Carry values from hidden --flag aliases over to their canonical
+ # flag forms. This list must include only options which are common
+ # to all build modes supported by [sqlite-configure].
with-readline-inc => with-readline-cflags
with-readline-lib => with-readline-ldflags
with-debug => debug
########################################################################
# Sets up the SQLITE_AUTORECONFIG define.
proc sqlite-autoreconfig {} {
- #
# 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
- #
+ # with. This can be used to automatically reconfigure.
set squote {{arg} {
# Wrap $arg in single-quotes if it looks like it might need that
# to avoid mis-handling as a shell argument. We assume that $arg
define-append OPT_FEATURE_FLAGS {*}$args
}
}
+
+########################################################################
# Appends $args, if not empty, to OPT_SHELL.
proc sqlite-add-shell-opt {args} {
if {"" ne $args} {
# Run checks for system-level includes and libs which are common to
# both the canonical build and the "autoconf" bundle.
proc sqlite-check-common-system-deps {} {
- #
# Check for needed/wanted data types
cc-with {-includes stdint.h} \
{cc-check-types int8_t int16_t int32_t int64_t intptr_t \
uint8_t uint16_t uint32_t uint64_t uintptr_t}
- #
# Check for needed/wanted functions
cc-check-functions gmtime_r isnan localtime_r localtime_s \
malloc_usable_size strchrnul usleep utime pread pread64 pwrite pwrite64
}
define LDFLAGS_RT [join [lsort -unique $ldrt] ""]
- #
# Check for needed/wanted headers
cc-check-includes \
sys/types.h sys/stat.h dlfcn.h unistd.h \
########################################################################
# Move -DSQLITE_OMIT... and -DSQLITE_ENABLE... flags from CFLAGS and
# CPPFLAGS to OPT_FEATURE_FLAGS and remove them from BUILD_CFLAGS.
-# This is derived from the legacy build but is still practical.
proc sqlite-munge-cflags {} {
# Move CFLAGS and CPPFLAGS entries matching -DSQLITE_OMIT* and
# -DSQLITE_ENABLE* to OPT_FEATURE_FLAGS. This behavior is derived
define OPT_SHELL [lsort -unique $oFF]
msg-result "Shell options: [get-define OPT_SHELL]"
}
+ if {"" ne [set extraSrc [get-define AMALGAMATION_EXTRA_SRC ""]]} {
+ proj-assert {"canonical" eq $::sqliteConfig(build-mode)}
+ msg-result "Appending source files to amalgamation: $extraSrc"
+ }
}
########################################################################
# Perform some late-stage work and generate the configure-process
# output file(s).
proc sqlite-process-dot-in-files {} {
- ########################################################################
- # 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 $::sqliteConfig(is-cross-compiling)
-
- # Finish up handling of the various feature flags here because it's
- # convenient for both the canonical build and autoconf bundles that
- # it be done here.
- sqlite-handle-common-feature-flags
- sqlite-finalize-feature-flags
- if {"" ne [set extraSrc [get-define AMALGAMATION_EXTRA_SRC ""]]} {
- msg-result "Appending source files to amalgamation: $extraSrc"
- }
-
########################################################################
# "Re-export" the autoconf-conventional --XYZdir flags into something
# which is more easily overridable from a make invocation. See the docs
-C Fix\san\sinternal\sdoc\stypo\sreported\sin\s[forum:e25e581f917|forum\spost\se25e581f917].
-D 2025-03-14T12:37:36.487
+C Configure-internal\sbuild\scleanups\s(no\sfunctional\schanges).\sAdd\sEXTRA_SRC\sto\sthe\sdeps\sof\ssqlite3.c.
+D 2025-03-15T15:19:42.945
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 0612f87776956cff7ba1585ad3ca7ab7d2e88735da0e9b4321dbacb05479cb94
+F auto.def 16e64dacd2c556b67df0c33fa08d564224bdb3137756679f39c45ed389b5a07b
F autoconf/Makefile.fallback 22fe523eb36dfce31e0f6349f782eb084e86a5620b2b0b4f84a2d6133f53f5ac
F autoconf/Makefile.in 6c98c82f52aa27a5c586080cf7c61c811174c2b6d8b8de33fd657d78d541dd7d
F autoconf/Makefile.msc 5bc67d3912444c40c6f96d003e5c90663e51abb83d204a520110b1b2038dcd8b
F autosetup/cc.tcl c0fcc50ca91deff8741e449ddad05bcd08268bc31177e613a6343bbd1fd3e45f
F autosetup/jimsh0.c a57c16e65dcffc9c76e496757cb3f7fb47e01ecbd1631a0a5e01751fc856f049
F autosetup/pkg-config.tcl 4e635bf39022ff65e0d5434339dd41503ea48fc53822c9c5bde88b02d3d952ba
-F autosetup/proj.tcl e69b91f814ea510057ce7663845de703c3746d71cff9a0db6b2563ee3e7fd25e
-F autosetup/sqlite-config.tcl 831985320d98002fcd5ea064cae8a49f8afcd9685d83178ef1ebb79189b5045c
+F autosetup/proj.tcl f8b5402faf3ee3fe9b10b946a085fc826184d26df1c17b5380e90edf89ea5fb6
+F autosetup/sqlite-config.tcl a7f4d093d63bc1da9ec3d44f392f377ce4c86aa7e48532ae51619e55558f5fbe
F autosetup/system.tcl 51d4be76cd9a9074704b584e5c9cbba616202c8468cf9ba8a4f8294a7ab1dba9
F configure 9a00b21dfd13757bbfb8d89b30660a89ec1f8f3a79402b8f9f9b6fc475c3303a x
F contrib/sqlitecon.tcl eb4c6578e08dd353263958da0dc620f8400b869a50d06e271ab0be85a51a08d3
F ext/wasm/tests/opfs/sahpool/sahpool-worker.js bd25a43fc2ab2d1bafd8f2854ad3943ef673f7c3be03e95ecf1612ff6e8e2a61
F ext/wasm/wasmfs.make 68999f5bd8c489239592d59a420f8c627c99169bbd6fa16a404751f757b9f702
F magic.txt 5ade0bc977aa135e79e3faaea894d5671b26107cc91e70783aa7dc83f22f3ba0
-F main.mk f2f6af216cf14ec010d317e2f75ed5dc2134a2f9d6be7df3a96ee11149598ca1
+F main.mk 88af9562d8f4d921e37ffa4d18f59d6d3749f357c7b876393d37298ec78f8110
F mptest/config01.test 3c6adcbc50b991866855f1977ff172eb6d901271
F mptest/config02.test 4415dfe36c48785f751e16e32c20b077c28ae504
F mptest/crash01.test 61e61469e257df0850df4293d7d4d6c2af301421
F tool/warnings-clang.sh bbf6a1e685e534c92ec2bfba5b1745f34fb6f0bc2a362850723a9ee87c1b31a7
F tool/warnings.sh 49a486c5069de041aedcbde4de178293e0463ae9918ecad7539eedf0ec77a139
F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
-P f786de8d1873cd27b1bf83273a1e100e9d481144674888ccf65974e003a3caad
-R d7baa5b59cd39b651d61c163fdc55c15
+P fa6f6ccdffc50024624306900efd2538c7415d8bdd0f02835b2e9c05adab3cf1
+R fa3f42bd795b87d6c693892aa92ef559
U stephan
-Z bd2d36d9f3639b6b3b36c30d817df77d
+Z 60eb85208863d91adaf5e3aa8394c9ef
# Remove this line to create a well-formed Fossil manifest.