]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Minor internal cleanups in the configure script. No behavioral changes.
authorstephan <stephan@noemail.net>
Wed, 13 Aug 2025 19:59:37 +0000 (19:59 +0000)
committerstephan <stephan@noemail.net>
Wed, 13 Aug 2025 19:59:37 +0000 (19:59 +0000)
FossilOrigin-Name: c42269e5ce3688fccee16cf35e1101f36afc3ccc19bef57b177d46c84db2435a

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

index fca85e9ad75f53f2017f73f6f831902dd95b64e2..bf055ace100811afeaaa84463aaf0884844d3efa 100644 (file)
@@ -378,8 +378,8 @@ proc proj-bin-define {binName {defName {}}} {
 #
 # Despite using cc-path-progs to do the search, this function clears
 # any define'd name that function stores for the result (because the
-# caller has no sensible way of knowing which result it was unless
-# they pass only a single argument).
+# caller has no sensible way of knowing which [define] name it has
+# unless they pass only a single argument).
 #
 proc proj-first-bin-of {args} {
   set rc ""
@@ -451,7 +451,9 @@ proc proj-opt-set {flag {val 1}} {
 # @proj-opt-exists flag
 #
 # Returns 1 if the given flag has been defined as a legal configure
-# option, else returns 0.
+# option, else returns 0. Options set via proj-opt-set "exist" for
+# this purpose even if they were not defined via autosetup's
+# [options] function.
 #
 proc proj-opt-exists {flag} {
   expr {$flag in $::autosetup(options)};
@@ -1643,7 +1645,11 @@ proc proj-tweak-default-env-dirs {} {
 # processing the file. In the context of that script, the vars
 # $dotInsIn and $dotInsOut will be set to the input and output file
 # names.  This can be used, for example, to make the output file
-# executable or perform validation on its contents.
+# executable or perform validation on its contents:
+#
+##  proj-dot-ins-append my.sh.in my.sh {
+##    catch {exec chmod u+x $dotInsOut}
+##  }
 #
 # See [proj-dot-ins-process], [proj-dot-ins-list]
 #
index f7d9ca3439dee15d171da127be7393de1956e6bd..8fb3b80b991ca1f0b4921231ac37c1a4732657f3 100644 (file)
@@ -329,7 +329,7 @@ proc sqlite-configure {buildMode configScript} {
               Needed only by ext/wasm. Default=EMSDK env var.}
 
         amalgamation-extra-src:FILES
-          => {Space-separated list of soure files to append as-is to the resulting
+          => {Space-separated list of source files to append as-is to the resulting
               sqlite3.c amalgamation file. May be provided multiple times.}
       }
     }
@@ -415,7 +415,6 @@ proc sqlite-configure {buildMode configScript} {
   # ^^^ lappend of [sqlite-custom-flags] introduces weirdness if
   # we delay [proj-strip-hash-comments] until after that.
 
-
   ########################################################################
   # sqlite-custom.tcl is intended only for vendor-branch-specific
   # customization.  See autosetup/README.md#branch-customization for
@@ -433,6 +432,8 @@ proc sqlite-configure {buildMode configScript} {
     }
   }
 
+  #lappend allFlags just-testing {{*} {soname:=duplicateEntry => {x}}}
+
   # Filter allFlags to create the set of [options] legal for this build
   foreach {group XY} [subst -nobackslashes -nocommands $allFlags] {
     foreach {X Y} $XY {
@@ -441,7 +442,7 @@ proc sqlite-configure {buildMode configScript} {
       }
     }
   }
-  #lappend opts "soname:=duplicateEntry => {x}"; #just testing
+
   if {[catch {options {}} msg xopts]} {
     # Workaround for <https://github.com/msteveb/autosetup/issues/73>
     # where [options] behaves oddly on _some_ TCL builds when it's
@@ -456,8 +457,9 @@ proc sqlite-configure {buildMode configScript} {
 
 ########################################################################
 # Runs "phase 1" of the configure process: after initial --flags
-# handling but before the build-specific parts are run. $buildMode
-# must be the mode which was passed to [sqlite-configure].
+# handling but before sqlite-configure's $configScript argument is
+# run. $buildMode must be the mode which was passed to
+# [sqlite-configure].
 proc sqlite-configure-phase1 {buildMode} {
   define PACKAGE_NAME sqlite
   define PACKAGE_URL {https://sqlite.org}
@@ -1024,7 +1026,7 @@ proc sqlite-handle-emsdk {} {
 proc sqlite-get-readline-dir-list {} {
   # Historical note: the dirs list, except for the inclusion of
   # $prefix and some platform-specific dirs, originates from the
-  # legacy configure script
+  # legacy configure script.
   set dirs [list [get-define prefix]]
   switch -glob -- [get-define host] {
     *-linux-android {
@@ -1042,7 +1044,7 @@ proc sqlite-get-readline-dir-list {} {
       if {[opt-val with-readline-ldflags] in {auto ""}} {
         # If the user did not supply their own --with-readline-ldflags
         # value, hijack that flag to inject options which are known to
-        # work on a default Haiku installation.
+        # work on Haiku OS installations.
         if {"" ne [glob -nocomplain /boot/system/lib/libreadline*]} {
           proj-opt-set with-readline-ldflags {-L/boot/system/lib -lreadline}
         }
@@ -1092,8 +1094,8 @@ proc sqlite-get-readline-dir-list {} {
 #  4) Default to automatic search for optional readline
 #
 #  5) Try to find readline or editline. If it's not found AND the
-#     corresponding --FEATURE flag was explicitly given, fail fatally,
-#     else fail silently.
+#     corresponding --FEATURE flag was explicitly given then fail
+#     fatally, else fail non-fatally.
 proc sqlite-check-line-editing {} {
   msg-result "Checking for line-editing capability..."
   define HAVE_READLINE 0
@@ -1106,7 +1108,7 @@ proc sqlite-check-line-editing {} {
                          # if the library is not found.
   set libsForReadline {readline edit} ; # -l<LIB> names to check for readline().
                                         # The libedit check changes this.
-  set editLibName "readline" ; # "readline" or "editline"
+  set editLibName "readline"     ; # "readline" or "editline"
   set editLibDef "HAVE_READLINE" ; # "HAVE_READLINE" or "HAVE_EDITLINE"
   set dirLn [opt-val with-linenoise]
   if {"" ne $dirLn} {
@@ -1123,7 +1125,7 @@ proc sqlite-check-line-editing {} {
     foreach f $lnCOpts {
       if {[file exists $dirLn/$f]} {
         set lnC $dirLn/$f
-        break;
+        break
       }
     }
     if {"" eq $lnC} {
@@ -1233,16 +1235,18 @@ proc sqlite-check-line-editing {} {
     set rlLib [opt-val with-readline-ldflags]
     #proc-debug "rlLib=$rlLib"
     if {$rlLib in {auto ""}} {
-      set rlLib ""
-      set libTerm ""
-      if {[proj-check-function-in-lib tgetent "$editLibName ncurses curses termcap"]} {
+      set rlLib ""  ; # make sure it's not "auto", as we may append to it below
+      set libTerm ""; # lib with tgetent(3)
+      if {[proj-check-function-in-lib tgetent [list $editLibName ncurses curses termcap]]} {
         # ^^^ that libs list comes from the legacy configure script ^^^
         set libTerm [get-define lib_tgetent]
         undefine lib_tgetent
       }
       if {$editLibName eq $libTerm} {
+        # tgetent(3) was found in the editing library
         set rlLib $libTerm
       } elseif {[proj-check-function-in-lib readline $libsForReadline $libTerm]} {
+        # tgetent(3) was found in an external lib
         set rlLib [get-define lib_readline]
         lappend rlLib $libTerm
         undefine lib_readline
@@ -1272,8 +1276,8 @@ proc sqlite-check-line-editing {} {
     msg-result "Using $editLibName flags: $rlInc $rlLib"
     # Check whether rl_completion_matches() has a signature we can use
     # and disable that sub-feature if it doesn't.
-    if {![cctest \
-            -cflags "$rlInc -D${editLibDef}" -libs $rlLib -nooutput 1 -source {
+    if {![cctest -cflags "$rlInc -D${editLibDef}" -libs $rlLib -nooutput 1 \
+            -source {
              #include <stdio.h>
              #ifdef HAVE_EDITLINE
              #include <editline/readline.h>
@@ -1326,7 +1330,7 @@ proc sqlite-handle-line-editing {} {
 #   - pkg-config: use only pkg-config to determine flags
 #   - /path/to/icu-config: use that to determine flags
 #
-# If --with-icu-config is used as neither pkg-config nor icu-config
+# If --with-icu-config is used and neither pkg-config nor icu-config
 # are found, fail fatally.
 #
 # If both --with-icu-ldflags and --with-icu-config are provided, they
index f10e6c55708df2d2394ffa39ab540f33d9b57aef..1f635bd8990c5d8c30b30ed060c969bab04d4e84 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Have\scksumvfs\swrite\schecksums\sto\sthe\sdatabase\sfile\sonly,\snot\sthe\swal\sfile.\sWriting\sthem\sto\sthe\swal\sfile\sbreaks\swal\sfile\srecovery.
-D 2025-08-13T19:13:16.370
+C Minor\sinternal\scleanups\sin\sthe\sconfigure\sscript.\sNo\sbehavioral\schanges.
+D 2025-08-13T19:59:37.600
 F .fossil-settings/binary-glob 61195414528fb3ea9693577e1980230d78a1f8b0a54c78cf1b9b24d0a409ed6a x
 F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
 F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
@@ -46,8 +46,8 @@ F autosetup/cc.tcl c0fcc50ca91deff8741e449ddad05bcd08268bc31177e613a6343bbd1fd3e
 F autosetup/find_tclconfig.tcl e64886ffe3b982d4df42cd28ed91fe0b5940c2c5785e126c1821baf61bc86a7e
 F autosetup/jimsh0.c 563b966c137a4ce3c9333e5196723b7ac0919140a9d7989eb440463cd855c367
 F autosetup/pkg-config.tcl 4e635bf39022ff65e0d5434339dd41503ea48fc53822c9c5bde88b02d3d952ba
-F autosetup/proj.tcl 7eaa83ccb6f5b250ee9192fa914918b0e2075edacf984c75fbf82cc2a6449c6c
-F autosetup/sqlite-config.tcl 988bcb408937721832390c2724b6204ff8b7b8e584c76be985ebe0b6686c8b24
+F autosetup/proj.tcl 3418e01d9c83e8eed28ede96e41a3197bc6991655dc04d69fd328b65bfa1df7d
+F autosetup/sqlite-config.tcl f2d2cf0917a17068ab2897b2009e31a05a4481a0786cd6ea15f643fef325bbe3
 F autosetup/system.tcl 51d4be76cd9a9074704b584e5c9cbba616202c8468cf9ba8a4f8294a7ab1dba9
 F autosetup/teaish/README.txt b40071e6f8506500a2f7f71d5fc69e0bf87b9d7678dd9da1e5b4d0acbf40b1ca
 F autosetup/teaish/core.tcl aee092fc71986d1272b835ea7492bb55ffc213a289502e4f14da80cf67b7e3c3
@@ -2169,9 +2169,8 @@ F tool/version-info.c 3b36468a90faf1bbd59c65fd0eb66522d9f941eedd364fabccd7227350
 F tool/warnings-clang.sh bbf6a1e685e534c92ec2bfba5b1745f34fb6f0bc2a362850723a9ee87c1b31a7
 F tool/warnings.sh 1ad0169b022b280bcaaf94a7fa231591be96b514230ab5c98fbf15cd7df842dd
 F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
-P bd7530bf6afdad391b223651632e1b4d59ab5ec806c7a94daadc7f09091321f4 5bf48c7e31904f1f7048499c630801846df89f262b32ea1e49fb6e039eaad11a
-R adf2ed8bc8e9332c08eff8a3756e14d6
-T +closed 5bf48c7e31904f1f7048499c630801846df89f262b32ea1e49fb6e039eaad11a
-U dan
-Z d762bf60b7a100696be5d3736ef9b6c0
+P e3bd1feccaee8ff2f68b7b863769dd739e8a434fd32fed73deeeec885628311c
+R 2c28c08a4556fb45eadedd8aaf45163d
+U stephan
+Z 39cd47253f80814b5b6a2012d224171f
 # Remove this line to create a well-formed Fossil manifest.
index 8399ba11dbbdf671dac47aa2e099cff70a7718dd..c13671911f97646a1fcd7616b5804e829d570519 100644 (file)
@@ -1 +1 @@
-e3bd1feccaee8ff2f68b7b863769dd739e8a434fd32fed73deeeec885628311c
+c42269e5ce3688fccee16cf35e1101f36afc3ccc19bef57b177d46c84db2435a