From d39972da886dc96059924a3d88f41f38348c3b61 Mon Sep 17 00:00:00 2001 From: Pete Gadomski Date: Mon, 10 Apr 2017 08:13:36 -0600 Subject: [PATCH] Split the pkg-config version and flags checks Apparently, on RHEL 6.7, pkg-config doesn't let you check versions and output flags in the same command run. --- build.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/build.rs b/build.rs index c4abff2..85e2734 100644 --- a/build.rs +++ b/build.rs @@ -29,11 +29,14 @@ static HEADER: &'static str = "#include \n"; fn main() { // Assert that the appropriate version of MagickWand is installed, // since we are very dependent on the particulars of MagickWand. - let library = pkg_config::Config::new() + pkg_config::Config::new() .atleast_version(MIN_VERSION) .arg(format!("--max-version={}", MAX_VERSION)) .probe("MagickWand") .unwrap(); + // We have to split the version check and the cflags/libs check because you can't do both at + // the same time on RHEL (apparently). + let library = pkg_config::Config::new().probe("MagickWand").unwrap(); // If the generated bindings are missing, generate them now. let out_dir = PathBuf::from(env::var("OUT_DIR").unwrap());