Commit aa3bcf99 authored by Duncan Coutts's avatar Duncan Coutts
Browse files

Fix bug where we'd try to configure an empty set of pkg-config packages

This happened when the lib used pkg-config but the exe did not.
It cropped up in hsSqlite3-0.0.5.
parent 12f34b36
......@@ -583,11 +583,12 @@ configurePkgconfigPackages verbosity pkg_descr conf
return exe { buildInfo = buildInfo exe `mappend` bi }
pkgconfigBuildInfo :: [Dependency] -> IO BuildInfo
pkgconfigBuildInfo pkgdeps = do
let pkgs = nub [ display pkg | Dependency pkg _ <- pkgdeps ]
pkgconfigBuildInfo pkgdeps | null pkgs = return mempty
| otherwise = do
ccflags <- pkgconfig ("--cflags" : pkgs)
ldflags <- pkgconfig ("--libs" : pkgs)
return (ccLdOptionsBuildInfo (words ccflags) (words ldflags))
where pkgs = nub [ display pkg | Dependency pkg _ <- pkgdeps ]
-- | Makes a 'BuildInfo' from C compiler and linker flags.
--
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment