Call GMP's configure in gmpBuildPath.
[hadrian.git] / src / Settings / Builders / Configure.hs
1 module Settings.Builders.Configure (configureArgs) where
2
3 import Base
4 import Expression
5 import Oracles.Config.Setting
6 import Predicates (builder)
7 import Settings
8
9 configureArgs :: Args
10 configureArgs = mconcat
11 [ builder (Configure libffiBuildPath) ? do
12 top <- getTopDirectory
13 targetPlatform <- getSetting TargetPlatform
14 mconcat [ arg $ "--prefix=" ++ top -/- libffiBuildPath -/- "inst"
15 , arg $ "--libdir=" ++ top -/- libffiBuildPath -/- "inst/lib"
16 , arg $ "--enable-static=yes"
17 , arg $ "--enable-shared=no" -- TODO: add support for yes
18 , arg $ "--host=" ++ targetPlatform ]
19
20 , builder (Configure gmpBuildPath) ? do
21 hostPlatform <- getSetting HostPlatform
22 buildPlatform <- getSetting BuildPlatform
23 mconcat [ arg $ "--enable-shared=no"
24 , arg $ "--host=" ++ hostPlatform
25 , arg $ "--build=" ++ buildPlatform ] ]