search for slib in some common places
svn: r2249
This commit is contained in:
parent
0b777b2b5a
commit
047b1e8f48
|
@ -65,15 +65,20 @@
|
||||||
|
|
||||||
(define library-vicinity
|
(define library-vicinity
|
||||||
(let ((library-path
|
(let ((library-path
|
||||||
(or
|
(or
|
||||||
;; Use this getenv if your implementation supports it.
|
;; Use this getenv if your implementation supports it.
|
||||||
(getenv "SCHEME_LIBRARY_PATH")
|
(getenv "SCHEME_LIBRARY_PATH")
|
||||||
;; Use this path if your scheme does not support GETENV
|
;; Try an slib collection first
|
||||||
(with-handlers ([void
|
(with-handlers ([void #f])
|
||||||
(lambda (x)
|
(path->string (collection-path "slib")))
|
||||||
(error 'slib-init
|
;; look for slib in a few common places
|
||||||
"can't find SCHEME_LIBRARY_PATH environment variable or \"slib\" collection"))])
|
(ormap (lambda (dir)
|
||||||
(path->string (collection-path "slib"))))))
|
(and (directory-exists? dir) (path->string dir)))
|
||||||
|
'("/usr/share/slib"
|
||||||
|
;; this is for RH/Fedora that uses umb-scheme for slib
|
||||||
|
"/usr/share/umb-scheme/slib"))
|
||||||
|
(error 'slib-init
|
||||||
|
"can't find SCHEME_LIBRARY_PATH environment variable, \"slib\" collection, or a system slib directory"))))
|
||||||
(lambda () library-path)))
|
(lambda () library-path)))
|
||||||
|
|
||||||
;;; (home-vicinity) should return the vicinity of the user's HOME
|
;;; (home-vicinity) should return the vicinity of the user's HOME
|
||||||
|
|
Loading…
Reference in New Issue
Block a user