]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Teach the configure script to be able find a default installation of libreadline...
authorstephan <stephan@noemail.net>
Thu, 20 Mar 2025 13:41:08 +0000 (13:41 +0000)
committerstephan <stephan@noemail.net>
Thu, 20 Mar 2025 13:41:08 +0000 (13:41 +0000)
FossilOrigin-Name: 260e9884118172ef76457a34042ace301f20abab4ced172f6b6135010c446a68

autosetup/sqlite-config.tcl
manifest
manifest.uuid

index 42b4382cfa87441723aa1b6779d7e43b15544468..9461e7f89db52c0448381405407d41612f4cab68 100644 (file)
@@ -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 <readline/readline.h>
@@ -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 ""
index fc0225093202379ea059b35d8ed0400ec01f6b7d..07acc0acad06dc7cdc2abf63d676c4750b4140af 100644 (file)
--- 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.
index 0a3688252dc6aa12da34bf171de167bb50fedf89..cdf4059c1b40d71e043ce29247e4cee525f256bf 100644 (file)
@@ -1 +1 @@
-346cf9794c6ce82ac32f7ccabc67240309306626709951593720abd198b103e3
+260e9884118172ef76457a34042ace301f20abab4ced172f6b6135010c446a68