From 0c698ef0374b671d3b6a8def2d9c113797ceaec3 Mon Sep 17 00:00:00 2001 From: Felipe Contreras Date: Sun, 11 May 2014 22:09:32 -0500 Subject: configure: add workaround for systems without zlib.pc Some systems (e.g. FreeBSD) might not have installed the appropriate pkg-config file as they should. We can workaround the issue by creating the .pc file they should have distributed. Signed-off-by: Felipe Contreras --- configure | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'configure') diff --git a/configure b/configure index 9bde2eb7..99ab74dc 100755 --- a/configure +++ b/configure @@ -340,6 +340,15 @@ else errors=$((errors + 1)) fi +if ! pkg-config --exists zlib; then + ${CC} ${zlib_cflags} -o compat/gen_zlib_pc \ + "$srcdir"/compat/gen_zlib_pc.c ${zlib_ldflags} > /dev/null 2>&1 && + compat/gen_zlib_pc > compat/zlib.pc && + PKG_CONFIG_PATH="$PKG_CONFIG_PATH":compat && + export PKG_CONFIG_PATH + rm -f compat/gen_zlib_pc +fi + printf "Checking for zlib (>= 1.2.5.2)... " have_zlib=0 if pkg-config --atleast-version=1.2.5.2 zlib; then -- cgit v1.2.3