]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Rename the 'hwaci' auto.def utility API to the more generic 'proj' API, per /chat...
authorstephan <stephan@noemail.net>
Mon, 28 Oct 2024 14:16:50 +0000 (14:16 +0000)
committerstephan <stephan@noemail.net>
Mon, 28 Oct 2024 14:16:50 +0000 (14:16 +0000)
FossilOrigin-Name: e20610f06bfc6f4ebc5806da05c307d91e1f0a8c7a7501a7953273dbf1816fee

auto.def
autosetup/proj.tcl [moved from autosetup/hwaci-common.tcl with 86% similarity]
manifest
manifest.uuid

index e2ba5f1db9514bf7eb0f577a0c325e7749df474c..042656ff3cf83b6723d21af0c510334dfb0a4471 100644 (file)
--- a/auto.def
+++ b/auto.def
@@ -12,7 +12,7 @@
 #
 # JimTCL: https://jim.tcl.tk
 #
-use cc cc-db cc-shared cc-lib hwaci-common pkg-config
+use cc cc-db cc-shared cc-lib proj pkg-config
 
 # $DUMP_DEFINES_TXT is the file emitted by --dump-defines, intended
 # only for build debugging and not part of the public build interface.
@@ -118,8 +118,8 @@ set DUMP_DEFINES_JSON ""; #./config.defines.json
 #   booleans: use one of:
 #     - [opt-bool FLAG] is autosetup's built-in command for this, but we
 #       have some convenience variants:
-#     - [hwaci-opt-truthy FLAG]
-#     - [hwaci-opt-if-truthy FLAG {THEN} {ELSE}]
+#     - [proj-opt-truthy FLAG]
+#     - [proj-opt-if-truthy FLAG {THEN} {ELSE}]
 #
 #   Non-boolean (i.e. string) flags:
 #     - [opt-val FLAG ?default?]
@@ -202,7 +202,7 @@ unset flags
 # Carry values from hidden --flag aliases over to their canonical flag
 # forms.
 #
