From: stephan Date: Wed, 26 Feb 2025 16:15:34 +0000 (+0000) Subject: configure: extend the readline detection a bit so that it can find readline on termux... X-Git-Tag: major-release~230 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=68d88cfec560839198a198ede3f3ed3d7142727f;p=thirdparty%2Fsqlite.git configure: extend the readline detection a bit so that it can find readline on termux environments without having to be told where it is. Fix a typo in a libedit-related message. FossilOrigin-Name: 52f528c4be4ee4ae4ee4c05009c33bb97269d27380ce2cdd717a514616f39be7 --- diff --git a/autosetup/sqlite-config.tcl b/autosetup/sqlite-config.tcl index 52f8212694..7b927c3518 100644 --- a/autosetup/sqlite-config.tcl +++ b/autosetup/sqlite-config.tcl @@ -891,6 +891,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: @@ -1027,7 +1056,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 @@ -1035,16 +1064,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}" } @@ -1088,7 +1115,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. } diff --git a/manifest b/manifest index e42357e303..7f761fb1e8 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Shift\ssome\sbootstrapping\sconfigure\sbits\sto\savoid\semitting\sextra\soutput\sif\s--help\sis\sspecified. -D 2025-02-26T09:14:26.443 +C configure:\sextend\sthe\sreadline\sdetection\sa\sbit\sso\sthat\sit\scan\sfind\sreadline\son\stermux\senvironments\swithout\shaving\sto\sbe\stold\swhere\sit\sis.\sFix\sa\stypo\sin\sa\slibedit-related\smessage. +D 2025-02-26T16:15:34.064 F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1 F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea F LICENSE.md e108e1e69ae8e8a59e93c455654b8ac9356a11720d3345df2a4743e9590fb20d @@ -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 f86956a902fe0c01a674b571ebe185a979b4f2cf2362e45f4bd0550438c473f7 +F autosetup/sqlite-config.tcl 0763bd955800a1697d282ac7d3de3d8835eeec3b22957b629a7662d1a4c6a4b3 F autosetup/system.tcl 51d4be76cd9a9074704b584e5c9cbba616202c8468cf9ba8a4f8294a7ab1dba9 F configure 9a00b21dfd13757bbfb8d89b30660a89ec1f8f3a79402b8f9f9b6fc475c3303a x F contrib/sqlitecon.tcl 210a913ad63f9f991070821e599d600bd913e0ad @@ -2213,8 +2213,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 1a72d1d13e42f69f02861f8ac3058e69b78d4fd2050ca8c53a1ce016b7e0863d -R 6be0fd59d2238d0e8714620d2b90535a +P 69e83ab859ca37c047defdaba84e80d028b30045631e773bd8dfa286c41a57e8 +R 75fa064ab9f49f36df25859abbb9d612 U stephan -Z 5ebdccbee6edfa6daea2a6438d80974e +Z 0bf4577730680cb60978dec8190377c2 # Remove this line to create a well-formed Fossil manifest. diff --git a/manifest.uuid b/manifest.uuid index fe3c17d67d..75f17c3e37 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -69e83ab859ca37c047defdaba84e80d028b30045631e773bd8dfa286c41a57e8 +52f528c4be4ee4ae4ee4c05009c33bb97269d27380ce2cdd717a514616f39be7