]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Improve --all flag handling so that combinations of (--all --disable-FEATURE) and...
authorstephan <stephan@noemail.net>
Fri, 4 Apr 2025 15:41:19 +0000 (15:41 +0000)
committerstephan <stephan@noemail.net>
Fri, 4 Apr 2025 15:41:19 +0000 (15:41 +0000)
FossilOrigin-Name: 26ef0ff4bfbb4425baa26fa5c8420f5da0603c38ef651104e566c7dc85bfaa3a

autosetup/proj.tcl
autosetup/sqlite-config.tcl
manifest
manifest.uuid

index b8b9d3dcb7ec53051cfea7e4426ad2c1444ba7d0..707da947e7b5754994498402b0684435cae99ec3 100644 (file)
@@ -1402,6 +1402,7 @@ proc proj-tclConfig-sh-to-autosetup {tclConfigSh} {
   set shBody {}
   set tclVars {
     TCL_INCLUDE_SPEC
+    TCL_LIBS
     TCL_LIB_SPEC
     TCL_STUB_LIB_SPEC
     TCL_EXEC_PREFIX
index 3b07621bac89c9d8479ff9812b350d08fd2e6c90..00f35cad1e2d66913a8f98514df5b95506c6e9a6 100644 (file)
@@ -720,15 +720,41 @@ proc sqlite-setup-default-cflags {} {
 # Handle various SQLITE_ENABLE/OMIT_... feature flags.
 proc sqlite-handle-common-feature-flags {} {
   msg-result "Feature flags..."
-  foreach {boolFlag featureFlag ifSetEvalThis} {
+  if {"tcl-extension" eq $::sqliteConfig(build-mode)} {
+    set allFlagEnables {fts3 fts4 fts5 rtree geopoly}
+  } else {
+    set allFlagEnables {fts4 fts5 rtree rtree geopoly session}
+  }
+  if {![opt-bool all]} {
+    # Special handling for --disable-all
+    foreach flag $allFlagEnables {
+      if {![proj-opt-was-provided $flag]} {
+        proj-opt-set $flag 0
+      }
+    }
+  }
+  foreach {boolFlag featureFlag ifSetEvalThis} [proj-strip-hash-comments {
     all         {} {
-      # The 'all' option must be first in this list.
-      proj-opt-set fts4
-      proj-opt-set fts5
-      proj-opt-set geopoly
-      proj-opt-set rtree
-      proj-opt-set session
+      # The 'all' option must be first in this list.  This impl makes
+      # an effort to only apply flags which the user did not already
+      # apply, so that combinations like (--all --disable-geopoly)
+      # will indeed disable geopoly. There are corner cases where
+      # flags which depend on each other will behave in non-intuitive
+      # ways:
+      #
+      # --all --disable-rtree
+      #
+      # Will NOT disable geopoly, though geopoly depends on rtree.
+      # The --geopoly flag, though, will automatically re-enable
+      # --rtree, so --disable-rtree won't actually disable anything in
+      # that case.
+      foreach k $allFlagEnables {
+        if {![proj-opt-was-provided $k]} {
+          proj-opt-set $k 1
+        }
+      }
     }
+    fts3         -DSQLITE_ENABLE_FTS3    {sqlite-affirm-have-math fts3}
     fts4         -DSQLITE_ENABLE_FTS4    {sqlite-affirm-have-math fts4}
     fts5         -DSQLITE_ENABLE_FTS5    {sqlite-affirm-have-math fts5}
     geopoly      -DSQLITE_ENABLE_GEOPOLY {proj-opt-set rtree}
@@ -745,7 +771,7 @@ proc sqlite-handle-common-feature-flags {} {
       }
     }
     scanstatus     -DSQLITE_ENABLE_STMT_SCANSTATUS {}
-  } {
+  }] {
     if {$boolFlag ni $::autosetup(options)} {
       # Skip flags which are in the canonical build but not
       # the autoconf bundle.
index aeb3cf252f67cbc8c86aa3089db4e0e637f839da..9e35c1a15d0cc3eb5b04ab18e60c41241e0bb74a 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C The\swin32lock\sand\swin32longpath\stests\sdon't\swork\son\sCygwin
-D 2025-04-04T13:23:03.839
+C Improve\s--all\sflag\shandling\sso\sthat\scombinations\sof\s(--all\s--disable-FEATURE)\sand\s(--disable-all\s--FEATURE)\swork\smore\sintuitively.\sAdd\smissing\shandling\sof\sthe\s--fts3\sflag\s(it\swas\saccepted\sbut\signored\sbefore).\sAdd\sTCL_LIBS\sto\sthe\sset\sof\svars\sexported\svia\stclConfig.sh\sfor\suse\sin\sthe\stea\sbuild.
+D 2025-04-04T15:41:19.342
 F .fossil-settings/binary-glob 61195414528fb3ea9693577e1980230d78a1f8b0a54c78cf1b9b24d0a409ed6a x
 F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
 F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
@@ -51,8 +51,8 @@ F autosetup/cc.tcl c0fcc50ca91deff8741e449ddad05bcd08268bc31177e613a6343bbd1fd3e
 F autosetup/find_tclconfig.tcl e64886ffe3b982d4df42cd28ed91fe0b5940c2c5785e126c1821baf61bc86a7e
 F autosetup/jimsh0.c a57c16e65dcffc9c76e496757cb3f7fb47e01ecbd1631a0a5e01751fc856f049
 F autosetup/pkg-config.tcl 4e635bf39022ff65e0d5434339dd41503ea48fc53822c9c5bde88b02d3d952ba
-F autosetup/proj.tcl 89b1822a66b4d6a286c959b3c26093e35926bf86db56cc1887ddcb130001f76a
-F autosetup/sqlite-config.tcl 858c567f0b945e690c693c8e0860ae591596e9221760de643d3f4c1a46ce238c
+F autosetup/proj.tcl 1e244d61c93fd79586be59e4718f8e3538ee47a9cbff325f62f7b222863c2fea
+F autosetup/sqlite-config.tcl 294a1e0e0f4c39bb210523b148e286d9f70a18f8f7407388ac77878da58c8a5c
 F autosetup/system.tcl 51d4be76cd9a9074704b584e5c9cbba616202c8468cf9ba8a4f8294a7ab1dba9
 F configure 9a00b21dfd13757bbfb8d89b30660a89ec1f8f3a79402b8f9f9b6fc475c3303a x
 F contrib/sqlitecon.tcl eb4c6578e08dd353263958da0dc620f8400b869a50d06e271ab0be85a51a08d3
@@ -2216,8 +2216,8 @@ F tool/version-info.c 3b36468a90faf1bbd59c65fd0eb66522d9f941eedd364fabccd7227350
 F tool/warnings-clang.sh bbf6a1e685e534c92ec2bfba5b1745f34fb6f0bc2a362850723a9ee87c1b31a7
 F tool/warnings.sh 49a486c5069de041aedcbde4de178293e0463ae9918ecad7539eedf0ec77a139
 F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
-P 244c2b75c10c68bc0499d60b707a925836a4b9d490813785587522109fc11fe2
-R dd73bc19146d018b472217465906040b
-U jan.nijtmans
-Z 0a9d51a17f8a004b247523e8da988010
+P 32ef3f26e7fb34dfdb23617a19bb9baa2e4c3dca564a88850b58a0fbe6446cf8
+R 0155e095440bdd5fe99e88b4e49cb70c
+U stephan
+Z a056ac7f76093e9e0558ddb35384b15d
 # Remove this line to create a well-formed Fossil manifest.
index 0d33878e2b5ac42a5d87dd26ba5cd398849f9f22..c952cb379597865343586c9c66221ef1eb348098 100644 (file)
@@ -1 +1 @@
-32ef3f26e7fb34dfdb23617a19bb9baa2e4c3dca564a88850b58a0fbe6446cf8
+26ef0ff4bfbb4425baa26fa5c8420f5da0603c38ef651104e566c7dc85bfaa3a