From: stephan Date: Thu, 20 Mar 2025 13:41:08 +0000 (+0000) Subject: Teach the configure script to be able find a default installation of libreadline... X-Git-Tag: major-release~174 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=315de605afc1fa22adadf00aa9be9c5ef4cecf8a;p=thirdparty%2Fsqlite.git Teach the configure script to be able find a default installation of libreadline on Haiku OS. FossilOrigin-Name: 260e9884118172ef76457a34042ace301f20abab4ced172f6b6135010c446a68 --- diff --git a/autosetup/sqlite-config.tcl b/autosetup/sqlite-config.tcl index 42b4382cfa..9461e7f89d 100644 --- a/autosetup/sqlite-config.tcl +++ b/autosetup/sqlite-config.tcl @@ -928,6 +928,11 @@ proc sqlite-handle-emsdk {} { ######################################################################## # Internal helper for [sqlite-check-line-editing]. Returns a list of # potential locations under which readline.h might be found. +# +# On some environments this function may perform extra work to help +# sqlite-check-line-editing figure out how to find libreadline and +# friends. It will communicate those results via means other than the +# result value, e.g. by modifying configure --flags. 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 @@ -944,6 +949,17 @@ proc sqlite-get-readline-dir-list {} { *-mingw64 { lappend dirs /mingw64 /mingw } + *-haiku { + lappend dirs /boot/system/develop/headers + if {[opt-val with-readline-ldflags] in {auto ""}} { + # If the user did not supply their own --with-readline-ldflags + # value, hijack that flag to inject options which are known to + # work on a default Haiku installation. + if {"" ne [glob -nocomplain /boot/system/lib/libreadline*]} { + proj-opt-set with-readline-ldflags {-L/boot/system/lib -lreadline} + } + } + } } lappend dirs /usr /usr/local /usr/local/readline /usr/contrib set rv {} @@ -1091,7 +1107,9 @@ proc sqlite-check-line-editing {} { proj-warn "Skipping check for readline.h because we're cross-compiling." } else { set dirs [sqlite-get-readline-dir-list] - set subdirs "include/$editLibName" + set subdirs [list \ + include/$editLibName \ + readline] if {"editline" eq $editLibName} { lappend subdirs include/readline # ^^^ editline, on some systems, does not have its own header, @@ -1099,7 +1117,8 @@ proc sqlite-check-line-editing {} { } lappend subdirs include set rlInc [proj-search-for-header-dir readline.h \ - -dirs $dirs -subdirs $subdirs] + -dirs $dirs -subdirs $subdirs] + #msg-debug "rlInc=$rlInc" if {"" ne $rlInc} { if {[string match */readline $rlInc]} { set rlInc [file dirname $rlInc]; # CLI shell: #include @@ -1124,6 +1143,7 @@ proc sqlite-check-line-editing {} { set rlLib "" if {"" ne $rlInc} { set rlLib [opt-val with-readline-ldflags] + #msg-debug "rlLib=$rlLib" if {$rlLib eq "auto" || $rlLib eq ""} { set rlLib "" set libTerm "" diff --git a/manifest b/manifest index fc02250932..07acc0acad 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Fix\sa\sproblem\sin\sthe\ssqlite_dbpage()\stable-valued\sfunction\swhen\sit\sis\ntrying\sto\struncate\sa\sfile\sin\slocking-mode=EXCLUSIVE\sand\sthe\sfile\swas\nobtained\svia\ssqlite3_deserialize().\s\sProblem\sfound\sby\sdbsqlfuzz. -D 2025-03-20T11:47:39.061 +C Teach\sthe\sconfigure\sscript\sto\sbe\sable\sfind\sa\sdefault\sinstallation\sof\slibreadline\son\sHaiku\sOS. +D 2025-03-20T13:41:08.243 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 bdf0489d4ce8110fc1d4a09b1e2e274e50dd51711637b55c7c63a6a7ecec2aa5 -F autosetup/sqlite-config.tcl a2eb8234de355233787ad7bc926d8a622ef9f97594749374c4360b63c37fc223 +F autosetup/sqlite-config.tcl 4f4f666382c68a01617a4b75cb7cfc2690f49760d683836332bbee9c5bd6d47b F autosetup/system.tcl 51d4be76cd9a9074704b584e5c9cbba616202c8468cf9ba8a4f8294a7ab1dba9 F configure 9a00b21dfd13757bbfb8d89b30660a89ec1f8f3a79402b8f9f9b6fc475c3303a x F contrib/sqlitecon.tcl eb4c6578e08dd353263958da0dc620f8400b869a50d06e271ab0be85a51a08d3 @@ -2215,8 +2215,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 c7fd71c77f1716c9c85d0f41a07ebd7c96f2e9d5e4c1392fefa1fb53f3cbb746 -R 4634b7df48b729bfd4bde6753f06dc09 -U drh -Z 6107a05db82cfd1bf03b9f66e2d05b45 +P 346cf9794c6ce82ac32f7ccabc67240309306626709951593720abd198b103e3 +R a0ddd543c9b9478028e92dd9961c6514 +U stephan +Z 2ec32e826afbcab9328d3272b3136b96 # Remove this line to create a well-formed Fossil manifest. diff --git a/manifest.uuid b/manifest.uuid index 0a3688252d..cdf4059c1b 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -346cf9794c6ce82ac32f7ccabc67240309306626709951593720abd198b103e3 +260e9884118172ef76457a34042ace301f20abab4ced172f6b6135010c446a68