Occurrrence analysis improvements for NOINLINE functions
[ghc.git] / hadrian / src / Settings / Packages / IntegerGmp.hs
1 module Settings.Packages.IntegerGmp (integerGmpPackageArgs) where
2
3 import Base
4 import Expression
5 import Oracles.Setting
6 import Rules.Gmp
7
8 -- TODO: Is this needed?
9 -- ifeq "$(GMP_PREFER_FRAMEWORK)" "YES"
10 -- libraries/integer-gmp_CONFIGURE_OPTS += --with-gmp-framework-preferred
11 -- endif
12 integerGmpPackageArgs :: Args
13 integerGmpPackageArgs = package integerGmp ? do
14 path <- expr gmpBuildPath
15 let includeGmp = "-I" ++ path -/- "include"
16 gmpIncludeDir <- getSetting GmpIncludeDir
17 gmpLibDir <- getSetting GmpLibDir
18 mconcat [ builder Cc ? arg includeGmp
19
20 , builder GhcCabal ? mconcat
21 [ (null gmpIncludeDir && null gmpLibDir) ?
22 arg "--configure-option=--with-intree-gmp"
23 , arg ("--configure-option=CFLAGS=" ++ includeGmp)
24 , arg ("--gcc-options=" ++ includeGmp) ] ]