summaryrefslogtreecommitdiff
path: root/packages/gsl/hmatrix-gsl.cabal
blob: bfc25b127d79d173ed1b0f4a2c6965b683d30777 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
Name:               hmatrix-gsl
Version:            0.16.0.0
License:            GPL
License-file:       LICENSE
Author:             Alberto Ruiz
Maintainer:         Alberto Ruiz <aruiz@um.es>
Stability:          provisional
Homepage:           https://github.com/albertoruiz/hmatrix
Synopsis:           Numerical computation
Description:        Purely functional interface to basic linear algebra
                    and other numerical computations, internally implemented using
                    GSL, BLAS and LAPACK.

Category:           Math
tested-with:        GHC ==7.8

cabal-version:      >=1.8

build-type:         Simple

extra-source-files: src/Numeric/GSL/gsl-ode.c

flag dd
    description:    svd = zgesdd
    default:        True

flag mkl
    description:    Link with Intel's MKL optimized libraries.
    default:        False

flag unsafe
    description:    Compile the library with bound checking disabled.
    default:        False

flag finit
    description:    Force FPU initialization in foreing calls
    default:        False

flag debugfpu
    description:    Check FPU stack
    default:        False

flag debugnan
    description:    Check NaN
    default:        False

library

    Build-Depends:      base, hmatrix, array, vector,
                        process, random


    Extensions:         ForeignFunctionInterface,
                        CPP

    hs-source-dirs:     src
    Exposed-modules:    Numeric.GSL.Differentiation,
                        Numeric.GSL.Integration,
                        Numeric.GSL.Fourier,
                        Numeric.GSL.Polynomials,
                        Numeric.GSL.Minimization,
                        Numeric.GSL.Root,
                        Numeric.GSL.Fitting,
                        Numeric.GSL.ODE,
                        Numeric.GSL,
                        Numeric.GSL.LinearAlgebra,
                        Graphics.Plot
    other-modules:      Numeric.GSL.Internal,
                        Numeric.GSL.Vector,
                        Numeric.GSL.IO,
                        Numeric.GSL.Random


    C-sources:          src/Numeric/GSL/gsl-aux.c

    cc-options:         -O4 -msse2 -Wall

    cpp-options:        -DBINARY

 -- ghc-prof-options:   -auto

    ghc-options:  -Wall -fno-warn-missing-signatures
                        -fno-warn-orphans
                        -fno-warn-unused-binds

    if flag(unsafe)
        cpp-options: -DUNSAFE

    if !flag(dd)
        cpp-options: -DNOZGESDD

    if impl(ghc < 6.10.2)
        cpp-options: -DFINIT

    if impl(ghc == 7.0.1)
        cpp-options: -DFINIT

    if impl(ghc == 7.0.2)
        cpp-options: -DFINIT

    if flag(finit)
        cpp-options: -DFINIT

    if flag(debugfpu)
        cc-options: -DFPUDEBUG

    if flag(debugnan)
        cc-options: -DNANDEBUG

    if impl(ghc == 7.0.1)
        cpp-options: -DNONORMVTEST

    if flag(mkl)
      if arch(x86_64)
        extra-libraries:   gsl mkl_lapack mkl_intel_lp64 mkl_sequential mkl_core
      else
        extra-libraries:   gsl mkl_lapack mkl_intel mkl_sequential mkl_core

    if os(OSX)
        extra-lib-dirs: /opt/local/lib/
        include-dirs: /opt/local/include/
        extra-lib-dirs: /usr/local/lib/
        include-dirs: /usr/local/include/
        extra-libraries: gsl
        if arch(i386)
            cc-options: -arch i386
        frameworks: Accelerate

    if os(freebsd)
       extra-lib-dirs: /usr/local/lib
       include-dirs: /usr/local/include
       extra-libraries: gsl blas lapack

    if os(windows)
        extra-libraries: gsl-0 blas lapack

    if os(linux)
        if arch(x86_64)
            cc-options: -fPIC

    extra-libraries: gsl

source-repository head
    type:     git
    location: https://github.com/albertoruiz/hmatrix

-- The tests are in package hmatrix-tests