1 ! (c)2010 Joe Groff bsd license
2 USING: io.files io.pathnames io.pathnames.private kernel
3 sequences system tools.deploy.libraries ;
4 IN: tools.deploy.libraries.unix
6 ! stupid hack. better ways to find the library name would be open the library,
7 ! note a symbol address found in the library, then call dladdr (or use
8 : ?exists ( path -- path/f )
9 dup exists? [ drop f ] unless ; inline
11 M: unix find-library-file
12 dup absolute-path? [ ?exists ] [
13 { "/lib" "/usr/lib" "/usr/local/lib" "/opt/local/lib" "resource:" }
14 [ prepend-path ?exists ] with map-find drop