withFeature
lib.withFeature
Docs pulled from | This Revision | 8 minutes ago
Create an --{with,without}- string that can be passed to standard GNU Autoconf scripts.
Inputs
flag
- 1. Function argument
feature
- 2. Function argument
Type
withFeature :: bool -> string -> string
Examples
lib.strings.withFeature
usage example
withFeature true "shared"
=> "--with-shared"
withFeature false "shared"
=> "--without-shared"
Noogle detected
Implementation
The following is the current implementation of this function.
withFeature = flag: feature:
assert isString feature; # e.g. passing openssl instead of "openssl"
"--${if flag then "with" else "without"}-${feature}";