]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Slightly simplify auto.def and autoconf/auto.def. configure-dll-support
authorstephan <stephan@noemail.net>
Mon, 24 Feb 2025 20:53:50 +0000 (20:53 +0000)
committerstephan <stephan@noemail.net>
Mon, 24 Feb 2025 20:53:50 +0000 (20:53 +0000)
FossilOrigin-Name: d84f591b962ea44efb902043444e4e54bc55e5bb32e5108f04df824407c412dd

auto.def
autoconf/auto.def
autosetup/sqlite-config.tcl
manifest
manifest.uuid

index 020135d6faf7337c953ba2c149e84370b88cdc1c..8ed59963737476ea6ffc6b2e6c17ce7df8943662 100644 (file)
--- a/auto.def
+++ b/auto.def
 #
 
 use sqlite-config
-sqlite-config-bootstrap canonical
-proj-if-opt-truthy dev {
-  # --enable-dev needs to come early so that the downstream tests
-  # which check for the following flags use their updated state.
-  proj-opt-set all 1
-  proj-opt-set debug 1
-  proj-opt-set amalgamation 0
-  define CFLAGS [get-env CFLAGS {-O0 -g}]
-  # -------------^^^^^^^ intentionally using [get-env] instead of
-  # [proj-get-env] here because [sqlite-setup-default-cflags] uses
-  # [proj-get-env] and we want this to supercede that.
-}
-sqlite-check-common-bins ;# must come before [sqlite-handle-wasi-sdk]
-sqlite-handle-wasi-sdk   ;# must run relatively early, as it changes the environment
-sqlite-check-common-system-deps
+sqlite-configure canonical {
+  proj-if-opt-truthy dev {
+    # --enable-dev needs to come early so that the downstream tests
+    # which check for the following flags use their updated state.
+    proj-opt-set all 1
+    proj-opt-set debug 1
+    proj-opt-set amalgamation 0
+    define CFLAGS [get-env CFLAGS {-O0 -g}]
+    # -------------^^^^^^^ intentionally using [get-env] instead of
+    # [proj-get-env] here because [sqlite-setup-default-cflags] uses
+    # [proj-get-env] and we want this to supercede that.
+  }
+  sqlite-check-common-bins ;# must come before [sqlite-handle-wasi-sdk]
+  sqlite-handle-wasi-sdk   ;# must run relatively early, as it changes the environment
+  sqlite-check-common-system-deps
 
-proj-define-for-opt amalgamation USE_AMALGAMATION "Use amalgamation for builds?"
+  proj-define-for-opt amalgamation USE_AMALGAMATION "Use amalgamation for builds?"
 
-proj-define-for-opt gcov USE_GCOV "Use gcov?"
+  proj-define-for-opt gcov USE_GCOV "Use gcov?"
 
-proj-define-for-opt test-status TSTRNNR_OPTS \
-  "test-runner flags:" {--status} {}
+  proj-define-for-opt test-status TSTRNNR_OPTS \
+    "test-runner flags:" {--status} {}
 
-proj-define-for-opt linemacros AMALGAMATION_LINE_MACROS \
-  "Use #line macros in the amalgamation:"
+  proj-define-for-opt linemacros AMALGAMATION_LINE_MACROS \
+    "Use #line macros in the amalgamation:"
 
-define LINK_TOOLS_DYNAMICALLY [proj-opt-was-provided dynlink-tools]
+  define LINK_TOOLS_DYNAMICALLY [proj-opt-was-provided dynlink-tools]
 
-sqlite-handle-tcl
-sqlite-handle-emsdk
-sqlite-config-finalize
+  sqlite-handle-tcl
+  sqlite-handle-emsdk
+}
index 7c61a308bbf2e80f305366ff9da798ffcd4a4278..3ba900d957f48577c984b3bab41dae3da4c639ef 100644 (file)
@@ -3,13 +3,8 @@
 #
 # This is the main autosetup-compatible configure script for the
 # "autoconf" bundle of the SQLite project.
