1 module Settings
.Packages
.IntegerGmp
(integerGmpPackageArgs
, gmpBuildPath
) where
5 import GHC
(integerGmp
)
6 import Predicates
(builder
, builderCc
, package
)
8 import Oracles
.Config
.Setting
10 -- TODO: move build artefacts to buildRootPath, see #113
11 -- TODO: Is this needed?
12 -- ifeq "$(GMP_PREFER_FRAMEWORK)" "YES"
13 -- libraries/integer-gmp_CONFIGURE_OPTS += --with-gmp-framework-preferred
15 integerGmpPackageArgs
:: Args
16 integerGmpPackageArgs
= package integerGmp ?
do
17 let includeGmp
= "-I" ++ gmpBuildPath
-/- "include"
18 gmpIncludeDir
<- getSetting GmpIncludeDir
19 gmpLibDir
<- getSetting GmpLibDir
21 mconcat
[ builder GhcCabal ? mconcat
22 [ (null gmpIncludeDir
&& null gmpLibDir
) ?
23 arg
"--configure-option=--with-intree-gmp"
24 , appendSub
"--configure-option=CFLAGS" [includeGmp
]
25 , appendSub
"--gcc-options" [includeGmp
] ]
27 , builderCc ? arg includeGmp
]