source: project/release/3/atlas-lapack/trunk/atlas-lapack.setup @ 13043

Last change on this file since 13043 was 13043, checked in by Ivan Raikov, 12 years ago

Version set to 1.10.

File size: 1.6 KB
Line 
1;;;; atlas-lapack.setup
2
3(define has-exports? (string>=? (chicken-version) "2.310"))
4
5(define (dynld-name fn)         
6  (make-pathname #f fn ##sys#load-dynamic-extension))   
7
8(required-extension-version 'blas "1.8")
9
10
11(define (atlas-try-compile header ldflags)
12  (and (try-compile
13        (string-append "#include <stdlib.h>\n"
14                       "#include " header "\n"
15                       "int main() { clapack_sgetrf(0, 0, 0, NULL, 0, NULL) ; return 0; }\n")
16        ldflags: ldflags)
17       ldflags ))
18
19(define-macro (atlas-test rest)
20  `(define ld-options
21     (or (any identity (map (lambda (p) (atlas-try-compile (car p) (cadr p))) ,rest))
22         (error "unable to find ATLAS library"))))
23
24
25(define atlas-flags
26  `(
27    ("<atlas/clapack.h>"   " -llapack_atlas -latlas -lm")
28    ("<clapack.h>"         " -llapack_atlas -latlas -lm")
29   
30    ("<atlas/clapack.h>"   " -latlas -lm")
31    ("<clapack.h>"         " -latlas -lm")
32   
33    ("<atlas/clapack.h>"   " -llapack_atlas -latlas -lm -lg2c")
34    ("<clapack.h>"         " -llapack_atlas -latlas -lm -lg2c")
35   
36    ("<atlas/clapack.h>"   " -latlas -lm -lg2c")
37    ("<clapack.h>"         " -latlas -lm -lg2c")
38    ))
39
40
41(atlas-test atlas-flags)
42
43
44(compile -O2 -d0 -s
45         ,@(if has-exports? '(-check-imports -emit-exports atlas-lapack.exports) '())
46         atlas-lapack.scm -L "\"" ,ld-options "\"" -X easyffi)
47
48(run (csi -qbs atlas-lapack-eggdoc.scm > atlas-lapack.html))
49
50(install-extension
51 'atlas-lapack
52 `(,(dynld-name "atlas-lapack")
53   ,@(if has-exports? '("atlas-lapack.exports") (list)) )
54 `((version 1.10)
55   (documentation "atlas-lapack.html")
56   ,@(if has-exports? `((exports "atlas-lapack.exports")) (list)) ))
Note: See TracBrowser for help on using the repository browser.