From ce9db9fb84d0ab704922b635487ccd23adaa3739 Mon Sep 17 00:00:00 2001 From: Doug Coleman Date: Mon, 28 Apr 2014 00:38:39 -0700 Subject: [PATCH] alien.libraries.finder: Add utiltity word find-first-library to find a shared library from a list of library stem names. --- basis/alien/libraries/finder/finder.factor | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/basis/alien/libraries/finder/finder.factor b/basis/alien/libraries/finder/finder.factor index 574e00ad4b..5ed41cd9c0 100644 --- a/basis/alien/libraries/finder/finder.factor +++ b/basis/alien/libraries/finder/finder.factor @@ -1,10 +1,13 @@ -USING: combinators system vocabs ; +USING: combinators kernel sequences system vocabs ; IN: alien.libraries.finder HOOK: find-library os ( name -- path/f ) +: find-first-library ( seq -- path/f ) + [ find-library ] find nip ; + { { [ os macosx? ] [ "alien.libraries.finder.macosx" ] } { [ os linux? ] [ "alien.libraries.finder.linux" ] }