-hwaci-xfer-options-aliases {
+proj-xfer-options-aliases {
   with-readline-inc => with-readline-cflags
   with-readline-lib => with-readline-ldflags
 }
@@ -218,7 +218,7 @@ define PACKAGE_BUGREPORT [get-define PACKAGE_URL]/forum
 
 msg-result "srcdir = $srcdir"
 msg-result "top_srcdir = $top_srcdir"
-msg-result [hwaci-bold "Configuring SQLite version $PACKAGE_VERSION"]
+msg-result [proj-bold "Configuring SQLite version $PACKAGE_VERSION"]
 
 #
 # SQLITE_AUTORECONFIG contains make target rules for re-running the
@@ -233,7 +233,7 @@ foreach arg $::autosetup(argv) {
 
 
 # Are we cross-compiling?
-set cross_compiling [hwaci-is-cross-compiling]
+set cross_compiling [proj-is-cross-compiling]
 if {![file exists sqlite3.pc.in]} {
   msg-result "This appears to be an out-of-tree build."
 }
@@ -266,7 +266,7 @@ proc sqlite-add-shell-opt {args} {
   }
 }
 
-hwaci-file-extensions
+proj-file-extensions
 if {".exe" eq [get-define TARGET_EXEEXT]} {
   define SQLITE_OS_UNIX 0
   define SQLITE_OS_WIN 1
@@ -279,8 +279,8 @@ if {".exe" eq [get-define TARGET_EXEEXT]} {
 
 #########
 # Programs needed
-if {"" eq [hwaci-bin-define install]} {
-  hwaci-warn "Cannot find install binary, so 'make install' will not work."
+if {"" eq [proj-bin-define install]} {
+  proj-warn "Cannot find install binary, so 'make install' will not work."
   # Reminder: we historically have ./install-sh in the source tree.
   # Can we not simply use that?
   #
@@ -316,18 +316,18 @@ proc sqlite-check-wasi-sdk {} {
   if {$wasiSdkDir eq ""} {
     return 0
   } elseif {$::cross_compiling} {
-    hwaci-fatal "Cannot combine --with-wasi-sdk with cross-compilation"
+    proj-fatal "Cannot combine --with-wasi-sdk with cross-compilation"
   }
   msg-result "Checking WASI SDK directory \[$wasiSdkDir]... "
   #puts "prefix = [prefix $wasiSdkDir/bin {clang ld}]"
-  hwaci-affirm-files-exist -v {*}[prefix "$wasiSdkDir/bin/" {clang wasm-ld}]
+  proj-affirm-files-exist -v {*}[prefix "$wasiSdkDir/bin/" {clang wasm-ld}]
   msg-result "Using wasi-sdk clang, disabling: tcl, CLI shell, DLL, loadable extensions, threading"
   define HAVE_WASI_SDK 1
   define WASI_SDK_DIR $wasiSdkDir
-  hwaci-opt-set load-extension 0 ;# ==> --disable-load-extension
-  hwaci-opt-set threadsafe 0     ;# ==> --threadsafe=0
-  hwaci-opt-set tcl 0            ;# ==> --disable-tcl
-  hwaci-opt-set shared 0         ;# ==> --disable-shared
+  proj-opt-set load-extension 0 ;# ==> --disable-load-extension
+  proj-opt-set threadsafe 0     ;# ==> --threadsafe=0
+  proj-opt-set tcl 0            ;# ==> --disable-tcl
+  proj-opt-set shared 0         ;# ==> --disable-shared
   set cross_compiling 1
 
   # Changing --host and --target have no effect here except to possibly
@@ -367,7 +367,7 @@ cc-with {-includes stdint.h} \
 cc-check-functions gmtime_r isnan localtime_r localtime_s \
   malloc_usable_size strchrnul usleep utime pread pread64 pwrite pwrite64
 
-hwaci-check-function-in-lib fdatasync rt
+proj-check-function-in-lib fdatasync rt
 define LDFLAGS_FDATASYNC [get-define lib_fdatasync]
 undefine lib_fdatasync
 
@@ -383,7 +383,7 @@ cc-check-includes \
 # code generation:
 cc-check-includes dirent.h sys/time.h
 
-if {[cc-check-includes zlib.h] && [hwaci-check-function-in-lib deflate z]} {
+if {[cc-check-includes zlib.h] && [proj-check-function-in-lib deflate z]} {
   # TODO: port over the more sophisticated zlib search from the fossil auto.def
   define HAVE_ZLIB 1; # "-DSQLITE_HAVE_ZLIB=1"
   define LDFLAGS_ZLIB -lz
@@ -399,30 +399,30 @@ if {[cc-check-includes zlib.h] && [hwaci-check-function-in-lib deflate z]} {
 #
 # Determine proper rpath-handling flags.
 #
-hwaci-check-rpath
+proj-check-rpath
 
-hwaci-define-if-opt-truthy shared ENABLE_SHARED \
+proj-define-if-opt-truthy shared ENABLE_SHARED \
   "Build shared library?"
 
-if {![hwaci-define-if-opt-truthy static ENABLE_STATIC \
+if {![proj-define-if-opt-truthy static ENABLE_STATIC \
         "Build static library?"]} {
-  hwaci-warn "static lib build may be implicitly re-activated by other components, e.g. libtclsqlite3."
+  proj-warn "static lib build may be implicitly re-activated by other components, e.g. libtclsqlite3."
 }
 
-hwaci-define-if-opt-truthy amalgamation USE_AMALGAMATION \
+proj-define-if-opt-truthy amalgamation USE_AMALGAMATION \
   "Use amalgamation for builds?"
 
-hwaci-define-if-opt-truthy gcov USE_GCOV "Use gcov?"
+proj-define-if-opt-truthy gcov USE_GCOV "Use gcov?"
 
-hwaci-define-if-opt-truthy test-status TSTRNNR_OPTS \
+proj-define-if-opt-truthy test-status TSTRNNR_OPTS \
   "test-runner flags:" {--status} {}
 
-hwaci-define-if-opt-truthy linemacros AMALGAMATION_LINE_MACROS \
+proj-define-if-opt-truthy linemacros AMALGAMATION_LINE_MACROS \
   "Use #line macros in the amalgamation:"
 
 msg-checking "Debug build? "
 
-hwaci-if-opt-truthy with-debug {
+proj-if-opt-truthy with-debug {
   define SQLITE_DEBUG 1
   define TARGET_DEBUG {-g -DSQLITE_DEBUG=1 -DSQLITE_ENABLE_SELECTTRACE -DSQLITE_ENABLE_WHERETRACE -O0 -Wall}
   msg-result yes
@@ -472,7 +472,7 @@ proc sqlite-check-tcl {} {
 
   global top_srcdir
   msg-result "Checking for a suitable tcl... "
-  set optTcl [hwaci-opt-truthy tcl]
+  set optTcl [proj-opt-truthy tcl]
   set use_tcl $optTcl
   set with_tclsh [opt-val with-tclsh]
   set with_tcl [opt-val with-tcl]
@@ -480,15 +480,15 @@ proc sqlite-check-tcl {} {
   #puts "sqlite-check-tcl: with_tclsh=${with_tclsh}"
   #puts "sqlite-check-tcl: with_tcl=$with_tcl"
   if {"" eq $with_tclsh && "" eq $with_tcl} {
-    set with_tclsh [hwaci-first-bin-of tclsh9.0 tclsh8.6 tclsh]
+    set with_tclsh [proj-first-bin-of tclsh9.0 tclsh8.6 tclsh]
   }
   #puts "sqlite-check-tcl: with_tclsh=${with_tclsh}"
 
   if {"" ne $with_tclsh} {
     if {![file isfile $with_tclsh]} {
-      hwaci-fatal "TCL shell $with_tclsh is not a file"
+      proj-fatal "TCL shell $with_tclsh is not a file"
     } elseif {![file-isexec $with_tclsh]} {
-      hwaci-fatal "TCL shell $with_tclsh is not executable"
+      proj-fatal "TCL shell $with_tclsh is not executable"
     } else {
       define TCLSH_CMD $with_tclsh
       msg-result "Using tclsh: $with_tclsh"
@@ -500,7 +500,7 @@ proc sqlite-check-tcl {} {
       if {"" ne $with_tcl && [file isdir $with_tcl]} {
         msg-result "$with_tclsh recommends the tclConfig.sh from $with_tcl"
       } else {
-        hwaci-warn "$with_tclsh is unable to recommand a tclConfig.sh"
+        proj-warn "$with_tclsh is unable to recommand a tclConfig.sh"
         set use_tcl 0
       }
     }
@@ -522,7 +522,7 @@ proc sqlite-check-tcl {} {
           }
         }
         if {"" eq $cfg} {
-          hwaci-fatal "No tclConfig.sh found under ${with_tcl}"
+          proj-fatal "No tclConfig.sh found under ${with_tcl}"
         }
       } else {
         # If we have not yet found a tclConfig.sh file, look in $libdir which is
@@ -540,7 +540,7 @@ proc sqlite-check-tcl {} {
           }
         }
         if {![file readable $cfg]} {
-          hwaci-indented-notice {
+          proj-indented-notice {
             WARNING: Cannot find a usable tclConfig.sh file.  Use
             --with-tcl=DIR to specify a directory where tclConfig.sh
             can be found.  SQLite does not use TCL internally, but TCL
@@ -551,9 +551,9 @@ proc sqlite-check-tcl {} {
       }
       msg-result "Using tclConfig.sh: $cfg"
     } elseif {!$optTcl} {
-      hwaci-warn "Unable to run tests because of --disable-tcl"
+      proj-warn "Unable to run tests because of --disable-tcl"
     } else {
-      hwaci-warn "Unable to run tests because no tclConfig.sh file could be located"
+      proj-warn "Unable to run tests because no tclConfig.sh file could be located"
     }
     break
   }
@@ -572,7 +572,7 @@ proc sqlite-check-tcl {} {
     if {![file-isexec $with_tclsh]} {
       set with_tclsh2 [get-define TCL_EXEC_PREFIX]/bin/tclsh
       if {![file-isexec $with_tclsh2]} {
-        hwaci-warn "Cannot find a usable tclsh (tried: $with_tclsh $with_tclsh2)"
+        proj-warn "Cannot find a usable tclsh (tried: $with_tclsh $with_tclsh2)"
       } else {
         set with_tclsh $with_tclsh2
       }
@@ -592,7 +592,7 @@ proc sqlite-check-tcl {} {
           }
         }
       } else {
-        hwaci-warn "Cannot determine TCLLIBDIR"
+        proj-warn "Cannot determine TCLLIBDIR"
       }
     }
     set tclrpath ""
@@ -609,7 +609,7 @@ proc sqlite-check-tcl {} {
     }
     define TCLLIBDIR $tcllibdir
     define TCLLIB_RPATH $tclrpath
-    #hwaci-fatal "TCLLIB_RPATH = [get-define TCLLIB_RPATH]"
+    #proj-fatal "TCLLIB_RPATH = [get-define TCLLIB_RPATH]"
   } else {
     define TCLLIBDIR ""
     define TCLLIB_RPATH ""
@@ -619,7 +619,7 @@ proc sqlite-check-tcl {} {
     msg-result "Using tclsh: $with_tclsh"
     define HAVE_TCL 1
   } else {
-    hwaci-warn "Cannot find a usable tclsh, so cannot run tests."
+    proj-warn "Cannot find a usable tclsh, so cannot run tests."
   }
 }; # sqlite-check-tcl
 
@@ -670,7 +670,7 @@ if {"jimsh" ne $cgtcl} {
     }
     set cgtcl [get-define TCLSH_CMD]
     if {![file exists $cgtcl]} {
-      hwaci-fatal "Cannot find a tclsh to use for code generation."
+      proj-fatal "Cannot find a tclsh to use for code generation."
     }
     define BTCLSH "\$(TCLSH_CMD)"
   }
@@ -685,11 +685,11 @@ unset cgtcl
 ########################################################################
 # Thread safety?
 msg-checking "Support threadsafe operation? "
-hwaci-if-opt-truthy threadsafe {
+proj-if-opt-truthy threadsafe {
   msg-result yes
   sqlite-add-feature-flag -DSQLITE_THREADSAFE=1
-  if {![hwaci-check-function-in-lib pthread_create pthread]
-      || ![hwaci-check-function-in-lib pthread_mutexattr_init pthread]} {
+  if {![proj-check-function-in-lib pthread_create pthread]
+      || ![proj-check-function-in-lib pthread_mutexattr_init pthread]} {
     user-error "Missing required pthread bits"
   }
   define LDFLAGS_PTHREAD [get-define lib_pthread_create]
@@ -752,11 +752,11 @@ proc sqlite-check-line-editing {} {
     # Use linenoise...
     set dirLn $check
     if {![file isdir $dirLn]} {
-      hwaci-fatal "--with-linenoise value is not a directory"
+      proj-fatal "--with-linenoise value is not a directory"
     } elseif {![file exists $dirLn/linenoise.c] } {
-      hwaci-fatal "Cannot find linenoise.c in $dirLn"
+      proj-fatal "Cannot find linenoise.c in $dirLn"
     } elseif {![file exists $dirLn/linenoise.h] } {
-      hwaci-fatal "Cannot find linenoise.h in $dirLn"
+      proj-fatal "Cannot find linenoise.h in $dirLn"
     }
     msg-result "Using linenoise from $dirLn"
     define CFLAGS_READLINE "-I$dirLn $dirLn/linenoise.c"
@@ -781,7 +781,7 @@ proc sqlite-check-line-editing {} {
     # --enable-editline to do exactly that but it seems likely to
     # break on systems for which which HAVE_EDITLINE=1 previously
     # worked.
-    hwaci-indented-notice -error {
+    proj-indented-notice -error {
       ERROR: the --enable-editline flag is not supported due to
       non-availability of systems which have it in a form which the
       sqlite3 CLI shell expects to see. On some systems this can be
@@ -798,10 +798,10 @@ proc sqlite-check-line-editing {} {
 
   # Transform with-readline-header=X to with-readline-cflags=-I...
   set v [opt-val with-readline-header]
-  hwaci-opt-set with-readline-header ""
+  proj-opt-set with-readline-header ""
   if {"" ne $v} {
     if {"auto" eq $v} {
-      hwaci-opt-set with-readline-cflags auto
+      proj-opt-set with-readline-cflags auto
     } else {
       set v [file dirname $v]
       if {[string match */*line $v]} {
@@ -812,7 +812,7 @@ proc sqlite-check-line-editing {} {
         # work!
         set v [file dirname $v]
       }
-      hwaci-opt-set with-readline-cflags "-I$v"
+      proj-opt-set with-readline-cflags "-I$v"
     }
   }
 
@@ -822,7 +822,7 @@ proc sqlite-check-line-editing {} {
     set rlInc ""
     if {!$::cross_compiling} {
       # ^^^ this check is derived from the legacy configure script
-      set rlInc [hwaci-search-for-header-dir readline.h \
+      set rlInc [proj-search-for-header-dir readline.h \
                  -dirs {/usr /usr/local /usr/local/readline /usr/contrib /mingw} \
                  -subdirs {include/readline include}]
       # ^^^ The -dirs and -subdirs lists are from the legacy configure script
@@ -843,14 +843,14 @@ proc sqlite-check-line-editing {} {
     if {"" eq $rlLib || "auto" eq $rlLib} {
       set rlLib ""
       set libTerm ""
-      if {[hwaci-check-function-in-lib tgetent {readline ncurses curses termcap}]} {
+      if {[proj-check-function-in-lib tgetent {readline ncurses curses termcap}]} {
         # ^^^ that libs list comes from the legacy configure script ^^^
         set libTerm [get-define lib_tgetent]
         undefine lib_tgetent
       }
       if {"readline" eq $libTerm} {
         set rlLib $libTerm
-      } elseif {[hwaci-check-function-in-lib readline readline $libTerm]} {
+      } elseif {[proj-check-function-in-lib readline readline $libTerm]} {
         set rlLib [get-define lib_readline]
         lappend rlLib $libTerm
         undefine lib_readline
@@ -904,7 +904,7 @@ proc sqlite-check-line-editing {} {
       user-notice "Readline completion enabled"
     } else {
       user-notice "WARNING: readline completion disabled due to rl_completion_matches() signature mismatch"
-      add-shell-opt -DSQLITE_OMIT_READLINE_COMPLETION
+      sqlite-add-shell-opt -DSQLITE_OMIT_READLINE_COMPLETION
     }
     return "readline"
   }
@@ -913,8 +913,8 @@ proc sqlite-check-line-editing {} {
 }; # sqlite-check-line-editing
 msg-result "Line-editing support for the sqlite3 shell: [sqlite-check-line-editing]"
 
-hwaci-if-opt-truthy load-extension {
-  if {[hwaci-check-function-in-lib dlopen dl]} {
+proj-if-opt-truthy load-extension {
+  if {[proj-check-function-in-lib dlopen dl]} {
     define LDFLAGS_DLOPEN [get-define lib_dlopen]
     undefine lib_dlopen
   } else {
@@ -926,8 +926,8 @@ hwaci-if-opt-truthy load-extension {
   msg-result "Disabling loadable extensions."
 }
 
-hwaci-if-opt-truthy math {
-  if {![hwaci-check-function-in-lib ceil m]} {
+proj-if-opt-truthy math {
+  if {![proj-check-function-in-lib ceil m]} {
     user-error "Cannot find libm functions. Use --disable-math to bypass this."
   }
   define LDFLAGS_MATH [get-define lib_ceil]
@@ -945,9 +945,9 @@ define cross_compiling ${cross_compiling}
 # Emscripten SDK for building the web-based wasm components.
 #
 set emccsh $srcdir/tool/emcc.sh
-if {![get-define HAVE_WASI_SDK] && [hwaci-check-emsdk]} {
+if {![get-define HAVE_WASI_SDK] && [proj-check-emsdk]} {
   define EMCC_WRAPPER $emccsh
-  hwaci-make-from-dot-in $emccsh
+  proj-make-from-dot-in $emccsh
   catch {exec chmod u+x $emccsh}
 } else {
   define EMCC_WRAPPER ""
@@ -977,25 +977,25 @@ proc sqlite-check-icu {} {
   # - -licui18n -licuuc -licudata
   # - -licui18n -licuuc
   # - /usr/local/bin/icu-config --ldflags
-  if {[hwaci-opt-was-provided with-icu-config]} {
+  if {[proj-opt-was-provided with-icu-config]} {
     set bin [opt-val with-icu-config]
     if {"auto" eq $bin} {
-      set bin [hwaci-first-bin-of \
+      set bin [proj-first-bin-of \
                  [get-define prefix]/bin/icu-config \
                  /usr/local/bin/icu-config \
                  /usr/bin/icu-config]
       if {"" eq $bin} {
-        hwaci-fatal "--with-icu-config=auto cannot find icu-config binary"
+        proj-fatal "--with-icu-config=auto cannot find icu-config binary"
       }
     }
     if {[file-isexec $bin]} {
       set x [exec $bin --ldflags]
       if {"" eq $x} {
-        hwaci-fatal "$bin --ldflags returned no data"
+        proj-fatal "$bin --ldflags returned no data"
       }
       define-append LDFLAGS_ICU $x
     } else {
-      hwaci-fatal "--with-icu-config=$bin does not refer to an executable"
+      proj-fatal "--with-icu-config=$bin does not refer to an executable"
     }
   }
   set flags [define LDFLAGS_ICU [string trim [get-define LDFLAGS_ICU]]]
@@ -1008,7 +1008,7 @@ proc sqlite-check-icu {} {
       # Recall that shell.c builds with sqlite3.c
     }
   } elseif {[opt-bool icu-collations]} {
-    hwaci-warn "ignoring --enable-icu-collations because neither --with-icu-ldflags nor --with-icu-config provided any linker flags"
+    proj-warn "ignoring --enable-icu-collations because neither --with-icu-ldflags nor --with-icu-config provided any linker flags"
   } else {
     msg-result "ICU support is disabled."
   }
@@ -1022,7 +1022,7 @@ sqlite-check-icu
 # required linker flags (which may be empty even if the math APIs are
 # found, depending on the OS).
 proc affirm-have-math {why} {
-  if {![msg-quiet hwaci-check-function-in-lib log m]} {
+  if {![msg-quiet proj-check-function-in-lib log m]} {
     user-error "Missing math APIs for $why"
   }
   define LDFLAGS_MATH [get-define lib_log ""]
@@ -1034,29 +1034,29 @@ proc affirm-have-math {why} {
 msg-result "Feature flags..."
 foreach {boolFlag featureFlag ifSetEvalThis} {
   all         {} {
-    hwaci-opt-set fts4
-    hwaci-opt-set fts5
-    hwaci-opt-set geopoly
-    hwaci-opt-set rtree
-    hwaci-opt-set session
+    proj-opt-set fts4
+    proj-opt-set fts5
+    proj-opt-set geopoly
+    proj-opt-set rtree
+    proj-opt-set session
   }
   fts4         -DSQLITE_ENABLE_FTS4    {affirm-have-math fts4}
   fts5         -DSQLITE_ENABLE_FTS5    {affirm-have-math fts5}
-  geopoly      -DSQLITE_ENABLE_GEOPOLY {hwaci-opt-set rtree}
+  geopoly      -DSQLITE_ENABLE_GEOPOLY {proj-opt-set rtree}
   rtree        -DSQLITE_ENABLE_RTREE   {}
   session      {-DSQLITE_ENABLE_SESSION -DSQLITE_ENABLE_PREUPDATE_HOOK} {}
   update-limit -DSQLITE_ENABLE_UPDATE_DELETE_LIMIT {}
   memsys5      -DSQLITE_ENABLE_MEMSYS5 {}
   memsys3      {} {
     if {[opt-bool memsys5]} {
-      hwaci-warn "not enabling memsys3 because memsys5 is enabled."
+      proj-warn "not enabling memsys3 because memsys5 is enabled."
       expr 0
     } else {
       sqlite-add-feature-flag -DSQLITE_ENABLE_MEMSYS3
     }
   }
 } {
-  hwaci-if-opt-truthy $boolFlag {
+  proj-if-opt-truthy $boolFlag {
     sqlite-add-feature-flag $featureFlag
     if {0 != [eval $ifSetEvalThis] && "all" ne $boolFlag} {
       msg-result "  + $boolFlag"
@@ -1076,7 +1076,7 @@ foreach {boolFlag featureFlag ifSetEvalThis} {
 foreach {boolFlag featureFlag} {
   json        -DSQLITE_OMIT_JSON
 } {
-  if {[hwaci-opt-truthy $boolFlag]} {
+  if {[proj-opt-truthy $boolFlag]} {
     msg-result "  + $boolFlag"
   } else {
     sqlite-add-feature-flag $featureFlag
@@ -1123,10 +1123,10 @@ if {0 && "" ne [get-define CFLAGS_JIMSH]} {
 #
 # Potential TODO (unclear): in sqlite3.pc.in, do we need to include
 # any CFLAGS_READLINE, CFLAGS_ZLIB, etc in its "Cflags:" section?
-hwaci-make-from-dot-in -touch Makefile sqlite3.pc
+proj-make-from-dot-in -touch Makefile sqlite3.pc
 if {0} {
   # Requires a hand-written sqlite_cfg.h.in...
-  hwaci-make-from-dot-in sqlite_cfg.h
+  proj-make-from-dot-in sqlite_cfg.h
   # vs...
 } else {
   # Requires no input template...
@@ -1136,9 +1136,9 @@ if {0} {
       TARGET_* USE_GCOV TCL_*} \
     -auto {HAVE_* PACKAGE_*} \
     -none *
-  hwaci-touch sqlite_cfg.h ; # help avoid frequent unnecessary @SQLITE_AUTORECONFIG@
+  proj-touch sqlite_cfg.h ; # help avoid frequent unnecessary @SQLITE_AUTORECONFIG@
 }
-#TODO hwaci-make-from-dot-in ext/wasm/GNUmakefile
+#TODO proj-make-from-dot-in ext/wasm/GNUmakefile
 
 if {"" ne $DUMP_DEFINES_JSON} {
   ########################################################################
@@ -1154,18 +1154,18 @@ if {"" ne $DUMP_DEFINES_JSON} {
     -auto {OPT_* PACKAGE_* HAVE_*}
   }
   if {[opt-bool defines-json-include-lowercase]} {
-    lappend dumpDefsOpt -none {lib_*} ; # remnants from hwaci-check-function-in-lib and friends
+    lappend dumpDefsOpt -none {lib_*} ; # remnants from proj-check-function-in-lib and friends
     lappend dumpDefsOpt -auto {[a-z]*}
   }
   lappend dumpDefsOpt -none *
-  hwaci-dump-defs-json $DUMP_DEFINES_JSON {*}$dumpDefsOpt
+  proj-dump-defs-json $DUMP_DEFINES_JSON {*}$dumpDefsOpt
   undefine OPT_FEATURE_FLAGS.list
   undefine OPT_SHELL.list
 }
 
 ########################################################################
 # Some build-dev/debug-only output
-hwaci-if-opt-truthy dump-defines {
+proj-if-opt-truthy dump-defines {
   msg-result "--dump-defines is creating $::DUMP_DEFINES_TXT"
   make-config-header $::DUMP_DEFINES_TXT \
     -bare {SQLITE_OS* SQLITE_DEBUG USE_*} \
@@ -1180,4 +1180,4 @@ hwaci-if-opt-truthy dump-defines {
   }
 }
 
-msg-result [hwaci-bold "Source tree is configured! Run make to build it."]
+msg-result [proj-bold "Source tree is configured! Run make to build it."]
similarity index 86%
rename from autosetup/hwaci-common.tcl
rename to autosetup/proj.tcl
index 4168b874605eee78c5777136b1f6ad1bd846f9bc..5fdf94d2d253d180dde5f036509689afb89f4464 100644 (file)
 ########################################################################
 
 ########################################################################
-# $hwaci_ is an internal-use-only array for storing whatever generic
+# $proj_ is an internal-use-only array for storing whatever generic
 # internal stuff we need stored.
-array set hwaci_ {}
-set hwaci_(isatty) [isatty? stdout]
+array set proj_ {}
+set proj_(isatty) [isatty? stdout]
 
-proc hwaci-warn {msg} {
+proc proj-warn {msg} {
   puts stderr "WARNING: $msg"
 }
-proc hwaci-fatal {msg} {
+proc proj-fatal {msg} {
   show-notices
   puts stderr "ERROR: $msg"
   exit 1
@@ -63,8 +63,8 @@ proc hwaci-fatal {msg} {
 # If this function believes that the current console might support
 # ANSI escape sequences then this returns $str wrapped in a sequence
 # to bold that text, else it returns $str as-is.
-proc hwaci-bold {str} {
-  if {$::autosetup(iswin) || !$::hwaci_(isatty)} {
+proc proj-bold {str} {
+  if {$::autosetup(iswin) || !$::proj_(isatty)} {
     return $str
   }
   return "\033\[1m${str}\033\[0m"
@@ -78,7 +78,7 @@ proc hwaci-bold {str} {
 #
 # If its first argument is -error then it renders the message
 # immediately and then exits.
-proc hwaci-indented-notice {args} {
+proc proj-indented-notice {args} {
   set fErr ""
   switch -exact -- [lindex $args 0] {
     -error     { set args [lassign $args fErr] }
@@ -95,16 +95,16 @@ proc hwaci-indented-notice {args} {
 
 ########################################################################
 # Returns 1 if cross-compiling, else 0.
-proc hwaci-is-cross-compiling {} {
+proc proj-is-cross-compiling {} {
   return [expr {[get-define host] ne [get-define build]}]
 }
 
 ########################################################################
-# hwaci-lshift_ shifts $count elements from the list named $listVar
+# proj-lshift_ shifts $count elements from the list named $listVar
 # and returns them as a new list. On empty input, returns "".
 #
 # Modified slightly from: https://wiki.tcl-lang.org/page/lshift
-proc hwaci-lshift_ {listVar {count 1}} {
+proc proj-lshift_ {listVar {count 1}} {
   upvar 1 $listVar l
   if {![info exists l]} {
     # make the error message show the real variable name
@@ -124,7 +124,7 @@ proc hwaci-lshift_ {listVar {count 1}} {
 # out any lines which begin with an number of whitespace followed by a
 # '#', and returns a value containing the [append]ed results of each
 # remaining line with a \n between each.
-proc hwaci-strip-hash-comments_ {val} {
+proc proj-strip-hash-comments_ {val} {
   set x {}
   foreach line [split $val \n] {
     if {![string match "#*" [string trimleft $line]]} {
@@ -138,7 +138,7 @@ proc hwaci-strip-hash-comments_ {val} {
 # A proxy for cc-check-function-in-lib which "undoes" any changes that
 # routine makes to the LIBS define. Returns the result of
 # cc-check-function-in-lib.
-proc hwaci-check-function-in-lib {function libs {otherlibs {}}} {
+proc proj-check-function-in-lib {function libs {otherlibs {}}} {
   set found 0
   define-push {LIBS} {
     set found [cc-check-function-in-lib $function $libs $otherlibs]
@@ -151,11 +151,11 @@ proc hwaci-check-function-in-lib {function libs {otherlibs {}}} {
 # by the -dirs {LIST} and -subdirs {LIST} flags (each of which have
 # sane defaults). Returns either the first matching dir or an empty
 # string.  The return value does not contain the filename part.
-proc hwaci-search-for-header-dir {header args} {
+proc proj-search-for-header-dir {header args} {
   set subdirs {include}
   set dirs {/usr /usr/local /mingw}
 # Debatable:
-#  if {![hwaci-is-cross-compiling]} {
+#  if {![proj-is-cross-compiling]} {
 #    lappend dirs [get-define prefix]
 #  }
   while {[llength $args]} {
@@ -163,7 +163,7 @@ proc hwaci-search-for-header-dir {header args} {
       -dirs     { set args [lassign $args - dirs] }
       -subdirs  { set args [lassign $args - subdirs] }
       default   {
-        hwaci-fatal "Unhandled argument: $args"
+        proj-fatal "Unhandled argument: $args"
       }
     }
   }
@@ -179,21 +179,21 @@ proc hwaci-search-for-header-dir {header args} {
 
 ########################################################################
 # If $v is true, [puts $msg] is called, else puts is not called.
-#proc hwaci-maybe-verbose {v msg} {
+#proc proj-maybe-verbose {v msg} {
 #  if {$v} {
 #    puts $msg
 #  }
 #}
 
 ########################################################################
-# Usage: hwaci-find-executable-path ?-v? binaryName
+# Usage: proj-find-executable-path ?-v? binaryName
 #
 # Works similarly to autosetup's [find-executable-path $binName] but:
 #
 # - If the first arg is -v, it's verbose about searching, else it's quiet.
 #
 # Returns the full path to the result or an empty string.
-proc hwaci-find-executable-path {args} {
+proc proj-find-executable-path {args} {
   set binName $args
   set verbose 0
   if {[lindex $args 0] eq "-v"} {
@@ -213,15 +213,15 @@ proc hwaci-find-executable-path {args} {
 }
 
 ########################################################################
-# Uses [hwaci-find-executable-path $binName] to (verbosely) search for
+# Uses [proj-find-executable-path $binName] to (verbosely) search for
 # a binary, sets a define (see below) to the result, and returns the
 # result (an empty string if not found).
 #
 # The define'd name is: if defName is empty then "BIN_X" is used,
 # where X is the upper-case form of $binName with any '-' characters
 # replaced with '_'.
-proc hwaci-bin-define {binName {defName {}}} {
-  set check [hwaci-find-executable-path -v $binName]
+proc proj-bin-define {binName {defName {}}} {
+  set check [proj-find-executable-path -v $binName]
   if {"" eq $defName} {
     set defName "BIN_[string toupper [string map {- _} $binName]]"
   }
@@ -230,7 +230,7 @@ proc hwaci-bin-define {binName {defName {}}} {
 }
 
 ########################################################################
-# Usage: hwaci-first-bin-of bin...
+# Usage: proj-first-bin-of bin...
 #
 # Looks for the first binary found of the names passed to this
 # function.  If a match is found, the full path to that binary is
@@ -240,7 +240,7 @@ proc hwaci-bin-define {binName {defName {}}} {
 # 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).
-proc hwaci-first-bin-of {args} {
+proc proj-first-bin-of {args} {
   foreach b $args {
     if {[cc-path-progs $b]} {
       set u [string toupper $b]
@@ -258,8 +258,8 @@ proc hwaci-first-bin-of {args} {
 #
 # TODO: move this out of this file and back into the 1 or 2 downstream
 # trees which use it.
-proc hwaci-require-bash {} {
-  set bash [hwaci-bin-define bash]
+proc proj-require-bash {} {
+  set bash [proj-bin-define bash]
   if {"" eq $bash} {
     user-error "Cannot find required bash shell"
   }
@@ -281,7 +281,7 @@ proc hwaci-require-bash {} {
 # passes --foo-bar to configure, even if that invocation would resolve
 # to the default value of baz. If the user does not explicitly pass in
 # --foo-bar (with or without a value) then this returns 0.
-proc hwaci-opt-was-provided {key} {
+proc proj-opt-was-provided {key} {
   dict exists $::autosetup(optset) $key
 }
 
@@ -290,7 +290,7 @@ proc hwaci-opt-was-provided {key} {
 # later with [opt-val], [opt-bool], and friends.
 #
 # Returns $val.
-proc hwaci-opt-set {flag {val 1}} {
+proc proj-opt-set {flag {val 1}} {
   global autosetup
   if {$flag ni $::autosetup(options)} {
     # We have to add this to autosetup(options) or else future calls
@@ -304,15 +304,15 @@ proc hwaci-opt-set {flag {val 1}} {
 ########################################################################
 # Returns 1 if $val appears to be a truthy value, else returns
 # 0. Truthy values are any of {1 on enabled yes}
-proc hwaci-val-truthy {val} {
+proc proj-val-truthy {val} {
   expr {$val in {1 on enabled yes}}
 }
 
 ########################################################################
 # Returns 1 if [opt-val $flag] appears to be a truthy value or
-# [opt-bool $flag] is true. See hwaci-val-truthy.
-proc hwaci-opt-truthy {flag} {
-  if {[hwaci-val-truthy [opt-val $flag]]} { return 1 }
+# [opt-bool $flag] is true. See proj-val-truthy.
+proc proj-opt-truthy {flag} {
+  if {[proj-val-truthy [opt-val $flag]]} { return 1 }
   set rc 0
   catch {
     # opt-bool will throw if $flag is not a known boolean flag
@@ -322,9 +322,9 @@ proc hwaci-opt-truthy {flag} {
 }
 
 ########################################################################
-# If [hwaci-opt-truthy $flag] is true, eval $then, else eval $else.
-proc hwaci-if-opt-truthy {boolFlag thenScript {elseScript {}}} {
-  if {[hwaci-opt-truthy $boolFlag]} {
+# If [proj-opt-truthy $flag] is true, eval $then, else eval $else.
+proc proj-if-opt-truthy {boolFlag thenScript {elseScript {}}} {
+  if {[proj-opt-truthy $boolFlag]} {
     uplevel 1 $thenScript
   } else {
     uplevel 1 $elseScript
@@ -332,23 +332,23 @@ proc hwaci-if-opt-truthy {boolFlag thenScript {elseScript {}}} {
 }
 
 ########################################################################
-# If [hwaci-opt-truthy $flag] then [define $def $iftrue] else [define
+# If [proj-opt-truthy $flag] then [define $def $iftrue] else [define
 # $def $iffalse]. If $msg is not empty, output [msg-checking $msg] and
 # a [msg-results ...] which corresponds to the result. Returns 1 if
 # the opt-truthy check passes, else 0.
-proc hwaci-define-if-opt-truthy {flag def {msg ""} {iftrue 1} {iffalse 0}} {
+proc proj-define-if-opt-truthy {flag def {msg ""} {iftrue 1} {iffalse 0}} {
   if {"" ne $msg} {
     msg-checking "$msg "
   }
   set rcMsg ""
   set rc 0
-  if {[hwaci-opt-truthy $flag]} {
+  if {[proj-opt-truthy $flag]} {
     define $def $iftrue
     set rc 1
   } else {
     define $def $iffalse
   }
-  switch -- [hwaci-val-truthy [get-define $def]] {
+  switch -- [proj-val-truthy [get-define $def]] {
     0 { set rcMsg no }
     1 { set rcMsg yes }
   }
@@ -361,28 +361,28 @@ proc hwaci-define-if-opt-truthy {flag def {msg ""} {iftrue 1} {iffalse 0}} {
 ########################################################################
 # Args: [-v] optName defName {descr {}}
 #
-# Checks [hwaci-opt-truthy $optName] and calls [define $defName X]
+# Checks [proj-opt-truthy $optName] and calls [define $defName X]
 # where X is 0 for false and 1 for true. descr is an optional
 # [msg-checking] argument which defaults to $defName. Returns X.
 #
 # If args[0] is -v then the boolean semantics are inverted: if
 # the option is set, it gets define'd to 0, else 1. Returns the
 # define'd value.
-proc hwaci-opt-define-bool {args} {
+proc proj-opt-define-bool {args} {
   set invert 0
   if {[lindex $args 0] eq "-v"} {
     set invert 1
     set args [lrange $args 1 end]
   }
-  set optName [hwaci-lshift_ args]
-  set defName [hwaci-lshift_ args]
-  set descr [hwaci-lshift_ args]
+  set optName [proj-lshift_ args]
+  set defName [proj-lshift_ args]
+  set descr [proj-lshift_ args]
   if {"" eq $descr} {
     set descr $defName
   }
   set rc 0
   msg-checking "$descr ... "
-  if {[hwaci-opt-truthy $optName]} {
+  if {[proj-opt-truthy $optName]} {
     if {0 eq $invert} {
       set rc 1
     } else {
@@ -414,7 +414,7 @@ proc hwaci-opt-define-bool {args} {
 #
 # Note that if it finds LIBLTDL it does not look for LIBDL, so will
 # report only that is has LIBLTDL.
-proc hwaci-check-module-loader {} {
+proc proj-check-module-loader {} {
   msg-checking "Looking for module-loader APIs... "
   if {99 ne [get-define LDFLAGS_MODULE_LOADER 99]} {
     if {1 eq [get-define HAVE_LIBLTDL 0]} {
@@ -460,11 +460,11 @@ proc hwaci-check-module-loader {} {
 }
 
 ########################################################################
-# Sets all flags which would be set by hwaci-check-module-loader to
+# Sets all flags which would be set by proj-check-module-loader to
 # empty/falsy values, as if those checks had failed to find a module
 # loader. Intended to be called in place of that function when
 # a module loader is explicitly not desired.
-proc hwaci-no-check-module-loader {} {
+proc proj-no-check-module-loader {} {
   define HAVE_LIBDL 0
   define HAVE_LIBLTDL 0
   define LDFLAGS_MODULE_LOADER ""
@@ -472,7 +472,7 @@ proc hwaci-no-check-module-loader {} {
 
 ########################################################################
 # Opens the given file, reads all of its content, and returns it.
-proc hwaci-file-content {fname} {
+proc proj-file-content {fname} {
   set fp [open $fname r]
   set rc [read $fp]
   close $fp
@@ -482,7 +482,7 @@ proc hwaci-file-content {fname} {
 ########################################################################
 # Returns the contents of the given file as an array of lines, with
 # the EOL stripped from each input line.
-proc hwaci-file-content-list {fname} {
+proc proj-file-content-list {fname} {
   set fp [open $fname r]
   set rc {}
   while { [gets $fp line] >= 0 } {
@@ -501,9 +501,9 @@ proc hwaci-file-content-list {fname} {
 #
 # This test has a long history of false positive results because of
 # compilers reacting differently to the -MJ flag.
-proc hwaci-check-compile-commands {{configOpt {}}} {
+proc proj-check-compile-commands {{configOpt {}}} {
   msg-checking "compile_commands.json support... "
-  if {"" ne $configOpt && ![hwaci-opt-truthy $configOpt]} {
+  if {"" ne $configOpt && ![proj-opt-truthy $configOpt]} {
     msg-result "explicitly disabled"
     define MAKE_COMPILATION_DB no
     return 0
@@ -525,14 +525,14 @@ proc hwaci-check-compile-commands {{configOpt {}}} {
 
 ########################################################################
 # Runs the 'touch' command on one or more files, ignoring any errors.
-proc hwaci-touch {filename} {
+proc proj-touch {filename} {
   catch { exec touch {*}$filename }
 }
 
 ########################################################################
 # Usage:
 #
-#   hwaci-make-from-dot-in ?-touch? filename(s)...
+#   proj-make-from-dot-in ?-touch? filename(s)...
 #
 # Uses [make-template] to create makefile(-like) file(s) $filename
 # from $filename.in but explicitly makes the output read-only, to
@@ -545,7 +545,7 @@ proc hwaci-touch {filename} {
 # please the build process.
 #
 # Failures when running chmod or touch are silently ignored.
-proc hwaci-make-from-dot-in {args} {
+proc proj-make-from-dot-in {args} {
   set filename $args
   set touch 0
   if {[lindex $args 0] eq "-touch"} {
@@ -557,7 +557,7 @@ proc hwaci-make-from-dot-in {args} {
     catch { exec chmod u+w $f }
     make-template $f.in $f
     if {$touch} {
-      hwaci-touch $f
+      proj-touch $f
     }
     catch { exec chmod -w $f }
   }
@@ -574,9 +574,9 @@ proc hwaci-make-from-dot-in {args} {
 # order to avoid potential problems with escaping, space-containing
 # tokens, and interfering with autosetup's use of these vars, this
 # routine does not directly modify CFLAGS or LDFLAGS.
-proc hwaci-check-profile-flag {{flagname profile}} {
-  #puts "flagname=$flagname ?[hwaci-opt-truthy $flagname]?"
-  if {[hwaci-opt-truthy $flagname]} {
+proc proj-check-profile-flag {{flagname profile}} {
+  #puts "flagname=$flagname ?[proj-opt-truthy $flagname]?"
+  if {[proj-opt-truthy $flagname]} {
     set CC [get-define CC]
     regsub {.*ccache *} $CC "" CC
     # ^^^ if CC="ccache gcc" then [exec] treats "ccache gcc" as a
@@ -602,7 +602,7 @@ proc hwaci-check-profile-flag {{flagname profile}} {
 # machine, i.e. the local host). If $key == "build" then some
 # additional checks may be performed which are not applicable when
 # $key == "host".
-proc hwaci-looks-like-windows {{key host}} {
+proc proj-looks-like-windows {{key host}} {
   global autosetup
   switch -glob -- [get-define $key] {
     *-*-ming* - *-*-cygwin - *-*-msys {
@@ -628,7 +628,7 @@ proc hwaci-looks-like-windows {{key host}} {
 #
 # TODO: have someone verify whether this is correct for the
 # non-Linux/BSD platforms.
-proc hwaci-looks-like-mac {{key host}} {
+proc proj-looks-like-mac {{key host}} {
   switch -glob -- [get-define $key] {
     *apple* {
       return 1
@@ -645,13 +645,13 @@ proc hwaci-looks-like-mac {{key host}} {
 # build environment is then BUILD_EXEEXT is [define]'d to ".exe", else
 # "". If the target, a.k.a. "host", is then TARGET_EXEEXT is
 # [define]'d to ".exe", else "".
-proc hwaci-exe-extension {} {
+proc proj-exe-extension {} {
   set rH ""
   set rB ""
-  if {[hwaci-looks-like-windows host]} {
+  if {[proj-looks-like-windows host]} {
     set rH ".exe"
   }
-  if {[hwaci-looks-like-windows build]} {
+  if {[proj-looks-like-windows build]} {
     set rB ".exe"
   }
   define BUILD_EXEEXT $rB
@@ -659,7 +659,7 @@ proc hwaci-exe-extension {} {
 }
 
 ########################################################################
-# Works like hwaci-exe-extension except that it defines BUILD_DLLEXT
+# Works like proj-exe-extension except that it defines BUILD_DLLEXT
 # and TARGET_DLLEXT to one of (.so, ,dll, .dylib).
 #
 # Trivia: for .dylib files, the linker needs the -dynamiclib flag
@@ -667,7 +667,7 @@ proc hwaci-exe-extension {} {
 #
 # TODO: have someone verify whether this is correct for the
 # non-Linux/BSD platforms.
-proc hwaci-dll-extension {} {
+proc proj-dll-extension {} {
   proc inner {key} {
     switch -glob -- [get-define $key] {
       *apple* {
@@ -686,10 +686,10 @@ proc hwaci-dll-extension {} {
 }
 
 ########################################################################
-# Static-library counterpart of hwaci-dll-extension. Defines
+# Static-library counterpart of proj-dll-extension. Defines
 # BUILD_LIBEXT and TARGET_LIBEXT to the conventional static library
 # extension for the being-built-on resp. the target platform.
-proc hwaci-lib-extension {} {
+proc proj-lib-extension {} {
   proc inner {key} {
     switch -glob -- [get-define $key] {
       *-*-ming* - *-*-cygwin - *-*-msys {
@@ -705,11 +705,11 @@ proc hwaci-lib-extension {} {
 }
 
 ########################################################################
-# Calls all of the hwaci-*-extension functions.
-proc hwaci-file-extensions {} {
-  hwaci-exe-extension
-  hwaci-dll-extension
-  hwaci-lib-extension
+# Calls all of the proj-*-extension functions.
+proc proj-file-extensions {} {
+  proj-exe-extension
+  proj-dll-extension
+  proj-lib-extension
 }
 
 ########################################################################
@@ -717,7 +717,7 @@ proc hwaci-file-extensions {} {
 # the filesystem, it fails fatally with an informative message.
 # Returns the last file name it checks. If the first argument is -v
 # then it emits msg-checking/msg-result messages for each file.
-proc hwaci-affirm-files-exist {args} {
+proc proj-affirm-files-exist {args} {
   set rc ""
   set verbose 0
   if {[lindex $args 0] eq "-v"} {
@@ -753,7 +753,7 @@ proc hwaci-affirm-files-exist {args} {
 # but BIN_EMCC is then emcc was not found in the EMSDK_HOME, in which
 # case we have to rely on the fact that sourcing $EMSDK_ENV from a
 # shell will add emcc to the $PATH.
-proc hwaci-check-emsdk {} {
+proc proj-check-emsdk {} {
   set emsdkHome [opt-val with-emsdk]
   define EMSDK_HOME ""
   define EMSDK_ENV ""
@@ -794,7 +794,7 @@ proc hwaci-check-emsdk {} {
 # Achtung: we have seen platforms which report that a given option
 # checked here will work but then fails at build-time, and the current
 # order of checks reflects that.
-proc hwaci-check-rpath {} {
+proc proj-check-rpath {} {
   set rc 1
   set lp "[get-define prefix]/lib"
   # If we _don't_ use cc-with {} here (to avoid updating the global
@@ -840,7 +840,7 @@ proc hwaci-check-rpath {} {
 #   <readline/readline.h>.
 #
 # Returns the value of HAVE_READLINE.
-proc hwaci-check-readline {} {
+proc proj-check-readline {} {
   define HAVE_READLINE 0
   define LDFLAGS_READLINE ""
   define CFLAGS_READLINE ""
@@ -875,9 +875,9 @@ proc hwaci-check-readline {} {
 
   # Look for readline.h
   set rlInc ""
-  if {![hwaci-is-cross-compiling]} {
+  if {![proj-is-cross-compiling]} {
     # ^^^ this check is derived from SQLite's legacy configure script
-    set rlInc [hwaci-search-for-header-dir readline.h \
+    set rlInc [proj-search-for-header-dir readline.h \
                  -subdirs {include/readline include}]
     if {"" ne $rlInc} {
       if {[string match */*line $rlInc]} {
@@ -896,14 +896,14 @@ proc hwaci-check-readline {} {
   set rlLib ""
   if {"" ne $rlInc} {
     set libTerm ""
-    if {[hwaci-check-function-in-lib tgetent {readline ncurses curses termcap}]} {
+    if {[proj-check-function-in-lib tgetent {readline ncurses curses termcap}]} {
       # ^^^ check extracted from an ancient autotools configure script.
       set libTerm [get-define lib_tgetent]
       undefine lib_tgetent
     }
     if {"readline" eq $libTerm} {
       set rlLib $libTerm
-    } elseif {[hwaci-check-function-in-lib readline readline $libTerm]} {
+    } elseif {[proj-check-function-in-lib readline readline $libTerm]} {
       set rlLib [get-define lib_readline]
       lappend rlLib $libTerm
       undefine lib_readline
@@ -925,12 +925,12 @@ proc hwaci-check-readline {} {
 
 
 ########################################################################
-# Internal helper for hwaci-dump-defs-json. Expects to be passed a
+# Internal helper for proj-dump-defs-json. Expects to be passed a
 # [define] name and the variadic $args which are passed to
-# hwaci-dump-defs-json. If it finds a pattern match for the given
+# proj-dump-defs-json. If it finds a pattern match for the given
 # $name in the various $args, it returns the type flag for that $name,
 # e.g. "-str" or "-bare", else returns an empty string.
-proc hwaci-defs-type_ {name spec} {
+proc proj-defs-type_ {name spec} {
   foreach {type patterns} $spec {
     foreach pattern $patterns {
       if {[string match $pattern $name]} {
@@ -942,50 +942,50 @@ proc hwaci-defs-type_ {name spec} {
 }
 
 ########################################################################
-# Internal helper for hwaci-defs-format_: returns a JSON-ish quoted
+# Internal helper for proj-defs-format_: returns a JSON-ish quoted
 # form of the given (JSON) string-type values.
-proc hwaci-quote-str_ {value} {
+proc proj-quote-str_ {value} {
   return \"[string map [list \\ \\\\ \" \\\"] $value]\"
 }
 
 ########################################################################
-# An internal impl detail of hwaci-dump-defs-json. Requires a data
+# An internal impl detail of proj-dump-defs-json. Requires a data
 # type specifier, as used by make-config-header, and a value. Returns
-# the formatted value or the value $::hwaci_(defs-skip) if the caller
+# the formatted value or the value $::proj_(defs-skip) if the caller
 # should skip emitting that value.
-set hwaci_(defs-skip) "-hwaci-defs-format_ sentinel"
-proc hwaci-defs-format_ {type value} {
+set proj_(defs-skip) "-proj-defs-format_ sentinel"
+proc proj-defs-format_ {type value} {
   switch -exact -- $type {
     -bare {
       # Just output the value unchanged
     }
     -none {
-      set value $::hwaci_(defs-skip)
+      set value $::proj_(defs-skip)
     }
     -str {
-      set value [hwaci-quote-str_ $value]
+      set value [proj-quote-str_ $value]
     }
     -auto {
       # Automatically determine the type
       if {![string is integer -strict $value]} {
-        set value [hwaci-quote-str_ $value]
+        set value [proj-quote-str_ $value]
       }
     }
     -array {
       set ar {}
       foreach v $value {
-        set v [hwaci-defs-format_ -auto $v]
-        if {$::hwaci_(defs-skip) ne $v} {
+        set v [proj-defs-format_ -auto $v]
+        if {$::proj_(defs-skip) ne $v} {
           lappend ar $v
         }
       }
       set value "\[ [join $ar {, }] \]"
     }
     "" {
-      set value $::hwaci_(defs-skip)
+      set value $::proj_(defs-skip)
     }
     default {
-      hwaci-fatal "Unknown type in hwaci-dump-defs-json: $type"
+      proj-fatal "Unknown type in proj-dump-defs-json: $type"
     }
   }
   return $value
@@ -1021,14 +1021,14 @@ proc hwaci-defs-format_ {type value} {
 # Neither is especially satisfactory (and the second is useless), and
 # handling of such values is subject to change if any such values ever
 # _really_ need to be processed by our source trees.
-proc hwaci-dump-defs-json {file args} {
+proc proj-dump-defs-json {file args} {
   file mkdir [file dirname $file]
   set lines {}
   lappend args -bare {SIZEOF_* HAVE_DECL_*} -auto HAVE_*
   foreach n [lsort [dict keys [all-defines]]] {
-    set type [hwaci-defs-type_ $n $args]
-    set value [hwaci-defs-format_ $type [get-define $n]]
-    if {$::hwaci_(defs-skip) ne $value} {
+    set type [proj-defs-type_ $n $args]
+    set value [proj-defs-format_ $type [get-define $n]]
+    if {$::proj_(defs-skip) ne $value} {
       lappend lines "\"$n\": ${value}"
     }
   }
@@ -1067,13 +1067,13 @@ proc hwaci-dump-defs-json {file args} {
 # to carry over any values from hidden aliases into their canonical
 # names, so that in the above example [opt-value canonical] will
 # return X if --alias=X is passed in.
-proc hwaci-xfer-options-aliases {mapping} {
-  foreach {hidden - canonical} [hwaci-strip-hash-comments_ $mapping] {
-    if {[hwaci-opt-was-provided $hidden]} {
-      if {[hwaci-opt-was-provided $canonical]} {
-        hwaci-fatal "both --$canonical and its alias --$hidden were used. Use only one or the other."
+proc proj-xfer-options-aliases {mapping} {
+  foreach {hidden - canonical} [proj-strip-hash-comments_ $mapping] {
+    if {[proj-opt-was-provided $hidden]} {
+      if {[proj-opt-was-provided $canonical]} {
+        proj-fatal "both --$canonical and its alias --$hidden were used. Use only one or the other."
       } else {
-        hwaci-opt-set $canonical [opt-val $hidden]
+        proj-opt-set $canonical [opt-val $hidden]
       }
     }
   }
@@ -1095,8 +1095,8 @@ proc hwaci-xfer-options-aliases {mapping} {
 # Sidebar: if we do this before the cc package is installed, it gets
 # reverted by that package. Ergo, the cc package init will tell the
 # user "Build C compiler...cc" shortly before we tell them:
-proc hwaci-redefine-cc-for-build {} {
-  if {![hwaci-is-cross-compiling]
+proc proj-redefine-cc-for-build {} {
+  if {![proj-is-cross-compiling]
      && "nope" eq [get-env CC_FOR_BUILD "nope"]
      && [get-define CC] ne [get-define CC_FOR_BUILD]} {
     user-notice "Re-defining CC_FOR_BUILD to CC=[get-define CC]. To avoid this, explicitly pass CC_FOR_BUILD=..."
index b4a42b176a07a5b65b889acf8bba51a145e61645..793262005ddccd8cbf4c152cd5bcf92770d05dfd 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Remove\sthe\slong-unused,\slegacy\svsixtest/\slogic\sfrom\sthe\ssource\stree.
-D 2024-10-28T13:16:32.455
+C Rename\sthe\s'hwaci'\sauto.def\sutility\sAPI\sto\sthe\smore\sgeneric\s'proj'\sAPI,\sper\s/chat\sdiscussion.\sFix\sa\sfunction\sname\stypo\swhich\scaused\sreadline\sdetection\sto\skill\sthe\sconfigure\sin\sone\scode\spath.
+D 2024-10-28T14:16:50.100
 F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
 F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
 F LICENSE.md b6e6c1baf38e4339bd3f1e0e5e5bfd0a9a93d133360691b2785c2d4b2f2dcec2
@@ -13,7 +13,7 @@ F art/icon-80x90.gif 65509ce3e5f86a9cd64fe7fca2d23954199f31fe44c1e09e208c80fb83d
 F art/sqlite370.eps aa97a671332b432a54e1d74ff5e8775be34200c2
 F art/sqlite370.ico af56c1d00fee7cd4753e8631ed60703ed0fc6e90
 F art/sqlite370.jpg d512473dae7e378a67e28ff96a34da7cb331def2
-F auto.def 57635a8f8c2e5e91e4c21094a70bbb56473811366e75679ceec9b6626e49a826
+F auto.def 537d9e3cd85ed5a454ee6055585a4eadedde921fbb686fcb40c8446933be2b5a
 F autoconf/INSTALL 83e4a25da9fd053c7b3665eaaaf7919707915903
 F autoconf/Makefile.am adedc1324b6a87fdd1265ddd336d2fb7d4f36a0e77b86ea553ae7cc4ea239347
 F autoconf/Makefile.fallback 22fe523eb36dfce31e0f6349f782eb084e86a5620b2b0b4f84a2d6133f53f5ac
@@ -47,9 +47,9 @@ F autosetup/cc-lib.tcl 493c5935b5dd3bf9bd4eca89b07c8b1b1a9356d61783035144e21795f
 F autosetup/cc-shared.tcl 4f024e94a47f427ba61de1739f6381ef0080210f9fae89112d5c1de1e5460d78
 F autosetup/cc.tcl 7e2fe943ae9d45cf39e9f5b05b6230df8e719415edea5af06c30eb68680bde14
 F autosetup/default.auto 5cdf016de2140e50f1db190a02039dc42fb390af1dda4cc4853e3042a9ef0e82
-F autosetup/hwaci-common.tcl 48c221838bca6e362b34c85c3dff2ba7f69efcec9558d3807c9b33b1d8c13c28
 F autosetup/jimsh0.c 27ea5f221359ef6c58780fc6c185aadbf8d3bee9a021331a3e5de0eba0dc6de6
 F autosetup/pkg-config.tcl 4e635bf39022ff65e0d5434339dd41503ea48fc53822c9c5bde88b02d3d952ba
+F autosetup/proj.tcl b01940e6b2e9c24f2c50f0e180d308a0a4f88d2e2b00c6902edd5980d221becf w autosetup/hwaci-common.tcl
 F autosetup/system.tcl 3a39d6e0b3bfba526fd39afe07c1d0d325e5a31925013a1ba7c671e1128e31bb
 F autosetup/tmake.auto eaebc74ad538dfdd3c817c27eefc31930c20510c4f3a3704071f6cb0629ed71f
 F autosetup/tmake.tcl a275793ec1b6f8708179af0acef1f6f10d46c2920739743f7a8720c6d700c7a9
@@ -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 f06122a543f7dac016c8da1cd92a629eb647142b95c85a131b9da8e0dc5516b0
-R 12ff824529fe88bfe6b4597dc4df53e3
-U drh
-Z 126f0766a209d0ba5b53f17fec16055d
+P 45ec9415b2b76a757e8bd25eed520dcc012ba67cbb3530ee8dcc42ac6125464a
+R 958d2a4928946501ff168cf6ab041f76
+U stephan
+Z a0759550cfa13ca8b9d7c93a198730e1
 # Remove this line to create a well-formed Fossil manifest.
index d64be41552d1b8756c313753bbb3bb47b4b4e87b..b92894ab5667f2a40de44f2f7acc27aca1b68957 100644 (file)
@@ -1 +1 @@
-45ec9415b2b76a757e8bd25eed520dcc012ba67cbb3530ee8dcc42ac6125464a
+e20610f06bfc6f4ebc5806da05c307d91e1f0a8c7a7501a7953273dbf1816fee