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