Commit 8a3c777b authored by Liam Healy's avatar Liam Healy

Improved finding of libraries for OS X, by Leo

parent bc4d0b9a
;; Load GSL
;; Liam Healy Sat Mar 4 2006 - 18:53
;; Time-stamp: <2010-08-13 13:54:07EDT init.lisp>
;; Time-stamp: <2010-08-16 23:08:13EDT init.lisp>
;;
;; Copyright 2006, 2007, 2008, 2009, 2010 Liam M. Healy
;; Distributed under the terms of the GNU General Public License
......@@ -31,6 +31,8 @@
#:cl-array #:dimensions #:element-type #:dim0 #:dim1
#:copy))
(in-package :gsl)
(eval-when (:compile-toplevel :load-toplevel :execute)
(defun gsl-config (arg)
"A wrapper for tool `gsl-config'."
......@@ -38,10 +40,13 @@
(s (with-output-to-string (asdf::*verbose-out*)
(asdf:run-shell-command "gsl-config ~s" arg)))
(read-line s)
(read-line s))))
(read-line s)))
#+unix
(defun gsl-config-pathname (pn)
(merge-pathnames pn (pathname (format nil "~a/" (gsl-config "--prefix"))))))
(cffi:define-foreign-library libgslcblas
(:darwin "libgslcblas.dylib")
(:darwin #.(gsl-config-pathname "lib/libgslcblas.dylib"))
(:cygwin "cyggslcblas-0.dll")
(:unix (:or "libgslcblas.so.0" "libgslcblas.so"))
(t (:default "libgslcblas")))
......@@ -55,7 +60,7 @@
(cffi:load-foreign-library "/lib/lapack/cygblas.dll")
(cffi:define-foreign-library libgsl
(:darwin "libgsl.dylib")
(:darwin #. (gsl-config-pathname "lib/libgsl.dylib"))
(:cygwin "cyggsl-0.dll")
(:unix (:or "libgsl.so.0" "libgsl.so"))
(t (:default "libgsl")))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment