]> gitweb.factorcode.org Git - factor.git/blob - extra/math/blas/config/config.factor
factor: trim more using lists.
[factor.git] / extra / math / blas / config / config.factor
1 USING: alien.fortran combinators kernel math.order namespaces
2 system system-info ;
3 IN: math.blas.config
4
5 SYMBOLS: blas-library blas-fortran-abi deploy-blas? ;
6
7 blas-library [
8     {
9         { [ os macosx?  ] [ "libblas.dylib" ] }
10         { [ os windows? ] [ "blas.dll"      ] }
11         [ "libblas.so" ]
12     } cond
13 ] initialize
14
15 blas-fortran-abi [
16     {
17         { [ os macosx? cpu x86.32? and ] [ intel-unix-abi ] }
18         { [ os macosx? cpu x86.64? and ]
19             [
20                 os-version {
21                     { [ dup { 10 7 } after=? ] [ f2c-abi ] }
22                     { [ dup { 10 6 } after=? ] [ "The libblas.dylib included in Mac OS X 10.6 is incompatible with Factor. To use the math.blas bindings y
23 ou will need to install a third-party BLAS library and configure Factor. See `\"math.blas.config\" about` for more information." <bad-fortran-abi> ] }
24                     [ intel-unix-abi ]
25                 } cond nip
26             ]
27         }
28         { [ os windows? cpu x86.32? and ] [ f2c-abi        ] }
29         { [ os windows? cpu x86.64? and ] [ gfortran-abi   ] }
30         ! { [ os freebsd?                 ] [ gfortran-abi   ] }
31         { [ os linux?                   ] [ gfortran-abi   ] }
32         [ f2c-abi ]
33     } cond
34 ] initialize
35
36 deploy-blas? [ os macosx? not ] initialize