Adds integer gmp path to the Gcc builder.
[hadrian.git] / src / Settings / Packages / IntegerGmp.hs
1 module Settings.Packages.IntegerGmp (integerGmpPackageArgs) where
2
3 import Base
4 import Expression
5 import GHC (integerGmp)
6 import Predicates (builder, builderGcc, package)
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 ?
14 mconcat
15 [ builder GhcCabal ? mconcat
16 [ arg "--configure-option=--with-intree-gmp"
17 , appendSub "--configure-option=CFLAGS" includeGmp
18 , appendSub "--gcc-options" includeGmp ]
19 , builderGcc ? ( arg $ "-I" ++ pkgPath integerGmp -/- "gmp" )
20 ]
21 where
22 includeGmp = ["-I" ++ pkgPath integerGmp -/- "gmp"]