From 2dfa80c71e8421d12b009ff077e4ec061bf10ba3 Mon Sep 17 00:00:00 2001 From: John Benediktsson Date: Wed, 20 Jun 2012 17:17:49 -0700 Subject: [PATCH] math.blas.config: deal with OS X libblas ABI mess x86-64 libblas uses different ABIs on 10.5 and 10.7, and is broken on 10.6. Modified from patch by Joe Groff. --- extra/math/blas/config/config.factor | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/extra/math/blas/config/config.factor b/extra/math/blas/config/config.factor index 4c9f785284..35ac310bc3 100644 --- a/extra/math/blas/config/config.factor +++ b/extra/math/blas/config/config.factor @@ -1,4 +1,5 @@ -USING: alien.fortran combinators kernel namespaces system ; +USING: alien.fortran combinators kernel math namespaces +sequences system system-info ; IN: math.blas.config SYMBOLS: blas-library blas-fortran-abi deploy-blas? ; @@ -13,7 +14,17 @@ blas-library [ blas-fortran-abi [ { - { [ os macosx? ] [ intel-unix-abi ] } + { [ os macosx? cpu x86.32? and ] [ intel-unix-abi ] } + { [ os macosx? cpu x86.64? and ] + [ + os-version second { + { [ dup 7 >= ] [ f2c-abi ] } + { [ dup 6 = ] [ "The libblas.dylib included in Mac OS X 10.6 is incompatible with Factor. To use the math.blas bindings y +ou will need to install a third-party BLAS library and configure Factor. See `\"math.blas.config\" about` for more information." ] } + [ intel-unix-abi ] + } cond nip + ] + } { [ os windows? cpu x86.32? and ] [ f2c-abi ] } { [ os windows? cpu x86.64? and ] [ gfortran-abi ] } ! { [ os freebsd? ] [ gfortran-abi ] }