From: Uwe Hermann Date: Fri, 10 Feb 2012 23:34:16 +0000 (+0100) Subject: sr: FreeBSD has zlib, but no pkg-config file for it. X-Git-Tag: libsigrok-0.1.0~140 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=44b6aafdb748d961547bb80d5b0a0511f35d9702;p=libsigrok.git sr: FreeBSD has zlib, but no pkg-config file for it. --- diff --git a/configure.ac b/configure.ac index afa88f60..8dae6adf 100644 --- a/configure.ac +++ b/configure.ac @@ -191,9 +191,18 @@ PKG_CHECK_MODULES([libzip], [libzip >= 0.8], # zlib is only needed for some hardware drivers. if test "x$LA_ASIX_SIGMA" != xno; then - PKG_CHECK_MODULES([zlib], [zlib >= 1.2.3.1], - [CFLAGS="$CFLAGS $zlib_CFLAGS"; LIBS="$LIBS $zlib_LIBS"; - LIBSIGROK_PKGLIBS="$LIBSIGROK_PKGLIBS zlib"]) + case "$build" in + *freebsd*) + # FreeBSD has zlib, but no pkg-config file for it. + # Check manually, and do NOT add it to LIBSIGROK_PKGLIBS. + AC_CHECK_LIB(z, uncompress) + ;; + *) + PKG_CHECK_MODULES([zlib], [zlib >= 1.2.3.1], + [CFLAGS="$CFLAGS $zlib_CFLAGS"; LIBS="$LIBS $zlib_LIBS"; + LIBSIGROK_PKGLIBS="$LIBSIGROK_PKGLIBS zlib"]) + ;; + esac fi # libftdi is only needed for some hardware drivers.