-#
-# This script and all of its dependencies must be kept compatible with
-# JimTCL, a copy of which is included in this source tree as
-# ./autosetup/jimsh0.c.
-#
 use sqlite-config
-sqlite-config-bootstrap autoconf
-sqlite-check-common-bins
-sqlite-check-common-system-deps
-sqlite-config-finalize
+sqlite-configure autoconf {
+  sqlite-check-common-bins
+  sqlite-check-common-system-deps
+}
index 7193625df0d30635a66536b8904eb30af6637d51..e6dfb018d2a2525851a9bdcda3f54115a4813a00 100644 (file)
@@ -64,8 +64,12 @@ 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
-# future.
-proc sqlite-config-bootstrap {buildMode} {
+# 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.
+proc sqlite-configure {buildMode configScript} {
   set allBuildModes {canonical autoconf}
   if {$buildMode ni $allBuildModes} {
     user-error "Invalid build mode: $buildMode. Expecting one of: $allBuildModes"
@@ -344,11 +348,12 @@ proc sqlite-config-bootstrap {buildMode} {
     }
   }
   #lappend opts "soname:=duplicateEntry => {x}"; #just testing
-  if {[catch {options $opts}]} {
+  if {[catch {options $opts} msg opts]} {
     # Workaround for <https://github.com/msteveb/autosetup/issues/73>
     # where [options] behaves oddly on _some_ TCL builds when it's
     # called from deeper than the global scope.
-    return -code break
+    dict incr opts -level
+    return {*}$opts $msg
   }
   sqlite-setup-package-info
   uplevel 1 {
@@ -359,7 +364,67 @@ proc sqlite-config-bootstrap {buildMode} {
     use cc cc-db cc-shared cc-lib pkg-config
   }
   sqlite-post-options-init
-}; # sqlite-config-bootstrap
+  uplevel 1 $configScript
+  sqlite-configure-finalize
+}; # sqlite-configure
+
+########################################################################
+# Performs late-stage config steps common to both the canonical and
+# autoconf bundle builds.
+proc sqlite-configure-finalize {} {
+  set buildMode $::sqliteConfig(build-mode)
+  set isCanonical [expr {$buildMode eq "canonical"}]
+  set isAutoconf [expr {$buildMode eq "autoconf"}]
+
+  define HAVE_LFS 0
+  if {[opt-bool largefile]} {
+    #
+    # Insofar as we can determine HAVE_LFS has no effect on the
+    # library.  Perhaps it did back in the early 2000's. The
+    # --enable/disable-largefile flag is retained because it's
+    # harmless, but it doesn't do anything useful. It does have
+    # visible side-effects, though: the generated sqlite_cfg.h may (or
+    # may not) define HAVE_LFS.
+    #
+    cc-check-lfs
+  }
+
+  if {$isCanonical} {
+    if {![opt-bool static]} {
+      proj-indented-notice {
+        NOTICE: static lib build may be implicitly re-activated by
+        other components, e.g. some test apps.
+      }
+    }
+  } else {
+    proj-assert { $isAutoconf } "Invalid build mode"
+    proj-define-for-opt static-shell ENABLE_STATIC_SHELL \
+      "Link library statically into the CLI shell?"
+    if {![opt-bool shared] && ![opt-bool static-shell]} {
+      proj-opt-set shared 1
+      proj-indented-notice {
+        NOTICE: ignoring --disable-shared because --disable-static-shell
+        was specified.
+      }
+    }
+  }
+  proj-define-for-opt shared ENABLE_LIB_SHARED "Build shared library?"
+  proj-define-for-opt static ENABLE_LIB_STATIC "Build static library?"
+
+  sqlite-handle-debug
+  sqlite-handle-rpath
+  sqlite-handle-soname
+  sqlite-handle-threadsafe
+  sqlite-handle-tempstore
+  sqlite-handle-line-editing
+  sqlite-handle-load-extension
+  sqlite-handle-math
+  sqlite-handle-icu
+  sqlite-handle-env-quirks
+  sqlite-process-dot-in-files
+  sqlite-post-config-validation
+  sqlite-dump-defines
+}; # sqlite-configure-finalize
 
 ########################################################################
 # Runs some common initialization which must happen immediately after
@@ -1449,62 +1514,6 @@ proc sqlite-handle-env-quirks {} {
   sqlite-handle-mac-cversion
 }
 
-########################################################################
-# Performs late-stage config steps common to both the canonical and
-# autoconf bundle builds.
-proc sqlite-config-finalize {} {
-  set buildMode $::sqliteConfig(build-mode)
-  set isCanonical [expr {$buildMode eq "canonical"}]
-  set isAutoconf [expr {$buildMode eq "autoconf"}]
-
-  define HAVE_LFS 0
-  if {[opt-bool largefile]} {
-    #
-    # Insofar as we can determine HAVE_LFS has no effect on the
-    # library.  Perhaps it did back in the early 2000's. The
-    # --enable/disable-largefile flag is retained because it's
-    # harmless, but it doesn't do anything useful.
-    #
-    cc-check-lfs
-  }
-
-  if {$isCanonical} {
-    if {![opt-bool static]} {
-      proj-indented-notice {
-        NOTICE: static lib build may be implicitly re-activated by
-        other components, e.g. some test apps.
-      }
-    }
-  } else {
-    proj-assert { $isAutoconf } "Invalid build mode"
-    proj-define-for-opt static-shell ENABLE_STATIC_SHELL \
-      "Link library statically into the CLI shell?"
-    if {![opt-bool shared] && ![opt-bool static-shell]} {
-      proj-opt-set shared 1
-      proj-indented-notice {
-        NOTICE: ignoring --disable-shared because --disable-static-shell
-        was specified.
-      }
-    }
-  }
-  proj-define-for-opt shared ENABLE_LIB_SHARED "Build shared library?"
-  proj-define-for-opt static ENABLE_LIB_STATIC "Build static library?"
-
-  sqlite-handle-debug
-  sqlite-handle-rpath
-  sqlite-handle-soname
-  sqlite-handle-threadsafe
-  sqlite-handle-tempstore
-  sqlite-handle-line-editing
-  sqlite-handle-load-extension
-  sqlite-handle-math
-  sqlite-handle-icu
-  sqlite-handle-env-quirks
-  sqlite-process-dot-in-files
-  sqlite-post-config-validation
-  sqlite-dump-defines
-}
-
 ########################################################################
 # Perform some late-stage work and generate the configure-process
 # output file(s).
index 6dfabfa0d38bf3139d5e56988f6cd88b576d3e18..c0dc733d8c2e4b69e28b6953069c74407413fd1b 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C autoconf/auto.def:\sremove\sa\sdefine\swhich\smade\ssuperfluous\sby\s[b8bf966628c0].\sAdd\sa\scheck/status\smessage\sfor\swhether\sto\sstatically\slink\sthe\slibrary\sinto\sthe\sCLI\sshell.
-D 2025-02-24T18:45:30.839
+C Slightly\ssimplify\sauto.def\sand\sautoconf/auto.def.
+D 2025-02-24T20:53:50.231
 F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
 F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
 F LICENSE.md e108e1e69ae8e8a59e93c455654b8ac9356a11720d3345df2a4743e9590fb20d
@@ -14,13 +14,13 @@ F art/sqlite370.eps aa97a671332b432a54e1d74ff5e8775be34200c2
 F art/sqlite370.ico af56c1d00fee7cd4753e8631ed60703ed0fc6e90
 F art/sqlite370.jpg d512473dae7e378a67e28ff96a34da7cb331def2
 F art/sqlite370.svg 40b7e2fe8aac3add5d56dd86ab8d427a4eca5bcb3fe4f8946cb3794e1821d531
-F auto.def 97417bef4f6b6f35795f6b4d891ab57f18f367ff8939257fd1e711c9db003148
+F auto.def a8c935b5c3c0b27c6a8b1b788bb47b06cc0ca3e9e92dc1b87e4b02659ba95ff6
 F autoconf/Makefile.fallback 22fe523eb36dfce31e0f6349f782eb084e86a5620b2b0b4f84a2d6133f53f5ac
 F autoconf/Makefile.in c9a7007181df2a07d08bd63c6ba395ed38705aa218789726951aabebec32ee27
 F autoconf/Makefile.msc 1249e425a24859c7b3f17575275247df9eec3bddc0d1d7e73941f1abdbb95a92
 F autoconf/README.first f1d3876e9a7852c22f275a6f06814e64934cecbc0b5b9617d64849094c1fd136
 F autoconf/README.txt 7f01dc3915e2d68f329011073662369e62a0938a2c69398807823c57591cb288
-F autoconf/auto.def bd6987ccbdb5aa0506c93d59063efb848c2f94ed250f893bc08e92d10b8ecb3b
+F autoconf/auto.def 8d81c1d728d8462a9b6c1ca0714013bbb097aee0ae5e79309d7939cead98e295
 F autoconf/tea/Makefile.in ba0556fee8da09c066bad85a4457904e46ee2c2eabaa309c0e83a78f2f151a8e
 F autoconf/tea/README.txt 61e62e519579e4a112791354d6d440f8b51ea6db3b0bab58d59f29df42d2dfe3
 F autoconf/tea/aclocal.m4 52c47aac44ce0ddb1f918b6993e8beb8eee88f43
@@ -50,7 +50,7 @@ F autosetup/cc.tcl c0fcc50ca91deff8741e449ddad05bcd08268bc31177e613a6343bbd1fd3e
 F autosetup/jimsh0.c a57c16e65dcffc9c76e496757cb3f7fb47e01ecbd1631a0a5e01751fc856f049
 F autosetup/pkg-config.tcl 4e635bf39022ff65e0d5434339dd41503ea48fc53822c9c5bde88b02d3d952ba
 F autosetup/proj.tcl e69b91f814ea510057ce7663845de703c3746d71cff9a0db6b2563ee3e7fd25e
-F autosetup/sqlite-config.tcl 6634e82cead46c74d728a2b9d1b39b266fce7ba98ab7fd1a43f6de7241ab1fbe
+F autosetup/sqlite-config.tcl c9ec1c6f34c3998c9eb0757f6e23a11de4f1e56db64becbdba0aa331e86f2312
 F autosetup/system.tcl 51d4be76cd9a9074704b584e5c9cbba616202c8468cf9ba8a4f8294a7ab1dba9
 F configure 9a00b21dfd13757bbfb8d89b30660a89ec1f8f3a79402b8f9f9b6fc475c3303a x
 F contrib/sqlitecon.tcl 210a913ad63f9f991070821e599d600bd913e0ad
@@ -2210,8 +2210,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 b8bf966628c0cbbb6f0bc09a70800ac0b6b7f8c2d2f70c91f4b6e65daae0b192
-R 6798c5140441a1e20c93d3ea0d1b0a61
+P df95e908cacc7e8e749701ff49d2ce02a927c58a474dd9a362d5f84cb3d7413f
+R f16fff0a6a240e565123a862fb146ced
 U stephan
-Z cb088f794df8053d88b2a77b7947a873
+Z 4f3ee512515a533e1174eb0f39fd3b9a
 # Remove this line to create a well-formed Fossil manifest.
index 7ebc69250468c28c44e40c61a0ecbb7c22c1c884..0975ebce69682e26a23009d7f87d97ec17839cad 100644 (file)
@@ -1 +1 @@
-df95e908cacc7e8e749701ff49d2ce02a927c58a474dd9a362d5f84cb3d7413f
+d84f591b962ea44efb902043444e4e54bc55e5bb32e5108f04df824407c412dd