Changeset 11067 in project


Ignore:
Timestamp:
06/23/08 11:12:55 (12 years ago)
Author:
Ivan Raikov
Message:

Added build system support for libraries linked with f2c.

Location:
release/3/atlas-lapack/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • release/3/atlas-lapack/trunk/atlas-lapack-eggdoc.scm

    r7358 r11067  
    1313
    1414     (history
     15      (version "1.9" "Added build system support for libraries linked with f2c")
    1516      (version "1.8" "Build script updated for better cross-platform compatibility")
    1617      (version "1.7" "Fixed a bug in the trtri interface")
  • release/3/atlas-lapack/trunk/atlas-lapack.setup

    r6598 r11067  
    88(required-extension-version 'blas "1.8")
    99
    10 (define (make-atlas-lapack-test header ldflags)
    11 `(test-compile
    12   ,(string-append header "\n"
    13                   "int main() { clapack_sgetrf(0, 0, 0, NULL, 0, NULL); return 0; }\n")
    14   ldflags: ,(string-append ldflags "\n")))
    1510
    16 (define-macro (atlas-lapack-test fst . rest)
     11(define (atlas-try-compile header ldflags)
     12  (and (try-compile
     13        (string-append "#include " header "\n"
     14                       "int main() { clapack_sgetrf(0, 0, 0, NULL, 0, NULL) ; return 0; }\n")
     15        ldflags: ldflags)
     16       ldflags ))
     17
     18(define-macro (atlas-test rest)
    1719  `(define ld-options
    18      (cond ,@(map (lambda (p) (make-atlas-lapack-test (car p) (cdr p)))
    19                   (cons fst rest))
    20            (else (error "unable to figure out location of ATLAS-LAPACK library")))))
     20     (or (any identity (map (lambda (p) (atlas-try-compile (car p) (cadr p))) ,rest))
     21         (error "unable to find ATLAS library"))))
    2122
    22 (atlas-lapack-test
    23  ("#include <atlas/clapack.h>"   . "-llapack_atlas -latlas -lm")
    24  ("#include <clapack.h>"         . "-llapack_atlas -latlas -lm"))
     23
     24(define atlas-flags
     25  `(
     26    ("<atlas/clapack.h>"   " -llapack_atlas -latlas -lm")
     27    ("<clapack.h>"         " -llapack_atlas -latlas -lm")
     28   
     29    ("<atlas/clapack.h>"   " -latlas -lm")
     30    ("<clapack.h>"         " -latlas -lm")
     31   
     32    ("<atlas/clapack.h>"   " -llapack_atlas -latlas -lm -lg2c")
     33    ("<clapack.h>"         " -llapack_atlas -latlas -lm -lg2c")
     34   
     35    ("<atlas/clapack.h>"   " -latlas -lm -lg2c")
     36    ("<clapack.h>"         " -latlas -lm -lg2c")
     37    ))
     38
     39
     40(atlas-test atlas-flags)
     41
    2542
    2643(compile -O2 -d0 -s
     
    3249(install-extension
    3350 'atlas-lapack
    34  `(,(dynld-name "atlas-lapack") "atlas-lapack.html"
     51 `(,(dynld-name "atlas-lapack")
    3552   ,@(if has-exports? '("atlas-lapack.exports") (list)) )
    36  `((version 1.8)
     53 `((version 1.9)
    3754   (documentation "atlas-lapack.html")
    3855   ,@(if has-exports? `((exports "atlas-lapack.exports")) (list)) ))
Note: See TracChangeset for help on using the changeset viewer.