X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=tests%2Fforeign-loader.lisp;h=2053273ed39492e63e2a398ce0cd1644671ee6e3;hb=a3db800bfa385ae39d729ef0eb8f08a78ceaccdb;hp=07977ea87a71d96ab07eec97816a6db3571012dd;hpb=29c29f6f8a907369b3bad4789098c2252dc8c66b;p=uffi.git diff --git a/tests/foreign-loader.lisp b/tests/foreign-loader.lisp index 07977ea..2053273 100644 --- a/tests/foreign-loader.lisp +++ b/tests/foreign-loader.lisp @@ -7,38 +7,41 @@ ;;;; Author: Kevin M. Rosenberg ;;;; Date Started: Feb 2002 ;;;; -;;;; $Id: foreign-loader.lisp,v 1.1 2003/05/02 02:54:55 kevin Exp $ +;;;; This file, part of UFFI, is Copyright (c) 2002-2010 by Kevin M. Rosenberg ;;;; -;;;; This file, part of UFFI, is Copyright (c) 2002 by Kevin M. Rosenberg -;;;; -;;;; UFFI users are granted the rights to distribute and use this software -;;;; as governed by the terms of the Lisp Lesser GNU Public License -;;;; (http://opensource.franz.com/preamble.html), also known as the LLGPL. ;;;; ************************************************************************* ;;; For CMUCL, it's necessary to load foreign files separate from their ;;; usage -(in-package :uffi-tests) +(in-package uffi-tests) + +#+clisp (uffi:load-foreign-library "/usr/lib/libz.so" :module "z") +#-clisp +(unless (uffi:load-foreign-library + (uffi:find-foreign-library + #-(or macosx darwin) + "libz" + #+(or macosx darwin) + "z" + (list (pathname-directory *load-pathname*) + "/usr/local/lib/" #+(or 64bit x86-64) "/usr/lib64/" + "/usr/lib32/" + "/opt/local/lib/" + "/usr/lib/" "/zlib/")) + :module "zlib" + :supporting-libraries '("c")) + (warn "Unable to load zlib")) -(eval-when (:compile-toplevel :load-toplevel :execute) +#+clisp (uffi:load-foreign-library "/home/kevin/debian/src/uffi/tests/uffi-c-test.so" :module "uffi_tests") +#-clisp (unless (uffi:load-foreign-library - #-(or macosx darwin) - (uffi:find-foreign-library - "libz" - '("/usr/local/lib/" "/usr/lib/" "/zlib/") - :types '("so" "a")) - #+(or macosx darwin) - (uffi:find-foreign-library "z" - `(,(pathname-directory *load-pathname*))) - :module "zlib" - :supporting-libraries '("c")) - (warn "Unable to load zlib"))) - -(unless (uffi:load-foreign-library - (uffi:find-foreign-library "uffi-c-test-lib" - (list *load-truename* - "/usr/lib/")) - :supporting-libraries '("c")) - (warn "Unable to load uffi-c-test-lib library")) + (uffi:find-foreign-library + '(#+(or 64bit x86-64) "uffi-c-test64" "uffi-c-test") + (list (pathname-directory *load-truename*) + "/usr/lib/uffi/" + "/home/kevin/debian/src/uffi/tests/")) + :supporting-libraries '("c") + :module "uffi_tests") + (warn "Unable to load uffi-c-test library"))