;;;; Programmer: Kevin M. Rosenberg
;;;; Date Started: Feb 2002
;;;;
-;;;; $Id: libraries.cl,v 1.6 2002/03/31 23:45:34 kevin Exp $
+;;;; $Id: libraries.cl,v 1.7 2002/04/01 00:52:07 kevin Exp $
;;;;
;;;; This file, part of UFFI, is Copyright (c) 2002 by Kevin M. Rosenberg
;;;;
#+freebsd "a"
#+linux "so")
-
+(defun find-foreign-library (name &key directories type)
+ "Looks for a foreign library. directories can be a single
+string or a list of strings of candidate directories. Use default
+library type if type is not specified."
+ (unless type
+ (setq type (default-foreign-library-type)))
+ (unless (listp directories)
+ (setq directories (list directories)))
+ (dolist (dir directories)
+ (let ((path (make-pathname :name :type type :directory directory)))
+ (when (probe-file path)
+ (return path))))
+ nil)
+
+
(defun load-foreign-library (filename &key module supporting-libraries
force-load)
#+allegro (declare (ignore module supporting-libraries))