X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=interfaces%2Fclsql-uffi%2Fclsql-uffi-loader.cl;h=baacc460ec4905d1f80b92e36003e707bfe7628e;hb=bdd8c1a8287aec0c4538ad565e6f9e70c8f5ba2e;hp=a5ad4b7ba464c2963f39cc0a59cba1e72668f7fc;hpb=0ba06f88c7b2e70c3fe8007b9aa9d7bbfef9afcd;p=clsql.git diff --git a/interfaces/clsql-uffi/clsql-uffi-loader.cl b/interfaces/clsql-uffi/clsql-uffi-loader.cl index a5ad4b7..baacc46 100644 --- a/interfaces/clsql-uffi/clsql-uffi-loader.cl +++ b/interfaces/clsql-uffi/clsql-uffi-loader.cl @@ -7,7 +7,7 @@ ;;;; Programmers: Kevin M. Rosenberg ;;;; Date Started: Mar 2002 ;;;; -;;;; $Id: clsql-uffi-loader.cl,v 1.2 2002/05/13 21:50:52 kevin Exp $ +;;;; $Id: clsql-uffi-loader.cl,v 1.15 2002/07/09 19:15:16 kevin Exp $ ;;;; ;;;; This file, part of CLSQL, is Copyright (c) 2002 by Kevin M. Rosenberg ;;;; @@ -20,10 +20,13 @@ (in-package :clsql-uffi) (defvar *clsql-uffi-library-filename* - (translate-logical-pathname - #+(or linux unix) "CL-LIBRARY:clsql;interfaces;clsql-uffi;clsql-uffi.so" - #+(or mswindows win32) "CL-LIBRARY:clsql;interfaces;clsql-uffi;clsql-uffi.dll" - )) + (uffi:find-foreign-library + "clsql-uffi" + `(,(directory-namestring + (translate-logical-pathname + "CL-LIBRARY:clsql;interfaces;clsql-uffi;")) + "/usr/lib/clsql/") + :drive-letters '("C" "D" "E" "F" "G"))) (defvar *clsql-uffi-supporting-libraries* '("c") "Used only by CMU. List of library flags needed to be passed to ld to @@ -34,11 +37,12 @@ set to the right path before compiling or loading the system.") "T if foreign library was able to be loaded successfully") (defun load-uffi-foreign-library () - (when (uffi:load-foreign-library *clsql-uffi-library-filename* - :module "clsql-uffi" - :supporting-libraries - *clsql-uffi-supporting-libraries*) - (setq *uffi-library-loaded* t))) + (if (uffi:load-foreign-library *clsql-uffi-library-filename* + :module "clsql-uffi" + :supporting-libraries + *clsql-uffi-supporting-libraries*) + (setq *uffi-library-loaded* t) + (warn "Unable to load helper library ~A" *clsql-uffi-library-filename*))) (load-uffi-foreign-library)