Safe Haskell | None |
---|---|
Language | Haskell98 |
This module provides utilities for querying BuildFlags
from the
pkg-config database,
which is available on many Unix like operating systems.
- data Options = Options {
- searchPath :: Maybe [FilePath]
- static :: Bool
- defaultOptions :: Options
- pkgConfig :: Options -> String -> Action (BuildFlags -> BuildFlags)
- fromConfig :: Options -> (String -> Action (Maybe String)) -> Action (BuildFlags -> BuildFlags)
Documentation
PkgConfig options.
defaultOptions :: Options Source #
Default pkg-config
options.
This function is an alias for def
.
pkgConfig :: Options -> String -> Action (BuildFlags -> BuildFlags) Source #
Call pkg-config
with options and a package name and return a BuildFlags
modification function.
The pkg-config
executable must be installed on the build host.
fromConfig :: Options -> (String -> Action (Maybe String)) -> Action (BuildFlags -> BuildFlags) Source #
Given an initial Options
record and a configuration variable lookup function, call pkg-config
based on configuration variable settings and return a BuildFlags
modification function.
The following configuration variables are recognised:
PkgConfig.packages
- List of package names for which build flags should be queried
PkgConfig.options.searchPath
- Space-separated list of file paths, corresponds to the
searchPath
option PkgConfig.options.static
true
orfalse
, corresponds to thestatic
option