sqlite3.lsp library path

Started by Dmi, February 21, 2007, 11:31:47 PM

Previous topic - Next topic

Dmi

/usr/share/newlisp/sqlite3.lsp has the code for cross-platform autodetection of library's place.
(if
        ; LINUX and BSDs
        (< (& 0xF (last (sys-info))) 3) (set 'library "/usr/local/lib/libsqlite3.so")
        ; Mac OSX / Darwin
        (= (& 0xF (last (sys-info))) 3) (set 'library "/usr/lib/libsqlite3.0.dylib")
        ; Solaris
        (= (& 0xF (last (sys-info))) 4) (set 'library "/usr/local/lib/libsqlite3.so")
        ; MinGW, Win32
        (> (& 0xF (last (sys-info))) 4)
                (set 'library (string (env "PROGRAMFILES") "/sqlite3/sqlite3.dll"))
        true (println "Cannot load library OS not supported"))

Unfortunately, Debian Linux (and I think, at least Ubuntu too) have libsqlite library in /usr/lib/libsqlite3.so.0

Also, I think that all modern package-oriented Lunux distros have libsqlite in /usr/lib despite of library's name.



Lutz,

Can you correct this in sqlite3.lsp (or to extend an autodetection)?

...or simply to insert something like:
(if
        ; predefined place
        MAIN:libsqlite-path (set 'library MAIN:libsqlite-path)
        ; LINUX and BSDs
        (< (& 0xF (last (sys-info))) 3) (set 'library "/usr/local/lib/libsqlite3.so")
.......
WBR, Dmi