From: stephan Date: Fri, 28 Feb 2025 05:01:38 +0000 (+0000) Subject: Bring the autosetup-related bits up to par with trunk. X-Git-Tag: version-3.49.2~10 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f5d3e81effb73a443110234489e233ba2a0a2a23;p=thirdparty%2Fsqlite.git Bring the autosetup-related bits up to par with trunk. FossilOrigin-Name: 47fe1c59787ffbd1558f7663fd65976b57c2f7c91df8b578d504e980f3a12380 --- diff --git a/autosetup/autosetup b/autosetup/autosetup index 1479fca407..239987554f 100755 --- a/autosetup/autosetup +++ b/autosetup/autosetup @@ -1634,8 +1634,8 @@ proc automf_command_reference {} { if {[regexp {^#.*@section (.*)$} $line -> section]} { lappend doc($current) [list section $section] - continue - } + continue + } # Find embedded module names if {[regexp {^#.*@module ([^ ]*)} $line -> modulename]} { @@ -1651,7 +1651,7 @@ proc automf_command_reference {} { if {$cmd eq "synopsis:"} { set current $modulename lappend doc($current) [list section "Module: $modulename"] - } else { + } else { lappend doc($current) [list subsection $cmd] } @@ -2088,8 +2088,12 @@ if {$autosetup(iswin)} { proc split-path {} { split [getenv PATH .] : } + # Check for an executable file proc file-isexec {exec} { - file executable $exec + if {[file executable $exec] && [file isfile $exec]} { + return 1 + } + return 0 } } diff --git a/autosetup/autosetup-find-tclsh b/autosetup/autosetup-find-tclsh index 2b2006241c..9f6d6e9402 100755 --- a/autosetup/autosetup-find-tclsh +++ b/autosetup/autosetup-find-tclsh @@ -9,7 +9,7 @@ for tclsh in ./jimsh0 $autosetup_tclsh jimsh tclsh tclsh8.5 tclsh8.6 tclsh8.7; d done echo 1>&2 "No installed jimsh or tclsh, building local bootstrap jimsh0" for cc in ${CC_FOR_BUILD:-cc} gcc; do - { $cc -o jimsh0 "$d/jimsh0.c"; } >/dev/null 2>&1 || continue + { $cc -o jimsh0 "$d/jimsh0.c"; } 2>/dev/null >/dev/null || continue ./jimsh0 "$d/${1-autosetup-test-tclsh}" && exit 0 done echo 1>&2 "No working C compiler found. Tried ${CC_FOR_BUILD:-cc} and gcc." diff --git a/autosetup/sqlite-config.tcl b/autosetup/sqlite-config.tcl index 2b52a44e28..73a25256b9 100644 --- a/autosetup/sqlite-config.tcl +++ b/autosetup/sqlite-config.tcl @@ -12,19 +12,19 @@ if {[string first " " $autosetup(builddir)] != -1} { may not contain space characters" } -# The mixing of output and 'use' here is largely cosmetic, the intent -# being to put the most-frequently-useful info at the top. use proj +# We want this version info to be emitted up front, but we have to +# 'use system' for --prefix=... to work. Ergo, this bit is up here +# instead of in [sqlite-configure]. define PACKAGE_VERSION [proj-file-content -trim $::autosetup(srcdir)/VERSION] -msg-result "Configuring SQLite version [get-define PACKAGE_VERSION]" +if {"--help" ni $::argv} { + msg-result "Configuring SQLite version [get-define PACKAGE_VERSION]" +} use system ; # Will output "Host System" and "Build System" lines -msg-result "Source dir = $::autosetup(srcdir)" -msg-result "Build dir = $::autosetup(builddir)" -use cc cc-db cc-shared cc-lib pkg-config -define PACKAGE_NAME "sqlite" -define PACKAGE_URL {https://sqlite.org} -define PACKAGE_BUGREPORT [get-define PACKAGE_URL]/forum -define PACKAGE_STRING "[get-define PACKAGE_NAME] [get-define PACKAGE_VERSION]" +if {"--help" ni $::argv} { + msg-result "Source dir = $::autosetup(srcdir)" + msg-result "Build dir = $::autosetup(builddir)" +} # # Object for communicating config-time state across various @@ -345,12 +345,18 @@ proc sqlite-configure {buildMode configScript} { } } #lappend opts "soname:=duplicateEntry => {x}"; #just testing - if {[catch {options $opts} msg opts]} { + if {[catch {options $opts} msg xopts]} { # Workaround for # where [options] behaves oddly on _some_ TCL builds when it's # called from deeper than the global scope. - dict incr opts -level - return {*}$opts $msg + dict incr xopts -level + return {*}$xopts $msg + } + # The following uplevel is largely cosmetic, the intent being to put + # the most-frequently-useful info at the top of the ./configure + # output, but also avoiding outputing it if --help is used. + uplevel 1 { + use cc cc-db cc-shared cc-lib pkg-config } sqlite-post-options-init uplevel 1 $configScript @@ -422,6 +428,10 @@ proc sqlite-configure-finalize {} { # top-level build and the "autoconf" build, but it's not intended to # be a catch-all dumping ground for such. proc sqlite-post-options-init {} { + define PACKAGE_NAME "sqlite" + define PACKAGE_URL {https://sqlite.org} + define PACKAGE_BUGREPORT [get-define PACKAGE_URL]/forum + define PACKAGE_STRING "[get-define PACKAGE_NAME] [get-define PACKAGE_VERSION]" # # Carry values from hidden --flag aliases over to their canonical # flag forms. This list must include only options which are common @@ -888,6 +898,35 @@ proc sqlite-handle-emsdk {} { } } +######################################################################## +# Internal helper for [sqlite-check-line-editing]. Returns a list of +# potential locations under which readline.h might be found. +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 + set dirs [list [get-define prefix]] + switch -glob -- [get-define host] { + *-linux-android { + # Possibly termux + lappend dirs /data/data/com.termux/files/usr + } + *-mingw32 { + lappend dirs /mingw32 /mingw + } + *-mingw64 { + lappend dirs /mingw64 /mingw + } + } + lappend dirs /usr /usr/local /usr/local/readline /usr/contrib + set rv {} + foreach d $dirs { + if {[file isdir $d]} {lappend rv $d} + } + #msg-debug "sqlite-get-readline-dir-list dirs=$rv" + return $rv +} + ######################################################################## # sqlite-check-line-editing jumps through proverbial hoops to try to # find a working line-editing library, setting: @@ -1024,7 +1063,7 @@ proc sqlite-check-line-editing {} { # ^^^ this check is derived from the legacy configure script. proj-warn "Skipping check for readline.h because we're cross-compiling." } else { - set dirs "[get-define prefix] /usr /usr/local /usr/local/readline /usr/contrib /mingw" + set dirs [sqlite-get-readline-dir-list] set subdirs "include/$editLibName" if {"editline" eq $editLibName} { lappend subdirs include/readline @@ -1032,16 +1071,14 @@ proc sqlite-check-line-editing {} { # and uses libreadline's header. } lappend subdirs include - # ^^^ The dirs and subdirs lists are, except for the inclusion - # of $prefix and editline, from the legacy configure script set rlInc [proj-search-for-header-dir readline.h \ -dirs $dirs -subdirs $subdirs] if {"" ne $rlInc} { if {[string match */readline $rlInc]} { - set rlInc [file dirname $rlInc]; # shell #include's + set rlInc [file dirname $rlInc]; # CLI shell: #include } elseif {[string match */editline $rlInc]} { set editLibDef HAVE_EDITLINE - set rlInc [file dirname $rlInc]; # shell #include's + set rlInc [file dirname $rlInc]; # CLI shell: #include } set rlInc "-I${rlInc}" } @@ -1085,7 +1122,7 @@ proc sqlite-check-line-editing {} { # linking to the GPL'd libreadline. Presumably that distinction is # significant for those using --editline. proj-indented-notice { - NOTE: the local libedit but uses so we + NOTE: the local libedit uses so we will compile with -DHAVE_READLINE=1 but will link with libedit. } @@ -1957,7 +1994,7 @@ proc sqlite-handle-tcl {} { # Handle the --enable/disable-rpath flag. proc sqlite-handle-rpath {} { proj-check-rpath - # autosetup/cc-chared.tcl sets the rpath flag definition in + # autosetup/cc-shared.tcl sets the rpath flag definition in # [get-define SH_LINKRPATH], but it does so on a per-platform basis # rather than as a compiler check. Though we should do a proper # compiler check (as proj-check-rpath does), we may want to consider diff --git a/manifest b/manifest index 59176353c5..ecd5d0ec2f 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Strive\sto\smake\ssorts\sstable\sin\sthe\smkpragmatab.tcl\sbuild\sscript,\sso\sthat\nwe\sget\sconsistent\samalgamations\sregardless\sof\splatform.\n[forum:/forumpost/c9914addebf3da51|Forum\sthread\sc9914addebf3da51]. -D 2025-02-28T01:06:14.564 +C Bring\sthe\sautosetup-related\sbits\sup\sto\spar\swith\strunk. +D 2025-02-28T05:01:38.919 F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1 F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea F LICENSE.md e108e1e69ae8e8a59e93c455654b8ac9356a11720d3345df2a4743e9590fb20d @@ -38,10 +38,10 @@ F autoconf/tea/win/targets.vc 96a25a1fa6e9e9cfb348fd3760a5395b4ce8acafc8ed10f041 F autosetup/LICENSE 41a26aebdd2cd185d1e2b210f71b7ce234496979f6b35aef2cbf6b80cbed4ce4 F autosetup/README.autosetup a78ff8c4a3d2636a4268736672a74bf14a82f42687fcf0631a70c516075c031e F autosetup/README.md b306314e8a87ccf873cb5b2a360c4a27bbf841df5b76f3acbd65322cff165476 -F autosetup/autosetup df8b53928b1fe3c67db5bc77c8e1eb8160c1b6a26c370e9a06c68748f803b7e4 x +F autosetup/autosetup 74a9782b68d07934510190fbd03fc6ad92e63f0ea3b5cbffa5f0bd271ad60f01 x F autosetup/autosetup-config.guess dfa101c5e8220e864d5e9c72a85e87110df60260d36cb951ad0a85d6d9eaa463 x F autosetup/autosetup-config.sub a38fb074d0dece01cf919e9fb534a26011608aa8fa606490864295328526cd73 x -F autosetup/autosetup-find-tclsh 25905f6c302959db80c2951aa267b4411c5645b598ce761cfc24a166141e2c4c x +F autosetup/autosetup-find-tclsh b08f883f5753cfff1ecb8581f98b314e190b7e3f3059798e274ae5f5aad571af x F autosetup/autosetup-test-tclsh 749d20defee533a3842139df47d700fc7a334a5da7bdbd444ae5331744b06c5f F autosetup/cc-db.tcl 6e0ed90146197a5a05b245e649975c07c548e30926b218ca3e1d4dc034b10a7b F autosetup/cc-lib.tcl 493c5935b5dd3bf9bd4eca89b07c8b1b1a9356d61783035144e21795facf7360 @@ -50,7 +50,7 @@ F autosetup/cc.tcl c0fcc50ca91deff8741e449ddad05bcd08268bc31177e613a6343bbd1fd3e F autosetup/jimsh0.c a57c16e65dcffc9c76e496757cb3f7fb47e01ecbd1631a0a5e01751fc856f049 F autosetup/pkg-config.tcl 4e635bf39022ff65e0d5434339dd41503ea48fc53822c9c5bde88b02d3d952ba F autosetup/proj.tcl 187d82550cfa55df00e285542e88278c51876d7813d63eaffb2fc5af40566d9f -F autosetup/sqlite-config.tcl 341d530f531c1dd70c3bc4e16905ad0a83cde1a2104d0b5655aa44b13bd37349 +F autosetup/sqlite-config.tcl 10ce07e919c265706be406bcb0093325b4f8600caf788a0d7cc71b88fd2605ce F autosetup/system.tcl 51d4be76cd9a9074704b584e5c9cbba616202c8468cf9ba8a4f8294a7ab1dba9 F configure 9a00b21dfd13757bbfb8d89b30660a89ec1f8f3a79402b8f9f9b6fc475c3303a x F contrib/sqlitecon.tcl 210a913ad63f9f991070821e599d600bd913e0ad @@ -2209,9 +2209,12 @@ F tool/version-info.c 3b36468a90faf1bbd59c65fd0eb66522d9f941eedd364fabccd7227350 F tool/warnings-clang.sh bbf6a1e685e534c92ec2bfba5b1745f34fb6f0bc2a362850723a9ee87c1b31a7 F tool/warnings.sh 49a486c5069de041aedcbde4de178293e0463ae9918ecad7539eedf0ec77a139 F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f -P 9d5b97dd92f68370bcef02eb8621d893cecc1aa2c4c6fb8f04f7c5bdd84bc533 -Q +3f57584710d611748eb0af797c58c72e4ac099db09f5286cafdbd9a8ce354c90 -R fec3769b310138f667e6adadcd5b9600 +P 8b5996f45ff45d7f0cfc17ec1469f246f8cdc5d85387c33f23d64d429d142d65 +Q +52f528c4be4ee4ae4ee4c05009c33bb97269d27380ce2cdd717a514616f39be7 +Q +5c2438a719de6787c2f7c9f38d14d5ccdb8d36a120657661ec28051c83a93270 +Q +69e83ab859ca37c047defdaba84e80d028b30045631e773bd8dfa286c41a57e8 +Q +cd2a84a72c922c330441d6b75df0c8b2f6df2c25bc7c37ac37046fffd702624a +R 84e89ff54f41fdb3c9093a5bed725c6d U stephan -Z 6332856622713ac862f9815f5b7ab22b +Z 3f5724857ca78da433ea5159b3435911 # Remove this line to create a well-formed Fossil manifest. diff --git a/manifest.uuid b/manifest.uuid index e8a463865c..26542cc71f 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -8b5996f45ff45d7f0cfc17ec1469f246f8cdc5d85387c33f23d64d429d142d65 +47fe1c59787ffbd1558f7663fd65976b57c2f7c91df8b578d504e980f3a12380