]> sigrok.org Git - libsigrok.git/commitdiff
sr: FreeBSD has zlib, but no pkg-config file for it.
authorUwe Hermann <redacted>
Fri, 10 Feb 2012 23:34:16 +0000 (00:34 +0100)
committerUwe Hermann <redacted>
Fri, 10 Feb 2012 23:34:16 +0000 (00:34 +0100)
configure.ac

index afa88f60d26f01f254476454fe62ad6d47103730..8dae6adf61e52af55f0c8493c9f696d4f19ac00c 100644 (file)
@@ -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.