Commit 610e8dc2 by Liam Healy

Simplified paths to the foreign libraries; use gsl-config for header

The paths to the foreign libraries have been simplified, making use of CFFI's statement "Most, if not all, Lisps supported by CFFI have a reasonable default search algorithm for foreign libraries." Therefore, the paths have been eliminated. If they need to be added, this should be done by modifying the variable cffi:*foreign-library-directories*. The header files location set with cc-flags for Darwin has been changed to use (gsl-config "--cflags").
parent d11787cd
;; CFFI-Grovel definitions for unix systems.
;; Liam Healy 2009-06-06 09:32:30EDT monte-carlo-structs.lisp
;; Time-stamp: <2009-12-27 09:42:10EST monte-carlo-structs.lisp>
;; Time-stamp: <2010-05-23 11:36:42EDT monte-carlo-structs.lisp>
;;
;; Copyright 2009 Liam M. Healy
;; Copyright 2009, 2010 Liam M. Healy
;; Distributed under the terms of the GNU General Public License
;;
;; This program is free software: you can redistribute it and/or modify
......@@ -26,7 +26,7 @@
;;; When installed through Mac Ports, GSL .h files will be found
;;; in /opt/local/include.
#+darwin
(cc-flags "-I/opt/local/include/")
(cc-flags #.(gsl-config "--cflags"))
(include "gsl/gsl_monte_plain.h")
......
;; CFFI-Grovel definitions for unix systems.
;; Liam Healy 2009-06-06 09:36:29EDT array-structs.lisp
;; Time-stamp: <2009-12-27 09:42:07EST array-structs.lisp>
;; Time-stamp: <2010-05-23 11:36:42EDT array-structs.lisp>
;;
;; Copyright 2009 Liam M. Healy
;; Copyright 2009, 2010 Liam M. Healy
;; Distributed under the terms of the GNU General Public License
;;
;; This program is free software: you can redistribute it and/or modify
......@@ -26,7 +26,7 @@
;;; When installed through Mac Ports, GSL .h files will be found
;;; in /opt/local/include.
#+darwin
(cc-flags "-I/opt/local/include/")
(cc-flags #.(gsl-config "--cflags"))
(include "gsl/gsl_block_double.h")
......
;; CFFI-Grovel definitions.
;; Liam Healy
;; Time-stamp: <2009-12-27 09:45:36EST eigen-struct.lisp>
;; Time-stamp: <2010-05-23 11:36:31EDT eigen-struct.lisp>
;;
;; Copyright 2009 Liam M. Healy
;; Copyright 2009, 2010 Liam M. Healy
;; Distributed under the terms of the GNU General Public License
;;
;; This program is free software: you can redistribute it and/or modify
......@@ -26,7 +26,7 @@
;;; When installed through Mac Ports, GSL .h files will be found
;;; in /opt/local/include.
#+darwin
(cc-flags "-I/opt/local/include/")
(cc-flags #.(gsl-config "--cflags"))
(include "gsl/gsl_eigen.h")
......
;; GSL structures for holding functions
;; Liam Healy 2009-04-04 22:15:56EDT callback-struct.lisp
;; Time-stamp: <2009-12-27 09:50:33EST callback-struct.lisp>
;; Time-stamp: <2010-05-23 11:36:41EDT callback-struct.lisp>
;;
;; Copyright 2009 Liam M. Healy
;; Copyright 2009, 2010 Liam M. Healy
;; Distributed under the terms of the GNU General Public License
;;
;; This program is free software: you can redistribute it and/or modify
......@@ -26,7 +26,7 @@
;;; When installed through Mac Ports, GSL .h files will be found
;;; in /opt/local/include.
#+darwin
(cc-flags "-I/opt/local/include/")
(cc-flags #.(gsl-config "--cflags"))
(include "gsl/gsl_math.h")
......
;; Load GSL
;; Liam Healy Sat Mar 4 2006 - 18:53
;; Time-stamp: <2009-12-27 09:50:30EST init.lisp>
;; Time-stamp: <2010-05-23 11:37:01EDT init.lisp>
;;
;; Copyright 2006, 2007, 2008, 2009 Liam M. Healy
;; Copyright 2006, 2007, 2008, 2009, 2010 Liam M. Healy
;; Distributed under the terms of the GNU General Public License
;;
;; This program is free software: you can redistribute it and/or modify
......@@ -29,13 +29,19 @@
#:cl-array #:dimensions #:total-size #:element-type #:dim0 #:dim1
#:copy #:clone))
(eval-when (:compile-toplevel :load-toplevel :execute)
(defun gsl-config (arg)
"A wrapper for tool `gsl-config'."
(with-input-from-string
(s (with-output-to-string (asdf::*verbose-out*)
(asdf:run-shell-command "gsl-config ~s" arg)))
(read-line s)
(read-line s))))
(cffi:define-foreign-library libgslcblas
(:darwin
(:or "/opt/local/lib/libgslcblas.dylib" "/sw/lib/libgslcblas.dylib"
"/usr/local/lib/libgslcblas.dylib"))
(:cygwin (:or "/bin/cyggslcblas-0.dll"))
(:unix (:or "/usr/lib/libgslcblas.so.0" "/usr/lib/libgslcblas.so"
"/usr/lib64/libgslcblas.so.0" "/usr/lib64/libgslcblas.so"))
(:unix (:or "libgslcblas.so.0" "libgslcblas.so"))
(:darwin "libgslcblas.dylib")
(:cygwin "cyggslcblas-0.dll")
(t (:default "libgslcblas")))
(cffi:use-foreign-library libgslcblas)
......@@ -47,13 +53,9 @@
(cffi:load-foreign-library "/lib/lapack/cygblas.dll")
(cffi:define-foreign-library libgsl
(:darwin
(:or "/opt/local/lib/libgsl.dylib" "/sw/lib/libgsl.dylib"
"/usr/local/lib/libgsl.dylib"))
(:cygwin (:or "/bin/cyggsl-0.dll"))
(:unix (:or "/usr/lib/libgsl.so.0" "/usr/lib/libgsl.so"
"/usr/lib64/libgsl.so.0" "/usr/lib64/libgsl.so"))
(:unix "libgsl.so.0" "libgsl.so")
(:darwin "libgsl.dylib")
(:cygwin "cyggsl-0.dll")
(t (:default "libgsl")))
(cffi:use-foreign-library libgsl)
;; CFFI-Grovel definitions for unix systems.
;; Liam Healy 2009-05-25 13:10:50EDT libgsl-unix.lisp
;; Time-stamp: <2009-12-27 09:50:29EST libgsl-unix.lisp>
;; Time-stamp: <2010-05-23 11:24:56EDT libgsl-unix.lisp>
;;
;; Copyright 2009 Liam M. Healy
;; Distributed under the terms of the GNU General Public License
......@@ -26,7 +26,7 @@
;;; When installed through Mac Ports, GSL .h files will be found
;;; in /opt/local/include.
#+darwin
(cc-flags "-I/opt/local/include/")
(cc-flags #.(gsl-config "--cflags"))
(include "gsl/gsl_integration.h")
......
;; Define the structure for ODEs
;; Liam Healy 2009-06-06 16:42:29EDT ode-struct.lisp
;; Time-stamp: <2009-12-27 09:56:55EST ode-struct.lisp>
;; Time-stamp: <2010-05-23 11:37:27EDT ode-struct.lisp>
;;
;; Copyright 2006, 2007, 2008, 2009 Liam M. Healy
;; Copyright 2006, 2007, 2008, 2009, 2010 Liam M. Healy
;; Distributed under the terms of the GNU General Public License
;;
;; This program is free software: you can redistribute it and/or modify
......@@ -26,7 +26,7 @@
;;; When installed through Mac Ports, GSL .h files will be found
;;; in /opt/local/include.
#+darwin
(cc-flags "-I/opt/local/include/")
(cc-flags #.(gsl-config "--cflags"))
(include "gsl/gsl_odeiv.h")
......
;; Physical constants in the CGSM system
;; Liam Healy 2009-05-25 17:01:32EDT cgsm.lisp
;; Time-stamp: <2009-12-27 10:00:05EST cgsm.lisp>
;; Time-stamp: <2010-05-23 11:35:35EDT cgsm.lisp>
;;
;; Copyright 2009 Liam M. Healy
;; Copyright 2009, 2010 Liam M. Healy
;; Distributed under the terms of the GNU General Public License
;;
;; This program is free software: you can redistribute it and/or modify
......@@ -26,7 +26,7 @@
;;; When installed through Mac Ports, GSL .h files will be found
;;; in /opt/local/include.
#+darwin
(cc-flags "-I/opt/local/include/")
(cc-flags #.(gsl-config "--cflags"))
(include "gsl/gsl_const_cgsm.h")
......
;; Physical constants in the MKSA system
;; Liam Healy 2009-05-25 17:01:32EDT mksa.lisp
;; Time-stamp: <2009-12-27 10:00:04EST mksa.lisp>
;; Time-stamp: <2010-05-23 11:35:28EDT mksa.lisp>
;;
;; Copyright 2009 Liam M. Healy
;; Copyright 2009, 2010 Liam M. Healy
;; Distributed under the terms of the GNU General Public License
;;
;; This program is free software: you can redistribute it and/or modify
......@@ -26,7 +26,7 @@
;;; When installed through Mac Ports, GSL .h files will be found
;;; in /opt/local/include.
#+darwin
(cc-flags "-I/opt/local/include/")
(cc-flags #.(gsl-config "--cflags"))
(include "gsl/gsl_const_mksa.h")
......
;; Define the structure for series
;; Liam Healy 2009-06-06 11:08:11EDT series-struct.lisp
;; Time-stamp: <2009-12-27 10:05:34EST series-struct.lisp>
;; Time-stamp: <2010-05-23 11:37:50EDT series-struct.lisp>
;;
;; Copyright 2009 Liam M. Healy
;; Copyright 2009, 2010 Liam M. Healy
;; Distributed under the terms of the GNU General Public License
;;
;; This program is free software: you can redistribute it and/or modify
......@@ -26,7 +26,7 @@
;;; When installed through Mac Ports, GSL .h files will be found
;;; in /opt/local/include.
#+darwin
(cc-flags "-I/opt/local/include/")
(cc-flags #.(gsl-config "--cflags"))
(include "gsl/gsl_sum.h")
......
;; Define the structures for solvers
;; Liam Healy 2009-06-06 16:46:38EDT solver-struct.lisp
;; Time-stamp: <2009-12-27 10:05:31EST solver-struct.lisp>
;; Time-stamp: <2010-05-23 11:37:49EDT solver-struct.lisp>
;;
;; Copyright 2009 Liam M. Healy
;; Copyright 2009, 2010 Liam M. Healy
;; Distributed under the terms of the GNU General Public License
;;
;; This program is free software: you can redistribute it and/or modify
......@@ -26,7 +26,7 @@
;;; When installed through Mac Ports, GSL .h files will be found
;;; in /opt/local/include.
#+darwin
(cc-flags "-I/opt/local/include/")
(cc-flags #.(gsl-config "--cflags"))
(include "gsl/gsl_multifit_nlin.h")
......
;; CFFI-Grovel definitions for unix systems.
;; Liam Healy
;; Time-stamp: <2009-12-27 10:09:59EST sf-result.lisp>
;; Time-stamp: <2010-05-23 11:38:22EDT sf-result.lisp>
;;
;; Copyright 2009 Liam M. Healy
;; Copyright 2009, 2010 Liam M. Healy
;; Distributed under the terms of the GNU General Public License
;;
;; This program is free software: you can redistribute it and/or modify
......@@ -26,7 +26,7 @@
;;; When installed through Mac Ports, GSL .h files will be found
;;; in /opt/local/include.
#+darwin
(cc-flags "-I/opt/local/include/")
(cc-flags #.(gsl-config "--cflags"))
(include "gsl/gsl_sf_result.h")
......
;; Constants specifying limits of floating point calculations in hardware
;; Liam Healy
;; Time-stamp: <2010-05-22 10:01:27EDT machine.lisp>
;; Time-stamp: <2010-05-23 11:38:22EDT machine.lisp>
;;
;; Copyright 2009 Liam M. Healy
;; Copyright 2010 Liam M. Healy
;; Distributed under the terms of the GNU General Public License
;;
;; This program is free software: you can redistribute it and/or modify
......@@ -26,7 +26,7 @@
;;; When installed through Mac Ports, GSL .h files will be found
;;; in /opt/local/include.
#+darwin
(cc-flags "-I/opt/local/include/")
(cc-flags #.(gsl-config "--cflags"))
(include "gsl/gsl_machine.h")
......
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