diff options
author | stephan <stephan@noemail.net> | 2025-03-20 13:41:08 +0000 |
---|---|---|
committer | stephan <stephan@noemail.net> | 2025-03-20 13:41:08 +0000 |
commit | 315de605afc1fa22adadf00aa9be9c5ef4cecf8a (patch) | |
tree | d0cc1a28fc7930a79579bf8ae4a51a135c6e966c /autosetup/sqlite-config.tcl | |
parent | 4c13878ac2e3dfc782ed398254c8e28caec372a9 (diff) | |
download | sqlite-315de605afc1fa22adadf00aa9be9c5ef4cecf8a.tar.gz sqlite-315de605afc1fa22adadf00aa9be9c5ef4cecf8a.zip |
Teach the configure script to be able find a default installation of libreadline on Haiku OS.
FossilOrigin-Name: 260e9884118172ef76457a34042ace301f20abab4ced172f6b6135010c446a68
Diffstat (limited to 'autosetup/sqlite-config.tcl')
-rw-r--r-- | autosetup/sqlite-config.tcl | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/autosetup/sqlite-config.tcl b/autosetup/sqlite-config.tcl index 42b4382cf..9461e7f89 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 <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 "" |