GMP: Use --enable-fat' instead of tinkering with config.guess'.

svn path=/nixpkgs/branches/stdenv-updates/; revision=27126
This commit is contained in:
Ludovic Courtès 2011-05-03 22:38:52 +00:00
parent 8aa7d7b1ac
commit d00b303766

View File

@ -1,7 +1,8 @@
{stdenv, fetchurl, m4, cxx ? true, static ? false}:
let
staticFlags = if static then " --enable-static --disable-shared" else "";
staticFlags = stdenv.lib.optionals static
[ "--enable-static" "--disable-shared" ];
in
stdenv.mkDerivation rec {
@ -14,12 +15,12 @@ stdenv.mkDerivation rec {
buildNativeInputs = [m4];
# Prevent the build system from using sub-architecture-specific
# instructions (e.g., SSE2 on i686).
preConfigure = "ln -sf configfsf.guess config.guess";
configureFlags =
# Build a "fat binary", with routines for several sub-architectures (x86).
[ "--enable-fat" ]
configureFlags = if cxx then "--enable-cxx" else "--disable-cxx" +
staticFlags;
++ (if cxx then [ "--enable-cxx" ] else [ "--disable-cxx" ])
++ staticFlags;
dontDisableStatic = if static then true else false;