|
| 1 | +From 7cfb45fa97bcdc97f556bf10d54bd0211f5fca74 Mon Sep 17 00:00:00 2001 |
| 2 | +From: Mark Harfouche <mark.harfouche@gmail.com> |
| 3 | +Date: Sat, 1 Nov 2025 13:43:10 -0400 |
| 4 | +Subject: [PATCH 27/28] Use zlib-ng on unix instead of zlib |
| 5 | + |
| 6 | +--- |
| 7 | + configure | 20 ++++++++++---------- |
| 8 | + configure.ac | 2 +- |
| 9 | + 2 files changed, 11 insertions(+), 11 deletions(-) |
| 10 | + |
| 11 | +diff --git a/configure b/configure |
| 12 | +index 8af6bd4..868896f 100755 |
| 13 | +--- a/configure |
| 14 | ++++ b/configure |
| 15 | +@@ -21713,19 +21713,19 @@ fi |
| 16 | + |
| 17 | + |
| 18 | + pkg_failed=no |
| 19 | +-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for zlib >= 1.2.0" >&5 |
| 20 | +-printf %s "checking for zlib >= 1.2.0... " >&6; } |
| 21 | ++{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for zlib-ng >= 2.2.5" >&5 |
| 22 | ++printf %s "checking for zlib-ng >= 2.2.5... " >&6; } |
| 23 | + |
| 24 | + if test -n "$ZLIB_CFLAGS"; then |
| 25 | + pkg_cv_ZLIB_CFLAGS="$ZLIB_CFLAGS" |
| 26 | + elif test -n "$PKG_CONFIG"; then |
| 27 | + if test -n "$PKG_CONFIG" && \ |
| 28 | +- { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"zlib >= 1.2.0\""; } >&5 |
| 29 | +- ($PKG_CONFIG --exists --print-errors "zlib >= 1.2.0") 2>&5 |
| 30 | ++ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"zlib-ng >= 2.2.5\""; } >&5 |
| 31 | ++ ($PKG_CONFIG --exists --print-errors "zlib-ng >= 2.2.5") 2>&5 |
| 32 | + ac_status=$? |
| 33 | + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
| 34 | + test $ac_status = 0; }; then |
| 35 | +- pkg_cv_ZLIB_CFLAGS=`$PKG_CONFIG --cflags "zlib >= 1.2.0" 2>/dev/null` |
| 36 | ++ pkg_cv_ZLIB_CFLAGS=`$PKG_CONFIG --cflags "zlib-ng >= 2.2.5" 2>/dev/null` |
| 37 | + test "x$?" != "x0" && pkg_failed=yes |
| 38 | + else |
| 39 | + pkg_failed=yes |
| 40 | +@@ -21737,12 +21737,12 @@ if test -n "$ZLIB_LIBS"; then |
| 41 | + pkg_cv_ZLIB_LIBS="$ZLIB_LIBS" |
| 42 | + elif test -n "$PKG_CONFIG"; then |
| 43 | + if test -n "$PKG_CONFIG" && \ |
| 44 | +- { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"zlib >= 1.2.0\""; } >&5 |
| 45 | +- ($PKG_CONFIG --exists --print-errors "zlib >= 1.2.0") 2>&5 |
| 46 | ++ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"zlib-ng >= 2.2.5\""; } >&5 |
| 47 | ++ ($PKG_CONFIG --exists --print-errors "zlib-ng >= 2.2.5") 2>&5 |
| 48 | + ac_status=$? |
| 49 | + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
| 50 | + test $ac_status = 0; }; then |
| 51 | +- pkg_cv_ZLIB_LIBS=`$PKG_CONFIG --libs "zlib >= 1.2.0" 2>/dev/null` |
| 52 | ++ pkg_cv_ZLIB_LIBS=`$PKG_CONFIG --libs "zlib-ng >= 2.2.5" 2>/dev/null` |
| 53 | + test "x$?" != "x0" && pkg_failed=yes |
| 54 | + else |
| 55 | + pkg_failed=yes |
| 56 | +@@ -21763,9 +21763,9 @@ else |
| 57 | + _pkg_short_errors_supported=no |
| 58 | + fi |
| 59 | + if test $_pkg_short_errors_supported = yes; then |
| 60 | +- ZLIB_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "zlib >= 1.2.0" 2>&1` |
| 61 | ++ ZLIB_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "zlib-ng >= 2.2.5" 2>&1` |
| 62 | + else |
| 63 | +- ZLIB_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "zlib >= 1.2.0" 2>&1` |
| 64 | ++ ZLIB_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "zlib-ng >= 2.2.5" 2>&1` |
| 65 | + fi |
| 66 | + # Put the nasty error message in config.log where it belongs |
| 67 | + echo "$ZLIB_PKG_ERRORS" >&5 |
| 68 | +diff --git a/configure.ac b/configure.ac |
| 69 | +index 480e59d..18140ec 100644 |
| 70 | +--- a/configure.ac |
| 71 | ++++ b/configure.ac |
| 72 | +@@ -5416,7 +5416,7 @@ AH_TEMPLATE([HAVE_ZLIB_COPY], [Define if the zlib library has inflateCopy]) |
| 73 | + dnl detect zlib from Emscripten emport |
| 74 | + PY_CHECK_EMSCRIPTEN_PORT([ZLIB], [-sUSE_ZLIB]) |
| 75 | + |
| 76 | +-PKG_CHECK_MODULES([ZLIB], [zlib >= 1.2.0], [ |
| 77 | ++PKG_CHECK_MODULES([ZLIB], [zlib-ng >= 2.2.5], [ |
| 78 | + have_zlib=yes |
| 79 | + dnl zlib 1.2.0 (2003) added inflateCopy |
| 80 | + AC_DEFINE([HAVE_ZLIB_COPY], [1]) |
| 81 | +-- |
| 82 | +2.51.0 |
| 83 | + |
0 commit comments