4 //! A number of environment variables are available to globally configure how
5 //! this crate will invoke `pkg-config`:
7 -//! * `PKG_CONFIG_ALLOW_CROSS` - if this variable is not set, then `pkg-config`
8 -//! will automatically be disabled for all cross compiles.
9 //! * `FOO_NO_PKG_CONFIG` - if set, this will disable running `pkg-config` when
10 //! probing for the library named `foo`.
12 @@ -106,9 +104,8 @@ pub enum Error {
13 /// Contains the name of the responsible environment variable.
14 EnvNoPkgConfig(String),
16 - /// Cross compilation detected.
18 - /// Override with `PKG_CONFIG_ALLOW_CROSS=1`.
19 + /// Cross compilation detected. Kept for compatibility;
20 + /// the Debian package never emits this.
23 /// Failed to run `pkg-config`.
24 @@ -152,11 +145,6 @@ impl fmt::Display for Error {
25 fn fmt(&self, f: &mut fmt::Formatter) -> Result<(), fmt::Error> {
27 Error::EnvNoPkgConfig(ref name) => write!(f, "Aborted because {} is set", name),
28 - Error::CrossCompilation => write!(
30 - "Cross compilation detected. \
31 - Use PKG_CONFIG_ALLOW_CROSS=1 to override"
36 @@ -180,7 +168,7 @@ impl fmt::Display for Error {
40 - Error::__Nonexhaustive => panic!(),
41 + Error::CrossCompilation | Error::__Nonexhaustive => panic!(),
45 @@ -341,6 +329,8 @@ impl Config {
49 + // always enable PKG_CONFIG_ALLOW_CROSS override in Debian
52 // pkg-config may not be aware of cross-compilation, and require
53 // a wrapper script that sets up platform-specific prefixes.
56 @@ -34,7 +34,6 @@ fn find(name: &str) -> Result<pkg_config
57 pkg_config::probe_library(name)
64 @@ -46,7 +45,6 @@ fn cross_disabled() {