]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Minor internal refactoring of auto.def to support the pending autoconf subdir port...
authorstephan <stephan@noemail.net>
Sun, 19 Jan 2025 16:26:25 +0000 (16:26 +0000)
committerstephan <stephan@noemail.net>
Sun, 19 Jan 2025 16:26:25 +0000 (16:26 +0000)
FossilOrigin-Name: 01ff37584708f3f79c62c1b5ed8cceab721cf8348a69a65f0559b1ef8845e85b

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

index 8ee102dc8a3afdea7d7b0ae7f26e00540a1a4b8c..f807947c10dab1c684cb4a52ceadbe9733f39e9f 100644 (file)
--- a/auto.def
+++ b/auto.def
@@ -271,7 +271,7 @@ if {"" eq [proj-bin-define install]} {
 # /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]
@@ -300,7 +300,7 @@ proc sqlite-check-wasi-sdk {} {
   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]... "
@@ -310,7 +310,7 @@ proc sqlite-check-wasi-sdk {} {
   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
@@ -343,8 +343,8 @@ proc sqlite-check-wasi-sdk {} {
     }
   }
   # 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
@@ -668,8 +668,6 @@ sqlite-check-tcl
 #   - 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... "
@@ -706,7 +704,7 @@ proc sqlite-determine-codegen-tcl {} {
     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}
@@ -715,7 +713,7 @@ proc sqlite-determine-codegen-tcl {} {
       # 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)"
@@ -775,6 +773,7 @@ if {[proj-opt-was-provided with-tempstore]} {
   }}
 }
 
+# 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 {
@@ -908,7 +907,7 @@ sqlite-show-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 $sqliteIsCrossCompiling
+define IS_CROSS_COMPILING $sqliteConfig(is-cross-compiling)
 
 ########################################################################
 # "Re-export" the autoconf-conventional --XYZdir flags into something
@@ -991,3 +990,4 @@ apply {{} {
     }
   }
 }}
+
index 9bd712c0a8a1fe17b94e04d3b9c58164ef85ef83..6b036b529cf36d17d40a911dbf7c3f8371f091e5 100644 (file)
@@ -5,11 +5,25 @@
 
 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
 
 
 ########################################################################
@@ -91,6 +105,7 @@ proc sqlite-show-feature-flags {} {
     define OPT_SHELL [lsort -unique $oFF]
     msg-result "Shell options: [get-define OPT_SHELL]"
   }
+  #parray ::sqliteConfig
 }
 
 ########################################################################
@@ -259,8 +274,7 @@ proc sqlite-check-line-editing {} {
     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."
     }
@@ -309,7 +323,7 @@ proc sqlite-check-line-editing {} {
   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 {
index 528a20c4ab76d166266de7681169ff74c28ccd41..02e383c8f0ab9d45ba4d34d09d42fc5bbf8cae2f 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-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
@@ -14,7 +14,7 @@ F art/sqlite370.eps aa97a671332b432a54e1d74ff5e8775be34200c2
 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
@@ -51,7 +51,7 @@ F autosetup/cc.tcl c0fcc50ca91deff8741e449ddad05bcd08268bc31177e613a6343bbd1fd3e
 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
@@ -2208,8 +2208,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 8534af5b94be9f5b1f02453e1c3b6b3f78a698af91595bdbbfdea00676510116
-R 6870ce5e67a7ecb1dfa87ef84e5cc5df
+P 2f1e94994f3595baad4045ab05ffee0668059c23ab37a39c25b83c62bfbaea28
+R 9c60fa033887f9029838d451908d0067
 U stephan
-Z 3acb6f6b529d76da2efc2bf22b964dc8
+Z ec3ab526fc22a680c0602f434f403d4d
 # Remove this line to create a well-formed Fossil manifest.
index 8835e882907b7c69592d131c4fcfd18457bbe727..684943058c36c1adecc363d4a85bb4088df95281 100644 (file)
@@ -1 +1 @@
-2f1e94994f3595baad4045ab05ffee0668059c23ab37a39c25b83c62bfbaea28
+01ff37584708f3f79c62c1b5ed8cceab721cf8348a69a65f0559b1ef8845e85b