From 47f88e60899603d0ae74d3ff28cac9852067e3d4 Mon Sep 17 00:00:00 2001 From: "Kevin M. Rosenberg" Date: Mon, 1 Apr 2002 21:21:12 +0000 Subject: [PATCH] r1718: *** empty log message *** --- ChangeLog | 5 ++++- examples/compress.cl | 12 ++++++++---- tests/compress.cl | 12 ++++++++---- 3 files changed, 20 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index 52e7fa5..2b6b123 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,7 +3,10 @@ * src/libraries.cl: * examples/Makefile: Changed default type for FreeBSD and updated Makefile for - FreeBSD and Solaris + FreeBSD and Solaris. Enhanced find-foreign-library to + take a list of types to search. + * examples/compress.cl: + Add support to use find-foreign-library 2002-03-31 Kevin Rosenberg (kevin@rosenberg.net) diff --git a/examples/compress.cl b/examples/compress.cl index 05fa6ff..ec35750 100644 --- a/examples/compress.cl +++ b/examples/compress.cl @@ -7,7 +7,7 @@ ;;;; Programmer: Kevin M. Rosenberg ;;;; Date Started: Feb 2002 ;;;; -;;;; $Id: compress.cl,v 1.9 2002/03/20 04:56:52 kevin Exp $ +;;;; $Id: compress.cl,v 1.10 2002/04/01 21:20:00 kevin Exp $ ;;;; ;;;; This file, part of UFFI, is Copyright (c) 2002 by Kevin M. Rosenberg ;;;; @@ -18,9 +18,13 @@ (in-package :cl-user) -(unless (uffi:load-foreign-library "/usr/lib/libz.so" - :module "zlib" - :supporting-libraries '("c")) +(unless (uffi:load-foreign-library + (uffi:find-foreign-library + "libz" + '("/usr/local/lib/" "/usr/lib" "/zlib") + :types '("so" "a")) + :module "zlib" + :supporting-libraries '("c")) (warn "Unable to load zlib")) (uffi:def-function ("compress" c-compress) diff --git a/tests/compress.cl b/tests/compress.cl index 05fa6ff..ec35750 100644 --- a/tests/compress.cl +++ b/tests/compress.cl @@ -7,7 +7,7 @@ ;;;; Programmer: Kevin M. Rosenberg ;;;; Date Started: Feb 2002 ;;;; -;;;; $Id: compress.cl,v 1.9 2002/03/20 04:56:52 kevin Exp $ +;;;; $Id: compress.cl,v 1.10 2002/04/01 21:20:00 kevin Exp $ ;;;; ;;;; This file, part of UFFI, is Copyright (c) 2002 by Kevin M. Rosenberg ;;;; @@ -18,9 +18,13 @@ (in-package :cl-user) -(unless (uffi:load-foreign-library "/usr/lib/libz.so" - :module "zlib" - :supporting-libraries '("c")) +(unless (uffi:load-foreign-library + (uffi:find-foreign-library + "libz" + '("/usr/local/lib/" "/usr/lib" "/zlib") + :types '("so" "a")) + :module "zlib" + :supporting-libraries '("c")) (warn "Unable to load zlib")) (uffi:def-function ("compress" c-compress) -- 2.34.1